aboutsummaryrefslogtreecommitdiffstats
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
parent1c4cea59f9190c8a96bcd40233df0559ed03af2f (diff)
Add flag for modern UI
Issue-ID: VID-544 Change-Id: Iad79353ff9f55416d87b5bef56e38dd01357003b Signed-off-by: Rina Roi <rina.roi@intl.att.com>
-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
-rw-r--r--vid-automation/src/main/java/vid/automation/test/infra/Features.java1
-rw-r--r--vid-automation/src/main/java/vid/automation/test/test/NewServiceInstanceTest.java1
-rw-r--r--vid-automation/src/test/resources/features.properties1
-rw-r--r--vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/flags.json3
-rw-r--r--vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vrf/vrfModal/networkStep/network.step.service.spec.ts2
10 files changed, 19 insertions, 9 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'
diff --git a/vid-automation/src/main/java/vid/automation/test/infra/Features.java b/vid-automation/src/main/java/vid/automation/test/infra/Features.java
index 40f3013dd..2cc790f02 100644
--- a/vid-automation/src/main/java/vid/automation/test/infra/Features.java
+++ b/vid-automation/src/main/java/vid/automation/test/infra/Features.java
@@ -23,6 +23,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-automation/src/main/java/vid/automation/test/test/NewServiceInstanceTest.java b/vid-automation/src/main/java/vid/automation/test/test/NewServiceInstanceTest.java
index 9b1956d30..7e9dac406 100644
--- a/vid-automation/src/main/java/vid/automation/test/test/NewServiceInstanceTest.java
+++ b/vid-automation/src/main/java/vid/automation/test/test/NewServiceInstanceTest.java
@@ -56,6 +56,7 @@ import static vid.automation.test.services.SimulatorApi.registerExpectationFromP
import static vid.automation.test.services.SimulatorApi.registerExpectationFromPresets;
import static vid.automation.test.test.ALaCarteflowTest.AIC;
+@FeatureTogglingTest(FLAG_ENABLE_WEBPACK_MODERN_UI)
public class NewServiceInstanceTest extends CreateInstanceDialogBaseTest {
public static final String COMPLETED = "COMPLETED";
diff --git a/vid-automation/src/test/resources/features.properties b/vid-automation/src/test/resources/features.properties
index 782d28908..7ab0785b1 100644
--- a/vid-automation/src/test/resources/features.properties
+++ b/vid-automation/src/test/resources/features.properties
@@ -16,6 +16,7 @@ FLAG_ASYNC_ALACARTE_VNF = true
FLAG_ASYNC_ALACARTE_VFMODULE= true
FLAG_SUPPLEMENTARY_FILE = true
FLAG_EXP_ANY_ALACARTE_NEW_INSTANTIATION_UI=false
+FLAG_ENABLE_WEBPACK_MODERN_UI = false
FLAG_1810_CR_ADD_CLOUD_OWNER_TO_MSO_REQUEST=true
FLAG_1810_CR_LET_SELECTING_COLLECTOR_TYPE_UNCONDITIONALLY=true
FLAG_1810_CR_SOFT_DELETE_ALACARTE_VF_MODULE = true
diff --git a/vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/flags.json b/vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/flags.json
index c4b8ef4fd..2451d1e66 100644
--- a/vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/flags.json
+++ b/vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/flags.json
@@ -15,5 +15,6 @@
"FLAG_1902_NEW_VIEW_EDIT": true,
"FLAG_VF_MODULE_RESUME_STATUS_CREATE" : true,
"FLAG_1906_COMPONENT_INFO": true,
- "FLAG_1908_RESUME_MACRO_SERVICE": true
+ "FLAG_1908_RESUME_MACRO_SERVICE": true,
+ "FLAG_ENABLE_WEBPACK_MODERN_UI": true
}
diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vrf/vrfModal/networkStep/network.step.service.spec.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vrf/vrfModal/networkStep/network.step.service.spec.ts
index e06e4c9f9..c7c8d07a0 100644
--- a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vrf/vrfModal/networkStep/network.step.service.spec.ts
+++ b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vrf/vrfModal/networkStep/network.step.service.spec.ts
@@ -87,7 +87,7 @@ describe('Network step service', () => {
"CREATE_INSTANCE_TEST": false,
"EMPTY_DRAWING_BOARD_TEST": false,
"FLAG_NETWORK_TO_ASYNC_INSTANTIATION": false,
- "FLAG_ASYNC_INSTANTIATION": true,
+ "FLAG_ENABLE_WEBPACK_MODERN_UI": true,
"FLAG_ASYNC_JOBS": true,
"FLAG_ADD_MSO_TESTAPI_FIELD": true,
"FLAG_UNASSIGN_SERVICE": false,