From 2bc139d34cac428bce5a4f7a77d7aa496f27cb75 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Wed, 30 Apr 2025 17:25:28 -0600 Subject: [PATCH] Fix NPU stats --- web/src/views/system/GeneralMetrics.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/web/src/views/system/GeneralMetrics.tsx b/web/src/views/system/GeneralMetrics.tsx index a6be0a418..1b253ca26 100644 --- a/web/src/views/system/GeneralMetrics.tsx +++ b/web/src/views/system/GeneralMetrics.tsx @@ -391,7 +391,7 @@ export default function GeneralMetrics({ series[key] = { name: key, data: [] }; } - if (stats.npu) { + if (stats?.npu) { hasValidNpu = true; series[key].data.push({ x: statsIdx + 1, y: stats.npu }); } @@ -399,6 +399,7 @@ export default function GeneralMetrics({ }); if (!hasValidNpu) { + console.log(`returning blank`); return []; } @@ -585,8 +586,8 @@ export default function GeneralMetrics({ {(statsHistory.length == 0 || - statsHistory[0].gpu_usages || - statsHistory[0].npu_usages) && ( + gpuSeries.length > 0 || + npuSeries.length > 0) && ( <>