This is an automated email from the ASF dual-hosted git repository.
johnbodley pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git
The following commit(s) were added to refs/heads/master by this push:
new adfe9e3 [tablemodelview] Fixing JSON api/read serializable issue
(#6023)
adfe9e3 is described below
commit adfe9e3f2bfd4c248ec32b1fedb0fba361abb52a
Author: John Bodley <[email protected]>
AuthorDate: Fri Oct 5 14:04:48 2018 -0700
[tablemodelview] Fixing JSON api/read serializable issue (#6023)
---
superset/connectors/sqla/models.py | 4 ++++
superset/connectors/sqla/views.py | 3 ++-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/superset/connectors/sqla/models.py
b/superset/connectors/sqla/models.py
index 037eb77..78b5873 100644
--- a/superset/connectors/sqla/models.py
+++ b/superset/connectors/sqla/models.py
@@ -318,6 +318,10 @@ class SqlaTable(Model, BaseDatasource):
return self.table_name
@property
+ def database_name(self):
+ return self.database.name
+
+ @property
def link(self):
name = escape(self.name)
anchor = '<a target="_blank" href="{self.explore_url}">{name}</a>'
diff --git a/superset/connectors/sqla/views.py
b/superset/connectors/sqla/views.py
index 2766385..1bae52e 100644
--- a/superset/connectors/sqla/views.py
+++ b/superset/connectors/sqla/views.py
@@ -160,7 +160,7 @@ class TableModelView(DatasourceModelView, DeleteMixin,
YamlExportMixin): # noqa
edit_title = _('Edit Table')
list_columns = [
- 'link', 'database',
+ 'link', 'database_name',
'changed_by_', 'modified']
order_columns = ['modified']
add_columns = ['database', 'schema', 'table_name']
@@ -229,6 +229,7 @@ class TableModelView(DatasourceModelView, DeleteMixin,
YamlExportMixin): # noqa
'link': _('Table'),
'changed_by_': _('Changed By'),
'database': _('Database'),
+ 'database_name': _('Database'),
'changed_on_': _('Last Changed'),
'filter_select_enabled': _('Enable Filter Select'),
'schema': _('Schema'),