You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by bb...@apache.org on 2022/04/14 14:44:38 UTC

[airflow] branch fix-graph-mapped-label created (now f0606b8e09)

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

bbovenzi pushed a change to branch fix-graph-mapped-label
in repository https://gitbox.apache.org/repos/asf/airflow.git


      at f0606b8e09 Make sure all mapped nodes are updated.

This branch includes the following new commits:

     new f0606b8e09 Make sure all mapped nodes are updated.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[airflow] 01/01: Make sure all mapped nodes are updated.

Posted by bb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

bbovenzi pushed a commit to branch fix-graph-mapped-label
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit f0606b8e0987e3b229f2ef4f7363ff79ef074e63
Author: Brent Bovenzi <br...@gmail.com>
AuthorDate: Thu Apr 14 10:43:09 2022 -0400

    Make sure all mapped nodes are updated.
---
 airflow/www/static/js/graph.js | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/airflow/www/static/js/graph.js b/airflow/www/static/js/graph.js
index ea7fc10cb7..ecdcb921a9 100644
--- a/airflow/www/static/js/graph.js
+++ b/airflow/www/static/js/graph.js
@@ -102,7 +102,12 @@ const updateNodeLabels = (node, instances) => {
     haveLabelsChanged = true;
   }
 
-  if (node.children) return node.children.some((n) => updateNodeLabels(n, instances));
+  if (node.children) {
+    // Iterate through children and return true if at least one has been changed
+    const updatedNodes = node.children.map((n) => updateNodeLabels(n, instances));
+    return updatedNodes.some((changed) => changed);
+  }
+
   return haveLabelsChanged;
 };