mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2024-11-10 17:13:30 +08:00
feat: sftp 去掉重复的备份文件夹 (#1509)
This commit is contained in:
parent
597c9ea4c0
commit
46495937b1
3 changed files with 10 additions and 9 deletions
|
@ -223,7 +223,11 @@ func (onedrive *oneDriveClient) ListObjects(prefix string) ([]interface{}, error
|
|||
}
|
||||
|
||||
func (onedrive *oneDriveClient) loadIDByPath(path string) (string, error) {
|
||||
req, err := onedrive.client.NewRequest("GET", fmt.Sprintf("me/drive/root:%s", path), nil)
|
||||
pathItem := "root:" + path
|
||||
if path == "/" {
|
||||
pathItem = "root"
|
||||
}
|
||||
req, err := onedrive.client.NewRequest("GET", fmt.Sprintf("me/drive/%s", pathItem), nil)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("new request for file id failed, err: %v", err)
|
||||
}
|
||||
|
|
|
@ -349,9 +349,6 @@
|
|||
<el-form-item :label="$t('setting.path')">
|
||||
{{ sftpData.bucket }}
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('setting.backupDir')">
|
||||
{{ sftpData.backupPath }}
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('commons.table.createdAt')">
|
||||
{{ dateFormat(0, 0, sftpData.createdAt) }}
|
||||
</el-form-item>
|
||||
|
|
|
@ -189,11 +189,11 @@
|
|||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="$t('setting.username')"
|
||||
:label="$t('commons.login.username')"
|
||||
prop="accessKey"
|
||||
:rules="[Rules.requiredInput]"
|
||||
>
|
||||
<el-input v-model="dialogData.rowData!.accessKey" />
|
||||
<el-input v-model.trim="dialogData.rowData!.accessKey" />
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="$t('commons.login.password')"
|
||||
|
@ -204,15 +204,15 @@
|
|||
type="password"
|
||||
clearable
|
||||
show-password
|
||||
v-model="dialogData.rowData!.credential"
|
||||
v-model.trim="dialogData.rowData!.credential"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('setting.path')" prop="bucket" :rules="[Rules.requiredInput]">
|
||||
<el-input v-model="dialogData.rowData!.bucket" />
|
||||
<el-input v-model.trim="dialogData.rowData!.bucket" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
<el-form-item
|
||||
v-if="dialogData.rowData!.type !== 'LOCAL'"
|
||||
v-if="dialogData.rowData!.type !== 'LOCAL' && dialogData.rowData!.type !== 'SFTP'"
|
||||
:label="$t('setting.backupDir')"
|
||||
prop="backupPath"
|
||||
>
|
||||
|
|
Loading…
Reference in a new issue