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 authored and GitHub committed 2026-06-28 15:02:18 +02:00 Unverified
1 parent 51ffba5961
commit 25a86b9ee2
18 files changed
+807 -86

No files matched your search

+30
View File
@@ -1663,6 +1663,36 @@
"toastDeleted": "تم الحذف",
"toastDeleteFailed": "فشل الحذف"
},
"tabBalancerSettings": "إعدادات الموازن",
"tabObservatory": "المرصد",
"observatory": {
"title": "المرصد",
"burstTitle": "مرصد Burst",
"autoManaged": "تتم إدارة المراصد تلقائيًا من الموازنات لديك. اضبط طريقة الفحص بالأسفل؛ تتبع الوجهات الصادرة المراقَبة محدِّدات الموازن.",
"emptyHint": "لا يوجد مرصد اتصال نشط. تتم إضافة واحد تلقائيًا عند إنشاء موازن Least Ping أو Least Load — أو موازن Random / Round-robin مع fallback — حتى يتمكن الموازن من قياس الوجهات الصادرة واختيار الأفضل.",
"subjectSelector": "الوجهات المراقَبة",
"subjectSelectorDesc": "وسوم الوجهات الصادرة التي يفحصها هذا المرصد. تتم إدارتها تلقائيًا من الموازنات لديك.",
"probeURL": "رابط الفحص (URL)",
"probeURLDesc": "الرابط الذي يُطلب لقياس كل وجهة صادرة. يجب أن يُعيد HTTP 204.",
"probeInterval": "فترة الفحص",
"probeIntervalDesc": "كم مرة يتم فحص كل وجهة صادرة، مثل 30s أو 1m أو 2h45m.",
"enableConcurrency": "فحص متزامن",
"enableConcurrencyDesc": "افحص كل الوجهات المراقَبة دفعة واحدة بدلًا من واحدة تلو الأخرى. أسرع، لكنه أكثر وضوحًا على الشبكة.",
"destination": "وجهة الفحص",
"destinationDesc": "الرابط الذي يُطلب لقياس كل وجهة صادرة. يجب أن يُعيد HTTP 204.",
"connectivity": "فحص الاتصال",
"connectivityDesc": "رابط اختياري لفحص الشبكة المحلية، يُجرَّب فقط بعد فشل الوجهة. اتركه فارغًا للتخطي.",
"interval": "فترة الفحص",
"intervalDesc": "متوسط الوقت بين عمليات الفحص لكل وجهة صادرة، مثل 1m. الحد الأدنى 10s.",
"timeout": "مهلة الفحص",
"timeoutDesc": "كم من الوقت يُنتظر استجابة الفحص قبل اعتباره فاشلًا، مثل 5s.",
"sampling": "عدد العينات",
"samplingDesc": "عدد نتائج الفحص الأخيرة المحفوظة لتقييم كل وجهة صادرة.",
"httpMethod": "طريقة HTTP",
"httpMethodDesc": "طريقة HTTP المستخدمة في عمليات الفحص.",
"deleteAlsoObservatory": "هذا آخر موازن يستخدم Observatory، لذلك ستتم إزالته أيضًا.",
"deleteAlsoBurst": "هذا آخر موازن يستخدم Burst Observatory، لذلك ستتم إزالته أيضًا."
},
"balancer": {
"addBalancer": "أضف موازن تحميل",
"editBalancer": "عدل موازن التحميل",
+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",
+30
View File
@@ -1663,6 +1663,36 @@
"toastDeleted": "Eliminada",
"toastDeleteFailed": "Error al eliminar"
},
"tabBalancerSettings": "Ajustes del balanceador",
"tabObservatory": "Observatorio",
"observatory": {
"title": "Observatorio",
"burstTitle": "Observatorio Burst",
"autoManaged": "Los observadores se gestionan automáticamente a partir de tus balanceadores. Ajusta abajo cómo sondean; las salidas vigiladas siguen los selectores del balanceador.",
"emptyHint": "No hay ningún observador de conexión activo. Se añade uno automáticamente al crear un balanceador Least Ping o Least Load —o un balanceador Random / Round-robin con fallback— para que el balanceador pueda medir tus salidas y elegir la mejor.",
"subjectSelector": "Salidas vigiladas",
"subjectSelectorDesc": "Etiquetas de salida que sondea este observador. Se gestionan automáticamente a partir de tus balanceadores.",
"probeURL": "URL de sondeo",
"probeURLDesc": "URL solicitada para medir cada salida. Debe devolver HTTP 204.",
"probeInterval": "Intervalo de sondeo",
"probeIntervalDesc": "Con qué frecuencia se sondea cada salida, p. ej. 30s, 1m, 2h45m.",
"enableConcurrency": "Sondeo concurrente",
"enableConcurrencyDesc": "Sondea todas las salidas vigiladas a la vez en lugar de una a una. Más rápido, pero más visible en la red.",
"destination": "Destino de sondeo",
"destinationDesc": "URL solicitada para medir cada salida. Debe devolver HTTP 204.",
"connectivity": "Comprobación de conectividad",
"connectivityDesc": "URL opcional de comprobación de red local, se prueba solo si falla el destino. Déjalo vacío para omitir.",
"interval": "Intervalo de sondeo",
"intervalDesc": "Tiempo medio entre sondeos por salida, p. ej. 1m. Mínimo 10s.",
"timeout": "Tiempo de espera del sondeo",
"timeoutDesc": "Cuánto esperar un sondeo antes de considerarlo fallido, p. ej. 5s.",
"sampling": "Número de muestras",
"samplingDesc": "Número de resultados de sondeo recientes que se conservan para puntuar cada salida.",
"httpMethod": "Método HTTP",
"httpMethodDesc": "Método HTTP usado para los sondeos.",
"deleteAlsoObservatory": "Este es el último balanceador que usa el Observatorio, por lo que también se eliminará.",
"deleteAlsoBurst": "Este es el último balanceador que usa el Observatorio Burst, por lo que también se eliminará."
},
"balancer": {
"addBalancer": "Agregar equilibrador",
"editBalancer": "Editar balanceador",
Loaded 3 of 18 files, more files were not shown because too many files have changed in this diff. Show more