Show orphan and junk sizes, and drop a cleanup field nothing could fill

The arr cleanups are entries in DAILY_MAINTENANCE_SCRIPTS, which the orchestrator
invokes with plain bash, so they never get the run record the primary parse needs
— every payload has come from the daily aggregate db. That path read every column
except the byte counts, leaving orphans_sz at its "0B" default, which is
invisible at zero orphans and would have read "12 orphans (0B)" the first time
there were any. 'total' had no source there and no reader anywhere, so it is gone.
Arr Sync now reads "disabled" rather than "never run" when its switch is off.
This commit is contained in:
Gmer4Lfe
2026-08-14 18:15:56 -04:00
parent a11e3d73a7
commit 04aba81ab3
2 changed files with 52 additions and 10 deletions
+8 -5
View File
@@ -250,7 +250,7 @@ function _arrCard(arr) {
<span class="vv-arr-meta-val">${_relTime(cl.last_run)} ${st}</span>
</div>
${cl.tracked != null ? `<div class="vv-arr-meta-sub" style="${orCol}">
${_n(cl.tracked)} files · ${orph} orphans${junk ? ' · ' + junk + ' junk' : ''}
${_n(cl.tracked)} files · ${orph} orphans${orph && cl.orphans_sz && cl.orphans_sz !== '0B' ? ' (' + vvEscHtml(cl.orphans_sz) + ')' : ''}${junk ? ' · ' + junk + ' junk' + (cl.junk_sz && cl.junk_sz !== '0B' ? ' (' + vvEscHtml(cl.junk_sz) + ')' : '') : ''}
</div>` : ''}`;
}
@@ -326,11 +326,14 @@ function _nodeSection(node) {
// ── Sync + Recovery row ───────────────────────────────────────────────────────
function _syncSection(sync, recovery, settings) {
const _card = (title, data, items, extra) => {
// offTxt distinguishes "has not happened yet" from "cannot happen". Both render with no run
// history, and "never run" on a switched-off subsystem reads as a fault waiting to clear —
// it says the thing has not got round to it, when in fact it has been told not to.
const _card = (title, data, items, extra, offTxt) => {
const ok = data.last_run && data.status === 'ok';
const bad = data.last_run && data.status !== 'ok';
const pillCls = !data.last_run ? 'off' : ok ? 'ok' : 'err';
const pillTxt = !data.last_run ? 'never run' : ok ? 'ok' : data.status || 'error';
const pillTxt = !data.last_run ? (offTxt || 'never run') : ok ? 'ok' : data.status || 'error';
let body = '';
if (data.last_run) {
body += `<div style="font-size:11px;color:#555;margin-bottom:10px;">${_relTime(data.last_run)}</div>`;
@@ -359,14 +362,14 @@ function _syncSection(sync, recovery, settings) {
? _item(`<span style="color:#6fcf97">+${_n(sync.added)}</span>`, 'Added') +
(sync.nodes != null ? _item(_n(sync.nodes), 'Nodes') : '') +
(sync.blocklist_count != null ? _item(_n(sync.blocklist_count), 'Blocklist') : '')
: `<span style="color:#333;font-size:11px;">No run history</span>`;
: `<span style="color:#333;font-size:11px;">${syncEnabled ? 'No run history' : 'Nothing to show while disabled'}</span>`;
const recItems = recovery.last_run
? _item(_n(recovery.fixed), 'Fixed') + _item(_n(recovery.searched), 'Re-searched')
: `<span style="color:#333;font-size:11px;">No run history</span>`;
return `<div class="vv-arr-sr-grid">
${_card('Arr Sync', sync, syncItems, syncExtra)}
${_card('Arr Sync', sync, syncItems, syncExtra, syncEnabled ? null : 'disabled')}
${_card('Failed / Stalled Recovery', recovery, recItems, '')}
</div>`;
}