mirror of https://github.com/apache/superset.git
migrating unique EventFlow controls (#9358)
* migrating unique controls
* Lint ✨
This commit is contained in:
parent
20dd4182cb
commit
b5a9bae106
|
@ -1153,7 +1153,6 @@ Note the `y_axis_format` is defined under various section for some charts.
|
||||||
| `markers` | _N/A_ | |
|
| `markers` | _N/A_ | |
|
||||||
| `markup_type` | _N/A_ | |
|
| `markup_type` | _N/A_ | |
|
||||||
| `max_radius` | _N/A_ | |
|
| `max_radius` | _N/A_ | |
|
||||||
| `min_leaf_node_event_count` | _N/A_ | |
|
|
||||||
| `min_periods` | _N/A_ | |
|
| `min_periods` | _N/A_ | |
|
||||||
| `min_radius` | _N/A_ | |
|
| `min_radius` | _N/A_ | |
|
||||||
| `multiplier` | _N/A_ | |
|
| `multiplier` | _N/A_ | |
|
||||||
|
@ -1163,7 +1162,6 @@ Note the `y_axis_format` is defined under various section for some charts.
|
||||||
| `num_buckets` | _N/A_ | |
|
| `num_buckets` | _N/A_ | |
|
||||||
| `num_period_compare` | _N/A_ | |
|
| `num_period_compare` | _N/A_ | |
|
||||||
| `order_bars` | _N/A_ | |
|
| `order_bars` | _N/A_ | |
|
||||||
| `order_by_entity` | _N/A_ | |
|
|
||||||
| `order_desc` | _N/A_ | |
|
| `order_desc` | _N/A_ | |
|
||||||
| `page_length` | _N/A_ | |
|
| `page_length` | _N/A_ | |
|
||||||
| `pandas_aggfunc` | _N/A_ | |
|
| `pandas_aggfunc` | _N/A_ | |
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
*/
|
*/
|
||||||
import { t } from '@superset-ui/translation';
|
import { t } from '@superset-ui/translation';
|
||||||
import { nonEmpty } from '../validators';
|
import { nonEmpty } from '../validators';
|
||||||
|
import { formatSelectOptionsForRange } from '../../modules/utils';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
requiresTime: true,
|
requiresTime: true,
|
||||||
|
@ -28,8 +29,36 @@ export default {
|
||||||
['entity'],
|
['entity'],
|
||||||
['all_columns_x'],
|
['all_columns_x'],
|
||||||
['row_limit'],
|
['row_limit'],
|
||||||
['order_by_entity'],
|
[
|
||||||
['min_leaf_node_event_count'],
|
{
|
||||||
|
name: 'order_by_entity',
|
||||||
|
config: {
|
||||||
|
type: 'CheckboxControl',
|
||||||
|
label: t('Order by entity id'),
|
||||||
|
description: t(
|
||||||
|
'Important! Select this if the table is not already sorted by entity id, ' +
|
||||||
|
'else there is no guarantee that all events for each entity are returned.',
|
||||||
|
),
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
[
|
||||||
|
{
|
||||||
|
name: 'min_leaf_node_event_count',
|
||||||
|
config: {
|
||||||
|
type: 'SelectControl',
|
||||||
|
freeForm: false,
|
||||||
|
label: t('Minimum leaf node event count'),
|
||||||
|
default: 1,
|
||||||
|
choices: formatSelectOptionsForRange(1, 10),
|
||||||
|
description: t(
|
||||||
|
'Leaf nodes that represent fewer than this number of events will be initially ' +
|
||||||
|
'hidden in the visualization',
|
||||||
|
),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -2091,28 +2091,6 @@ export const controls = {
|
||||||
description: t('Time range endpoints (SIP-15)'),
|
description: t('Time range endpoints (SIP-15)'),
|
||||||
},
|
},
|
||||||
|
|
||||||
order_by_entity: {
|
|
||||||
type: 'CheckboxControl',
|
|
||||||
label: t('Order by entity id'),
|
|
||||||
description: t(
|
|
||||||
'Important! Select this if the table is not already sorted by entity id, ' +
|
|
||||||
'else there is no guarantee that all events for each entity are returned.',
|
|
||||||
),
|
|
||||||
default: true,
|
|
||||||
},
|
|
||||||
|
|
||||||
min_leaf_node_event_count: {
|
|
||||||
type: 'SelectControl',
|
|
||||||
freeForm: false,
|
|
||||||
label: t('Minimum leaf node event count'),
|
|
||||||
default: 1,
|
|
||||||
choices: formatSelectOptionsForRange(1, 10),
|
|
||||||
description: t(
|
|
||||||
'Leaf nodes that represent fewer than this number of events will be initially ' +
|
|
||||||
'hidden in the visualization',
|
|
||||||
),
|
|
||||||
},
|
|
||||||
|
|
||||||
color_scheme: {
|
color_scheme: {
|
||||||
type: 'ColorSchemeControl',
|
type: 'ColorSchemeControl',
|
||||||
label: t('Color Scheme'),
|
label: t('Color Scheme'),
|
||||||
|
|
Loading…
Reference in New Issue