Skip to content

Commit

Permalink
Ensure "started"/"ended" in tooltips are not shown if job not started (
Browse files Browse the repository at this point in the history
  • Loading branch information
XD-DENG authored May 2, 2020
1 parent d92e848 commit 0954140
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions airflow/www/static/js/task-instances.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,16 @@ function makeDateTimeHTML(start, end) {
}

function generateTooltipDateTimes(startDate, endDate, dagTZ) {
if (!startDate) {
return '<br><em>Not yet started</em>';
}

const tzFormat = 'z (Z)';
const localTZ = moment.defaultZone.name;
startDate = moment.utc(startDate);
endDate = moment.utc(endDate);
dagTZ = dagTZ.toUpperCase();

// Generate UTC Start and End Date
if (!startDate) {
return '<br><em>Not yet started</em>';
}

// Generate UTC Start and End Date
let tooltipHTML = `<br><strong>UTC:</strong><br>`;
tooltipHTML += makeDateTimeHTML(startDate, endDate);
Expand Down

0 comments on commit 0954140

Please sign in to comment.