mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-10 21:25:24 +03:00
parent
ab032aa004
commit
39d887cbb4
@ -212,7 +212,7 @@ export default function GeneralMetrics({
|
||||
} = {};
|
||||
|
||||
statsHistory.forEach((stats, statsIdx) => {
|
||||
if (!stats) {
|
||||
if (!stats || !canGetGpuInfo) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -225,7 +225,7 @@ export default function GeneralMetrics({
|
||||
});
|
||||
});
|
||||
return Object.keys(series).length > 0 ? Object.values(series) : [];
|
||||
}, [statsHistory]);
|
||||
}, [statsHistory, canGetGpuInfo]);
|
||||
|
||||
const gpuMemSeries = useMemo(() => {
|
||||
if (!statsHistory) {
|
||||
@ -245,7 +245,7 @@ export default function GeneralMetrics({
|
||||
} = {};
|
||||
|
||||
statsHistory.forEach((stats, statsIdx) => {
|
||||
if (!stats) {
|
||||
if (!stats || !canGetGpuInfo) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -258,7 +258,7 @@ export default function GeneralMetrics({
|
||||
});
|
||||
});
|
||||
return Object.values(series);
|
||||
}, [statsHistory]);
|
||||
}, [statsHistory, canGetGpuInfo]);
|
||||
|
||||
// other processes stats
|
||||
|
||||
@ -411,13 +411,13 @@ export default function GeneralMetrics({
|
||||
)}
|
||||
</div>
|
||||
|
||||
{(statsHistory.length == 0 || statsHistory[0].gpu_usages) && (
|
||||
{canGetGpuInfo &&
|
||||
(statsHistory.length == 0 || statsHistory[0].gpu_usages) && (
|
||||
<>
|
||||
<div className="mt-4 flex items-center justify-between">
|
||||
<div className="text-muted-foreground text-sm font-medium">
|
||||
GPUs
|
||||
</div>
|
||||
{canGetGpuInfo && (
|
||||
<Button
|
||||
className="cursor-pointer"
|
||||
size="sm"
|
||||
@ -425,7 +425,6 @@ export default function GeneralMetrics({
|
||||
>
|
||||
Hardware Info
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
<div className=" mt-4 grid grid-cols-1 sm:grid-cols-2 gap-2">
|
||||
{statsHistory.length != 0 ? (
|
||||
|
||||
Loading…
Reference in New Issue
Block a user