feat(k8s): M12 事件聚合 + 告警联动 — EventsPage 聚合看板
- 后端: 新增 GetEventsSummary handler — 按 Reason/Namespace/Kind 三维度聚合 + 时间窗口过滤 - 后端: 注册 GET /:clusterCode/events/summary 路由 - 前端: EventsPage 完整重写(~480行) — 概览卡片 + 三维度柱状图(recharts) + 图表联动过滤 + 最新告警面板 + 可展开事件行 + 时间窗口选择器 - 前端: api.ts 新增 getEventsSummary 方法 - 验证: API 返回完整聚合数据(total=3, warning_count=613, BackOff top reason), SPA 200, TS零错误, Vite构建成功
This commit is contained in:
1 parent
e76061661b
commit
7192f58b72
7 files changed
+569
-43
No files matched your search
@@ -484,6 +484,12 @@ export const kubernetesApi = {
|
||||
if (type) params.type = type;
|
||||
return http.get(`/kubernetes/${clusterCode}/events`, params);
|
||||
},
|
||||
getEventsSummary: async (clusterCode: string, namespace?: string, hours?: number) => {
|
||||
const params: any = {};
|
||||
if (namespace) params.namespace = namespace;
|
||||
if (hours) params.hours = hours;
|
||||
return http.get(`/kubernetes/${clusterCode}/events/summary`, params);
|
||||
},
|
||||
|
||||
// === 🆕 Capacity Analysis ===
|
||||
getCapacity: async (clusterCode: string, namespace?: string) => {
|
||||
|
||||
Reference in new issue
Block a user