mirror of
https://github.com/smittix/intercept.git
synced 2026-04-25 23:29:59 -07:00
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 <noreply@anthropic.com>
This commit is contained in:
@@ -1416,6 +1416,10 @@
|
|||||||
<!-- Filter Bar Container (populated by JavaScript based on active mode) -->
|
<!-- Filter Bar Container (populated by JavaScript based on active mode) -->
|
||||||
<div id="filterBarContainer" style="display: none;"></div>
|
<div id="filterBarContainer" style="display: none;"></div>
|
||||||
|
|
||||||
|
<!-- Mode-specific Timeline Containers -->
|
||||||
|
<div id="pagerTimelineContainer" style="display: none; margin-bottom: 12px;"></div>
|
||||||
|
<div id="sensorTimelineContainer" style="display: none; margin-bottom: 12px;"></div>
|
||||||
|
|
||||||
<div class="output-content signal-feed" id="output">
|
<div class="output-content signal-feed" id="output">
|
||||||
<div class="placeholder signal-empty-state">
|
<div class="placeholder signal-empty-state">
|
||||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
|
||||||
@@ -1497,6 +1501,28 @@
|
|||||||
if (modeTimelines[mode]) return;
|
if (modeTimelines[mode]) return;
|
||||||
|
|
||||||
const configs = {
|
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': {
|
'tscm': {
|
||||||
container: 'tscmTimelineContainer',
|
container: 'tscmTimelineContainer',
|
||||||
config: typeof RFTimelineAdapter !== 'undefined' ? RFTimelineAdapter.getTscmConfig() : {
|
config: typeof RFTimelineAdapter !== 'undefined' ? RFTimelineAdapter.getTscmConfig() : {
|
||||||
@@ -2012,6 +2038,10 @@
|
|||||||
document.getElementById('aprsVisuals').style.display = mode === 'aprs' ? 'flex' : 'none';
|
document.getElementById('aprsVisuals').style.display = mode === 'aprs' ? 'flex' : 'none';
|
||||||
document.getElementById('tscmVisuals').style.display = mode === 'tscm' ? '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
|
// Update output panel title based on mode
|
||||||
const titles = {
|
const titles = {
|
||||||
'pager': 'Pager Decoder',
|
'pager': 'Pager Decoder',
|
||||||
@@ -2283,6 +2313,18 @@
|
|||||||
const card = SignalCards.createSensorCard(msg);
|
const card = SignalCards.createSensorCard(msg);
|
||||||
output.insertBefore(card, output.firstChild);
|
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
|
// Update filter counts
|
||||||
SignalCards.updateCounts(output);
|
SignalCards.updateCounts(output);
|
||||||
|
|
||||||
@@ -3178,6 +3220,18 @@
|
|||||||
|
|
||||||
output.insertBefore(msgEl, output.firstChild);
|
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
|
// Update filter counts
|
||||||
SignalCards.updateCounts(output);
|
SignalCards.updateCounts(output);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user