aboutsummaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/main/webapp/app/vid/scripts/controller/aaiSubscriberController.js
diff options
context:
space:
mode:
authorIttay Stern <ittay.stern@att.com>2019-07-17 13:26:12 +0300
committerIttay Stern <ittay.stern@att.com>2019-07-18 02:00:08 +0000
commit97cffb810fcf3d3f02d814827f24adc090cf8e2e (patch)
treefee8c342942a667f3128d1925649d6f83064427b /vid-app-common/src/main/webapp/app/vid/scripts/controller/aaiSubscriberController.js
parentdb98c7976e57f8bacbcc93b802b4d05b1db7b8cf (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/controller/aaiSubscriberController.js')
-rwxr-xr-xvid-app-common/src/main/webapp/app/vid/scripts/controller/aaiSubscriberController.js20
1 files changed, 16 insertions, 4 deletions
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/controller/aaiSubscriberController.js b/vid-app-common/src/main/webapp/app/vid/scripts/controller/aaiSubscriberController.js
index 191251860..ed03e3aec 100755
--- a/vid-app-common/src/main/webapp/app/vid/scripts/controller/aaiSubscriberController.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/controller/aaiSubscriberController.js
@@ -720,7 +720,17 @@ appDS2.controller("aaiSubscriberController", ["COMPONENT", "FIELD", "PARAMETER",
$scope.isConfigurationDataAvailiable = function (configuration) {
$log.debug(configuration);
return configuration.configData && (!configuration.configData.errorDescription);
- }
+ };
+
+ $scope.allowConfigurationActions = function (configuration) {
+ $log.debug(configuration);
+ return configuration.nodeStatus &&
+ _.some(
+ [FIELD.STATUS.AAI_ACTIVE, FIELD.STATUS.AAI_INACTIVE, FIELD.STATUS.AAI_CREATED],
+ function (s) {
+ return s.toLowerCase() === configuration.nodeStatus.toLowerCase();
+ });
+ };
$scope.isActivateDeactivateEnabled = function(btnType) {
if ($scope.serviceOrchestrationStatus) {
@@ -800,8 +810,11 @@ appDS2.controller("aaiSubscriberController", ["COMPONENT", "FIELD", "PARAMETER",
$scope.isResumeShown = function (status) {
var vfModuleStatus = status.toLowerCase();
- var serviceStatus = $scope.serviceOrchestrationStatus && $scope.serviceOrchestrationStatus.toLowerCase();
- return _.includes(['pendingactivation', 'assigned'], vfModuleStatus) && !$scope.isActivateDeactivateEnabled("activate");
+ var vfModuleStatusHasAllowedResume = ['pendingactivation', 'assigned'];
+ if (featureFlags.isOn(COMPONENT.FEATURE_FLAGS.FLAG_VF_MODULE_RESUME_STATUS_CREATE)) {
+ vfModuleStatusHasAllowedResume.push('created');
+ }
+ return _.includes(vfModuleStatusHasAllowedResume, vfModuleStatus) && !$scope.isActivateDeactivateEnabled("activate");
};
$scope.handleInitialResponseInventoryItems = function (response) {
@@ -1039,7 +1052,6 @@ appDS2.controller("aaiSubscriberController", ["COMPONENT", "FIELD", "PARAMETER",
if( !$scope.hasFabricConfigurations ) {
portMirroringConfigurationIds.push(configObject[FIELD.ID.CONFIGURATION_ID]);
$scope.service.instance[FIELD.ID.CONFIGURATIONS].push(config);
- $scope.allowConfigurationActions = [FIELD.STATUS.AAI_ACTIVE, FIELD.STATUS.AAI_INACTIVE, FIELD.STATUS.AAI_CREATED].indexOf(config.nodeStatus) != -1;
} else {
if (config.nodeStatus.toLowerCase() !== FIELD.STATUS.ASSIGNED.toLowerCase()) {
$scope.allConfigurationsAssigned = false;