diff --git a/public/index.html b/public/index.html index 752b4d7..47d9fde 100644 --- a/public/index.html +++ b/public/index.html @@ -80,7 +80,7 @@ - + diff --git a/public/nodes.js b/public/nodes.js index d5b195a..80f4d0e 100644 --- a/public/nodes.js +++ b/public/nodes.js @@ -140,37 +140,21 @@ ` : ''}
-

Recent Activity (${recent.length})

+

Recent Packets (${adverts.length})

- ${recent.length ? recent.slice(0, 20).map(p => { + ${adverts.length ? adverts.map(p => { let decoded; try { decoded = JSON.parse(p.decoded_json); } catch {} - const typeLabel = p.payload_type === 4 ? '📡 Advert' : p.payload_type === 5 ? '💬 Channel' : p.payload_type === 2 ? '✉️ DM' : 'Packet'; - const detail = decoded?.text ? ': ' + escapeHtml(truncate(decoded.text, 50)) : ''; - const snr = p.snr != null ? ` · SNR ${p.snr}dB` : (decoded?.SNR != null ? ` · SNR ${decoded.SNR}dB` : ''); + const typeLabel = p.payload_type === 4 ? '📡 Advert' : p.payload_type === 5 ? '💬 Channel' : p.payload_type === 2 ? '✉️ DM' : '📦 Packet'; + const detail = decoded?.text ? ': ' + escapeHtml(truncate(decoded.text, 50)) : decoded?.name ? ' — ' + escapeHtml(decoded.name) : ''; + const obs = p.observer_name || p.observer_id; + const snr = p.snr != null ? ` · SNR ${p.snr}dB` : ''; + const rssi = p.rssi != null ? ` · RSSI ${p.rssi}dBm` : ''; return `
${timeAgo(p.timestamp)} - ${typeLabel}${detail}${snr} + ${typeLabel}${detail}${obs ? ' via ' + escapeHtml(obs) : ''}${snr}${rssi} Analyze →
`; - }).join('') : '
No recent activity
'} -
-
- -
-

Recent Adverts (${adverts.length})

-
- ${adverts.length ? adverts.map(a => { - const ts = a.timestamp || a.created_at; - const obs = a.observer_name || a.observer_id || '—'; - const pType = PAYLOAD_TYPES[a.payload_type] || 'Packet'; - return ``; - }).join('') : '
No recent adverts
'} + }).join('') : '
No recent packets
'}
@@ -447,41 +431,25 @@
-

Recent Adverts (${adverts.length})

+

Recent Packets (${adverts.length})

${adverts.length ? adverts.map(a => { - const ts = a.timestamp || a.created_at; - const obs = a.observer_name || a.observer_id || '—'; - const pType = PAYLOAD_TYPES[a.payload_type] || 'Packet'; - return ``; - }).join('') : '
No recent adverts
'} -
-
- -
-

Recent Activity (${recent.length})

-
- ${recent.length ? recent.map(a => { let decoded; try { decoded = JSON.parse(a.decoded_json); } catch {} const pType = PAYLOAD_TYPES[a.payload_type] || 'Packet'; const icon = a.payload_type === 4 ? '📡' : a.payload_type === 5 ? '💬' : a.payload_type === 2 ? '✉️' : '📦'; const detail = decoded?.text ? ': ' + escapeHtml(truncate(decoded.text, 50)) : decoded?.name ? ' — ' + escapeHtml(decoded.name) : ''; + const obs = a.observer_name || a.observer_id; return ``; - }).join('') : '
No recent activity
'} + }).join('') : '
No recent packets
'}
`;