viberadar 0.3.88 → 0.3.90
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ui/dashboard.html +18 -4
- package/package.json +1 -1
package/dist/ui/dashboard.html
CHANGED
|
@@ -1641,6 +1641,7 @@ const runSessionMap = new Map(); // runId -> sessionId
|
|
|
1641
1641
|
const sessionRunMap = new Map(); // sessionId -> runId
|
|
1642
1642
|
const SESSION_MAX = 25;
|
|
1643
1643
|
const SESSION_LINE_LIMIT = 3000;
|
|
1644
|
+
const RENDER_LINE_LIMIT = 500; // max DOM nodes rendered at once
|
|
1644
1645
|
const SESSIONS_KEY = 'viberadar_sessions';
|
|
1645
1646
|
let terminalSearchQuery = '';
|
|
1646
1647
|
let terminalSearchErrorsOnly = false;
|
|
@@ -1909,10 +1910,23 @@ function renderActiveSession() {
|
|
|
1909
1910
|
if (normalizedQuery && terminalSearchRegex) {
|
|
1910
1911
|
try { regex = new RegExp(normalizedQuery, 'i'); } catch { regex = null; }
|
|
1911
1912
|
}
|
|
1912
|
-
|
|
1913
|
-
|
|
1913
|
+
|
|
1914
|
+
// Cap rendered lines to avoid browser freeze on large agent output
|
|
1915
|
+
const allLines = s.lines;
|
|
1916
|
+
const renderStart = Math.max(0, allLines.length - RENDER_LINE_LIMIT);
|
|
1917
|
+
if (renderStart > 0) {
|
|
1918
|
+
const notice = document.createElement('div');
|
|
1919
|
+
notice.className = 'agent-line dim';
|
|
1920
|
+
notice.textContent = `... показаны последние ${RENDER_LINE_LIMIT} из ${allLines.length} строк ...`;
|
|
1921
|
+
term.appendChild(notice);
|
|
1922
|
+
}
|
|
1923
|
+
|
|
1924
|
+
for (let i = renderStart; i < allLines.length; i++) {
|
|
1925
|
+
const ln = allLines[i];
|
|
1914
1926
|
const text = extractLineText(ln);
|
|
1915
|
-
|
|
1927
|
+
// Exclude diff lines (+/-) from error detection to avoid false positives
|
|
1928
|
+
const isDiffLine = /^[+\-]/.test(text.trimStart());
|
|
1929
|
+
const isErrorLine = !!ln.isError || /(^|\s)❌/.test(text) || (!isDiffLine && /\berror\b/i.test(text));
|
|
1916
1930
|
const isCommandLine = /^\s*⚡\s*\$/.test(text);
|
|
1917
1931
|
if (terminalSearchCurrentRunOnly && currentRunId && s.runId && s.runId !== currentRunId) continue;
|
|
1918
1932
|
if (terminalSearchErrorsOnly && !isErrorLine) continue;
|
|
@@ -2968,7 +2982,7 @@ function renderObsGlobalDetail(c, filterFeatureKey) {
|
|
|
2968
2982
|
const expandBtn = hasAgent ? `<button class="obs-expand-btn" onclick="event.stopPropagation();toggleObsDetail('${groupId}')">▼</button>` : '';
|
|
2969
2983
|
const totalFPs = items.reduce((s,m) => s + m.failurePoints.length, 0);
|
|
2970
2984
|
const detailItems = items.map(m => {
|
|
2971
|
-
const globalIdx =
|
|
2985
|
+
const globalIdx = missingV2.indexOf(m); // index in full unfiltered array — must match server's missingCriticalLogsV2
|
|
2972
2986
|
const fpCount = m.failurePoints.length;
|
|
2973
2987
|
const fpPreview = m.failurePoints.slice(0,3).map(fp =>
|
|
2974
2988
|
`<div class="obs-fp-item"><span class="obs-fp-type">${fpTypeLabels[fp.type]||fp.type}</span><span class="obs-fp-line">~${fp.lineApprox}</span></div>`
|