From 8fc1d675f2a795f3ff1f745c4b1e0dc811358998 Mon Sep 17 00:00:00 2001 From: Ian Gulliver Date: Mon, 26 Jan 2026 09:33:22 -0800 Subject: [PATCH] Fix switch uplink port direction and stats perspective Co-Authored-By: Claude Opus 4.5 --- static/index.html | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/static/index.html b/static/index.html index 655d263..1ad5840 100644 --- a/static/index.html +++ b/static/index.html @@ -1224,12 +1224,13 @@ for (const edge of adjacency.get(current.typeid) || []) { if (!visited.has(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, { - localPort: edge.localPort, - remotePort: edge.remotePort, + localPort: edge.remotePort, + remotePort: edge.localPort, parentName: getLabel(current), - speed: edge.localSpeed, - errors: edge.localErrors + speed: reverseEdge?.localSpeed || 0, + errors: reverseEdge?.localErrors || null }); queue.push(edge.neighbor); }