feat(web): CopilotAlert 告警组件 + 告警 API 扩展
- CopilotAlert: 分级告警列表,30秒轮询刷新,危急 banner - copilot.ts 新增 listAlerts 函数
This commit is contained in:
@@ -54,6 +54,10 @@ export function dismissInsight(id: string) {
|
||||
return client.post(`/copilot/insights/${id}/dismiss`);
|
||||
}
|
||||
|
||||
export function listAlerts(params?: { severity?: string; page?: number; page_size?: number }) {
|
||||
return listInsights({ insight_type: 'anomaly', ...params });
|
||||
}
|
||||
|
||||
export function listRules(params?: { page?: number; page_size?: number }) {
|
||||
return client.get<PaginatedResponse<Record<string, unknown>>>('/copilot/rules', { params });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user