diff options
| author | tv <tv@krebsco.de> | 2026-10-31 22:03:53 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-10-31 22:03:53 +0100 |
| commit | b331dba289f372938b11b3cb3c8ca37ff46a47a8 (patch) | |
| tree | 3587db37322b9b36bd1b3e7024e615dba9f6b0f8 /src | |
| parent | 9b7d9841afdbe9b7fb375cb479a1b4251e4651e7 (diff) | |
dashboard: show more info on edges
Diffstat (limited to 'src')
| -rw-r--r-- | src/api/dashboard/dashboard.html | 11 |
1 files changed, 10 insertions, 1 deletions
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; |
