diff --git a/dbm-ui/frontend/src/views/db-manage/redis/apply/ApplyRedis.vue b/dbm-ui/frontend/src/views/db-manage/redis/apply/ApplyRedis.vue index 0acd4fff2d..b06f4a0dbe 100644 --- a/dbm-ui/frontend/src/views/db-manage/redis/apply/ApplyRedis.vue +++ b/dbm-ui/frontend/src/views/db-manage/redis/apply/ApplyRedis.vue @@ -629,11 +629,16 @@ }; const handleChangeClusterType = () => { + const count = [ClusterTypes.PREDIXY_TENDISPLUS_CLUSTER, ClusterTypes.PREDIXY_REDIS_CLUSTER].includes( + state.formdata.details.cluster_type, + ) + ? 3 + : 1; state.formdata.details.db_version = ''; state.formdata.details.resource_spec.proxy.spec_id = ''; state.formdata.details.resource_spec.backend_group = { ...state.formdata.details.resource_spec.backend_group, - count: 1, + count, spec_id: '', capacity: '', future_capacity: '', diff --git a/dbm-ui/frontend/src/views/db-manage/redis/apply/components/backend-spec/Index.vue b/dbm-ui/frontend/src/views/db-manage/redis/apply/components/backend-spec/Index.vue index 294ea6294d..9877b77e58 100644 --- a/dbm-ui/frontend/src/views/db-manage/redis/apply/components/backend-spec/Index.vue +++ b/dbm-ui/frontend/src/views/db-manage/redis/apply/components/backend-spec/Index.vue @@ -110,9 +110,9 @@ const specs = shallowRef([]); const countMap = shallowRef({} as Record) - const isTendisCache = computed(() => props.clusterType === ClusterTypes.TWEMPROXY_REDIS_INSTANCE); - const targetCapacityTitle = computed(() => (isTendisCache.value ? t('集群容量需求(内存容量)') : t('集群容量需求(磁盘容量)'))); - const futureCapacityTitle = computed(() => (isTendisCache.value ? t('未来集群容量需求(内存容量)') : t('未来集群容量需求(磁盘容量)'))); + const isMemoryType = computed(() => [ClusterTypes.TWEMPROXY_REDIS_INSTANCE, ClusterTypes.PREDIXY_REDIS_CLUSTER].includes(props.clusterType as ClusterTypes)); + const targetCapacityTitle = computed(() => (isMemoryType.value ? t('集群容量需求(内存容量)') : t('集群容量需求(磁盘容量)'))); + const futureCapacityTitle = computed(() => (isMemoryType.value ? t('未来集群容量需求(内存容量)') : t('未来集群容量需求(磁盘容量)'))); const columns = [ { diff --git a/dbm-ui/frontend/src/views/db-manage/redis/apply/components/backend-spec/components/CustomSchema.vue b/dbm-ui/frontend/src/views/db-manage/redis/apply/components/backend-spec/components/CustomSchema.vue index dbf85f3450..1f5426195e 100644 --- a/dbm-ui/frontend/src/views/db-manage/redis/apply/components/backend-spec/components/CustomSchema.vue +++ b/dbm-ui/frontend/src/views/db-manage/redis/apply/components/backend-spec/components/CustomSchema.vue @@ -20,7 +20,7 @@ @@ -103,6 +103,16 @@ const specSelectorRef = ref>(); const shardNum = ref(1); + const countMin = computed(() => { + if ( + [ClusterTypes.PREDIXY_TENDISPLUS_CLUSTER, ClusterTypes.PREDIXY_REDIS_CLUSTER].includes( + props.clusterType as ClusterTypes, + ) + ) { + return 3; + } + return 1; + }); const clusterShardNum = computed(() => modelValue.value.count * shardNum.value || ''); const totalCapcity = computed(() => { diff --git a/dbm-ui/frontend/src/views/db-manage/redis/common/cluster-deploy-plan/Index.vue b/dbm-ui/frontend/src/views/db-manage/redis/common/cluster-deploy-plan/Index.vue index 2f672bb5b3..c4b0e05c91 100644 --- a/dbm-ui/frontend/src/views/db-manage/redis/common/cluster-deploy-plan/Index.vue +++ b/dbm-ui/frontend/src/views/db-manage/redis/common/cluster-deploy-plan/Index.vue @@ -307,9 +307,9 @@ } return true }); - const isTendisCache = computed(() => props.data.clusterType === ClusterTypes.TWEMPROXY_REDIS_INSTANCE); - const targetCapacityTitle = computed(() => (isTendisCache.value ? t('目标集群容量需求(内存容量)') : t('目标集群容量需求(磁盘容量)'))); - const futureCapacityTitle = computed(() => (isTendisCache.value ? t('未来集群容量需求(内存容量)') : t('未来集群容量需求(磁盘容量)'))); + const isMemoryType = computed(() => [ClusterTypes.TWEMPROXY_REDIS_INSTANCE, ClusterTypes.PREDIXY_REDIS_CLUSTER].includes(props.data.clusterType)); + const targetCapacityTitle = computed(() => (isMemoryType.value ? t('目标集群容量需求(内存容量)') : t('目标集群容量需求(磁盘容量)'))); + const futureCapacityTitle = computed(() => (isMemoryType.value ? t('未来集群容量需求(内存容量)') : t('未来集群容量需求(磁盘容量)'))); const currentSpec = computed(() => { if (props?.data) {