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:
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();
+ }
}
);
};