[glm-grade=A] feat: add disk-safety warning to setup wizard + health retention settings
CI / Test & Lint (push) Canceled after 0s
CI / Security audit (push) Canceled after 0s

C-grade round-1 blockers fixed:
- [HIGH] retention default 14d → 30d to match engine (health-checker.js:34)
- [MEDIUM] phantom 'Settings → Disk Safety' path removed
- [MEDIUM] dangling 'stats polling interval' bullet (no such control in modal)
- [LOW] exaggerated 'hundreds of MB' → 'tens of MB'
- [LOW] button label mismatch (real button is '💾 Disk')

GLM round 2 verified all 5 fixes landed; no new regressions; HTML balanced.

Pre-existing follow-up parked: disk-settings.json saved values not reloaded by engine on container restart (out of scope for this commit).
This commit is contained in:
Hermes
2026-08-17 15:14:59 -07:00
parent e99413150e
commit 4555d829ac
2 changed files with 18 additions and 9 deletions
+9 -9
View File
@@ -694,9 +694,9 @@
<span style="font-size: 1.5rem; line-height: 1.2;">⚠️</span> <span style="font-size: 1.5rem; line-height: 1.2;">⚠️</span>
<div style="font-size: 0.92rem; line-height: 1.55; color: var(--text);"> <div style="font-size: 0.92rem; line-height: 1.55; color: var(--text);">
<strong style="color: var(--warn-fg, #f39c12);">Disk Usage Note:</strong> <strong style="color: var(--warn-fg, #f39c12);">Disk Usage Note:</strong>
DashCaddy stores health check history, container statistics, and event logs. DashCaddy stores up to <strong>500 health check entries per service</strong> (plus container statistics and event logs).
On a busy server, this data can accumulate over time. At high check frequencies this may consume significant disk space — on a host with many services the history file can grow to tens of megabytes.
Set appropriate retention limits in <strong>Settings → Health</strong> to prevent disk fill. Adjust the <strong>health check interval</strong>, <strong>max entries per service</strong>, and <strong>health retention period</strong> in <strong>Disk Safety</strong> (the 💾 Disk button in the top bar) to control disk usage.
</div> </div>
</div> </div>
</div> </div>
@@ -704,12 +704,12 @@
<div style="margin-top: 16px; padding: 14px 16px; background: var(--card-bg); border-radius: 8px; border: 1px solid var(--border);"> <div style="margin-top: 16px; padding: 14px 16px; background: var(--card-bg); border-radius: 8px; border: 1px solid var(--border);">
<strong style="font-size: 0.9rem;">📋 Recommended after setup</strong> <strong style="font-size: 0.9rem;">📋 Recommended after setup</strong>
<ul style="margin: 8px 0 0; padding-left: 20px; font-size: 0.85rem; color: var(--muted); line-height: 1.6;"> <ul style="margin: 8px 0 0; padding-left: 20px; font-size: 0.85rem; color: var(--muted); line-height: 1.6;">
<li>Open <strong>Health → Configure → Global Settings</strong></li> <li>Open the <strong>💾 Disk</strong> button in the top bar (opens the Disk Safety modal)</li>
<li>Set a <strong>health check polling interval</strong> (default: 60s)</li> <li>Set a <strong>health check polling interval</strong> (default: 30s)</li>
<li>Set a <strong>stats polling interval</strong> (default: 30s)</li> <li>Set a <strong>health retention period</strong> (default: 30 days)</li>
<li>Set a <strong>data retention period</strong> (default: 30 days)</li> <li>Cap <strong>max health entries per service</strong> (default: 500)</li>
<li>Cap <strong>max entries per service</strong> (default: 500)</li> <li>Cap <strong>max stats entries</strong> (default: 500)</li>
<li>Set a <strong>disk-usage warning threshold</strong> (default: 80%)</li> <li>Click <strong>Clean Up Now</strong> to purge old data immediately</li>
</ul> </ul>
</div> </div>
+9
View File
@@ -47,6 +47,15 @@
</div> </div>
</div> </div>
<div style="background:rgba(243,156,18,0.08);border:1px solid rgba(243,156,18,0.25);border-radius:8px;padding:12px;margin-bottom:16px;">
<div style="font-size:0.82rem;color:#f0a040;line-height:1.45;">
⚠ <strong>Disk impact:</strong> Lowering the health check interval increases how often data is written to disk.
DashCaddy caps history at <strong>max entries per service</strong> and prunes entries older than the retention period,
so these two values together determine steady-state disk usage. For busy hosts, prefer a longer interval (60120s)
and a lower entry cap.
</div>
</div>
<div style="display:grid;gap:16px;"> <div style="display:grid;gap:16px;">
${settingRow('Health Check Interval', 'healthInterval', c.healthCheckInterval, 'seconds', Math.round((c.healthCheckInterval||30000)/1000), 5, 300)} ${settingRow('Health Check Interval', 'healthInterval', c.healthCheckInterval, 'seconds', Math.round((c.healthCheckInterval||30000)/1000), 5, 300)}
${settingRow('Max Health Entries/Service', 'healthMaxEntries', c.healthMaxEntries, 'entries', c.healthMaxEntries||500, 50, 5000)} ${settingRow('Max Health Entries/Service', 'healthMaxEntries', c.healthMaxEntries, 'entries', c.healthMaxEntries||500, 50, 5000)}