mirror of
https://github.com/smittix/intercept.git
synced 2026-07-30 03:28:10 -07:00
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:
@@ -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' %}
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user