vincbeck commented on code in PR #34317:
URL: https://github.com/apache/airflow/pull/34317#discussion_r1358503642


##########
airflow/www/extensions/init_jinja_globals.py:
##########
@@ -69,10 +70,13 @@ def prepare_jinja_globals():
             "git_version": git_version,
             "k8s_or_k8scelery_executor": IS_K8S_OR_K8SCELERY_EXECUTOR,
             "rest_api_enabled": False,
-            "auth_manager": get_auth_manager(),
             "config_test_connection": conf.get("core", "test_connection", 
fallback="Disabled"),
         }
 
+        # Extra global specific to auth manager
+        extra_globals["auth_manager"] = get_auth_manager()
+        extra_globals["DagDetails"] = DagDetails

Review Comment:
   ~~From the tests it does not seem to work:~~



##########
airflow/www/extensions/init_jinja_globals.py:
##########
@@ -69,10 +70,13 @@ def prepare_jinja_globals():
             "git_version": git_version,
             "k8s_or_k8scelery_executor": IS_K8S_OR_K8SCELERY_EXECUTOR,
             "rest_api_enabled": False,
-            "auth_manager": get_auth_manager(),
             "config_test_connection": conf.get("core", "test_connection", 
fallback="Disabled"),
         }
 
+        # Extra global specific to auth manager
+        extra_globals["auth_manager"] = get_auth_manager()
+        extra_globals["DagDetails"] = DagDetails

Review Comment:
   ~~It seems `dag.html` is also used to render individual DAG in a view where 
there are multiple DAGs. Therefore, there is no `kwargs['dag']` but 
`kwargs['dags']`. I reverted the changes unless there is a better solution~~



-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to