mirror of
https://github.com/apache/superset.git
synced 2024-09-12 08:39:45 -04:00
Adding a DRUID_IS_ACTIVE flag and changing nav bar
This commit is contained in:
parent
10a1eddaa7
commit
fee6b3fafa
@ -53,6 +53,7 @@ APP_NAME = "Dashed"
|
|||||||
# tz.tzutc() : Using utc timezone
|
# tz.tzutc() : Using utc timezone
|
||||||
# tz.tzlocal() : Using local timezone
|
# tz.tzlocal() : Using local timezone
|
||||||
# other tz can be overridden by providing a local_config
|
# other tz can be overridden by providing a local_config
|
||||||
|
DRUID_IS_ACTIVE = True
|
||||||
DRUID_TZ = tz.tzutc()
|
DRUID_TZ = tz.tzutc()
|
||||||
|
|
||||||
# ----------------------------------------------------
|
# ----------------------------------------------------
|
||||||
|
@ -207,12 +207,14 @@ class DruidClusterModelView(DashedModelView, DeleteMixin): # noqa
|
|||||||
edit_columns = add_columns
|
edit_columns = add_columns
|
||||||
list_columns = ['cluster_name', 'metadata_last_refreshed']
|
list_columns = ['cluster_name', 'metadata_last_refreshed']
|
||||||
|
|
||||||
appbuilder.add_view(
|
|
||||||
DruidClusterModelView,
|
if config['DRUID_IS_ACTIVE']:
|
||||||
"Druid Clusters",
|
appbuilder.add_view(
|
||||||
icon="fa-cubes",
|
DruidClusterModelView,
|
||||||
category="Sources",
|
"Druid Clusters",
|
||||||
category_icon='fa-database',)
|
icon="fa-cubes",
|
||||||
|
category="Sources",
|
||||||
|
category_icon='fa-database',)
|
||||||
|
|
||||||
|
|
||||||
class SliceModelView(DashedModelView, DeleteMixin): # noqa
|
class SliceModelView(DashedModelView, DeleteMixin): # noqa
|
||||||
@ -326,11 +328,12 @@ class DruidDatasourceModelView(DashedModelView, DeleteMixin): # noqa
|
|||||||
def post_update(self, datasource):
|
def post_update(self, datasource):
|
||||||
self.post_add(datasource)
|
self.post_add(datasource)
|
||||||
|
|
||||||
appbuilder.add_view(
|
if config['DRUID_IS_ACTIVE']:
|
||||||
DruidDatasourceModelView,
|
appbuilder.add_view(
|
||||||
"Druid Datasources",
|
DruidDatasourceModelView,
|
||||||
category="Sources",
|
"Druid Datasources",
|
||||||
icon="fa-cube")
|
category="Sources",
|
||||||
|
icon="fa-cube")
|
||||||
|
|
||||||
|
|
||||||
@app.route('/health')
|
@app.route('/health')
|
||||||
@ -778,12 +781,14 @@ class Dashed(BaseView):
|
|||||||
utils=utils)
|
utils=utils)
|
||||||
|
|
||||||
appbuilder.add_view_no_menu(Dashed)
|
appbuilder.add_view_no_menu(Dashed)
|
||||||
appbuilder.add_link(
|
|
||||||
"Refresh Druid Metadata",
|
if config['DRUID_IS_ACTIVE']:
|
||||||
href='/dashed/refresh_datasources/',
|
appbuilder.add_link(
|
||||||
category='Sources',
|
"Refresh Druid Metadata",
|
||||||
category_icon='fa-database',
|
href='/dashed/refresh_datasources/',
|
||||||
icon="fa-cog")
|
category='Sources',
|
||||||
|
category_icon='fa-database',
|
||||||
|
icon="fa-cog")
|
||||||
|
|
||||||
|
|
||||||
class CssTemplateModelView(DashedModelView, DeleteMixin):
|
class CssTemplateModelView(DashedModelView, DeleteMixin):
|
||||||
|
Loading…
Reference in New Issue
Block a user