aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-10-31 22:03:53 +0100
committertv <tv@krebsco.de>2026-10-31 22:03:53 +0100
commit49e12ce4cc40deeac1cc1d1c77bc15b390dc5773 (patch)
treecc07c5e775c33d0fb8e78f59aff356bd1240b724 /src
parent6d26d740434b6a1930b9e618752a009b0c8a2442 (diff)
dashboard: show more info on edges
Diffstat (limited to 'src')
-rw-r--r--src/api/dashboard/dashboard.html11
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;