feat: show dev pages in development
@@ -45,32 +45,36 @@ const clusterRoute =
id: 'cluster',
needAuth: true,
path: '/det/cluster',
- title: 'Cluster',
+ title: 'Cluster (dev)',
};
const taskListRoute =
{
component: TaskList,
- icon: 'task',
+ icon: 'list',
id: 'taskList',
needAuth: true,
path: '/det/tasks',
title: 'Tasks',
};
-export const defaultAppRoute = dashboardRoute;
-
-export const appRoutes: RouteConfig[] = [
- dashboardRoute,
- taskListRoute,
- clusterRoute,
+const masterLogsRoute =
{
component: MasterLogs,
+ icon: 'logs',
id: 'logs',
needAuth: true,
path: '/det/logs',
title: 'Master Logs',
- },
+ };
+
+export const defaultAppRoute = dashboardRoute;
+
+export const appRoutes: RouteConfig[] = [
+ dashboardRoute,
+ taskListRoute,
+ clusterRoute,
+ masterLogsRoute,
{
component: SignIn,
id: 'login',
@@ -133,6 +137,14 @@ export const sidebarRoutes: RouteConfig[] = [
];
export const defaultSideBarRoute = sidebarRoutes[0];
+if (process.env.IS_DEV) {
+ sidebarRoutes.push(
+ clusterRoute,
+ taskListRoute,
+ masterLogsRoute,
+ );
+}
+
// Is the path going to be served from the same host?
const isDetRoute = (url: string): boolean => {
if (!isFullPath(url)) return true;
