This is an automated email from the ASF dual-hosted git repository.
pierrejeambrun pushed a commit to branch v2-10-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/v2-10-test by this push:
new 91b9b0b6f9c Add link to show task in a DAG in DAG Dependencies view
(#47721)
91b9b0b6f9c is described below
commit 91b9b0b6f9c348205b1d1eb9c867560787bd68bb
Author: Maksim <[email protected]>
AuthorDate: Mon Mar 17 12:08:20 2025 -0700
Add link to show task in a DAG in DAG Dependencies view (#47721)
---
airflow/www/static/js/dag_dependencies.js | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/airflow/www/static/js/dag_dependencies.js
b/airflow/www/static/js/dag_dependencies.js
index a3c4a713eac..e1af621a1bb 100644
--- a/airflow/www/static/js/dag_dependencies.js
+++ b/airflow/www/static/js/dag_dependencies.js
@@ -18,7 +18,7 @@
*/
/*
- global d3, localStorage, dagreD3, dagNodes, edges, arrange, document,
+ global d3, localStorage, dagreD3, dagNodes, edges, arrange, document, window,
*/
const highlightColor = "#000000";
@@ -224,6 +224,15 @@ const renderGraph = () => {
innerSvg.call(render, g);
setUpNodeHighlighting();
setUpZoomSupport();
+
+ g.nodes().forEach((nodeId) => {
+ const node = g.node(nodeId);
+ if (node.class === "dag") {
+ d3.select(node.elem).on("click", () => {
+ window.location.href = `/dags/${node.label}/grid?tab=graph`;
+ });
+ }
+ });
};
// rerender graph when filtering dags with dependencies or not