From d3ac6bf014831aae2b854d346628d3ba3246baff Mon Sep 17 00:00:00 2001 From: liamcottle Date: Sat, 23 Mar 2024 23:36:29 +1300 Subject: [PATCH] use new neighbours source --- src/index.js | 1 - src/public/index.html | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/index.js b/src/index.js index a5c1c56..8691d56 100644 --- a/src/index.js +++ b/src/index.js @@ -61,7 +61,6 @@ app.get('/api/v1/nodes', async (req, res) => { node_id_hex: "!" + node.node_id.toString(16), hardware_model_name: HardwareModel.valuesById[node.hardware_model] ?? "UNKNOWN", role_name: Role.valuesById[node.role] ?? "UNKNOWN", - neighbour_info: node.neighbours, // todo: remove once ui uses new neighbours key }) } diff --git a/src/public/index.html b/src/public/index.html index 32cb430..41679db 100644 --- a/src/public/index.html +++ b/src/public/index.html @@ -1639,7 +1639,7 @@ } // add node neighbours - const neighbours = node.neighbour_info?.neighbours ?? []; + const neighbours = node.neighbours ?? []; for(const neighbour of neighbours){ // fixme: skipping zero snr? saw some crazy long neighbours with zero snr... @@ -1686,7 +1686,7 @@ + `
Distance: ${distance}` + `

ID: ${neighbourNode.node_id} -> ${node.node_id}` + `
Hex ID: ${neighbourNode.node_id_hex} -> ${node.node_id_hex}` - + `
Updated: ${moment(new Date(node.neighbour_info.updated_at)).fromNow()}` + + (node.neighbours_updated_at ? `
Updated: ${moment(new Date(node.neighbours_updated_at)).fromNow()}` : '') + `

Note: Some of these super long distance 'Neighbours' don't seem right...` line.bindTooltip(tooltip, {