diff --git a/src/components/ServerDetailSummary.tsx b/src/components/ServerDetailSummary.tsx
new file mode 100644
index 0000000..82653ae
--- /dev/null
+++ b/src/components/ServerDetailSummary.tsx
@@ -0,0 +1,96 @@
+"use client"
+
+import { Progress } from "@/components/ui/progress"
+import { useWebSocketContext } from "@/hooks/use-websocket-context"
+import { formatNezhaInfo } from "@/lib/utils"
+import { NezhaWebsocketResponse } from "@/types/nezha-api"
+
+export default function ServerDetailSummary({ server_id }: { server_id: number }) {
+ const { lastMessage, connected } = useWebSocketContext()
+
+ if (!connected && !lastMessage) {
+ return null
+ }
+
+ const nezhaWsData = lastMessage ? (JSON.parse(lastMessage.data) as NezhaWebsocketResponse) : null
+
+ if (!nezhaWsData) {
+ return null
+ }
+
+ const server = nezhaWsData.servers.find((s) => s.id === Number(server_id))
+
+ if (!server) {
+ return null
+ }
+
+ const { cpu, mem, disk, up, down, tcp, udp, process } = formatNezhaInfo(nezhaWsData.now, server)
+
+ return (
+
+
+
+ CPU
+ {cpu.toFixed(2)}%
+
+
+
+
+
+ Mem
+ {mem.toFixed(2)}%
+
+
+
+
+
+ Disk
+ {disk.toFixed(2)}%
+
+
+
+
+
+
+
+ Upload
+ {up.toFixed(2)}M/s
+
+
+ Download
+ {down.toFixed(2)}M/s
+
+
+
+ )
+}
+
+type UsageBarProps = {
+ value: number
+}
+
+function UsageBar({ value }: UsageBarProps) {
+ return (
+