feat: improve community restore package guidance (#13694)

This commit is contained in:
ssongliu
2026-09-03 09:45:40 +08:00
committed by GitHub
parent 51d84455a3
commit fa2ad69154
14 changed files with 153 additions and 62 deletions
+2
View File
@@ -308,6 +308,8 @@ export namespace Setting {
message: string;
packageExist: boolean;
packageDirectory: string;
packageName: string;
packageURL: string;
}
export type CommunityRestoreMode = 'online' | 'offline';
export interface NodeItem {
+5 -4
View File
@@ -3246,14 +3246,15 @@ const message = {
restoreCommunity: 'Restore Community Edition',
restoreCommunityOnline: 'Online restore',
restoreCommunityOffline: 'Offline restore',
restoreCommunityPackageFound:
'A usable offline Community Edition package was detected. Offline restore is available.',
restoreCommunityPackageMissing:
'No usable offline Community Edition package was detected. Offline restore is currently unavailable.',
restoreCommunityPackageFound: 'Package is ready',
restoreCommunityPackageMissing: 'Waiting for package',
restoreCommunityPackageChecking: 'Checking package',
restoreCommunityPackageReadyHelper: 'You can proceed with the offline restore.',
restoreCommunityOnlineHelper:
'The Community Edition package for the current version will be downloaded automatically, and Enterprise-only data will be cleaned up.',
restoreCommunityOfflineHelper:
'Place an official package no older than the current Enterprise version in {path}. Switching is enabled after a usable package is detected.',
restoreCommunityCopyDownloadLink: 'Copy download link',
restoreCommunityConfirm:
'After switching versions, you can sign in to Community Edition with the current Enterprise super administrator account. Enterprise-only data will be removed during the switch. Proceed with caution.',
restoreCommunityStarting: 'Preparing Community Edition. The panel will restart automatically when ready.',
+5 -4
View File
@@ -3308,14 +3308,15 @@ const message = {
restoreCommunity: 'Restaurar Community Edition',
restoreCommunityOnline: 'Restauración en línea',
restoreCommunityOffline: 'Restauración sin conexión',
restoreCommunityPackageFound:
'Se detectó un paquete sin conexión de Community Edition válido. La restauración sin conexión está disponible.',
restoreCommunityPackageMissing:
'No se detectó ningún paquete sin conexión de Community Edition válido. La restauración sin conexión no está disponible actualmente.',
restoreCommunityPackageFound: 'El paquete está listo',
restoreCommunityPackageMissing: 'Esperando el paquete',
restoreCommunityPackageChecking: 'Comprobando el paquete',
restoreCommunityPackageReadyHelper: 'Puede continuar con la restauración sin conexión.',
restoreCommunityOnlineHelper:
'Se descargará automáticamente el paquete Community Edition de la versión actual y se limpiarán los datos exclusivos de Enterprise.',
restoreCommunityOfflineHelper:
'Coloque en {path} un paquete oficial cuya versión no sea anterior a la versión Enterprise actual. El cambio se habilitará al detectar un paquete utilizable.',
restoreCommunityCopyDownloadLink: 'Copiar enlace de descarga',
restoreCommunityConfirm:
'Después de cambiar de versión, podrá iniciar sesión en Community Edition con la cuenta actual de superadministrador de Enterprise. Los datos exclusivos de Enterprise se eliminarán durante el cambio. Proceda con precaución.',
restoreCommunityStarting:
+5 -4
View File
@@ -3214,14 +3214,15 @@ const message = {
restoreCommunity: 'بازیابی نسخه Community',
restoreCommunityOnline: 'بازیابی آنلاین',
restoreCommunityOffline: 'بازیابی آفلاین',
restoreCommunityPackageFound:
'یک بسته آفلاین قابل استفاده Community Edition شناسایی شد. بازیابی آفلاین در دسترس است.',
restoreCommunityPackageMissing:
'هیچ بسته آفلاین قابل استفاده Community Edition شناسایی نشد. بازیابی آفلاین در حال حاضر در دسترس نیست.',
restoreCommunityPackageFound: 'بسته آماده است',
restoreCommunityPackageMissing: 'در انتظار قرار دادن بسته',
restoreCommunityPackageChecking: 'در حال بررسی بسته',
restoreCommunityPackageReadyHelper: 'می‌توانید بازیابی آفلاین را انجام دهید.',
restoreCommunityOnlineHelper:
'بسته نسخه Community برای نسخه فعلی به‌طور خودکار دانلود و داده‌های ویژه Enterprise پاک‌سازی می‌شوند.',
restoreCommunityOfflineHelper:
'یک بسته رسمی با نسخه‌ای قدیمی‌تر نبودن از نسخه فعلی Enterprise را در {path} قرار دهید. پس از شناسایی بسته قابل استفاده، تغییر نسخه فعال می‌شود.',
restoreCommunityCopyDownloadLink: 'کپی لینک دانلود',
restoreCommunityConfirm:
'پس از تغییر نسخه، می‌توانید با حساب ابرمدیر فعلی Enterprise وارد نسخه Community شوید. داده‌های مختص Enterprise در طول تغییر حذف می‌شوند. لطفاً با احتیاط ادامه دهید.',
restoreCommunityStarting:
+5 -4
View File
@@ -3229,14 +3229,15 @@ const message = {
restoreCommunity: 'コミュニティ版に戻す',
restoreCommunityOnline: 'オンライン復元',
restoreCommunityOffline: 'オフライン復元',
restoreCommunityPackageFound:
'使用可能なコミュニティ版オフラインパッケージが検出されましたオフライン復元を実行できます',
restoreCommunityPackageMissing:
'使用可能なコミュニティ版オフラインパッケージが検出されていないため現在オフライン復元を実行できません',
restoreCommunityPackageFound: 'パッケージの準備ができました',
restoreCommunityPackageMissing: 'パッケージの配置待ち',
restoreCommunityPackageChecking: 'パッケージを確認しています',
restoreCommunityPackageReadyHelper: 'オフライン復元を実行できま',
restoreCommunityOnlineHelper:
'現在のバージョンのコミュニティ版パッケージを自動的にダウンロードしEnterprise 専用データを削除します',
restoreCommunityOfflineHelper:
'現在の Enterprise バージョン以上の公式パッケージを {path} に配置してください使用可能なパッケージが検出されると切り替えが有効になります',
restoreCommunityCopyDownloadLink: 'ダウンロードリンクをコピー',
restoreCommunityConfirm:
'バージョン切り替え後は現在の Enterprise スーパー管理者アカウントでコミュニティ版にログインできます切り替え中に Enterprise 専用データが消去されるため慎重に操作してください',
restoreCommunityStarting: 'コミュニティ版を準備しています完了後パネルは自動的に再起動します',
+5 -4
View File
@@ -3171,14 +3171,15 @@ const message = {
restoreCommunity: '커뮤니티 버전 복원',
restoreCommunityOnline: '온라인 복원',
restoreCommunityOffline: '오프라인 복원',
restoreCommunityPackageFound:
'사용 가능한 Community Edition 오프라인 설치 패키지 감지되었습니다. 오프라인 복원을 실행할 있습니다.',
restoreCommunityPackageMissing:
'사용 가능한 Community Edition 오프라인 설치 패키지가 감지되지 않아 현재 오프라인 복원을 실행할 습니다.',
restoreCommunityPackageFound: '설치 패키지 준비 완료',
restoreCommunityPackageMissing: '설치 패키지 배치 대기 ',
restoreCommunityPackageChecking: '설치 패키지 확인 ',
restoreCommunityPackageReadyHelper: '오프라인 복원을 바로 실행할 습니다.',
restoreCommunityOnlineHelper:
'현재 버전의 커뮤니티 버전 패키지를 자동으로 다운로드하고 Enterprise 전용 데이터를 정리합니다.',
restoreCommunityOfflineHelper:
'현재 Enterprise 버전 이상인 공식 패키지를 {path} 저장하세요. 사용 가능한 패키지가 감지되면 전환이 활성화됩니다.',
restoreCommunityCopyDownloadLink: '다운로드 링크 복사',
restoreCommunityConfirm:
'버전 전환 현재 Enterprise 슈퍼 관리자 계정으로 커뮤니티 버전에 로그인할 있습니다. 전환 과정에서 Enterprise 전용 데이터가 삭제되므로 신중하게 진행하세요.',
restoreCommunityStarting: '커뮤니티 버전을 준비 중입니다. 완료되면 패널이 자동으로 다시 시작됩니다.',
+5 -4
View File
@@ -3157,14 +3157,15 @@ const message = {
restoreCommunity: 'ກູ້ຄືນ Community Edition',
restoreCommunityOnline: 'ກູ້ຄືນອອນລາຍ',
restoreCommunityOffline: 'ກູ້ຄືນອອບລາຍ',
restoreCommunityPackageFound:
'ວດພົບແພັກເກດ Community Edition ອອບລາຍທີ່ໃຊ້ໄດ້ ແລະສາມາດດຳເນີນການກູ້ຄືນອອບລາຍໄດ້.',
restoreCommunityPackageMissing:
'ບໍ່ພົບແພັກເກດ Community Edition ອອບລາຍທີ່ໃຊ້ໄດ້ ຈຶ່ງຍັງບໍ່ສາມາດກູ້ຄືນອອບລາຍໄດ້.',
restoreCommunityPackageFound: 'ແພັກເກດພ້ອມໃຊ້ງານ',
restoreCommunityPackageMissing: 'ຳລັງລໍຖ້າແພັກເກດ',
restoreCommunityPackageChecking: 'ກຳລັງກວດສອບແພັກເກດ',
restoreCommunityPackageReadyHelper: 'ສາມາດດຳເນີນການກູ້ຄືນອອບລາຍໄດ້ທັນທີ.',
restoreCommunityOnlineHelper:
'ລະບົບຈະດາວໂຫຼດແພັກເກດ Community Edition ສຳລັບເວີຊັນປັດຈຸບັນອັດຕະໂນມັດ ແລະ ລ້າງຂໍ້ມູນສະເພາະ Enterprise.',
restoreCommunityOfflineHelper:
'ວາງແພັກເກດທາງການທີ່ມີເວີຊັນບໍ່ຕ່ຳກວ່າ Enterprise ປັດຈຸບັນໄວ້ໃນ {path}. ການສະຫຼັບຈະເປີດໃຊ້ເມື່ອກວດພົບແພັກເກດທີ່ໃຊ້ໄດ້.',
restoreCommunityCopyDownloadLink: 'ຄັດລອກລິ້ງດາວໂຫຼດ',
restoreCommunityConfirm:
'ຫຼັງຈາກສະຫຼັບເວີຊັນ ສາມາດໃຊ້ບັນຊີຜູ້ດູແລສູງສຸດ Enterprise ປັດຈຸບັນເຂົ້າ Community Edition. ຂໍ້ມູນສະເພາະ Enterprise ຈະຖືກລຶບໃນລະຫວ່າງການສະຫຼັບ. ກະລຸນາດຳເນີນການດ້ວຍຄວາມລະມັດລະວັງ.',
restoreCommunityStarting: 'ກຳລັງກະກຽມ Community Edition. ແຜງຄວບຄຸມຈະເລີ່ມໃໝ່ອັດຕະໂນມັດເມື່ອສຳເລັດ.',
+5 -4
View File
@@ -3302,14 +3302,15 @@ const message = {
restoreCommunity: 'Pulihkan Community Edition',
restoreCommunityOnline: 'Pemulihan dalam talian',
restoreCommunityOffline: 'Pemulihan luar talian',
restoreCommunityPackageFound:
'Pakej luar talian Community Edition yang boleh digunakan telah dikesan. Pemulihan luar talian tersedia.',
restoreCommunityPackageMissing:
'Tiada pakej luar talian Community Edition yang boleh digunakan dikesan. Pemulihan luar talian tidak tersedia pada masa ini.',
restoreCommunityPackageFound: 'Pakej sudah sedia',
restoreCommunityPackageMissing: 'Menunggu pakej',
restoreCommunityPackageChecking: 'Memeriksa pakej',
restoreCommunityPackageReadyHelper: 'Anda boleh meneruskan pemulihan luar talian.',
restoreCommunityOnlineHelper:
'Pakej Community Edition untuk versi semasa akan dimuat turun secara automatik dan data khusus Enterprise akan dibersihkan.',
restoreCommunityOfflineHelper:
'Letakkan pakej rasmi yang tidak lebih lama daripada versi Enterprise semasa dalam {path}. Pertukaran akan didayakan selepas pakej yang boleh digunakan dikesan.',
restoreCommunityCopyDownloadLink: 'Salin pautan muat turun',
restoreCommunityConfirm:
'Selepas menukar versi, anda boleh log masuk ke Community Edition menggunakan akaun pentadbir super Enterprise semasa. Data khusus Enterprise akan dipadamkan semasa pertukaran. Sila teruskan dengan berhati-hati.',
restoreCommunityStarting:
+5 -4
View File
@@ -3309,14 +3309,15 @@ const message = {
restoreCommunity: 'Restaurar Community Edition',
restoreCommunityOnline: 'Restauração online',
restoreCommunityOffline: 'Restauração offline',
restoreCommunityPackageFound:
'Um pacote offline utilizável da Community Edition foi detectado. A restauração offline está disponível.',
restoreCommunityPackageMissing:
'Nenhum pacote offline utilizável da Community Edition foi detectado. A restauração offline não está disponível no momento.',
restoreCommunityPackageFound: 'O pacote está pronto',
restoreCommunityPackageMissing: 'Aguardando o pacote',
restoreCommunityPackageChecking: 'Verificando o pacote',
restoreCommunityPackageReadyHelper: 'Você pode prosseguir com a restauração offline.',
restoreCommunityOnlineHelper:
'O pacote Community Edition da versão atual será baixado automaticamente e os dados exclusivos da Enterprise serão limpos.',
restoreCommunityOfflineHelper:
'Coloque em {path} um pacote oficial cuja versão não seja anterior à versão Enterprise atual. A troca será habilitada quando um pacote utilizável for detectado.',
restoreCommunityCopyDownloadLink: 'Copiar link de download',
restoreCommunityConfirm:
'Após trocar de versão, você poderá entrar na Community Edition com a conta atual de superadministrador da Enterprise. Os dados exclusivos da Enterprise serão removidos durante a troca. Prossiga com cuidado.',
restoreCommunityStarting:
+5 -4
View File
@@ -3279,14 +3279,15 @@ const message = {
restoreCommunity: 'Восстановить Community Edition',
restoreCommunityOnline: 'Онлайн-восстановление',
restoreCommunityOffline: 'Офлайн-восстановление',
restoreCommunityPackageFound:
'Обнаружен подходящий офлайн-пакет Community Edition. Офлайн-восстановление доступно.',
restoreCommunityPackageMissing:
'Подходящий офлайн-пакет Community Edition не обнаружен. Офлайн-восстановление сейчас недоступно.',
restoreCommunityPackageFound: 'Пакет готов',
restoreCommunityPackageMissing: 'Ожидание пакета',
restoreCommunityPackageChecking: 'Проверка пакета',
restoreCommunityPackageReadyHelper: 'Можно выполнить офлайн-восстановление.',
restoreCommunityOnlineHelper:
'Пакет Community Edition текущей версии будет загружен автоматически, а данные, предназначенные только для Enterprise, будут очищены.',
restoreCommunityOfflineHelper:
'Поместите официальный пакет версии не ниже текущей Enterprise в {path}. Переключение станет доступно после обнаружения подходящего пакета.',
restoreCommunityCopyDownloadLink: 'Копировать ссылку для скачивания',
restoreCommunityConfirm:
'После смены версии можно войти в Community Edition с текущей учётной записью суперадминистратора Enterprise. Во время переключения данные, доступные только в Enterprise, будут удалены. Будьте осторожны.',
restoreCommunityStarting:
+5 -4
View File
@@ -3294,14 +3294,15 @@ const message = {
restoreCommunity: 'Community Edition sürümünü geri yükle',
restoreCommunityOnline: 'Çevrimiçi geri yükleme',
restoreCommunityOffline: 'Çevrimdışı geri yükleme',
restoreCommunityPackageFound:
'Kullanılabilir bir çevrimdışı Community Edition paketi algılandı. Çevrimdışı geri yükleme kullanılabilir.',
restoreCommunityPackageMissing:
'Kullanılabilir bir çevrimdışı Community Edition paketi algılanmadı. Çevrimdışı geri yükleme şu anda kullanılamıyor.',
restoreCommunityPackageFound: 'Paket hazır',
restoreCommunityPackageMissing: 'Paket bekleniyor',
restoreCommunityPackageChecking: 'Paket kontrol ediliyor',
restoreCommunityPackageReadyHelper: 'Çevrimdışı geri yüklemeye devam edebilirsiniz.',
restoreCommunityOnlineHelper:
'Geçerli sürümün Community Edition paketi otomatik olarak indirilecek ve Enterprise sürümüne özel veriler temizlenecektir.',
restoreCommunityOfflineHelper:
'Geçerli Enterprise sürümünden eski olmayan resmi bir paketi {path} dizinine yerleştirin. Kullanılabilir bir paket algılandığında geçiş etkinleştirilir.',
restoreCommunityCopyDownloadLink: 'İndirme bağlantısını kopyala',
restoreCommunityConfirm:
'Sürüm değişikliğinden sonra mevcut Enterprise süper yönetici hesabıyla Community Edition sürümüne giriş yapabilirsiniz. Enterprise sürümüne özel veriler geçiş sırasında silinecektir. Lütfen dikkatli ilerleyin.',
restoreCommunityStarting:
+5 -2
View File
@@ -3034,11 +3034,14 @@ const message = {
restoreCommunity: '恢復社群版',
restoreCommunityOnline: '線上恢復',
restoreCommunityOffline: '離線恢復',
restoreCommunityPackageFound: '已偵測到可用的社群版離線安裝包可以執行離線恢復',
restoreCommunityPackageMissing: '未偵測到可用的社群版離線安裝包暫時無法執行離線恢復',
restoreCommunityPackageFound: '安裝包已就緒',
restoreCommunityPackageMissing: '等待放置安裝包',
restoreCommunityPackageChecking: '正在檢查安裝包',
restoreCommunityPackageReadyHelper: '可直接執行離線恢復',
restoreCommunityOnlineHelper: '切換後將自動下載目前版本的社群版安裝包並清理企業版專屬資料',
restoreCommunityOfflineHelper:
'請先將版本不低於目前企業版的官方安裝包放入 {path}偵測到可用安裝包後即可執行切換',
restoreCommunityCopyDownloadLink: '複製下載連結',
restoreCommunityConfirm:
'版本切換後可以使用目前企業版超級管理員帳號登入社群版切換過程中將清除企業版專屬資料請謹慎操作',
restoreCommunityStarting: '正在準備社群版完成後面板將自動重新啟動',
+5 -2
View File
@@ -3070,10 +3070,13 @@ const message = {
restoreCommunity: '恢复社区版',
restoreCommunityOnline: '在线恢复',
restoreCommunityOffline: '离线恢复',
restoreCommunityPackageFound: '已检测到可用的社区版离线安装包可以执行离线恢复',
restoreCommunityPackageMissing: '未检测到可用的社区版离线安装包暂时无法执行离线恢复',
restoreCommunityPackageFound: '安装包已就绪',
restoreCommunityPackageMissing: '等待放置安装包',
restoreCommunityPackageChecking: '正在检查安装包',
restoreCommunityPackageReadyHelper: '可直接执行离线恢复',
restoreCommunityOnlineHelper: '将自动下载当前版本的社区版安装包完成切换',
restoreCommunityOfflineHelper: '请先将版本不低于当前企业版的官方安装包放入 {path} 后执行切换',
restoreCommunityCopyDownloadLink: '复制下载链接',
restoreCommunityConfirm:
'版本切换后可以使用当前企业版超级管理员账号登录社区版切换过程中将清除企业版专属数据请谨慎操作',
restoreCommunityStarting: '正在准备社区版完成后面板将自动重启',
@@ -23,26 +23,50 @@
<el-radio value="offline" border>{{ $t('license.restoreCommunityOffline') }}</el-radio>
</el-radio-group>
<span class="input-help">
{{
restoreMode === 'offline'
? $t('license.restoreCommunityOfflineHelper', { path: restoreInfo.packageDirectory })
: $t('license.restoreCommunityOnlineHelper')
}}
<span v-if="restoreMode === 'online'" class="input-help">
{{ $t('license.restoreCommunityOnlineHelper') }}
</span>
<el-alert
v-if="restoreMode === 'offline'"
v-loading="packageChecking"
:title="
restoreInfo.packageExist
? $t('license.restoreCommunityPackageFound')
: $t('license.restoreCommunityPackageMissing')
"
:type="restoreInfo.packageExist ? 'success' : 'warning'"
:closable="false"
show-icon
/>
<div v-else class="package-status">
<div class="package-status-header">
<el-icon v-if="packageChecking" class="is-loading"><Loading /></el-icon>
<el-icon v-else-if="restoreInfo.packageExist"><CircleCheckFilled /></el-icon>
<el-icon v-else><Clock /></el-icon>
<span>
{{
packageChecking
? $t('license.restoreCommunityPackageChecking')
: restoreInfo.packageExist
? $t('license.restoreCommunityPackageFound')
: $t('license.restoreCommunityPackageMissing')
}}
</span>
</div>
<div v-if="!packageChecking" class="package-status-content">
<span v-if="restoreInfo.packageExist && restoreInfo.packageName" class="package-name">
{{ restoreInfo.packageName }}
</span>
<span class="package-status-description">
{{
restoreInfo.packageExist
? $t('license.restoreCommunityPackageReadyHelper')
: $t('license.restoreCommunityOfflineHelper', {
path: restoreInfo.packageDirectory,
})
}}
</span>
<el-button
v-if="!restoreInfo.packageExist && restoreInfo.packageURL"
class="copy-download-link"
type="primary"
link
@click="copyText(restoreInfo.packageURL)"
>
{{ $t('license.restoreCommunityCopyDownloadLink') }}
</el-button>
</div>
</div>
</div>
<template #footer>
@@ -62,6 +86,8 @@
<script setup lang="ts">
import { onUnmounted, reactive, ref } from 'vue';
import { getCommunityRestoreStatus, restoreCommunity } from '@/api/modules/setting';
import { copyText } from '@/utils/clipboard';
import { CircleCheckFilled, Clock, Loading } from '@element-plus/icons-vue';
const emit = defineEmits<{
started: [];
@@ -76,6 +102,8 @@ const restoreInfo = reactive({
message: '',
packageExist: false,
packageDirectory: '',
packageName: '',
packageURL: '',
});
let packageTimer: number | undefined;
@@ -159,4 +187,49 @@ defineExpose({
flex-direction: column;
gap: 16px;
}
.package-status {
display: flex;
flex-direction: column;
gap: 6px;
padding: 12px 16px;
background-color: var(--el-bg-color);
border: 1px solid var(--el-border-color-light);
border-radius: 4px;
}
.package-status-header {
display: flex;
align-items: center;
gap: 8px;
font-weight: 500;
color: var(--el-text-color-primary);
}
.package-status-content {
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 4px;
padding-left: 22px;
}
.package-status-description {
font-size: 12px;
line-height: 18px;
color: var(--el-text-color-secondary);
}
.package-name {
font-size: 12px;
line-height: 18px;
color: var(--el-text-color-primary);
word-break: break-all;
}
.copy-download-link {
margin: 4px 0 0;
padding: 0;
font-size: 12px;
}
</style>