Skip to content

Commit

Permalink
Make columns that return an exception on click unsortable. (#3417)
Browse files Browse the repository at this point in the history
  • Loading branch information
aliavni authored and mistercrunch committed Oct 12, 2017
1 parent 7f07fbe commit 52a9f27
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions superset/connectors/druid/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ class DruidDatasourceModelView(DatasourceModelView, DeleteMixin): # noqa
list_widget = ListWidgetWithCheckboxes
list_columns = [
'datasource_link', 'cluster', 'changed_by_', 'modified']
order_columns = ['datasource_link', 'modified']
related_views = [DruidColumnInlineView, DruidMetricInlineView]
edit_columns = [
'datasource_name', 'cluster', 'slices', 'description', 'owner',
Expand Down
1 change: 1 addition & 0 deletions superset/connectors/sqla/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ class TableModelView(DatasourceModelView, DeleteMixin): # noqa
list_columns = [
'link', 'database',
'changed_by_', 'modified']
order_columns = ['modified']
add_columns = ['database', 'schema', 'table_name']
edit_columns = [
'table_name', 'sql', 'filter_select_enabled', 'slices',
Expand Down
8 changes: 7 additions & 1 deletion superset/views/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,10 @@ class DatabaseView(SupersetModelView, DeleteMixin): # noqa
list_columns = [
'database_name', 'backend', 'allow_run_sync', 'allow_run_async',
'allow_dml', 'creator', 'modified']
order_columns = [
'database_name', 'allow_run_sync', 'allow_run_async', 'allow_dml',
'modified'
]
add_columns = [
'database_name', 'sqlalchemy_uri', 'cache_timeout', 'extra',
'expose_in_sqllab', 'allow_run_sync', 'allow_run_async',
Expand Down Expand Up @@ -309,7 +313,7 @@ class AccessRequestsModelView(SupersetModelView, DeleteMixin):
list_columns = [
'username', 'user_roles', 'datasource_link',
'roles_with_datasource', 'created_on']
order_columns = ['username', 'datasource_link']
order_columns = ['created_on']
base_order = ('changed_on', 'desc')
label_columns = {
'username': _("User"),
Expand Down Expand Up @@ -346,6 +350,7 @@ class SliceModelView(SupersetModelView, DeleteMixin): # noqa
)
list_columns = [
'slice_link', 'viz_type', 'datasource_link', 'creator', 'modified']
order_columns = ['viz_type', 'datasource_link', 'modified']
edit_columns = [
'slice_name', 'description', 'viz_type', 'owners', 'dashboards',
'params', 'cache_timeout']
Expand Down Expand Up @@ -440,6 +445,7 @@ class DashboardModelView(SupersetModelView, DeleteMixin): # noqa
edit_title = _('Edit Dashboard')

list_columns = ['dashboard_link', 'creator', 'modified']
order_columns = ['modified']
edit_columns = [
'dashboard_title', 'slug', 'slices', 'owners', 'position_json', 'css',
'json_metadata']
Expand Down

0 comments on commit 52a9f27

Please sign in to comment.