feat(nodes): bulk panel self-update with live online indicator

Adds the ability to update node panels to the latest release from the Nodes
page: select online, enabled nodes (checkboxes) and trigger their official
self-updater, or use the per-row Update action. A node whose reported panel
version trails the latest GitHub release is flagged with an 'update available'
tag (compared via lib/panel-version, mirroring the Go isNewerVersion).

Backend: Remote.UpdatePanel calls the node's existing
POST /panel/api/server/updatePanel; NodeService.UpdatePanels fans out over the
selected ids, skipping disabled/offline nodes with a per-node reason; exposed
as POST /panel/api/nodes/updatePanel (documented in endpoints.ts + openapi.json).

The bulk request sends a JSON body, so it sets Content-Type: application/json
explicitly — axios defaults POST to form-urlencoded, which made ShouldBindJSON
fail with 'invalid character i'.

Also reuses the clients-page online cue on the Nodes page: a pulsing green dot
plus green label for an online node. The .online-dot style moved to the shared
styles/utils.css so both pages load it.

Translations for all new node keys added across every language file.
This commit is contained in:
MHSanaei
2026-06-01 07:03:06 +02:00
parent c8df1b19ff
commit 971843f669
25 changed files with 511 additions and 42 deletions
+10 -1
View File
@@ -832,6 +832,12 @@
"panelVersion": "パネルのバージョン",
"actions": "操作",
"probe": "今すぐプローブ",
"updatePanel": "パネルを更新",
"updateSelected": "選択を更新 ({count})",
"updateAvailable": "更新あり",
"upToDate": "最新",
"updateConfirmTitle": "{count} 個のノードを最新バージョンに更新しますか?",
"updateConfirmContent": "選択した各ノードは最新リリースをダウンロードして再起動します。有効かつオンラインのノードのみが更新されます。",
"testConnection": "接続テスト",
"connectionOk": "接続OK ({ms} ms)",
"connectionFailed": "接続に失敗しました",
@@ -853,7 +859,10 @@
"deleted": "ノードを削除しました",
"test": "接続テスト",
"fillRequired": "名前、アドレス、ポート、APIトークンは必須です",
"probeFailed": "プローブに失敗しました"
"probeFailed": "プローブに失敗しました",
"updateStarted": "パネルの更新を開始しました",
"updateResult": "{ok} 個のノードで更新を開始、{failed} 個失敗",
"updateNoneEligible": "オンラインで有効なノードを少なくとも1つ選択してください"
}
},
"settings": {