Merge pull request #1340 from pikasTech/fix/1335-dashboard-verify-timing-detail

fix: hide internal sentinel check ids in monitor
This commit is contained in:
Lyon
2026-07-01 08:50:41 +08:00
committed by GitHub
2 changed files with 33 additions and 3 deletions
@@ -95,6 +95,31 @@ const checkDisplayCatalog = {
title: "业务轮次未完成",
summary: "巡检未确认到稳定的业务交互结果,不能作为恢复证据。",
},
"frontend-browser-memory-rss-red": {
code: "CHECK-801",
title: "页面内存超出预算",
summary: "页面有效内存超过配置红线,已按阻塞错误展示。",
},
"frontend-browser-memory-growth-red": {
code: "CHECK-802",
title: "页面内存持续增长",
summary: "页面有效内存在观察窗口内持续增长并超过配置预算,符合卡死风险特征。",
},
"frontend-browser-freeze-runner-blocker": {
code: "CHECK-803",
title: "浏览器冻结已阻塞",
summary: "浏览器冻结策略已触发,巡检中止页面并报红,不能用刷新或兜底掩盖。",
},
"frontend-playwright-responsiveness-red": {
code: "CHECK-804",
title: "页面响应探测超时",
summary: "页面响应探测超过配置预算,已按前端卡死处理并报红。",
},
"frontend-cdp-metrics-timeout-red": {
code: "CHECK-805",
title: "浏览器指标采集超时",
summary: "浏览器侧指标连续采集超时,说明页面运行时可能已经无响应。",
},
};
createApp({
@@ -1230,7 +1255,7 @@ function checkDisplay(item) {
const rawCode = rawCheckCode(item);
const rawId = rawFindingId(item);
const registered = checkDisplayCatalog[rawId] || checkDisplayCatalog[rawCode];
const serviceCode = displayCheckCode(item?.checkCode || item?.check?.code);
const serviceCode = publicCheckCode(item?.checkCode || item?.check?.code);
if (registered) {
return {
...registered,
@@ -1240,7 +1265,7 @@ function checkDisplay(item) {
};
}
return {
code: serviceCode || displayCheckCode(rawId || rawCode) || stableCheckCode(rawCode),
code: serviceCode || publicCheckCode(rawId || rawCode) || stableCheckCode(rawCode || rawId),
title: safeUserText(item?.checkTitleZh || item?.check?.titleZh) || "未登记监测项",
summary: safeUserText(item?.checkSummaryZh || item?.summary || item?.evidenceSummary) || "已记录监测项详情,见报告原文。",
};
@@ -1261,6 +1286,11 @@ function displayCheckCode(value) {
return text;
}
function publicCheckCode(value) {
const text = displayCheckCode(value);
return /^(?:CHECK|WBC)-\d+$/u.test(text) ? text : "";
}
function stableCheckCode(value) {
const text = String(value || "unknown");
let hash = 0;
+1 -1
View File
@@ -674,7 +674,7 @@ const dom = await page.evaluate(async ({ expectedRoutePrefix, expectedSentinelId
const runListText = text(".run-list");
const timingVisibility = {
latestRunMinutes: latestRunCounts.durationMinutes,
detailHasDuration: /运行分钟\s+[\d.]+\s*分钟/u.test(detailText),
detailHasDuration: /运行分钟\s*[\d.]+\s*分钟/u.test(detailText),
listHasDuration: /运行\s+[\d.]+\s*分钟/u.test(runListText),
tooltipHasDuration: trendTooltipSummary.hasDuration,
};