From 3dd867c684992ec91ba1faa28304794fc54c3914 Mon Sep 17 00:00:00 2001 From: Gmer4Lfe Date: Sat, 30 May 2026 17:26:09 -0400 Subject: [PATCH] =?UTF-8?q?Fix=20fallback=20state=20key:=20FAILOVER=20?= =?UTF-8?q?=E2=86=92=20FALLBACK=20(was=20never=20matching)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Plugin/unraid/pages/monitor.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Plugin/unraid/pages/monitor.php b/Plugin/unraid/pages/monitor.php index 969b622..cf4301c 100644 --- a/Plugin/unraid/pages/monitor.php +++ b/Plugin/unraid/pages/monitor.php @@ -708,7 +708,7 @@ function vvPollMonitor() { const stateMap = { NORMAL: ['#4caf50', '✓ Nominal'], - FAILOVER: ['#f44336', '⚠ Failover active'], + FALLBACK: ['#f44336', '⚠ Fallback active'], NO_INTERNET: ['#ff9800', '⚡ Internet lost'], DARK: ['#9e9e9e', '◌ Dark mode'], UNKNOWN: ['#444', '— No state file'], @@ -737,7 +737,7 @@ function vvPollMonitor() { // ── State label + outage duration ────────────────────────────────────── let stateExtra = ''; - if (state === 'FAILOVER' || state === 'DARK') { + if (state === 'FALLBACK' || state === 'DARK') { const start = parseInt(fb.failover_start ?? 0); if (start > 0) { const sec = Math.floor(Date.now() / 1000) - start; @@ -747,7 +747,7 @@ function vvPollMonitor() { fbHtml += `
${sLabel}${stateExtra}
`; // ── Handback strike progress ─────────────────────────────────────────── - if (state === 'FAILOVER' && strikes > 0) { + if (state === 'FALLBACK' && strikes > 0) { const dots = Array.from({length: maxStrikes}, (_,i) => `` ).join(''); @@ -759,7 +759,7 @@ function vvPollMonitor() { } // ── Tier badges (FAILOVER only) ──────────────────────────────────────── - if (state === 'FAILOVER') { + if (state === 'FALLBACK') { const t2 = fb.tier2_started === 'true'; const t3 = fb.tier3_started === 'true'; const t4 = fb.tier4_started === 'true'; @@ -811,7 +811,7 @@ function vvPollMonitor() { fbCard.classList.remove('vv-accent-ok','vv-accent-warn','vv-accent-err'); if (!enabled || ptSuspended) fbCard.classList.add('vv-accent-warn'); else if (state === 'NORMAL') fbCard.classList.add('vv-accent-ok'); - else if (state === 'FAILOVER') fbCard.classList.add('vv-accent-err'); + else if (state === 'FALLBACK') fbCard.classList.add('vv-accent-err'); else if (state !== 'UNKNOWN') fbCard.classList.add('vv-accent-warn'); } })();