Skip to content

Commit

Permalink
Missed some!
Browse files Browse the repository at this point in the history
  • Loading branch information
jedcunningham committed Mar 11, 2025
1 parent 44d8e79 commit 6d6c9ae
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
4 changes: 3 additions & 1 deletion airflow/ui/src/pages/MappedTaskInstance/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ export const Header = ({
...entries,
{ label: "Start", value: <Time datetime={taskInstance.start_date} /> },
{ label: "End", value: <Time datetime={taskInstance.end_date} /> },
{ label: "Duration", value: `${getDuration(taskInstance.start_date, taskInstance.end_date)}s` },
...(Boolean(taskInstance.start_date)
? [{ label: "Duration", value: `${getDuration(taskInstance.start_date, taskInstance.end_date)}s` }]
: []),
];

return (
Expand Down
8 changes: 3 additions & 5 deletions airflow/ui/src/pages/TaskInstance/Details.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,9 @@ export const Details = () => {
<Table.Row>
<Table.Cell>Duration</Table.Cell>
<Table.Cell>
{
// eslint-disable-next-line unicorn/no-null
getDuration(tryInstance?.start_date ?? null, tryInstance?.end_date ?? null)
}
s
{Boolean(tryInstance?.start_date) // eslint-disable-next-line unicorn/no-null
? `${getDuration(tryInstance?.start_date ?? null, tryInstance?.end_date ?? null)}s`
: ""}
</Table.Cell>
</Table.Row>
<Table.Row>
Expand Down
3 changes: 2 additions & 1 deletion airflow/ui/src/pages/TaskInstances/TaskInstances.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ const taskInstanceColumns = (
header: "Operator",
},
{
cell: ({ row: { original } }) => `${getDuration(original.start_date, original.end_date)}s`,
cell: ({ row: { original } }) =>
Boolean(original.start_date) ? `${getDuration(original.start_date, original.end_date)}s` : "",
header: "Duration",
},
{
Expand Down

0 comments on commit 6d6c9ae

Please sign in to comment.