diff --git a/frigate/api/app.py b/frigate/api/app.py index 3900aac05..a267ce595 100644 --- a/frigate/api/app.py +++ b/frigate/api/app.py @@ -127,7 +127,9 @@ def stats(): @bp.route("/stats/history") def stats_history(): - return jsonify(current_app.stats_emitter.get_stats_history()) + json: dict[str, any] = request.get_json(silent=True) or {} + keys = json.get("keys") + return jsonify(current_app.stats_emitter.get_stats_history(keys)) @bp.route("/config") diff --git a/frigate/stats/emitter.py b/frigate/stats/emitter.py index 5b76a7e6f..8491891fe 100644 --- a/frigate/stats/emitter.py +++ b/frigate/stats/emitter.py @@ -67,7 +67,7 @@ class StatsEmitter(threading.Thread): def run(self) -> None: time.sleep(10) - for counter in itertools.cycle(range(self.config.record.expire_interval)): + for counter in itertools.cycle(range(int(self.config.record.expire_interval / 10))): if self.stop_event.wait(10): break diff --git a/web/src/components/graph/SystemGraph.tsx b/web/src/components/graph/SystemGraph.tsx index aa1e4cd26..e69a6c3e7 100644 --- a/web/src/components/graph/SystemGraph.tsx +++ b/web/src/components/graph/SystemGraph.tsx @@ -51,7 +51,7 @@ export default function SystemGraph({ if (value >= threshold.error) { return "#FA5252"; } else if (value >= threshold.warning) { - return "#aa00aa"; + return "#FF9966"; } else { return "#404040"; } diff --git a/web/src/components/navigation/Bottombar.tsx b/web/src/components/navigation/Bottombar.tsx index bee4a0616..6334b04b0 100644 --- a/web/src/components/navigation/Bottombar.tsx +++ b/web/src/components/navigation/Bottombar.tsx @@ -57,7 +57,10 @@ function StatusAlertNav() {
{potentialProblems.map((prob) => ( -
+
{prob.text}
diff --git a/web/src/pages/System.tsx b/web/src/pages/System.tsx index 757264c05..ee52ee61e 100644 --- a/web/src/pages/System.tsx +++ b/web/src/pages/System.tsx @@ -14,7 +14,9 @@ import { function System() { const { data: config } = useSWR("config"); - // stats + // stats chunks + + // stats collection const { data: initialStats } = useSWR("stats/history", { revalidateOnFocus: false,