mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-08-02 09:02:15 +03:00
Improve efficiency of log and metrics pages (#11622)
* Rework stats pages * Handle limited data case * Handle page and arrow keys * Adjust sizing
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { useFrigateStats } from "@/api/ws";
|
||||
import { CameraLineGraph } from "@/components/graph/SystemGraph";
|
||||
import { CameraLineGraph } from "@/components/graph/CameraGraph";
|
||||
import { Skeleton } from "@/components/ui/skeleton";
|
||||
import { FrigateConfig } from "@/types/frigateConfig";
|
||||
import { FrigateStats } from "@/types/stats";
|
||||
@@ -43,7 +43,7 @@ export default function CameraMetrics({
|
||||
}
|
||||
|
||||
if (updatedStats.service.last_updated > lastUpdated) {
|
||||
setStatsHistory([...statsHistory, updatedStats]);
|
||||
setStatsHistory([...statsHistory.slice(1), updatedStats]);
|
||||
setLastUpdated(Date.now() / 1000);
|
||||
}
|
||||
}, [initialStats, updatedStats, statsHistory, lastUpdated, setLastUpdated]);
|
||||
|
||||
Reference in New Issue
Block a user