site: only hide GPU engine graph if entire usage is 0% (#1624)

This commit is contained in:
crimist
2026-01-12 14:16:05 -08:00
committed by GitHub
parent 383913505f
commit 00def272b0

View File

@@ -407,14 +407,19 @@ 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) {
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
for (let i = 0; i < systemStats.length && !hasGpuPowerData; i++) {
const gpus = systemStats[i].stats?.g