diff --git a/public/nodes.js b/public/nodes.js
index 497f7d9..47a5622 100644
--- a/public/nodes.js
+++ b/public/nodes.js
@@ -295,7 +295,11 @@
panel.innerHTML = '
Loading…
';
try {
- const data = await api('/nodes/' + encodeURIComponent(pubkey));
+ const [data, healthData] = await Promise.all([
+ api('/nodes/' + encodeURIComponent(pubkey)),
+ api('/nodes/' + encodeURIComponent(pubkey) + '/health').catch(() => null)
+ ]);
+ data.healthData = healthData;
renderDetail(panel, data);
} catch (e) {
panel.innerHTML = `Error: ${e.message}
`;
@@ -305,6 +309,7 @@
function renderDetail(panel, data) {
const n = data.node;
const adverts = data.recentAdverts || [];
+ const recent = data.healthData?.recentPackets || [];
const roleColor = ROLE_COLORS[n.role] || '#6b7280';
const hasLoc = n.lat != null && n.lon != null;
const nodeUrl = location.origin + '#/nodes/' + encodeURIComponent(n.public_key);
@@ -337,9 +342,9 @@
-
Recent Activity (${adverts.length})
+
Recent Activity (${recent.length})
- ${adverts.length ? adverts.map(a => {
+ ${recent.length ? recent.map(a => {
let decoded;
try { decoded = JSON.parse(a.decoded_json); } catch {}
const pType = PAYLOAD_TYPES[a.payload_type] || 'Packet';