summaryrefslogtreecommitdiffstats
path: root/vid-app-common
diff options
context:
space:
mode:
authorRina Roi <rina.roi@intl.att.com>2019-08-01 12:51:30 +0300
committerRina Roi <rina.roi@intl.att.com>2019-08-01 14:29:59 +0300
commit0a078bb56030f0311081b8a24b2977d8a52e331e (patch)
treef3d03e7e788425742e02ce9372369b863c5ebf1c /vid-app-common
parent1c4cea59f9190c8a96bcd40233df0559ed03af2f (diff)
Add flag for modern UI
Issue-ID: VID-544 Change-Id: Iad79353ff9f55416d87b5bef56e38dd01357003b Signed-off-by: Rina Roi <rina.roi@intl.att.com>
Diffstat (limited to 'vid-app-common')
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/properties/Features.java1
-rw-r--r--vid-app-common/src/main/webapp/WEB-INF/conf/dev.features.properties2
-rw-r--r--vid-app-common/src/main/webapp/WEB-INF/conf/onap.features.properties2
-rwxr-xr-xvid-app-common/src/main/webapp/app/vid/scripts/constants/componentConstants.js2
-rwxr-xr-xvid-app-common/src/main/webapp/app/vid/scripts/services/asdcService.js13
5 files changed, 13 insertions, 7 deletions
diff --git a/vid-app-common/src/main/java/org/onap/vid/properties/Features.java b/vid-app-common/src/main/java/org/onap/vid/properties/Features.java
index c96efe6f5..bc3c6c8ec 100644
--- a/vid-app-common/src/main/java/org/onap/vid/properties/Features.java
+++ b/vid-app-common/src/main/java/org/onap/vid/properties/Features.java
@@ -48,6 +48,7 @@ public enum Features implements Feature {
FLAG_ASYNC_ALACARTE_VFMODULE,
FLAG_SUPPLEMENTARY_FILE,
FLAG_EXP_ANY_ALACARTE_NEW_INSTANTIATION_UI,
+ FLAG_ENABLE_WEBPACK_MODERN_UI,
FLAG_1810_CR_LET_SELECTING_COLLECTOR_TYPE_UNCONDITIONALLY,
FLAG_1810_CR_ADD_CLOUD_OWNER_TO_MSO_REQUEST,
FLAG_1810_CR_SOFT_DELETE_ALACARTE_VF_MODULE,
diff --git a/vid-app-common/src/main/webapp/WEB-INF/conf/dev.features.properties b/vid-app-common/src/main/webapp/WEB-INF/conf/dev.features.properties
index 123c15ee6..ae57a3175 100644
--- a/vid-app-common/src/main/webapp/WEB-INF/conf/dev.features.properties
+++ b/vid-app-common/src/main/webapp/WEB-INF/conf/dev.features.properties
@@ -1,4 +1,4 @@
-FLAG_ASYNC_INSTANTIATION = true
+FLAG_ENABLE_WEBPACK_MODERN_UI = true
FLAG_ASYNC_JOBS = true
CREATE_INSTANCE_TEST = false
EMPTY_DRAWING_BOARD_TEST = false
diff --git a/vid-app-common/src/main/webapp/WEB-INF/conf/onap.features.properties b/vid-app-common/src/main/webapp/WEB-INF/conf/onap.features.properties
index 23c5b255a..adff1112e 100644
--- a/vid-app-common/src/main/webapp/WEB-INF/conf/onap.features.properties
+++ b/vid-app-common/src/main/webapp/WEB-INF/conf/onap.features.properties
@@ -19,7 +19,7 @@ FLAG_CREATE_ERROR_REPORTS = true
# Modern UI (Drawing-Board; View/Edit)
# - - - - - - - - - - - - - - - - - -
FLAG_COLLECTION_RESOURCE_SUPPORT = false
-FLAG_ASYNC_INSTANTIATION = false
+FLAG_ENABLE_WEBPACK_MODERN_UI = false
FLAG_ASYNC_JOBS = false
EMPTY_DRAWING_BOARD_TEST = false
FLAG_NETWORK_TO_ASYNC_INSTANTIATION = false
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/constants/componentConstants.js b/vid-app-common/src/main/webapp/app/vid/scripts/constants/componentConstants.js
index 3d6ed67ae..01b8e8acf 100755
--- a/vid-app-common/src/main/webapp/app/vid/scripts/constants/componentConstants.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/constants/componentConstants.js
@@ -246,7 +246,7 @@ appDS2
},
FEATURE_FLAGS: {
- FLAG_ASYNC_INSTANTIATION: "FLAG_ASYNC_INSTANTIATION",
+ FLAG_ENABLE_WEBPACK_MODERN_UI: "FLAG_ENABLE_WEBPACK_MODERN_UI",
FLAG_NETWORK_TO_ASYNC_INSTANTIATION: "FLAG_NETWORK_TO_ASYNC_INSTANTIATION",
FLAG_ADD_MSO_TESTAPI_FIELD: "FLAG_ADD_MSO_TESTAPI_FIELD",
FLAG_SHOW_ASSIGNMENTS: "FLAG_SHOW_ASSIGNMENTS",
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/services/asdcService.js b/vid-app-common/src/main/webapp/app/vid/scripts/services/asdcService.js
index b9bab0eaf..eb3ea46da 100755
--- a/vid-app-common/src/main/webapp/app/vid/scripts/services/asdcService.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/services/asdcService.js
@@ -22,8 +22,6 @@
var AsdcService = function ($http, $log, PropertyService, UtilityService, VIDCONFIGURATION, COMPONENT, DataService, featureFlags) {
var shouldExcludeMacroFromAsyncInstantiationFlow = function(serviceModel){
- if (!featureFlags.isOn(COMPONENT.FEATURE_FLAGS.FLAG_ASYNC_INSTANTIATION))
- return true;
if (DataService.getE2EService())
return true;
if (!_.isEmpty(serviceModel.pnfs))
@@ -51,7 +49,8 @@ var AsdcService = function ($http, $log, PropertyService, UtilityService, VIDCON
},
shouldTakeTheDrawingBoardViewEdit: function(serviceModel) {
- if (serviceModel.service.vidNotions
+ if (this.enableWebpackModernUi()
+ && serviceModel.service.vidNotions
&& serviceModel.service.vidNotions.viewEditUI
&& serviceModel.service.vidNotions.viewEditUI !== 'legacy'
) return true;
@@ -59,8 +58,14 @@ var AsdcService = function ($http, $log, PropertyService, UtilityService, VIDCON
return false;
},
+ enableWebpackModernUi: function(){
+ return featureFlags.isOn(COMPONENT.FEATURE_FLAGS.FLAG_ENABLE_WEBPACK_MODERN_UI);
+ },
+
shouldTakeTheAsyncInstantiationFlow: function(serviceModel) {
- // First of all, respect serviceModel.service.vidNotions.instantiationUI
+ if (!(this.enableWebpackModernUi()))
+ return false;
+ // Assuming positive flag - first of all, respect serviceModel.service.vidNotions.instantiationUI
if (serviceModel.service.vidNotions
&& serviceModel.service.vidNotions.instantiationUI
&& serviceModel.service.vidNotions.instantiationUI !== 'legacy'