diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/api/dashboard/check.js | 12 | ||||
| -rw-r--r-- | src/api/dashboard/dashboard.html | 11 |
2 files changed, 18 insertions, 5 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 : "")); diff --git a/src/api/dashboard/dashboard.html b/src/api/dashboard/dashboard.html index a918532..f5d258b 100644 --- a/src/api/dashboard/dashboard.html +++ b/src/api/dashboard/dashboard.html @@ -4249,9 +4249,10 @@ function connect() { // --- The federation: in a swarm holding a store (the snapshot names the node's party), // the box shows what counts as this node reads it (`GET /events`, `/events/counts`, // `/events/refused`; docs/guides/federation/) instead of the document, until `document` -// says otherwise: the current version, the parties, the rules, the values at places (each -// with who writes there), the proposals on the version (where each stands, who voted -// what, and what its version changes) and what the node refused. A vote goes through +// says otherwise: the current version, the event the store stopped at, if any, the +// parties, the rules, the values at places (each with who writes there), the proposals on +// the version (where each stands, who voted what, and what its version changes) and what +// the node refused. A vote goes through // this node (`POST /admin/events/vote`), which casts it only where it votes for its party // by itself (`votesByItself`). Read every 5 s while shown, what counts anew where the // store's heads changed. Writing values takes a key of the party, which the page has @@ -4574,6 +4575,10 @@ function renderFederation(force = false) { summary.store), federationLeaf("this node", "of " + summary.party + (summary.votesByItself ? ", voting for it by itself" : ", not voting for it by itself")), + ...(summary.stopped ? [federationLeaf(el("span", { class: "error" }, "stopped at " + + short(summary.stopped.id)), summary.stopped.why + " ยท " + summary.stopped.heldBack + + " held back: run a continuum that reads it, or drop it " + + "(docs/guides/federation/when-things-go-wrong.md)", summary.stopped.id)] : []), federationBranch("parties", ["parties ", el("span", { class: "gloss" }, parties.length)], () => parties.map(party => { const keys = counts.parties[party].keys, nodes = counts.parties[party].nodes; |
