Skip to content

Commit

Permalink
feat: add repeat label & change timeline text, #360
Browse files Browse the repository at this point in the history
  • Loading branch information
felixmosh committed Jan 11, 2022
1 parent 31681a4 commit ec6bef4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
6 changes: 6 additions & 0 deletions packages/ui/src/components/JobCard/JobCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ export const JobCard = ({ job, status, actions, readOnlyMode }: JobCardProps) =>
<h4>
{job.name}
{job.attempts > 0 && <span>attempt #{job.attempts + 1}</span>}
{!!job.opts?.repeat?.count && (
<span>
repeat {job.opts?.repeat?.count}
{!!job.opts?.repeat?.limit && ` / ${job.opts?.repeat?.limit}`}
</span>
)}
</h4>
{!readOnlyMode && <JobActions status={status} actions={actions} />}
</div>
Expand Down
8 changes: 2 additions & 6 deletions packages/ui/src/components/JobCard/Timeline/Timeline.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,8 @@ export const Timeline = function Timeline({ job, status }: { job: AppJob; status
</li>
{!!job.delay && job.delay > 0 && status === STATUSES.delayed && (
<li>
<small>Delayed for</small>
<time>
{formatDistance(job.timestamp || 0, (job.timestamp || 0) + job.delay, {
includeSeconds: true,
})}
</time>
<small>Will run at</small>
<time>{formatDate((job.timestamp || 0) + job.delay)}</time>
</li>
)}
{!!job.processedOn && (
Expand Down

0 comments on commit ec6bef4

Please sign in to comment.