package router import ( "go-admin/app/observe/apis" "github.com/gin-gonic/gin" ) func init() { // routerCheckRole = append(routerCheckRole, registerServiceGraphRouter) routerNoCheckRole = append(routerNoCheckRole, registerStatisticsRouter) } func registerStatisticsRouter(v1 *gin.RouterGroup) { api := apis.Stats{} // r := v1.Group("/servicegraph").Use(authMiddleware.MiddlewareFunc()).Use(middleware.AuthCheckRole()).Use(actions.PermissionAction()) r := v1.Group("/stats") { r.GET("/run-cache", api.SetPlatformStats) r.GET("", api.GetPlatformStats) r.GET("/app/apdex/:alias", api.GetApdexModelByAlias) r.POST("/app/apdex/:alias", api.SetApdexModelArgsByAlias) } }