Skip to content

feat(resource): manage #3303

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions ui/src/components/app-icon/icons/knowledge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,79 @@ export default {
])
},
},
'app-succeed': {
iconReader: () => {
return h('i', [
h(
'svg',
{
style: { height: '100%', width: '100%' },
viewBox: '0 0 16 16',
version: '1.1',
xmlns: 'http://www.w3.org/2000/svg',
},
[
h('path', {
d: 'M0.666687 8.00032C0.666687 12.0503 3.95002 15.3337 8.00002 15.3337C12.05 15.3337 15.3334 12.0503 15.3334 8.00032C15.3334 3.95033 12.05 0.666992 8.00002 0.666992C3.95002 0.666992 0.666687 3.95033 0.666687 8.00032ZM10.7624 5.98468C10.8249 5.92219 10.9096 5.88708 10.998 5.88708C11.0864 5.88708 11.1712 5.92219 11.2337 5.98468L11.705 6.45635C11.7675 6.51886 11.8026 6.60362 11.8026 6.69201C11.8026 6.7804 11.7675 6.86517 11.705 6.92768L7.46236 11.1703C7.39985 11.2328 7.31508 11.2679 7.22669 11.2679C7.1383 11.2679 7.05353 11.2328 6.99103 11.1703L4.55103 8.73001C4.48854 8.6675 4.45343 8.58273 4.45343 8.49434C4.45343 8.40596 4.48854 8.32119 4.55103 8.25868L5.02203 7.78701C5.08453 7.72452 5.1693 7.68942 5.25769 7.68942C5.34608 7.68942 5.43085 7.72452 5.49336 7.78701L7.22669 9.52034L10.7624 5.98468Z',
fill: '#34C724',
}),
],
),
])
},
},

'app-close_colorful': {
iconReader: () => {
return h('i', [
h(
'svg',
{
style: { height: '100%', width: '100%' },
viewBox: '0 0 16 16',
version: '1.1',
xmlns: 'http://www.w3.org/2000/svg',
},
[
h('path', {
d: 'M8.00002 15.3337C3.95002 15.3337 0.666687 12.0503 0.666687 8.00032C0.666687 3.95032 3.95002 0.666992 8.00002 0.666992C12.05 0.666992 15.3334 3.95032 15.3334 8.00032C15.3334 12.0503 12.05 15.3337 8.00002 15.3337Z',
fill: '#8F959E',
}),
h('path', {
d: 'M6.01682 5.07416L8.00016 7.05749L9.98349 5.07416C10.046 5.01167 10.1308 4.97656 10.2192 4.97656C10.3075 4.97656 10.3923 5.01167 10.4548 5.07416L10.9262 5.54549C10.9886 5.608 11.0238 5.69277 11.0238 5.78116C11.0238 5.86955 10.9886 5.95432 10.9262 6.01682L8.94283 8.00016L10.9262 9.98349C10.9886 10.046 11.0238 10.1308 11.0238 10.2192C11.0238 10.3075 10.9886 10.3923 10.9262 10.4548L10.4548 10.9262C10.3923 10.9886 10.3075 11.0238 10.2192 11.0238C10.1308 11.0238 10.046 10.9886 9.98349 10.9262L8.00016 8.94282L6.01682 10.9262C5.95432 10.9886 5.86955 11.0238 5.78116 11.0238C5.69277 11.0238 5.608 10.9886 5.54549 10.9262L5.07416 10.4548C5.01167 10.3923 4.97656 10.3075 4.97656 10.2192C4.97656 10.1308 5.01167 10.046 5.07416 9.98349L7.05749 8.00016L5.07416 6.01682C5.01167 5.95432 4.97656 5.86955 4.97656 5.78116C4.97656 5.69277 5.01167 5.608 5.07416 5.54549L5.54549 5.07416C5.608 5.01167 5.69277 4.97656 5.78116 4.97656C5.86955 4.97656 5.95432 5.01167 6.01682 5.07416Z',
fill: 'white',
}),
],
),
])
},
},
'app-blue_lock': {
iconReader: () => {
return h('i', [
h(
'svg',
{
style: { height: '100%', width: '100%' },
viewBox: '0 0 16 16',
version: '1.1',
xmlns: 'http://www.w3.org/2000/svg',
},
[
h('path', {
d: 'M4.33337 5.33382V5.0005C4.33337 2.97392 5.97504 1.33398 8.00004 1.33398C10.025 1.33398 11.6667 2.97392 11.6667 5.0005V5.33382H14C14.3684 5.33382 14.6667 5.63381 14.6667 6.00046V14.0001C14.6667 14.3668 14.3684 14.6668 14 14.6668H2.00004C1.63171 14.6668 1.33337 14.3668 1.33337 14.0001V6.00046C1.33337 5.63381 1.63171 5.33382 2.00004 5.33382H4.33337ZM10.3334 5.0005C10.3334 3.71055 9.28871 2.66726 8.00004 2.66726C6.71137 2.66726 5.66671 3.71055 5.66671 5.0005V5.33382H10.3334V5.0005ZM2.66671 6.6671V13.3335H13.3334V6.6671H2.66671Z',
fill: '#3370FF',
}),
h('path', {
d: 'M7.83362 10.2012L7.58362 10.0566C7.33323 9.9118 7.16663 9.64178 7.16663 9.33398C7.16677 8.87403 7.53962 8.50115 7.99963 8.50098C8.4598 8.50098 8.83347 8.87392 8.83362 9.33398C8.83362 9.64172 8.66694 9.91178 8.41663 10.0566L8.16663 10.2012V11.501H7.83362V10.2012Z',
fill: '#3370FF',
stroke: '#3370FF',
}),
],
),
])
},
},

'app-icon-blue': {
iconReader: () => {
Expand Down
1 change: 1 addition & 0 deletions ui/src/locales/lang/zh-CN/views/tool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export default {
editTool: '编辑工具',
copyTool: '复制函数',
importTool: '导入函数',
enabled: '启用',
disabled: {
confirmTitle: '是否禁用工具:',
confirmMessage: '禁用后,引用了该工具的应用提问时会报错 ,请谨慎操作。',
Expand Down
10 changes: 1 addition & 9 deletions ui/src/views/resource-management/knowledge/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -315,15 +315,7 @@ function getList() {

KnowledgeApi.getKnowledgeListPage(paginationConfig, params, loading).then((res) => {
paginationConfig.total = res.data.total
knowledgeList.value = [...knowledgeList.value, ...res.data.records]
})
}

function getAllList() {
const params = {}

KnowledgeApi.getKnowledgeList(params, loading).then((res) => {
knowledgeListbp = [...res.data]
knowledgeListbp = [...res.data.records]
workspaces = [...new Set(knowledgeListbp.map((ele) => ele.workspace_id))]
checkedWorkspaces.value = [...workspaces]
checkAll.value = true
Expand Down
14 changes: 13 additions & 1 deletion ui/src/views/resource-management/tool/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,18 @@
:label="$t('views.application.form.appType.label')"
width="120"
/>
<el-table-column :label="$t('common.status.label')" width="120">
<template #default="scope">
<div class="flex align-center">
<el-icon class="mr-8" size="16">
<AppIcon
:iconName="scope.row.is_active ? 'app-close_colorful' : 'app-succeed'"
></AppIcon>
</el-icon>
{{ $t(scope.row.is_active ? 'views.tool.enabled' : 'common.status.disable') }}
</div>
</template>
</el-table-column>
<el-table-column width="100" property="workspace_name">
<template #header>
<div class="flex align-center">
Expand Down Expand Up @@ -151,7 +163,7 @@
@click.stop="configInitParams(scope.row)"
>
<el-icon size="16">
<AppIcon iconName="app-operation" class="mr-4"></AppIcon>
<AppIcon iconName="app-blue_lock"></AppIcon>
</el-icon>
</el-button>
<el-button
Expand Down
Loading