Browse Source

feat: show surveillance level summary in UI

master
Jan Svabenik 5 hours ago
parent
commit
ed71b66c5d
1 changed files with 10 additions and 1 deletions
  1. +10
    -1
      web/app.js

+ 10
- 1
web/app.js View File

@@ -763,6 +763,14 @@ async function loadRefinement() {
} catch {}
}

function formatLevelSummary(level) {
if (!level) return 'n/a';
const name = level.name || 'level';
const fft = level.fft_size ? `${level.fft_size} bins` : 'bins n/a';
const span = level.span_hz ? fmtHz(level.span_hz) : 'span n/a';
return `${name} · ${fft} · ${span}`;
}

function queueConfigUpdate(partial) {
if (isSyncingConfig) return;
pendingConfigUpdate = { ...(pendingConfigUpdate || {}), ...partial };
@@ -868,7 +876,8 @@ function updateHeroMetrics() {
if (healthRefineWindows) {
const stats = refinementInfo.window_stats || null;
if (stats && stats.count) {
healthRefineWindows.textContent = `${fmtHz(stats.min_span_hz || 0)}–${fmtHz(stats.max_span_hz || 0)}`;
const levels = refinementInfo.surveillance_level ? ` · ${formatLevelSummary(refinementInfo.surveillance_level)}` : '';
healthRefineWindows.textContent = `${fmtHz(stats.min_span_hz || 0)}–${fmtHz(stats.max_span_hz || 0)}${levels}`;
} else {
const windows = refinementInfo.windows || [];
if (!Array.isArray(windows) || windows.length === 0) {


Loading…
Cancel
Save