Skip to content

Commit

Permalink
Some column description clarifications (#2536)
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch authored Apr 4, 2017
1 parent dcc6f2a commit c31210b
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 3 deletions.
16 changes: 15 additions & 1 deletion superset/connectors/druid/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]"
Expand Down Expand Up @@ -166,7 +169,18 @@ class DruidDatasourceModelView(SupersetModelView, DeleteMixin): # noqa
"https://daringfireball.net/projects/markdown/'>markdown</a>"),
'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 = {
Expand Down
17 changes: 15 additions & 2 deletions superset/connectors/sqla/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 "
Expand Down Expand Up @@ -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 = {
Expand All @@ -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"),
}
Expand Down

0 comments on commit c31210b

Please sign in to comment.