From e9311655666e2dbdcb29858b905c99e613b845a1 Mon Sep 17 00:00:00 2001 From: henrygd Date: Tue, 21 Apr 2026 15:44:08 -0400 Subject: [PATCH] updates --- .../site/src/components/routes/system.tsx | 25 ++++++++++++++----- .../routes/system/use-system-data.ts | 15 +---------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/internal/site/src/components/routes/system.tsx b/internal/site/src/components/routes/system.tsx index ff36bda4..6e60812a 100644 --- a/internal/site/src/components/routes/system.tsx +++ b/internal/site/src/components/routes/system.tsx @@ -13,7 +13,7 @@ import { TemperatureChart, BatteryChart } from "./system/charts/sensor-charts" import { GpuPowerChart, GpuDetailCharts } from "./system/charts/gpu-charts" import { LazyContainersTable, LazySmartTable, LazySystemdTable, LazyNetworkProbesTable } from "./system/lazy-tables" import { LoadAverageChart } from "./system/charts/load-average-chart" -import { ContainerIcon, CpuIcon, HardDriveIcon, TerminalSquareIcon } from "lucide-react" +import { ContainerIcon, CpuIcon, HardDriveIcon, NetworkIcon, TerminalSquareIcon } from "lucide-react" import { GpuIcon } from "../ui/icons" import SystemdTable from "../systemd-table/systemd-table" import ContainersTable from "../containers-table/containers-table" @@ -65,7 +65,7 @@ export default memo(function SystemDetail({ id }: { id: string }) { const hasGpu = hasGpuData || hasGpuPowerData // keep tabsRef in sync for keyboard navigation - const tabs = ["core", "disk"] + const tabs = ["core", "network", "disk"] if (hasGpu) tabs.push("gpu") if (hasContainers) tabs.push("containers") if (hasSystemd) tabs.push("services") @@ -159,6 +159,10 @@ export default memo(function SystemDetail({ id }: { id: string }) { Core + + + Network + Disk @@ -186,15 +190,24 @@ export default memo(function SystemDetail({ id }: { id: string }) {
- - + + - {pageBottomExtraMargin > 0 &&
}
- +
+ + + {mountedTabs.has("network") && ( + <> +
+ +
+ + + )}
diff --git a/internal/site/src/components/routes/system/use-system-data.ts b/internal/site/src/components/routes/system/use-system-data.ts index 22689485..27aeaec3 100644 --- a/internal/site/src/components/routes/system/use-system-data.ts +++ b/internal/site/src/components/routes/system/use-system-data.ts @@ -19,7 +19,6 @@ import { chartTimeData, listen, parseSemVer, useBrowserStorage } from "@/lib/uti import type { ChartData, ContainerStatsRecord, - NetworkProbeStatsRecord, SystemDetailsRecord, SystemInfo, SystemRecord, @@ -49,7 +48,6 @@ export function useSystemData(id: string) { const [system, setSystem] = useState({} as SystemRecord) const [systemStats, setSystemStats] = useState([] as SystemStatsRecord[]) const [containerData, setContainerData] = useState([] as ChartData["containerData"]) - const [probeStats, setProbeStats] = useState([] as NetworkProbeStatsRecord[]) const persistChartTime = useRef(false) const statsRequestId = useRef(0) const [chartLoading, setChartLoading] = useState(true) @@ -121,34 +119,24 @@ export function useSystemData(id: string) { pb.realtime .subscribe( `rt_metrics`, - (data: { - container: ContainerStatsRecord[] - info: SystemInfo - stats: SystemStats - probes?: NetworkProbeStatsRecord["stats"] - }) => { + (data: { container: ContainerStatsRecord[]; info: SystemInfo; stats: SystemStats }) => { const now = Date.now() const statsPoint = { created: now, stats: data.stats } as SystemStatsRecord const containerPoint = data.container?.length > 0 ? makeContainerPoint(now, data.container as unknown as ContainerStatsRecord["stats"]) : null - const probePoint: NetworkProbeStatsRecord | null = data.probes ? { stats: data.probes, created: now } : null // on first message, make sure we clear out data from other time periods if (isFirst) { isFirst = false setSystemStats([statsPoint]) setContainerData(containerPoint ? [containerPoint] : []) - setProbeStats(probePoint ? [probePoint] : []) return } setSystemStats((prev) => appendData(prev, [statsPoint], 1000, 60)) if (containerPoint) { setContainerData((prev) => appendData(prev, [containerPoint], 1000, 60)) } - if (probePoint) { - setProbeStats((prev) => appendData(prev, [probePoint], 1000, 60)) - } }, { query: { system: system.id } } ) @@ -334,7 +322,6 @@ export function useSystemData(id: string) { system, systemStats, containerData, - probeStats, chartData, containerChartConfigs, details,