Fix switch uplink port direction and stats perspective
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1224,12 +1224,13 @@
|
|||||||
for (const edge of adjacency.get(current.typeid) || []) {
|
for (const edge of adjacency.get(current.typeid) || []) {
|
||||||
if (!visited.has(edge.neighbor.typeid)) {
|
if (!visited.has(edge.neighbor.typeid)) {
|
||||||
visited.add(edge.neighbor.typeid);
|
visited.add(edge.neighbor.typeid);
|
||||||
|
const reverseEdge = adjacency.get(edge.neighbor.typeid).find(e => e.neighbor.typeid === current.typeid);
|
||||||
switchUplinks.set(edge.neighbor.typeid, {
|
switchUplinks.set(edge.neighbor.typeid, {
|
||||||
localPort: edge.localPort,
|
localPort: edge.remotePort,
|
||||||
remotePort: edge.remotePort,
|
remotePort: edge.localPort,
|
||||||
parentName: getLabel(current),
|
parentName: getLabel(current),
|
||||||
speed: edge.localSpeed,
|
speed: reverseEdge?.localSpeed || 0,
|
||||||
errors: edge.localErrors
|
errors: reverseEdge?.localErrors || null
|
||||||
});
|
});
|
||||||
queue.push(edge.neighbor);
|
queue.push(edge.neighbor);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user