aboutsummaryrefslogtreecommitdiffstats
path: root/src/api/dashboard/mod.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-17 16:32:23 +0000
committertv <tv@krebsco.de>2026-11-17 17:36:18 +0100
commit393fb4d70fc6bf88debc4ca13d644ea7de9602f5 (patch)
treed0df529c52d5b726e6be91124f2eadf2187e8183 /src/api/dashboard/mod.rs
parent1bbb45bfe7c9c437373aefa08a6a985bc260f520 (diff)
dashboard: the federation, in a swarm holding a storeHEADmaster
In a swarm holding a store, the snapshot names the node's party, and the document box shows what counts as the node reads it, read every 5 s: the current version, the parties with their keys and nodes, the rules, the values at places as a tree with who writes there, the proposals on the version with where each stands, who voted what and what its version changes, and what the node refused. `document` beside `remake…` shows the document underneath. Where the node votes for its party by itself, a proposal that can still pass has a vote of each kind, cast through the node on a second click. The page writes no values: a party signs its writes with its key.
Diffstat (limited to 'src/api/dashboard/mod.rs')
-rw-r--r--src/api/dashboard/mod.rs10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/api/dashboard/mod.rs b/src/api/dashboard/mod.rs
index 9cf88a1..15b8cf9 100644
--- a/src/api/dashboard/mod.rs
+++ b/src/api/dashboard/mod.rs
@@ -395,8 +395,13 @@ async fn build(state: &AppState, graph: &Graph) -> JsonValue {
"dashboard": dashboards.get(member) }),
);
}
+ // In a swarm holding a store, the party this node is of: the page shows the store.
+ #[cfg(feature = "federation")]
+ let party = state.holding.party();
+ #[cfg(not(feature = "federation"))]
+ let party: Option<&str> = None;
json!({
- "node": { "id": local, "alias": state.alias },
+ "node": { "id": local, "alias": state.alias, "party": party },
"page": page().0,
"stats": stats,
"peers": peers,
@@ -900,7 +905,8 @@ mod tests {
}
/// The page in a browser (`check.js`): it loads without errors, the peers table and
- /// the map draw what the state says, and a large map doesn't hold the page up.
+ /// the map draw what the state says, a large map doesn't hold the page up, and the
+ /// federation shows who writes where, what a proposal changes, and the votes.
/// Needs Node.js with Playwright's library and its Chromium (`check.nix` gives them),
/// so only when asked: `cargo test --features dashboard dashboard_in_a_browser --
/// --ignored`.