mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-10-13 17:07:34 +08:00
fix: Optimize the script library to synchronize the task log (#9148)
This commit is contained in:
parent
146b628cc1
commit
10039c6173
9 changed files with 13 additions and 2 deletions
|
@ -188,8 +188,11 @@ func (u *ScriptService) Sync(req dto.OperateByTaskID) error {
|
|||
}
|
||||
var scriptSetting model.Setting
|
||||
_ = global.DB.Where("key = ?", "ScriptVersion").First(&scriptSetting).Error
|
||||
if scriptSetting.Value == string(versionRes) {
|
||||
syncTask.Logf("The local-%s and remote-%s versions are detected to be consistent. Skip...", scriptSetting.Value, versionRes)
|
||||
localVersion := strings.ReplaceAll(string(versionRes), "\n", "")
|
||||
remoteVersion := strings.ReplaceAll(scriptSetting.Value, "\n", "")
|
||||
|
||||
syncTask.Log(i18n.GetMsgWithMap("ScriptVersion", map[string]interface{}{"localVersion": localVersion, "remoteVersion": remoteVersion}))
|
||||
if localVersion == remoteVersion {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
@ -93,6 +93,7 @@ SubTask: "Subtask"
|
|||
|
||||
#script
|
||||
ScriptLibrary: "Script Library"
|
||||
ScriptVersion: "Local: {{ .localVersion }}, Remote: {{ .remoteVersion }}"
|
||||
|
||||
Node: "Node"
|
||||
SyncNode: "Sync node data"
|
||||
|
|
|
@ -94,6 +94,7 @@ SubTask: "サブタスク"
|
|||
|
||||
#script
|
||||
ScriptLibrary: "スクリプトライブラリ"
|
||||
ScriptVersion: "ローカル: {{ .localVersion }}, リモート: {{ .remoteVersion }}"
|
||||
|
||||
Node: "ノード"
|
||||
SyncNode: "ノードデータ同期"
|
||||
|
|
|
@ -93,6 +93,7 @@ SubTask: "서브 작업"
|
|||
|
||||
#script
|
||||
ScriptLibrary: "스크립트 라이브러리"
|
||||
ScriptVersion: "로컬: {{ .localVersion }}, 원격: {{ .remoteVersion }}"
|
||||
|
||||
Node: "노드"
|
||||
SyncNode: "노드 데이터 동기화"
|
||||
|
|
|
@ -93,6 +93,7 @@ SubTask: "Tugas Sub"
|
|||
|
||||
#script
|
||||
ScriptLibrary: "Pustaka Skrip"
|
||||
ScriptVersion: "Tempatan: {{ .localVersion }}, Jauh: {{ .remoteVersion }}"
|
||||
|
||||
Node: "Nod"
|
||||
SyncNode: "Segerakkan data nod"
|
||||
|
|
|
@ -93,6 +93,7 @@ SubTask: "Subtarefa"
|
|||
|
||||
#script
|
||||
ScriptLibrary: "Biblioteca de Scripts"
|
||||
ScriptVersion: "Local: {{ .localVersion }}, Remoto: {{ .remoteVersion }}"
|
||||
|
||||
Node: "Nó"
|
||||
SyncNode: "Sincronizar dados do nó"
|
||||
|
|
|
@ -93,6 +93,7 @@ SubTask: "Подзадача"
|
|||
|
||||
#script
|
||||
ScriptLibrary: "Библиотека скриптов"
|
||||
ScriptVersion: "Локальная: {{ .localVersion }}, Удалённая: {{ .remoteVersion }}"
|
||||
|
||||
Node: "Узел"
|
||||
SyncNode: "Синхронизация данных узла"
|
||||
|
|
|
@ -93,6 +93,7 @@ SubTask: "子任務"
|
|||
|
||||
#script
|
||||
ScriptLibrary: "腳本庫"
|
||||
ScriptVersion: "本地: {{ .localVersion }}, 遠端: {{ .remoteVersion }}"
|
||||
|
||||
#sync node
|
||||
Node: "節點"
|
||||
|
|
|
@ -93,6 +93,7 @@ SubTask: "子任务"
|
|||
|
||||
#script
|
||||
ScriptLibrary: "脚本库"
|
||||
ScriptVersion: "本地:{{ .localVersion }}, 远程:{{ .remoteVersion }}"
|
||||
|
||||
#sync node
|
||||
Node: "节点"
|
||||
|
|
Loading…
Add table
Reference in a new issue