From c577361923a6e4d2aeaeb9fc62482a3fa7db975c Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Mon, 8 Apr 2024 17:19:00 -0600 Subject: [PATCH] Fix frigate startup stats (#10887) --- web/src/hooks/use-stats.ts | 6 ++++++ web/src/types/stats.ts | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/web/src/hooks/use-stats.ts b/web/src/hooks/use-stats.ts index 3a5c6e9ab..02db404f1 100644 --- a/web/src/hooks/use-stats.ts +++ b/web/src/hooks/use-stats.ts @@ -18,6 +18,12 @@ export default function useStats(stats: FrigateStats | undefined) { return problems; } + // if frigate has just started + // don't look for issues + if (stats.service.uptime < 120) { + return problems; + } + // check detectors for high inference speeds Object.entries(stats["detectors"]).forEach(([key, det]) => { if (det["inference_speed"] > InferenceThreshold.error) { diff --git a/web/src/types/stats.ts b/web/src/types/stats.ts index 3b293f76a..59fb6f69d 100644 --- a/web/src/types/stats.ts +++ b/web/src/types/stats.ts @@ -47,7 +47,7 @@ export type ServiceStats = { last_updated: number; storage: { [path: string]: StorageStats }; temperatures: { [apex: string]: number }; - update: number; + uptime: number; latest_version: string; version: string; };