Show username on topbar menu 12/53012/1
authorElisha Oren <elisha.oren@hpe.com>
Wed, 8 Mar 2017 15:01:21 +0000 (17:01 +0200)
committerElisha Oren <elisha.oren@hpe.com>
Wed, 8 Mar 2017 15:01:21 +0000 (17:01 +0200)
Change-Id: I12700317a821fe9b1514d37ee8438a04c19671e5
Signed-off-by: Elisha Oren <elisha.oren@hpe.com>
modules/common-topbar-resources/src/main/resources/topbar/topbar.controller.js
modules/common-topbar-resources/src/main/resources/topbar/user_menu.tpl.html

index 1b1aaf1140f804378810fc3de6ddaad60b967f87..81e9616de6bf61041352ff86e1aa5349d311c839 100644 (file)
@@ -46,5 +46,9 @@ define(['common/topbar/topbar.module', 'common/topbar/topbar.directives', 'commo
                 $window.location.href = 'index.html#/login';
             });
         }
+
+        $scope.getUsername = function() {
+            return $window.localStorage.odlUser;
+        };
     });
 });
index 29d369ea4292a0dd2272beec5eec7e3601327f9e..d8be4aa4ee445b6eafb218fd3086afb081b77bdc 100644 (file)
@@ -1 +1 @@
-<li data-ng-click="logOut()"><a href="#" id="logout-button" class="btn"><i class="icon-off"></i> Logout</a></li>
+<li data-ng-click="logOut()"><a href="#" id="logout-button" class="btn"><i class="icon-off"></i> Logout ({{getUsername()}})</a></li>