From 156d832d2d11f59643ebe2b4e93ccbd7d25380b3 Mon Sep 17 00:00:00 2001 From: Smittix Date: Tue, 20 Jan 2026 22:58:57 +0000 Subject: [PATCH] Add ActivityTimeline to Pager and 433MHz sensor modes - Add timeline container divs for pager and sensor modes - Add timeline configurations in initializeModeTimeline() - Show/hide timeline containers based on active mode - Feed pager and sensor messages to their respective timelines Co-Authored-By: Claude Opus 4.5 --- templates/index.html | 54 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/templates/index.html b/templates/index.html index 884da22..f5d40e7 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1416,6 +1416,10 @@ + + + +
@@ -1497,6 +1501,28 @@ if (modeTimelines[mode]) return; const configs = { + 'pager': { + container: 'pagerTimelineContainer', + config: { + title: 'Pager Activity', + mode: 'pager', + visualMode: 'enriched', + collapsed: false, + timeWindows: ['5m', '15m', '30m', '1h'], + defaultTimeWindow: '15m' + } + }, + 'sensor': { + container: 'sensorTimelineContainer', + config: { + title: 'Sensor Activity', + mode: 'sensor', + visualMode: 'enriched', + collapsed: false, + timeWindows: ['5m', '15m', '30m', '1h'], + defaultTimeWindow: '15m' + } + }, 'tscm': { container: 'tscmTimelineContainer', config: typeof RFTimelineAdapter !== 'undefined' ? RFTimelineAdapter.getTscmConfig() : { @@ -2012,6 +2038,10 @@ document.getElementById('aprsVisuals').style.display = mode === 'aprs' ? 'flex' : 'none'; document.getElementById('tscmVisuals').style.display = mode === 'tscm' ? 'flex' : 'none'; + // Show/hide mode-specific timeline containers + document.getElementById('pagerTimelineContainer').style.display = mode === 'pager' ? 'block' : 'none'; + document.getElementById('sensorTimelineContainer').style.display = mode === 'sensor' ? 'block' : 'none'; + // Update output panel title based on mode const titles = { 'pager': 'Pager Decoder', @@ -2283,6 +2313,18 @@ const card = SignalCards.createSensorCard(msg); output.insertBefore(card, output.firstChild); + // Add to activity timeline + if (typeof addTimelineEvent === 'function') { + addTimelineEvent('sensor', { + id: `${msg.model}-${msg.sensor_id}-${msg.timestamp}`, + label: msg.model || 'Unknown Sensor', + sublabel: msg.sensor_id ? `ID: ${msg.sensor_id}` : '', + timestamp: msg.timestamp || Date.now(), + type: 'sensor', + status: card.dataset.status || 'new' + }); + } + // Update filter counts SignalCards.updateCounts(output); @@ -3178,6 +3220,18 @@ output.insertBefore(msgEl, output.firstChild); + // Add to activity timeline + if (typeof addTimelineEvent === 'function') { + addTimelineEvent('pager', { + id: `${msg.address}-${msg.timestamp}`, + label: msg.address, + sublabel: msg.protocol, + timestamp: msg.timestamp || Date.now(), + type: 'pager', + status: msgEl.dataset.status || 'new' + }); + } + // Update filter counts SignalCards.updateCounts(output);