diff --git a/status/index.html b/status/index.html index 4909483..712680c 100644 --- a/status/index.html +++ b/status/index.html @@ -680,7 +680,47 @@
- + +
+ + + + diff --git a/status/js/health-check.js b/status/js/health-check.js index 4306275..8116189 100644 --- a/status/js/health-check.js +++ b/status/js/health-check.js @@ -38,7 +38,7 @@

🌍 Global Settings

Applies to all health checks. Settings are stored locally in this browser.

-
+
@@ -49,6 +49,11 @@
How often each service is checked.
+
+ + +
Cap on stored history records per service.
+
@@ -133,12 +138,13 @@ // ---- Global health settings (retention, polling interval, disk threshold) ---- const HEALTH_SETTINGS_KEY = 'dashcaddy-health-settings'; - const HEALTH_DEFAULTS = { retentionDays: 30, pollingInterval: 30, diskUsageThreshold: 80 }; + const HEALTH_DEFAULTS = { retentionDays: 30, pollingInterval: 30, maxEntriesPerService: 500, diskUsageThreshold: 80 }; const globalSaveBtn = document.getElementById('health-global-save'); const globalResetBtn = document.getElementById('health-global-reset'); const globalStatusSpan = document.getElementById('health-global-status'); const retentionInput = document.getElementById('health-setting-retention'); const intervalInput = document.getElementById('health-setting-interval'); + const maxEntriesInput = document.getElementById('health-setting-max-entries'); const diskThresholdInput = document.getElementById('health-setting-disk-threshold'); function loadHealthSettings() { @@ -155,6 +161,7 @@ const s = loadHealthSettings(); if (retentionInput) retentionInput.value = s.retentionDays; if (intervalInput) intervalInput.value = s.pollingInterval; + if (maxEntriesInput) maxEntriesInput.value = s.maxEntriesPerService; if (diskThresholdInput) diskThresholdInput.value = s.diskUsageThreshold; } @@ -162,6 +169,7 @@ const settings = { retentionDays: Math.max(1, Math.min(3650, parseInt(retentionInput?.value) || HEALTH_DEFAULTS.retentionDays)), pollingInterval: Math.max(5, Math.min(3600, parseInt(intervalInput?.value) || HEALTH_DEFAULTS.pollingInterval)), + maxEntriesPerService: Math.max(10, Math.min(100000, parseInt(maxEntriesInput?.value) || HEALTH_DEFAULTS.maxEntriesPerService)), diskUsageThreshold: Math.max(50, Math.min(99, parseInt(diskThresholdInput?.value) || HEALTH_DEFAULTS.diskUsageThreshold)) }; try { diff --git a/status/js/setup-wizard.js b/status/js/setup-wizard.js index c696b9a..476325d 100644 --- a/status/js/setup-wizard.js +++ b/status/js/setup-wizard.js @@ -135,22 +135,6 @@ window.populateTimezoneSelect = function(selectEl, selectedTz) {
`; - // Disk-safety reminder (universal across all config types) - html += ` -
-
- 💾 -
- Disk-space tip: - Health-check monitoring records uptime, response-time, and incident data continuously. - By default DashCaddy keeps 30 days of history and warns at 80% disk usage. - You can tune the retention period, polling interval, and disk threshold later under - Health → Configure → Global Settings. -
-
-
- `; - html += '
'; summaryContent.innerHTML = html; showStep('setup-step-summary'); @@ -393,8 +377,26 @@ window.populateTimezoneSelect = function(selectEl, selectedTz) { }; } - // Finish setup button - const finishBtn = document.getElementById('setup-finish'); + // Summary "Continue →" — advance to the disk-safety warning step + const summaryNext = document.getElementById('setup-summary-next'); + if (summaryNext) { + summaryNext.onclick = function(e) { + e.preventDefault(); + showStep('setup-step-disk-safety'); + }; + } + + // Disk-safety step navigation + const diskSafetyBack = document.getElementById('setup-disk-safety-back'); + if (diskSafetyBack) { + diskSafetyBack.onclick = function(e) { + e.preventDefault(); + showStep('setup-step-summary'); + }; + } + + // Finish setup button (now on the disk-safety step) + const finishBtn = document.getElementById('setup-disk-safety-finish'); if (finishBtn) { finishBtn.onclick = function(e) { e.preventDefault();