Skip to content

Commit

Permalink
Use current time to calculate duration when end date is not present. (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
tirkarthi authored Mar 21, 2024
1 parent 7fcc1b4 commit 6fa7b72
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions airflow/www/static/js/dag/details/dag/RunDurationChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,7 @@ const RunDurationChart = ({ showLandingTimes }: Props) => {

// @ts-ignore
const runDuration = moment.duration(
dagRun.startDate && dagRun.endDate
? getDuration(dagRun.startDate, dagRun?.endDate)
: 0
dagRun.startDate ? getDuration(dagRun.startDate, dagRun?.endDate) : 0
);

// @ts-ignore
Expand Down
2 changes: 1 addition & 1 deletion airflow/www/static/js/dag/details/task/TaskDuration.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const TaskDuration = () => {
if (!instance) return {};
// @ts-ignore
const runDuration = moment.duration(
instance.startDate && instance.endDate
instance.startDate
? getDuration(instance.startDate, instance?.endDate)
: 0
);
Expand Down

0 comments on commit 6fa7b72

Please sign in to comment.