pass palette to stat box for docker state
This commit is contained in:
1 parent
e83f97a05a
commit
ae4b851620
1 file changed
+3
@@ -10,6 +10,7 @@ import type { DockerContainerInfo } from "@/Types/Check";
|
|||||||
|
|
||||||
// Utils
|
// Utils
|
||||||
import { formatDuration } from "@/Utils/TimeUtils";
|
import { formatDuration } from "@/Utils/TimeUtils";
|
||||||
|
import { getDockerPalette } from "@/Utils/MonitorUtils";
|
||||||
|
|
||||||
export const DockerContainerStatusBoxes = ({
|
export const DockerContainerStatusBoxes = ({
|
||||||
container,
|
container,
|
||||||
@@ -24,6 +25,7 @@ export const DockerContainerStatusBoxes = ({
|
|||||||
const { state, restartCount, health } = container;
|
const { state, restartCount, health } = container;
|
||||||
const startedAt = container.startedAt ?? "0";
|
const startedAt = container.startedAt ?? "0";
|
||||||
const runningFor = Date.now() - new Date(startedAt).getTime();
|
const runningFor = Date.now() - new Date(startedAt).getTime();
|
||||||
|
const palette = getDockerPalette(state);
|
||||||
return (
|
return (
|
||||||
<Stack
|
<Stack
|
||||||
direction="row"
|
direction="row"
|
||||||
@@ -33,6 +35,7 @@ export const DockerContainerStatusBoxes = ({
|
|||||||
<StatBox
|
<StatBox
|
||||||
title={t("common.labels.state")}
|
title={t("common.labels.state")}
|
||||||
subtitle={state}
|
subtitle={state}
|
||||||
|
palette={palette}
|
||||||
/>
|
/>
|
||||||
<StatBox
|
<StatBox
|
||||||
title={t("common.labels.uptime")}
|
title={t("common.labels.uptime")}
|
||||||
|
|||||||
Reference in new issue
Block a user