refactor(ops): 优化阈值检查系统和布局
阈值检查系统优化: - 引入三级阈值系统(normal/warning/critical) - 统一阈值判断逻辑,支持警告和严重两个级别 - 移除硬编码的 TTFT 颜色判断,改用阈值配置 - 新增 getThresholdColorClass 统一颜色映射 布局优化: - 优化详细指标在卡片内的响应式布局 - 改进宽屏下的卡片布局显示 - 优化指标数值的对齐和间距
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user