mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-02 06:23:42 +00:00
feat: add more system stats i18n keys
This commit is contained in:
parent
371e9b41f8
commit
fcff05f901
@ -142,7 +142,10 @@
|
||||
"ffmpegHighCpuUsage": "{{camera}} has high FFMPEG CPU usage ({{ffmpegAvg}}%)",
|
||||
"detectHighCpuUsage": "{{camera}} has high detect CPU usage ({{detectAvg}}%)",
|
||||
"healthy": "System is healthy",
|
||||
"reindexingEmbeddings": "Reindexing embeddings ({{processed}}% complete)"
|
||||
"reindexingEmbeddings": "Reindexing embeddings ({{processed}}% complete)",
|
||||
"cameraIsOffline": "{{camera}} is offline",
|
||||
"detectIsSlow": "{{detect}} is slow ({{speed}} ms)",
|
||||
"detectIsVerySlow": "{{detect}} is very slow ({{speed}} ms)"
|
||||
},
|
||||
"enrichments": {
|
||||
"title": "Enrichments",
|
||||
|
||||
@ -36,13 +36,19 @@ export default function useStats(stats: FrigateStats | undefined) {
|
||||
Object.entries(memoizedStats["detectors"]).forEach(([key, det]) => {
|
||||
if (det["inference_speed"] > InferenceThreshold.error) {
|
||||
problems.push({
|
||||
text: `${capitalizeFirstLetter(key)} is very slow (${det["inference_speed"]} ms)`,
|
||||
text: t("stats.detectIsVerySlow", {
|
||||
detect: capitalizeFirstLetter(key),
|
||||
speed: det["inference_speed"],
|
||||
}),
|
||||
color: "text-danger",
|
||||
relevantLink: "/system#general",
|
||||
});
|
||||
} else if (det["inference_speed"] > InferenceThreshold.warning) {
|
||||
problems.push({
|
||||
text: `${capitalizeFirstLetter(key)} is slow (${det["inference_speed"]} ms)`,
|
||||
text: t("stats.detectIsSlow", {
|
||||
detect: capitalizeFirstLetter(key),
|
||||
speed: det["inference_speed"],
|
||||
}),
|
||||
color: "text-orange-400",
|
||||
relevantLink: "/system#general",
|
||||
});
|
||||
@ -57,7 +63,9 @@ export default function useStats(stats: FrigateStats | undefined) {
|
||||
|
||||
if (config.cameras[name].enabled && cam["camera_fps"] == 0) {
|
||||
problems.push({
|
||||
text: `${capitalizeFirstLetter(name.replaceAll("_", " "))} is offline`,
|
||||
text: t("stats.cameraIsOffline", {
|
||||
camera: capitalizeFirstLetter(name.replaceAll("_", " ")),
|
||||
}),
|
||||
color: "text-danger",
|
||||
relevantLink: "logs",
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user