From 548c17802ef9f821018320d8ddd2bcca5fbea3c3 Mon Sep 17 00:00:00 2001 From: hamster1963 <1410514192@qq.com> Date: Sat, 30 Nov 2024 23:05:22 +0800 Subject: [PATCH] feat(detail): net transfer info --- .../bug-\346\217\220\344\272\244.md" | 6 ++-- ...37\350\203\275\347\224\263\350\257\267.md" | 5 ++-- ...71\345\226\204\345\273\272\350\256\256.md" | 8 +++--- .../ClientComponents/ServerDetailClient.tsx | 28 +++++++++++++++++++ messages/en.json | 4 ++- messages/ja.json | 4 ++- messages/zh-t.json | 4 ++- messages/zh.json | 4 ++- 8 files changed, 48 insertions(+), 15 deletions(-) diff --git "a/.github/ISSUE_TEMPLATE/bug-\346\217\220\344\272\244.md" "b/.github/ISSUE_TEMPLATE/bug-\346\217\220\344\272\244.md" index 531b81a31..82b365a3d 100644 --- "a/.github/ISSUE_TEMPLATE/bug-\346\217\220\344\272\244.md" +++ "b/.github/ISSUE_TEMPLATE/bug-\346\217\220\344\272\244.md" @@ -2,9 +2,8 @@ name: Bug 提交 about: 提交 bug,让面板变得更好。 title: "[BUG]" -labels: '' -assignees: '' - +labels: "" +assignees: "" --- **面板版本(二选一)** @@ -16,6 +15,5 @@ V0 | V1 **屏幕截图** 有屏幕截图可以帮助更快定位到问题 - **额外信息** 可附上其他需要的额外信息 diff --git "a/.github/ISSUE_TEMPLATE/\345\212\237\350\203\275\347\224\263\350\257\267.md" "b/.github/ISSUE_TEMPLATE/\345\212\237\350\203\275\347\224\263\350\257\267.md" index cbf082e93..7e4b80542 100644 --- "a/.github/ISSUE_TEMPLATE/\345\212\237\350\203\275\347\224\263\350\257\267.md" +++ "b/.github/ISSUE_TEMPLATE/\345\212\237\350\203\275\347\224\263\350\257\267.md" @@ -2,9 +2,8 @@ name: 功能申请 about: 描述需求 title: "[FEAT]" -labels: '' -assignees: '' - +labels: "" +assignees: "" --- **面板版本(二选一)** diff --git "a/.github/ISSUE_TEMPLATE/\346\224\271\345\226\204\345\273\272\350\256\256.md" "b/.github/ISSUE_TEMPLATE/\346\224\271\345\226\204\345\273\272\350\256\256.md" index ed4c5e06d..8c98ba3d3 100644 --- "a/.github/ISSUE_TEMPLATE/\346\224\271\345\226\204\345\273\272\350\256\256.md" +++ "b/.github/ISSUE_TEMPLATE/\346\224\271\345\226\204\345\273\272\350\256\256.md" @@ -2,13 +2,13 @@ name: 改善建议 about: 交流面板需要改进的地方 title: "[SUGGEST]" -labels: '' -assignees: '' - +labels: "" +assignees: "" --- **面板版本(二选一)** V0 | V1 **需要改进的?** -* + +- diff --git a/app/(main)/ClientComponents/ServerDetailClient.tsx b/app/(main)/ClientComponents/ServerDetailClient.tsx index b7667ad76..177ccac5d 100644 --- a/app/(main)/ClientComponents/ServerDetailClient.tsx +++ b/app/(main)/ClientComponents/ServerDetailClient.tsx @@ -199,6 +199,34 @@ export default function ServerDetailClient({ +
+ + +
+

{t("Upload")}

+ {data.status.NetOutTransfer ? ( +
+ {" "} + {formatBytes(data.status.NetOutTransfer)}{" "} +
+ ) : null} +
+
+
+ + +
+

{t("Download")}

+ {data.status.NetInTransfer ? ( +
+ {" "} + {formatBytes(data.status.NetInTransfer)}{" "} +
+ ) : null} +
+
+
+
); } diff --git a/messages/en.json b/messages/en.json index cd13063ef..f5c176b21 100644 --- a/messages/en.json +++ b/messages/en.json @@ -61,7 +61,9 @@ "Disk": "Disk", "Region": "Region", "System": "System", - "CPU": "CPU" + "CPU": "CPU", + "Upload": "Upload", + "Download": "Download" }, "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 c9b6b178a..eed790516 100644 --- a/messages/ja.json +++ b/messages/ja.json @@ -61,7 +61,9 @@ "Disk": "ディスク", "Region": "地域", "System": "システム", - "CPU": "CPU" + "CPU": "CPU", + "Upload": "Upload", + "Download": "Download" }, "ServerDetailChartClient": { "chart_fetch_error_message": "環境変数を確認し、サーバーコンソールを確認してください", diff --git a/messages/zh-t.json b/messages/zh-t.json index 0f8a50716..918eb09b2 100644 --- a/messages/zh-t.json +++ b/messages/zh-t.json @@ -61,7 +61,9 @@ "Disk": "磁碟", "Region": "地區", "System": "系統", - "CPU": "CPU" + "CPU": "CPU", + "Upload": "上傳", + "Download": "下載" }, "ServerDetailChartClient": { "chart_fetch_error_message": "獲取伺服器詳情失敗,請檢查您的環境變數並檢查伺服器控制台", diff --git a/messages/zh.json b/messages/zh.json index 74a722919..69267a92b 100644 --- a/messages/zh.json +++ b/messages/zh.json @@ -61,7 +61,9 @@ "Disk": "磁盘", "Region": "地区", "System": "系统", - "CPU": "CPU" + "CPU": "CPU", + "Upload": "上传", + "Download": "下载" }, "ServerDetailChartClient": { "chart_fetch_error_message": "获取服务器详情失败,请检查您的环境变量并检查服务器控制台",