From c0ace5a0ca92204613e51d7c430ed622d3ff3d6f Mon Sep 17 00:00:00 2001 From: Gmer4Lfe Date: Sat, 15 Aug 2026 19:25:56 -0400 Subject: [PATCH] Split requests and errors into their own columns, and label every figure A host serving thirty-five thousand requests that are all failures read as a busy host when the two counts sat side by side in one run of numbers. --- Plugin/unraid/pages/auth.php | 56 +++++++++++++++++++++++++----------- 1 file changed, 40 insertions(+), 16 deletions(-) diff --git a/Plugin/unraid/pages/auth.php b/Plugin/unraid/pages/auth.php index eb07452..a353d30 100644 --- a/Plugin/unraid/pages/auth.php +++ b/Plugin/unraid/pages/auth.php @@ -251,13 +251,21 @@ require_once dirname(__DIR__) . '/include/ai_chat.php'; /* The one mark worth finding at a glance: it is the difference between a service the household can reach and one the whole internet can. */ .vv-au-m.auth { background:#1a0d2a;border-color:#2a1a4a;color:#9c6ff7;font-weight:600; } -.vv-au-stats { display:flex;gap:8px;align-items:baseline;font-size:10px;white-space:nowrap; } -.vv-au-hits { color:#bbb;font-weight:600;font-size:11px; } -.vv-au-hits.dim { color:#2e2e2e;font-weight:normal; } -.vv-au-sent { color:#4a7a8a; } -.vv-au-err-n { color:#8a7a4a; } -.vv-au-err-n.bad{ color:#ef5350; } -.vv-au-last { color:#3a3a3a;margin-left:auto; } +/* Requests and errors are their own columns now. Right-aligned so the magnitudes line up down the + page — the whole point of the errors column is spotting the one host that is all failures. */ +.vv-au-num { text-align:right;white-space:nowrap;width:1%; } +.vv-au-stat-n { font-size:13px;font-weight:700;color:#bbb;line-height:1.15; } +.vv-au-stat-n.dim { color:#2e2e2e;font-weight:normal;font-size:12px; } +.vv-au-stat-n.ok { color:#2d4a2d; } +.vv-au-stat-n.warn { color:#ff9800; } +.vv-au-stat-n.bad { color:#ef5350; } +/* The unit rides with the number rather than in the header alone: a column of bare figures next + to another column of bare figures is two things you have to look up to tell apart. */ +.vv-au-stat-u { font-size:9px;font-weight:400;color:#4a4a4a;text-transform:uppercase; + letter-spacing:.05em;margin-left:4px; } +.vv-au-stat-s { font-size:9px;color:#3a3a3a;margin-top:1px; } +.vv-au-stat-s.warn { color:#8a6a2a; } +.vv-au-stat-s.bad { color:#a34; } /* A disabled host is still listed — it is a thing you might re-enable — but it should not read as part of what is currently serving. */ .vv-au-off td { opacity:.42; } @@ -346,7 +354,7 @@ $tabs = ['proxies' => 'Proxies', 'users' => 'Users & Groups',
Loading…
- + @@ -677,15 +685,30 @@ function _renderProxies() { p.block_exploits ? 'blk' : '', ].filter(Boolean).join(''); + // Two columns, not one run of numbers. Requests and errors answer different questions — "is + // anything using this" and "is it working" — and a host serving thirty-five thousand requests + // that are all failures read as a busy host when the two sat side by side. + // // Only shown once the aggregator has run. A dash is honest; a zero would read as "nobody has // ever visited this" when it means "nothing has counted yet". - const hits = st ? `${_fmtNum(st.requests)}` : ''; - const sent = st ? `${_fmtBytes(st.bytes)}` : ''; - const errs = (st && (st.s4xx || st.s5xx)) - ? `${_fmtNum(st.s4xx + st.s5xx)} err` - : ''; - const last = (st && st.last_seen) - ? `${_ago(st.last_seen)}` : ''; + const bad = st ? (st.s4xx || 0) + (st.s5xx || 0) : 0; + const pct = (st && st.requests) ? (bad / st.requests * 100) : 0; + // Banded rather than a gradient: the question is which of "fine", "worth a look" and "this is + // not working" applies, and three answers do not need a hundred shades. + const pctCls = pct >= 50 ? ' bad' : (pct >= 5 ? ' warn' : ''); + + // Every figure carries its own word. A bare "15m" next to a byte count is a number you have to + // hover to identify, and the sub-line is the one place there is room to just say it. + const reqCell = st + ? `
${_fmtNum(st.requests)}requests
+
${_fmtBytes(st.bytes)} sent${st.last_seen ? ' · last request ' + _ago(st.last_seen) + ' ago' : ' · never hit'}
` + : '
'; + + const errCell = !st ? '
' + : (bad === 0 + ? `
0errors
` + : `
${_fmtNum(bad)}errors
+
${pct >= 10 ? Math.round(pct) : pct.toFixed(1)}% of requests
`); return ` @@ -693,7 +716,8 @@ function _renderProxies() {
→ ${_esc(fwd)}
${marks}
-
${hits}${sent}${errs}${last}
+ ${reqCell} + ${errCell} ${_togHtml('proxy-' + p.id, enabled, enabled ? 'Enabled — click to disable' : 'Disabled — click to enable')}