From 97cffb810fcf3d3f02d814827f24adc090cf8e2e Mon Sep 17 00:00:00 2001 From: Ittay Stern Date: Wed, 17 Jul 2019 13:26:12 +0300 Subject: Merge from ecomp 3374149f - AngularJS UI Issue-ID: VID-378 Change-Id: I6b3243b492009035c911f63b93258ea76938fcb9 Signed-off-by: Ittay Stern --- .../app/vid/scripts/services/creationService.js | 23 ++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) (limited to 'vid-app-common/src/main/webapp/app/vid/scripts/services/creationService.js') diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/services/creationService.js b/vid-app-common/src/main/webapp/app/vid/scripts/services/creationService.js index 83710ce16..17adf77ce 100755 --- a/vid-app-common/src/main/webapp/app/vid/scripts/services/creationService.js +++ b/vid-app-common/src/main/webapp/app/vid/scripts/services/creationService.js @@ -258,8 +258,18 @@ var CreationService = function($log, AaiService, AsdcService, DataService,VIDCON getLcpRegionParameter(), FIELD.PARAMETER.LCP_REGION_TEXT_HIDDEN, FIELD.PARAMETER.TENANT_DISABLED ]); parameterList = parameterList.concat([ getLineOfBusinessParameter() ]); + + + if(_this.componentId === COMPONENT.VNF){ + parameterList[parameterList.length -1].isRequired = true; + } + parameterList = parameterList.concat([ getPlatformParameter() ]); + if(_this.componentId === COMPONENT.NETWORK){ + parameterList[parameterList.length -1].isRequired = false; + } + break; case COMPONENT.VF_MODULE: parameterList = parameterList.concat([ @@ -713,10 +723,8 @@ var CreationService = function($log, AaiService, AsdcService, DataService,VIDCON var lineOfBusiness = getValueFromList(FIELD.ID.LINE_OF_BUSINESS, parameterList); if(lineOfBusiness) { - var lineOfBusinessNamesString = _.map(lineOfBusiness, "name").join(", "); - requestDetails.lineOfBusiness = { - lineOfBusinessName: lineOfBusinessNamesString + lineOfBusinessName: lineOfBusiness } } @@ -738,9 +746,15 @@ var CreationService = function($log, AaiService, AsdcService, DataService,VIDCON } } + var platform = getValueFromList(FIELD.ID.PLATFORM, parameterList); + if(platform !== null && platform !== ""){ requestDetails.platform = { - platformName: getValueFromList(FIELD.ID.PLATFORM, parameterList) + platformName: platform }; + } + + + break; case COMPONENT.VF_MODULE: requestDetails.requestParameters.usePreload = getValueFromList( @@ -1194,6 +1208,7 @@ var CreationService = function($log, AaiService, AsdcService, DataService,VIDCON return parameterList[i].value; } } + return null; }; var updateUserParameterList = function(updatedId, parameterListControl) { console.log ("updateUserParameterList() updatedId=" + updatedId); -- cgit 1.2.3-korg