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
@@ -1663,6 +1663,36 @@
"toastDeleted": "Đã xóa",
"toastDeleteFailed": "Xóa thất bại"
},
"tabBalancerSettings": "Cài đặt Balancer",
"tabObservatory": "Observatory",
"observatory": {
"title": "Observatory",
"burstTitle": "Burst Observatory",
"autoManaged": "Observer được quản lý tự động từ các balancer của bạn. Điều chỉnh cách chúng dò ở bên dưới; các outbound được theo dõi sẽ tuân theo selector của balancer.",
"emptyHint": "Không có observer kết nối nào đang hoạt động. Một observer sẽ được thêm tự động khi bạn tạo balancer Least Ping hoặc Least Load — hoặc balancer Random / Round-robin có fallback — để balancer có thể đo các outbound và chọn cái tốt nhất.",
"subjectSelector": "Outbound được theo dõi",
"subjectSelectorDesc": "Các thẻ outbound mà observer này dò. Được quản lý tự động từ các balancer của bạn.",
"probeURL": "URL dò",
"probeURLDesc": "URL được yêu cầu để đo mỗi outbound. Phải trả về HTTP 204.",
"probeInterval": "Khoảng thời gian dò",
"probeIntervalDesc": "Tần suất dò mỗi outbound, ví dụ 30s, 1m, 2h45m.",
"enableConcurrency": "Dò đồng thời",
"enableConcurrencyDesc": "Dò tất cả outbound được theo dõi cùng lúc thay vì lần lượt. Nhanh hơn nhưng dễ bị phát hiện trên mạng hơn.",
"destination": "Đích dò",
"destinationDesc": "URL được yêu cầu để đo mỗi outbound. Phải trả về HTTP 204.",
"connectivity": "Kiểm tra kết nối",
"connectivityDesc": "URL kiểm tra mạng cục bộ tùy chọn, chỉ thử sau khi đích thất bại. Để trống để bỏ qua.",
"interval": "Khoảng thời gian dò",
"intervalDesc": "Thời gian trung bình giữa các lần dò cho mỗi outbound, ví dụ 1m. Tối thiểu 10s.",
"timeout": "Thời gian chờ dò",
"timeoutDesc": "Thời gian chờ một lần dò trước khi coi là thất bại, ví dụ 5s.",
"sampling": "Số mẫu",
"samplingDesc": "Số kết quả dò gần đây được giữ để chấm điểm mỗi outbound.",
"httpMethod": "Phương thức HTTP",
"httpMethodDesc": "Phương thức HTTP dùng cho việc dò.",
"deleteAlsoObservatory": "Đây là balancer cuối cùng dùng Observatory, nên nó cũng sẽ bị xóa.",
"deleteAlsoBurst": "Đây là balancer cuối cùng dùng Burst Observatory, nên nó cũng sẽ bị xóa."
},
"balancer": {
"addBalancer": "Thêm cân bằng",
"editBalancer": "Chỉnh sửa cân bằng",