Skip to content

panel time ranges, dashboard override and geo map viewport - #306

Merged
Polliog merged 7 commits into
developfrom
feat/dashboard-issues-304-305
Aug 22, 2026
Merged

panel time ranges, dashboard override and geo map viewport#306
Polliog merged 7 commits into
developfrom
feat/dashboard-issues-304-305

Conversation

@Polliog

@Polliog Polliog commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator

Implements #305 and fixes #304 (refs only, issues stay open until release per convention).

Per-panel time ranges + dashboard override (#305)

  • One shared preset catalog (PANEL_TIME_RANGES, 15m to 30d, 10 presets) in @logtide/shared, applied to every window-scoped panel: time_series, top_n_table, geo_map (interval), log_table, metric_chart, metric_stat, trace_latency, trace_volume, detection_events, activity_overview (timeRange). Strict superset of every previous enum: stored dashboards and YAML imports keep validating, no schema_version bump.
  • Field names interval/timeRange are kept as-is (a rename would force a document migration for zero gain); the UI aligns instead: every config form now labels the control "Time range" with human-readable labels ("Last 48 hours").
  • Dashboard-level time override: a Clock select in the dashboard toolbar temporarily overrides every window-scoped panel (batch body timeRange, applied via applyTimeRangeOverride). It is ephemeral view state like panel pause: never persisted, cleared on dashboard switch; live log tables and windowless panels are untouched. Manual per-panel refresh carries the active override.

Pre-existing window bugs fixed along the way

  • time_series ignored its configured interval (always last 24h via getTimeseries) AND its service filter. The fetcher is now windowed with adaptive bucketing (1m/5m/15m/1h/1d), a Timescale cagg fast path with bucket-aligned raw-tail backfill for 1h/1d buckets, reservoir.aggregate elsewhere, zero-filled buckets, and date-aware axis labels on multi-day ranges.
  • top_n_table service dimension ignored its interval (always last 7d via the daily cagg). The cagg fast path now serves only 7d && !showLastSeen; everything else goes through windowed reservoir.topValues, which also brings the Last seen column to the service dimension.

Geo map viewport (#304)

  • The panel no longer destroys and rebuilds the Leaflet map on every poll: one persistent map, bubbles swapped in a LayerGroup. Auto-fit runs only on first paint, when the panel's query-shaping config changes, or via the new "Fit data" control; background refreshes never move the viewport.
  • Wheel over the panel now scrolls the dashboard instead of zooming the map (zoom stays on the +/- controls, double click and pinch), so scrolling past the panel cannot silently reset the framing.
  • Leaflet pane z-indexes (400-1000) painted over open dialogs (z-50); the map canvas is now an isolated stacking context. Pre-existing since 1.3.0.
  • ResizeObserver keeps the map sized on panel resize (the old rebuild-per-poll masked this).

Verification

  • Backend full suite: 278 files / 5000 tests green. Shared: 203. Frontend: 167, svelte-check at the pre-existing baseline.
  • Real-browser smoke on a seeded dev stack: viewport fingerprint (pane transform + viewBox + path hash) byte-identical across panel refresh and across a 30d override refresh; override totals 50 -> 65 -> 83 logs for 24h/48h/30d on data seeded across five age bands; zero console errors.

@codecov

codecov Bot commented Aug 22, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 99.02439% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...rc/modules/custom-dashboards/panel-data-service.ts 98.83% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@Polliog
Polliog merged commit 7708299 into develop Aug 22, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant