mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-12 10:55:51 +02:00
enhance: analytic init and reactive style
This commit is contained in:
parent
38aa1d8bfc
commit
d6b68b807f
3 changed files with 62 additions and 19 deletions
|
@ -183,6 +183,8 @@ func GetAnalyticInit(c *gin.Context) {
|
|||
}
|
||||
hostInfo, _ := host.Info()
|
||||
|
||||
loadAvg, _ := load.Avg()
|
||||
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
"host": hostInfo,
|
||||
"cpu": gin.H{
|
||||
|
@ -199,7 +201,8 @@ func GetAnalyticInit(c *gin.Context) {
|
|||
"writes": analytic.DiskWriteRecord,
|
||||
"reads": analytic.DiskReadRecord,
|
||||
},
|
||||
"memory": memory,
|
||||
"disk": diskStat,
|
||||
"memory": memory,
|
||||
"disk": diskStat,
|
||||
"loadavg": loadAvg,
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue