Skip to content

Commit

Permalink
fix(ui): Add missing workflow states (#552)
Browse files Browse the repository at this point in the history
  • Loading branch information
daryllimyt authored Nov 26, 2024
1 parent fde3c1c commit a9fb0e1
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions frontend/src/components/executions/nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import {
workflowExecutionsTerminateWorkflowExecution,
} from "@/client"
import {
AlarmClockOffIcon,
CircleArrowRightIcon,
CircleCheck,
CircleMinusIcon,
CircleX,
Expand Down Expand Up @@ -208,6 +210,10 @@ export function getExecutionStatusIcon(
className?: string
) {
switch (status) {
case "RUNNING":
return (
<Loader2 className={cn("animate-spin stroke-blue-500/50", className)} />
)
case "COMPLETED":
return (
<CircleCheck
Expand All @@ -219,20 +225,29 @@ export function getExecutionStatusIcon(
)
case "FAILED":
return <CircleX className={cn("fill-rose-500 stroke-white", className)} />
case "RUNNING":
case "CANCELED":
return (
<Loader2 className={cn("animate-spin stroke-blue-500/50", className)} />
<CircleMinusIcon
className={cn("fill-orange-500 stroke-white", className)}
/>
)
case "TERMINATED":
return (
<CircleMinusIcon
className={cn("fill-rose-500 stroke-white", className)}
/>
)
case "CANCELED":
case "CONTINUED_AS_NEW":
return (
<CircleMinusIcon
className={cn("fill-orange-500 stroke-white", className)}
<CircleArrowRightIcon
className={cn("fill-blue-500 stroke-white", className)}
/>
)
case "TIMED_OUT":
return (
<AlarmClockOffIcon
className={cn("stroke-rose-500", className)}
strokeWidth={2}
/>
)
default:
Expand Down

0 comments on commit a9fb0e1

Please sign in to comment.