blob: 213920db2c03eccaf019ba0d18377dfa98da8d0e [file] [log] [blame]
Yoshie Muranaka3dd167a2020-09-03 13:58:35 -07001import { remove } from 'lodash';
Yoshie Muranaka816d9472020-09-03 11:19:28 -07002import routes from '@/router/routes';
Yoshie Muranaka9e36f522020-02-05 07:42:34 -08003
Yoshie Muranaka3dd167a2020-09-03 13:58:35 -07004const customRoutes = routes.map(route => {
5 // Removes router definition that includes kvm
6 // in name property (main and console layouts)
7
8 // TODO: will revisit this, removing the definition
9 // removes the route from the application but
10 // the component is still included in the final build
11 remove(route.children, ({ name }) => name.includes('kvm'));
12 return route;
13});
14
15export default customRoutes;