Fix WiFi deep scan polling on agent - normalize scan_type value

Agent returns scan_type 'deepscan' but UI expected 'deep', causing the
polling to immediately stop when checking scan status on agent switch.
Now normalizes 'deepscan' to 'deep' in checkScanStatus.
This commit is contained in:
cemaxecuter
2026-01-31 08:51:17 -05:00
parent 7182f7803a
commit 630bc2971a

View File

@@ -594,7 +594,10 @@ const WiFiMode = (function() {
if (status.is_scanning || status.running) {
// Agent returns scan_type in params, local returns scan_mode
const detectedMode = status.scan_mode || (status.params && status.params.scan_type) || 'deep';
// Normalize: agent may return 'deepscan' or 'deep', UI expects 'deep' or 'quick'
let detectedMode = status.scan_mode || (status.params && status.params.scan_type) || 'deep';
if (detectedMode === 'deepscan') detectedMode = 'deep';
setScanning(true, detectedMode);
if (detectedMode === 'deep') {
startEventStream();