Feat: Add Webdav storage as data source (#11422)

### What problem does this PR solve?

This PR adds webdav storage as data source for data sync service.

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
Jonah Hartmann
2025-11-26 07:14:42 +01:00
committed by GitHub
parent 40e84ca41a
commit 2fd5ac1031
10 changed files with 512 additions and 7 deletions

View File

@ -12,6 +12,7 @@ export enum DataSourceKey {
MOODLE = 'moodle',
// GMAIL = 'gmail',
JIRA = 'jira',
WEBDAV = 'webdav',
DROPBOX = 'dropbox',
// SHAREPOINT = 'sharepoint',
// SLACK = 'slack',
@ -54,6 +55,11 @@ export const DataSourceInfo = {
description: t(`setting.${DataSourceKey.JIRA}Description`),
icon: <SvgIcon name={'data-source/jira'} width={38} />,
},
[DataSourceKey.WEBDAV]: {
name: 'WebDAV',
description: t(`setting.${DataSourceKey.WEBDAV}Description`),
icon: <SvgIcon name={'data-source/webdav'} width={38} />,
},
[DataSourceKey.DROPBOX]: {
name: 'Dropbox',
description: t(`setting.${DataSourceKey.DROPBOX}Description`),
@ -429,6 +435,35 @@ export const DataSourceFormFields = {
tooltip: t('setting.jiraPasswordTip'),
},
],
[DataSourceKey.WEBDAV]: [
{
label: 'WebDAV Server URL',
name: 'config.base_url',
type: FormFieldType.Text,
required: true,
placeholder: 'https://webdav.example.com',
},
{
label: 'Username',
name: 'config.credentials.username',
type: FormFieldType.Text,
required: true,
},
{
label: 'Password',
name: 'config.credentials.password',
type: FormFieldType.Password,
required: true,
},
{
label: 'Remote Path',
name: 'config.remote_path',
type: FormFieldType.Text,
required: false,
placeholder: '/',
tooltip: t('setting.webdavRemotePathTip'),
},
],
[DataSourceKey.DROPBOX]: [
{
label: 'Access Token',
@ -546,6 +581,18 @@ export const DataSourceFormDefaultValues = {
},
},
},
[DataSourceKey.WEBDAV]: {
name: '',
source: DataSourceKey.WEBDAV,
config: {
base_url: '',
remote_path: '/',
credentials: {
username: '',
password: '',
},
},
},
[DataSourceKey.DROPBOX]: {
name: '',
source: DataSourceKey.DROPBOX,