(payload)
| 9121 | return fetchAPI('/api/net/interfaces').then(x => { |
| 9122 | (x.interfaces || []).forEach(i => { |
| 9123 | const o = document.createElement('option'); |
| 9124 | o.value = i.name; |
| 9125 | const tag = i.type === 'wifi' ? ' (WiFi)' : i.type === 'ethernet' ? ' (LAN)' : (i.type ? ' (' + i.type + ')' : ''); |
| 9126 | o.textContent = i.name + tag; |
| 9127 | sel.appendChild(o); |
| 9128 | }); |
| 9129 | sel.dataset.filled = '1'; |
| 9130 | }).catch(() => {}); |
| 9131 | } |