From 00def272b0013b728d1fb33ff24dc4c6d91eb447 Mon Sep 17 00:00:00 2001 From: crimist Date: Mon, 12 Jan 2026 14:16:05 -0800 Subject: [PATCH] site: only hide GPU engine graph if entire usage is 0% (#1624) --- internal/site/src/components/routes/system.tsx | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/internal/site/src/components/routes/system.tsx b/internal/site/src/components/routes/system.tsx index 3dc646a2..6242864f 100644 --- a/internal/site/src/components/routes/system.tsx +++ b/internal/site/src/components/routes/system.tsx @@ -407,12 +407,17 @@ export default memo(function SystemDetail({ id }: { id: string }) { let hasGpuPowerData = false if (lastGpus) { + // check if there are any GPUs at all + hasGpuData = Object.keys(lastGpus).length > 0 // check if there are any GPUs with engines - for (const id in lastGpus) { - hasGpuData = true - if (lastGpus[id].e !== undefined) { - hasGpuEnginesData = true - break + for (let i = 0; i < systemStats.length && !hasGpuEnginesData; i++) { + const gpus = systemStats[i].stats?.g + if (!gpus) continue + for (const id in gpus) { + if (gpus[id].e !== undefined) { + hasGpuEnginesData = true + break + } } } // check if there are any GPUs with power data