diff --git a/app/(main)/ClientComponents/ServerDetailChartClient.tsx b/app/(main)/ClientComponents/ServerDetailChartClient.tsx index c2fb955..93c15c3 100644 --- a/app/(main)/ClientComponents/ServerDetailChartClient.tsx +++ b/app/(main)/ClientComponents/ServerDetailChartClient.tsx @@ -6,7 +6,12 @@ import AnimatedCircularProgressBar from "@/components/ui/animated-circular-progr import { Card, CardContent } from "@/components/ui/card"; import { ChartConfig, ChartContainer } from "@/components/ui/chart"; import getEnv from "@/lib/env-entry"; -import { formatNezhaInfo, formatRelativeTime, nezhaFetcher } from "@/lib/utils"; +import { + formatBytes, + formatNezhaInfo, + formatRelativeTime, + nezhaFetcher, +} from "@/lib/utils"; import { useTranslations } from "next-intl"; import { useEffect, useState } from "react"; import { @@ -339,7 +344,7 @@ function MemChart({ data }: { data: NezhaAPISafe }) {
-
+

{t("Mem")}

@@ -368,6 +373,15 @@ function MemChart({ data }: { data: NezhaAPISafe }) {
+
+
+ {formatBytes(data.status.MemUsed)} /{" "} + {formatBytes(data.host.MemTotal)} +
+
+ swap: {formatBytes(data.status.SwapUsed)} +
+

{t("Disk")}

-
-

- {disk.toFixed(0)}% -

- +
+
+

+ {disk.toFixed(0)}% +

+ +
+
+ {formatBytes(data.status.DiskUsed)} /{" "} + {formatBytes(data.host.DiskTotal)} +
+ + +
+

{t("Load")}

+ {data.status.NetInTransfer ? ( +
+ {data.status.Load1} / {data.status.Load5} /{" "} + {data.status.Load15} +
+ ) : null} +
+
+
diff --git a/messages/en.json b/messages/en.json index 74641a5..ad255fd 100644 --- a/messages/en.json +++ b/messages/en.json @@ -71,7 +71,8 @@ "System": "System", "CPU": "CPU", "Upload": "Upload", - "Download": "Download" + "Download": "Download", + "Load": "Load" }, "ServerDetailChartClient": { "chart_fetch_error_message": "Please check your environment variables and review the server console", diff --git a/messages/ja.json b/messages/ja.json index e6c8202..00323aa 100644 --- a/messages/ja.json +++ b/messages/ja.json @@ -70,6 +70,7 @@ "Region": "地域", "System": "システム", "CPU": "CPU", + "Load": "負荷", "Upload": "Upload", "Download": "Download" }, diff --git a/messages/zh-t.json b/messages/zh-t.json index 07b76a5..8e82230 100644 --- a/messages/zh-t.json +++ b/messages/zh-t.json @@ -71,7 +71,8 @@ "System": "系統", "CPU": "CPU", "Upload": "上傳", - "Download": "下載" + "Download": "下載", + "Load": "負載" }, "ServerDetailChartClient": { "chart_fetch_error_message": "獲取伺服器詳情失敗,請檢查您的環境變數並檢查伺服器控制台", diff --git a/messages/zh.json b/messages/zh.json index 918e77a..8fdad27 100644 --- a/messages/zh.json +++ b/messages/zh.json @@ -71,10 +71,11 @@ "System": "系统", "CPU": "CPU", "Upload": "上传", - "Download": "下载" + "Download": "下载", + "Load": "负载" }, "ServerDetailChartClient": { - "chart_fetch_error_message": "获取服务器详情失败,请检查您的环境变量并检查服务器控制台", + "chart_fetch_error_message": "获取服务器详情失败,请检查您的环境变量并检查服务器控制台", "Process": "进程", "Disk": "磁盘", "Mem": "内存", diff --git a/package.json b/package.json index 49b5cbd..abdf347 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nezha-dash", - "version": "1.6.0-fix", + "version": "1.6.1", "private": true, "scripts": { "dev": "next dev -p 3040",