From 63af54353beda4ee3f480f40e269dbfee8f7b795 Mon Sep 17 00:00:00 2001 From: ssongliu <73214554+ssongliu@users.noreply.github.com> Date: Fri, 5 May 2023 17:31:31 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=9B=91=E6=8E=A7=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E6=94=B9=E5=88=B0=E3=80=90=E4=B8=BB=E6=9C=BA-=E7=9B=91?= =?UTF-8?q?=E6=8E=A7=E3=80=91=E8=8F=9C=E5=8D=95=E5=86=85=20(#881)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/lang/modules/en.ts | 2 + frontend/src/lang/modules/zh.ts | 2 + frontend/src/routers/modules/host.ts | 17 +- frontend/src/routers/modules/setting.ts | 10 - frontend/src/views/host/monitor/index.vue | 672 +----------------- .../src/views/host/monitor/monitor/index.vue | 669 +++++++++++++++++ .../monitor/setting}/index.vue | 5 +- frontend/src/views/setting/index.vue | 4 - 8 files changed, 702 insertions(+), 679 deletions(-) create mode 100644 frontend/src/views/host/monitor/monitor/index.vue rename frontend/src/views/{setting/monitor => host/monitor/setting}/index.vue (95%) diff --git a/frontend/src/lang/modules/en.ts b/frontend/src/lang/modules/en.ts index 8bff74690..3a891cd33 100644 --- a/frontend/src/lang/modules/en.ts +++ b/frontend/src/lang/modules/en.ts @@ -648,6 +648,8 @@ const message = { errPath: 'Backup path [{0}] error, cannot download!', }, monitor: { + monitor: 'Monitor', + setting: 'Setting', avgLoad: 'Average load', loadDetail: 'Load detail', resourceUsage: 'Resource utilization rate', diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts index b14274c9b..f5c23f87d 100644 --- a/frontend/src/lang/modules/zh.ts +++ b/frontend/src/lang/modules/zh.ts @@ -657,6 +657,8 @@ const message = { errPath: '备份路径 [{0}] 错误,无法下载!', }, monitor: { + monitor: '监控', + setting: '设置', avgLoad: '平均负载', loadDetail: '负载详情', resourceUsage: '资源使用率', diff --git a/frontend/src/routers/modules/host.ts b/frontend/src/routers/modules/host.ts index 16d2386f0..81e883db3 100644 --- a/frontend/src/routers/modules/host.ts +++ b/frontend/src/routers/modules/host.ts @@ -21,14 +21,25 @@ const hostRouter = { }, }, { - path: '/hosts/monitor', + path: '/hosts/monitor/monitor', name: 'Monitorx', - component: () => import('@/views/host/monitor/index.vue'), + component: () => import('@/views/host/monitor/monitor/index.vue'), meta: { title: 'menu.monitor', requiresAuth: false, }, }, + { + path: '/hosts/monitor/setting', + name: 'MonitorSetting', + component: () => import('@/views/host/monitor/setting/index.vue'), + hidden: true, + meta: { + activeMenu: '/hosts/monitor/monitor', + title: 'menu.monitor', + requiresAuth: false, + }, + }, { path: '/hosts/terminal', name: 'Terminal', @@ -54,7 +65,7 @@ const hostRouter = { component: () => import('@/views/host/firewall/ip/index.vue'), hidden: true, meta: { - title: 'menu.toolbox', + activeMenu: '/hosts/firewall/port', requiresAuth: false, }, }, diff --git a/frontend/src/routers/modules/setting.ts b/frontend/src/routers/modules/setting.ts index 8882567f3..4cdfe266f 100644 --- a/frontend/src/routers/modules/setting.ts +++ b/frontend/src/routers/modules/setting.ts @@ -47,16 +47,6 @@ const settingRouter = { activeMenu: 'Setting', }, }, - { - path: 'monitor', - name: 'Monitor', - component: () => import('@/views/setting/monitor/index.vue'), - hidden: true, - meta: { - requiresAuth: true, - activeMenu: 'Setting', - }, - }, { path: 'safe', name: 'Safe', diff --git a/frontend/src/views/host/monitor/index.vue b/frontend/src/views/host/monitor/index.vue index 6a3b8d681..c302e2ccf 100644 --- a/frontend/src/views/host/monitor/index.vue +++ b/frontend/src/views/host/monitor/index.vue @@ -1,675 +1,25 @@ - - - diff --git a/frontend/src/views/host/monitor/monitor/index.vue b/frontend/src/views/host/monitor/monitor/index.vue new file mode 100644 index 000000000..4cb9cba1f --- /dev/null +++ b/frontend/src/views/host/monitor/monitor/index.vue @@ -0,0 +1,669 @@ + + + + + diff --git a/frontend/src/views/setting/monitor/index.vue b/frontend/src/views/host/monitor/setting/index.vue similarity index 95% rename from frontend/src/views/setting/monitor/index.vue rename to frontend/src/views/host/monitor/setting/index.vue index 78c8db0af..90eb71192 100644 --- a/frontend/src/views/setting/monitor/index.vue +++ b/frontend/src/views/host/monitor/setting/index.vue @@ -1,6 +1,8 @@