From b08beabc6bbb16de607234c6db2de5e592882b5d Mon Sep 17 00:00:00 2001 From: root <165865819+brianshea2@users.noreply.github.com> Date: Tue, 11 Jun 2024 22:04:27 +0000 Subject: [PATCH] show channel name from mqtt topic --- website/index.html | 36 +++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/website/index.html b/website/index.html index bb3dcc8..46f861e 100644 --- a/website/index.html +++ b/website/index.html @@ -251,18 +251,32 @@ }
Last seen | via | on root topic | |
---|---|---|---|
Last seen | via | root topic | channel |
${since(seen)} | -${topic.endsWith('/2/map/') ? 'map report' : topic.endsWith(`/${id}`) ? 'self' : topic.replace(/^.*\/(![0-9a-f]+)$/, (_, reporterId) => { - const reporterNum = Number(`0x${reporterId.slice(1)}`) - return data[reporterNum] ? nodeLink(reporterNum, reporterId) : reporterId - })} | -${html(topic.replace(/\/2\/e\/[^\/]+\/[^\/]+$|\/2\/map\/$/, ''))} | -|
${since(seen)} | +${reporter} | +${html(captures[1])} | +${html(captures[2] ?? '')} | +