feluelle commented on a change in pull request #8675:
URL: https://github.com/apache/airflow/pull/8675#discussion_r439272790



##########
File path: airflow/www/static/js/task-instances.js
##########
@@ -20,12 +20,18 @@
 /* global window, dagTZ, moment, convertSecsToHumanReadable */
 
 // We don't re-import moment again, otherwise webpack will include it twice in 
the bundle!
-import { defaultFormat, formatDateTime } from './datetime-utils';
 import { escapeHtml } from './base';
+import { defaultFormat, formatDateTime } from './datetime-utils';
 
 function makeDateTimeHTML(start, end) {
+  // check task ended or not
+  if (end && end instanceof moment) {
+    return (
+      `Started: ${start.format(defaultFormat)} <br> Ended: 
${end.format(defaultFormat)} <br>`
+    )
+  }
   return (
-    `Started: ${start.format(defaultFormat)} <br> Ended: 
${end.format(defaultFormat)} <br>`
+    `Started: ${start.format(defaultFormat)} <br> Ended: Not ended yet <br>`

Review comment:
       Or maybe don't display `Ended:` at all?
   ```suggestion
       `Started: ${start.format(defaultFormat)} <br>`
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to