mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
refactor: Adds the sort_by_metric control to sharedControls (#29325)
This commit is contained in:
committed by
GitHub
parent
79d84f30f5
commit
fe3ba12801
@@ -62,12 +62,8 @@ const config: ControlPanelConfig = {
|
||||
{
|
||||
name: 'sort_by_metric',
|
||||
config: {
|
||||
...sharedControls.sort_by_metric,
|
||||
default: true,
|
||||
type: 'CheckboxControl',
|
||||
label: t('Sort by metric'),
|
||||
description: t(
|
||||
'Whether to sort results by the selected metric in descending order.',
|
||||
),
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
@@ -53,18 +53,7 @@ const config: ControlPanelConfig = {
|
||||
},
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
name: 'sort_by_metric',
|
||||
config: {
|
||||
type: 'CheckboxControl',
|
||||
label: t('Sort by metric'),
|
||||
description: t(
|
||||
'Whether to sort results by the selected metric in descending order.',
|
||||
),
|
||||
},
|
||||
},
|
||||
],
|
||||
['sort_by_metric'],
|
||||
],
|
||||
},
|
||||
{
|
||||
|
||||
@@ -26,6 +26,7 @@ import {
|
||||
D3_FORMAT_OPTIONS,
|
||||
D3_TIME_FORMAT_OPTIONS,
|
||||
getStandardizedControls,
|
||||
sharedControls,
|
||||
} from '@superset-ui/chart-controls';
|
||||
import { DEFAULT_FORM_DATA } from './types';
|
||||
import { legendSection } from '../controls';
|
||||
@@ -56,12 +57,8 @@ const config: ControlPanelConfig = {
|
||||
{
|
||||
name: 'sort_by_metric',
|
||||
config: {
|
||||
...sharedControls.sort_by_metric,
|
||||
default: true,
|
||||
type: 'CheckboxControl',
|
||||
label: t('Sort by metric'),
|
||||
description: t(
|
||||
'Whether to sort results by the selected metric in descending order.',
|
||||
),
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
@@ -42,18 +42,7 @@ const config: ControlPanelConfig = {
|
||||
['secondary_metric'],
|
||||
['adhoc_filters'],
|
||||
['row_limit'],
|
||||
[
|
||||
{
|
||||
name: 'sort_by_metric',
|
||||
config: {
|
||||
type: 'CheckboxControl',
|
||||
label: t('Sort by metric'),
|
||||
description: t(
|
||||
'Whether to sort results by the selected metric in descending order.',
|
||||
),
|
||||
},
|
||||
},
|
||||
],
|
||||
['sort_by_metric'],
|
||||
],
|
||||
},
|
||||
{
|
||||
|
||||
@@ -40,18 +40,7 @@ const config: ControlPanelConfig = {
|
||||
['groupby'],
|
||||
['metric'],
|
||||
['row_limit'],
|
||||
[
|
||||
{
|
||||
name: 'sort_by_metric',
|
||||
config: {
|
||||
type: 'CheckboxControl',
|
||||
label: t('Sort by metric'),
|
||||
description: t(
|
||||
'Whether to sort results by the selected metric in descending order.',
|
||||
),
|
||||
},
|
||||
},
|
||||
],
|
||||
['sort_by_metric'],
|
||||
['adhoc_filters'],
|
||||
],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user