mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-19 16:29:17 +08:00
feat: sftp 去掉重复的备份文件夹 (#1509)
This commit is contained in:
parent
597c9ea4c0
commit
46495937b1
@ -223,7 +223,11 @@ func (onedrive *oneDriveClient) ListObjects(prefix string) ([]interface{}, error
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (onedrive *oneDriveClient) loadIDByPath(path string) (string, 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 {
|
if err != nil {
|
||||||
return "", fmt.Errorf("new request for file id failed, err: %v", err)
|
return "", fmt.Errorf("new request for file id failed, err: %v", err)
|
||||||
}
|
}
|
||||||
|
@ -349,9 +349,6 @@
|
|||||||
<el-form-item :label="$t('setting.path')">
|
<el-form-item :label="$t('setting.path')">
|
||||||
{{ sftpData.bucket }}
|
{{ sftpData.bucket }}
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('setting.backupDir')">
|
|
||||||
{{ sftpData.backupPath }}
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item :label="$t('commons.table.createdAt')">
|
<el-form-item :label="$t('commons.table.createdAt')">
|
||||||
{{ dateFormat(0, 0, sftpData.createdAt) }}
|
{{ dateFormat(0, 0, sftpData.createdAt) }}
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -189,11 +189,11 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
:label="$t('setting.username')"
|
:label="$t('commons.login.username')"
|
||||||
prop="accessKey"
|
prop="accessKey"
|
||||||
:rules="[Rules.requiredInput]"
|
:rules="[Rules.requiredInput]"
|
||||||
>
|
>
|
||||||
<el-input v-model="dialogData.rowData!.accessKey" />
|
<el-input v-model.trim="dialogData.rowData!.accessKey" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
:label="$t('commons.login.password')"
|
:label="$t('commons.login.password')"
|
||||||
@ -204,15 +204,15 @@
|
|||||||
type="password"
|
type="password"
|
||||||
clearable
|
clearable
|
||||||
show-password
|
show-password
|
||||||
v-model="dialogData.rowData!.credential"
|
v-model.trim="dialogData.rowData!.credential"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('setting.path')" prop="bucket" :rules="[Rules.requiredInput]">
|
<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>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
v-if="dialogData.rowData!.type !== 'LOCAL'"
|
v-if="dialogData.rowData!.type !== 'LOCAL' && dialogData.rowData!.type !== 'SFTP'"
|
||||||
:label="$t('setting.backupDir')"
|
:label="$t('setting.backupDir')"
|
||||||
prop="backupPath"
|
prop="backupPath"
|
||||||
>
|
>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user