refactor: enhance datasource handling by adding fileExtensions support

This commit is contained in:
twwu
2025-05-27 14:39:52 +08:00
parent 754a1d1197
commit 31e183ef0d
7 changed files with 17 additions and 9 deletions

View File

@ -36,6 +36,7 @@ export const useDatasourceOptions = (pipelineNodes: Node<DataSourceNodeType>[])
description: node.data.desc || '',
docTitle: '', // todo: Add docTitle and docLink if needed, or remove these properties if not used
docLink: '',
fileExtensions: node.data.fileExtensions || [],
}
})
}, [datasourceNodes])

View File

@ -265,6 +265,7 @@ const TestRunPanel = () => {
{datasource?.type === DatasourceType.localFile && (
<LocalFile
files={fileList}
allowedExtensions={datasource?.fileExtensions || []}
updateFile={updateFile}
updateFileList={updateFileList}
onPreview={updateCurrentFile}