(value, label, color)
| 10531 | _ndBusy(btn, true, 'Snooping…'); |
| 10532 | out.classList.remove('hidden'); |
| 10533 | out.innerHTML = `<p class="text-sm text-gray-400">Passively snooping DHCP on the wire for ${secs}s…</p>`; |
| 10534 | try { |
| 10535 | const d = await fetchAPI('/api/net/dhcp-snoop?seconds=' + secs); |
| 10536 | if (!d || d.success === false) { |
| 10537 | const hint = d && d.need_config ? ' — set the trusted/untrusted ports first' : ''; |
| 10538 | out.innerHTML = '<p class="text-sm text-red-400">Error: ' + escapeHtml((d && d.error) || 'failed') + escapeHtml(hint) + '</p>'; |
| 10539 | return; |
| 10540 | } |
| 10541 | const [cls, label] = _SNOOP_VERDICT_STYLE[d.verdict] || _SNOOP_VERDICT_STYLE.unknown; |
no outgoing calls
no test coverage detected