fix: 远程命令直连SSH(去轮询) + 去掉无用命令分类

This commit is contained in:
attacker committed 2026-06-18 07:56:10 +00:00
1 parent ed3bf59c3b
commit b8b1a3d5f6
4 files changed
+70 -68

No files matched your search

+2
View File
@@ -489,6 +489,8 @@ export const agentApi = {
getHistory: (hostname: string, hours = 1) => http.get(`/agent/history/${hostname}?hours=${hours}`),
createTask: (data: { hostname: string; type: string; command: string; timeout?: number }) => http.post('/agent/tasks', data),
listTasks: (params?: Record<string, string>) => http.get('/agent/tasks', params),
// 直连 SSH 执行命令(即时返回)
execCommand: (data: { hostname: string; command: string; timeout?: number }) => http.post('/agent/exec', data),
listRules: () => http.get('/agent/rules'),
createRule: (data: any) => http.post('/agent/rules', data),
updateRule: (id: number, data: any) => http.put(`/agent/rules/${id}`, data),