mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
UI Tweaks (#12002)
* Adjust review padding * Fix mse check * Don't fail when cpu property is missing * ignore lines without any spaces
This commit is contained in:
parent
89a478ce0a
commit
ba6fc0fdb3
@ -481,7 +481,7 @@ def logs(service: str):
|
||||
for rawLine in contents.splitlines():
|
||||
cleanLine = rawLine.strip()
|
||||
|
||||
if len(cleanLine) < 10:
|
||||
if len(cleanLine) < 10 or " " not in cleanLine:
|
||||
continue
|
||||
|
||||
if dateEnd == 0:
|
||||
|
@ -330,7 +330,7 @@ function MSEPlayer({
|
||||
setTimeout(() => {
|
||||
if (
|
||||
document.visibilityState === "visible" &&
|
||||
wsRef.current != undefined
|
||||
wsRef.current != null
|
||||
) {
|
||||
onError("stalled");
|
||||
}
|
||||
|
@ -60,4 +60,4 @@ export type MotionData = {
|
||||
camera: string;
|
||||
};
|
||||
|
||||
export const REVIEW_PADDING = 2;
|
||||
export const REVIEW_PADDING = 4;
|
||||
|
@ -167,9 +167,13 @@ export default function EventView({
|
||||
return;
|
||||
}
|
||||
|
||||
const endTime = review.end_time
|
||||
? review.end_time + REVIEW_PADDING
|
||||
: Date.now() / 1000;
|
||||
|
||||
axios
|
||||
.post(
|
||||
`export/${review.camera}/start/${review.start_time}/end/${review.end_time}`,
|
||||
`export/${review.camera}/start/${review.start_time - REVIEW_PADDING}/end/${endTime}`,
|
||||
{ playback: "realtime" },
|
||||
)
|
||||
.then((response) => {
|
||||
|
@ -163,10 +163,14 @@ export default function GeneralMetrics({
|
||||
series[key] = { name: key, data: [] };
|
||||
}
|
||||
|
||||
series[key].data.push({
|
||||
x: statsIdx + 1,
|
||||
y: stats.cpu_usages[detStats.pid.toString()].cpu,
|
||||
});
|
||||
const data = stats.cpu_usages[detStats.pid.toString()].cpu;
|
||||
|
||||
if (data != undefined) {
|
||||
series[key].data.push({
|
||||
x: statsIdx + 1,
|
||||
y: data,
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
return Object.values(series);
|
||||
@ -300,10 +304,14 @@ export default function GeneralMetrics({
|
||||
series[key] = { name: key, data: [] };
|
||||
}
|
||||
|
||||
series[key].data.push({
|
||||
x: statsIdx + 1,
|
||||
y: stats.cpu_usages[procStats.pid.toString()].cpu,
|
||||
});
|
||||
const data = stats.cpu_usages[procStats.pid.toString()].cpu;
|
||||
|
||||
if (data != undefined) {
|
||||
series[key].data.push({
|
||||
x: statsIdx + 1,
|
||||
y: data,
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user