mirror of
https://github.com/grafana/grafana.git
synced 2024-11-30 12:44:10 -06:00
feat(profile): hide orgs list when it only contains one org
This commit is contained in:
parent
592ae5a39a
commit
21c5b543fb
@ -33,8 +33,8 @@
|
||||
<a href="profile/password" class="btn btn-inverse">Change Password</a>
|
||||
</div>
|
||||
|
||||
<h3 class="page-heading">Organizations</h3>
|
||||
<div class="gf-form-group">
|
||||
<h3 class="page-heading" ng-show="ctrl.showOrgsList">Organizations</h3>
|
||||
<div class="gf-form-group" ng-show="ctrl.showOrgsList">
|
||||
<table class="filter-table form-inline">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -7,8 +7,9 @@ import _ from 'lodash';
|
||||
export class ProfileCtrl {
|
||||
user: any;
|
||||
old_theme: any;
|
||||
orgs: any;
|
||||
orgs: any = [];
|
||||
userForm: any;
|
||||
showOrgsList: boolean = false;
|
||||
|
||||
/** @ngInject **/
|
||||
constructor(private backendSrv, private contextSrv, private $location) {
|
||||
@ -26,6 +27,7 @@ export class ProfileCtrl {
|
||||
getUserOrgs() {
|
||||
this.backendSrv.get('/api/user/orgs').then(orgs => {
|
||||
this.orgs = orgs;
|
||||
this.showOrgsList = orgs.length > 1;
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user