Skip to content

Commit

Permalink
Merge pull request #992 from traPtitech/fix/container-status-ui
Browse files Browse the repository at this point in the history
Exit code 0 の container をエラーと表示しない
  • Loading branch information
pirosiki197 authored Jan 2, 2025
2 parents bbd4b47 + 98b2b66 commit 174f121
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions dashboard/src/libs/application.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions pkg/domain/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

Expand Down

0 comments on commit 174f121

Please sign in to comment.