aboutsummaryrefslogtreecommitdiffstats
path: root/src/api/dashboard
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
commitf2cfe1f9e033c6d514e8335d8fb82ba925339c58 (patch)
treef942094c7e6222d1b4ab002d629b73557acfca66 /src/api/dashboard
parentb7755803fb69ce7def7bb7eafcdbfa247bed036f (diff)
dashboard: show more info on edges
Diffstat (limited to 'src/api/dashboard')
-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;