@@ -207,12 +207,14 @@ class DruidClusterModelView(DashedModelView, DeleteMixin): # noqa
207
207
edit_columns = add_columns
208
208
list_columns = ['cluster_name' , 'metadata_last_refreshed' ]
209
209
210
- appbuilder .add_view (
211
- DruidClusterModelView ,
212
- "Druid Clusters" ,
213
- icon = "fa-cubes" ,
214
- category = "Sources" ,
215
- category_icon = 'fa-database' ,)
210
+
211
+ if config ['DRUID_IS_ACTIVE' ]:
212
+ appbuilder .add_view (
213
+ DruidClusterModelView ,
214
+ "Druid Clusters" ,
215
+ icon = "fa-cubes" ,
216
+ category = "Sources" ,
217
+ category_icon = 'fa-database' ,)
216
218
217
219
218
220
class SliceModelView (DashedModelView , DeleteMixin ): # noqa
@@ -326,11 +328,12 @@ def post_add(self, datasource):
326
328
def post_update (self , datasource ):
327
329
self .post_add (datasource )
328
330
329
- appbuilder .add_view (
330
- DruidDatasourceModelView ,
331
- "Druid Datasources" ,
332
- category = "Sources" ,
333
- icon = "fa-cube" )
331
+ if config ['DRUID_IS_ACTIVE' ]:
332
+ appbuilder .add_view (
333
+ DruidDatasourceModelView ,
334
+ "Druid Datasources" ,
335
+ category = "Sources" ,
336
+ icon = "fa-cube" )
334
337
335
338
336
339
@app .route ('/health' )
@@ -778,12 +781,14 @@ def featured(self):
778
781
utils = utils )
779
782
780
783
appbuilder .add_view_no_menu (Dashed )
781
- appbuilder .add_link (
782
- "Refresh Druid Metadata" ,
783
- href = '/dashed/refresh_datasources/' ,
784
- category = 'Sources' ,
785
- category_icon = 'fa-database' ,
786
- icon = "fa-cog" )
784
+
785
+ if config ['DRUID_IS_ACTIVE' ]:
786
+ appbuilder .add_link (
787
+ "Refresh Druid Metadata" ,
788
+ href = '/dashed/refresh_datasources/' ,
789
+ category = 'Sources' ,
790
+ category_icon = 'fa-database' ,
791
+ icon = "fa-cog" )
787
792
788
793
789
794
class CssTemplateModelView (DashedModelView , DeleteMixin ):
0 commit comments