Skip to content

Commit

Permalink
feat(detail): net transfer info
Browse files Browse the repository at this point in the history
  • Loading branch information
hamster1963 committed Nov 30, 2024
1 parent 4b81307 commit 548c178
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 15 deletions.
6 changes: 2 additions & 4 deletions .github/ISSUE_TEMPLATE/bug-提交.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
name: Bug 提交
about: 提交 bug,让面板变得更好。
title: "[BUG]"
labels: ''
assignees: ''

labels: ""
assignees: ""
---

**面板版本(二选一)**
Expand All @@ -16,6 +15,5 @@ V0 | V1
**屏幕截图**
有屏幕截图可以帮助更快定位到问题


**额外信息**
可附上其他需要的额外信息
5 changes: 2 additions & 3 deletions .github/ISSUE_TEMPLATE/功能申请.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
name: 功能申请
about: 描述需求
title: "[FEAT]"
labels: ''
assignees: ''

labels: ""
assignees: ""
---

**面板版本(二选一)**
Expand Down
8 changes: 4 additions & 4 deletions .github/ISSUE_TEMPLATE/改善建议.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
name: 改善建议
about: 交流面板需要改进的地方
title: "[SUGGEST]"
labels: ''
assignees: ''

labels: ""
assignees: ""
---

**面板版本(二选一)**
V0 | V1

**需要改进的?**
*

-
28 changes: 28 additions & 0 deletions app/(main)/ClientComponents/ServerDetailClient.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,34 @@ export default function ServerDetailClient({
</CardContent>
</Card>
</section>
<section className="flex flex-wrap gap-2 mt-1">
<Card className="rounded-[10px] bg-transparent border-none shadow-none">
<CardContent className="px-1.5 py-1">
<section className="flex flex-col items-start gap-0.5">
<p className="text-xs text-muted-foreground">{t("Upload")}</p>
{data.status.NetOutTransfer ? (
<div className="text-xs">
{" "}
{formatBytes(data.status.NetOutTransfer)}{" "}
</div>
) : null}
</section>
</CardContent>
</Card>
<Card className="rounded-[10px] bg-transparent border-none shadow-none">
<CardContent className="px-1.5 py-1">
<section className="flex flex-col items-start gap-0.5">
<p className="text-xs text-muted-foreground">{t("Download")}</p>
{data.status.NetInTransfer ? (
<div className="text-xs">
{" "}
{formatBytes(data.status.NetInTransfer)}{" "}
</div>
) : null}
</section>
</CardContent>
</Card>
</section>
</div>
);
}
4 changes: 3 additions & 1 deletion messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 3 additions & 1 deletion messages/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@
"Disk": "ディスク",
"Region": "地域",
"System": "システム",
"CPU": "CPU"
"CPU": "CPU",
"Upload": "Upload",
"Download": "Download"
},
"ServerDetailChartClient": {
"chart_fetch_error_message": "環境変数を確認し、サーバーコンソールを確認してください",
Expand Down
4 changes: 3 additions & 1 deletion messages/zh-t.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@
"Disk": "磁碟",
"Region": "地區",
"System": "系統",
"CPU": "CPU"
"CPU": "CPU",
"Upload": "上傳",
"Download": "下載"
},
"ServerDetailChartClient": {
"chart_fetch_error_message": "獲取伺服器詳情失敗,請檢查您的環境變數並檢查伺服器控制台",
Expand Down
4 changes: 3 additions & 1 deletion messages/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@
"Disk": "磁盘",
"Region": "地区",
"System": "系统",
"CPU": "CPU"
"CPU": "CPU",
"Upload": "上传",
"Download": "下载"
},
"ServerDetailChartClient": {
"chart_fetch_error_message": "获取服务器详情失败,请检查您的环境变量并检查服务器控制台",
Expand Down

0 comments on commit 548c178

Please sign in to comment.