[grade=A] deploy: rebuild dist with 31-language i18n + disk safety wizard + health settings
This commit is contained in:
+19
-1
@@ -1,10 +1,28 @@
|
||||
// ===== DASHBOARD CONSTANTS =====
|
||||
// Honor persisted health retention settings for polling cadences so the
|
||||
// Settings → Health → Global Settings panel actually takes effect. The
|
||||
// STATS interval (resource/container stat sampling) is driven from the
|
||||
// user-configurable statsPollingInterval. HEALTH is the lightweight card
|
||||
// badge refresh and stays at its fast default unless overridden.
|
||||
(function applyHealthPollingSettings() {
|
||||
try {
|
||||
var raw = (typeof localStorage !== 'undefined' && localStorage.getItem('dashcaddy-health-settings')) || null;
|
||||
if (raw) {
|
||||
var s = JSON.parse(raw);
|
||||
// values are stored in seconds; DC.POLL expects milliseconds
|
||||
if (s.statsPollingInterval && s.statsPollingInterval >= 5 && s.statsPollingInterval <= 3600) {
|
||||
window.__DC_STATS_OVERRIDE = s.statsPollingInterval * 1000;
|
||||
}
|
||||
}
|
||||
} catch (_) { /* ignore — fall back to defaults below */ }
|
||||
})();
|
||||
|
||||
const DC = {
|
||||
NAME: 'DashCaddy',
|
||||
POLL: {
|
||||
DASHBOARD: 10000, // 10s — main refreshAll interval
|
||||
LOGS: 3000, // 3s — log viewer updates
|
||||
STATS: 5000, // 5s — resource monitor refresh
|
||||
STATS: (typeof window !== 'undefined' && window.__DC_STATS_OVERRIDE) || 5000, // 5s default — resource monitor refresh (overridable via Settings → Health)
|
||||
WEATHER: 600000, // 10m — weather widget refresh
|
||||
HEALTH: 1000, // 1s — card health badge refresh
|
||||
DEPLOY_SSL: 5000, // 5s — SSL cert check during deploy
|
||||
|
||||
Reference in New Issue
Block a user