diff options
| author | tv <tv@krebsco.de> | 2026-11-02 22:32:31 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-02 22:32:31 +0100 |
| commit | 4ae3326ebca32252020b5899e4a3566d0a6b5ec7 (patch) | |
| tree | 389c0db1bcec235f787a264cf1165d1ffc7ec099 /src | |
| parent | df314df4793765ea5334ac75b97d415286cc7fa3 (diff) | |
dashboard: show newly joined remote peers asap
Diffstat (limited to 'src')
| -rw-r--r-- | src/api/dashboard/mod.rs | 16 |
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, |
