refactor(ops): 优化阈值检查系统和布局

阈值检查系统优化:
- 引入三级阈值系统(normal/warning/critical)
- 统一阈值判断逻辑,支持警告和严重两个级别
- 移除硬编码的 TTFT 颜色判断,改用阈值配置
- 新增 getThresholdColorClass 统一颜色映射

布局优化:
- 优化详细指标在卡片内的响应式布局
- 改进宽屏下的卡片布局显示
- 优化指标数值的对齐和间距
This commit is contained in:
IanShaw027
2026-01-15 19:50:31 +08:00
parent 93b5b7474b
commit 38961ba10e
2 changed files with 68 additions and 56 deletions

View File

@@ -693,8 +693,8 @@ onMounted(async () => {
async function loadThresholds() {
try {
const settings = await opsAPI.getAlertRuntimeSettings()
metricThresholds.value = settings.thresholds || null
const thresholds = await opsAPI.getMetricThresholds()
metricThresholds.value = thresholds || null
} catch (err) {
console.warn('[OpsDashboard] Failed to load thresholds', err)
metricThresholds.value = null