You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ma...@apache.org on 2017/10/12 05:36:14 UTC

[incubator-superset] branch master updated: Make columns that return an exception on click unsortable. (#3417)

This is an automated email from the ASF dual-hosted git repository.

maximebeauchemin 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 52a9f27  Make columns that return an exception on click unsortable. (#3417)
52a9f27 is described below

commit 52a9f2742b5003e81604da1494a452f677cbe33c
Author: Ali Cirik <al...@gmail.com>
AuthorDate: Thu Oct 12 01:36:12 2017 -0400

    Make columns that return an exception on click unsortable. (#3417)
---
 superset/connectors/druid/views.py | 1 +
 superset/connectors/sqla/views.py  | 1 +
 superset/views/core.py             | 8 +++++++-
 3 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/superset/connectors/druid/views.py b/superset/connectors/druid/views.py
index 2423145..9206025 100644
--- a/superset/connectors/druid/views.py
+++ b/superset/connectors/druid/views.py
@@ -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',
diff --git a/superset/connectors/sqla/views.py b/superset/connectors/sqla/views.py
index b7a786d..630ce52 100644
--- a/superset/connectors/sqla/views.py
+++ b/superset/connectors/sqla/views.py
@@ -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',
diff --git a/superset/views/core.py b/superset/views/core.py
index 57710bb..7d6db40 100755
--- a/superset/views/core.py
+++ b/superset/views/core.py
@@ -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',
@@ -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"),
@@ -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']
@@ -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']

-- 
To stop receiving notification emails like this one, please contact
['"commits@superset.apache.org" <co...@superset.apache.org>'].