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

Function selectWardrivingSession

web/scripts/ragnar_modern.js:18406–18427  ·  view source on GitHub ↗
(sessionId)

Source from the content-addressed store, hash-verified

18404 </svg>
18405 <p>Scanning for Wi-Fi networks...</p>
18406 </div>
18407 `;
18408
18409 // Trigger scan
18410 const scanPayload = interfaceName ? { interface: interfaceName } : {};
18411 let scanResponse = null;
18412 try {
18413 scanResponse = applyInterfaceContext(await postAPI('/api/wifi/scan', scanPayload));
18414 } catch (scanError) {
18415 throw scanError;
18416 }
18417 if (scanResponse && (hasNetworkEntries(scanResponse) || scanResponse.warning || scanResponse.error)) {
18418 displayWifiNetworks(scanResponse, { forceInterface: interfaceName, skipInterfaceCheck: true });
18419 displayedFromScan = true;
18420 }
18421
18422 // Wait a bit for scan to complete
18423 await new Promise(resolve => setTimeout(resolve, 3000));
18424
18425 // Get networks
18426 const query = interfaceName ? `/api/wifi/networks?interface=${encodeURIComponent(interfaceName)}` : '/api/wifi/networks';
18427 const data = applyInterfaceContext(await fetchAPI(query));
18428
18429 console.log('Wi-Fi networks data:', data);
18430

Callers

nothing calls this directly

Calls 6

_wdInvalidateTableCacheFunction · 0.70
renderWardrivingSessionsFunction · 0.70
loadWardrivingNetworksFunction · 0.70
_loadWardrivingBluetoothFunction · 0.70
_loadWardrivingCamerasFunction · 0.70
loadWardrivingMapDataFunction · 0.70

Tested by

no test coverage detected