From e83f97a05ade2fca042b546cae961a5797a83ac9 Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Tue, 8 Sep 2026 15:33:31 -0700 Subject: [PATCH] add function to translate docker state to palette keys --- client/src/Utils/MonitorUtils.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/client/src/Utils/MonitorUtils.ts b/client/src/Utils/MonitorUtils.ts index cdc85ac84..c8bbca168 100644 --- a/client/src/Utils/MonitorUtils.ts +++ b/client/src/Utils/MonitorUtils.ts @@ -40,6 +40,14 @@ export const getStatusPalette = (status: MonitorStatus): PaletteKey => { return "warning"; }; +export const getDockerPalette = (dockerState: DockerContainerState): PaletteKey => { + if (dockerState === "created") return "success"; + if (dockerState === "running") return "success"; + if (dockerState === "dead") return "error"; + if (dockerState === "exited") return "error"; + return "warning"; +}; + export const getValuePalette = (value: ValueType): PaletteKey => { const paletteMap: Record = { positive: "success",