mirror of
https://github.com/Syngnat/GoNavi.git
synced 2026-07-07 11:01:33 +08:00
🐛 fix(redis): 修复超过16个数据库无法展示
- 后端改为通过 CONFIG GET databases 动态获取 Redis 数据库数量 - 放宽单机和 Sentinel 模式的 RedisDB 索引限制,支持 db16 及以上 - 前端连接配置和持久化不再裁剪高编号 Redis 数据库 - 连接测试成功后按服务端返回的真实数据库列表展示可选 DB - 增加 Redis db31 展示、切换、保存和 URI 解析回归测试 Refs #558
This commit is contained in:
@@ -79,7 +79,7 @@ describe('redisConnectionUri', () => {
|
||||
redisSentinelMaster: 'mymaster',
|
||||
redisSentinelUser: 'ops',
|
||||
redisSentinelPassword: 'sentinel-pass',
|
||||
redisDB: 0,
|
||||
redisDB: 99,
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -250,9 +250,8 @@ const appendRedisSSLPathParamsForUri = (
|
||||
|
||||
const normalizeRedisDB = (value: unknown): number => {
|
||||
const parsed = Number(value);
|
||||
return Number.isFinite(parsed) && parsed >= 0 && parsed <= 15
|
||||
? Math.trunc(parsed)
|
||||
: 0;
|
||||
if (!Number.isFinite(parsed) || parsed < 0) return 0;
|
||||
return Math.trunc(parsed);
|
||||
};
|
||||
|
||||
const normalizeRedisTopology = (value: unknown): RedisTopology => {
|
||||
|
||||
Reference in New Issue
Block a user