feat(ui): 优化熔断状态显示和健康度格式

- 健康度格式统一为 0-1 小数格式(前后端同步)
- 添加熔断倒计时显示,支持实时更新
- 新增 useCountdownTimer composable 用于倒计时逻辑
- 添加 Key 健康恢复功能(按 API 格式恢复)
- 优化 UI 布局:简化链路预览标题、调整 Key 信息为两行显示
- 修复错误处理顺序(先刷新数据再显示成功提示)
- 减少模板中函数重复调用
This commit is contained in:
fawney19
2026-01-13 18:42:15 +08:00
parent e536b7bc35
commit 1a0a3de2fc
6 changed files with 317 additions and 208 deletions

View File

@@ -638,12 +638,13 @@ export interface RoutingKeyInfo {
is_adaptive: boolean
effective_rpm?: number | null
cache_ttl_minutes: number
health_score: number
health_score: number // 0-1 小数格式
is_active: boolean
api_formats: string[]
allowed_models?: string[] | null // 允许的模型列表null 表示不限制
circuit_breaker_open: boolean
circuit_breaker_formats: string[]
next_probe_at?: string | null // 下次探测时间ISO格式
}
/**