Skip to content

Commit 6308ee4

Browse files
committed
feat: add test connection endpoint for system tools
--bug=1063992 --user=刘瑞斌 【资源管理】mcp工具在资源管理中测试连接一直转圈 https://www.tapd.cn/62980211/s/1805081
1 parent 13b1525 commit 6308ee4

File tree

1 file changed

+8
-0
lines changed
  • ui/src/api/system-resource-management

1 file changed

+8
-0
lines changed

ui/src/api/system-resource-management/tool.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,13 @@ const putTool: (tool_id: string, data: toolData, loading?: Ref<boolean>) => Prom
7979
return put(`${prefix}/${tool_id}`, data, undefined, loading)
8080
}
8181

82+
const postToolTestConnection: (data: toolData, loading?: Ref<boolean>) => Promise<Result<any>> = (
83+
data,
84+
loading,
85+
) => {
86+
return post(`${prefix}/test_connection`, data, undefined, loading)
87+
}
88+
8289

8390
/**
8491
* 删除工具
@@ -133,4 +140,5 @@ export default {
133140
exportTool,
134141
putToolIcon,
135142
delTool,
143+
postToolTestConnection
136144
}

0 commit comments

Comments
 (0)