From 286bfde41731dbfba5328406fd72cabe43e54860 Mon Sep 17 00:00:00 2001 From: Luji7 Date: Mon, 13 Nov 2017 22:52:29 +0800 Subject: Fix location name issue. Change-Id: Id36a518554a7b70d87cc0dce688d919f211ec2cd Issue-id: USECASEUI-55 Signed-off-by: Luji7 --- .../app/uui/fusion/scripts/controller/ServiceTemplateService.js | 4 ++-- .../webapp/app/uui/fusion/scripts/controller/lcmController.js | 9 ++++++++- .../uui/fusion/scripts/view-models/create-service-dialog.html | 5 ++++- 3 files changed, 14 insertions(+), 4 deletions(-) (limited to 'usecaseui-lcm/src/main') diff --git a/usecaseui-lcm/src/main/webapp/app/uui/fusion/scripts/controller/ServiceTemplateService.js b/usecaseui-lcm/src/main/webapp/app/uui/fusion/scripts/controller/ServiceTemplateService.js index 9482597d..79e62c02 100644 --- a/usecaseui-lcm/src/main/webapp/app/uui/fusion/scripts/controller/ServiceTemplateService.js +++ b/usecaseui-lcm/src/main/webapp/app/uui/fusion/scripts/controller/ServiceTemplateService.js @@ -319,9 +319,9 @@ }); }, - queryVfOnboardProgress: function (jobId, progressFun) { + queryVfOnboardProgress: function (jobId, responseId, progressFun) { return $http({ - url: url+'/jobs/' + jobId, + url: url+'/jobs/' + jobId + '?responseId=' + responseId, method: 'GET', data: null, headers: uuiHeaders diff --git a/usecaseui-lcm/src/main/webapp/app/uui/fusion/scripts/controller/lcmController.js b/usecaseui-lcm/src/main/webapp/app/uui/fusion/scripts/controller/lcmController.js index 0a23df92..8917f60d 100644 --- a/usecaseui-lcm/src/main/webapp/app/uui/fusion/scripts/controller/lcmController.js +++ b/usecaseui-lcm/src/main/webapp/app/uui/fusion/scripts/controller/lcmController.js @@ -382,6 +382,7 @@ function ($uibModalInstance, ServiceTemplateService, jobId, operationTitle, $q, var timerDeferred = $q.defer(); var timerPromise = timerDeferred.promise; + var responseId = '0'; var progressFun = function (responseDescriptor) { if('finished' === responseDescriptor.status || 'error' === responseDescriptor.status) { ctrl.dynamic = 100; @@ -396,11 +397,17 @@ function ($uibModalInstance, ServiceTemplateService, jobId, operationTitle, $q, ctrl.dynamic = responseDescriptor.progress; ctrl.operation = responseDescriptor.statusDescription; console.log('timer processing ......'); + responseId = responseDescriptor.responseId; + if(responseId === undefined) { + console.log('Cannot get responseId...'); + $uibModalInstance.close(''); + timerDeferred.resolve(); + } } }; var timer = $interval(function () { - ServiceTemplateService.queryVfOnboardProgress(jobId, progressFun); + ServiceTemplateService.queryVfOnboardProgress(jobId, responseId, progressFun); }, 1000); timerPromise.then(function () { diff --git a/usecaseui-lcm/src/main/webapp/app/uui/fusion/scripts/view-models/create-service-dialog.html b/usecaseui-lcm/src/main/webapp/app/uui/fusion/scripts/view-models/create-service-dialog.html index 295bcfd0..263656f5 100644 --- a/usecaseui-lcm/src/main/webapp/app/uui/fusion/scripts/view-models/create-service-dialog.html +++ b/usecaseui-lcm/src/main/webapp/app/uui/fusion/scripts/view-models/create-service-dialog.html @@ -91,7 +91,10 @@ -->
-