aboutsummaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/main/webapp
diff options
context:
space:
mode:
Diffstat (limited to 'vid-app-common/src/main/webapp')
-rw-r--r--vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js29
-rw-r--r--vid-app-common/src/main/webapp/app/vid/scripts/services/change-management.service.js17
2 files changed, 46 insertions, 0 deletions
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js b/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js
index a071a58de..f8202fbf2 100644
--- a/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js
@@ -380,6 +380,26 @@
});
return JSON.stringify(result);
}
+
+ function getWorkflowParametersFromForm() {
+ let workflowParameters =
+ {requestDetails:{
+ cloudConfiguration:{},
+ requestParameters:{userParams:[{}]}
+ }};
+ workflowParameters.requestDetails.cloudConfiguration = vm.changeManagement.vnfNames[0].cloudConfiguration;
+
+ let parameters = vm.getRemoteWorkFlowParameters(vm.changeManagement.workflow);
+ let i = 1;
+ parameters.forEach((parameter)=>{
+ let inputField = document.getElementById('so-workflow-parameter-'+i);
+ i++;
+ workflowParameters.requestDetails.requestParameters.userParams[0][parameter.name]=inputField.value;
+ });
+
+ return workflowParameters;
+ }
+
vm.openModal = function () {
if(vm.hasScheduler) { //scheduling supported
$scope.widgetParameter = ""; // needed by the scheduler?
@@ -406,6 +426,15 @@
var vnfName = vm.changeManagement.vnfNames[0].name;
changeManagementService.postChangeManagementNow(dataToSo, vnfName);
}
+
+ let workflowParameters = getWorkflowParametersFromForm();
+ if(workflowParameters){
+ let servieInstanceId = vm.changeManagement.vnfNames[0]['service-instance-node'][0].properties['service-instance-id'];
+ let vnfInstanceId = vm.changeManagement.vnfNames[0].id;
+ let workflow_UUID = vm.changeManagement.fromVNFVersion;
+
+ changeManagementService.postWorkflowsParametersNow(servieInstanceId,vnfInstanceId,workflow_UUID,workflowParameters);
+ }
}
};
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/services/change-management.service.js b/vid-app-common/src/main/webapp/app/vid/scripts/services/change-management.service.js
index 4b45b891d..e545aadb1 100644
--- a/vid-app-common/src/main/webapp/app/vid/scripts/services/change-management.service.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/services/change-management.service.js
@@ -142,5 +142,22 @@
return {data: []};
});
};
+
+ this.postWorkflowsParametersNow = function (serviceInstanceId,vnfInstanceId,workflow_UUID,requestData) {
+ let baseUrl = "workflows-management/{serviceInstanceId}/{vnfInstanceId}/{workflow_UUID}";
+ let url = baseUrl.
+ replace("{serviceInstanceId}",serviceInstanceId).
+ replace("{vnfInstanceId}",vnfInstanceId).
+ replace("{workflow_UUID}",workflow_UUID);
+
+ return $http.post(url, requestData)
+ .success(function (response) {
+ return {data: response};
+ })
+ .catch(function (err) {
+ return {data: []};
+ });
+ };
+
}
})();