This is an automated email from the ASF dual-hosted git repository.

bbovenzi pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new a9776d3  Remove loading dots even when last run data is empty (#18230)
a9776d3 is described below

commit a9776d36ca46d57a8da2fe931ce91a2847322345
Author: Brent Bovenzi <[email protected]>
AuthorDate: Tue Sep 14 11:53:59 2021 +0200

    Remove loading dots even when last run data is empty (#18230)
    
    Loading dots are displayed on the last run column while we get the last run 
data for each dag.
    But the dots are only removed if there actually is data. But if you haven't 
had any dag runs yet it would always appear to be loading. Instead the loading 
dots should be removed even when the response is empty.
---
 airflow/www/static/js/dags.js | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/airflow/www/static/js/dags.js b/airflow/www/static/js/dags.js
index a388564..628c564 100644
--- a/airflow/www/static/js/dags.js
+++ b/airflow/www/static/js/dags.js
@@ -151,6 +151,7 @@ function blockedHandler(error, json) {
 }
 
 function lastDagRunsHandler(error, json) {
+  $('.js-loading-last-run').remove();
   Object.keys(json).forEach((safeDagId) => {
     const dagId = json[safeDagId].dag_id;
     const executionDate = json[safeDagId].execution_date;
@@ -165,9 +166,6 @@ function lastDagRunsHandler(error, json) {
     g.selectAll('span')
       .style('display', null)
       .attr('data-lastrun', JSON.stringify(json[safeDagId]));
-
-    g.selectAll('.js-loading-last-run').remove();
-    $('.js-loading-last-run').remove();
   });
 }
 

Reply via email to