style: 监控信息接口
This commit is contained in:
1 parent
1b1c15995d
commit
cf1dbf4a0e
2 files changed
+10
-16
No files matched your search
@@ -24,12 +24,13 @@ type SystemInfoController struct {
|
||||
//
|
||||
// GET /
|
||||
func (s *SystemInfoController) Info(c *gin.Context) {
|
||||
c.JSON(200, result.OkData(map[string]any{
|
||||
data := map[string]any{
|
||||
"cpu": s.systemInfogService.CPUInfo(),
|
||||
"memory": s.systemInfogService.MemoryInfo(),
|
||||
"network": s.systemInfogService.NetworkInfo(),
|
||||
"time": s.systemInfogService.TimeInfo(),
|
||||
"system": s.systemInfogService.SystemInfo(),
|
||||
"disk": s.systemInfogService.DiskInfo(),
|
||||
}))
|
||||
}
|
||||
c.JSON(200, result.OkData(data))
|
||||
}
|
||||
Reference in new issue
Block a user