| @@ -763,6 +763,14 @@ async function loadRefinement() { | |||||
| } catch {} | } 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) { | function queueConfigUpdate(partial) { | ||||
| if (isSyncingConfig) return; | if (isSyncingConfig) return; | ||||
| pendingConfigUpdate = { ...(pendingConfigUpdate || {}), ...partial }; | pendingConfigUpdate = { ...(pendingConfigUpdate || {}), ...partial }; | ||||
| @@ -868,7 +876,8 @@ function updateHeroMetrics() { | |||||
| if (healthRefineWindows) { | if (healthRefineWindows) { | ||||
| const stats = refinementInfo.window_stats || null; | const stats = refinementInfo.window_stats || null; | ||||
| if (stats && stats.count) { | 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 { | } else { | ||||
| const windows = refinementInfo.windows || []; | const windows = refinementInfo.windows || []; | ||||
| if (!Array.isArray(windows) || windows.length === 0) { | if (!Array.isArray(windows) || windows.length === 0) { | ||||