summaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/main/webapp/app
diff options
context:
space:
mode:
authorAmichai Hemli <ah0398@intl.att.com>2018-09-26 07:59:15 +0000
committerGerrit Code Review <gerrit@onap.org>2018-09-26 07:59:15 +0000
commit52cb6586c32cb99b1aab99bebfa51b01d98beba4 (patch)
tree82435d62a893c3485a2395ed38e27a5c5589e758 /vid-app-common/src/main/webapp/app
parentdb8a45e5bc3e6a604f445462c9b660b82ec02082 (diff)
parent81514934814195389ed1cea1266ac305751bcddb (diff)
Merge "Changed VF creation to new MSO scaleout API"
Diffstat (limited to 'vid-app-common/src/main/webapp/app')
-rw-r--r--vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js24
-rw-r--r--vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.html6
2 files changed, 19 insertions, 11 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 c55092e4c..fca5a7c7e 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
@@ -10,7 +10,7 @@
vm.hasScheduler = !!VIDCONFIGURATION.SCHEDULER_PORTAL_URL;
vm.configUpdatePatternError = "Invalid file type. Please select a file with a CSV extension.";
vm.configUpdateContentError = "Invalid file structure.";
-
+
vm.wizardStep = 1;
vm.nextStep = function(){
vm.wizardStep++;
@@ -193,9 +193,10 @@
var result = {};
result.requestType = changeManagement.workflow;
var workflowType = changeManagement.workflow;
+ var configurationParameters = changeManagement.configurationParameters;
result.requestDetails = [];
_.forEach(changeManagement.vnfNames, function (vnf) {
-
+
try{
var requestInfoData ={};
var requestParametersData ={};
@@ -203,13 +204,13 @@
return !item.scale;
});
if (vnf.availableVersions && vnf.availableVersions.length!=0){
-
+
requestInfoData ={
source: vnf.availableVersions[0].requestInfo.source,
suppressRollback: vnf.availableVersions[0].requestInfo.suppressRollback,
requestorId: vnf.availableVersions[0].requestInfo.requestorId
}
-
+
if(workflowType=='Update'){
requestParametersData = {
usePreload: vnf.availableVersions[0].requestParameters.usePreload
@@ -278,7 +279,8 @@
cloudConfiguration: vnf.cloudConfiguration,
requestInfo: requestInfoData,
relatedInstanceList: [],
- requestParameters:requestParametersData
+ requestParameters:requestParametersData,
+ configurationParameters: JSON.parse(configurationParameters)
};
requestInfoData.instanceName = vnf.name + "_" + (moduleToScale.currentCount + 1);
}else{
@@ -297,7 +299,8 @@
cloudConfiguration: vnf.cloudConfiguration,
requestInfo: requestInfoData,
relatedInstanceList: [],
- requestParameters:requestParametersData
+ requestParameters:requestParametersData,
+ configurationParameters: []
};
}
@@ -352,7 +355,6 @@
});
return JSON.stringify(result);
}
-
vm.openModal = function () {
if(vm.hasScheduler) { //scheduling supported
$scope.widgetParameter = ""; // needed by the scheduler?
@@ -370,7 +372,7 @@
widgetData: vm.changeManagement,
widgetParameter: $scope.widgetParameter
};
-
+
window.parent.postMessage(data, VIDCONFIGURATION.SCHEDULER_PORTAL_URL);
} else {
//no scheduling support
@@ -380,7 +382,9 @@
if(vm.changeManagement.workflow==="VNF Scale Out") {
dataToSo = JSON.parse(dataToSo);
dataToSo = {requestDetails: dataToSo.requestDetails[0]};
- changeManagementService.postChangeManagementScaleOutNow(dataToSo, vm.changeManagement.vnfNames[0]["service-instance-node"][0].properties["service-instance-id"], vm.changeManagement.vnfNames[0].id);
+ changeManagementService.postChangeManagementScaleOutNow(dataToSo,
+ vm.changeManagement.vnfNames[0]["service-instance-node"][0].properties["service-instance-id"],
+ vm.changeManagement.vnfNames[0].id);
}else{
//TODO: foreach
var vnfName = vm.changeManagement.vnfNames[0].name;
@@ -649,7 +653,7 @@
vm.isConfigUpdate = function () {
return vm.changeManagement.workflow === COMPONENT.WORKFLOWS.vnfConfigUpdate;
}
-
+
vm.isScaleOut = function () {
return vm.changeManagement.workflow === COMPONENT.WORKFLOWS.vnfScaleOut;
}
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.html b/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.html
index ec1d4cde6..21f9c5d3f 100644
--- a/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.html
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.html
@@ -58,6 +58,10 @@
<option value="" disabled>Select workflow</option>
</select>
</div>
+ <div class="form-group" ng-if="vm.isScaleOut()">
+ <label class="control-label">Configuration Parameters</label>
+ <input type="text" name="configurationParameters" ng-model="vm.changeManagement.configurationParameters" id="configuration-parameters" required>
+ </div>
<div class="form-group" ng-if="vm.isConfigUpdate()">
<label class="control-label">Attach configuration file</label>
<div class="file-wrapper">
@@ -143,4 +147,4 @@
<button ng-if="vm.isScaleOut() && vm.wizardStep === 1" ng-click="vm.nextStep();" type="button" id="next" name="next" class="btn btn-primary" data-ng-disabled="newChangeManagement.$invalid">Next</button>
</div>
</div>
-</form>
+</form> \ No newline at end of file