diff --git a/public/locales/en/common.json b/public/locales/en/common.json index c56fc3943..a29bccd1f 100755 --- a/public/locales/en/common.json +++ b/public/locales/en/common.json @@ -60,9 +60,15 @@ "tx": "TX", "mem": "MEM", "cpu": "CPU", + "running": "Running", "offline": "Offline", "error": "Error", - "unknown": "Unknown" + "unknown": "Unknown", + "starting": "Starting", + "unhealthy": "Unhealthy", + "not_found": "Not Found", + "exited": "Exited", + "partial": "Partial" }, "ping": { "error": "Error", @@ -365,7 +371,10 @@ "update_available": "Update Available", "up_to_date": "Up to Date", "child_bridges": "Child Bridges", - "child_bridges_status": "{{ok}}/{{total}}" + "child_bridges_status": "{{ok}}/{{total}}", + "up": "Up", + "pending": "Pending", + "down": "Down" }, "healthchecks": { "new": "New", diff --git a/src/components/services/status.jsx b/src/components/services/status.jsx index 0673806be..dba30f5b1 100644 --- a/src/components/services/status.jsx +++ b/src/components/services/status.jsx @@ -12,34 +12,43 @@ export default function Status({ service }) { } + let statusLabel = ""; + if (data && data.status?.includes("running")) { if (data.health === "starting") { return ( -
-
{data.health}
+
+
{t("docker.starting")}
); } if (data.health === "unhealthy") { return ( -
-
{data.health}
+
+
{t("docker.unhealthy")}
); } + if (!data.health) { + statusLabel = data.status.replace("running", t("docker.running")) + } + return ( -
-
{data.health || data.status}
+
+
{data.health || statusLabel}
); } - + if (data && (data.status === "not found" || data.status === "exited" || data.status?.startsWith("partial"))) { + if (data.status === "not found") statusLabel = t("docker.not_found") + else if (data.status === "exited") statusLabel = t("docker.exited") + else statusLabel = data.status.replace("partial", t("docker.partial")) return ( -
-
{data.status}
+
+
{statusLabel}
); } diff --git a/src/widgets/homebridge/component.jsx b/src/widgets/homebridge/component.jsx index a1e2f2e1d..c4f1624aa 100644 --- a/src/widgets/homebridge/component.jsx +++ b/src/widgets/homebridge/component.jsx @@ -29,7 +29,7 @@ export default function Component({ service }) {