From c31210b96d0b3aa96e826657da6e6754c87e59a0 Mon Sep 17 00:00:00 2001 From: Maxime Beauchemin Date: Mon, 3 Apr 2017 21:52:35 -0700 Subject: [PATCH] Some column description clarifications (#2536) --- superset/connectors/druid/views.py | 16 +++++++++++++++- superset/connectors/sqla/views.py | 17 +++++++++++++++-- 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/superset/connectors/druid/views.py b/superset/connectors/druid/views.py index 31b09c0505..892fd0f1e8 100644 --- a/superset/connectors/druid/views.py +++ b/superset/connectors/druid/views.py @@ -45,6 +45,9 @@ class DruidColumnInlineView(CompactCRUDMixin, SupersetModelView): # noqa 'max': _("Max"), } description_columns = { + 'filterable': _( + "Whether this column is exposed in the `Filters` section " + "of the explore view."), 'dimension_spec_json': utils.markdown( "this field can be used to specify " "a `dimensionSpec` as documented [here]" @@ -166,7 +169,18 @@ class DruidDatasourceModelView(SupersetModelView, DeleteMixin): # noqa "https://daringfireball.net/projects/markdown/'>markdown"), 'fetch_values_from': _( "Time expression to use as a predicate when retrieving " - "distinct values to populate the filter component"), + "distinct values to populate the filter component. " + "Only applies when `Enable Filter Select` is on. If " + "you enter `7 days ago`, the distinct list of values in " + "the filter will be populated based on the distinct value over " + "the past week"), + 'filter_select_enabled': _( + "Whether to populate the filter's dropdown in the explore " + "view's filter section with a list of distinct values fetched " + "from the backend on the fly"), + 'default_endpoint': _( + "Redirects to this endpoint when clicking on the datasource " + "from the datasource list"), } base_filters = [['id', DatasourceFilter, lambda: []]] label_columns = { diff --git a/superset/connectors/sqla/views.py b/superset/connectors/sqla/views.py index 1bcb0b0a1a..91e66980ab 100644 --- a/superset/connectors/sqla/views.py +++ b/superset/connectors/sqla/views.py @@ -40,6 +40,9 @@ class TableColumnInlineView(CompactCRUDMixin, SupersetModelView): # noqa "Whether to make this column available as a " "[Time Granularity] option, column has to be DATETIME or " "DATETIME-like"), + 'filterable': _( + "Whether this column is exposed in the `Filters` section " + "of the explore view."), 'type': _( "The data type that was inferred by the database. " "It may be necessary to input a type manually for " @@ -163,8 +166,16 @@ class TableModelView(SupersetModelView, DeleteMixin): # noqa 'fetch_values_predicate': _( "Predicate applied when fetching distinct value to " "populate the filter control component. Supports " - "jinja template syntax." + "jinja template syntax. Applies only when " + "`Enable Filter Select` is on." ), + 'default_endpoint': _( + "Redirects to this endpoint when clicking on the table " + "from the table list"), + 'filter_select_enabled': _( + "Whether to populate the filter's dropdown in the explore " + "view's filter section with a list of distinct values fetched " + "from the backend on the fly"), } base_filters = [['id', DatasourceFilter, lambda: []]] label_columns = { @@ -174,7 +185,9 @@ class TableModelView(SupersetModelView, DeleteMixin): # noqa 'changed_on_': _("Last Changed"), 'filter_select_enabled': _("Enable Filter Select"), 'schema': _("Schema"), - 'default_endpoint': _("Default Endpoint"), + 'default_endpoint': _( + "Redirects to this endpoint when clicking on the datasource " + "from the datasource list"), 'offset': _("Offset"), 'cache_timeout': _("Cache Timeout"), }