mirror of
https://github.com/apache/superset.git
synced 2024-09-12 08:39:45 -04:00
refactor: prepare control panel configs for separation into plugins (#8222)
* move paired t-test * fix: remove nvd3sections * move more controls
This commit is contained in:
parent
1522d3fbaa
commit
bf7ce62166
@ -17,19 +17,53 @@
|
|||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
import { t } from '@superset-ui/translation';
|
import { t } from '@superset-ui/translation';
|
||||||
import { NVD3TimeSeries } from './sections';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
requiresTime: true,
|
requiresTime: true,
|
||||||
controlPanelSections: [
|
controlPanelSections: [
|
||||||
NVD3TimeSeries[0],
|
{
|
||||||
|
label: t('Query'),
|
||||||
|
expanded: true,
|
||||||
|
controlSetRows: [
|
||||||
|
['metrics'],
|
||||||
|
['adhoc_filters'],
|
||||||
|
['groupby'],
|
||||||
|
['limit', 'timeseries_limit_metric'],
|
||||||
|
['order_desc', 'contribution'],
|
||||||
|
['row_limit', null],
|
||||||
|
],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: t('Paired t-test'),
|
label: t('Paired t-test'),
|
||||||
expanded: false,
|
expanded: false,
|
||||||
controlSetRows: [
|
controlSetRows: [
|
||||||
['significance_level'],
|
[{
|
||||||
['pvalue_precision'],
|
name: 'significance_level',
|
||||||
['liftvalue_precision'],
|
config: {
|
||||||
|
type: 'TextControl',
|
||||||
|
label: t('Significance Level'),
|
||||||
|
default: 0.05,
|
||||||
|
description: t('Threshold alpha level for determining significance'),
|
||||||
|
},
|
||||||
|
}],
|
||||||
|
[{
|
||||||
|
name: 'pvalue_precision',
|
||||||
|
config: {
|
||||||
|
type: 'TextControl',
|
||||||
|
label: t('p-value precision'),
|
||||||
|
default: 6,
|
||||||
|
description: t('Number of decimal places with which to display p-values'),
|
||||||
|
},
|
||||||
|
}],
|
||||||
|
[{
|
||||||
|
name: 'liftvalue_precision',
|
||||||
|
config: {
|
||||||
|
type: 'TextControl',
|
||||||
|
label: t('Lift percent precision'),
|
||||||
|
default: 4,
|
||||||
|
description: t('Number of decimal places with which to display lift values'),
|
||||||
|
},
|
||||||
|
}],
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
@ -35,8 +35,43 @@ export default {
|
|||||||
label: t('Options'),
|
label: t('Options'),
|
||||||
expanded: true,
|
expanded: true,
|
||||||
controlSetRows: [
|
controlSetRows: [
|
||||||
['size_from', 'size_to'],
|
[{
|
||||||
['rotation'],
|
name: 'size_from',
|
||||||
|
config: {
|
||||||
|
type: 'TextControl',
|
||||||
|
isInt: true,
|
||||||
|
label: t('Minimum Font Size'),
|
||||||
|
renderTrigger: true,
|
||||||
|
default: 10,
|
||||||
|
description: t('Font size for the smallest value in the list'),
|
||||||
|
},
|
||||||
|
}, {
|
||||||
|
name: 'size_to',
|
||||||
|
config: {
|
||||||
|
type: 'TextControl',
|
||||||
|
isInt: true,
|
||||||
|
label: t('Maximum Font Size'),
|
||||||
|
renderTrigger: true,
|
||||||
|
default: 70,
|
||||||
|
description: t('Font size for the biggest value in the list'),
|
||||||
|
},
|
||||||
|
}],
|
||||||
|
[{
|
||||||
|
name: 'rotation',
|
||||||
|
config: {
|
||||||
|
type: 'SelectControl',
|
||||||
|
label: t('Word Rotation'),
|
||||||
|
choices: [
|
||||||
|
['random', 'random'],
|
||||||
|
['flat', 'flat'],
|
||||||
|
['square', 'square'],
|
||||||
|
],
|
||||||
|
renderTrigger: true,
|
||||||
|
default: 'square',
|
||||||
|
clearable: false,
|
||||||
|
description: t('Rotation to apply to words in the cloud'),
|
||||||
|
},
|
||||||
|
}],
|
||||||
['color_scheme', 'label_colors'],
|
['color_scheme', 'label_colors'],
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@ -49,11 +84,5 @@ export default {
|
|||||||
row_limit: {
|
row_limit: {
|
||||||
default: 100,
|
default: 100,
|
||||||
},
|
},
|
||||||
size_from: {
|
|
||||||
default: 10,
|
|
||||||
},
|
|
||||||
size_to: {
|
|
||||||
default: 70,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -25,7 +25,22 @@ export default {
|
|||||||
expanded: true,
|
expanded: true,
|
||||||
controlSetRows: [
|
controlSetRows: [
|
||||||
['entity'],
|
['entity'],
|
||||||
['country_fieldtype'],
|
[{
|
||||||
|
name: 'country_fieldtype',
|
||||||
|
config: {
|
||||||
|
type: 'SelectControl',
|
||||||
|
label: t('Country Field Type'),
|
||||||
|
default: 'cca2',
|
||||||
|
choices: [
|
||||||
|
['name', 'Full name'],
|
||||||
|
['cioc', 'code International Olympic Committee (cioc)'],
|
||||||
|
['cca2', 'code ISO 3166-1 alpha-2 (cca2)'],
|
||||||
|
['cca3', 'code ISO 3166-1 alpha-3 (cca3)'],
|
||||||
|
],
|
||||||
|
description: t('The country code standard that Superset should expect ' +
|
||||||
|
'to find in the [country] column'),
|
||||||
|
},
|
||||||
|
}],
|
||||||
['metric'],
|
['metric'],
|
||||||
['adhoc_filters'],
|
['adhoc_filters'],
|
||||||
['row_limit'],
|
['row_limit'],
|
||||||
@ -34,7 +49,16 @@ export default {
|
|||||||
{
|
{
|
||||||
label: t('Bubbles'),
|
label: t('Bubbles'),
|
||||||
controlSetRows: [
|
controlSetRows: [
|
||||||
['show_bubbles'],
|
[{
|
||||||
|
name: 'show_bubbles',
|
||||||
|
config: {
|
||||||
|
type: 'CheckboxControl',
|
||||||
|
label: t('Show Bubbles'),
|
||||||
|
default: false,
|
||||||
|
renderTrigger: true,
|
||||||
|
description: t('Whether to display bubbles on top of countries'),
|
||||||
|
},
|
||||||
|
}],
|
||||||
['secondary_metric'],
|
['secondary_metric'],
|
||||||
['max_bubble_size'],
|
['max_bubble_size'],
|
||||||
],
|
],
|
||||||
|
@ -591,19 +591,6 @@ export const controls = {
|
|||||||
].map(s => [s, s]),
|
].map(s => [s, s]),
|
||||||
description: t('The name of the country that Superset should display'),
|
description: t('The name of the country that Superset should display'),
|
||||||
},
|
},
|
||||||
country_fieldtype: {
|
|
||||||
type: 'SelectControl',
|
|
||||||
label: t('Country Field Type'),
|
|
||||||
default: 'cca2',
|
|
||||||
choices: [
|
|
||||||
['name', 'Full name'],
|
|
||||||
['cioc', 'code International Olympic Committee (cioc)'],
|
|
||||||
['cca2', 'code ISO 3166-1 alpha-2 (cca2)'],
|
|
||||||
['cca3', 'code ISO 3166-1 alpha-3 (cca3)'],
|
|
||||||
],
|
|
||||||
description: t('The country code standard that Superset should expect ' +
|
|
||||||
'to find in the [country] column'),
|
|
||||||
},
|
|
||||||
|
|
||||||
freq: {
|
freq: {
|
||||||
type: 'SelectControl',
|
type: 'SelectControl',
|
||||||
@ -1311,16 +1298,6 @@ export const controls = {
|
|||||||
description: t('Pick your favorite markup language'),
|
description: t('Pick your favorite markup language'),
|
||||||
},
|
},
|
||||||
|
|
||||||
rotation: {
|
|
||||||
type: 'SelectControl',
|
|
||||||
label: t('Word Rotation'),
|
|
||||||
choices: formatSelectOptions(['random', 'flat', 'square']),
|
|
||||||
renderTrigger: true,
|
|
||||||
default: 'square',
|
|
||||||
clearable: false,
|
|
||||||
description: t('Rotation to apply to words in the cloud'),
|
|
||||||
},
|
|
||||||
|
|
||||||
line_interpolation: {
|
line_interpolation: {
|
||||||
type: 'SelectControl',
|
type: 'SelectControl',
|
||||||
label: t('Line Style'),
|
label: t('Line Style'),
|
||||||
@ -1396,24 +1373,6 @@ export const controls = {
|
|||||||
]),
|
]),
|
||||||
},
|
},
|
||||||
|
|
||||||
size_from: {
|
|
||||||
type: 'TextControl',
|
|
||||||
isInt: true,
|
|
||||||
label: t('Minimum Font Size'),
|
|
||||||
renderTrigger: true,
|
|
||||||
default: '20',
|
|
||||||
description: t('Font size for the smallest value in the list'),
|
|
||||||
},
|
|
||||||
|
|
||||||
size_to: {
|
|
||||||
type: 'TextControl',
|
|
||||||
isInt: true,
|
|
||||||
label: t('Maximum Font Size'),
|
|
||||||
renderTrigger: true,
|
|
||||||
default: '150',
|
|
||||||
description: t('Font size for the biggest value in the list'),
|
|
||||||
},
|
|
||||||
|
|
||||||
header_font_size: {
|
header_font_size: {
|
||||||
type: 'SelectControl',
|
type: 'SelectControl',
|
||||||
label: t('Header Font Size'),
|
label: t('Header Font Size'),
|
||||||
@ -1584,14 +1543,6 @@ export const controls = {
|
|||||||
description: t('Whether to color +/- values'),
|
description: t('Whether to color +/- values'),
|
||||||
},
|
},
|
||||||
|
|
||||||
show_bubbles: {
|
|
||||||
type: 'CheckboxControl',
|
|
||||||
label: t('Show Bubbles'),
|
|
||||||
default: false,
|
|
||||||
renderTrigger: true,
|
|
||||||
description: t('Whether to display bubbles on top of countries'),
|
|
||||||
},
|
|
||||||
|
|
||||||
show_legend: {
|
show_legend: {
|
||||||
type: 'CheckboxControl',
|
type: 'CheckboxControl',
|
||||||
label: t('Legend'),
|
label: t('Legend'),
|
||||||
@ -2114,27 +2065,6 @@ export const controls = {
|
|||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
|
|
||||||
significance_level: {
|
|
||||||
type: 'TextControl',
|
|
||||||
label: t('Significance Level'),
|
|
||||||
default: 0.05,
|
|
||||||
description: t('Threshold alpha level for determining significance'),
|
|
||||||
},
|
|
||||||
|
|
||||||
pvalue_precision: {
|
|
||||||
type: 'TextControl',
|
|
||||||
label: t('p-value precision'),
|
|
||||||
default: 6,
|
|
||||||
description: t('Number of decimal places with which to display p-values'),
|
|
||||||
},
|
|
||||||
|
|
||||||
liftvalue_precision: {
|
|
||||||
type: 'TextControl',
|
|
||||||
label: t('Lift percent precision'),
|
|
||||||
default: 4,
|
|
||||||
description: t('Number of decimal places with which to display lift values'),
|
|
||||||
},
|
|
||||||
|
|
||||||
column_collection: {
|
column_collection: {
|
||||||
type: 'CollectionControl',
|
type: 'CollectionControl',
|
||||||
label: t('Time Series Columns'),
|
label: t('Time Series Columns'),
|
||||||
|
Loading…
Reference in New Issue
Block a user