mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-08-18 17:11:00 +00:00
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:
@@ -1663,6 +1663,36 @@
|
||||
"toastDeleted": "已删除",
|
||||
"toastDeleteFailed": "删除失败"
|
||||
},
|
||||
"tabBalancerSettings": "负载均衡设置",
|
||||
"tabObservatory": "观测器",
|
||||
"observatory": {
|
||||
"title": "观测器",
|
||||
"burstTitle": "突发观测器",
|
||||
"autoManaged": "观测器会根据你的负载均衡器自动管理。可在下方调整探测方式;被观测的出站会跟随负载均衡器的选择器。",
|
||||
"emptyHint": "当前没有活动的连接观测器。当你创建 Least Ping 或 Least Load 负载均衡器,或带有 fallback 的 Random / Round-robin 负载均衡器时,会自动添加一个,以便负载均衡器测量各出站并选择最优。",
|
||||
"subjectSelector": "被观测的出站",
|
||||
"subjectSelectorDesc": "该观测器探测的出站标签。根据你的负载均衡器自动管理。",
|
||||
"probeURL": "探测 URL",
|
||||
"probeURLDesc": "用于测量每个出站而请求的 URL,应返回 HTTP 204。",
|
||||
"probeInterval": "探测间隔",
|
||||
"probeIntervalDesc": "每个出站的探测频率,例如 30s、1m、2h45m。",
|
||||
"enableConcurrency": "并发探测",
|
||||
"enableConcurrencyDesc": "一次性探测所有被观测的出站,而不是逐个探测。更快,但在网络上更明显。",
|
||||
"destination": "探测目标",
|
||||
"destinationDesc": "用于测量每个出站而请求的 URL,应返回 HTTP 204。",
|
||||
"connectivity": "连通性检查",
|
||||
"connectivityDesc": "可选的本地网络检查 URL,仅在目标失败后才尝试。留空则跳过。",
|
||||
"interval": "探测间隔",
|
||||
"intervalDesc": "每个出站两次探测之间的平均时间,例如 1m。最小 10s。",
|
||||
"timeout": "探测超时",
|
||||
"timeoutDesc": "判定探测失败前的等待时长,例如 5s。",
|
||||
"sampling": "采样数量",
|
||||
"samplingDesc": "为每个出站评分而保留的最近探测结果数量。",
|
||||
"httpMethod": "HTTP 方法",
|
||||
"httpMethodDesc": "探测所用的 HTTP 方法。",
|
||||
"deleteAlsoObservatory": "这是最后一个使用 Observatory 的负载均衡器,因此它也会被一并移除。",
|
||||
"deleteAlsoBurst": "这是最后一个使用 Burst Observatory 的负载均衡器,因此它也会被一并移除。"
|
||||
},
|
||||
"balancer": {
|
||||
"addBalancer": "添加负载均衡",
|
||||
"editBalancer": "编辑负载均衡",
|
||||
|
||||
Reference in New Issue
Block a user