fix: Node update Added detection information (#8197)

This commit is contained in:
ssongliu 2025-03-19 22:37:23 +08:00 committed by GitHub
parent 4470b13d18
commit c05d5e0238
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 30 additions and 2 deletions

View file

@ -171,6 +171,7 @@ func (u *UpgradeService) Upgrade(req dto.Upgrade) error {
global.LOG.Info("upgrade successful!")
go writeLogs(req.Version)
_ = settingRepo.Update("SystemVersion", req.Version)
global.CONF.Base.Version = req.Version
_ = settingRepo.Update("SystemStatus", "Free")
_, _ = cmd.ExecWithTimeOut("systemctl daemon-reload && systemctl restart 1pane-agent.service && systemctl restart 1panel-core.service", 1*time.Minute)
}()

View file

@ -84,6 +84,9 @@ SubTask: "Subtask"
#upgrade node
NodeUpgrade: "Upgrade node {{ .name }}"
UpgradeCheck: "Check for node updates"
UpgradeCheckLocal: "Local nodes do not support batch upgrades, skipping..."
UpgradeCheckLatest: "The node is already the latest version, skipping..."
NewSSHClient: "Initializing SSH connection"
BackupBeforeUpgrade: "Backup data before upgrade"
UploadUpgradeFile: "Distribute upgrade files"

View file

@ -85,6 +85,9 @@ SubTask: "サブタスク"
#upgrade node
NodeUpgrade: "{{ .name }} ノードのアップグレード"
UpgradeCheck: "ノードの更新を確認"
UpgradeCheckLocal: "ローカルノードは一括アップグレードをサポートしていないため、スキップします..."
UpgradeCheckLatest: "ノードは既に最新バージョンです、スキップします..."
NewSSHClient: "SSH接続の初期化"
BackupBeforeUpgrade: "アップグレード前にデータをバックアップ"
UploadUpgradeFile: "アップグレードに必要なファイルを配布"

View file

@ -84,6 +84,9 @@ SubTask: "서브 작업"
#upgrade node
NodeUpgrade: "{{ .name }} 노드 업그레이드"
UpgradeCheck: "노드 업데이트 확인"
UpgradeCheckLocal: "로컬 노드는 일괄 업그레이드를 지원하지 않으므로 건너뜁니다..."
UpgradeCheckLatest: "이 노드는 이미 최신 버전입니다. 건너뜁니다..."
NewSSHClient: "SSH 연결 초기화"
BackupBeforeUpgrade: "업그레이드 전 데이터 백업"
UploadUpgradeFile: "업그레이드에 필요한 파일 전송"

View file

@ -84,6 +84,9 @@ SubTask: "Tugas Sub"
#upgrade node
NodeUpgrade: "Naik taraf node {{ .name }}"
UpgradeCheck: "Periksa kemas kini nod"
UpgradeCheckLocal: "Nod tempatan tidak menyokong peningkatan kelompok, dilangkau..."
UpgradeCheckLatest: "Nod sudah versi terkini, dilangkau..."
NewSSHClient: "Memulakan sambungan SSH"
BackupBeforeUpgrade: "Menyandarkan data sebelum naik taraf"
UploadUpgradeFile: "Sebarkan fail naik taraf"

View file

@ -84,6 +84,9 @@ SubTask: "Subtarefa"
#upgrade node
NodeUpgrade: "Atualizar nó {{ .name }}"
UpgradeCheck: "Verificar atualizações do nó"
UpgradeCheckLocal: "Nós locais não suportam atualização em lote, pulando..."
UpgradeCheckLatest: "O nó já está na versão mais recente, pulando..."
NewSSHClient: "Inicializando a conexão SSH"
BackupBeforeUpgrade: "Fazer backup dos dados antes da atualização"
UploadUpgradeFile: "Distribuir arquivos necessários para a atualização"

View file

@ -84,6 +84,9 @@ SubTask: "Подзадача"
#upgrade node
NodeUpgrade: "Обновление узла {{ .name }}"
UpgradeCheck: "Проверить обновления узла"
UpgradeCheckLocal: "Локальные узлы не поддерживают массовое обновление, пропуск..."
UpgradeCheckLatest: "Узел уже имеет последнюю версию, пропуск..."
NewSSHClient: "Инициализация SSH-соединения"
BackupBeforeUpgrade: "Резервное копирование данных перед обновлением"
UploadUpgradeFile: "Распределение файлов обновления"

View file

@ -84,6 +84,9 @@ SubTask: "子任務"
#upgrade node
NodeUpgrade: "升級節點 {{ .name }}"
UpgradeCheck: "檢查節點更新"
UpgradeCheckLocal: "本地節點不支援批量升級,跳過..."
UpgradeCheckLatest: "檢測到該節點已是最新版本,跳過..."
NewSSHClient: "初始化 SSH 連接"
BackupBeforeUpgrade: "升級前備份資料"
UploadUpgradeFile: "發送升級所需文件"

View file

@ -85,6 +85,9 @@ SubTask: "子任务"
#upgrade node
NodeUpgrade: "升级节点 {{ .name }}"
UpgradeCheck: "检查节点更新"
UpgradeCheckLocal: "本地节点不支持批量升级,跳过..."
UpgradeCheckLatest: "检测到该节点已是最新版本,跳过..."
NewSSHClient: "初始化 SSH 连接"
BackupBeforeUpgrade: "升级前备份数据"
UploadUpgradeFile: "下发升级所需文件"

View file

@ -11,7 +11,7 @@ export const useTheme = () => {
itemTheme = prefersDark ? 'dark' : 'light';
}
document.documentElement.className = itemTheme === 'dark' ? 'dark' : 'light';
if (globalStore.isProductPro && themeConfig.themeColor) {
if (globalStore.isMasterProductPro && themeConfig.themeColor) {
try {
const themeColor = JSON.parse(themeConfig.themeColor);
const color = itemTheme === 'dark' ? themeColor.dark : themeColor.light;

View file

@ -120,7 +120,10 @@ const changeShow = (val: boolean) => {
const onOperate = async (service: string, operation: string) => {
em('update:maskShow', false);
ElMessageBox.confirm(
i18n.global.t('commons.msg.operatorHelper', [' ' + service + ' ', i18n.global.t('app.' + operation)]),
i18n.global.t('commons.msg.operatorHelper', [
' ' + service + ' ',
i18n.global.t('commons.operate.' + operation),
]),
i18n.global.t('app.' + operation),
{
confirmButtonText: i18n.global.t('commons.button.confirm'),