aboutsummaryrefslogtreecommitdiffstats
path: root/src/api/dashboard
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-03 05:21:25 +0100
committertv <tv@krebsco.de>2026-11-03 05:21:25 +0100
commit8366f7c5de474753dbfbf88431917e79c15e5389 (patch)
tree8c3ed8cca74760ff98b58264843765a3d8e65d3b /src/api/dashboard
parent96d7744dd29a3c783b43a7a6697af7d5d5719a10 (diff)
replace eager links by trees
Diffstat (limited to 'src/api/dashboard')
-rw-r--r--src/api/dashboard/clocks.rs2
-rw-r--r--src/api/dashboard/dashboard.html36
-rw-r--r--src/api/dashboard/mod.rs2
3 files changed, 1 insertions, 39 deletions
diff --git a/src/api/dashboard/clocks.rs b/src/api/dashboard/clocks.rs
index ac58676..9f069be 100644
--- a/src/api/dashboard/clocks.rs
+++ b/src/api/dashboard/clocks.rs
@@ -99,8 +99,6 @@ mod tests {
down: false,
rtt_us: None,
dormant: false,
- eager_to: false,
- eager_from: false,
others: Vec::new(),
clock: Some(ClockOffset {
offset_ms,
diff --git a/src/api/dashboard/dashboard.html b/src/api/dashboard/dashboard.html
index 1b442ae..9132275 100644
--- a/src/api/dashboard/dashboard.html
+++ b/src/api/dashboard/dashboard.html
@@ -161,9 +161,6 @@
.legend .dormant::before { border-top-width: 1.5px; --colour: var(--muted);
box-shadow: 0 0 0 2.5px color-mix(in srgb, var(--bad) 50%, transparent); }
.legend .silent::before { border-top-style: dotted; --colour: var(--muted); }
- /* A chevron on the line, as on the map. */
- .legend .eager::before { content: "\203A"; width: auto; height: auto; border: none;
- font-weight: bold; font-size: 15px; line-height: 0; }
.legend .hint::before { display: none; }
/* A kind of message: a dot in its colour, as on the map. */
.legend .message::before { width: 8px; height: 8px; border: none; border-radius: 50%;
@@ -610,7 +607,6 @@ function renderLegend(measured) {
el("span", { class: "direct" }, "direct"),
el("span", { class: "relayed" }, "relayed"),
el("span", { class: "dormant" }, "dormant or down"),
- el("span", { class: "eager" }, "eager (changes sent on at once, this way)"),
el("span", { class: "silent" }, "an end reports no links"));
document.getElementById("legend").replaceChildren(...items);
}
@@ -641,18 +637,6 @@ function edges() {
}
}
}
- // Eager, which way, if either end says so: "a>b" where a sends b its changes as it
- // applies them (a's eagerTo, or b's eagerFrom).
- const eager = new Set();
- for (const [a, report] of Object.entries(state.graph.measured)) {
- for (const link of report.links) {
- if (link.eagerTo) eager.add(a + ">" + link.peer);
- if (link.eagerFrom) eager.add(link.peer + ">" + a);
- }
- }
- for (const edge of measured.values()) {
- edge.eager = [eager.has(edge.a + ">" + edge.b), eager.has(edge.b + ">" + edge.a)];
- }
// Dormant, or down, if either end says so, whichever report is drawn.
for (const edge of measured.values()) {
if ((edge.dormant && !edge.link.dormant) || (edge.down && !edge.link.down)) {
@@ -970,7 +954,7 @@ function renderGraph() {
tooltip(hit(key, p, q, 1), name(a) + " – " + name(b) + ": intended (member list), not measured");
}
const ms = rtt => rtt < 10 ? rtt.toFixed(1) : String(Math.round(rtt));
- for (const [key, { a, b, link, secsAgo, eager }] of measured) {
+ for (const [key, { a, b, link, secsAgo }] of measured) {
const p = positions.get(a), q = positions.get(b);
if (!p || !q) continue;
// The transport in use thick, in the middle; the others thin, beside it.
@@ -1020,8 +1004,6 @@ function renderGraph() {
(line.transport ? " via " + line.transport : "") + (line.used ? " (in use)" : "") +
((line.used ? link.relayed : line.relayed) ? ", relayed" : "") + (link.dormant ? ", dormant" : "") +
(line.used && link.down ? ", down" : "") +
- (line.used && eager[0] ? ", eager " + name(a) + " → " + name(b) : "") +
- (line.used && eager[1] ? ", eager " + name(b) + " → " + name(a) : "") +
(silent ? ", one end reports no links" : "") +
(typeof line.rttMs === "number" ? ", " + line.rttMs.toFixed(1) + " ms" : "") +
", measured " + age(secsAgo + elapsed()) + " ago";
@@ -1045,22 +1027,6 @@ function renderGraph() {
}
});
children.push(...drawnLines.reverse());
- // Eager, each way it is: a chevron on the line in use pointing that way, past the
- // middle towards the end it goes to (both ways: one each side of it).
- const ux = (q.x - p.x) / length, uy = (q.y - p.y) / length;
- [[eager[0], 1], [eager[1], -1]].forEach(([on, way]) => {
- if (!on) return;
- const t = eager[0] && eager[1] ? .5 + way * .06 : .5;
- const mx = p.x + (q.x - p.x) * t, my = p.y + (q.y - p.y) * t;
- const dx = ux * way * 5, dy = uy * way * 5;
- const d = "M " + (mx - dx + nx * 5) + " " + (my - dy + ny * 5) + " L " + (mx + dx) +
- " " + (my + dy) + " L " + (mx - dx - nx * 5) + " " + (my - dy - ny * 5);
- const shape = { d, fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" };
- children.push(drawing("eager under " + key + " " + way, "path",
- { ...shape, stroke: "var(--panel)", "stroke-width": 5 }));
- children.push(drawing("eager " + key + " " + way, "path",
- { ...shape, stroke: colourOf(link.transport), "stroke-width": 2 }));
- });
tooltip(covering, descriptions.join("\n"));
}
// Above every line, so none crosses them.
diff --git a/src/api/dashboard/mod.rs b/src/api/dashboard/mod.rs
index 14464d4..8d954c0 100644
--- a/src/api/dashboard/mod.rs
+++ b/src/api/dashboard/mod.rs
@@ -407,8 +407,6 @@ fn links_json(links: &[Link]) -> JsonValue {
"down": link.down,
"rttMs": link.rtt_us.map(|us| f64::from(us) / 1000.0),
"dormant": link.dormant,
- "eagerTo": link.eager_to,
- "eagerFrom": link.eager_from,
"clock": link.clock,
"others": link.others.iter().map(|other| json!({
"transport": other.transport,