diff options
Diffstat (limited to 'app/common/directives')
-rw-r--r-- | app/common/directives/app-header.html | 11 | ||||
-rw-r--r-- | app/common/directives/app-header.js | 2 |
2 files changed, 12 insertions, 1 deletions
diff --git a/app/common/directives/app-header.html b/app/common/directives/app-header.html index bf4fb8f..ec03874 100644 --- a/app/common/directives/app-header.html +++ b/app/common/directives/app-header.html @@ -2,7 +2,16 @@ <!-- HEADER --> <div class="header__info-section"> <span class="header__title">OpenBMC</span> - <a href="" class="header__logout" ng-click="logout()">Log out</a> + <div class="header__actions" uib-dropdown> + <button id="user-actions" type="button" uib-dropdown-toggle> + <icon class="icon-user" file="icon-avatar.svg"></icon> + {{username}} + </button> + <ul class="dropdown-menu" uib-dropdown-menu role="menu" aria-labelledby="user-actions"> + <li role="menuitem"><a href="#/profile-settings" class="btn">Profile settings</a></li> + <li role="menuitem"><button ng-click="logout()" type="button" class="btn">Log out</button></li> + </ul> + </div> </div> <div class="header__functions-section"> <div class="logo__wrapper"> diff --git a/app/common/directives/app-header.js b/app/common/directives/app-header.js index 98d210f..df39772 100644 --- a/app/common/directives/app-header.js +++ b/app/common/directives/app-header.js @@ -14,6 +14,7 @@ window.angular && (function(angular) { function( $rootScope, $scope, dataService, userModel, $location, $route) { $scope.dataService = dataService; + $scope.username = ''; try { // Create a secure websocket with URL as /subscribe @@ -118,6 +119,7 @@ window.angular && (function(angular) { $scope.loadNetworkInfo(); $scope.loadServerHealth(); $scope.loadSystemName(); + $scope.username = dataService.getUser(); } loadData(); |