Improve controls layout for Table visualization (#4767)

This commit is contained in:
Maxime Beauchemin 2018-04-06 16:19:37 -07:00 committed by GitHub
parent 426c34ee86
commit 4f2c2069f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 3 deletions

View File

@ -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,
@ -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]),
@ -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'),
},

View File

@ -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'],
],
},
{
@ -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'],
],