aboutsummaryrefslogtreecommitdiffstats
path: root/src/api/dashboard/dashboard.html
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-09 05:20:44 +0000
committertv <tv@krebsco.de>2026-11-09 06:30:30 +0100
commitd7e3d9f8310aa40903f43272fbb30f37a1f68c2b (patch)
tree851743c09dce0e9a74c17d62a61c69a58ed1e1db /src/api/dashboard/dashboard.html
parent98a9180e39742725a61fb1966e342d7d212beee9 (diff)
dashboard: the transport each message went by, in the console
The console said with whom a message went, not how: the message log was noted above the identity layer (`CountingTransport`), where a message is to or from a node, and the address it went to (the paths layer picks one, `Paths::send_first`) or came from is gone. Only the paths layer's own PINGs and PONGs, logged under their addresses, had one. Now the identity layer notes the node's messages (`MessageLog::set_addressed`), with the address each went to (`IdentityTransport::send_proven` returns it) or came from; `CountingTransport` leaves them to it, and still notes them where there is no identity layer (tests). A console line ends with the transport (the address's scheme, in its colour on the map, the address in the tooltip), and the figures box shows the address. A subscribed node's messages carry theirs too, and the map runs every message along its transport's line, not only the PINGs and PONGs.
Diffstat (limited to 'src/api/dashboard/dashboard.html')
-rw-r--r--src/api/dashboard/dashboard.html9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/api/dashboard/dashboard.html b/src/api/dashboard/dashboard.html
index dbf5480..9cfb384 100644
--- a/src/api/dashboard/dashboard.html
+++ b/src/api/dashboard/dashboard.html
@@ -883,6 +883,7 @@ function renderStats() {
field("from", message.from),
field("to", message.to),
field("logged by", message.node),
+ ...(message.address ? [field("address", message.address)] : []),
field("type", message.type),
field("bytes", String(message.bytes)),
el("div", { class: "note" }, "Written out only on the node that logged it (its console)."));
@@ -891,6 +892,7 @@ function renderStats() {
document.getElementById("stats").replaceChildren(
field("at", clockTime(new Date(message.at))),
field(message.way === "received" ? "from" : "to", message.peer),
+ ...(message.address ? [field("address", message.address)] : []),
field("way", message.way),
field("type", message.type),
field("bytes", String(message.bytes)),
@@ -3854,7 +3856,8 @@ function filterConsole() {
scroll.scrollTop = scroll.scrollHeight;
}
}
-// A line: when, which way, with whom, the type (in its kind's colour) and the size.
+// A line: when, which way, with whom, the type (in its kind's colour), the size, and the
+// transport it went by (in its colour, the address in its tooltip), where known.
function consoleLine(message) {
// A subscribed node's (`remoteMessagesArrived`): its receiver, and whom from.
const between = message.node ? name(message.to) + " ← " + name(message.from) + " "
@@ -3874,7 +3877,9 @@ function consoleLine(message) {
clockTime(new Date(Math.round(message.t || message.at))) + " "),
between,
el("span", { style: "color: " + kindColour(message.counted) }, message.type),
- " " + size(message.bytes));
+ " " + size(message.bytes),
+ ...(message.address ? [" ", el("span", { style: "color: " + colourOf(schemeOf(message.address)),
+ title: message.address }, schemeOf(message.address))] : []));
// On press, as the peers' rows: lines come and go under the pointer.
line.addEventListener("pointerdown", event => {
if (event.button !== 0) return;