()
| 21231 | if (interfaces.length === 0) { |
| 21232 | networkInterfaces.innerHTML = '<p class="text-gray-400 text-center py-4">No network interfaces found</p>'; |
| 21233 | return; |
| 21234 | } |
| 21235 | |
| 21236 | let html = ''; |
| 21237 | interfaces.forEach(iface => { |
| 21238 | const statusColor = iface.is_up ? 'text-green-400' : 'text-red-400'; |
| 21239 | const statusText = iface.is_up ? 'UP' : 'DOWN'; |
| 21240 | |
| 21241 | html += ` |
| 21242 | <div class="border border-gray-700 rounded p-3"> |
| 21243 | <div class="flex items-center justify-between mb-2"> |
| 21244 | <span class="font-medium">${iface.name}</span> |
| 21245 | <span class="${statusColor} text-xs">${statusText}</span> |
| 21246 | </div> |
| 21247 | <div class="text-xs text-gray-400 space-y-1"> |
| 21248 | ${iface.speed > 0 ? `<div>Speed: ${iface.speed} Mbps</div>` : ''} |
nothing calls this directly
no test coverage detected