Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
13c70ac0
Commit
13c70ac0
authored
Aug 31, 2015
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(signup): selecting org after invite now works
parent
14884d5a
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
98 additions
and
4 deletions
+98
-4
public/app/controllers/signupCtrl.js
+5
-2
public/app/features/all.js
+1
-0
public/app/features/profile/partials/select_org.html
+53
-0
public/app/features/profile/selectOrgCtrl.js
+33
-0
public/app/partials/login.html
+2
-2
public/app/routes/all.js
+4
-0
No files found.
public/app/controllers/signupCtrl.js
View file @
13c70ac0
...
@@ -27,8 +27,11 @@ function (angular, config) {
...
@@ -27,8 +27,11 @@ function (angular, config) {
}
}
backendSrv
.
post
(
'/api/user/signup/step2'
,
$scope
.
formModel
).
then
(
function
(
rsp
)
{
backendSrv
.
post
(
'/api/user/signup/step2'
,
$scope
.
formModel
).
then
(
function
(
rsp
)
{
console
.
log
(
rsp
);
if
(
rsp
.
code
===
'redirect-to-select-org'
)
{
//window.location.href = config.appSubUrl + '/';
window
.
location
.
href
=
config
.
appSubUrl
+
'/profile/select-org?signup=1'
;
}
else
{
window
.
location
.
href
=
config
.
appSubUrl
+
'/'
;
}
});
});
};
};
...
...
public/app/features/all.js
View file @
13c70ac0
...
@@ -7,6 +7,7 @@ define([
...
@@ -7,6 +7,7 @@ define([
'./panel/all'
,
'./panel/all'
,
'./profile/profileCtrl'
,
'./profile/profileCtrl'
,
'./profile/changePasswordCtrl'
,
'./profile/changePasswordCtrl'
,
'./profile/selectOrgCtrl'
,
'./org/all'
,
'./org/all'
,
'./admin/all'
,
'./admin/all'
,
],
function
()
{});
],
function
()
{});
public/app/features/profile/partials/select_org.html
0 → 100644
View file @
13c70ac0
<div
class=
"container"
>
<div
class=
"signup-page-background"
>
</div>
<div
class=
"login-box"
>
<div
class=
"login-box-logo"
>
<img
src=
"img/logo_transparent_200x75.png"
>
</div>
<div
class=
"invite-box"
>
<h3>
<i
class=
"fa fa-users"
></i>
Change active organization
</h3>
<div
class=
"modal-tagline"
>
You have been added to another Organization
<br>
due to an open invitation!
<br><br>
Please select which organization you want to
<br>
use right now (you can change this later at any time).
</div>
<div
style=
"display: inline-block; width: 400px; margin: 30px 0"
>
<table
class=
"grafana-options-table"
>
<tr
ng-repeat=
"org in orgs"
>
<td
class=
"nobg max-width-btns"
>
<a
ng-click=
"setUsingOrg(org)"
class=
"btn btn-inverse"
>
{{org.name}} ({{org.role}})
</a>
</td>
</tr>
</table>
</div>
</div>
<div
class=
"row"
style=
"margin-top: 50px"
>
<div
class=
"version-footer text-center small"
>
Grafana version: {{buildInfo.version}}, commit: {{buildInfo.commit}},
build date: {{buildInfo.buildstamp | date: 'yyyy-MM-dd HH:mm:ss' }}
</div>
</div>
</div>
</div>
public/app/features/profile/selectOrgCtrl.js
0 → 100644
View file @
13c70ac0
define
([
'angular'
,
'config'
,
],
function
(
angular
,
config
)
{
'use strict'
;
var
module
=
angular
.
module
(
'grafana.controllers'
);
module
.
controller
(
'SelectOrgCtrl'
,
function
(
$scope
,
backendSrv
,
contextSrv
)
{
contextSrv
.
sidemenu
=
false
;
$scope
.
init
=
function
()
{
$scope
.
getUserOrgs
();
};
$scope
.
getUserOrgs
=
function
()
{
backendSrv
.
get
(
'/api/user/orgs'
).
then
(
function
(
orgs
)
{
$scope
.
orgs
=
orgs
;
});
};
$scope
.
setUsingOrg
=
function
(
org
)
{
backendSrv
.
post
(
'/api/user/using/'
+
org
.
orgId
).
then
(
function
()
{
window
.
location
.
href
=
config
.
appSubUrl
+
'/'
;
});
};
$scope
.
init
();
});
});
public/app/partials/login.html
View file @
13c70ac0
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
</button>
</button>
</div>
</div>
<form
name=
"loginForm"
class=
"login-form"
>
<form
name=
"loginForm"
class=
"login-form"
style=
"margin-top: 25px;"
>
<div
class=
"tight-from-container"
>
<div
class=
"tight-from-container"
>
<div
class=
"tight-form"
ng-if=
"loginMode"
>
<div
class=
"tight-form"
ng-if=
"loginMode"
>
<ul
class=
"tight-form-list"
>
<ul
class=
"tight-form-list"
>
...
@@ -41,7 +41,7 @@
...
@@ -41,7 +41,7 @@
<div
class=
"clearfix"
></div>
<div
class=
"clearfix"
></div>
</div>
</div>
<div
class=
"tight-form"
ng-if=
"!loginMode"
>
<div
class=
"tight-form"
ng-if=
"!loginMode"
style=
"margin: 20px 0 57px 0"
>
<ul
class=
"tight-form-list"
>
<ul
class=
"tight-form-list"
>
<li
class=
"tight-form-item"
style=
"width: 79px"
>
<li
class=
"tight-form-item"
style=
"width: 79px"
>
<strong>
Email
</strong>
<strong>
Email
</strong>
...
...
public/app/routes/all.js
View file @
13c70ac0
...
@@ -74,6 +74,10 @@ define([
...
@@ -74,6 +74,10 @@ define([
templateUrl
:
'app/features/profile/partials/password.html'
,
templateUrl
:
'app/features/profile/partials/password.html'
,
controller
:
'ChangePasswordCtrl'
,
controller
:
'ChangePasswordCtrl'
,
})
})
.
when
(
'/profile/select-org'
,
{
templateUrl
:
'app/features/profile/partials/select_org.html'
,
controller
:
'SelectOrgCtrl'
,
})
.
when
(
'/admin/settings'
,
{
.
when
(
'/admin/settings'
,
{
templateUrl
:
'app/features/admin/partials/settings.html'
,
templateUrl
:
'app/features/admin/partials/settings.html'
,
controller
:
'AdminSettingsCtrl'
,
controller
:
'AdminSettingsCtrl'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment