From 68658f9b3af23d9322a5e64dc7e71213af6bffa9 Mon Sep 17 00:00:00 2001 From: Ryan Wang Date: Mon, 28 Aug 2023 22:12:16 -0500 Subject: [PATCH] feat: add supports for system restore by remote url (#4507) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #### What type of PR is this? /area console /kind feature /milestone 2.9.x #### What this PR does / why we need it: 系统恢复支持通过远程文件链接恢复 image image #### Special notes for your reviewer: 测试远程恢复的功能是否正常即可。 #### Does this PR introduce a user-facing change? ```release-note 系统恢复功能支持通过远程文件链接恢复。 ``` --- console/src/locales/en.yaml | 9 ++ console/src/locales/zh-CN.yaml | 9 ++ console/src/locales/zh-TW.yaml | 9 ++ .../modules/system/backup/tabs/Restore.vue | 87 ++++++++++++++++--- 4 files changed, 101 insertions(+), 13 deletions(-) diff --git a/console/src/locales/en.yaml b/console/src/locales/en.yaml index 6e801558a..eb5e8448a 100644 --- a/console/src/locales/en.yaml +++ b/console/src/locales/en.yaml @@ -1010,6 +1010,8 @@ core: description: After successful restore, you need to restart Halo to load the system resources normally. After clicking OK, we will automatically restart Halo. restart: toast_success: Requested to restart + remote_download: + button: Download and restore list: phases: pending: Pending @@ -1025,6 +1027,13 @@ core: third: 3. After the restore is completed, you need to restart Halo to load the system resources normally. complete: Restore completed, waiting for restart... start: Start restore + tabs: + local: + label: Upload + remote: + label: Remote + fields: + url: Remote URL exception: not_found: message: Page not found diff --git a/console/src/locales/zh-CN.yaml b/console/src/locales/zh-CN.yaml index 3abcede63..1aa0c6660 100644 --- a/console/src/locales/zh-CN.yaml +++ b/console/src/locales/zh-CN.yaml @@ -1010,6 +1010,8 @@ core: description: 恢复成功之后,需要重启一下 Halo 才能够正常加载系统资源,点击确定之后我们会自动重启 Halo。 restart: toast_success: 已请求重启 + remote_download: + button: 下载并恢复 list: phases: pending: 准备中 @@ -1025,6 +1027,13 @@ core: third: 3. 恢复完成之后需要重启 Halo 才能够正常加载系统资源。 complete: 恢复完成,等待重启... start: 开始恢复 + tabs: + local: + label: 上传 + remote: + label: 远程恢复 + fields: + url: 下载地址 exception: not_found: message: 没有找到该页面 diff --git a/console/src/locales/zh-TW.yaml b/console/src/locales/zh-TW.yaml index 0782f6b35..05ee9a5ca 100644 --- a/console/src/locales/zh-TW.yaml +++ b/console/src/locales/zh-TW.yaml @@ -1010,6 +1010,8 @@ core: description: 還原成功後,需要重新啟動 Halo 才能正常載入系統資源,點擊確定之後,我們會自動重啟 Halo。 restart: toast_success: 已請求重啟 + remote_download: + button: 下載並還原 list: phases: pending: 準備中 @@ -1025,6 +1027,13 @@ core: third: 3. 還原完成後需要重新啟動 Halo 才能正常載入系統資源。 complete: 恢復完成,等待重啟... start: 開始還原 + tabs: + local: + label: 上傳 + remote: + label: 遠程恢復 + fields: + url: 下載地址 exception: not_found: message: 沒有找到該頁面 diff --git a/console/src/modules/system/backup/tabs/Restore.vue b/console/src/modules/system/backup/tabs/Restore.vue index a64485984..6c0dfae34 100644 --- a/console/src/modules/system/backup/tabs/Restore.vue +++ b/console/src/modules/system/backup/tabs/Restore.vue @@ -1,7 +1,16 @@