Skip to content

Commit

Permalink
Show successful failed job with a green progress bar
Browse files Browse the repository at this point in the history
  • Loading branch information
felixmosh committed Jun 28, 2021
1 parent a99688a commit 6654e22
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/ui/src/components/JobCard/JobCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ interface JobCardProps {
};
}

const greenStatuses = [STATUSES.active, STATUSES.completed];

export const JobCard = ({ job, status, actions, readOnlyMode }: JobCardProps) => (
<div className={s.card}>
<div className={s.sideInfo}>
Expand All @@ -40,7 +42,9 @@ export const JobCard = ({ job, status, actions, readOnlyMode }: JobCardProps) =>
{typeof job.progress === 'number' && (
<Progress
percentage={job.progress}
status={job.isFailed && status !== STATUSES.active ? STATUSES.failed : status}
status={
job.isFailed && !greenStatuses.includes(status as any) ? STATUSES.failed : status
}
className={s.progress}
/>
)}
Expand Down

0 comments on commit 6654e22

Please sign in to comment.