From a97f22dac7c9ec86c177630af4883eae9e750bc9 Mon Sep 17 00:00:00 2001 From: Austin <1344583166@qq.com> Date: Thu, 28 Mar 2024 21:00:19 +0800 Subject: [PATCH] =?UTF-8?q?fix(frontend):=20mysql=E5=AE=9A=E7=82=B9?= =?UTF-8?q?=E5=9B=9E=E6=A1=A3=E5=8D=8F=E8=AE=AE=E8=B0=83=E6=95=B4=20#3758?= =?UTF-8?q?=20#=20Reviewed,=20transaction=20id:=205387?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/RenderData/RenderHost.vue | 25 ++++++++++++++++-- .../com-factory/components/SpecId.vue | 26 +++++++++++++++++++ 2 files changed, 49 insertions(+), 2 deletions(-) diff --git a/dbm-ui/frontend/src/views/mysql/rollback/pages/page1/components/RenderData/RenderHost.vue b/dbm-ui/frontend/src/views/mysql/rollback/pages/page1/components/RenderData/RenderHost.vue index 23d884d3c9..f97be327ab 100644 --- a/dbm-ui/frontend/src/views/mysql/rollback/pages/page1/components/RenderData/RenderHost.vue +++ b/dbm-ui/frontend/src/views/mysql/rollback/pages/page1/components/RenderData/RenderHost.vue @@ -42,7 +42,14 @@ } interface Exposes { - getValue: () => Promise>; + getValue: () => Promise<{ + rollback_host: { + ip: string; + bk_cloud_id: number; + bk_host_id: number; + bk_biz_id: number; + }; + }>; } const props = defineProps(); @@ -57,6 +64,13 @@ let errorMessage = t('IP不存在'); + const rollbackHost = { + ip: '', + bk_cloud_id: 0, + bk_host_id: 0, + bk_biz_id: 0, + }; + const rules = [ { validator: (value: string) => ipv4.test(value), @@ -76,6 +90,13 @@ errorMessage = t('IP不在x业务空闲机模块', { name: bizName }); return false; } + + const { bk_cloud_id: bkCloudId, bk_host_id: bkHostId, ip } = data.hosts_topo_info[0]; + rollbackHost.ip = ip; + rollbackHost.bk_cloud_id = bkCloudId; + rollbackHost.bk_host_id = bkHostId; + rollbackHost.bk_biz_id = currentBizId; + const hostData = data.hosts_topo_info.find((item) => item.bk_cloud_id === props.cloudId); if (!hostData) { errorMessage = t('新主机xx跟目标集群xx须在同一个管控区域', { @@ -103,7 +124,7 @@ defineExpose({ getValue() { return inputRef.value.getValue().then(() => ({ - rollback_ip: localValue.value, + rollback_host: rollbackHost, })); }, }); diff --git a/dbm-ui/frontend/src/views/resource-manage/pool/components/search-box/components/com-factory/components/SpecId.vue b/dbm-ui/frontend/src/views/resource-manage/pool/components/search-box/components/com-factory/components/SpecId.vue index 8f7806c4ef..fe85d685a1 100644 --- a/dbm-ui/frontend/src/views/resource-manage/pool/components/search-box/components/com-factory/components/SpecId.vue +++ b/dbm-ui/frontend/src/views/resource-manage/pool/components/search-box/components/com-factory/components/SpecId.vue @@ -161,6 +161,32 @@ }, ], }, + { + moduleId: 'redis', + label: 'RedisCluster', + name: ClusterTypes.PREDIXY_REDIS_CLUSTER, + children: [ + { + label: t('后端存储机型'), + name: 'tendiscache', + }, + { + label: t('Proxy机型'), + name: 'predixy', + }, + ], + }, + { + moduleId: 'redis', + label: t('Redis主从'), + name: ClusterTypes.REDIS_INSTANCE, + children: [ + { + label: t('后端存储机型'), + name: 'tendiscache', + }, + ], + }, { moduleId: 'bigdata', label: 'ES',