mirror of https://github.com/apache/superset.git
commit
736e102cae
|
@ -126,6 +126,7 @@ class Datasource(Model, AuditMixin):
|
|||
col_obj.filterable = True
|
||||
if col_obj:
|
||||
col_obj.type = cols[col]['type']
|
||||
col_obj.datasource = datasource
|
||||
col_obj.generate_metrics()
|
||||
#session.commit()
|
||||
|
||||
|
@ -199,7 +200,7 @@ class Column(Model, AuditMixin):
|
|||
json=json.dumps({'type': 'count', 'name': 'count'})
|
||||
))
|
||||
# Somehow we need to reassign this for UDAFs
|
||||
corrected_type = 'DOUBLE' if self.type in ('DOUBLE', 'FLOAT') else 'self.type'
|
||||
corrected_type = 'DOUBLE' if self.type in ('DOUBLE', 'FLOAT') else self.type
|
||||
|
||||
if self.sum and self.isnum:
|
||||
mt = corrected_type.lower() + 'Sum'
|
||||
|
|
11
app/views.py
11
app/views.py
|
@ -74,10 +74,10 @@ class ClusterModelView(ModelView, DeleteMixin):
|
|||
|
||||
appbuilder.add_view(
|
||||
ClusterModelView,
|
||||
"Clusters",
|
||||
"Druid Clusters",
|
||||
icon="fa-server",
|
||||
category="Admin",
|
||||
category_icon='fa-envelope')
|
||||
category_icon='fa-cogs',)
|
||||
|
||||
|
||||
class DatasourceModelView(ModelView, DeleteMixin):
|
||||
|
@ -100,7 +100,7 @@ class DatasourceModelView(ModelView, DeleteMixin):
|
|||
|
||||
appbuilder.add_view(
|
||||
DatasourceModelView,
|
||||
"Datasources",
|
||||
"Druid Datasources",
|
||||
icon="fa-cube",
|
||||
category_icon='fa-envelope')
|
||||
|
||||
|
@ -176,10 +176,11 @@ class Panoramix(BaseView):
|
|||
|
||||
appbuilder.add_view_no_menu(Panoramix)
|
||||
appbuilder.add_link(
|
||||
"Refresh Metadata",
|
||||
"Refresh Druid Metadata",
|
||||
href='/panoramix/refresh_datasources/',
|
||||
category='Admin',
|
||||
icon="fa-cogs")
|
||||
category_icon='fa-cogs',
|
||||
icon="fa-cog")
|
||||
|
||||
#models.Metric.__table__.drop(db.engine)
|
||||
db.create_all()
|
||||
|
|
Loading…
Reference in New Issue