From 19151d1e4a6d735f4229a28eae2c6b00e1409227 Mon Sep 17 00:00:00 2001 From: SBIN2010 Date: Tue, 22 Oct 2024 23:07:40 +0300 Subject: [PATCH 1/7] fix: fixed Add Metrics to Tree Chart (#29158) --- .../plugins/plugin-chart-echarts/src/Tree/controlPanel.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Tree/controlPanel.tsx b/superset-frontend/plugins/plugin-chart-echarts/src/Tree/controlPanel.tsx index 34d65a27d315..26fafbdc1b7f 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Tree/controlPanel.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Tree/controlPanel.tsx @@ -89,9 +89,7 @@ const controlPanel: ControlPanelConfig = { { name: 'metric', config: { - ...optionalEntity, - type: 'DndMetricSelect', - label: t('Metric'), + ...sharedControls.metric, description: t('Metric for node values'), }, }, From 35aaeb66bf9d01a4e3f1cb7c9c92989b1503b25e Mon Sep 17 00:00:00 2001 From: SBIN2010 Date: Tue, 22 Oct 2024 23:45:27 +0300 Subject: [PATCH 2/7] fix: clear modal after CSS templates is added --- .../src/features/cssTemplates/CssTemplateModal.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/superset-frontend/src/features/cssTemplates/CssTemplateModal.tsx b/superset-frontend/src/features/cssTemplates/CssTemplateModal.tsx index 16af9e7039d3..74f0491543ea 100644 --- a/superset-frontend/src/features/cssTemplates/CssTemplateModal.tsx +++ b/superset-frontend/src/features/cssTemplates/CssTemplateModal.tsx @@ -131,7 +131,10 @@ const CssTemplateModal: FunctionComponent = ({ if (onCssTemplateAdd) { onCssTemplateAdd(); } - + setCurrentCssTemplate({ + template_name: '', + css: '', + }); hide(); }); } From db3afda17db52cf217af4f20b09a4d1e09848117 Mon Sep 17 00:00:00 2001 From: SBIN2010 Date: Wed, 23 Oct 2024 22:15:52 +0300 Subject: [PATCH 3/7] Revert "fix: clear modal after CSS templates is added" This reverts commit 35aaeb66bf9d01a4e3f1cb7c9c92989b1503b25e. --- .../src/features/cssTemplates/CssTemplateModal.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/superset-frontend/src/features/cssTemplates/CssTemplateModal.tsx b/superset-frontend/src/features/cssTemplates/CssTemplateModal.tsx index 74f0491543ea..16af9e7039d3 100644 --- a/superset-frontend/src/features/cssTemplates/CssTemplateModal.tsx +++ b/superset-frontend/src/features/cssTemplates/CssTemplateModal.tsx @@ -131,10 +131,7 @@ const CssTemplateModal: FunctionComponent = ({ if (onCssTemplateAdd) { onCssTemplateAdd(); } - setCurrentCssTemplate({ - template_name: '', - css: '', - }); + hide(); }); } From 9eea2e6fd6ac5cf4f41ae91b2941a9bfea82718b Mon Sep 17 00:00:00 2001 From: SBIN2010 Date: Mon, 25 Nov 2024 21:45:32 +0300 Subject: [PATCH 4/7] fix: tree metrics exclude validator --- .../plugins/plugin-chart-echarts/src/Tree/controlPanel.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Tree/controlPanel.tsx b/superset-frontend/plugins/plugin-chart-echarts/src/Tree/controlPanel.tsx index 26fafbdc1b7f..4d8b0fa978ee 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Tree/controlPanel.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Tree/controlPanel.tsx @@ -90,6 +90,8 @@ const controlPanel: ControlPanelConfig = { name: 'metric', config: { ...sharedControls.metric, + clearable: true, + validators: [], description: t('Metric for node values'), }, }, From 601dde2bb5fbde32df0a7311559b2ccf7e4773e0 Mon Sep 17 00:00:00 2001 From: SBIN2010 Date: Tue, 25 Mar 2025 15:06:36 +0300 Subject: [PATCH 5/7] fix: revert #30679 --- .../plugins/plugin-chart-echarts/src/Tree/controlPanel.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Tree/controlPanel.tsx b/superset-frontend/plugins/plugin-chart-echarts/src/Tree/controlPanel.tsx index 4d8b0fa978ee..34d65a27d315 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Tree/controlPanel.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Tree/controlPanel.tsx @@ -89,9 +89,9 @@ const controlPanel: ControlPanelConfig = { { name: 'metric', config: { - ...sharedControls.metric, - clearable: true, - validators: [], + ...optionalEntity, + type: 'DndMetricSelect', + label: t('Metric'), description: t('Metric for node values'), }, }, From 1bf4fdda7732c9c57c2bddcf001078e3cf9fe68a Mon Sep 17 00:00:00 2001 From: SBIN2010 Date: Sun, 20 Jul 2025 22:04:40 +0300 Subject: [PATCH 6/7] fix --- .../plugins/plugin-chart-echarts/src/Tree/controlPanel.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Tree/controlPanel.tsx b/superset-frontend/plugins/plugin-chart-echarts/src/Tree/controlPanel.tsx index 34d65a27d315..4d8b0fa978ee 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Tree/controlPanel.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Tree/controlPanel.tsx @@ -89,9 +89,9 @@ const controlPanel: ControlPanelConfig = { { name: 'metric', config: { - ...optionalEntity, - type: 'DndMetricSelect', - label: t('Metric'), + ...sharedControls.metric, + clearable: true, + validators: [], description: t('Metric for node values'), }, }, From c7362824b18d67bfc669517e647b313c0e61b3b6 Mon Sep 17 00:00:00 2001 From: SBIN2010 Date: Wed, 10 Sep 2025 21:22:01 +0300 Subject: [PATCH 7/7] fix: correct option all in table page size and remove page_size_options in handlebars const --- .../plugin-chart-handlebars/src/consts.ts | 16 ---------------- .../plugins/plugin-chart-table/src/consts.ts | 2 +- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/superset-frontend/plugins/plugin-chart-handlebars/src/consts.ts b/superset-frontend/plugins/plugin-chart-handlebars/src/consts.ts index f474eb67b349..8b722af54352 100644 --- a/superset-frontend/plugins/plugin-chart-handlebars/src/consts.ts +++ b/superset-frontend/plugins/plugin-chart-handlebars/src/consts.ts @@ -17,23 +17,7 @@ * under the License. */ import { debounce } from 'lodash'; -import { formatSelectOptions } from '@superset-ui/chart-controls'; import { Constants } from '@superset-ui/core/components'; -import { t } from '@superset-ui/core'; - -export const PAGE_SIZE_OPTIONS = formatSelectOptions([ - [0, t('page_size.all')], - 1, - 2, - 3, - 4, - 5, - 10, - 20, - 50, - 100, - 200, -]); export const debounceFunc = debounce( (func: (val: string) => void, source: string) => func(source), diff --git a/superset-frontend/plugins/plugin-chart-table/src/consts.ts b/superset-frontend/plugins/plugin-chart-table/src/consts.ts index 58f60d049f51..e8836228f863 100644 --- a/superset-frontend/plugins/plugin-chart-table/src/consts.ts +++ b/superset-frontend/plugins/plugin-chart-table/src/consts.ts @@ -20,7 +20,7 @@ import { formatSelectOptions } from '@superset-ui/chart-controls'; import { t } from '@superset-ui/core'; export const PAGE_SIZE_OPTIONS = formatSelectOptions([ - [0, t('page_size.all')], + [0, t('All')], 10, 20, 50,