From edc10fc96ed7e010c5cfa60fd2e8d8f7a8eb5cc8 Mon Sep 17 00:00:00 2001 From: kunw Date: Tue, 20 Sep 2016 15:03:15 +0800 Subject: [PATCH] Updates for showing version on UI. --- controllers/base.go | 2 -- .../js/components/optional-menu/optional-menu.directive.js | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/controllers/base.go b/controllers/base.go index 1b54c9f5a..bd3171926 100644 --- a/controllers/base.go +++ b/controllers/base.go @@ -113,8 +113,6 @@ func (b *BaseController) Prepare() { b.SelfRegistration = true } b.Data["SelfRegistration"] = b.SelfRegistration - - b.Data["Version"] = os.Getenv("VERSION") } // Forward to setup layout and template for content for a page. diff --git a/static/resources/js/components/optional-menu/optional-menu.directive.js b/static/resources/js/components/optional-menu/optional-menu.directive.js index 8435b5bfc..64b7121ef 100644 --- a/static/resources/js/components/optional-menu/optional-menu.directive.js +++ b/static/resources/js/components/optional-menu/optional-menu.directive.js @@ -57,7 +57,7 @@ } function about() { $scope.$emit('modalTitle', $filter('tr')('about_harbor')); - $scope.$emit('modalMessage', $filter('tr')('current_version', [vm.version])); + $scope.$emit('modalMessage', $filter('tr')('current_version', [vm.version || 'Unknown'])); var raiseInfo = { 'confirmOnly': true, 'contentType': 'text/html',