From 88b264be69ebe32e214c04c3166a6b636705f483 Mon Sep 17 00:00:00 2001
From: hamster1963 <1410514192@qq.com>
Date: Sun, 1 Dec 2024 16:54:39 +0800
Subject: [PATCH] feat: add chart detail
---
src/components/ServerDetailChart.tsx | 40 +++++++++++++++++--------
src/components/ServerDetailOverview.tsx | 14 ++++++---
src/types/nezha-api.ts | 2 ++
3 files changed, 40 insertions(+), 16 deletions(-)
diff --git a/src/components/ServerDetailChart.tsx b/src/components/ServerDetailChart.tsx
index 942d15e..19ab087 100644
--- a/src/components/ServerDetailChart.tsx
+++ b/src/components/ServerDetailChart.tsx
@@ -16,6 +16,7 @@ import { ServerDetailChartLoading } from "./loading/ServerDetailLoading";
import AnimatedCircularProgressBar from "./ui/animated-circular-progress-bar";
import { useWebSocketContext } from "@/hooks/use-websocket-context";
import { useTranslation } from "react-i18next";
+import { formatBytes } from "@/lib/format";
type cpuChartData = {
timeStamp: string;
@@ -317,7 +318,7 @@ function MemChart({ now, data }: { now: number; data: NezhaServer }) {
@@ -350,6 +351,15 @@ function MemChart({ now, data }: { now: number; data: NezhaServer }) {
{t("serverDetailChart.disk")}
- {disk.toFixed(0)}%
-
+ {disk.toFixed(0)}%
+ {"Load"}