Skip to content

Commit

Permalink
migrating unique EventFlow controls (apache#9358)
Browse files Browse the repository at this point in the history
* migrating unique controls

* Lint ✨
  • Loading branch information
rusackas authored Mar 24, 2020
1 parent 20dd418 commit b5a9bae
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 26 deletions.
2 changes: 0 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -1153,7 +1153,6 @@ Note the `y_axis_format` is defined under various section for some charts.
| `markers` | _N/A_ | |
| `markup_type` | _N/A_ | |
| `max_radius` | _N/A_ | |
| `min_leaf_node_event_count` | _N/A_ | |
| `min_periods` | _N/A_ | |
| `min_radius` | _N/A_ | |
| `multiplier` | _N/A_ | |
Expand All @@ -1163,7 +1162,6 @@ Note the `y_axis_format` is defined under various section for some charts.
| `num_buckets` | _N/A_ | |
| `num_period_compare` | _N/A_ | |
| `order_bars` | _N/A_ | |
| `order_by_entity` | _N/A_ | |
| `order_desc` | _N/A_ | |
| `page_length` | _N/A_ | |
| `pandas_aggfunc` | _N/A_ | |
Expand Down
33 changes: 31 additions & 2 deletions superset-frontend/src/explore/controlPanels/EventFlow.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
*/
import { t } from '@superset-ui/translation';
import { nonEmpty } from '../validators';
import { formatSelectOptionsForRange } from '../../modules/utils';

export default {
requiresTime: true,
Expand All @@ -28,8 +29,36 @@ export default {
['entity'],
['all_columns_x'],
['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',
),
},
},
],
],
},
{
Expand Down
22 changes: 0 additions & 22 deletions superset-frontend/src/explore/controls.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2091,28 +2091,6 @@ export const controls = {
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: {
type: 'ColorSchemeControl',
label: t('Color Scheme'),
Expand Down

0 comments on commit b5a9bae

Please sign in to comment.