🔨 监控逻辑.
This commit is contained in:
@@ -59,6 +59,7 @@ export const UPDATE_PASSWORD_ROUTE: RouteRecordRaw = {
|
||||
name: UPDATE_PASSWORD_ROUTE_NAME,
|
||||
component: () => import('@/views/base/update-password/index.vue'),
|
||||
meta: {
|
||||
noAffix: true,
|
||||
locale: '修改密码'
|
||||
},
|
||||
};
|
||||
@@ -69,6 +70,7 @@ export const FORBIDDEN_ROUTE: RouteRecordRaw = {
|
||||
name: FORBIDDEN_ROUTER_NAME,
|
||||
component: () => import('@/views/base/status/forbidden/index.vue'),
|
||||
meta: {
|
||||
noAffix: true,
|
||||
locale: '403'
|
||||
},
|
||||
};
|
||||
@@ -80,6 +82,7 @@ export const NOT_FOUND_ROUTE: RouteRecordRaw = {
|
||||
name: NOT_FOUND_ROUTER_NAME,
|
||||
component: () => import('@/views/base/status/not-found/index.vue'),
|
||||
meta: {
|
||||
noAffix: true,
|
||||
locale: '404'
|
||||
},
|
||||
};
|
||||
|
||||
38
orion-visor-ui/src/router/routes/modules/monitor.ts
Normal file
38
orion-visor-ui/src/router/routes/modules/monitor.ts
Normal file
@@ -0,0 +1,38 @@
|
||||
import type { AppRouteRecordRaw } from '../types';
|
||||
import type { RouteLocationNormalized } from 'vue-router';
|
||||
import { DEFAULT_LAYOUT } from '../base';
|
||||
|
||||
const MONITOR: AppRouteRecordRaw = {
|
||||
name: 'monitorModule',
|
||||
path: '/monitor-module',
|
||||
component: DEFAULT_LAYOUT,
|
||||
children: [
|
||||
{
|
||||
name: 'metrics',
|
||||
path: '/monitor/metrics',
|
||||
component: () => import('@/views/monitor/metrics/index.vue'),
|
||||
},
|
||||
{
|
||||
name: 'monitorHost',
|
||||
path: '/monitor/monitor-host',
|
||||
component: () => import('@/views/monitor/monitor-host/index.vue'),
|
||||
},
|
||||
{
|
||||
name: 'monitorDetail',
|
||||
path: '/monitor/detail',
|
||||
meta: {
|
||||
// 固定到 tab
|
||||
noAffix: false,
|
||||
// 是否允许打开多个 tab
|
||||
multipleTab: true,
|
||||
// 名称模板
|
||||
localeTemplate: (route: RouteLocationNormalized) => {
|
||||
return `${route.meta.locale} - ${route.query.name || ''}`;
|
||||
},
|
||||
},
|
||||
component: () => import('@/views/monitor/monitor-detail/index.vue'),
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
export default MONITOR;
|
||||
4
orion-visor-ui/src/router/typings.d.ts
vendored
4
orion-visor-ui/src/router/typings.d.ts
vendored
@@ -22,7 +22,9 @@ declare module 'vue-router' {
|
||||
newWindow?: boolean;
|
||||
// 是否活跃
|
||||
activeMenu?: string;
|
||||
// 是否允许打开多个 tag
|
||||
multipleTab?: boolean;
|
||||
// 名称模板
|
||||
localeTemplate?: (key: RouteLocationNormalized) => string;
|
||||
localeTemplate?: (route: RouteLocationNormalized) => string | undefined;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user