summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.env.ibm3
-rw-r--r--src/env/router/ibm.js14
2 files changed, 15 insertions, 2 deletions
diff --git a/.env.ibm b/.env.ibm
index b7813289..cb57a879 100644
--- a/.env.ibm
+++ b/.env.ibm
@@ -2,4 +2,5 @@ NODE_ENV=production
VUE_APP_ENV_NAME=ibm
VUE_APP_COMPANY_NAME="IBM"
CUSTOM_STYLES=true
-CUSTOM_APP_NAV=true \ No newline at end of file
+CUSTOM_APP_NAV=true
+CUSTOM_ROUTER=true \ No newline at end of file
diff --git a/src/env/router/ibm.js b/src/env/router/ibm.js
index 3a25650f..213920db 100644
--- a/src/env/router/ibm.js
+++ b/src/env/router/ibm.js
@@ -1,3 +1,15 @@
+import { remove } from 'lodash';
import routes from '@/router/routes';
-export default routes;
+const customRoutes = routes.map(route => {
+ // Removes router definition that includes kvm
+ // in name property (main and console layouts)
+
+ // TODO: will revisit this, removing the definition
+ // removes the route from the application but
+ // the component is still included in the final build
+ remove(route.children, ({ name }) => name.includes('kvm'));
+ return route;
+});
+
+export default customRoutes;