You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/10/27 14:34:41 UTC

[GitHub] [airflow] ryw commented on a change in pull request #11842: Updating 2.0 docs

ryw commented on a change in pull request #11842:
URL: https://github.com/apache/airflow/pull/11842#discussion_r512743897



##########
File path: UPDATING.md
##########
@@ -70,72 +70,9 @@ The DAG-level permission actions, `can_dag_read` and `can_dag_edit` are going aw
 
 When DAGs are initialized with the `access_control` variable set, any usage of the old permission names will automatically be updated in the database, so this won't be a breaking change. A DeprecationWarning will be raised.
 
-### Changes to Airflow Plugins
 
-If you are using Airflow Plugins and were passing `admin_views` & `menu_links` which were used in the
-non-RBAC UI (`flask-admin` based UI), upto it to use `flask_appbuilder_views` and `flask_appbuilder_menu_links`.
 
 
-**Old**:
-
-```python
-from airflow.plugins_manager import AirflowPlugin
-
-from flask_admin import BaseView, expose
-from flask_admin.base import MenuLink
-
-
-class TestView(BaseView):
-    @expose('/')
-    def test(self):
-        # in this example, put your test_plugin/test.html template at airflow/plugins/templates/test_plugin/test.html
-        return self.render("test_plugin/test.html", content="Hello galaxy!")
-v = TestView(category="Test Plugin", name="Test View")
-
-ml = MenuLink(
-    category='Test Plugin',
-    name='Test Menu Link',
-    url='https://airflow.apache.org/')
-
-
-class AirflowTestPlugin(AirflowPlugin):
-    admin_views = [v]
-    menu_links = [ml]
-```
-
-**Change it to**:
-
-```python
-from airflow.plugins_manager import AirflowPlugin
-from flask_appbuilder import expose, BaseView as AppBuilderBaseView
-
-
-class TestAppBuilderBaseView(AppBuilderBaseView):
-    default_view = "test"
-
-    @expose("/")
-    def test(self):
-        return self.render("test_plugin/test.html", content="Hello galaxy!")
-
-v_appbuilder_view = TestAppBuilderBaseView()
-v_appbuilder_package = {"name": "Test View",
-                        "category": "Test Plugin",
-                        "view": v_appbuilder_view}
-
-# Creating a flask appbuilder Menu Item
-appbuilder_mitem = {"name": "Google",
-                    "category": "Search",
-                    "category_icon": "fa-th",
-                    "href": "https://www.google.com"}
-
-
-# Defining the plugin class
-class AirflowTestPlugin(AirflowPlugin):
-    name = "test_plugin"
-    appbuilder_views = [v_appbuilder_package]
-    appbuilder_menu_items = [appbuilder_mitem]
-```
-
 ## Airflow 2.0.0a1

Review comment:
       not sure we should include "a1" here




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

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