1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-02-07 17:10:07 +08:00

fix: 解决备份账号创建后,未重制 bucket 选项的问题 (#518)

This commit is contained in:
ssongliu 2023-04-06 14:42:16 +08:00 committed by GitHub
parent ce2b92ee01
commit 281cf48aaa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 14 deletions

View File

@ -804,7 +804,7 @@ const message = {
backup: 'Backup', backup: 'Backup',
thirdParty: 'Third-party account', thirdParty: 'Third-party account',
createBackupAccount: 'Create {0} backup account', createBackupAccount: 'Add {0}',
noTypeForCreate: 'No backup type is currently created', noTypeForCreate: 'No backup type is currently created',
LOCAL: 'Server disks', LOCAL: 'Server disks',
currentPath: 'Current path', currentPath: 'Current path',
@ -812,10 +812,10 @@ const message = {
S3: 'Amazon S3', S3: 'Amazon S3',
MINIO: 'MINIO', MINIO: 'MINIO',
SFTP: 'SFTP', SFTP: 'SFTP',
COS: 'Tencent COS Browser', COS: 'Tencent COS',
KODO: 'Qiniu KODO', KODO: 'Qiniu Kodo',
backupAlert: backupAlert:
"Compatibility of some object storage service providers with Amazon S3, For details please see <a target=“_blank” href='https://1panel.cn/docs/user_manual/settings/#3'>官方文档</a> ", "In theory, as long as the cloud provider is compatible with the S3 protocol, existing Amazon S3 cloud storage can be used for backup. For specific configurations, please refer to the <a target=“_blank” href='https://1panel.cn/docs/user_manual/settings/#3'>official documentation.</a> ",
domain: 'Accelerate domain', domain: 'Accelerate domain',
backupAccount: 'Backup account', backupAccount: 'Backup account',
loadBucket: 'Get bucket', loadBucket: 'Get bucket',

View File

@ -805,7 +805,7 @@ const message = {
backup: '备份', backup: '备份',
thirdParty: '第三方账号', thirdParty: '第三方账号',
createBackupAccount: '添加 {0} 备份账号', createBackupAccount: '添加 {0}',
noTypeForCreate: '当前无可创建备份类型', noTypeForCreate: '当前无可创建备份类型',
LOCAL: '服务器磁盘', LOCAL: '服务器磁盘',
currentPath: '当前路径', currentPath: '当前路径',
@ -813,10 +813,10 @@ const message = {
S3: '亚马逊 S3 云存储', S3: '亚马逊 S3 云存储',
MINIO: 'MINIO', MINIO: 'MINIO',
SFTP: 'SFTP', SFTP: 'SFTP',
COS: '腾讯云 COS Browser', COS: '腾讯云 COS',
KODO: '七牛云 KODO', KODO: '七牛云 Kodo',
backupAlert: backupAlert:
"部分对象存储服务商与亚马逊 S3 的兼容性,详情请查看 <a target=“_blank” href='https://1panel.cn/docs/user_manual/settings/#3'>官方文档</a> ", "理论上只要云厂商兼容 S3 协议,就可以用现有的亚马逊 S3 云存储来备份,具体配置参考 <a target=“_blank” href='https://1panel.cn/docs/user_manual/settings/#3'>官方文档</a> ",
domain: '加速域名', domain: '加速域名',
backupAccount: '备份账号', backupAccount: '备份账号',
loadBucket: '获取桶', loadBucket: '获取桶',

View File

@ -72,7 +72,7 @@
</div> </div>
<el-alert v-else center class="alert" style="height: 167px" :closable="false"> <el-alert v-else center class="alert" style="height: 167px" :closable="false">
<el-button size="large" round plain type="primary" @click="onOpenDialog('create', 'S3')"> <el-button size="large" round plain type="primary" @click="onOpenDialog('create', 'S3')">
{{ $t('setting.createBackupAccount', ['S3']) }} {{ $t('setting.createBackupAccount', [$t('setting.S3')]) }}
</el-button> </el-button>
</el-alert> </el-alert>
</el-col> </el-col>
@ -108,7 +108,7 @@
</div> </div>
<el-alert v-else center class="alert" style="height: 167px" :closable="false"> <el-alert v-else center class="alert" style="height: 167px" :closable="false">
<el-button size="large" round plain type="primary" @click="onOpenDialog('create', 'OSS')"> <el-button size="large" round plain type="primary" @click="onOpenDialog('create', 'OSS')">
{{ $t('setting.createBackupAccount', ['OSS']) }} {{ $t('setting.createBackupAccount', [$t('setting.OSS')]) }}
</el-button> </el-button>
</el-alert> </el-alert>
</el-col> </el-col>
@ -145,7 +145,7 @@
</div> </div>
<el-alert v-else center class="alert" style="height: 167px" :closable="false"> <el-alert v-else center class="alert" style="height: 167px" :closable="false">
<el-button size="large" round plain type="primary" @click="onOpenDialog('create', 'COS')"> <el-button size="large" round plain type="primary" @click="onOpenDialog('create', 'COS')">
{{ $t('setting.createBackupAccount', ['COS']) }} {{ $t('setting.createBackupAccount', [$t('setting.COS')]) }}
</el-button> </el-button>
</el-alert> </el-alert>
</el-col> </el-col>
@ -181,7 +181,7 @@
</div> </div>
<el-alert v-else center class="alert" style="height: 167px" :closable="false"> <el-alert v-else center class="alert" style="height: 167px" :closable="false">
<el-button size="large" round plain type="primary" @click="onOpenDialog('create', 'KODO')"> <el-button size="large" round plain type="primary" @click="onOpenDialog('create', 'KODO')">
{{ $t('setting.createBackupAccount', ['KODO']) }} {{ $t('setting.createBackupAccount', [$t('setting.KODO')]) }}
</el-button> </el-button>
</el-alert> </el-alert>
</el-col> </el-col>
@ -218,7 +218,7 @@
</div> </div>
<el-alert v-else center class="alert" style="height: 167px" :closable="false"> <el-alert v-else center class="alert" style="height: 167px" :closable="false">
<el-button size="large" round plain type="primary" @click="onOpenDialog('create', 'MINIO')"> <el-button size="large" round plain type="primary" @click="onOpenDialog('create', 'MINIO')">
{{ $t('setting.createBackupAccount', ['MINIO']) }} {{ $t('setting.createBackupAccount', [$t('setting.MINIO')]) }}
</el-button> </el-button>
</el-alert> </el-alert>
</el-col> </el-col>
@ -257,7 +257,7 @@
</div> </div>
<el-alert v-else center class="alert" style="height: 167px" :closable="false"> <el-alert v-else center class="alert" style="height: 167px" :closable="false">
<el-button size="large" round plain type="primary" @click="onOpenDialog('create', 'SFTP')"> <el-button size="large" round plain type="primary" @click="onOpenDialog('create', 'SFTP')">
{{ $t('setting.createBackupAccount', ['SFTP']) }} {{ $t('setting.createBackupAccount', [$t('setting.SFTP')]) }}
</el-button> </el-button>
</el-alert> </el-alert>
</el-col> </el-col>

View File

@ -184,6 +184,7 @@ const dialogData = ref<DialogProps>({
title: '', title: '',
}); });
const acceptParams = (params: DialogProps): void => { const acceptParams = (params: DialogProps): void => {
buckets.value = [];
dialogData.value = params; dialogData.value = params;
if (dialogData.value.title === 'edit' && dialogData.value.rowData!.type === 'MINIO') { if (dialogData.value.title === 'edit' && dialogData.value.rowData!.type === 'MINIO') {
if (dialogData.value.rowData!.varsJson['endpoint'].indexOf('://') !== 0) { if (dialogData.value.rowData!.varsJson['endpoint'].indexOf('://') !== 0) {