diff --git a/api/src/routes/position-history.ts b/api/src/routes/position-history.ts index 943e792..cd5996b 100644 --- a/api/src/routes/position-history.ts +++ b/api/src/routes/position-history.ts @@ -60,6 +60,8 @@ express.get("/api/v1/nodes/:nodeId/position-history", async (req, res) => { latitude: position.latitude, longitude: position.longitude, altitude: position.altitude, + gateway_id: position.gateway_id, + channel_id: position.channel_id, created_at: position.created_at, }); }); diff --git a/app/public/index.html b/app/public/index.html index 96ec2a1..6cce482 100644 --- a/app/public/index.html +++ b/app/public/index.html @@ -5036,11 +5036,16 @@

]); let tooltip = ""; - tooltip += `${moment( - new Date(positionHistory.created_at) - ).format("DD/MM/YYYY hh:mm A")}
`; tooltip += `Position: ${positionHistory.latitude}, ${positionHistory.longitude}
`; + // add gateway info if available + if (positionHistory.gateway_id) { + const gatewayNode = findNodeById(positionHistory.gateway_id); + if (gatewayNode) { + tooltip += `Heard by: [${gatewayNode.short_name}] ${gatewayNode.long_name}`; + } + } + // create position history marker const marker = L.marker([positionHistory.latitude, longitude], { icon: iconPositionHistory,