Skip to content

fix(frontend): redis集群类型变更版本过滤参数纠正、tendbcluster接入层主机校验 #9917 #10102

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dbm-ui/frontend/src/layout/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@

.db-navigation-content-header {
position: relative;
z-index: 999;
z-index: 99;
display: flex;
height: 52px;
padding: 0 14px;
Expand Down
1 change: 1 addition & 0 deletions dbm-ui/frontend/src/locales/zh-cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -4328,5 +4328,6 @@
"复制失败实例": "复制失败实例",
"暂无提示": "暂无提示",
"查询 SQL": "查询 SQL",
"非接入层 IP": "非接入层 IP",
"这行勿动!新增翻译请在上一行添加!": ""
}
4 changes: 2 additions & 2 deletions dbm-ui/frontend/src/views/db-manage/redis/common/const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ export const QueryKeyMap: Record<string, string> = {
[ClusterTypes.PREDIXY_REDIS_CLUSTER]: 'redis',
[ClusterTypes.PREDIXY_TENDISPLUS_CLUSTER]: 'tendisplus',
[ClusterTypes.REDIS_INSTANCE]: 'redis',
[ClusterTypes.TWEMPROXY_REDIS_INSTANCE]: 'tendisssd',
[ClusterTypes.TWEMPROXY_TENDIS_SSD_INSTANCE]: 'redis',
[ClusterTypes.TWEMPROXY_REDIS_INSTANCE]: 'tendiscache',
[ClusterTypes.TWEMPROXY_TENDIS_SSD_INSTANCE]: 'tendisssd',
};

// redis 规格有关的集群与机器类型映射,主要处理 RedisCluster 和 Redis主从 合入 TendisCache后端存储的情况
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,16 @@
return Boolean(modelValue.value.bk_host_id);
},
},
{
message: t('非接入层 IP'),
trigger: 'blur',
validator: (value: string) => {
if (!value) {
return true;
}
return modelValue.value.role === 'spider_master' || modelValue.value.role === 'spider_slave';
},
},
];

const { loading, run: queryHost } = useRequest(checkInstance, {
Expand All @@ -132,7 +142,7 @@
cluster_id: item.cluster_id,
ip: item.ip,
master_domain: item.master_domain,
role: item.role === 'slave' ? 'spider_slave' : 'spider_master',
role: item.role,
};
}
},
Expand Down
Loading