From da0edc9d9bd231f0e77f19f9b908d4768e7e0f49 Mon Sep 17 00:00:00 2001 From: 3octaves <873551943@qq.com> Date: Wed, 11 Sep 2024 11:39:01 +0800 Subject: [PATCH] =?UTF-8?q?feat(frontend):=20redis=E9=9B=86=E7=BE=A4?= =?UTF-8?q?=E5=AE=B9=E9=87=8F=E5=8F=98=E6=9B=B4=E8=B0=83=E6=95=B4=20#5659?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dbm-ui/frontend/src/services/model/ticket/details/redis.ts | 3 --- .../pages/page1/components/RenderTargetCapacity.vue | 3 +-- .../redis/capacity-change/pages/page1/components/Row.vue | 5 ----- .../demand-factory/redis/ClusterCapacityUpdate.vue | 4 ++-- 4 files changed, 3 insertions(+), 12 deletions(-) diff --git a/dbm-ui/frontend/src/services/model/ticket/details/redis.ts b/dbm-ui/frontend/src/services/model/ticket/details/redis.ts index ed77d8b8ad..7e7d46fbd2 100644 --- a/dbm-ui/frontend/src/services/model/ticket/details/redis.ts +++ b/dbm-ui/frontend/src/services/model/ticket/details/redis.ts @@ -96,9 +96,6 @@ export interface RedisScaleUpDownDetails extends DetailBase { affinity: 'CROS_SUBZONE'; }; }; - display_info?: { - new_group_num: number; - }; }[]; specs: DetailSpecs; } diff --git a/dbm-ui/frontend/src/views/redis/capacity-change/pages/page1/components/RenderTargetCapacity.vue b/dbm-ui/frontend/src/views/redis/capacity-change/pages/page1/components/RenderTargetCapacity.vue index 0aa9fafd04..7fa860e826 100644 --- a/dbm-ui/frontend/src/views/redis/capacity-change/pages/page1/components/RenderTargetCapacity.vue +++ b/dbm-ui/frontend/src/views/redis/capacity-change/pages/page1/components/RenderTargetCapacity.vue @@ -215,7 +215,7 @@ } return Promise.resolve({ shard_num: localValue.value.cluster_shard_num, // props.rowData!.shardNum - group_num: targetObj.value!.requireMachineGroupNum, + group_num: localValue.value.machine_pair, // targetObj.value!.requireMachineGroupNum, capacity: futureCapacity.value ?? 1, future_capacity: futureCapacity.value ?? 1, update_mode: targetObj.value?.updateMode, @@ -226,7 +226,6 @@ affinity: AffinityType.CROS_SUBZONE, // 暂时固定 'CROS_SUBZONE', }, }, - new_group_num: localValue.value.machine_pair, }); }, }); diff --git a/dbm-ui/frontend/src/views/redis/capacity-change/pages/page1/components/Row.vue b/dbm-ui/frontend/src/views/redis/capacity-change/pages/page1/components/Row.vue index ac3aa9269b..3da577a1bf 100644 --- a/dbm-ui/frontend/src/views/redis/capacity-change/pages/page1/components/Row.vue +++ b/dbm-ui/frontend/src/views/redis/capacity-change/pages/page1/components/Row.vue @@ -191,17 +191,12 @@ targetCapacityRef.value!.getValue(), ]).then((data) => { const [version, switchMode, targetCapacity] = data; - const displayInfo = { - new_group_num: targetCapacity.new_group_num, - }; - delete targetCapacity.new_group_num; return { cluster_id: props.data.clusterId, db_version: version, bk_cloud_id: props.data.bkCloudId, online_switch_type: switchMode, ...targetCapacity, - display_info: displayInfo, }; }); }, diff --git a/dbm-ui/frontend/src/views/tickets/common/components/demand-factory/redis/ClusterCapacityUpdate.vue b/dbm-ui/frontend/src/views/tickets/common/components/demand-factory/redis/ClusterCapacityUpdate.vue index 804b1ba07c..4f69521371 100644 --- a/dbm-ui/frontend/src/views/tickets/common/components/demand-factory/redis/ClusterCapacityUpdate.vue +++ b/dbm-ui/frontend/src/views/tickets/common/components/demand-factory/redis/ClusterCapacityUpdate.vue @@ -186,7 +186,7 @@ { title: t('机器组数'), render: () => { - const targetValue = data?.display_info?.new_group_num || 0 + const targetValue = data.shard_num return ( <> {targetValue} @@ -201,7 +201,7 @@ { title: t('机器数量'), render: () => { - const targetValue = (data?.display_info?.new_group_num || 0) * 2 + const targetValue = data.shard_num * 2 return ( <> {targetValue}