feat(aiops): 长窗口(>1h)分析必须指定应用

全命名空间 6h/24h 聚合数据量过大会拖垮 Loki:前端时间范围旁新增应用范围选择器
(labelValues 候选),>1h 未选应用禁用开始分析并提示;后端同样强制 400(闸门在服务端);
信号采集选择器按 app 收窄后 histogram/stats 从全量变为单应用流,秒级返回。
This commit is contained in:
opsx committed 2026-10-31 22:51:55 +08:00
1 parent 1610988c2e
commit c090ba0564
7 files changed
+66 -14

No files matched your search

+1 -1
View File
@@ -84,7 +84,7 @@ export const aiApi = {
saveConfig: (data: Partial<AIConfig>) => http.put<{ config: AIConfig }>('/ai/config', data),
testConfig: (data: { baseUrl?: string; model?: string; apiKey?: string }) =>
http.post<{ reply: string; model: string }>('/ai/config/test', data, { timeout: 45000 }),
analyze: (data: { sourceId: number; start: number; end: number; question?: string }) =>
analyze: (data: { sourceId: number; start: number; end: number; question?: string; app?: string }) =>
http.post<AIAnalyzeResponse>('/ai/analyze', data, { timeout: 180000 }),
runs: (page: number, pageSize: number) =>
http.get<{ list: AIRun[]; total: number; page: number; pageSize: number }>(