Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
leon.chen committed Jan 29, 2021
1 parent 151e351 commit 4084bf5
Showing 1 changed file with 19 additions and 16 deletions.
35 changes: 19 additions & 16 deletions backend/routers/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,22 +63,25 @@ func InitRouter() {
api.DELETE("/snapshot/delete/:id", controllers.LokiSnapshotDelete)
api.GET("/snapshot/detail/:id", controllers.LokiSnapshotDetail)

api.GET("/rule", controllers.LokiRuleList)
api.POST("/rule/create", controllers.LokiRuleCreate)
api.POST("/rule/update/:id", controllers.LokiRuleUpdate)
api.DELETE("/rule/delete/:id", controllers.LokiRuleDelete)
api.GET("/rule/download", controllers.LokiRuleDownload)

api.GET("/group", controllers.LokiUserGroupList)
api.POST("/group/create", controllers.LokiUserGroupCreate)
api.DELETE("/group/delete/:id", controllers.LokiUserGroupDelete)
api.POST("/group/update/:id", controllers.LokiUserGroupUpdate)
api.POST("/group/join", controllers.LokiUserGroupJoin)
api.POST("/group/leave", controllers.LokiUserGroupLeave)

api.POST("/event/archive", controllers.LokiEventArchive)
api.GET("/event", controllers.LokiEventList)
api.GET("/event/details/:id", controllers.LokiEventDetailList)
alertEnabled, _ := runtime.Cfg.Bool("global", "alert_enabled")
if alertEnabled {
api.GET("/rule", controllers.LokiRuleList)
api.POST("/rule/create", controllers.LokiRuleCreate)
api.POST("/rule/update/:id", controllers.LokiRuleUpdate)
api.DELETE("/rule/delete/:id", controllers.LokiRuleDelete)
api.GET("/rule/download", controllers.LokiRuleDownload)

api.GET("/group", controllers.LokiUserGroupList)
api.POST("/group/create", controllers.LokiUserGroupCreate)
api.DELETE("/group/delete/:id", controllers.LokiUserGroupDelete)
api.POST("/group/update/:id", controllers.LokiUserGroupUpdate)
api.POST("/group/join", controllers.LokiUserGroupJoin)
api.POST("/group/leave", controllers.LokiUserGroupLeave)

api.POST("/event/archive", controllers.LokiEventArchive)
api.GET("/event", controllers.LokiEventList)
api.GET("/event/details/:id", controllers.LokiEventDetailList)
}

api.GET("/user", controllers.LokiUserList)

Expand Down

0 comments on commit 4084bf5

Please sign in to comment.