mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-08-12 22:31: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