diff options
author | Ittay Stern <ittay.stern@att.com> | 2019-07-17 13:26:12 +0300 |
---|---|---|
committer | Ittay Stern <ittay.stern@att.com> | 2019-07-18 02:00:08 +0000 |
commit | 97cffb810fcf3d3f02d814827f24adc090cf8e2e (patch) | |
tree | fee8c342942a667f3128d1925649d6f83064427b /vid-app-common/src/main/webapp/app/vid/scripts/modals/new-test-environment/new-test-environment.controller.js | |
parent | db98c7976e57f8bacbcc93b802b4d05b1db7b8cf (diff) |
Merge from ecomp 3374149f - AngularJS UI
Issue-ID: VID-378
Change-Id: I6b3243b492009035c911f63b93258ea76938fcb9
Signed-off-by: Ittay Stern <ittay.stern@att.com>
Diffstat (limited to 'vid-app-common/src/main/webapp/app/vid/scripts/modals/new-test-environment/new-test-environment.controller.js')
-rw-r--r-- | vid-app-common/src/main/webapp/app/vid/scripts/modals/new-test-environment/new-test-environment.controller.js | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-test-environment/new-test-environment.controller.js b/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-test-environment/new-test-environment.controller.js index 84ad2d58c..53111950c 100644 --- a/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-test-environment/new-test-environment.controller.js +++ b/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-test-environment/new-test-environment.controller.js @@ -22,11 +22,12 @@ 'use strict'; appDS2.controller("newTestEnvironmentModalController", ["$uibModalInstance", "$uibModal", "AaiService", "TestEnvironmentsService","OwningEntityService", - "$log", "$scope", "_", "COMPONENT","$rootScope", newTestEnvironmentsModalController]); + "$log", "$scope", "_", "COMPONENT","$rootScope", "featureFlags", newTestEnvironmentsModalController]); - function newTestEnvironmentsModalController($uibModalInstance, $uibModal, AaiService, TestEnvironmentsService,OwningEntityService, $log, $scope, _, COMPONENT, $rootScope) { + function newTestEnvironmentsModalController($uibModalInstance, $uibModal, AaiService, TestEnvironmentsService, OwningEntityService, $log, $scope, _, COMPONENT, $rootScope, featureFlags ) { var vm = this; vm.newEnvironment = {}; + vm.releaseVersions = {}; var init = function () { vm.newEnvironment.operationalEnvironmentType = "VNF"; @@ -35,7 +36,7 @@ }; var loadEcompEnvironmentsList = function () { - TestEnvironmentsService.loadAAIestEnvironments("ECOMP") + TestEnvironmentsService.loadAAIestEnvironments("ONAP") .then(function(response) { vm.environments = response.operationalEnvironment; }) @@ -47,10 +48,12 @@ var loadCategoryParameters = function () { OwningEntityService.getOwningEntityProperties(function(response){ - vm.environmentsTypesList = response["operational-environment-type"].map(function (x){ - return x.name;}); - vm.workloadContextList = response["workload-context"].map(function (x){ - return x.name;}); + vm.environmentsTypesList = response["operational-environment-type"].map(function (environmentType){ + return environmentType.name;}); + vm.workloadContextList = response["workload-context"].map(function (context){ + return context.name;}); + vm.releaseVersions = response["release"].map(function (releaseOptions){ + return releaseOptions.name;}); },COMPONENT.TENANT_ISOLATION_FAMILY); } @@ -68,8 +71,8 @@ vm.createEnvironment = function () { if($scope.newTestEnvironment.$valid) { - vm.newEnvironment.workloadContext = vm.newEnvironment.operationalEnvironmentType + '_' + vm.newEnvironment.workloadContext; var requestDetails = vm.newEnvironment; + delete vm.newEnvironment['release']; $rootScope.$broadcast(COMPONENT.MSO_CREATE_ENVIRONMENT, { url : COMPONENT.OPERATIONAL_ENVIRONMENT_CREATE, requestDetails : requestDetails @@ -78,7 +81,9 @@ } }; - + vm.isShowReleaseEnabled = function () { + return featureFlags.isOn(COMPONENT.FEATURE_FLAGS.FLAG_1908_RELEASE_TENANT_ISOLATION) + }; init(); } |