From edca02fc044ffd4d493898eb2b641848c814a006 Mon Sep 17 00:00:00 2001 From: "hsparks.codes" Date: Wed, 3 Dec 2025 11:34:29 +0100 Subject: [PATCH] feat: Add Space Key field to Confluence data source configuration Adds the ability to specify Confluence space keys to limit syncing to specific spaces. Changes: - Add 'Space Key' field to Confluence connector form in UI - Add space field to initial values with empty string default - Add tooltip translations in English, Chinese, and Russian - Support for multiple spaces separated by commas The backend already supports the 'space' parameter in ConfluenceConnector, this change exposes it to the UI for user configuration. Fixes #11638 --- web/src/locales/en.ts | 2 ++ web/src/locales/ru.ts | 2 ++ web/src/locales/zh.ts | 2 ++ web/src/pages/user-setting/data-source/contant.tsx | 8 ++++++++ 4 files changed, 14 insertions(+) diff --git a/web/src/locales/en.ts b/web/src/locales/en.ts index 9091833f5..479cafb64 100644 --- a/web/src/locales/en.ts +++ b/web/src/locales/en.ts @@ -714,6 +714,8 @@ This auto-tagging feature enhances retrieval by adding another layer of domain-s 'Check if this is a Confluence Cloud instance, uncheck for Confluence Server/Data Center', confluenceWikiBaseUrlTip: 'The base URL of your Confluence instance (e.g., https://your-domain.atlassian.net/wiki)', + confluenceSpaceKeyTip: + 'Optional: Specify a space key to limit syncing to a specific space. Leave empty to sync all accessible spaces. For multiple spaces, separate with commas (e.g., DEV,DOCS,HR)', s3PrefixTip: `Specify the folder path within your S3 bucket to fetch files from. Example: general/v2/`, S3CompatibleEndpointUrlTip: `Required for S3 compatible Storage Box. Specify the S3-compatible endpoint URL. diff --git a/web/src/locales/ru.ts b/web/src/locales/ru.ts index bbdfcc278..6c6141abc 100644 --- a/web/src/locales/ru.ts +++ b/web/src/locales/ru.ts @@ -711,6 +711,8 @@ export default { 'Отметьте, если это экземпляр Confluence Cloud, снимите для Confluence Server/Data Center', confluenceWikiBaseUrlTip: 'Базовый URL вашего экземпляра Confluence (например, https://your-domain.atlassian.net/wiki)', + confluenceSpaceKeyTip: + 'Необязательно: Укажите ключ пространства для синхронизации только определенного пространства. Оставьте пустым для синхронизации всех доступных пространств. Для нескольких пространств разделите запятыми (например, DEV,DOCS,HR)', s3PrefixTip: `Укажите путь к папке в вашем S3 бакете для получения файлов. Пример: general/v2/`, S3CompatibleEndpointUrlTip: `Требуется для S3 совместимого Storage Box. Укажите URL конечной точки, совместимой с S3. diff --git a/web/src/locales/zh.ts b/web/src/locales/zh.ts index baf1c75d9..9929044a7 100644 --- a/web/src/locales/zh.ts +++ b/web/src/locales/zh.ts @@ -701,6 +701,8 @@ General:实体和关系提取提示来自 GitHub - microsoft/graphrag:基于 '检查这是否是 Confluence Cloud 实例,如果是 Confluence 服务/数据中心,则取消选中。', confluenceWikiBaseUrlTip: 'Confluence Wiki 的基础 URL(例如 https://your-domain.atlassian.net/wiki)', + confluenceSpaceKeyTip: + '可选:指定空间键以限制同步到特定空间。留空则同步所有可访问的空间。多个空间请用逗号分隔(例如:DEV,DOCS,HR)', s3PrefixTip: `指定 S3 存储桶内的文件夹路径,用于读取文件。 示例:general/v2/`, addDataSourceModalTital: '创建你的 {{name}} 链接', diff --git a/web/src/pages/user-setting/data-source/contant.tsx b/web/src/pages/user-setting/data-source/contant.tsx index f1359860a..db2392711 100644 --- a/web/src/pages/user-setting/data-source/contant.tsx +++ b/web/src/pages/user-setting/data-source/contant.tsx @@ -230,6 +230,13 @@ export const DataSourceFormFields = { required: false, tooltip: t('setting.confluenceIsCloudTip'), }, + { + label: 'Space Key', + name: 'config.space', + type: FormFieldType.Text, + required: false, + tooltip: t('setting.confluenceSpaceKeyTip'), + }, ], [DataSourceKey.GOOGLE_DRIVE]: [ { @@ -563,6 +570,7 @@ export const DataSourceFormDefaultValues = { config: { wiki_base: '', is_cloud: true, + space: '', credentials: { confluence_username: '', confluence_access_token: '',