()
| 9972 | html += '<p class="text-xs uppercase text-gray-400 mt-3 mb-1">Segments observed (' + d.segments.length + ')</p>' + |
| 9973 | '<table class="min-w-full text-xs text-gray-300 whitespace-nowrap"><thead>' + |
| 9974 | '<tr class="text-left text-gray-500"><th class="px-2 py-1">VLAN/inst</th><th class="px-2 py-1">Root</th><th class="px-2 py-1">Bridges</th><th class="px-2 py-1">BPDUs</th><th class="px-2 py-1">Encap</th></tr>' + |
| 9975 | '</thead><tbody>' + |
| 9976 | d.segments.map(s => `<tr class="border-t border-slate-800"> |
| 9977 | <td class="px-2 py-1 font-mono">${escapeHtml(String(s.vlan))}</td> |
| 9978 | <td class="px-2 py-1 font-mono text-gray-400">${escapeHtml(s.root || '—')}</td> |
| 9979 | <td class="px-2 py-1">${s.bridges}</td> |
| 9980 | <td class="px-2 py-1">${s.bpdus}</td> |
| 9981 | <td class="px-2 py-1 text-gray-400">${escapeHtml(s.encap || '—')}</td> |
| 9982 | </tr>`).join('') + |
| 9983 | '</tbody></table>'; |
| 9984 | } |
| 9985 | out.innerHTML = html; |
| 9986 | } catch (e) { |
| 9987 | out.innerHTML = '<p class="text-sm text-red-400">Failed: ' + escapeHtml(e.message) + '</p>'; |
| 9988 | } finally { |
| 9989 | _ndBusy(btn, false); |
| 9990 | } |
no test coverage detected