feat: 网络双线图+告警联系人/联系组+Agent v2.0.0 + 一键报警阈值

- HostMonitor: 网络改为双线图 rx/tx 网卡带宽吞吐(双Area线), 移除单rx图
- Agent: 默认版本号从 dev 改为 v2.0.0, 重建二进制 5.2MB
- 告警中心: 新增报警联系人/报警联系组 Tab, ContactDialog/ContactGroupDialog
- 后端: AlertContact/AlertContactGroup 模型+CRUD, monitor_alert_contacts/groups 表
- 路由: /alerts/contacts + /alerts/contact-groups 8个REST端点
- 一键报警: 更新描述为6条规则(含TCP+进程), 切换到 /alerts/quick-setup
- 测试规则: 内存>10% 触发告警已创建, 飞书通知验证通过
This commit is contained in:
attacker committed 2026-06-24 08:47:40 +00:00
1 parent 5333f6f04a
commit e1cfbaf45e
11 files changed
+810 -16

No files matched your search

+26
View File
@@ -576,6 +576,32 @@ export const alertApi = {
testNotifyChannel: async (id: number | string) => {
return http.post(`/alerts/notify-channels/${id}/test`);
},
// 报警联系人
getContacts: async () => {
return http.get('/alerts/contacts');
},
createContact: async (data: any) => {
return http.post('/alerts/contacts', data);
},
updateContact: async (id: number | string, data: any) => {
return http.put(`/alerts/contacts/${id}`, data);
},
deleteContact: async (id: number | string) => {
return http.delete(`/alerts/contacts/${id}`);
},
// 报警联系组
getContactGroups: async () => {
return http.get('/alerts/contact-groups');
},
createContactGroup: async (data: any) => {
return http.post('/alerts/contact-groups', data);
},
updateContactGroup: async (id: number | string, data: any) => {
return http.put(`/alerts/contact-groups/${id}`, data);
},
deleteContactGroup: async (id: number | string) => {
return http.delete(`/alerts/contact-groups/${id}`);
},
};
// ==================== 流水线 API ====================