- {camera.name.replaceAll("_", " ")} CPU
+
+ {Object.keys(cameraCpuSeries).includes(camera.name) ? (
+
+
+ {camera.name.replaceAll("_", " ")} CPU
+
+
-
-
-
-
- {camera.name.replaceAll("_", " ")} DPS
+ ) : (
+
+ )}
+ {Object.keys(cameraFpsSeries).includes(camera.name) ? (
+
+
+ {camera.name.replaceAll("_", " ")} DPS
+
+
-
-
+ ) : (
+
+ )}
);
}
diff --git a/web/src/views/system/GeneralMetrics.tsx b/web/src/views/system/GeneralMetrics.tsx
index ba486b2e6..60312a377 100644
--- a/web/src/views/system/GeneralMetrics.tsx
+++ b/web/src/views/system/GeneralMetrics.tsx
@@ -61,6 +61,16 @@ export default function GeneralMetrics({
}
}, [initialStats, updatedStats, statsHistory, lastUpdated, setLastUpdated]);
+ const canGetGpuInfo = useMemo(
+ () =>
+ statsHistory.length > 0 &&
+ Object.keys(statsHistory[0]?.gpu_usages ?? {}).filter(
+ (key) =>
+ key == "amd-vaapi" || key == "intel-vaapi" || key == "intel-qsv",
+ ).length > 0,
+ [statsHistory],
+ );
+
// timestamps
const updateTimes = useMemo(
@@ -274,7 +284,7 @@ export default function GeneralMetrics({
Detectors
- {detInferenceTimeSeries.length != 0 ? (
+ {statsHistory.length != 0 ? (
Detector Inference Speed
{detInferenceTimeSeries.map((series) => (
@@ -336,22 +346,16 @@ export default function GeneralMetrics({
GPUs
- {statsHistory.length > 0 &&
- Object.keys(statsHistory[0].gpu_usages ?? {}).filter(
- (key) =>
- key == "amd-vaapi" ||
- key == "intel-vaapi" ||
- key == "intel-qsv",
- ).length > 0 && (
-
- )}
+ {canGetGpuInfo && (
+
+ )}
{statsHistory.length != 0 ? (