-
Notifications
You must be signed in to change notification settings - Fork 86
Description
NetBox version
v3.7.8
Topology Views version
v3.9.1
Feature type
Change to existing functionality
Proposed functionality
Modify the XML export logic of the Topology Views plugin to include source and destination port/interface details for each link.
When imported into draw.io, each connection line should display the corresponding interface names as a label or text annotation.
Ideally, the label should follow a consistent format, such as:
DeviceA:Ethernet1/1 ⇄ DeviceB:Ethernet1/2 or optionally just show the local interface name on each end of the connection (depending on draw.io limitations and user preferences).
Implementation on the XML side:
In addition to the vertex mxCell object, for example this one:
<mxCell id="JL38dpjvp8IfbgFrF-6G-22" style="rounded=0;orthogonalLoop=1; jettySize=auto; html=1; endArrow=none; endFill=0; strokeColor=#2b7ce9; shadow=0; flowAnimation=0; curved=0;" parent="1" source="JL37dpjvp8IfbgFrF-6G-59" target="JL38dpjvp8IfbgFrF-6G-47" edge="1"><mxGeometry relative="1" as="geometry"/></mxCell>
We need an additional vertex with a parent value equal to the id of the connection vertex, the connectable value 0
<mxCell id="q4FAq0egT-oxusbm8v2G-1" value="Switch1:port1<div>Switch2:port3</div>" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];textShadow=1;" vertex="1" connectable="0" parent="JL38dpjvp8IfbgFrF-6G-22"> <mxGeometry x="0.0117" y="-3" relative="1" as="geometry"> <mxPoint as="offset"/> </mxGeometry> </mxCell>
Optional Considerations:
- Allow toggling this feature on or off during export, via a checkbox or setting (e.g., "Include port/interface names").
- Provide an option to show either full interface names or abbreviated versions (e.g., Gi0/1 instead of GigabitEthernet0/1).
Use case
Overview:
Currently, the NetBox Topology Views plugin allows users to export topology diagrams to an XML format compatible with draw.io. However, the exported connections between devices lack detailed port/interface information. This feature request proposes enhancing the XML export functionality to include port/interface names as part of the connection labels in the resulting diagram.
Benefits:
- Improves the clarity and usefulness of topology diagrams by providing critical interface-level details directly within the visual representation.
- Saves time for network engineers by reducing the need to cross-reference interface mappings separately.
- Enhances documentation accuracy and facilitates troubleshooting and planning.
External dependencies
No response