mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-14 07:05:24 +03:00
Fix bad data in stats
This commit is contained in:
parent
8e31244fb3
commit
f6d1f610cb
@ -163,7 +163,7 @@ export default function GeneralMetrics({
|
|||||||
series[key] = { name: key, data: [] };
|
series[key] = { name: key, data: [] };
|
||||||
}
|
}
|
||||||
|
|
||||||
const data = stats.cpu_usages[detStats.pid.toString()].cpu;
|
const data = stats.cpu_usages[detStats.pid.toString()]?.cpu;
|
||||||
|
|
||||||
if (data != undefined) {
|
if (data != undefined) {
|
||||||
series[key].data.push({
|
series[key].data.push({
|
||||||
@ -304,7 +304,7 @@ export default function GeneralMetrics({
|
|||||||
series[key] = { name: key, data: [] };
|
series[key] = { name: key, data: [] };
|
||||||
}
|
}
|
||||||
|
|
||||||
const data = stats.cpu_usages[procStats.pid.toString()].cpu;
|
const data = stats.cpu_usages[procStats.pid.toString()]?.cpu;
|
||||||
|
|
||||||
if (data != undefined) {
|
if (data != undefined) {
|
||||||
series[key].data.push({
|
series[key].data.push({
|
||||||
@ -338,11 +338,15 @@ export default function GeneralMetrics({
|
|||||||
series[key] = { name: key, data: [] };
|
series[key] = { name: key, data: [] };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const data = stats.cpu_usages[procStats.pid.toString()]?.mem;
|
||||||
|
|
||||||
|
if (data) {
|
||||||
series[key].data.push({
|
series[key].data.push({
|
||||||
x: statsIdx + 1,
|
x: statsIdx + 1,
|
||||||
y: stats.cpu_usages[procStats.pid.toString()].mem,
|
y: data,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
return Object.values(series);
|
return Object.values(series);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user