feat(balancers): tabbed Observatory/Burst Observatory form (#5627)

* feat(balancers): tabbed Observatory/Burst form replacing raw JSON

Replace the raw JSON editor for the Observatory / Burst Observatory sections
with a proper Ant Design form, and split the Balancers page into two sub-tabs:
"Balancer Settings" (the existing table) and "Observatory".

Observers stay fully auto-managed by balancer strategy through the existing
syncObservatories logic: users edit only the tunable probe fields, the
subjectSelector is shown read-only since it is derived from the balancers, and
deleting the last balancer that needs an observer now warns in the confirm
dialog that the observer will be removed too. Overlapping selectors keep an
observer alive while any balancer still references it.

Also add the previously missing pingConfig.httpMethod field (HEAD/GET) and
translations for the new strings across all 13 locales.

* refactor(balancers): tighten httpMethod typing and align connectivity default

Address automated review feedback on the Observatory form:
- Use the ObservatoryHttpMethodSchema enum for pingConfig.httpMethod instead of
  a free-form z.string(), and drive the HTTP method Select from its options.
  Removes the previously dead enum export and the duplicate local list, and
  types the field as 'HEAD' | 'GET'.
- Align the schema's connectivity default with DEFAULT_BURST_OBSERVATORY (the
  hicloud URL) so it matches what burst observers are actually created with.

No behavior change.
This commit is contained in:
nima1024m
2026-06-28 15:02:18 +02:00
committed by GitHub
parent 51ffba5961
commit 25a86b9ee2
18 changed files with 807 additions and 86 deletions
+30
View File
@@ -1782,6 +1782,36 @@
"toastDeleted": "Deleted",
"toastDeleteFailed": "Delete failed"
},
"tabBalancerSettings": "Balancer Settings",
"tabObservatory": "Observatory",
"observatory": {
"title": "Observatory",
"burstTitle": "Burst Observatory",
"autoManaged": "Observers are managed automatically from your balancers. Tune how they probe below — the watched outbounds follow your balancer selectors.",
"emptyHint": "No connection observer is active. One is added automatically when you create a Least Ping or Least Load balancer — or a Random / Round-robin balancer with a fallback — so the balancer can measure your outbounds and pick the best one.",
"subjectSelector": "Watched Outbounds",
"subjectSelectorDesc": "Outbound tags this observer probes. Managed automatically from your balancers.",
"probeURL": "Probe URL",
"probeURLDesc": "URL fetched to measure each outbound. Should return HTTP 204.",
"probeInterval": "Probe Interval",
"probeIntervalDesc": "How often to probe each outbound, e.g. 30s, 1m, 2h45m.",
"enableConcurrency": "Concurrent Probing",
"enableConcurrencyDesc": "Probe all watched outbounds at once instead of one-by-one. Faster, but more visible on the network.",
"destination": "Probe Destination",
"destinationDesc": "URL fetched to measure each outbound. Should return HTTP 204.",
"connectivity": "Connectivity Check",
"connectivityDesc": "Optional local-network check URL, tried only after the destination fails. Leave empty to skip.",
"interval": "Probe Interval",
"intervalDesc": "Average time between probes per outbound, e.g. 1m. Minimum 10s.",
"timeout": "Probe Timeout",
"timeoutDesc": "How long to wait for a probe before it counts as failed, e.g. 5s.",
"sampling": "Sampling Count",
"samplingDesc": "Number of recent probe results kept to score each outbound.",
"httpMethod": "HTTP Method",
"httpMethodDesc": "HTTP method used for probes.",
"deleteAlsoObservatory": "This is the last balancer using the Observatory, so it will be removed too.",
"deleteAlsoBurst": "This is the last balancer using the Burst Observatory, so it will be removed too."
},
"balancer": {
"addBalancer": "Add Balancer",
"editBalancer": "Edit Balancer",