aboutsummaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/main/webapp/app
diff options
context:
space:
mode:
Diffstat (limited to 'vid-app-common/src/main/webapp/app')
-rwxr-xr-xvid-app-common/src/main/webapp/app/vid/scripts/controller/ServiceModelController.js2
-rw-r--r--vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js38
-rw-r--r--vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.html6
-rwxr-xr-xvid-app-common/src/main/webapp/app/vid/scripts/services/asdcService.js6
4 files changed, 28 insertions, 24 deletions
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/controller/ServiceModelController.js b/vid-app-common/src/main/webapp/app/vid/scripts/controller/ServiceModelController.js
index 89660fb18..aee4c05fe 100755
--- a/vid-app-common/src/main/webapp/app/vid/scripts/controller/ServiceModelController.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/controller/ServiceModelController.js
@@ -190,7 +190,7 @@
DataService.setPnf(!angular.equals(serviceModel.pnfs, {}));
$scope.createType = COMPONENT.A_LA_CARTE;
var broadcastType = COMPONENT.CREATE_COMPONENT;
- if (AsdcService.isMacro(serviceModel)) {
+ if (AsdcService.isMacro(serviceModel) || DataService.getE2EService()) {
DataService.setALaCarte(false);
if(AsdcService.shouldExcludeMacroFromAsyncInstatiationFlow(serviceModel)){
DataService.setShouldExcludeMacroFromAsyncInstatiationFlow(true);
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..3a5a1c7e0 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++;
@@ -94,14 +94,14 @@
_.forEach(newVNFName.vfModules, function (mdl, key) {
mdl.scale = false; //defaults to not scale unless user changes it
- if(mdl.properties && mdl.properties.max_vf_module_instances) {
+ if(mdl.properties && mdl.properties.maxCountInstances) {
//how many vf modules of the same customizationId belong to that vnf instance
mdl.currentCount = _.filter(vm.vfModules, function(item){
return modulesAaiIds.indexOf(item.id) > -1 && item.properties["model-customization-id"] === mdl.customizationUuid;
}).length;
- mdl.scalable = mdl.properties.max_vf_module_instances.value - mdl.currentCount > 0;
+ mdl.scalable = mdl.properties.maxCountInstances.value - mdl.currentCount > 0;
}else{
mdl.scalable = false;
}
@@ -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
@@ -268,17 +269,22 @@
var data;
if(workflowType=="VNF Scale Out") {
data = {
+ vnfName: vnf.name,
+ vnfInstanceId: vnf.id,
modelInfo: {
modelType: 'vfModule',
modelInvariantId: moduleToScale.invariantUuid,
modelName: moduleToScale.modelCustomizationName,
modelVersion: moduleToScale.version,
+ modelCustomizationName: moduleToScale.modelCustomizationName,
+ modelCustomizationId: moduleToScale.customizationUuid,
modelVersionId: moduleToScale.uuid
},
cloudConfiguration: vnf.cloudConfiguration,
requestInfo: requestInfoData,
relatedInstanceList: [],
- requestParameters:requestParametersData
+ requestParameters:requestParametersData,
+ configurationParameters: JSON.parse(configurationParameters)
};
requestInfoData.instanceName = vnf.name + "_" + (moduleToScale.currentCount + 1);
}else{
@@ -333,6 +339,7 @@
var relatedInstance = {
instanceId: vnf.id,
modelInfo: {
+ modelCustomizationId: vnf.availableVersions[0].modelInfo.modelCustomizationId,
modelCustomizationName: vnf.availableVersions[0].modelInfo.modelCustomizationName,
modelInvariantId: vnf.availableVersions[0].modelInfo.modelInvariantId,
modelName: vnf.availableVersions[0].modelInfo.modelName,
@@ -352,7 +359,6 @@
});
return JSON.stringify(result);
}
-
vm.openModal = function () {
if(vm.hasScheduler) { //scheduling supported
$scope.widgetParameter = ""; // needed by the scheduler?
@@ -370,22 +376,14 @@
widgetData: vm.changeManagement,
widgetParameter: $scope.widgetParameter
};
-
+
window.parent.postMessage(data, VIDCONFIGURATION.SCHEDULER_PORTAL_URL);
} else {
//no scheduling support
var dataToSo = extractChangeManagementCallbackDataStr(vm.changeManagement);
if(dataToSo) {
-
- 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);
- }else{
- //TODO: foreach
- var vnfName = vm.changeManagement.vnfNames[0].name;
- changeManagementService.postChangeManagementNow(dataToSo, vnfName);
- }
+ var vnfName = vm.changeManagement.vnfNames[0].name;
+ changeManagementService.postChangeManagementNow(dataToSo, vnfName);
}
}
};
@@ -649,7 +647,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
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/services/asdcService.js b/vid-app-common/src/main/webapp/app/vid/scripts/services/asdcService.js
index 753f9fd19..6bdc0ae9c 100755
--- a/vid-app-common/src/main/webapp/app/vid/scripts/services/asdcService.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/services/asdcService.js
@@ -20,7 +20,7 @@
"use strict";
-var AsdcService = function ($http, $log, PropertyService, UtilityService, VIDCONFIGURATION, COMPONENT, featureFlags) {
+var AsdcService = function ($http, $log, PropertyService, UtilityService, VIDCONFIGURATION, COMPONENT, DataService, featureFlags) {
return {
getModel: function (modelId, successCallbackFunction) {
$log.debug("AsdcService:getModel: modelId: " + modelId);
@@ -37,6 +37,8 @@ var AsdcService = function ($http, $log, PropertyService, UtilityService, VIDCON
shouldExcludeMacroFromAsyncInstatiationFlow: function(serviceModel){
if (!featureFlags.isOn(COMPONENT.FEATURE_FLAGS.FLAG_ASYNC_INSTANTIATION))
return true;
+ if (DataService.getE2EService())
+ return true;
if (!_.isEmpty(serviceModel.pnfs))
return true;
if (!_.isEmpty(serviceModel.collectionResource))
@@ -72,4 +74,4 @@ var AsdcService = function ($http, $log, PropertyService, UtilityService, VIDCON
}
appDS2.factory("AsdcService", ["$http", "$log", "PropertyService",
- "UtilityService", "VIDCONFIGURATION","COMPONENT", "featureFlags", AsdcService]);
+ "UtilityService", "VIDCONFIGURATION","COMPONENT", "DataService", "featureFlags", AsdcService]);