MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / updateAutomationToggleButton

Function updateAutomationToggleButton

web/scripts/ragnar_modern.js:11765–11791  ·  view source on GitHub ↗
(automationEnabled, options = {})

Source from the content-addressed store, hash-verified

11763
11764 if (toggle) toggle.checked = true;
11765 if (intervalInput) { intervalInput.value = data.interval || 60; intervalInput.disabled = true; }
11766 const ifSel = document.getElementById('threat-sweep-iface');
11767 if (ifSel) { if (data.interface) ifSel.value = data.interface; ifSel.disabled = true; }
11768 if (warning) warning.classList.remove('hidden');
11769 if (statusEl) { statusEl.textContent = `Sweep #${data.sweep_count || 0}`; statusEl.classList.remove('hidden'); }
11770 _updateMonitorModeBadge(data.monitor_mode);
11771
11772 if (panel && data.findings && data.findings.length > 0) {
11773 panel.classList.remove('hidden');
11774 _renderThreatFindings(data, panel);
11775 }
11776
11777 _startThreatMonitorPoll(panel);
11778 }
11779 } catch (e) { /* not critical */ }
11780}
11781document.addEventListener('DOMContentLoaded', _restoreThreatMonitorState);
11782
11783// Populate the External Threat Detection interface selector from the WiFi
11784// interfaces the analyzer sees (same source as the WiFi Analyzer tab).
11785async function _threatFillIfaces() {
11786 const sel = document.getElementById('threat-sweep-iface');
11787 if (!sel) return;
11788 try {
11789 const resp = await fetch('/api/net/wifi/interfaces');
11790 const d = await resp.json();
11791 const ifs = (d && d.interfaces) || [];
11792 const cur = sel.value;
11793 sel.innerHTML = '<option value="">Auto</option>' + ifs.map(i => {
11794 const bands = (i.bands || []).length ? ' · ' + i.bands.join('/') + 'GHz' : '';

Callers 2

updateDashboardStatusFunction · 0.70
handleAutomationToggleFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected