Fix global timezone on ADS-B dashboard and harden VDL2 correlation

Timezone fixes:
- Add utils.js (InterceptTime) to adsb_dashboard.html — was completely
  missing, causing all times to fall back to UTC regardless of setting
- Register onChange listener in nav.html so clock updates instantly
  when timezone/format is changed in Settings
- Initialize timezone/format dropdowns on ADS-B dashboard page load
- Browser-verified: ET/12h ↔ UTC/24h switches instantly on ADS-B page

VDL2 correlation fix:
- Force ICAO hex to uppercase when promoting from VDL2 src.addr (dumpvdl2
  may output lowercase, ADS-B stores uppercase — case mismatch prevented
  correlator from matching)
- Move ICAO/addr promotion before ACARS field extraction so even
  non-ACARS VDL2 frames (XID, connection mgmt) get correlated

Auth:
- Add INTERCEPT_DISABLE_AUTH env var to skip login for local/dev use
- Configurable via docker-compose.yml environment

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
mitchross
2026-03-26 00:05:49 -04:00
parent b66ac935b7
commit f4672cf0c7
5 changed files with 48 additions and 27 deletions
+11
View File
@@ -22,6 +22,7 @@
window.INTERCEPT_DEFAULT_LAT = {{ default_latitude | tojson }};
window.INTERCEPT_DEFAULT_LON = {{ default_longitude | tojson }};
</script>
<script src="{{ url_for('static', filename='js/core/utils.js') }}"></script>
<script defer src="{{ url_for('static', filename='vendor/leaflet/leaflet.js') }}"></script>
<script defer src="{{ url_for('static', filename='js/core/observer-location.js') }}"></script>
</head>
@@ -5730,6 +5731,16 @@ sudo make install</code>
<!-- Settings Modal -->
{% include 'partials/settings-modal.html' %}
<script>
// Initialize timezone/format dropdowns from saved preferences
(function() {
if (typeof InterceptTime === 'undefined') return;
var tzSel = document.getElementById('globalTimezoneSelect');
var fmtSel = document.getElementById('globalTimeFormatSelect');
if (tzSel) tzSel.value = InterceptTime.getTimezone();
if (fmtSel) fmtSel.value = InterceptTime.getHour12() ? '12' : '24';
})();
</script>
<!-- Help Modal -->
{% include 'partials/help-modal.html' %}
+4
View File
@@ -551,6 +551,10 @@
}
setInterval(updateNavUtcClock, 1000);
updateNavUtcClock();
// React immediately when timezone/format changes in Settings
if (typeof InterceptTime !== 'undefined' && InterceptTime.onChange) {
InterceptTime.onChange(updateNavUtcClock);
}
}
})();
</script>