Fix issue #21 and add aircraft position tracking indicators
- Fix Debian package upgrade issue by separating upgrade vs remove behavior in prerm script - Add aircraft position tracking statistics in merger GetStatistics() method - Update frontend to display position tracking indicators in both header and stats view - Format Go code to maintain consistency 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
0db12a1ddc
commit
66a995b4d0
8 changed files with 124 additions and 74 deletions
|
|
@ -53,6 +53,7 @@
|
|||
<!-- Summary stats -->
|
||||
<div class="stats-summary">
|
||||
<span id="aircraft-count">0 aircraft</span>
|
||||
<span id="position-summary">0 positioned</span>
|
||||
<span id="sources-count">0 sources</span>
|
||||
<span id="active-clients">1 viewer</span>
|
||||
<span id="connection-status" class="connection-status disconnected">Connecting...</span>
|
||||
|
|
@ -208,6 +209,14 @@
|
|||
<h3>Max Range</h3>
|
||||
<div class="stat-value" id="max-range">0 km</div>
|
||||
</div>
|
||||
<div class="stat-card">
|
||||
<h3>Aircraft with Position</h3>
|
||||
<div class="stat-value" id="aircraft-with-position">0</div>
|
||||
</div>
|
||||
<div class="stat-card">
|
||||
<h3>Aircraft without Position</h3>
|
||||
<div class="stat-value" id="aircraft-without-position">0</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Charts -->
|
||||
|
|
|
|||
|
|
@ -244,6 +244,8 @@ export class UIManager {
|
|||
const activeViewersEl = document.getElementById('active-viewers');
|
||||
const maxRangeEl = document.getElementById('max-range');
|
||||
const messagesSecEl = document.getElementById('messages-sec');
|
||||
const aircraftWithPositionEl = document.getElementById('aircraft-with-position');
|
||||
const aircraftWithoutPositionEl = document.getElementById('aircraft-without-position');
|
||||
|
||||
if (totalAircraftEl) totalAircraftEl.textContent = this.aircraftData.size;
|
||||
if (activeSourcesEl) {
|
||||
|
|
@ -253,6 +255,14 @@ export class UIManager {
|
|||
activeViewersEl.textContent = this.stats.active_clients || 1;
|
||||
}
|
||||
|
||||
// Update position tracking statistics from backend
|
||||
if (aircraftWithPositionEl) {
|
||||
aircraftWithPositionEl.textContent = this.stats.aircraft_with_position || 0;
|
||||
}
|
||||
if (aircraftWithoutPositionEl) {
|
||||
aircraftWithoutPositionEl.textContent = this.stats.aircraft_without_position || 0;
|
||||
}
|
||||
|
||||
// Calculate max range
|
||||
let maxDistance = 0;
|
||||
for (const aircraft of this.aircraftData.values()) {
|
||||
|
|
@ -270,10 +280,18 @@ export class UIManager {
|
|||
|
||||
updateHeaderInfo() {
|
||||
const aircraftCountEl = document.getElementById('aircraft-count');
|
||||
const positionSummaryEl = document.getElementById('position-summary');
|
||||
const sourcesCountEl = document.getElementById('sources-count');
|
||||
const activeClientsEl = document.getElementById('active-clients');
|
||||
|
||||
if (aircraftCountEl) aircraftCountEl.textContent = `${this.aircraftData.size} aircraft`;
|
||||
|
||||
// Update position summary in header
|
||||
if (positionSummaryEl) {
|
||||
const positioned = this.stats.aircraft_with_position || 0;
|
||||
positionSummaryEl.textContent = `${positioned} positioned`;
|
||||
}
|
||||
|
||||
if (sourcesCountEl) sourcesCountEl.textContent = `${this.sourcesData.size} sources`;
|
||||
|
||||
// Update active clients count
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue