Wait for registered monitor error detail

This commit is contained in:
Codex
2026-07-08 07:56:34 +02:00
parent d500c59255
commit 7f8f9307a9
2 changed files with 6 additions and 3 deletions
@@ -430,12 +430,14 @@ createApp({
}
async function openCheckDetail(item) {
activeCheckItem.value = item || null;
detailCopyState.value = "";
const errorId = checkErrorId(item);
const runId = item?.latestRunId || item?.runId || item?.run?.id || selectedRunId.value || "";
if (runId) syncMonitorDeepLink(runId, "detail", errorId);
if (!errorId) return;
if (!errorId) {
activeCheckItem.value = item || null;
return;
}
try {
const payload = await fetchJson(`/api/errors/${encodeURIComponent(errorId)}`);
activeCheckItem.value = { ...item, ...(payload.finding || {}), errorId, detail: payload.detail || item.detail || null };
+2 -1
View File
@@ -1219,7 +1219,8 @@ if (expectedErrorId) {
for (let index = 0; index < 120; index += 1) {
const dialog = document.querySelector("[data-check-dialog='true']");
const dialogErrorId = dialog?.getAttribute("data-error-id") || "";
if (dialog instanceof HTMLElement && dialogErrorId === errorId) return { requestedErrorId: errorId, ok: true, reason: "dialog-open" };
const title = String(document.querySelector("#check-dialog-title")?.textContent || "").replace(/\s+/g, " ").trim();
if (dialog instanceof HTMLElement && dialogErrorId === errorId && title && title !== "未登记监测项") return { requestedErrorId: errorId, ok: true, reason: "dialog-open-registered" };
const row = document.querySelector('[data-error-id="' + CSS.escape(errorId) + '"]');
if (row instanceof HTMLElement) row.click();
await wait(150);