diff options
Diffstat (limited to 'src/api')
| -rw-r--r-- | src/api/dashboard/dashboard.html | 4 | ||||
| -rw-r--r-- | src/api/dashboard/mod.rs | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/api/dashboard/dashboard.html b/src/api/dashboard/dashboard.html index 9a17d6b..5bed5fe 100644 --- a/src/api/dashboard/dashboard.html +++ b/src/api/dashboard/dashboard.html @@ -366,13 +366,13 @@ function renderGraph() { if (link.dormant) { drawn.setAttribute("stroke-dasharray", line.used ? "1 5" : "1 3"); drawn.setAttribute("stroke-linecap", "round"); - } else if (line.used && link.relayed) { + } else if (line.used ? link.relayed : line.relayed) { drawn.setAttribute("stroke-dasharray", "7 4"); } const title = svg("title"); title.textContent = name(a) + " – " + name(b) + (line.transport ? " via " + line.transport : "") + (line.used ? " (in use)" : "") + - (line.used && link.relayed ? ", relayed" : "") + (link.dormant ? ", dormant" : "") + + ((line.used ? link.relayed : line.relayed) ? ", relayed" : "") + (link.dormant ? ", dormant" : "") + (typeof line.rttMs === "number" ? ", " + line.rttMs.toFixed(1) + " ms" : "") + ", measured " + age(secsAgo + elapsed()) + " ago"; drawn.append(title); diff --git a/src/api/dashboard/mod.rs b/src/api/dashboard/mod.rs index 92271ef..1de21cd 100644 --- a/src/api/dashboard/mod.rs +++ b/src/api/dashboard/mod.rs @@ -240,6 +240,7 @@ fn links_json(links: &[Link]) -> JsonValue { "others": link.others.iter().map(|other| json!({ "transport": other.transport, "rttMs": other.rtt_us.map(|us| f64::from(us) / 1000.0), + "relayed": other.relayed, })).collect::<Vec<_>>(), }) }) |
