From f2cfe1f9e033c6d514e8335d8fb82ba925339c58 Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 31 Oct 2026 22:03:53 +0100 Subject: dashboard: show more info on edges --- src/api/dashboard/dashboard.html | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/api/dashboard/dashboard.html b/src/api/dashboard/dashboard.html index d2935f6..ec80e31 100644 --- a/src/api/dashboard/dashboard.html +++ b/src/api/dashboard/dashboard.html @@ -306,7 +306,7 @@ function renderPeers() { } // --- Figures: a tree, its open branches kept across renders --- -const open = new Set(["stats", "peer", "links", "from", "to"]); +const open = new Set(["stats", "peer", "links", "from", "to", "paths", "paths.destination"]); function tree(key, value, path) { // Empty: nothing to open. if (value !== null && typeof value === "object" && Object.keys(value).length === 0) { @@ -350,6 +350,15 @@ function renderStats() { ? " reports no link to " + name(y) + "." : " reports no links."))); } } + // Where this node is an end: the link itself, as `/peers` has the other end (where + // messages go, the paths, the addresses). The whole entry is the node's focus. + const self = state.node.id; + const other = a === self ? b : b === self ? a : null; + const peer = other !== null && state.peers.peers[other]; + if (peer) { + shown.push(tree("this node's paths", { + destination: peer.destination, addresses: peer.addresses }, "paths")); + } title.replaceChildren("Link: ", what); document.getElementById("stats").replaceChildren(...shown); return; -- cgit v1.3.1