mirror of
https://github.com/apache/superset.git
synced 2024-09-12 08:39:45 -04:00
Merge pull request #197 from NiharikaRay/master
Adding a DRUID_IS_ACTIVE flag and changing nav bar
This commit is contained in:
commit
12e20ca440
@ -53,6 +53,7 @@ APP_NAME = "Dashed"
|
||||
# tz.tzutc() : Using utc timezone
|
||||
# tz.tzlocal() : Using local timezone
|
||||
# other tz can be overridden by providing a local_config
|
||||
DRUID_IS_ACTIVE = True
|
||||
DRUID_TZ = tz.tzutc()
|
||||
|
||||
# ----------------------------------------------------
|
||||
|
@ -207,6 +207,8 @@ class DruidClusterModelView(DashedModelView, DeleteMixin): # noqa
|
||||
edit_columns = add_columns
|
||||
list_columns = ['cluster_name', 'metadata_last_refreshed']
|
||||
|
||||
|
||||
if config['DRUID_IS_ACTIVE']:
|
||||
appbuilder.add_view(
|
||||
DruidClusterModelView,
|
||||
"Druid Clusters",
|
||||
@ -326,6 +328,7 @@ class DruidDatasourceModelView(DashedModelView, DeleteMixin): # noqa
|
||||
def post_update(self, datasource):
|
||||
self.post_add(datasource)
|
||||
|
||||
if config['DRUID_IS_ACTIVE']:
|
||||
appbuilder.add_view(
|
||||
DruidDatasourceModelView,
|
||||
"Druid Datasources",
|
||||
@ -778,6 +781,8 @@ class Dashed(BaseView):
|
||||
utils=utils)
|
||||
|
||||
appbuilder.add_view_no_menu(Dashed)
|
||||
|
||||
if config['DRUID_IS_ACTIVE']:
|
||||
appbuilder.add_link(
|
||||
"Refresh Druid Metadata",
|
||||
href='/dashed/refresh_datasources/',
|
||||
|
Loading…
Reference in New Issue
Block a user