@@ -109,7 +109,7 @@ looks like:
109109 # A list of dictionaries containing FastAPI middleware factory objects and some metadata. See the example below.
110110 fastapi_root_middlewares = []
111111 # A list of dictionaries containing iframe views and some metadata. See the example below.
112- iframe_views = []
112+ external_views = []
113113
114114 # A callback to perform actions when Airflow starts and the plugin is loaded.
115115 # NOTE : Ensure your plugin has *args, and **kwargs in the method definition
@@ -195,18 +195,24 @@ definitions in Airflow.
195195 }
196196
197197 # Creating a iframe view that will be rendered in the Airflow UI.
198- iframe_view_with_metadata = {
198+ external_view_with_metadata = {
199199 " name" : " Name of the Iframe View as displayed in the UI" ,
200- # Source URL of the iframe . This URL can be templated using context variables, depending on the location where the iframe is rendered
201- # the context variables available will be different, i.e a subset of (DAG_ID, RUN_ID, TASK_ID, MAP_INDEX)
202- " src " : " https://example.com/{DAG_ID} /{RUN_ID} /{TASK_ID} " ,
200+ # Source URL of the external view . This URL can be templated using context variables, depending on the location where the external view is rendered
201+ # the context variables available will be different, i.e a subset of (DAG_ID, RUN_ID, TASK_ID, MAP_INDEX).
202+ " href " : " https://example.com/{DAG_ID} /{RUN_ID} /{TASK_ID} " ,
203203 # Destination of the iframe view. This is used to determine where the iframe will be loaded in the UI.
204- # Supported locations are Literal["nav", "dag", "dag_run", "task", "task_instance"]
204+ # Supported locations are Literal["nav", "dag", "dag_run", "task", "task_instance"], default to "nav".
205205 " destination" : " dag_run" ,
206206 # Optional icon, url to an svg file.
207207 " icon" : " https://example.com/icon.svg" ,
208- # Optional parameters, relative URL location when opening the iframe
209- " url_route" : " /my_iframe_view" ,
208+ # Optional dark icon for the dark theme, url to an svg file. If not provided, "icon" will be used for both light and dark themes.
209+ " icon_dark_mode" : " https://example.com/dark_icon.svg" ,
210+ # Optional parameters, relative URL location for the iframe rendering. If not provided, external view will be rendeded as an external link. Should
211+ # not contain a leading slash.
212+ " url_route" : " my_iframe_view" ,
213+ # Optional category, only relevant for destination "nav". This is used to group the external links in the navigation bar. We will match the existing
214+ # menus of ["browse", "docs", "admin", "user"] and if there's no match then create a new menu.
215+ " category" : " browse" ,
210216 }
211217
212218
@@ -216,7 +222,7 @@ definitions in Airflow.
216222 macros = [plugin_macro]
217223 fastapi_apps = [app_with_metadata]
218224 fastapi_root_middlewares = [middleware_with_metadata]
219- iframe_views = [iframe_view_with_metadata ]
225+ external_views = [external_view_with_metadata ]
220226
221227 .. seealso :: :doc:`/howto/define-extra-link`
222228
0 commit comments