tweaking ui

This commit is contained in:
chrislusf
2015-03-22 12:50:04 -07:00
parent 23012deccf
commit 78bc7b393f
9 changed files with 93 additions and 13 deletions

View File

@@ -3,6 +3,7 @@ package weed_server
import (
"net/http"
"path/filepath"
"time"
"github.com/chrislusf/weed-fs/go/stats"
"github.com/chrislusf/weed-fs/go/util"
@@ -11,7 +12,7 @@ import (
func (vs *VolumeServer) uiStatusHandler(w http.ResponseWriter, r *http.Request) {
infos := make(map[string]interface{})
infos["Version"] = util.VERSION
infos["Up Time"] = time.Now().Sub(startTime).String()
var ds []*stats.DiskStatus
for _, loc := range vs.store.Locations {
if dir, e := filepath.Abs(loc.Directory); e == nil {
@@ -24,12 +25,14 @@ func (vs *VolumeServer) uiStatusHandler(w http.ResponseWriter, r *http.Request)
Volumes interface{}
DiskStatuses interface{}
Stats interface{}
Counters *stats.ServerStats
}{
util.VERSION,
vs.masterNode,
vs.store.Status(),
ds,
infos,
serverStats,
}
ui.StatusTpl.Execute(w, args)
}