diff options
| author | tv <tv@krebsco.de> | 2026-10-30 19:48:08 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-10-30 19:48:08 +0100 |
| commit | c49d2864e042d984cb6630a362f4a0f1cc690d1c (patch) | |
| tree | 47915492491d5f88dd1ed01e4799e2cdc4a0905e /src/api | |
| parent | ab541c53d320f5120a43e963e2a3bc46e0d8aeda (diff) | |
dashboard: show peer ID in title
Diffstat (limited to 'src/api')
| -rw-r--r-- | src/api/dashboard/dashboard.html | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/api/dashboard/dashboard.html b/src/api/dashboard/dashboard.html index d0d637d..4f77dde 100644 --- a/src/api/dashboard/dashboard.html +++ b/src/api/dashboard/dashboard.html @@ -54,6 +54,7 @@ section h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 0 0 8px; flex: none; } section h2 .what { text-transform: none; letter-spacing: 0; color: var(--fg); } + section h2 .what .id { color: var(--muted); font-weight: normal; word-break: break-all; } #map { grid-area: map; } #peers-box { grid-area: peers; } #figures-box { grid-area: figures; } @@ -293,8 +294,10 @@ function renderStats() { what.textContent = name(state.node.id) + " (this node)"; shown = [tree("stats", state.stats, "stats")]; } else { - what.textContent = name(focused); - what.title = focused; + // Its alias (if it has one) and its node ID, in full. + const alias = (state.graph.members[focused] || {}).alias || + (state.peers.peers[focused] || {}).alias; + what.replaceChildren(...(alias ? [alias, " "] : []), el("span", { class: "id" }, focused)); const peer = state.peers.peers[focused]; const report = state.graph.measured[focused]; shown = []; |
