(allowUpdate)
| 7521 | const sel = document.getElementById('icmp-iface'); |
| 7522 | if (!sel || sel.dataset.filled === '1') return Promise.resolve(); |
| 7523 | return fetchAPI('/api/net/interfaces').then(x => { |
| 7524 | (x.interfaces || []).forEach(i => { |
| 7525 | const o = document.createElement('option'); |
| 7526 | o.value = i.name; |
| 7527 | const tag = i.type === 'wifi' ? ' (WiFi)' : i.type === 'ethernet' ? ' (LAN)' : (i.type ? ' (' + i.type + ')' : ''); |
| 7528 | o.textContent = i.name + tag; |
| 7529 | sel.appendChild(o); |
| 7530 | }); |
| 7531 | sel.dataset.filled = '1'; |
| 7532 | }).catch(() => {}); |
| 7533 | } |
| 7534 | async function runIcmpWatch() { |
nothing calls this directly
no test coverage detected