summaryrefslogtreecommitdiffstats
path: root/openecomp-ui
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-ui')
-rw-r--r--openecomp-ui/src/sdc-app/common/helpers/ScreensHelper.js144
1 files changed, 73 insertions, 71 deletions
diff --git a/openecomp-ui/src/sdc-app/common/helpers/ScreensHelper.js b/openecomp-ui/src/sdc-app/common/helpers/ScreensHelper.js
index 6f69cd0e51..fbf0239ffb 100644
--- a/openecomp-ui/src/sdc-app/common/helpers/ScreensHelper.js
+++ b/openecomp-ui/src/sdc-app/common/helpers/ScreensHelper.js
@@ -138,7 +138,7 @@ const ScreensHelper = {
let newVersion = updatedVersion ? updatedVersion : version;
- const props = {
+ const vspProps = {
softwareProductId,
componentId,
version: newVersion,
@@ -150,131 +150,133 @@ const ScreensHelper = {
) {
OnboardingActionHelper.navigateToSoftwareProductComponentGeneralAndUpdateLeftPanel(
dispatch,
- props
+ vspProps
);
}
switch (screen) {
- case enums.SCREEN.SOFTWARE_PRODUCT_COMPONENTS:
- OnboardingActionHelper.navigateToSoftwareProductComponentGeneralAndUpdateLeftPanel(
- dispatch,
- props
- );
- break;
- case enums.SCREEN.SOFTWARE_PRODUCT_COMPONENT_GENERAL:
- OnboardingActionHelper.navigateToSoftwareProductComponentGeneral(
+ case enums.SCREEN.SOFTWARE_PRODUCT_LANDING_PAGE:
+ OnboardingActionHelper.navigateToSoftwareProductLandingPage(
dispatch,
- props
+ vspProps
);
break;
- case enums.SCREEN.SOFTWARE_PRODUCT_COMPONENT_COMPUTE:
- OnboardingActionHelper.navigateToComponentCompute(
+ case enums.SCREEN.SOFTWARE_PRODUCT_DETAILS:
+ OnboardingActionHelper.navigateToSoftwareProductDetails(
dispatch,
- props
+ vspProps
);
break;
- case enums.SCREEN.SOFTWARE_PRODUCT_COMPONENT_LOAD_BALANCING:
- OnboardingActionHelper.navigateToComponentLoadBalancing(
+ case enums.SCREEN.SOFTWARE_PRODUCT_ATTACHMENTS_SETUP:
+ OnboardingActionHelper.navigateToSoftwareProductAttachmentsSetupTab(
dispatch,
- props
+ vspProps
);
break;
- case enums.SCREEN.SOFTWARE_PRODUCT_COMPONENT_NETWORK:
- OnboardingActionHelper.navigateToComponentNetwork(
+ case enums.SCREEN.SOFTWARE_PRODUCT_ATTACHMENTS_VALIDATION:
+ OnboardingActionHelper.navigateToSoftwareProductAttachmentsValidationTab(
dispatch,
- props
+ vspProps
);
break;
- case enums.SCREEN.SOFTWARE_PRODUCT_COMPONENT_STORAGE:
- OnboardingActionHelper.navigateToComponentStorage(
+ case enums.SCREEN.SOFTWARE_PRODUCT_PROCESSES:
+ OnboardingActionHelper.navigateToSoftwareProductProcesses(
dispatch,
- props
+ vspProps
);
break;
- case enums.SCREEN.SOFTWARE_PRODUCT_COMPONENT_PROCESSES:
- OnboardingActionHelper.navigateToSoftwareProductComponentProcesses(
+ case enums.SCREEN.SOFTWARE_PRODUCT_DEPLOYMENT:
+ OnboardingActionHelper.navigateToSoftwareProductDeployment(
dispatch,
- props
+ vspProps
);
break;
- case enums.SCREEN.SOFTWARE_PRODUCT_COMPONENT_MONITORING:
- OnboardingActionHelper.navigateToSoftwareProductComponentMonitoring(
+ case enums.SCREEN.SOFTWARE_PRODUCT_NETWORKS:
+ OnboardingActionHelper.navigateToSoftwareProductNetworks(
dispatch,
- props
+ vspProps
);
break;
- case enums.SCREEN.SOFTWARE_PRODUCT_COMPONENT_IMAGES:
- OnboardingActionHelper.navigateToComponentImages(
+ case enums.SCREEN.SOFTWARE_PRODUCT_DEPENDENCIES:
+ OnboardingActionHelper.navigateToSoftwareProductDependencies(
dispatch,
- props
+ vspProps
);
break;
- case enums.SCREEN.SOFTWARE_PRODUCT_LANDING_PAGE:
- OnboardingActionHelper.navigateToSoftwareProductLandingPage(
+ case enums.SCREEN.SOFTWARE_PRODUCT_ACTIVITY_LOG:
+ OnboardingActionHelper.navigateToSoftwareProductActivityLog(
dispatch,
- props
+ vspProps
);
break;
- case enums.SCREEN.SOFTWARE_PRODUCT_DETAILS:
- OnboardingActionHelper.navigateToSoftwareProductDetails(
- dispatch,
- props
- );
+ case enums.SCREEN.SOFTWARE_PRODUCT_COMPONENTS:
+ if (!componentId) {
+ OnboardingActionHelper.navigateToSoftwareProductComponents(
+ dispatch,
+ vspProps
+ );
+ dispatch({
+ type:
+ SoftwareProductActionTypes.TOGGLE_NAVIGATION_ITEM,
+ mapOfExpandedIds: {
+ [enums.SCREEN
+ .SOFTWARE_PRODUCT_COMPONENTS]: true
+ }
+ });
+ } else {
+ OnboardingActionHelper.navigateToSoftwareProductComponentGeneralAndUpdateLeftPanel(
+ dispatch,
+ vspProps
+ );
+ }
break;
- case enums.SCREEN.SOFTWARE_PRODUCT_ATTACHMENTS_SETUP:
- OnboardingActionHelper.navigateToSoftwareProductAttachmentsSetupTab(
+ case enums.SCREEN.SOFTWARE_PRODUCT_COMPONENT_GENERAL:
+ OnboardingActionHelper.navigateToSoftwareProductComponentGeneral(
dispatch,
- props
+ vspProps
);
break;
- case enums.SCREEN.SOFTWARE_PRODUCT_ATTACHMENTS_VALIDATION:
- OnboardingActionHelper.navigateToSoftwareProductAttachmentsValidationTab(
+ case enums.SCREEN.SOFTWARE_PRODUCT_COMPONENT_COMPUTE:
+ OnboardingActionHelper.navigateToComponentCompute(
dispatch,
- props
+ vspProps
);
break;
- case enums.SCREEN.SOFTWARE_PRODUCT_PROCESSES:
- OnboardingActionHelper.navigateToSoftwareProductProcesses(
+ case enums.SCREEN.SOFTWARE_PRODUCT_COMPONENT_LOAD_BALANCING:
+ OnboardingActionHelper.navigateToComponentLoadBalancing(
dispatch,
- props
+ vspProps
);
break;
- case enums.SCREEN.SOFTWARE_PRODUCT_DEPLOYMENT:
- OnboardingActionHelper.navigateToSoftwareProductDeployment(
+ case enums.SCREEN.SOFTWARE_PRODUCT_COMPONENT_NETWORK:
+ OnboardingActionHelper.navigateToComponentNetwork(
dispatch,
- props
+ vspProps
);
break;
- case enums.SCREEN.SOFTWARE_PRODUCT_NETWORKS:
- OnboardingActionHelper.navigateToSoftwareProductNetworks(
+ case enums.SCREEN.SOFTWARE_PRODUCT_COMPONENT_STORAGE:
+ OnboardingActionHelper.navigateToComponentStorage(
dispatch,
- props
+ vspProps
);
break;
- case enums.SCREEN.SOFTWARE_PRODUCT_DEPENDENCIES:
- OnboardingActionHelper.navigateToSoftwareProductDependencies(
+ case enums.SCREEN.SOFTWARE_PRODUCT_COMPONENT_PROCESSES:
+ OnboardingActionHelper.navigateToSoftwareProductComponentProcesses(
dispatch,
- props
+ vspProps
);
break;
- case enums.SCREEN.SOFTWARE_PRODUCT_ACTIVITY_LOG:
- OnboardingActionHelper.navigateToSoftwareProductActivityLog(
+ case enums.SCREEN.SOFTWARE_PRODUCT_COMPONENT_MONITORING:
+ OnboardingActionHelper.navigateToSoftwareProductComponentMonitoring(
dispatch,
- props
+ vspProps
);
break;
- case enums.SCREEN.SOFTWARE_PRODUCT_COMPONENTS:
- OnboardingActionHelper.navigateToSoftwareProductComponents(
+ case enums.SCREEN.SOFTWARE_PRODUCT_COMPONENT_IMAGES:
+ OnboardingActionHelper.navigateToComponentImages(
dispatch,
- props
+ vspProps
);
- dispatch({
- type:
- SoftwareProductActionTypes.TOGGLE_NAVIGATION_ITEM,
- mapOfExpandedIds: {
- [enums.SCREEN.SOFTWARE_PRODUCT_COMPONENTS]: true
- }
- });
break;
case enums.SCREEN.SOFTWARE_PRODUCT_VERSIONS_PAGE:
default: