(normalized)
| 4322 | const name = document.getElementById('wifi-hm-survey').value; |
| 4323 | const st = document.getElementById('wifi-hm-survey-status'); |
| 4324 | if (!name) return; |
| 4325 | fetch('/api/net/wifi/surveys', { method: 'POST', headers: { 'Content-Type': 'application/json' }, |
| 4326 | body: JSON.stringify({ action: 'delete', name }) }) |
| 4327 | .then(r => r.json()).then(d => { if (st) st.textContent = 'deleted “' + name + '”'; wifiSurveyRefresh(d); }) |
| 4328 | .catch(() => { if (st) st.textContent = 'delete failed'; }); |
| 4329 | } |
| 4330 | |
| 4331 | // ============================================================================ |
| 4332 | // WiFi Defense — 802.11 frame monitor / WIDS (top-level tab) |
| 4333 | // Backend: /api/wifidef/* (wifi_defense.py) |
| 4334 | // ============================================================================ |
| 4335 | const _wifidef = { iface: '', monitor: null, data: null, continuous: false, timer: null, abort: null }; |
| 4336 | |
| 4337 | const _WIFIDEF_THREAT = { |
| 4338 | clear: ['CLEAR', 'bg-green-600/20 text-green-300 border border-green-600/50'], |
| 4339 | warning: ['WARNING', 'bg-amber-600/20 text-amber-300 border border-amber-600/50'], |
| 4340 | critical: ['⚠ UNDER ATTACK', 'bg-red-600/25 text-red-300 border border-red-600/60'], |
no test coverage detected