diff options
Diffstat (limited to 'src/api')
| -rw-r--r-- | src/api/dashboard/dashboard.html | 18 |
1 files changed, 7 insertions, 11 deletions
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); |
