You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2018/08/27 23:22:36 UTC

[GitHub] betodealmeida closed pull request #5723: [table editor] fix 'Autocomplete filters' checkbox doesn't stick

betodealmeida closed pull request #5723: [table editor] fix 'Autocomplete filters' checkbox doesn't stick
URL: https://github.com/apache/incubator-superset/pull/5723
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/superset/assets/src/datasource/DatasourceEditor.jsx b/superset/assets/src/datasource/DatasourceEditor.jsx
index df03ea768f..d06e287ef0 100644
--- a/superset/assets/src/datasource/DatasourceEditor.jsx
+++ b/superset/assets/src/datasource/DatasourceEditor.jsx
@@ -329,7 +329,7 @@ export class DatasourceEditor extends React.PureComponent {
           control={<TextControl />}
         />
         <Field
-          fieldKey="filter_select"
+          fieldKey="filter_select_enabled"
           label={t('Autocomplete filters')}
           descr={t('Whether to populate autocomplete filters options')}
           control={<CheckboxControl />}
diff --git a/superset/connectors/base/models.py b/superset/connectors/base/models.py
index bee7e1c32d..e100b0a255 100644
--- a/superset/connectors/base/models.py
+++ b/superset/connectors/base/models.py
@@ -188,7 +188,8 @@ def data(self):
             'description': self.description,
             'database': self.database.data,  # pylint: disable=no-member
             'default_endpoint': self.default_endpoint,
-            'filter_select': self.filter_select_enabled,
+            'filter_select': self.filter_select_enabled,  # TODO deprecate
+            'filter_select_enabled': self.filter_select_enabled,
             'name': self.name,
             'datasource_name': self.datasource_name,
             'type': self.type,
diff --git a/superset/connectors/druid/models.py b/superset/connectors/druid/models.py
index 7bb6a5e192..23b0b736f1 100644
--- a/superset/connectors/druid/models.py
+++ b/superset/connectors/druid/models.py
@@ -488,6 +488,7 @@ class DruidDatasource(Model, BaseDatasource):
     export_fields = (
         'datasource_name', 'is_hidden', 'description', 'default_endpoint',
         'cluster_name', 'offset', 'cache_timeout', 'params',
+        'filter_select_enabled',
     )
     update_from_object_fields = export_fields
 
diff --git a/superset/connectors/sqla/models.py b/superset/connectors/sqla/models.py
index 44a2cfb1ca..f410279d0f 100644
--- a/superset/connectors/sqla/models.py
+++ b/superset/connectors/sqla/models.py
@@ -287,7 +287,7 @@ class SqlaTable(Model, BaseDatasource):
     export_fields = (
         'table_name', 'main_dttm_col', 'description', 'default_endpoint',
         'database_id', 'offset', 'cache_timeout', 'schema',
-        'sql', 'params', 'template_params')
+        'sql', 'params', 'template_params', 'filter_select_enabled')
     update_from_object_fields = [
         f for f in export_fields if f not in ('table_name', 'database_id')]
     export_parent = 'database'
diff --git a/tests/fixtures/datasource.py b/tests/fixtures/datasource.py
index 9f0e47ec62..647166f9ce 100644
--- a/tests/fixtures/datasource.py
+++ b/tests/fixtures/datasource.py
@@ -10,7 +10,7 @@
     'column_formats': {'ratio': '.2%'},
     'description': 'Adding a DESCRip',
     'default_endpoint': '',
-    'filter_select': True,
+    'filter_select_enabled': True,
     'name': 'birth_names',
     'datasource_name': 'birth_names',
     'type': 'table',


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org