(sessionId)
| 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 |
nothing calls this directly
no test coverage detected