fix: add system missing keys

This commit is contained in:
ZhaiSoul 2025-03-13 00:24:13 +08:00
parent 42e25e6470
commit 6a7bdd9894
3 changed files with 9 additions and 1 deletions

View File

@ -71,5 +71,8 @@
"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)"
},
"features": {
"title": "Features"
} }
} }

View File

@ -71,5 +71,8 @@
"detectHighCpuUsage": "{{camera}} 的 探测 CPU 使用率较高({{detectAvg}}%", "detectHighCpuUsage": "{{camera}} 的 探测 CPU 使用率较高({{detectAvg}}%",
"healthy": "系统运行正常", "healthy": "系统运行正常",
"reindexingEmbeddings": "正在重新索引嵌入(已完成 {{processed}}%" "reindexingEmbeddings": "正在重新索引嵌入(已完成 {{processed}}%"
},
"features": {
"title": "功能"
} }
} }

View File

@ -6,6 +6,7 @@ import { EmbeddingThreshold } from "@/types/graph";
import { Skeleton } from "@/components/ui/skeleton"; import { Skeleton } from "@/components/ui/skeleton";
import { ThresholdBarGraph } from "@/components/graph/SystemGraph"; import { ThresholdBarGraph } from "@/components/graph/SystemGraph";
import { cn } from "@/lib/utils"; import { cn } from "@/lib/utils";
import { useTranslation } from "react-i18next";
type FeatureMetricsProps = { type FeatureMetricsProps = {
lastUpdated: number; lastUpdated: number;
@ -16,6 +17,7 @@ export default function FeatureMetrics({
setLastUpdated, setLastUpdated,
}: FeatureMetricsProps) { }: FeatureMetricsProps) {
// stats // stats
const { t } = useTranslation(["views/system"]);
const { data: initialStats } = useSWR<FrigateStats[]>( const { data: initialStats } = useSWR<FrigateStats[]>(
["stats/history", { keys: "embeddings,service" }], ["stats/history", { keys: "embeddings,service" }],
@ -87,7 +89,7 @@ export default function FeatureMetrics({
<> <>
<div className="scrollbar-container mt-4 flex size-full flex-col overflow-y-auto"> <div className="scrollbar-container mt-4 flex size-full flex-col overflow-y-auto">
<div className="text-sm font-medium text-muted-foreground"> <div className="text-sm font-medium text-muted-foreground">
Features {t("features.title")}
</div> </div>
<div <div
className={cn( className={cn(