()
| 6568 | }).join(''); |
| 6569 | } |
| 6570 | async function watchtowerRefresh() { |
| 6571 | const sev = (document.getElementById('watchtower-minsev') || {}).value || ''; |
| 6572 | const q = '/api/net/watchtower?limit=100' + (sev ? '&min_severity=' + encodeURIComponent(sev) : ''); |
| 6573 | try { renderWatchtower(await fetchAPI(q)); } catch (e) { /* offline — leave as-is */ } |
| 6574 | refreshIncidents('watchtower-incidents'); |
| 6575 | } |
| 6576 | async function syncWatchtowerFromServer() { |
| 6577 | const cb = document.getElementById('watchtower-enabled'); |
| 6578 | try { |
| 6579 | const d = await fetchAPI('/api/net/watchtower?limit=100&min_severity=high'); |
| 6580 | if (cb) cb.checked = !!d.enabled; |
no test coverage detected