fix: Redis 查询格式修复

- rows nil → 空数组: rowsOrDefault() 确保 HGETALL/LRANGE 空集合返回 [] 而非 null
- 扩展只读白名单: PING/CONFIG/CLIENT/SLOWLOG/CLUSTER/MEMORY/OBJECT/DEBUG 等
- 前端 sortedResult: Array.isArray() 检查防止 raw_text 模式报 not iterable
This commit is contained in:
logan committed 2026-05-31 00:34:38 +08:00
1 parent e8fd5f6b63
commit e9a700b9d9
2 files changed
+16 -2

No files matched your search

+1
View File
@@ -244,6 +244,7 @@ export default function QueriesPage() {
/* ---- Result Sorting ---- */
const sortedResult = useMemo(() => {
if (!result || !sortState.column || !sortState.direction) return result;
if (!Array.isArray(result.rows)) return result;
const col = sortState.column; const dir = sortState.direction === 'asc' ? 1 : -1;
return { ...result, rows: [...result.rows].sort((a, b) => {
const av = a[col] ?? ''; const bv = b[col] ?? '';