fix: keep web-probe screenshot summaries bounded
This commit is contained in:
@@ -943,6 +943,52 @@ select {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.table-frame {
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.runs-table,
|
||||
.runs-table tbody,
|
||||
.runs-table tr,
|
||||
.runs-table td {
|
||||
display: block;
|
||||
width: 100%;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.runs-table {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.runs-table thead {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.runs-table tr {
|
||||
padding: 10px 12px;
|
||||
border-bottom: 1px solid #edf0f4;
|
||||
}
|
||||
|
||||
.runs-table td {
|
||||
display: grid;
|
||||
grid-template-columns: 82px minmax(0, 1fr);
|
||||
gap: 8px;
|
||||
padding: 6px 0;
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
.runs-table td::before {
|
||||
content: attr(data-label);
|
||||
color: var(--muted);
|
||||
font-size: 10px;
|
||||
font-weight: 800;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.run-identity div {
|
||||
grid-template-columns: 54px minmax(0, 1fr);
|
||||
}
|
||||
|
||||
.run-timeline {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
|
||||
@@ -352,14 +352,14 @@ function renderRuns() {
|
||||
const runId = run.runId || run.id || "-";
|
||||
const selected = state.selectedRunId === runId ? " selected-row" : "";
|
||||
return `<tr class="${selected}" data-run-id="${escapeAttr(runId)}">
|
||||
<td><div class="run-identity">
|
||||
<td data-label="运行"><div class="run-identity">
|
||||
<div><span>run</span><code>${escapeHtml(runId)}</code></div>
|
||||
<div><span>observer</span><code>${escapeHtml(run.observerId || "-")}</code></div>
|
||||
</div></td>
|
||||
<td><span class="status-pill ${statusClass(run.status)}">${escapeHtml(displayStatus(run.status))}</span></td>
|
||||
<td>${escapeHtml(run.scenarioId || "-")}</td>
|
||||
<td>${escapeHtml(String(run.findingCount ?? 0))}${run.maxSeverity ? ` <span class="severity-pill ${severityClass(run.maxSeverity)}">${escapeHtml(displaySeverity(run.maxSeverity))}</span>` : ""}</td>
|
||||
<td><span>${escapeHtml(run.updatedAt ? formatRelative(run.updatedAt) : "-")}</span><small>${escapeHtml(run.maintenance ? "维护窗口" : "")}</small></td>
|
||||
<td data-label="状态"><span class="status-pill ${statusClass(run.status)}">${escapeHtml(displayStatus(run.status))}</span></td>
|
||||
<td data-label="场景">${escapeHtml(run.scenarioId || "-")}</td>
|
||||
<td data-label="发现项">${escapeHtml(String(run.findingCount ?? 0))}${run.maxSeverity ? ` <span class="severity-pill ${severityClass(run.maxSeverity)}">${escapeHtml(displaySeverity(run.maxSeverity))}</span>` : ""}</td>
|
||||
<td data-label="更新时间"><span>${escapeHtml(run.updatedAt ? formatRelative(run.updatedAt) : "-")}</span><small>${escapeHtml(run.maintenance ? "维护窗口" : "")}</small></td>
|
||||
</tr>`;
|
||||
}).join("");
|
||||
for (const row of refs.runsBody.querySelectorAll("tr[data-run-id]")) {
|
||||
|
||||
@@ -708,11 +708,11 @@ try {
|
||||
const overflowLeft = -rect.left;
|
||||
if (overflowRight > 1 || overflowLeft > 1) {
|
||||
overflowCount += 1;
|
||||
if (overflow.length < 20) {
|
||||
if (overflow.length < 5) {
|
||||
overflow.push({
|
||||
tag: element.tagName.toLowerCase(),
|
||||
className: String(element.className || "").slice(0, 120),
|
||||
text: String(element.textContent || "").replace(/\s+/g, " ").trim().slice(0, 120),
|
||||
className: String(element.className || "").slice(0, 80),
|
||||
text: String(element.textContent || "").replace(/\s+/g, " ").trim().slice(0, 80),
|
||||
x: Math.round(rect.x),
|
||||
y: Math.round(rect.y),
|
||||
width: Math.round(rect.width),
|
||||
@@ -748,8 +748,8 @@ try {
|
||||
layout,
|
||||
consoleCount: consoleMessages.length,
|
||||
requestFailureCount: requestFailures.length,
|
||||
consoleMessages,
|
||||
requestFailures,
|
||||
consoleMessages: consoleMessages.slice(0, 5),
|
||||
requestFailures: requestFailures.slice(0, 5),
|
||||
valuesRedacted: true,
|
||||
}));
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user