From 1a53b6bf5ab268e7a92d90ee9fe812d8835e7490 Mon Sep 17 00:00:00 2001 From: Rina Roi Date: Mon, 29 Jul 2019 10:00:16 +0300 Subject: Add app version to welcome page Issue-ID: VID-539 Signed-off-by: Rina Roi Change-Id: I595869e5d6b0af279eb61cc18dac329f7fac094a --- .../webapp/WEB-INF/fusion/jsp/ebz/ebz_header.jsp | 36 ++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) (limited to 'epsdk-app-onap/src/main') diff --git a/epsdk-app-onap/src/main/webapp/WEB-INF/fusion/jsp/ebz/ebz_header.jsp b/epsdk-app-onap/src/main/webapp/WEB-INF/fusion/jsp/ebz/ebz_header.jsp index 44fe53a88..4808ccd43 100644 --- a/epsdk-app-onap/src/main/webapp/WEB-INF/fusion/jsp/ebz/ebz_header.jsp +++ b/epsdk-app-onap/src/main/webapp/WEB-INF/fusion/jsp/ebz/ebz_header.jsp @@ -246,6 +246,7 @@     {{app_name}} + {{app_version}}
@@ -313,6 +314,7 @@ fullName:'', email:'' } + $scope.app_version=""; /*Put user info into fields*/ $scope.inputUserInfo = function(userInfo){ if (typeof(userInfo) != "undefined" && userInfo!=null && userInfo!=''){ @@ -388,7 +390,21 @@ } ]; return megaMenuDataObjectTemp; - }; + }; + + var getAppVersion = function() { + return $http.get('version') + .then(function(response) { + if (typeof response.data === 'object') { + return response.data; + } else { + return $q.reject(response.data); + } + }, function(response) { + // something went wrong + return $q.reject(response.data); + }); + } /*Left Menu*/ @@ -425,7 +441,23 @@ console.log('getAppName failed', error); }); - + getAppVersion().then(function(response){ + var j = response; + try{ + if(j){ + $scope.app_version = j.displayVersion; + + }else{ + throw "Version response is not in expected format."; + } + }catch (e) { + console.log("Error happened while trying to get app version: "+e); + return; + } + },function(error){ + console.log('getAppVersion failed', error); + }); + $scope.getTopMenuStaticInfo(); $scope.getMenu=function() { -- cgit 1.2.3-korg