Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Metabase
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Engineering Digital Service
Metabase
Commits
e19e7c11
Commit
e19e7c11
authored
9 years ago
by
Tom Robinson
Browse files
Options
Downloads
Patches
Plain Diff
Simplify section switching, merge orgName into newUser
parent
6edaf844
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
resources/frontend_client/app/setup/partials/setup_info.html
+3
-3
3 additions, 3 deletions
resources/frontend_client/app/setup/partials/setup_info.html
resources/frontend_client/app/setup/setup.controllers.js
+4
-7
4 additions, 7 deletions
resources/frontend_client/app/setup/setup.controllers.js
with
7 additions
and
10 deletions
resources/frontend_client/app/setup/partials/setup_info.html
+
3
−
3
View file @
e19e7c11
<div
class=
"SetupSteps wrapper wrapper-max-sm"
>
<section
class=
"SetupStep bordered rounded relative"
ng-class=
"{ 'SetupStep--active' : activeStep == 'user', 'SetupStep--completed' : completedSteps.user }"
>
<div
class=
"flex align-center py2"
ng-click=
"
setA
ctiveStep
(
'user'
)
"
>
<div
class=
"flex align-center py2"
ng-click=
"
a
ctiveStep
=
'user'"
>
<span
class=
"SetupStep-indicator flex layout-centered absolute bordered"
>
<span
class=
"SetupStep-number"
>
1
</span>
<cv-check-icon
class=
"SetupStep-check"
width=
"16px"
height=
"16px"
></cv-check-icon>
...
...
@@ -40,7 +40,7 @@
<div
class=
"Form-field"
mb-form-field=
"organization"
>
<mb-form-label
display-name=
"Organization name"
field-name=
"password"
></mb-form-label>
<input
class=
"Form-input Form-offset full"
name=
"organization"
type=
"text"
placeholder=
"Organization name"
ng-model=
"
u
ser
O
rgName"
autofocus
required
>
<input
class=
"Form-input Form-offset full"
name=
"organization"
type=
"text"
placeholder=
"Organization name"
ng-model=
"
newU
ser
.o
rgName"
autofocus
required
>
<span
class=
"Form-charm"
></span>
</div>
...
...
@@ -56,7 +56,7 @@
</section>
<section
class=
"SetupStep bordered border-dashed rounded relative"
ng-class=
"{ 'SetupStep--active' : activeStep == 'database', 'SetupStep--completed' : completedSteps.database }"
>
<div
class=
"flex align-center py2"
ng-click=
"setActiveStep('database')"
>
<div
class=
"flex align-center py2"
>
<span
class=
"SetupStep-indicator flex layout-centered absolute bordered"
>
<span
class=
"SetupStep-number"
>
2
</span>
<cv-check-icon
class=
"SetupStep-check"
width=
"16px"
height=
"16px"
></cv-check-icon>
...
...
This diff is collapsed.
Click to expand it.
resources/frontend_client/app/setup/setup.controllers.js
+
4
−
7
View file @
e19e7c11
...
...
@@ -23,7 +23,6 @@ SetupControllers.controller('SetupInfo', ['$scope', '$routeParams', '$location',
};
$scope
.
newUser
=
{};
$scope
.
userOrgName
=
""
;
$scope
.
setActiveStep
=
function
(
name
)
{
console
.
log
(
name
);
...
...
@@ -107,13 +106,13 @@ SetupControllers.controller('SetupInfo', ['$scope', '$routeParams', '$location',
if
(
AppState
.
model
.
currentOrg
)
{
return
Organization
.
update
({
'
id
'
:
AppState
.
model
.
currentOrg
.
id
,
'
name
'
:
$scope
.
u
ser
O
rgName
,
'
slug
'
:
$scope
.
u
ser
O
rgName
'
name
'
:
$scope
.
newU
ser
.
o
rgName
,
'
slug
'
:
$scope
.
newU
ser
.
o
rgName
}).
$promise
;
}
else
{
return
Organization
.
create
({
'
name
'
:
$scope
.
u
ser
O
rgName
,
'
slug
'
:
$scope
.
u
ser
O
rgName
'
name
'
:
$scope
.
newU
ser
.
o
rgName
,
'
slug
'
:
$scope
.
newU
ser
.
o
rgName
}).
$promise
.
then
(
function
(
org
)
{
console
.
log
(
'
first org created
'
,
org
);
...
...
@@ -125,8 +124,6 @@ SetupControllers.controller('SetupInfo', ['$scope', '$routeParams', '$location',
}
$scope
.
createOrgAndUser
=
function
()
{
console
.
log
(
"
currentOrg
"
,
AppState
.
model
.
currentOrg
);
console
.
log
(
"
currentUser
"
,
AppState
.
model
.
currentUser
);
// start off by creating the first user of the system
// NOTE: this should both create the user AND log us in and return a session id
createOrUpdateUser
().
then
(
function
()
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment