实现忽略告警和取消忽略告警接口及功能

This commit is contained in:
2025-11-09 22:34:05 +08:00
parent 84fe20396b
commit b94aa6137c
11 changed files with 292 additions and 16 deletions

View File

@@ -187,6 +187,17 @@ func (a *API) setupRoutes() {
monitorGroup.GET("/notifications", a.monitorController.ListNotifications)
}
logger.Debug("数据监控相关接口注册成功 (需要认证和审计)")
// 告警相关路由组
alarmGroup := authGroup.Group("/alarm")
{
thresholdGroup := alarmGroup.Group("/thresholds")
{
thresholdGroup.POST("/:id/snooze", a.alarmController.SnoozeThresholdAlarm) // 忽略阈值告警
thresholdGroup.POST("/:id/cancel-snooze", a.alarmController.CancelSnoozeThresholdAlarm) // 取消忽略阈值告警
}
}
logger.Debug("告警相关接口注册成功 (需要认证和审计)")
}
logger.Debug("所有接口注册成功")