From 728f1a46ae5cbac21da68f7913316328ff599143 Mon Sep 17 00:00:00 2001 From: alemi Date: Mon, 2 Dec 2024 23:44:27 +0100 Subject: [PATCH] feat: show last rtt in web page --- index.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index f0f6532..5f79803 100644 --- a/index.html +++ b/index.html @@ -72,13 +72,13 @@ function cell(timestamp, rtt) { } } -function card(key, history) { +function card(key, history, last_rtt) { let bar = ""; for (let el of history) { bar += cell(el[0], el[1]); } return `
-

${key}

+

${key} (${last_rtt}ms)

${bar}
@@ -99,7 +99,7 @@ async function updateStatus() { for (let key of keys) { let res = await fetch(`/api/status/${key}`); let history = await res.json(); - out += card(key, history); + out += card(key, history, status[key]); } main.innerHTML = out;