From 08c0faa20e388d40bd0d4c50837e542e9f715404 Mon Sep 17 00:00:00 2001 From: ssongliu <73214554+ssongliu@users.noreply.github.com> Date: Wed, 11 Sep 2024 15:38:15 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E6=A6=82=E8=A7=88?= =?UTF-8?q?=E9=A1=B5=E5=86=85=E5=AD=98=E5=8D=95=E4=BD=8D=20(#6450)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/home/status/index.vue | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/frontend/src/views/home/status/index.vue b/frontend/src/views/home/status/index.vue index b9eb23b27..086e712d3 100644 --- a/frontend/src/views/home/status/index.vue +++ b/frontend/src/views/home/status/index.vue @@ -53,28 +53,22 @@ {{ $t('home.mem') }}: - - {{ $t('home.total') }}: {{ formatNumber(currentInfo.memoryTotal / 1024 / 1024) }} MB - - - {{ $t('home.used') }}: {{ formatNumber(currentInfo.memoryUsed / 1024 / 1024) }} MB - - - {{ $t('home.free') }}: {{ formatNumber(currentInfo.memoryAvailable / 1024 / 1024) }} MB - + {{ $t('home.total') }}: {{ computeSize(currentInfo.memoryTotal) }} + {{ $t('home.used') }}: {{ computeSize(currentInfo.memoryUsed) }} + {{ $t('home.free') }}: {{ computeSize(currentInfo.memoryAvailable) }} {{ $t('home.percent') }}: {{ formatNumber(currentInfo.memoryUsedPercent) }}%
{{ $t('home.swapMem') }}: - {{ $t('home.total') }}: {{ formatNumber(currentInfo.swapMemoryTotal / 1024 / 1024) }} MB + {{ $t('home.total') }}: {{ computeSize(currentInfo.swapMemoryTotal) }} - {{ $t('home.used') }}: {{ formatNumber(currentInfo.swapMemoryUsed / 1024 / 1024) }} MB + {{ $t('home.used') }}: {{ computeSize(currentInfo.swapMemoryUsed) }} - {{ $t('home.free') }}: {{ formatNumber(currentInfo.swapMemoryAvailable / 1024 / 1024) }} MB + {{ $t('home.free') }}: {{ computeSize(currentInfo.swapMemoryAvailable) }} {{ $t('home.percent') }}: {{ formatNumber(currentInfo.swapMemoryUsedPercent) }}% @@ -91,8 +85,7 @@ - ( {{ formatNumber(currentInfo.memoryUsed / 1024 / 1024) }} / - {{ formatNumber(currentInfo.memoryTotal / 1024 / 1024) }} ) MB + {{ computeSize(currentInfo.memoryUsed) }} / {{ computeSize(currentInfo.memoryTotal) }}