diff --git a/web/src/components/graph/SystemGraph.tsx b/web/src/components/graph/SystemGraph.tsx index fcafeda22..eaf4ae226 100644 --- a/web/src/components/graph/SystemGraph.tsx +++ b/web/src/components/graph/SystemGraph.tsx @@ -11,7 +11,7 @@ import useSWR from "swr"; type ThresholdBarGraphProps = { graphId: string; - name: string; + name?: string; unit: string; threshold: Threshold; updateTimes: number[]; @@ -25,6 +25,7 @@ export function ThresholdBarGraph({ updateTimes, data, }: ThresholdBarGraphProps) { + const displayName = name || data[0]?.name || ""; const { data: config } = useSWR("config", { revalidateOnFocus: false, }); @@ -186,7 +187,7 @@ export function ThresholdBarGraph({ return (
-
{name}
+
{displayName}
{lastValue} {unit} diff --git a/web/src/components/overlay/CameraInfoDialog.tsx b/web/src/components/overlay/CameraInfoDialog.tsx index a15d9c590..fce1f6fd0 100644 --- a/web/src/components/overlay/CameraInfoDialog.tsx +++ b/web/src/components/overlay/CameraInfoDialog.tsx @@ -159,7 +159,9 @@ export default function CameraInfoDialog({
) : (
-
Audio:
+
+ {t("cameras.info.audio")} +
{t("cameras.info.codec")}{" "} diff --git a/web/src/views/system/GeneralMetrics.tsx b/web/src/views/system/GeneralMetrics.tsx index cdf35c28b..2bac7cd2b 100644 --- a/web/src/views/system/GeneralMetrics.tsx +++ b/web/src/views/system/GeneralMetrics.tsx @@ -548,7 +548,10 @@ export default function GeneralMetrics({ Object.entries(stats.processes).forEach(([key, procStats]) => { if (procStats.pid.toString() in stats.cpu_usages) { if (!(key in series)) { - series[key] = { name: key, data: [] }; + series[key] = { + name: t(`general.otherProcesses.series.${key}`), + data: [], + }; } const data = stats.cpu_usages[procStats.pid.toString()]?.cpu; @@ -563,7 +566,7 @@ export default function GeneralMetrics({ }); }); return Object.keys(series).length > 0 ? Object.values(series) : []; - }, [statsHistory]); + }, [statsHistory, t]); const otherProcessMemSeries = useMemo(() => { if (!statsHistory) { @@ -582,7 +585,10 @@ export default function GeneralMetrics({ Object.entries(stats.processes).forEach(([key, procStats]) => { if (procStats.pid.toString() in stats.cpu_usages) { if (!(key in series)) { - series[key] = { name: key, data: [] }; + series[key] = { + name: t(`general.otherProcesses.series.${key}`), + data: [], + }; } const data = stats.cpu_usages[procStats.pid.toString()]?.mem; @@ -597,7 +603,7 @@ export default function GeneralMetrics({ }); }); return Object.values(series); - }, [statsHistory]); + }, [statsHistory, t]); return ( <> @@ -964,11 +970,10 @@ export default function GeneralMetrics({
{t("general.otherProcesses.processCpuUsage")}
- {otherProcessCpuSeries.map((series) => ( + {otherProcessCpuSeries.map((series, index) => ( {t("general.otherProcesses.processMemoryUsage")}
- {otherProcessMemSeries.map((series) => ( + {otherProcessMemSeries.map((series, index) => (