From c9d118631b96348185bffe7d5819dfa353d01224 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=95=85=E6=99=9A?= Date: Wed, 13 Nov 2024 17:24:38 +0800 Subject: [PATCH 1/2] PullRequest: 573 fix: update task status enum MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Merge branch 'fix/task_status_enum of git@code.alipay.com:oceanbase/oceanbase-developer-center.git into dev-4.3.2 https://code.alipay.com/oceanbase/oceanbase-developer-center/pull_requests/573 Signed-off-by: 晓康 * fix: update task status enum * fix: update task operate enum --- src/component/Task/component/ActionBar/index.tsx | 5 +++-- .../Task/component/CommonDetailModal/TaskOperationRecord.tsx | 2 +- src/component/Task/component/Status/index.tsx | 2 +- src/d.ts/index.ts | 4 ++-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/component/Task/component/ActionBar/index.tsx b/src/component/Task/component/ActionBar/index.tsx index 8172f0684..5ecdc01db 100644 --- a/src/component/Task/component/ActionBar/index.tsx +++ b/src/component/Task/component/ActionBar/index.tsx @@ -43,6 +43,7 @@ import { SubTaskStatus, TaskDetail, TaskExecStrategy, + TaskOperationType, TaskRecord, TaskRecordParameters, TaskStatus, @@ -477,7 +478,7 @@ const ActionBar: React.FC = inject( taskType: TaskType.ALTER_SCHEDULE, parameters: { taskId: task?.id, - operationType: 'TERMINATION', + operationType: TaskOperationType.TERMINATED, }, }); props?.onReload?.(); @@ -1046,7 +1047,7 @@ const ActionBar: React.FC = inject( break; } case TaskStatus.APPROVAL_EXPIRED: - case TaskStatus.TERMINATION: { + case TaskStatus.TERMINATED: { if (isOperator) { tools = [viewBtn]; } else { diff --git a/src/component/Task/component/CommonDetailModal/TaskOperationRecord.tsx b/src/component/Task/component/CommonDetailModal/TaskOperationRecord.tsx index b7b9e5904..7ae78bd5c 100644 --- a/src/component/Task/component/CommonDetailModal/TaskOperationRecord.tsx +++ b/src/component/Task/component/CommonDetailModal/TaskOperationRecord.tsx @@ -46,7 +46,7 @@ export const operationTypeMap = { id: 'odc.component.CommonTaskDetailModal.TaskOperationRecord.DisableATask', defaultMessage: '停用任务', }), //停用任务 - [TaskOperationType.TERMINATION]: formatMessage({ + [TaskOperationType.TERMINATED]: formatMessage({ id: 'odc.component.CommonTaskDetailModal.TaskOperationRecord.TerminateATask', defaultMessage: '终止任务', }), //终止任务 diff --git a/src/component/Task/component/Status/index.tsx b/src/component/Task/component/Status/index.tsx index 95770e564..d6cb25c0a 100644 --- a/src/component/Task/component/Status/index.tsx +++ b/src/component/Task/component/Status/index.tsx @@ -491,7 +491,7 @@ export const cycleStatus = { }), //已禁用 }, - [TaskStatus.TERMINATION]: { + [TaskStatus.TERMINATED]: { icon: ( Date: Wed, 13 Nov 2024 17:42:51 +0800 Subject: [PATCH 2/2] =?UTF-8?q?PullRequest:=20574=20fix:=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BD=92=E6=A1=A3=E6=81=A2=E5=A4=8D=E6=95=B0=E6=8D=AE=E5=A4=A7?= =?UTF-8?q?=E5=B0=8F=E6=B5=81=E9=99=90=E5=88=B6=E8=BE=93=E5=85=A5=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Merge branch 'fix/dataArchiveCreateRecoveryDataSizeFlowRestriction of git@code.alipay.com:oceanbase/oceanbase-developer-center.git into dev-4.3.2 https://code.alipay.com/oceanbase/oceanbase-developer-center/pull_requests/574 Signed-off-by: 晓康 * fix:数据归档恢复数据大小流限制输入框 * fix:cr评论修改 通过开关控制展示 * fix:修改字段名 --- .../DataArchiveTask/CreateModal/index.tsx | 2 +- .../Task/component/ThrottleFormItem/index.tsx | 43 +++++++++++++++++++ 2 files changed, 44 insertions(+), 1 deletion(-) diff --git a/src/component/Task/DataArchiveTask/CreateModal/index.tsx b/src/component/Task/DataArchiveTask/CreateModal/index.tsx index cf53129b5..8a3683f47 100644 --- a/src/component/Task/DataArchiveTask/CreateModal/index.tsx +++ b/src/component/Task/DataArchiveTask/CreateModal/index.tsx @@ -710,7 +710,7 @@ const CreateModal: React.FC = (props) => { - + diff --git a/src/component/Task/component/ThrottleFormItem/index.tsx b/src/component/Task/component/ThrottleFormItem/index.tsx index 825f9b6a1..988b6bc00 100644 --- a/src/component/Task/component/ThrottleFormItem/index.tsx +++ b/src/component/Task/component/ThrottleFormItem/index.tsx @@ -19,6 +19,7 @@ import HelpDoc from '@/component/helpDoc'; import setting from '@/store/setting'; import { Form, InputNumber, Space } from 'antd'; import React from 'react'; +import { TaskType } from '@/d.ts'; interface IProps { initialValue?: { rowLimit?: number; @@ -26,12 +27,14 @@ interface IProps { }; maxRowLimit?: number; maxDataSizeLimit?: number; + isShowDataSizeLimit?: boolean; } const ThrottleFormItem: React.FC = (props) => { const { initialValue, maxRowLimit = setting.maxSingleTaskRowLimit, maxDataSizeLimit = setting.maxSingleTaskDataSizeLimit, + isShowDataSizeLimit, } = props; return ( = (props) => { Rows/s + {isShowDataSizeLimit ? ( + + + { + formatMessage({ + id: 'odc.src.component.Task.component.ThrottleFormItem.DataSizeLimit', + defaultMessage: '数据大小限流', + }) /* 数据大小限流 */ + } + + + + } + required + > + + + + + MB/s + + + ) : null} );