Apply all settings and alerts live without Save buttons
Release rolling / release (push) Has been cancelled
Release rolling / release (push) Has been cancelled
Auto-persist client preferences on change with footer feedback, and apply server alert engine settings/channels/rules immediately.
This commit is contained in:
+18
-24
@@ -2832,7 +2832,7 @@ services:
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-text mt-2">Save preferences to apply. Matching containers disappear from lists until the filter is removed.</div>
|
||||
<div class="form-text mt-2">Applied immediately. Matching containers disappear from lists until the filter is removed.</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -2972,17 +2972,18 @@ services:
|
||||
Connect to a server to configure webhook channels and rules.
|
||||
</div>
|
||||
|
||||
<p class="small text-muted mb-2">Changes apply live on the server — no restart and no Save button.</p>
|
||||
<div class="row g-3 mt-1">
|
||||
<div class="col-md-3">
|
||||
<label class="form-label" for="alerts-enabled">Alert engine</label>
|
||||
<select id="alerts-enabled" class="form-select bg-dark text-white">
|
||||
<select id="alerts-enabled" class="form-select bg-dark text-white alerts-live-field" data-min-role="admin">
|
||||
<option value="1">Enabled</option>
|
||||
<option value="0">Disabled</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label class="form-label" for="alerts-min-severity">Global min severity</label>
|
||||
<select id="alerts-min-severity" class="form-select bg-dark text-white">
|
||||
<select id="alerts-min-severity" class="form-select bg-dark text-white alerts-live-field" data-min-role="admin">
|
||||
<option value="info">Info+</option>
|
||||
<option value="warning">Warning+</option>
|
||||
<option value="critical">Critical only</option>
|
||||
@@ -2990,41 +2991,36 @@ services:
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<label class="form-label" for="alerts-poll-ms">Health poll (sec)</label>
|
||||
<input type="number" id="alerts-poll-ms" class="form-control bg-dark text-white" min="15" max="3600" value="60">
|
||||
<input type="number" id="alerts-poll-ms" class="form-control bg-dark text-white alerts-live-field" data-min-role="admin" min="15" max="3600" value="60">
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<label class="form-label" for="alerts-rate-limit">Max / minute</label>
|
||||
<input type="number" id="alerts-rate-limit" class="form-control bg-dark text-white" min="1" max="300" value="40">
|
||||
<input type="number" id="alerts-rate-limit" class="form-control bg-dark text-white alerts-live-field" data-min-role="admin" min="1" max="300" value="40">
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<label class="form-label" for="alerts-include-hostname">Include hostname</label>
|
||||
<select id="alerts-include-hostname" class="form-select bg-dark text-white">
|
||||
<select id="alerts-include-hostname" class="form-select bg-dark text-white alerts-live-field" data-min-role="admin">
|
||||
<option value="1">Yes</option>
|
||||
<option value="0">No</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label class="form-label" for="alerts-quiet-enabled">Quiet hours</label>
|
||||
<select id="alerts-quiet-enabled" class="form-select bg-dark text-white">
|
||||
<select id="alerts-quiet-enabled" class="form-select bg-dark text-white alerts-live-field" data-min-role="admin">
|
||||
<option value="0">Off</option>
|
||||
<option value="1">On (critical still fires)</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<label class="form-label" for="alerts-quiet-start">Quiet start</label>
|
||||
<input type="text" id="alerts-quiet-start" class="form-control bg-dark text-white" placeholder="22:00" value="22:00">
|
||||
<input type="text" id="alerts-quiet-start" class="form-control bg-dark text-white alerts-live-field" data-min-role="admin" placeholder="22:00" value="22:00">
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<label class="form-label" for="alerts-quiet-end">Quiet end</label>
|
||||
<input type="text" id="alerts-quiet-end" class="form-control bg-dark text-white" placeholder="07:00" value="07:00">
|
||||
</div>
|
||||
<div class="col-md-3 d-flex align-items-end">
|
||||
<button type="button" class="btn btn-primary btn-sm" id="alerts-save-global" data-min-role="admin">
|
||||
<i class="fas fa-save me-1"></i>Save engine settings
|
||||
</button>
|
||||
<input type="text" id="alerts-quiet-end" class="form-control bg-dark text-white alerts-live-field" data-min-role="admin" placeholder="07:00" value="07:00">
|
||||
</div>
|
||||
</div>
|
||||
<div id="alerts-status" class="small text-muted mt-2" role="status"></div>
|
||||
<div id="alerts-status" class="small text-muted mt-2" role="status" aria-live="polite"></div>
|
||||
</div>
|
||||
|
||||
<div class="settings-section mt-4">
|
||||
@@ -3033,7 +3029,7 @@ services:
|
||||
<div id="alerts-channels-list" class="list-group mb-3"></div>
|
||||
<div class="card bg-dark border-secondary">
|
||||
<div class="card-body">
|
||||
<h4 class="h6 card-title">Add / edit channel</h4>
|
||||
<h4 class="h6 card-title">Add / edit channel <span class="small text-muted fw-normal">(auto-applies)</span></h4>
|
||||
<input type="hidden" id="alert-ch-id" value="">
|
||||
<div class="row g-2">
|
||||
<div class="col-md-4">
|
||||
@@ -3098,7 +3094,6 @@ services:
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-3 d-flex gap-2">
|
||||
<button type="button" class="btn btn-primary btn-sm" id="alert-ch-save" data-min-role="admin">Save channel</button>
|
||||
<button type="button" class="btn btn-outline-secondary btn-sm" id="alert-ch-reset">Clear form</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -3114,7 +3109,7 @@ services:
|
||||
<div id="alerts-rules-list" class="list-group mb-3"></div>
|
||||
<div class="card bg-dark border-secondary">
|
||||
<div class="card-body">
|
||||
<h4 class="h6 card-title">Add / edit rule</h4>
|
||||
<h4 class="h6 card-title">Add / edit rule <span class="small text-muted fw-normal">(auto-applies)</span></h4>
|
||||
<input type="hidden" id="alert-rule-id" value="">
|
||||
<div class="row g-2">
|
||||
<div class="col-md-4">
|
||||
@@ -3188,7 +3183,6 @@ services:
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-3 d-flex gap-2">
|
||||
<button type="button" class="btn btn-primary btn-sm" id="alert-rule-save" data-min-role="admin">Save rule</button>
|
||||
<button type="button" class="btn btn-outline-secondary btn-sm" id="alert-rule-reset">Clear form</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -3478,7 +3472,7 @@ services:
|
||||
<h3>Retention & auto rotation</h3>
|
||||
<p class="small text-muted mb-3">
|
||||
Local history is rotated automatically when you create a backup. Pinned backups are never removed by age or count limits.
|
||||
Use <strong>Save all</strong> to persist these policy settings.
|
||||
Retention and auto-backup options apply as soon as you change them.
|
||||
</p>
|
||||
<div class="row g-3">
|
||||
<div class="col-md-3">
|
||||
@@ -3584,10 +3578,10 @@ services:
|
||||
</div>
|
||||
</div><!-- /.settings-page-scroll -->
|
||||
|
||||
<div class="settings-footer" role="toolbar" aria-label="Settings actions">
|
||||
<button type="button" class="btn btn-primary settings-save-btn" id="settings-save-btn" aria-live="polite">
|
||||
<i class="fas fa-floppy-disk me-1" aria-hidden="true"></i><span class="settings-save-label">Save all</span>
|
||||
</button>
|
||||
<div class="settings-footer" role="status" aria-live="polite" aria-label="Settings save status">
|
||||
<div id="settings-live-status" class="settings-live-status small text-muted">
|
||||
<i class="fas fa-bolt me-1" aria-hidden="true"></i>Changes apply automatically
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user