This is an automated email from the ASF dual-hosted git repository.
kaxilnaik pushed a commit to branch v1-10-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/v1-10-test by this push:
new 8259de8 Ensure "started"/"ended" in tooltips are not shown if job not
started (#8667)
8259de8 is described below
commit 8259de88a0074508a6fd83ea29c9c617b4204471
Author: Xiaodong DENG <[email protected]>
AuthorDate: Sat May 2 21:12:06 2020 +0200
Ensure "started"/"ended" in tooltips are not shown if job not started
(#8667)
(cherry-picked from 0954140)
---
airflow/www_rbac/static/js/task-instances.js | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/airflow/www_rbac/static/js/task-instances.js
b/airflow/www_rbac/static/js/task-instances.js
index 8b49700..8b25c4f 100644
--- a/airflow/www_rbac/static/js/task-instances.js
+++ b/airflow/www_rbac/static/js/task-instances.js
@@ -30,6 +30,10 @@ 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);
@@ -37,11 +41,6 @@ function generateTooltipDateTimes(startDate, endDate, dagTZ)
{
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);