Skip to content

Commit

Permalink
fix: sort job step by date
Browse files Browse the repository at this point in the history
  • Loading branch information
riwanou authored and raphaelcoeffic committed Oct 28, 2023
1 parent 484a0a9 commit f596241
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ui/src/components/jobs/JobLogs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ function JobLogs({ job }: Props) {
return <Empty />;
}

data?.sort((a, b) => (a.created_at < b.created_at ? -1 : 1));
const items = data?.map((logs, i) => ({
label: STATUS_MAP[logs.from],
key: logs.id,
showArrow: logs.std_out.length > 0,
collapsible: logs.std_out.length > 0 ? undefined : "icon" as CollapsibleType,
collapsible:
logs.std_out.length > 0 ? undefined : ("icon" as CollapsibleType),
extra: getStepDuration(data, i),
children: (
<TerminalOutput logs={logs.std_out} />
),
children: <TerminalOutput logs={logs.std_out} />,
}));

return (
Expand Down

0 comments on commit f596241

Please sign in to comment.