feat: 迁移预警规则管理和历史分类查询

This commit is contained in:
Yvan
2026-11-03 20:19:26 +08:00
parent cd42a1d3f0
commit 7203c34409
31 changed files with 1264 additions and 15 deletions
+17
View File
@@ -0,0 +1,17 @@
package router
import (
"github.com/gin-gonic/gin"
"kra/internal/server/handler"
)
func RegisterAlertRule(private *gin.RouterGroup, h *handler.AlertRule) {
g := private.Group("/sw/alertRule")
g.GET("/list", h.List)
g.GET("/ruleTypes", h.Types)
g.GET("/:id", h.Find)
g.POST("/add", h.Save)
g.PUT("/edit", h.Save)
g.DELETE("/:id", h.Delete)
g.PUT("/toggle/:id", h.Toggle)
}