Skip to content

Commit e2bc1a3

Browse files
Feat: add more attribute for confluence connector. (infiniflow#11743)
### What problem does this PR solve? Feat: add more attribute for confluence connector. ### Type of change - [x] New Feature (non-breaking change which adds functionality)
1 parent 6c2c447 commit e2bc1a3

2 files changed

Lines changed: 19 additions & 3 deletions

File tree

rag/svr/sync_data_source.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,11 +157,16 @@ async def _generate(self, task: dict):
157157
from common.data_source.config import DocumentSource
158158
from common.data_source.interfaces import StaticCredentialsProvider
159159

160+
space = (self.conf.get("space") or "").strip()
161+
page_id = (self.conf.get("page_id") or "").strip()
162+
index_recursively = bool(self.conf.get("index_recursively", False))
163+
160164
self.connector = ConfluenceConnector(
161165
wiki_base=self.conf["wiki_base"],
162-
space=self.conf.get("space", ""),
163166
is_cloud=self.conf.get("is_cloud", True),
164-
# page_id=self.conf.get("page_id", ""),
167+
space=space,
168+
page_id=page_id,
169+
index_recursively=index_recursively,
165170
)
166171

167172
credentials_provider = StaticCredentialsProvider(tenant_id=task["tenant_id"], connector_name=DocumentSource.CONFLUENCE, credential_json=self.conf["credentials"])

web/src/pages/user-setting/data-source/contant.tsx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,18 @@ export const DataSourceFormFields = {
235235
name: 'config.space',
236236
type: FormFieldType.Text,
237237
required: false,
238-
tooltip: t('setting.confluenceSpaceKeyTip'),
238+
},
239+
{
240+
label: 'Page ID',
241+
name: 'config.page_id',
242+
type: FormFieldType.Text,
243+
required: false,
244+
},
245+
{
246+
label: 'Index Recursively',
247+
name: 'config.index_recursively',
248+
type: FormFieldType.Checkbox,
249+
required: false,
239250
},
240251
],
241252
[DataSourceKey.GOOGLE_DRIVE]: [

0 commit comments

Comments
 (0)