Found some hours to cobble together something, currently looks like this on an ER-X:
The green/red colors indicate zone/network membership (my eth0 has both because it's a trunk port carrying WAN and LAN via VLANs)
I should also scale to many ports, design wise (tested by repeating the actual ports a few times):
Hovering the colors gives a member network list:
Hovering the up/down bytes provides detailed stats:
So far so good, potential issues/quirks/unexpected behaviors:
- We don't know the actual port labels printed on the device. While DSA devices are supposed to name their netdevs after the external case labels, I'm not sure if it is universally true
- Only considers ethernet ports mentioned in
/etc/board.json
- Does not expose the OEM intended role of the port ("WAN port", "LAN port", "SFP port")
- Default wan/lan zone colors (red & green) or the zone color bar in general might be mistaken as some kind of port status indicator (active/inactive/error or 100M vs. 1G indication)