mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/1Panel-dev/1Panel.git
synced 2026-09-20 08:03:55 +08:00
22 lines
650 B
Go
22 lines
650 B
Go
package router
|
|
|
|
import (
|
|
v2 "github.com/1Panel-dev/1Panel/core/app/api/v2"
|
|
"github.com/1Panel-dev/1Panel/core/middleware"
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
type RuntimeDiagnosticsRouter struct{}
|
|
|
|
func (s *RuntimeDiagnosticsRouter) InitRouter(Router *gin.RouterGroup) {
|
|
diagnosticsRouter := Router.Group("hosts/diagnostics").
|
|
Use(middleware.SessionAuth()).
|
|
Use(middleware.PasswordExpired())
|
|
baseApi := v2.ApiGroupApp.BaseApi
|
|
{
|
|
diagnosticsRouter.GET("/summary", baseApi.LoadRuntimeDiagnosticsSummary)
|
|
diagnosticsRouter.GET("/goroutines", baseApi.LoadRuntimeGoroutines)
|
|
diagnosticsRouter.POST("/profiles", baseApi.CreateRuntimeProfile)
|
|
}
|
|
}
|