mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-05 04:57:42 +03: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}}%)",
|
"ffmpegHighCpuUsage": "{{camera}} has high FFMPEG CPU usage ({{ffmpegAvg}}%)",
|
||||||
"detectHighCpuUsage": "{{camera}} has high detect CPU usage ({{detectAvg}}%)",
|
"detectHighCpuUsage": "{{camera}} has high detect CPU usage ({{detectAvg}}%)",
|
||||||
"healthy": "System is healthy",
|
"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": {
|
"enrichments": {
|
||||||
"title": "Enrichments",
|
"title": "Enrichments",
|
||||||
|
|||||||
@ -36,13 +36,19 @@ export default function useStats(stats: FrigateStats | undefined) {
|
|||||||
Object.entries(memoizedStats["detectors"]).forEach(([key, det]) => {
|
Object.entries(memoizedStats["detectors"]).forEach(([key, det]) => {
|
||||||
if (det["inference_speed"] > InferenceThreshold.error) {
|
if (det["inference_speed"] > InferenceThreshold.error) {
|
||||||
problems.push({
|
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",
|
color: "text-danger",
|
||||||
relevantLink: "/system#general",
|
relevantLink: "/system#general",
|
||||||
});
|
});
|
||||||
} else if (det["inference_speed"] > InferenceThreshold.warning) {
|
} else if (det["inference_speed"] > InferenceThreshold.warning) {
|
||||||
problems.push({
|
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",
|
color: "text-orange-400",
|
||||||
relevantLink: "/system#general",
|
relevantLink: "/system#general",
|
||||||
});
|
});
|
||||||
@ -57,7 +63,9 @@ export default function useStats(stats: FrigateStats | undefined) {
|
|||||||
|
|
||||||
if (config.cameras[name].enabled && cam["camera_fps"] == 0) {
|
if (config.cameras[name].enabled && cam["camera_fps"] == 0) {
|
||||||
problems.push({
|
problems.push({
|
||||||
text: `${capitalizeFirstLetter(name.replaceAll("_", " "))} is offline`,
|
text: t("stats.cameraIsOffline", {
|
||||||
|
camera: capitalizeFirstLetter(name.replaceAll("_", " ")),
|
||||||
|
}),
|
||||||
color: "text-danger",
|
color: "text-danger",
|
||||||
relevantLink: "logs",
|
relevantLink: "logs",
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user