This commit is contained in:
liqiang-fit2cloud 2025-12-03 11:35:33 +08:00
commit f55f38bce3
7 changed files with 57 additions and 4 deletions

View File

@ -19,8 +19,8 @@ from common.utils.logger import maxkb_logger
class BaseDataSourceWebNodeForm(BaseForm):
source_url = forms.TextInputField('source url', required=True)
selector = forms.TextInputField('knowledge selector', required=False,default_value="body")
source_url = forms.TextInputField(_('Web source url'), required=True)
selector = forms.TextInputField(_('Web knowledge selector'), required=False,attrs={'placeholder': _('The default is body, you can enter .classname/#idname/tagname')})
def get_collect_handler():

View File

@ -211,6 +211,7 @@ exec({dedent(code)!a})
'-c',
f'import base64,gzip; exec(gzip.decompress(base64.b64decode(\'{compressed_and_base64_encoded_code_str}\')).decode())',
],
'cwd': self.sandbox_path,
'env': {
'LD_PRELOAD': self.sandbox_so_path,
},

View File

@ -8784,4 +8784,13 @@ msgid "SAML2 SSO"
msgstr ""
msgid "Workflow"
msgstr ""
msgid "Web source url"
msgstr ""
msgid "Web knowledge selector"
msgstr ""
msgid "The default is body, you can enter .classname/#idname/tagname"
msgstr ""

View File

@ -8911,3 +8911,12 @@ msgstr "SAML2 单点登录"
msgid "Workflow"
msgstr "工作流"
msgid "Web source url"
msgstr "Web 根地址"
msgid "Web knowledge selector"
msgstr "选择器"
msgid "The default is body, you can enter .classname/#idname/tagname"
msgstr "默认为 body可输入 .classname/#idname/tagname"

View File

@ -8910,4 +8910,13 @@ msgid "SAML2 SSO"
msgstr "SAML2 單點登入"
msgid "Workflow"
msgstr "工作流"
msgstr "工作流"
msgid "Web source url"
msgstr "Web 根地址"
msgid "Web knowledge selector"
msgstr "選擇器"
msgid "The default is body, you can enter .classname/#idname/tagname"
msgstr "默認為 body可輸入 .classname/#idname/tagname"

View File

@ -96,4 +96,29 @@ export default {
])
},
},
'app-import-doc': {
iconReader: () => {
return h('i', [
h(
'svg',
{
style: { height: '100%', width: '100%' },
viewBox: '0 0 1024 1024',
version: '1.1',
xmlns: 'http://www.w3.org/2000/svg',
},
[
h('path', {
d: 'M128 935.594667A45.653333 45.653333 0 0 0 173.482667 981.333333h338.346666v-85.76H213.248V128H810.24v426.666667h85.333333V87.978667A45.653333 45.653333 0 0 0 850.005333 42.24H173.482667A45.653333 45.653333 0 0 0 128 87.978667v847.616z',
fill: 'currentColor',
}),
h('path', {
d: 'M298.922667 480.768c0-6.314667 5.12-11.434667 11.392-11.434667h403.626666c6.314667 0 11.392 5.12 11.392 11.434667v62.890667c0 6.314667-5.12 11.434667-11.392 11.434666h-403.626666a11.392 11.392 0 0 1-11.392-11.434666v-62.890667zM310.4 298.666667a11.392 11.392 0 0 0-11.392 11.434666v62.890667c0 6.314667 5.12 11.434667 11.392 11.434667h190.208c6.314667 0 11.392-5.12 11.392-11.434667V310.101333A11.392 11.392 0 0 0 500.608 298.666667H310.4zM725.333333 661.333333a21.333333 21.333333 0 0 1 21.333334-21.333333h42.666666a21.333333 21.333333 0 0 1 21.333334 21.333333V768h106.666666a21.333333 21.333333 0 0 1 21.333334 21.333333v42.666667a21.333333 21.333333 0 0 1-21.333334 21.333333H810.666667v106.666667a21.333333 21.333333 0 0 1-21.333334 21.333333h-42.666666a21.333333 21.333333 0 0 1-21.333334-21.333333V853.333333h-106.666666a21.333333 21.333333 0 0 1-21.333334-21.333333v-42.666667a21.333333 21.333333 0 0 1 21.333334-21.333333H725.333333v-106.666667z',
fill: 'currentColor',
}),
],
),
])
},
},
}

View File

@ -50,7 +50,7 @@
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item @click="toImportDoc">
<AppIcon iconName="app-create-chat" class="color-secondary"></AppIcon>
<AppIcon iconName="app-import-doc" class="color-secondary"></AppIcon>
{{ $t('views.workflow.operation.toImportDoc') }}
</el-dropdown-item>