From 15d5cb22721c7d428d1c75f11149a0368f3e9a83 Mon Sep 17 00:00:00 2001 From: mitchross Date: Fri, 20 Feb 2026 13:24:00 -0500 Subject: [PATCH] feat(adsb): cross-link ACARS sidebar messages with tracked aircraft Click an ACARS message in the left sidebar to zoom the map to the matching aircraft and open its detail panel. Aircraft with ACARS activity show a DLK badge in the tracked list. Default NA frequency changed to only check 131.550 on initial load. Co-Authored-By: Claude Opus 4.6 --- static/css/modes/acars.css | 5 +++ templates/adsb_dashboard.html | 47 ++++++++++++++++++++++++----- templates/partials/modes/acars.html | 4 +-- 3 files changed, 47 insertions(+), 9 deletions(-) diff --git a/static/css/modes/acars.css b/static/css/modes/acars.css index bdbaef5..28bc85f 100644 --- a/static/css/modes/acars.css +++ b/static/css/modes/acars.css @@ -108,3 +108,8 @@ .acars-feed-card:hover { background: rgba(74, 158, 255, 0.05); } + +/* Clickable ACARS sidebar messages (linked to tracked aircraft) */ +.acars-message-item[style*="cursor: pointer"]:hover { + background: rgba(74, 158, 255, 0.1); +} diff --git a/templates/adsb_dashboard.html b/templates/adsb_dashboard.html index 17b0329..1c2a01d 100644 --- a/templates/adsb_dashboard.html +++ b/templates/adsb_dashboard.html @@ -2748,6 +2748,9 @@ sudo make install // Agent badge if aircraft came from remote agent const agentBadge = ac._agent ? `${ac._agent}` : ''; + // ACARS indicator if this aircraft has datalink messages + const acarsIndicator = (typeof acarsAircraftIcaos !== 'undefined' && acarsAircraftIcaos.has(ac.icao)) ? + `DLK` : ''; // Vertical rate indicator: arrow up (climbing), arrow down (descending), or dash (level) let vsIndicator = '-'; let vsColor = ''; @@ -2758,7 +2761,7 @@ sudo make install return `
- ${callsign}${badge}${agentBadge} + ${callsign}${badge}${acarsIndicator}${agentBadge} ${typeCode ? typeCode + ' • ' : ''}${ac.icao}
@@ -3470,7 +3473,7 @@ sudo make install let acarsMessageCount = 0; let acarsSidebarCollapsed = localStorage.getItem('acarsSidebarCollapsed') !== 'false'; let acarsFrequencies = { - 'na': ['131.725', '131.825'], + 'na': ['131.550', '130.025', '129.125'], 'eu': ['131.525', '131.725', '131.550'], 'ap': ['131.550', '131.450'] }; @@ -3526,9 +3529,9 @@ sudo make install previouslyChecked.add(cb.value); }); - container.innerHTML = freqs.map(freq => { - // Check by default if it was previously checked or if this is initial load - const checked = previouslyChecked.size === 0 || previouslyChecked.has(freq) ? 'checked' : ''; + container.innerHTML = freqs.map((freq, i) => { + // On initial load, only check the first (primary) frequency; otherwise preserve state + const checked = previouslyChecked.size === 0 ? (i === 0 ? 'checked' : '') : (previouslyChecked.has(freq) ? 'checked' : ''); return `