aboutsummaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js
diff options
context:
space:
mode:
authorSara Weiss <sara.weiss@intl.att.com>2019-09-18 13:55:55 +0300
committerIttay Stern <ittay.stern@att.com>2019-09-23 17:43:46 +0300
commite59d8d560376a34e0eab902a673b5b3c3add5b0d (patch)
tree0b5b0360453b125e2f758263b94a83cde7e7ef74 /vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js
parent9a2cd4170c33326dc6a0829675fa4cef231efdd9 (diff)
add 'cloud region' optional field to change management
Issue-ID: VID-596 Change-Id: Ieb89980f7e802fe2508950a0e1a23188145fd85e Signed-off-by: Sara Weiss <sara.weiss@intl.att.com>
Diffstat (limited to 'vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js')
-rw-r--r--vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js31
1 files changed, 27 insertions, 4 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 f70d6250e..5c29fb4ae 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
@@ -69,6 +69,10 @@
return (featureFlags.isOn(COMPONENT.FEATURE_FLAGS.FLAG_FLASH_CLOUD_REGION_AND_NF_ROLE_OPTIONAL_SEARCH));
};
+ $scope.removeVendorFromCloudOwner = function(cloudOwner) {
+ return AaiService.removeVendorFromCloudOwner(cloudOwner)
+ };
+
vm.isDisabledVNFmodelVersion = function (vnfTypePristine) {
if ($scope.isNewFilterChangeManagmentEnabled()) {
return !vm.isSearchedVNF;
@@ -537,8 +541,19 @@
});
};
+ function loadCloudRegions() {
+ AaiService.getLcpCloudRegionTenantList(
+ vm.changeManagement.subscriberId,
+ vm.changeManagement.serviceType["service-type"],
+ function (response) {
+ $scope.cloudRegionList = _.uniqBy(response, 'cloudRegionOptionId');
+ });
+ }
+
vm.serviceTypeChanged = function () {
- if (!$scope.isNewFilterChangeManagmentEnabled()) {
+ if ($scope.isNewFilterChangeManagmentEnabled()) {
+ loadCloudRegions();
+ } else {
vm.searchVNFs();
}
};
@@ -553,17 +568,22 @@
vm.vnfs = [];
vm.vfModules = [];
- let vnfRole = $scope.isNewFilterChangeManagmentEnabled() ? vm.changeManagement.vnfType : null;
+
+ let vnfRole = null;
let cloudRegion = null;
+ if ($scope.isNewFilterChangeManagmentEnabled()) {
+ vnfRole = vm.changeManagement.vnfType ? vm.changeManagement.vnfType : null;
+ cloudRegion = vm.changeManagement.cloudRegion ? vm.changeManagement.cloudRegion.cloudRegionId : null;
+ }
+
AaiService.getVnfsByCustomerIdAndServiceType(
vm.changeManagement.subscriberId,
vm.changeManagement.serviceType["service-type"],
vnfRole,
cloudRegion,
- ).
- then(function (response) {
+ ).then(function (response) {
vm.isSearchedVNF = true;
var vnfsData = response.data.results;
if (vnfsData) {
@@ -601,6 +621,9 @@
vm.vnfTypes.push(vnf.properties['nf-role'])
});
}
+ if ($scope.isNewFilterChangeManagmentEnabled()) {
+ vm.loadVNFVersions();
+ }
}
);
};