Skip to content

Commit

Permalink
Handle undefined data interval in grid runs (#23265)
Browse files Browse the repository at this point in the history
  • Loading branch information
bbovenzi authored Apr 26, 2022
1 parent 9e2531f commit 1d875a4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 15 deletions.
4 changes: 2 additions & 2 deletions airflow/www/static/js/tree/dagRuns/Tooltip.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import Time from '../Time';

const DagRunTooltip = ({
dagRun: {
state, duration, dataIntervalEnd,
state, duration, dataIntervalStart, executionDate,
},
}) => (
<Box py="2px">
Expand All @@ -37,7 +37,7 @@ const DagRunTooltip = ({
<Text whiteSpace="nowrap">
Run:
{' '}
<Time dateTime={dataIntervalEnd} />
<Time dateTime={dataIntervalStart || executionDate} />
</Text>
<Text>
Duration:
Expand Down
29 changes: 16 additions & 13 deletions airflow/www/static/js/tree/details/content/dagRun/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,19 +126,22 @@ const DagRun = ({ runId }) => {
<Time dateTime={endDate} />
</Text>
)}
<br />
<Text as="strong">Data Interval:</Text>
<Text>
Start:
{' '}
<Time dateTime={dataIntervalStart} />
</Text>
<Text>
End:
{' '}
<Time dateTime={dataIntervalEnd} />
</Text>

{dataIntervalStart && dataIntervalEnd && (
<>
<br />
<Text as="strong">Data Interval:</Text>
<Text>
Start:
{' '}
<Time dateTime={dataIntervalStart} />
</Text>
<Text>
End:
{' '}
<Time dateTime={dataIntervalEnd} />
</Text>
</>
)}
</Box>
);
};
Expand Down

0 comments on commit 1d875a4

Please sign in to comment.