From 5eced2d67cd506e644a6bfd8a0db64629bb11ad3 Mon Sep 17 00:00:00 2001 From: pirosiki197 Date: Fri, 3 Jan 2025 00:09:39 +0900 Subject: [PATCH 1/2] add documents for domain.ContainerState --- pkg/domain/backend.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkg/domain/backend.go b/pkg/domain/backend.go index be5d38025..8d4aeed18 100644 --- a/pkg/domain/backend.go +++ b/pkg/domain/backend.go @@ -31,12 +31,19 @@ type Container struct { type ContainerState int const ( + // ContainerStateMissing indicates that the container is not running. ContainerStateMissing ContainerState = iota + // ContainerStateStarting indicates that the container is starting. ContainerStateStarting + // ContainerStateRestarting indicates that the container is restarting. ContainerStateRestarting + // ContainerStateRunning indicates that the container is running. ContainerStateRunning + // ContainerStateExited indicates that the container has exited with code 0. ContainerStateExited + // ContainerStateErrored indicates that the container has exited with a non-zero code. ContainerStateErrored + // ContainerStateUnknown indicates that the container state is unknown. ContainerStateUnknown ) From 98b2b66550963752d14b480830af428cb4c479a1 Mon Sep 17 00:00:00 2001 From: pirosiki197 Date: Fri, 3 Jan 2025 00:36:49 +0900 Subject: [PATCH 2/2] fix: show idle icon for exited containers --- dashboard/src/libs/application.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/dashboard/src/libs/application.tsx b/dashboard/src/libs/application.tsx index 7facb549c..82636e6e3 100644 --- a/dashboard/src/libs/application.tsx +++ b/dashboard/src/libs/application.tsx @@ -57,6 +57,7 @@ export const deploymentState = (app: Application): ApplicationState => { return ApplicationState.Running case Application_ContainerState.RESTARTING: case Application_ContainerState.EXITED: + return ApplicationState.Idle case Application_ContainerState.ERRORED: case Application_ContainerState.UNKNOWN: return ApplicationState.Error