diff options
author | 2018-05-15 16:49:07 +0800 | |
---|---|---|
committer | 2018-05-15 16:50:04 +0800 | |
commit | 3316e8d2a893fcaf8cddff1dd47fa0d6d106487c (patch) | |
tree | e08964e1a2cd9865e9b62ec1d65d326fc270171b /usecaseui-lcm/src/main/webapp/app/uui/fusion/scripts/controller | |
parent | a3591f7fe0b20bd010b6daa5054a919aab6aa5fa (diff) |
fix e2e service template bug for ns detail show
Change-Id: I53f0f8273fac3f6e26b69c98882cd78ebe262d6d
Issue-ID: USECASEUI-115
Signed-off-by: zhangab <zhanganbing@chinamobile.com>
Diffstat (limited to 'usecaseui-lcm/src/main/webapp/app/uui/fusion/scripts/controller')
-rw-r--r-- | usecaseui-lcm/src/main/webapp/app/uui/fusion/scripts/controller/ServiceTemplateService.js | 6 | ||||
-rw-r--r-- | usecaseui-lcm/src/main/webapp/app/uui/fusion/scripts/controller/lcmController.js | 52 |
2 files changed, 55 insertions, 3 deletions
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 acb61f92..ad1818dd 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 @@ -108,6 +108,7 @@ headers: uuiHeaders }).then(function(response){ var inputRsp = response.data; + console.log(inputRsp); processFun(inputRsp); }); }, @@ -139,6 +140,7 @@ headers: uuiHeaders }).then(function(response){ var sdnControllers = response.data; + console.log(sdnControllers); var result = sdnControllers.map(function (sdn) { return { name: sdn['thirdparty-sdnc-id'], @@ -172,7 +174,7 @@ reqParas[parameter.name] = parameter.value.value; } } else { - newreqParas[parameter.name] = parameter.value; + reqParas[parameter.name] = parameter.value; } }); @@ -222,7 +224,7 @@ // console.log(requestBody); // console.log(JSON.stringify(requestBody)); - return false; + // return false; return $http({ url: url+'/services', method: 'POST', 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 ffdb622d..a7091f83 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 @@ -173,7 +173,6 @@ app.controller('lcmCtrl', ['$scope', '$uibModal', '$log', '$http', '$timeout', ' } ); - }; ctrl.deleteService = function (serviceInstance) { @@ -198,6 +197,55 @@ app.controller('lcmCtrl', ['$scope', '$uibModal', '$log', '$http', '$timeout', ' ServiceTemplateService.deleteService(serviceInstance.serviceInstanceId, ctrl.customer, ctrl.serviceType, successFun); }; + ctrl.upDateService = function (serviceInstance) { + + var modalInstance = $uibModal.open({ + ariaLabelledBy: 'modal-title', + ariaDescribedBy: 'modal-body', + templateUrl: 'app/uui/fusion/scripts/view-models/scale-service-dialog.html', + controller: 'scaleServiceCtrl', + controllerAs: 'ctrl', + resolve: { + customer: function () { + return ctrl.customer; + }, + serviceType: function () { + return ctrl.serviceType; + }, + serviceInstance: serviceInstance + } + }); + modalInstance.result.then( + function (result) { + console.log(result); + console.log(serviceInstance); + var successFun = function (result) { + ctrl.alerts.push({ + type: 'success', + msg: result + }); + ServiceTemplateService.getServiceInstances(ctrl.customer.id, ctrl.serviceType.value, function (instances) { + ctrl.serviceInstances = instances; + }); + } + var failFun = function (reason) { + console.log(reason) + ctrl.alerts.push({ + type: 'danger', + msg: reason + }); + } + openServiceProgressDialog(result.serviceId, result.operationId, 'Scale Service', successFun, failFun); + }, + function (reason) { + console.log('receive cancel button clicked!'); + console.log(reason); + $log.info('Modal dismissed at: ' + new Date()); + } + ); + + }; + ctrl.packageOnboard = function (onboardPackage) { if (onboardPackage.type === 'NS') { var processFun = function (response) { @@ -360,6 +408,7 @@ app.controller('lcmCtrl', ['$scope', '$uibModal', '$log', '$http', '$timeout', ' }); return { nodeTemplateName: nestedTemplate.name, + customizationUuid:nestedTemplate.customizationUuid, invariantUUID: nestedTemplate.invariantUUID, uuid: nestedTemplate.uuid, type: nestedTemplate.type, @@ -374,6 +423,7 @@ app.controller('lcmCtrl', ['$scope', '$uibModal', '$log', '$http', '$timeout', ' segments: segmentsPara }; ctrl.service = service; + console.log(service); }; ctrl.service = { serviceName: '', |