From 9d0908e18d51a4ba1c4a54b01fcbe16598bd352a Mon Sep 17 00:00:00 2001 From: Eylon Malin Date: Wed, 28 Aug 2019 16:27:42 +0300 Subject: Fix legacy region in resume vfModule Issue-ID: VID-378 Signed-off-by: Eylon Malin Change-Id: Idad1357d8de234ad54716d8d51ac846a426a5258 Signed-off-by: Ittay Stern --- .../vf-module-homing-data-action.controller.js | 1 + .../webapp/app/vid/scripts/services/creationService.js | 15 ++++----------- 2 files changed, 5 insertions(+), 11 deletions(-) (limited to 'vid-app-common/src/main/webapp/app') diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/modals/vf-module-homing-data-action/vf-module-homing-data-action.controller.js b/vid-app-common/src/main/webapp/app/vid/scripts/modals/vf-module-homing-data-action/vf-module-homing-data-action.controller.js index ac6d84faf..2cfcf5715 100644 --- a/vid-app-common/src/main/webapp/app/vid/scripts/modals/vf-module-homing-data-action/vf-module-homing-data-action.controller.js +++ b/vid-app-common/src/main/webapp/app/vid/scripts/modals/vf-module-homing-data-action/vf-module-homing-data-action.controller.js @@ -82,6 +82,7 @@ var vfModuleActionModalController = function(COMPONENT, FIELD, $scope, $uibModal $scope.deleteOrResume = function() { var msoParameterList = [({id: "lcpRegion", value: $scope.regionSelection.optionId})]; + msoParameterList.push({id: FIELD.ID.LCP_REGION_TEXT, value: $scope.regionSelection.legacyRegion}); msoParameterList.push({id: "tenant", value: $scope.regionSelection.tenant}); var requestParams = {}; 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 1a296ca5d..972463745 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 @@ -775,20 +775,13 @@ var CreationService = function($log, AaiService, AsdcService, DataService,VIDCON }; var buildCloudConfiguration = function (parameterList) { - var lcpRegion; - var cloudOwner; var lcpRegionOptionId = getValueFromList(FIELD.ID.LCP_REGION, parameterList); var cloudOwnerAndLcpCloudRegion = DataService.getCloudOwnerAndLcpCloudRegionFromOptionId(lcpRegionOptionId); - if (cloudOwnerAndLcpCloudRegion.cloudRegionId === FIELD.KEY.LCP_REGION_TEXT) { - lcpRegion = getValueFromList(FIELD.ID.LCP_REGION_TEXT, - parameterList); - cloudOwner = undefined; - } else { - var cloudOwnerAndLcpCloudRegion = DataService.getCloudOwnerAndLcpCloudRegionFromOptionId(lcpRegionOptionId); - lcpRegion = cloudOwnerAndLcpCloudRegion.cloudRegionId; - cloudOwner = cloudOwnerAndLcpCloudRegion.cloudOwner; - } + var cloudOwner = cloudOwnerAndLcpCloudRegion.cloudOwner; + var lcpRegion = cloudOwnerAndLcpCloudRegion.cloudRegionId === FIELD.KEY.LCP_REGION_TEXT ? + getValueFromList(FIELD.ID.LCP_REGION_TEXT,parameterList) : + cloudOwnerAndLcpCloudRegion.cloudRegionId; return { lcpCloudRegionId: lcpRegion, -- cgit 1.2.3-korg