forked from grafana/grafana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(signup): selecting org after invite now works
- Loading branch information
Showing
6 changed files
with
98 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<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> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
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(); | ||
|
||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters