aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/api/dashboard/mod.rs16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/api/dashboard/mod.rs b/src/api/dashboard/mod.rs
index 91b81d4..14321a8 100644
--- a/src/api/dashboard/mod.rs
+++ b/src/api/dashboard/mod.rs
@@ -361,9 +361,21 @@ async fn build(state: &AppState, graph: &Graph, live: bool) -> JsonValue {
),
u64::try_from(state.clock_skew_warn.as_millis()).unwrap_or(u64::MAX),
);
- // Everyone on the map: in the member list's graph, or measured.
+ // Everyone on the map: in the member list's graph, measured, or at the other end of
+ // a link measured. A node that joined through others is linked to them before its
+ // registration reaches this node, and before the graph is computed again
+ // (`LINKS_EVERY`); it shows then, hollow (no links of its own reported).
+ let linked: BTreeSet<&String> = own
+ .iter()
+ .chain(
+ replies
+ .iter()
+ .flat_map(|(_, _, member_links)| member_links.iter()),
+ )
+ .map(|link| &link.peer)
+ .collect();
let mut members_json = Map::new();
- for member in graph.intended.keys().chain(measured.keys()) {
+ for member in graph.intended.keys().chain(measured.keys()).chain(linked) {
members_json.insert(
member.clone(),
json!({ "alias": aliases.get(member), "self": member == local,