fix: 解决备份账号修改备份路径失败的问题 (#1560)

pull/1563/head
ssongliu 1 year ago committed by GitHub
parent ec105ede83
commit a463f237b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -38,7 +38,7 @@ type CommonBackup struct {
DetailName string `json:"detailName"`
}
type CommonRecover struct {
Source string `json:"source" validate:"required,oneof=OSS S3 SFTP MINIO LOCAL COS KODO"`
Source string `json:"source" validate:"required,oneof=OSS S3 SFTP MINIO LOCAL COS KODO OneDrive"`
Type string `json:"type" validate:"required,oneof=app mysql redis website"`
Name string `json:"name"`
DetailName string `json:"detailName"`
@ -62,7 +62,7 @@ type BackupRecords struct {
}
type DownloadRecord struct {
Source string `json:"source" validate:"required,oneof=OSS S3 SFTP MINIO LOCAL COS KODO"`
Source string `json:"source" validate:"required,oneof=OSS S3 SFTP MINIO LOCAL COS KODO OneDrive"`
FileDir string `json:"fileDir" validate:"required"`
FileName string `json:"fileName" validate:"required"`
}

@ -76,7 +76,7 @@ type PortUpdate struct {
}
type SnapshotCreate struct {
From string `json:"from" validate:"required,oneof=OSS S3 SFTP MINIO COS KODO"`
From string `json:"from" validate:"required,oneof=OSS S3 SFTP MINIO COS KODO OneDrive"`
Description string `json:"description" validate:"max=256"`
}
type SnapshotRecover struct {

@ -238,6 +238,7 @@ func (u *BackupService) Update(req dto.BackupOperate) error {
upMap := make(map[string]interface{})
upMap["bucket"] = req.Bucket
upMap["credential"] = req.Credential
upMap["backup_path"] = req.BackupPath
upMap["vars"] = req.Vars
backup.Vars = req.Vars

@ -81,7 +81,8 @@
</span>
</el-form-item>
<el-form-item :label="$t('setting.backupDir')">
{{ s3Data.backupPath }}
<span v-if="s3Data.backupPath">{{ s3Data.backupPath }}</span>
<span v-else>{{ $t('setting.unSetting') }}</span>
</el-form-item>
<el-form-item :label="$t('commons.table.createdAt')">
{{ dateFormat(0, 0, s3Data.createdAt) }}
@ -134,7 +135,8 @@
</span>
</el-form-item>
<el-form-item :label="$t('setting.backupDir')">
{{ ossData.backupPath }}
<span v-if="ossData.backupPath">{{ ossData.backupPath }}</span>
<span v-else>{{ $t('setting.unSetting') }}</span>
</el-form-item>
<el-form-item :label="$t('commons.table.createdAt')">
{{ dateFormat(0, 0, ossData.createdAt) }}
@ -188,7 +190,8 @@
</span>
</el-form-item>
<el-form-item :label="$t('setting.backupDir')">
{{ cosData.backupPath }}
<span v-if="cosData.backupPath">{{ cosData.backupPath }}</span>
<span v-else>{{ $t('setting.unSetting') }}</span>
</el-form-item>
<el-form-item :label="$t('commons.table.createdAt')">
{{ dateFormat(0, 0, cosData.createdAt) }}
@ -221,7 +224,8 @@
<el-divider class="devider" />
<div v-if="oneDriveData.id !== 0" style="margin-left: 20px">
<el-form-item :label="$t('setting.backupDir')">
{{ oneDriveData.backupPath }}
<span v-if="oneDriveData.backupPath">{{ oneDriveData.backupPath }}</span>
<span v-else>{{ $t('setting.unSetting') }}</span>
</el-form-item>
<el-form-item :label="$t('commons.table.createdAt')">
{{ dateFormat(0, 0, oneDriveData.createdAt) }}
@ -268,7 +272,8 @@
{{ kodoData.bucket }}
</el-form-item>
<el-form-item :label="$t('setting.backupDir')">
{{ kodoData.backupPath }}
<span v-if="kodoData.backupPath">{{ kodoData.backupPath }}</span>
<span v-else>{{ $t('setting.unSetting') }}</span>
</el-form-item>
<el-form-item :label="$t('commons.table.createdAt')">
{{ dateFormat(0, 0, kodoData.createdAt) }}
@ -306,7 +311,8 @@
{{ minioData.bucket }}
</el-form-item>
<el-form-item :label="$t('setting.backupDir')">
{{ minioData.backupPath }}
<span v-if="minioData.backupPath">{{ minioData.backupPath }}</span>
<span v-else>{{ $t('setting.unSetting') }}</span>
</el-form-item>
<el-form-item :label="$t('commons.table.createdAt')">
{{ dateFormat(0, 0, minioData.createdAt) }}

Loading…
Cancel
Save