feng-tao commented on a change in pull request #4761: [AIRFLOW-3942] Expose FAB
args to plugins
URL: https://github.com/apache/airflow/pull/4761#discussion_r261494390
##########
File path: airflow/www/app.py
##########
@@ -151,15 +152,18 @@ def integrate_plugins():
for v in flask_appbuilder_views:
log.debug("Adding view %s", v["name"])
- appbuilder.add_view(v["view"],
- v["name"],
- category=v["category"])
+ if 'view' in v:
+ v['baseview'] = v.pop('view')
+ warnings.warn(
+ "AirflowPlugin.flask_appbuilder_views[]
dictionaries should use 'baseview' instead of 'view. "
+ "Using 'view' has been deprecated and will be
removed in future versions.",
+ DeprecationWarning,
+ )
+
+ appbuilder.add_view(**v)
for ml in sorted(flask_appbuilder_menu_links, key=lambda x:
x["name"]):
log.debug("Adding menu link %s", ml["name"])
- appbuilder.add_link(ml["name"],
- href=ml["href"],
- category=ml["category"],
- category_icon=ml["category_icon"])
+ appbuilder.add_link(**ml)
Review comment:
same
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services