From 97288ed6ced5f817013b17c69fd755272e56bdb4 Mon Sep 17 00:00:00 2001 From: MacRimi Date: Thu, 2 Oct 2025 18:11:00 +0200 Subject: [PATCH] Update system-overview.tsx --- AppImage/components/system-overview.tsx | 73 ++++++++++++++++--------- 1 file changed, 48 insertions(+), 25 deletions(-) diff --git a/AppImage/components/system-overview.tsx b/AppImage/components/system-overview.tsx index 8290ff4..b972df4 100644 --- a/AppImage/components/system-overview.tsx +++ b/AppImage/components/system-overview.tsx @@ -4,7 +4,7 @@ import { useState, useEffect } from "react" import { Card, CardContent, CardHeader, CardTitle } from "./ui/card" import { Progress } from "./ui/progress" import { Badge } from "./ui/badge" -import { XAxis, YAxis, CartesianGrid, Tooltip, ResponsiveContainer, AreaChart, Area } from "recharts" +import { XAxis, YAxis, CartesianGrid, Tooltip, ResponsiveContainer, AreaChart, Area, Legend } from "recharts" import { Cpu, MemoryStick, Thermometer, Activity, Server, Zap, AlertCircle } from "lucide-react" interface SystemData { @@ -18,6 +18,7 @@ interface SystemData { hostname: string node_id: string timestamp: string + cpu_cores?: number } interface VMData { @@ -41,7 +42,7 @@ interface HistoricalData { } const historicalDataStore: HistoricalData[] = [] -const MAX_HISTORICAL_POINTS = 24 // Store 24 data points for 24h view +const MAX_HISTORICAL_POINTS = 144 // Store 144 data points for 24h view const fetchSystemData = async (): Promise => { try { @@ -353,16 +354,16 @@ export function SystemOverview() { - CPU Usage (Last {historicalDataStore.length} readings) + CPU Usage (Last 24h) {chartData.cpuData.length > 0 ? ( - - - + + + + - ) : ( @@ -386,16 +395,16 @@ export function SystemOverview() { - Memory Usage (Last {historicalDataStore.length} readings) + Memory Usage (Last 24h) {chartData.memoryData.length > 0 ? ( - - - + + + + + - @@ -434,22 +454,22 @@ export function SystemOverview() { -
- Hostname: - {systemData.hostname} -
Uptime: {systemData.uptime}
-
- Node ID: - {systemData.node_id} -
Last Update: {new Date(systemData.timestamp).toLocaleTimeString()}
+
+ Proxmox Version: + 8.x +
+
+ Kernel: + Linux +
@@ -461,8 +481,11 @@ export function SystemOverview() { -
- Load Average: +
+
+ Load Average: + (1m, 5m, 15m) +
{systemData.load_average.map((avg) => avg.toFixed(2)).join(", ")} @@ -479,7 +502,7 @@ export function SystemOverview() {
CPU Cores: - {navigator.hardwareConcurrency || "N/A"} + {systemData.cpu_cores || "N/A"}