2026-04-15 17:12:30 +08:00
|
|
|
package dashboard
|
2026-04-09 10:01:23 +08:00
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"cs-agent/internal/services"
|
|
|
|
|
|
2026-05-23 22:10:20 +08:00
|
|
|
"cs-agent/internal/pkg/httpx/params"
|
|
|
|
|
"github.com/gin-gonic/gin"
|
2026-04-09 10:01:23 +08:00
|
|
|
"github.com/mlogclub/simple/web"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
type DashboardController struct {
|
2026-05-23 22:10:20 +08:00
|
|
|
Ctx *gin.Context
|
2026-04-09 10:01:23 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *DashboardController) GetOverview() *web.JsonResult {
|
|
|
|
|
rangeValue, _ := params.Get(c.Ctx, "range")
|
|
|
|
|
return web.JsonData(services.DashboardService.GetOverview(rangeValue))
|
|
|
|
|
}
|