From: Elisha Oren Date: Wed, 8 Mar 2017 15:01:21 +0000 (+0200) Subject: Show username on topbar menu X-Git-Tag: release/carbon~3 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=289652dbe22cf081727b88f29f01b2499c29a0af;p=dlux.git Show username on topbar menu Change-Id: I12700317a821fe9b1514d37ee8438a04c19671e5 Signed-off-by: Elisha Oren --- diff --git a/modules/common-topbar-resources/src/main/resources/topbar/topbar.controller.js b/modules/common-topbar-resources/src/main/resources/topbar/topbar.controller.js index 1b1aaf11..81e9616d 100644 --- a/modules/common-topbar-resources/src/main/resources/topbar/topbar.controller.js +++ b/modules/common-topbar-resources/src/main/resources/topbar/topbar.controller.js @@ -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; + }; }); }); diff --git a/modules/common-topbar-resources/src/main/resources/topbar/user_menu.tpl.html b/modules/common-topbar-resources/src/main/resources/topbar/user_menu.tpl.html index 29d369ea..d8be4aa4 100644 --- a/modules/common-topbar-resources/src/main/resources/topbar/user_menu.tpl.html +++ b/modules/common-topbar-resources/src/main/resources/topbar/user_menu.tpl.html @@ -1 +1 @@ -
  • Logout
  • +
  • Logout ({{getUsername()}})