This commit is contained in:
Mateusz Gruszczyński committed 2026-10-13 00:57:19 +02:00
1 parent 81ab39e70a
commit 101df02a5f
45 files changed
+1148 -2277

No files matched your search

+1 -9
View File
@@ -1,5 +1,4 @@
// All modules must be available before any asynchronous session/config work can
// render the panel. DOMContentLoaded also waits for the complete deferred bundle.
function verifyAdminModules() {
const required = [
["rustProxyIntegrations", "bindings"],
@@ -17,9 +16,6 @@ function verifyAdminModules() {
async function startAdminPanel() {
try {
verifyAdminModules();
// Revalidate the session first. The anonymous document has its own login.js;
// app.js belongs to the authenticated shell and must not fall back to its
// legacy embedded sign-in form when another startup step fails.
const info = await api("/api/auth/session");
await loadLanguages();
setupRequired = false;
@@ -35,9 +31,6 @@ async function startAdminPanel() {
showStartupFailure(e);
}
}
// The previous bootstrap ran while sibling deferred scripts were still loading.
// Starting only after DOMContentLoaded prevents fast API responses from racing
// against a slower or failed JS resource on mobile/reverse-proxied connections.
if (document.readyState === "complete") startAdminPanel();
else document.addEventListener("DOMContentLoaded", startAdminPanel, { once: true });
@@ -159,7 +152,6 @@ $("reload-certificates").addEventListener("click", async () => {
$("reset-certificate").addEventListener("click", () => { $("certificate-form").reset(); $("certificate-file-source").value = "managed"; syncCertificateFileSource(); });
syncCertificateFileSource();
// Dashboard metrics are actual server samples. Null means unavailable, not zero.
let systemSamples = [], connectionOpenSamples = [], connectionExchangeSamples = [], cacheMemorySamples = [], cacheTransientSamples = [], cacheFillSamples = [], cacheColdQueueSamples = [], cacheColdIoSamples = [], cacheColdStorageSamples = [], cacheHitSamples = [], cacheMissSamples = [], cacheBypassSamples = [], lastCacheCounters = null,
processCpuSamples = [], processRssSamples = [], networkRxSamples = [], networkTxSamples = [], responseLatencySamples = [], networkInterfaceSamples = new Map(), settingsDirty = new Set();
const hiddenNetworkInterfaces = (() => {