From 5bd5724fb30e7e74ac1078b75aee65eac346da49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=92=8F=E5=92=8C?= Date: Tue, 5 Mar 2024 11:44:20 +0800 Subject: [PATCH] PullRequest: 349 Fixes oceanbase/odc#1736,#1732,#1734 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Merge branch 'fix/dev-4.2.4-bugs-xyh-030501 of git@code.alipay.com:oceanbase/oceanbase-developer-center.git into dev-4.2.4 https://code.alipay.com/oceanbase/oceanbase-developer-center/pull_requests/349 Signed-off-by: 晓康 * Fixes oceanbase/odc#1736,#1732 * Fixes oceanbase/odc#1734 --- .../Task/PartitionTask/CreateModal/index.tsx | 10 +++++++--- .../PartitionPolicyFormTable/configModal.tsx | 12 ++++++++---- .../component/PartitionPolicyFormTable/index.tsx | 10 ++-------- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/src/component/Task/PartitionTask/CreateModal/index.tsx b/src/component/Task/PartitionTask/CreateModal/index.tsx index f153840e7..93d791581 100644 --- a/src/component/Task/PartitionTask/CreateModal/index.tsx +++ b/src/component/Task/PartitionTask/CreateModal/index.tsx @@ -143,13 +143,17 @@ const CreateModal: React.FC = inject('modalStore')( __id: index, containsCreateStrategy, containsDropStrategy, - strategies: getStrategyByConfig(config), + strategies: [], tableName, partitionMode, option: { - partitionKeyConfigs: partition.partitionOption.columnNames.map((name) => ({ + partitionKeyConfigs: partition.partitionOption?.columnNames?.map((name) => ({ name, - })), + })) ?? [ + { + name: partition.partitionOption?.expression, + }, + ], }, }; }), diff --git a/src/component/Task/component/PartitionPolicyFormTable/configModal.tsx b/src/component/Task/component/PartitionPolicyFormTable/configModal.tsx index 8365e346b..d47ad8b72 100644 --- a/src/component/Task/component/PartitionPolicyFormTable/configModal.tsx +++ b/src/component/Task/component/PartitionPolicyFormTable/configModal.tsx @@ -192,7 +192,7 @@ const ConfigDrawer: React.FC = (props) => { partitionKeyInvoker: isDateType ? PARTITION_KEY_INVOKER.TIME_INCREASING_GENERATOR : PARTITION_KEY_INVOKER.CUSTOM_GENERATOR, - ...item.option.partitionKeyConfigs[index], + ...item.option.partitionKeyConfigs?.[index], type, }; }), @@ -345,8 +345,10 @@ const ConfigDrawer: React.FC = (props) => { formData.template.partitionNameInvoker = PARTITION_NAME_INVOKER.CUSTOM_PARTITION_NAME_GENERATOR; formData.template.partitionNameInvokerParameters = { - generateExpr, - intervalGenerateExpr, + partitionNameGeneratorConfig: { + generateExpr, + intervalGenerateExpr, + }, }; } @@ -544,7 +546,9 @@ const ConfigDrawer: React.FC = (props) => { id: 'src.component.Task.component.PartitionPolicyFormTable.D50C1358', }) /*"分区类型"*/ } - >{`${tableLabels}${moreText}`} + > + Range + = (props) => {
{label?.length ? ( - - { - formatMessage({ - id: 'src.component.Task.component.PartitionPolicyFormTable.92C4082E' /*已设置: */, - }) /* 已设置:  */ - } - + 已设置: {label} ) : ( @@ -178,7 +172,7 @@ const PartitionPolicyFormTable: React.FC = (props) => { function handleFilter(data: ITableConfig[]) { const { tableName } = filters ?? {}; return data - ?.filter((item) => (isOnlyNoSetTable ? !item?.option : true)) + ?.filter((item) => (isOnlyNoSetTable ? !item?.strategies?.length : true)) ?.filter((item) => { return tableName?.[0] ? item.tableName.indexOf(tableName[0]) > -1 : true; });