This commit is contained in:
zxr
2026-03-25 22:05:50 +08:00
parent 3e7758efdd
commit 7e46f8b4e1
18 changed files with 497 additions and 135 deletions

View File

@@ -72,7 +72,9 @@ export const createRule = (data: {
threshold?: number;
compare_op?: string;
duration?: number;
baseline_config?: string;
labels?: string;
annotations?: string;
}) => request.post("/Alert/v1/rule/create", data);
/** 更新 告警规则 */
@@ -88,7 +90,9 @@ export const updateRule = (data: {
threshold?: number;
compare_op?: string;
duration?: number;
baseline_config?: string;
labels?: string;
annotations?: string;
}) => request.post("/Alert/v1/rule/update", data);
/** 删除 告警规则 */

View File

@@ -33,7 +33,8 @@ export const createAlertProcess = (data: {
escalate_to?: string;
root_cause?: string;
solution?: string;
metadata?: Record<string, any>;
// 按后端约定metadata 为 JSON 字符串,例如 "{}"
metadata?: string;
}) => request.post("/Alert/v1/process/create", data);
/** 获取 告警处理记录列表 */