+
-
- To connect your online drive, please follow the instructions provided by your service provider.
-
-
+
+
+
+
+ {t('datasetPipeline.onlineDrive.notConnected', { name: nodeData.title })}
+
+
+
+
+ {t('datasetPipeline.onlineDrive.notConnectedTip', { name: nodeData.title })}
+
+
+
+
)
}
diff --git a/web/app/components/rag-pipeline/components/panel/test-run/hooks.ts b/web/app/components/rag-pipeline/components/panel/test-run/hooks.ts
index a730501722..46e5627184 100644
--- a/web/app/components/rag-pipeline/components/panel/test-run/hooks.ts
+++ b/web/app/components/rag-pipeline/components/panel/test-run/hooks.ts
@@ -55,24 +55,26 @@ export const useDatasourceOptions = () => {
data: node.data,
})
})
- // todo: delete mock data
- options.push({
- label: 'Google Drive',
- value: '123456',
- // @ts-expect-error mock data
- data: {
- datasource_parameters: {},
- datasource_configurations: {},
- type: BlockEnum.DataSource,
- title: 'Google Drive',
- plugin_id: 'langgenius/google-drive',
- provider_type: 'online_drive',
- provider_name: 'google_drive',
- datasource_name: 'google-drive',
- datasource_label: 'Google Drive',
- selected: false,
- },
- })
+ if (process.env.NODE_ENV === 'development') {
+ // todo: delete mock data
+ options.push({
+ label: 'Google Drive',
+ value: '123456',
+ // @ts-expect-error mock data
+ data: {
+ datasource_parameters: {},
+ datasource_configurations: {},
+ type: BlockEnum.DataSource,
+ title: 'Google Drive',
+ plugin_id: 'langgenius/google-drive',
+ provider_type: 'online_drive',
+ provider_name: 'google_drive',
+ datasource_name: 'google-drive',
+ datasource_label: 'Google Drive',
+ selected: false,
+ },
+ })
+ }
return options
}, [datasourceNodes])
diff --git a/web/i18n/en-US/dataset-pipeline.ts b/web/i18n/en-US/dataset-pipeline.ts
index e2187de048..0e83490e65 100644
--- a/web/i18n/en-US/dataset-pipeline.ts
+++ b/web/i18n/en-US/dataset-pipeline.ts
@@ -106,6 +106,10 @@ const translation = {
documentSettings: {
title: 'Document Settings',
},
+ onlineDrive: {
+ notConnected: '{{name}} is not connected',
+ notConnectedTip: 'To sync with {{name}}, connection to {{name}} must be established first.',
+ },
}
export default translation
diff --git a/web/i18n/zh-Hans/dataset-pipeline.ts b/web/i18n/zh-Hans/dataset-pipeline.ts
index e0b7702911..66076a1081 100644
--- a/web/i18n/zh-Hans/dataset-pipeline.ts
+++ b/web/i18n/zh-Hans/dataset-pipeline.ts
@@ -106,6 +106,10 @@ const translation = {
documentSettings: {
title: '文档设置',
},
+ onlineDrive: {
+ notConnected: '{{name}} 未绑定',
+ notConnectedTip: '同步 {{name}} 内容前, 须先绑定 {{name}}。',
+ },
}
export default translation