summaryrefslogtreecommitdiffstats
path: root/src/api/dashboard/check.js
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-18 18:50:46 +0000
committertv <tv@krebsco.de>2026-11-18 20:31:30 +0100
commit56837530e17d95814d21076c527c8577f0a6da97 (patch)
treee9d48d3645c188e07a0e12b75f8805a1ad0f8e83 /src/api/dashboard/check.js
parentc64fcc05d8c53bee99ab039bd709039afb730cdd (diff)
dashboard: the event a federation's store stopped at
The federation view shows, below this node's party, the event its store stopped at (`stopped` in `GET /events`), why, and how many events it holds back, with what to do: run a continuum that reads it, or drop it. The page check renders one.
Diffstat (limited to 'src/api/dashboard/check.js')
-rw-r--r--src/api/dashboard/check.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/api/dashboard/check.js b/src/api/dashboard/check.js
index 4292e7d..125fc3b 100644
--- a/src/api/dashboard/check.js
+++ b/src/api/dashboard/check.js
@@ -95,7 +95,7 @@ const check = (ok, what) => {
peers: { localReaches: [], peers: {} }, graph: { members: {}, intended: {}, measured: {} } };
federationTimer = 1;
federation.summary = { store: "aa", checkpoint: "aa", heads: ["bb"], taken: 3,
- party: "tv", votesByItself: true };
+ stopped: null, party: "tv", votesByItself: true };
federation.heads = "bb";
federation.counts = { version: { number: 0, hash: "11", version },
parties: { tv: { keys: ["ssh-ed25519 AAAA1"], nodes: ["continuum:a"] },
@@ -109,10 +109,15 @@ const check = (ok, what) => {
showFederation();
renderFederation(true);
const tree = document.getElementById("federation");
- return { writers, title: document.getElementById("document-title").textContent,
+ const shown = { writers, title: document.getElementById("document-title").textContent,
shown: !document.getElementById("federation-scroll").hidden
&& document.getElementById("document-scroll").hidden,
text: tree.textContent, votes: tree.querySelectorAll(".votes button").length };
+ federation.summary = { ...federation.summary,
+ stopped: { id: "ee", why: "version 22 passed, and doesn't read as one here", heldBack: 4 } };
+ renderFederation(true);
+ shown.stopped = tree.textContent;
+ return shown;
});
check(JSON.stringify(federated.writers) === JSON.stringify(["tv", null, null, "tv", null]),
"who writes at a place is the first rule matching it: " + JSON.stringify(federated.writers));
@@ -124,6 +129,9 @@ const check = (ok, what) => {
+ '{"keys":["ssh-ed25519 AAAA3"],"since":1}'),
"a proposal: where it stands, and what its version changes, party by party");
check(federated.votes === 2, "a proposal that can still pass has a vote of each kind");
+ check(!federated.text.includes("stopped at") && federated.stopped.includes("stopped at ee")
+ && federated.stopped.includes("4 held back"),
+ "a store that stopped: the event it stopped at, why, and how many it holds back");
await tab.waitForTimeout(500);
check(errors.length === 0, "no errors on the page" + (errors.length ? ": " + errors : ""));