()
| 7496 | out.innerHTML = '<p class="text-sm text-gray-400">Passively capturing SNMP (UDP 161/162) on the segment…</p>'; |
| 7497 | try { |
| 7498 | _snmpFillIfaces(); |
| 7499 | const qs = '?seconds=' + encodeURIComponent(secs) + (iface ? '&interface=' + encodeURIComponent(iface) : ''); |
| 7500 | const d = await fetchAPI('/api/net/snmp-watch' + qs); |
| 7501 | if (!d || d.success === false) { |
| 7502 | const msg = (d && d.error) || 'failed'; |
| 7503 | let extra = ''; |
| 7504 | if (d && d.missing_tool) extra = ' <button onclick="installNetTool(\'tcpdump\', this, runSnmpWatch)" class="ml-2 underline text-cyan-400">Install tcpdump</button>'; |
| 7505 | out.innerHTML = '<p class="text-sm text-red-400">Error: ' + escapeHtml(msg) + extra + '</p>'; |
| 7506 | return; |
| 7507 | } |
no test coverage detected