Settings: don't auto-save while on the Logs tab (#827)
Tacobell444: the Logs tab has no savable settings, but its live-viewer controls (source picker, filters, auto-scroll) were tripping the settings auto-save — each one POSTs /api/settings and logs "Settings saved successfully via Web UI", flooding app.log and drowning out the logs the user is trying to read. Fix: debouncedAutoSaveSettings bails when the active settings tab is 'logs' (checked via .stg-tab.active). Purely frontend — no save is scheduled while on that tab, so the backend never logs the save. Doesn't touch the existing _suppressSettingsAutoSave form-population guard, and every other tab auto-saves exactly as before; manual Save still works everywhere.
This commit is contained in:
parent
8633386f00
commit
2bc86e3022
1 changed files with 5 additions and 0 deletions
|
|
@ -45,6 +45,11 @@ function debouncedAutoSaveSettings() {
|
|||
// fields on load — those aren't user edits and must not trigger a full
|
||||
// save (which re-initializes every backend service client).
|
||||
if (window._suppressSettingsAutoSave) return;
|
||||
// #827: the Logs tab has no savable settings — its live-viewer controls
|
||||
// (source picker, filters, auto-scroll) were tripping the auto-save and
|
||||
// flooding app.log with "Settings saved" lines, drowning out the logs the
|
||||
// user is trying to read. Never auto-save while the Logs tab is active.
|
||||
if (document.querySelector('.stg-tab.active')?.dataset.tab === 'logs') return;
|
||||
if (settingsAutoSaveTimer) clearTimeout(settingsAutoSaveTimer);
|
||||
settingsAutoSaveTimer = setTimeout(() => saveSettings(true), 2000);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue