From 1c97ea3e2c64b06e9523eba4eaa9d4505391459e Mon Sep 17 00:00:00 2001 From: crimist Date: Mon, 5 Jan 2026 19:37:10 -0800 Subject: [PATCH] site: only hide GPU power graph if entire timescale is 0W --- internal/site/src/components/routes/system.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/internal/site/src/components/routes/system.tsx b/internal/site/src/components/routes/system.tsx index d20237b3..53e87919 100644 --- a/internal/site/src/components/routes/system.tsx +++ b/internal/site/src/components/routes/system.tsx @@ -402,7 +402,13 @@ export default memo(function SystemDetail({ id }: { id: string }) { const dataEmpty = !chartLoading && chartData.systemStats.length === 0 const lastGpuVals = Object.values(systemStats.at(-1)?.stats.g ?? {}) const hasGpuData = lastGpuVals.length > 0 - const hasGpuPowerData = lastGpuVals.some((gpu) => gpu.p !== undefined || gpu.pp !== undefined) + const hasGpuPowerData = systemStats.some((record) => { + const gpus = record.stats?.g + if (!gpus) { + return false + } + return Object.values(gpus).some((gpu) => gpu.p !== undefined || gpu.pp !== undefined) + }) const hasGpuEnginesData = lastGpuVals.some((gpu) => gpu.e !== undefined) const isLinux = !(details?.os ?? system.info?.os) const isPodman = details?.podman ?? system.info?.p ?? false