Add adjustable probe area for OpenSky test connection

Let the OpenSky health probe run over a chosen bounding box without
touching the saved default, so its credit cost (which scales with area)
can be checked cheaply.

- Backend: the plugin health endpoint (panel Check) and the OpenSky
  health endpoint (Web App Test connection) accept an optional ?bbox=,
  validated with validBBox and applied to a transient probe instance;
  both BFF and API forward it. Saved config is untouched.
- API panel: a "Probe area" picker beside each bbox-capable plugin's
  Check button — saved default, all countries (grouped by continent),
  or Custom. Adds a compact pv-input-sm style.
- Web App: a "Test area" picker beside Test connection, using the full
  country list (new countryGroups() helper) plus Custom. This is where
  the probe is authenticated and the credit cost is shown.

Builds pass across both Go modules and both frontends. Panel picker
verified live (186 options, defaults to saved default).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
tajniak81andClaude Opus 4.8 committed 2026-07-14 10:25:59 +02:00
1 parent 763cc67081
commit 15bff7f517
17 files changed
+233 -53

No files matched your search

+7 -1
View File
@@ -536,11 +536,17 @@ func (s *Server) handleOpenSkyHealth(w http.ResponseWriter, r *http.Request) {
"status": "down", "detail": "OpenSky is disabled for your organization"}})
return
}
// A ?bbox= override lets the Settings "Test connection" probe a specific area
// (to check its credit cost) without changing the saved default.
bbox := res.eff.Bbox
if q := strings.TrimSpace(r.URL.Query().Get("bbox")); q != "" && validBBox(q) {
bbox = q
}
cfg := map[string]string{
"clientId": res.eff.ClientID,
"clientSecret": res.eff.ClientSecret,
"plan": res.eff.Plan,
"bbox": res.eff.Bbox,
"bbox": bbox,
"allowAnonymous": boolStr(res.allowAnon),
}
h, err := s.plugins.HealthCheckWith(r.Context(), openSkyPlugin, cfg)