extract strings

This commit is contained in:
Alex Holliday committed 2026-08-31 12:11:09 -07:00
1 parent fc9d2fe69d
commit f10fb452ba
4 files changed
+27 -12

No files matched your search

@@ -44,7 +44,7 @@ export const DockerContainersTable = ({ containers }: DockerContainersTableProps
const headers: Header<DockerContainerInfo>[] = [ const headers: Header<DockerContainerInfo>[] = [
{ {
id: "container", id: "container",
content: "Containers", content: t("pages.docker.host.table.headers.container"),
render: (row) => { render: (row) => {
return ( return (
<DockerStateLabel <DockerStateLabel
@@ -57,35 +57,35 @@ export const DockerContainersTable = ({ containers }: DockerContainersTableProps
}, },
{ {
id: "status", id: "status",
content: "Status", content: t("common.table.headers.status"),
render: (row) => { render: (row) => {
return <Typography>{row.state}</Typography>; return <Typography>{row.state}</Typography>;
}, },
}, },
{ {
id: "health", id: "health",
content: "Health", content: t("pages.docker.host.table.headers.health"),
render: (row) => { render: (row) => {
return <Typography>{row.health}</Typography>; return <Typography>{row.health}</Typography>;
}, },
}, },
{ {
id: "cpu", id: "cpu",
content: "CPU", content: t("pages.docker.host.table.headers.cpu"),
render: (row) => { render: (row) => {
return <Typography>{formatPercentage(row.cpuPct ?? 0)}</Typography>; return <Typography>{formatPercentage(row.cpuPct ?? 0)}</Typography>;
}, },
}, },
{ {
id: "memory", id: "memory",
content: "Memory", content: t("pages.docker.host.table.headers.memory"),
render: (row) => { render: (row) => {
return <Typography>{formatPercentage(row.memoryPct ?? 0)}</Typography>; return <Typography>{formatPercentage(row.memoryPct ?? 0)}</Typography>;
}, },
}, },
{ {
id: "restarts", id: "restarts",
content: "Restarts", content: t("pages.docker.host.table.headers.restarts"),
render: (row) => { render: (row) => {
return <Typography>{row.restartCount}</Typography>; return <Typography>{row.restartCount}</Typography>;
}, },
@@ -9,7 +9,6 @@ import { useTheme } from "@mui/material";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
// Utils // Utils
import prettyBytes from "pretty-bytes";
export const DockerStatusBoxes = ({ stats }: { stats: DockerStats | undefined }) => { export const DockerStatusBoxes = ({ stats }: { stats: DockerStats | undefined }) => {
const { t } = useTranslation(); const { t } = useTranslation();
@@ -26,21 +25,21 @@ export const DockerStatusBoxes = ({ stats }: { stats: DockerStats | undefined })
flexWrap={"wrap"} flexWrap={"wrap"}
> >
<StatBox <StatBox
title={"Containers"} title={t("pages.docker.host.statBoxes.containers")}
subtitle={String(total)} subtitle={String(total)}
/> />
<StatBox <StatBox
title={"Running"} title={t("pages.docker.host.statBoxes.running")}
subtitle={String(running)} subtitle={String(running)}
/> />
<StatBox <StatBox
title={"Stopped"} title={t("pages.docker.host.statBoxes.stopped")}
subtitle={String(stopped)} subtitle={String(stopped)}
/> />
<StatBox <StatBox
title={"Unhealthy"} title={t("pages.docker.host.statBoxes.unhealthy")}
subtitle={String(unhealthy)} subtitle={String(unhealthy)}
/> />
</Stack> </Stack>
-1
View File
@@ -2,7 +2,6 @@ import type { MonitorStatus, MonitorType } from "@/Types/Monitor";
import type { PaletteKey } from "@/Utils/Theme/Theme"; import type { PaletteKey } from "@/Utils/Theme/Theme";
import type { ValueType } from "@/Components/design-elements/StatusLabel"; import type { ValueType } from "@/Components/design-elements/StatusLabel";
import type { DockerContainerState } from "@/Types/Check"; import type { DockerContainerState } from "@/Types/Check";
import type { Doc } from "zod/v4/core";
export const getMonitorPath = (type: MonitorType): string => { export const getMonitorPath = (type: MonitorType): string => {
const pathMap: Record<MonitorType, string> = { const pathMap: Record<MonitorType, string> = {
+17
View File
@@ -941,6 +941,23 @@
"containers": "Containers" "containers": "Containers"
}, },
"containersRunning": "{{running}} of {{total}} running" "containersRunning": "{{running}} of {{total}} running"
},
"host": {
"statBoxes": {
"containers": "Containers",
"running": "Running",
"stopped": "Stopped",
"unhealthy": "Unhealthy"
},
"table": {
"headers": {
"container": "Containers",
"health": "Health",
"cpu": "CPU",
"memory": "Memory",
"restarts": "Restarts"
}
}
} }
}, },
"infrastructure": { "infrastructure": {