File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -5,10 +5,8 @@ import (
55
66 "github.com/0xJacky/Nginx-UI/internal/analytic"
77 "github.com/0xJacky/Nginx-UI/internal/version"
8- "github.com/dustin/go-humanize"
98 "github.com/gin-gonic/gin"
109 "github.com/shirou/gopsutil/v4/cpu"
11- "github.com/shirou/gopsutil/v4/disk"
1210 "github.com/uozi-tech/cosy"
1311)
1412
@@ -28,13 +26,13 @@ func GetCurrentNode(c *gin.Context) {
2826 cpuInfo , _ := cpu .Info ()
2927 memory , _ := analytic .GetMemoryStat ()
3028 ver := version .GetVersionInfo ()
31- diskUsage , _ := disk . Usage ( "." )
29+ diskUsage , _ := analytic . GetDiskStat ( )
3230
3331 nodeInfo := analytic.NodeInfo {
3432 NodeRuntimeInfo : runtimeInfo ,
3533 CPUNum : len (cpuInfo ),
3634 MemoryTotal : memory .Total ,
37- DiskTotal : humanize . Bytes ( diskUsage .Total ) ,
35+ DiskTotal : diskUsage .Total ,
3836 Version : ver .Version ,
3937 }
4038
You can’t perform that action at this time.
0 commit comments