Commit a141e43e authored by Jochen Kressin's avatar Jochen Kressin
Browse files

moved roles to collapseable panel

parent 3fbe83fe
<div class="searchguard app-container ng-scope">
<div class="kuiLocalNav">
<div class="kuiLocalNavRow">
<div class="kuiLocalNavRow__section">
<div class="kuiLocalTitle">
......@@ -11,18 +12,51 @@
<div class="kuiLocalNavRow__section">
<div class="kuiLocalMenu">
<div class="kuiLocalMenuItem">
<div class="kuiLocalMenuItem"
ng-class="{'kuiLocalMenuItem-isSelected': kbnTopNav.isCurrent(menuItem.key), 'kuiLocalMenuItem-isDisabled': menuItem.disableButton()}"
ng-click="ctrl.showSubmenu = !ctrl.showSubmenu"
tooltip="Show more"
tooltip-placement="bottom"
tooltip-popup-delay="400"
tooltip-append-to-body="1"
ng-show="ctrl.showroles">
<div class="kuiLocalMenuItem__icon kuiIcon fa-user"></div>
Logged in as: {{ctrl.username}}
{{ctrl.username}}
</div>
<div class="kuiLocalMenuItem" ng-show="ctrl.showroles">
<div class="kuiLocalMenuItem__icon kuiIcon fa-group"></div>
Roles: {{ctrl.roles}}
<div class="kuiLocalMenuItem kuiLocalMenuItem-isDisabled" ng-show="!ctrl.showroles">
<div>
<div class="kuiLocalMenuItem__icon kuiIcon fa-user"></div>
{{ctrl.username}}
</div>
</div>
</div>
</div>
</div>
<div class="kuiLocalDropdown" ng-show="ctrl.showSubmenu">
<button class="kuiLocalDropdownCloseButton" ng-click="ctrl.showSubmenu = false">
<span class="fa fa-chevron-circle-up"></span>
</button>
<div id="template_wrapper">
<div class="kuiLocalDropdownPanels">
<div class="kuiLocalDropdownPanel">
<!-- Title -->
<div data-test-subj="shareUiTitle" class="kuiLocalDropdownTitle ng-binding">
Roles for user {{ctrl.username}}
</div>
<div class="kuiLocalDropdownWarning ng-scope">
<ul>
<li ng-repeat="role in ctrl.rolesArray" ng-bind="role"></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="kuiLocalNavRow kuiLocalNavRow--secondary" ng-show="ctrl.showfilter">
<div class="kuiLocalSearch">
<input
......
......@@ -57,6 +57,8 @@ uiModules
this.currentTenant = null;
this.tenantSearch = "";
this.roles = "";
this.rolesArray = {};
this.showSubmenu = false;
$http.get(`${API_ROOT}/multitenancy/info`)
.then(
......@@ -110,6 +112,7 @@ uiModules
this.tenants = allTenants;
this.tenantkeys = tenantkeys;
this.roles = response.data.sg_roles.join(", ");
this.rolesArray = response.data.sg_roles;
$http.get(`${API_ROOT}/multitenancy/tenant`)
.then(
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment