From fa44a6d3707885899e3f146d54f2a1936a890483 Mon Sep 17 00:00:00 2001 From: shy Date: Mon, 16 Oct 2023 19:55:32 +0800 Subject: [PATCH] add some --- base/web/route.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/base/web/route.go b/base/web/route.go index bc8db1f2..51aff1e4 100644 --- a/base/web/route.go +++ b/base/web/route.go @@ -132,7 +132,9 @@ func init() { m.OptionFields("") list := m.CmdMap(SPACE, mdb.NAME) stat := map[string]int{} + size := 0 m.Table(func(value ice.Maps) { + size += kit.Int(kit.Select("", kit.Split(value[nfs.SIZE], nfs.PS), 1)) if _, ok := list[value[SPACE]]; ok { m.Push(mdb.STATUS, ONLINE) stat[ONLINE]++ @@ -141,7 +143,7 @@ func init() { stat[OFFLINE]++ } }) - m.Sort("status,space", ice.STR_R, ice.STR).StatusTimeCount(stat) + m.Sort("status,space", ice.STR_R, ice.STR).StatusTimeCount(stat, nfs.SIZE, kit.FmtSize(size)) m.Option(ice.MSG_ACTION, "") } }},