crond_stats.go 686 B

123456789101112131415161718192021222324
  1. package router
  2. import (
  3. "go-admin/app/observe/apis"
  4. "github.com/gin-gonic/gin"
  5. )
  6. func init() {
  7. // routerCheckRole = append(routerCheckRole, registerServiceGraphRouter)
  8. routerNoCheckRole = append(routerNoCheckRole, registerStatisticsRouter)
  9. }
  10. func registerStatisticsRouter(v1 *gin.RouterGroup) {
  11. api := apis.Stats{}
  12. // r := v1.Group("/servicegraph").Use(authMiddleware.MiddlewareFunc()).Use(middleware.AuthCheckRole()).Use(actions.PermissionAction())
  13. r := v1.Group("/stats")
  14. {
  15. r.GET("/run-cache", api.SetPlatformStats)
  16. r.GET("", api.GetPlatformStats)
  17. r.GET("/app/apdex/:alias", api.GetApdexModelByAlias)
  18. r.POST("/app/apdex/:alias", api.SetApdexModelArgsByAlias)
  19. }
  20. }