Skip to content

Commit

Permalink
Improve controls layout for Table visualization (apache#4767)
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch authored and michellethomas committed May 23, 2018
1 parent 317dd8f commit 3585c88
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
3 changes: 3 additions & 0 deletions superset/assets/javascripts/explore/stores/controls.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -1105,6 +1105,7 @@ export const controls = {
freeForm: true,
label: t('Table Timestamp Format'),
default: '%Y-%m-%d %H:%M:%S',
renderTrigger: true,
validators: [v.nonEmpty],
clearable: false,
choices: D3_TIME_FORMAT_OPTIONS,
Expand All @@ -1123,6 +1124,7 @@ export const controls = {
page_length: {
type: 'SelectControl',
freeForm: true,
renderTrigger: true,
label: t('Page Length'),
default: 0,
choices: formatSelectOptions([0, 10, 25, 40, 50, 75, 100, 150, 200]),
Expand Down Expand Up @@ -1351,6 +1353,7 @@ export const controls = {
table_filter: {
type: 'CheckboxControl',
label: t('Table Filter'),
renderTrigger: true,
default: false,
description: t('Whether to apply filter when table cell is clicked'),
},
Expand Down
9 changes: 6 additions & 3 deletions superset/assets/javascripts/explore/stores/visTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -748,12 +748,13 @@ export const visTypes = {
{
label: t('GROUP BY'),
description: t('Use this section if you want a query that aggregates'),
expanded: true,
controlSetRows: [
['groupby'],
['metrics'],
['percent_metrics'],
['include_time'],
['timeseries_limit_metric', 'order_desc'],
['timeseries_limit_metric', 'row_limit'],
['include_time', 'order_desc'],
],
},
{
Expand All @@ -762,13 +763,15 @@ export const visTypes = {
controlSetRows: [
['all_columns'],
['order_by_cols'],
['row_limit', null],
],
},
{
label: t('Options'),
expanded: true,
controlSetRows: [
['table_timestamp_format'],
['row_limit', 'page_length'],
['page_length', null],
['include_search', 'table_filter'],
['align_pn', 'color_pn'],
],
Expand Down

0 comments on commit 3585c88

Please sign in to comment.