You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by as...@apache.org on 2021/05/17 22:22:25 UTC
[airflow] 01/02: Fix task search function in Graph view (#15901)
This is an automated email from the ASF dual-hosted git repository.
ash pushed a commit to branch v2-1-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
commit cc80dbd0d0baab479ee4d8355c96ef966de15534
Author: Brent Bovenzi <br...@gmail.com>
AuthorDate: Mon May 17 16:59:11 2021 -0400
Fix task search function in Graph view (#15901)
(cherry picked from commit d88d1174eb4341daff2968c59f4cab204130a03f)
---
airflow/www/static/js/graph.js | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/airflow/www/static/js/graph.js b/airflow/www/static/js/graph.js
index 2bba4a8..6482d91 100644
--- a/airflow/www/static/js/graph.js
+++ b/airflow/www/static/js/graph.js
@@ -299,7 +299,7 @@ d3.select('#searchbox').on('keyup', () => {
setFocusMap();
}
- d3.selectAll('g.nodes g.node').forEach(function highlight(d) {
+ d3.selectAll('g.nodes g.node').filter(function highlight(d) {
if (s === '') {
d3.selectAll('g.edgePaths, g.edgeLabel').attr('data-highlight', null);
d3.select(this).attr('data-highlight', null);
@@ -312,6 +312,8 @@ d3.select('#searchbox').on('keyup', () => {
d3.select(this).attr('data-highlight', 'fade');
}
}
+ // We don't actually use the returned results from filter
+ return null;
});
// This moves the matched node to the center of the graph area