This commit is contained in:
Mateusz Gruszczyński committed 2026-11-14 21:52:48 +01:00
1 parent f48843e934
commit e2c8099d9c
64 files changed
+5354 -673

No files matched your search

+12 -3
View File
@@ -216,6 +216,7 @@ function appHealthChecks(status) {
}
const dockerCheck = window.rustProxyDockerDashboard?.healthCheck?.(status); if (dockerCheck) checks.push(dockerCheck);
const alertsCheck = window.rustProxyAlerts?.check?.(status); if (alertsCheck) checks.push(alertsCheck);
const sink = status.logging?.sinks || {}, errorFile = status.logging?.error_file || {};
const loggingDropped = (Number(sink.queue_dropped) || 0) + (Number(errorFile.queue_dropped) || 0);
const loggingErrors = (Number(sink.errors) || 0) + (Number(errorFile.errors) || 0);
@@ -250,7 +251,7 @@ function renderAppHealth(status = latestStatus) {
const list = $("app-health-checks");
if (list) list.replaceChildren(...checks.map(check => {
const row = el("div", undefined, `app-health-check is-${check.level}`), dot = el("i"), copy = el("div");
dot.setAttribute("aria-hidden", "true"); copy.append(el("strong", check.label), el("p", check.detail, "fine")); row.append(dot, copy); return row;
dot.setAttribute("aria-hidden", "true"); copy.append(el("strong", check.label), el("p", check.detail, "fine")); if (check.extra) copy.append(check.extra); row.append(dot, copy); return row;
}));
}
function enhanceEnabledControl(input, hintKey = "entityEnableHint") {
@@ -313,7 +314,15 @@ window.rustProxyOverviewSamples.onChange(() => {
const nativeScrollAnchoring = typeof CSS !== "undefined" && CSS.supports?.("overflow-anchor", "auto");
function preserveScrollAnchor(render) {
if (nativeScrollAnchoring || window.scrollY <= 0) return render();
if (window.scrollY <= 0) return render();
if (nativeScrollAnchoring) {
const scroller = document.scrollingElement || document.documentElement, before = window.scrollY, height = scroller.scrollHeight;
scroller.style.minHeight = `${height}px`;
let result;
try { result = render(); } finally { requestAnimationFrame(() => { scroller.style.minHeight = ""; }); }
if (window.scrollY < before - 1 && scroller.scrollHeight - window.innerHeight >= before - 1) window.scrollTo(window.scrollX, before);
return result;
}
const probe = document.elementFromPoint(window.innerWidth / 2, window.innerHeight / 2);
const anchor = probe?.closest?.("article, tr, .mini-live-chart, .network-interface-row") || probe;
const before = anchor?.isConnected ? anchor.getBoundingClientRect().top : null;
@@ -371,7 +380,7 @@ function renderStatusNow(s, systemSample = false) {
$("metric-ws-proto-h1").textContent = (Number(m.websocket_h1_active) || 0).toLocaleString(locale());
$("metric-ws-proto-h2").textContent = (Number(m.websocket_h2_active) || 0).toLocaleString(locale());
$("metric-ws-proto-h3").textContent = (Number(m.websocket_h3_active) || 0).toLocaleString(locale());
renderFooter(s); renderDiagnostics(s, true, systemSample); window.rustProxyVhosts?.renderStatus(s); window.rustProxyDocker?.renderStatus(s); window.rustProxyStreams?.renderStatus(s); window.rustProxyStreamDashboard?.render(s); window.rustProxyDockerDashboard?.render(s); window.rustProxyDockerDashboard?.notify?.(s); window.rustProxyBackendDashboard?.render(s); window.rustProxyExtraOverview?.render(s); window.rustProxyWideOverview?.render(s); window.rustProxyWebOverview?.render(s); window.rustProxyWebServer?.renderLive?.(s);
renderFooter(s); renderDiagnostics(s, true, systemSample); window.rustProxyVhosts?.renderStatus(s); window.rustProxyDocker?.renderStatus(s); window.rustProxyStreams?.renderStatus(s); window.rustProxyStreamDashboard?.render(s); window.rustProxyDockerDashboard?.render(s); window.rustProxyDockerDashboard?.notify?.(s); window.rustProxyAlerts?.notify?.(s); window.rustProxyBackendDashboard?.render(s); window.rustProxyExtraOverview?.render(s); window.rustProxyWideOverview?.render(s); window.rustProxyWebOverview?.render(s); window.rustProxyWebServer?.renderLive?.(s);
}
function renderFooter(s) {
const apiLatency = lastApiLatencyMs == null ? "API -" : `API ${lastApiLatencyMs.toFixed(lastApiLatencyMs < 10 ? 1 : 0)} ms`;