|
@@ -7,8 +7,9 @@ import _ from 'lodash';
|
|
|
export class ProfileCtrl {
|
|
export class ProfileCtrl {
|
|
|
user: any;
|
|
user: any;
|
|
|
old_theme: any;
|
|
old_theme: any;
|
|
|
- orgs: any;
|
|
|
|
|
|
|
+ orgs: any = [];
|
|
|
userForm: any;
|
|
userForm: any;
|
|
|
|
|
+ showOrgsList: boolean = false;
|
|
|
|
|
|
|
|
/** @ngInject **/
|
|
/** @ngInject **/
|
|
|
constructor(private backendSrv, private contextSrv, private $location) {
|
|
constructor(private backendSrv, private contextSrv, private $location) {
|
|
@@ -26,6 +27,7 @@ export class ProfileCtrl {
|
|
|
getUserOrgs() {
|
|
getUserOrgs() {
|
|
|
this.backendSrv.get('/api/user/orgs').then(orgs => {
|
|
this.backendSrv.get('/api/user/orgs').then(orgs => {
|
|
|
this.orgs = orgs;
|
|
this.orgs = orgs;
|
|
|
|
|
+ this.showOrgsList = orgs.length > 1;
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
|