From ebb9e7a2a01e3456ca010c03ed0a7fb2e371c6f7 Mon Sep 17 00:00:00 2001 From: ssongliu Date: Fri, 26 May 2023 14:34:34 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=A6=82=E8=A7=88=E7=95=8C=E9=9D=A2?= =?UTF-8?q?=E9=92=88=E5=AF=B9=E7=A3=81=E7=9B=98=E6=98=BE=E7=A4=BA=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= 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/views/home/status/index.vue | 84 +++++++++++++++++------- 3 files changed, 64 insertions(+), 24 deletions(-) diff --git a/frontend/src/lang/modules/en.ts b/frontend/src/lang/modules/en.ts index e3aeb3559..013d3e143 100644 --- a/frontend/src/lang/modules/en.ts +++ b/frontend/src/lang/modules/en.ts @@ -257,6 +257,7 @@ const message = { runJam: 'Run Blockaged', core: 'Physical core', + coreUnit: 'Core', logicCore: 'Logic core', loadAverage: 'Average load in the last {0} minutes', load: 'Load', @@ -274,6 +275,7 @@ const message = { }, tabs: { more: 'More', + hide: 'Hide', closeCurrent: 'Close current', closeOther: 'Close other', closeAll: 'Close All', diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts index 294bf54e7..a31952009 100644 --- a/frontend/src/lang/modules/zh.ts +++ b/frontend/src/lang/modules/zh.ts @@ -270,6 +270,7 @@ const message = { runJam: '运行堵塞', core: '物理核心', + coreUnit: '核', logicCore: '逻辑核心', loadAverage: '最近 {0} 分钟平均负载', load: '负载', @@ -287,6 +288,7 @@ const message = { }, tabs: { more: '更多', + hide: '收起', closeCurrent: '关闭当前', closeOther: '关闭其它', closeAll: '关闭所有', diff --git a/frontend/src/views/home/status/index.vue b/frontend/src/views/home/status/index.vue index f089c22e2..91a059dfe 100644 --- a/frontend/src/views/home/status/index.vue +++ b/frontend/src/views/home/status/index.vue @@ -33,7 +33,7 @@ - ( {{ formatNumber(currentInfo.cpuUsed) }} / {{ currentInfo.cpuTotal }} ) Core + ( {{ formatNumber(currentInfo.cpuUsed) }} / {{ currentInfo.cpuTotal }} ) {{ $t('home.coreUnit') }} @@ -69,14 +69,23 @@ align="center" v-for="(item, index) of currentInfo.diskData" :key="index" + v-show="showMore || index < 4" > + + {{ $t('home.baseInfo') }}: + + + {{ $t('home.mount') }}: {{ item.path }} + + + {{ $t('commons.table.type') }}: {{ item.type }} + + + {{ $t('home.fileSystem') }}: {{ item.device }} + - {{ $t('home.baseInfo') }}: - {{ $t('home.mount') }}: {{ item.path }} - {{ $t('commons.table.type') }}: {{ item.type }} - {{ $t('home.fileSystem') }}: {{ item.device }}
Inode:
{{ $t('home.total') }}: {{ item.inodesTotal }} {{ $t('home.used') }}: {{ item.inodesUsed }} @@ -88,17 +97,11 @@
- {{ $t('monitor.disk') }}: + {{ $t('monitor.disk') }}:
- - {{ $t('home.total') }}: {{ formatNumber(item.total / 1024 / 1024 / 1024) }} GB - - - {{ $t('home.used') }}: {{ formatNumber(item.used / 1024 / 1024 / 1024) }} GB - - - {{ $t('home.free') }}: {{ formatNumber(item.free / 1024 / 1024 / 1024) }} GB - + {{ $t('home.total') }}: {{ computeSize(item.total) }} + {{ $t('home.used') }}: {{ computeSize(item.used) }} + {{ $t('home.free') }}: {{ computeSize(item.free) }} {{ $t('home.percent') }}: {{ formatNumber(item.usedPercent) }}% @@ -108,22 +111,43 @@
- - ( {{ formatNumber(item.used / 1024 / 1024 / 1024) }} / - {{ formatNumber(item.total / 1024 / 1024 / 1024) }} ) GB - + {{ computeSize(item.used) }} / {{ computeSize(item.total) }} +
+ + + {{ $t('tabs.more') }} + + + + + + {{ $t('tabs.hide') }} + +