Skip to content

Commit

Permalink
UI: Display deployed app's initial status as stopped instead of error
Browse files Browse the repository at this point in the history
When an app is first deployed on a device, while the device has not
yet signaled that the deployment is ready, the deployment has a `nil`
status.
It's probably more appealing for the user to see an assumed `STOPPED`
status for the deployment instead of an `ERROR` status.
Later work can iterate on this improvement and properly define the
initial stages where the deployment is first "sent" to the device, and
it later becomes "ready" to be started.

Signed-off-by: Davide Briani <[email protected]>
  • Loading branch information
davidebriani committed Nov 14, 2024
1 parent f130d6e commit 0bc0539
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/src/components/DeployedApplicationsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ const DeployedApplicationsTable = ({
/>
),
cell: ({ getValue }) => (
<DeploymentStatusComponent status={getValue() || "ERROR"} />
<DeploymentStatusComponent status={getValue() || "STOPPED"} />
),
}),
columnHelper.accessor((row) => row, {
Expand All @@ -322,7 +322,7 @@ const DeployedApplicationsTable = ({
),
cell: ({ getValue }) => (
<ActionButtons
status={getValue().status || "ERROR"}
status={getValue().status || "STOPPED"}
onStart={() => handleStartDeployedApplication(getValue().id)}
onStop={() => handleStopDeployedApplication(getValue().id)}
/>
Expand Down

0 comments on commit 0bc0539

Please sign in to comment.