From e1afd4d69b8e134674ad9c45fb3723612381dafb Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 8 Nov 2026 23:34:32 +0000 Subject: dashboard: no dotted links for an end the page doesn't read A link was dotted where an end reported no links. Members used to report their links to every dashboard (LINKS); the page now reads a member's links only while subscribed to it, so a dotted link said no more than that its other end isn't subscribed, which the node shows already (hollow), and most links were dotted. The style and its legend entry go; the link's tooltip says when one end alone reports it. --- docs/dashboard.md | 4 ++-- src/api/dashboard/dashboard.html | 18 +++++++----------- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/docs/dashboard.md b/docs/dashboard.md index 9543be4..5c7ee13 100644 --- a/docs/dashboard.md +++ b/docs/dashboard.md @@ -127,11 +127,11 @@ milliseconds; the other transports the peers can reach each other on are thin li beside it, from node to node, bowing out a little (furthest at the middle), with their round trips smaller. The round trips are drawn near the end that measured them: of the two ends' reports, the one drawn is the one with a round trip, -else the fresher. Then: +else the fresher; a link to a node whose links the page doesn't read (not subscribed, +drawn hollow) is drawn as the other end reports it, which its tooltip says. Then: * **Solid**: direct. * **Dashed**: through a relay. -* **Dotted**: the page has one end's links only: drawn as that end reports it. * **Narrow, over a red band**: either end holds the other dormant, or the path in use is down (no path to the peer answers; `/peers` shows its connection as `null`). diff --git a/src/api/dashboard/dashboard.html b/src/api/dashboard/dashboard.html index 794fc71..086c03f 100644 --- a/src/api/dashboard/dashboard.html +++ b/src/api/dashboard/dashboard.html @@ -182,7 +182,6 @@ .legend .relayed::before { border-top-style: dashed; --colour: var(--muted); } .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 a link, as on the map: a writer's tree, the way its changes go. */ .legend .writer-tree::before { content: "\203A"; width: auto; height: auto; border: none; font-weight: bold; font-size: 15px; line-height: 0; color: var(--muted); } @@ -961,8 +960,7 @@ function renderLegend(measured) { el("span", { class: "other" }, "other transport"), el("span", { class: "direct" }, "direct"), el("span", { class: "relayed" }, "relayed"), - el("span", { class: "dormant" }, "dormant or down"), - el("span", { class: "silent" }, "an end reports no links")); + el("span", { class: "dormant" }, "dormant or down")); if (treeShown) { items.push(el("span", { class: "writer-tree" }, name(treeWriter()) + "'s tree: the way its changes go (of the node in focus)")); @@ -1367,8 +1365,9 @@ function renderGraph() { const descriptions = []; const length = Math.max(Math.hypot(q.x - p.x, q.y - p.y), 1); const nx = -(q.y - p.y) / length, ny = (q.x - p.x) / length; - // An end that reports no links (any more): what's drawn may be out of date. - const silent = !(a in state.graph.measured) || !(b in state.graph.measured); + // As one end alone reports it (the other's links not read: not subscribed), in its + // tooltip. + const alone = !(b in state.graph.measured); // Dormant, or down (no path answers, whatever its connection was): a red underlay // as wide as the lines, as a dormant node's red outline. const broken = link.dormant || link.down; @@ -1390,11 +1389,8 @@ function renderGraph() { fill: "none", stroke: colourOf(line.transport), // Narrow where dormant or down (over its underlay). "stroke-width": broken ? (line.used ? 1.5 : 0.8) : line.used ? 3 : 1.2 }; - // Dotted where an end reports nothing, dashed where relayed, solid where direct. - if (silent) { - attrs["stroke-dasharray"] = line.used ? "1 5" : "1 3"; - attrs["stroke-linecap"] = "round"; - } else if (line.used ? link.relayed : line.relayed) { + // Dashed where relayed, solid where direct. + if (line.used ? link.relayed : line.relayed) { attrs["stroke-dasharray"] = "7 4"; } markLine(key, attrs.d, attrs["stroke-width"]); @@ -1403,7 +1399,7 @@ 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" : "") + - (silent ? ", one end reports no links" : "") + + (alone ? ", as " + name(a) + " alone reports it" : "") + (typeof line.rttMs === "number" ? ", " + line.rttMs.toFixed(1) + " ms" : "") + ", measured " + age(secsAgo + elapsed()) + " ago"; tooltip(drawnLine, description); -- cgit v1.3.1