feat(web): 新增系统日志服务代理和智能体资源服务,添加访问控制工具函数,增强前端服务层能力

This commit is contained in:
caoxiaozhu
2026-05-15 09:36:16 +00:00
parent 891cecb4a8
commit 1bab7c22d7
3 changed files with 28 additions and 5 deletions

View File

@@ -118,3 +118,7 @@ export function activateAgentAsset(assetId, options = {}) {
export function fetchAgentRuns(params = {}) {
return apiRequest(`/agent-runs${buildQuery(params)}`)
}
export function fetchAgentRunDetail(runId) {
return apiRequest(`/agent-runs/${encodeURIComponent(runId)}`)
}

View File

@@ -0,0 +1,17 @@
import { apiRequest } from './api.js'
export function fetchSystemLogFiles() {
return apiRequest('/system-logs/files')
}
export function fetchSystemLogTail(fileName, lines = 300) {
return apiRequest(`/system-logs/files/${encodeURIComponent(fileName)}?lines=${encodeURIComponent(lines)}`)
}
export function fetchSystemLogEntries(limit = 300) {
return apiRequest(`/system-logs/entries?limit=${encodeURIComponent(limit)}`)
}
export function fetchSystemLogEntry(entryId) {
return apiRequest(`/system-logs/entries/${encodeURIComponent(entryId)}`)
}