实现任务11应的八个web接口
This commit is contained in:
@@ -197,6 +197,19 @@ func (a *API) setupRoutes() {
|
||||
thresholdGroup.POST("/:id/cancel-snooze", a.alarmController.CancelSnoozeThresholdAlarm) // 取消忽略阈值告警
|
||||
thresholdGroup.GET("/active-alarms", a.alarmController.ListActiveAlarms) // 获取活跃告警
|
||||
thresholdGroup.GET("/historical-alarms", a.alarmController.ListHistoricalAlarms) // 获取历史告警
|
||||
|
||||
// 设备阈值告警配置
|
||||
thresholdGroup.POST("/device", a.alarmController.CreateDeviceThresholdAlarm)
|
||||
thresholdGroup.GET("/device/:task_id", a.alarmController.GetDeviceThresholdAlarm)
|
||||
thresholdGroup.PUT("/device/:task_id", a.alarmController.UpdateDeviceThresholdAlarm)
|
||||
thresholdGroup.DELETE("/device/:task_id", a.alarmController.DeleteDeviceThresholdAlarm)
|
||||
|
||||
// 区域阈值告警配置
|
||||
thresholdGroup.POST("/area", a.alarmController.CreateAreaThresholdAlarm)
|
||||
thresholdGroup.GET("/area/:task_id", a.alarmController.GetAreaThresholdAlarm)
|
||||
thresholdGroup.PUT("/area/:task_id", a.alarmController.UpdateAreaThresholdAlarm)
|
||||
thresholdGroup.DELETE("/area/:task_id", a.alarmController.DeleteAreaThresholdAlarm)
|
||||
|
||||
}
|
||||
}
|
||||
logger.Debug("告警相关接口注册成功 (需要认证和审计)")
|
||||
|
||||
Reference in New Issue
Block a user