Skip to content

Commit d8d6bcf

Browse files
committed
feat: add source filtering to tool resource search functionality
1 parent f665b5f commit d8d6bcf

File tree

1 file changed

+22
-4
lines changed

1 file changed

+22
-4
lines changed

ui/src/views/system-resource-management/ToolResourceIndex.vue

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
<el-option :label="$t('common.creator')" value="create_user" />
1919
<el-option :label="$t('common.name')" value="name" />
2020
<el-option :label="$t('common.type')" value="tool_type"/>
21+
<el-option :label="$t('views.tool.form.source.label')" value="source"/>
2122
</el-select>
2223
<el-input
2324
v-if="search_type === 'name'"
@@ -47,6 +48,16 @@
4748
>
4849
<el-option v-for="u in type_options" :key="u.id" :value="u.value" :label="u.label"/>
4950
</el-select>
51+
<el-select
52+
v-else-if="search_type === 'source'"
53+
v-model="search_form.source"
54+
@change="getList"
55+
clearable
56+
filterable
57+
style="width: 220px"
58+
>
59+
<el-option v-for="u in source_options" :key="u.id" :value="u.value" :label="u.label"/>
60+
</el-select>
5061
</div>
5162
</div>
5263

@@ -377,6 +388,7 @@ const search_form = ref<any>({
377388
name: '',
378389
create_user: '',
379390
tool_type: '',
391+
source: '',
380392
})
381393
const user_options = ref<any[]>([])
382394
const type_options = ref<any[]>([
@@ -385,12 +397,18 @@ const type_options = ref<any[]>([
385397
value: 'MCP',
386398
},
387399
{
388-
label: t('views.tool.toolStore.title'),
389-
value: 'TOOL_STORE',
400+
label: t('views.tool.dataSource.title'),
401+
value: 'DATA_SOURCE',
390402
},
391403
{
392-
label: t('views.tool.toolStore.internal'),
393-
value: 'INTERNAL',
404+
label: t('views.tool.title'),
405+
value: 'CUSTOM',
406+
},
407+
])
408+
const source_options = ref<any[]>([
409+
{
410+
label: t('views.tool.toolStore.title'),
411+
value: 'TOOL_STORE',
394412
},
395413
{
396414
label: t('common.custom'),

0 commit comments

Comments
 (0)