aboutsummaryrefslogtreecommitdiffstats
path: root/src/api/dashboard
diff options
context:
space:
mode:
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;