chore: Register dynamic plugins and add feature checks (#14650)

* chore: Register dynamic plugins and add feature checks

* Disable pylint warning
This commit is contained in:
Ben Reinhart
2021-05-17 11:18:56 -07:00
committed by GitHub
parent 9deb7aa3c1
commit eb9dafc872
3 changed files with 63 additions and 9 deletions

View File

@@ -274,15 +274,17 @@ class SupersetAppInitializer:
category="",
category_icon="",
)
if feature_flag_manager.is_feature_enabled("DYNAMIC_PLUGINS"):
appbuilder.add_view(
DynamicPluginsView,
"Plugins",
label=__("Plugins"),
category="Manage",
category_label=__("Manage"),
icon="fa-puzzle-piece",
)
appbuilder.add_view(
DynamicPluginsView,
"Plugins",
label=__("Plugins"),
category="Manage",
category_label=__("Manage"),
icon="fa-puzzle-piece",
menu_cond=lambda: feature_flag_manager.is_feature_enabled(
"DYNAMIC_PLUGINS"
),
)
appbuilder.add_view(
CssTemplateModelView,
"CSS Templates",