feat(web2): /api/db-defaults 改读 web2 yaml + 列表结构返回
- 路径:web/configs/db_defaults.yaml → web2/configs/db_defaults.yaml
(web2 与 web1 配置完全分离,2026-08-17 起)
- 新增 _normalize_defaults():
- 新格式 {db_type: [conn, ...]} → 直接归一化(自动注入 id + db_type)
- 旧格式 {db_type: {conn}} → 包成单元素 list(向后兼容)
- 返回结构:{mysql: [{...}, ...], dameng: [...], oracle: [...]}
每个连接有 id + db_type(自动注入,避免前端漏字段 → FastAPI 422)
- _mask_password 加 id 字段打印,日志输出加「总连接数 + 各 type 数」统计
Showing
Please register or sign in to comment