You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
654 B

10 years ago
10 years ago
  1. package weed_server
  2. import (
  3. "net/http"
  4. "github.com/chrislusf/raft"
  5. ui "github.com/chrislusf/seaweedfs/weed/server/master_ui"
  6. "github.com/chrislusf/seaweedfs/weed/stats"
  7. "github.com/chrislusf/seaweedfs/weed/util"
  8. )
  9. func (ms *MasterServer) uiStatusHandler(w http.ResponseWriter, r *http.Request) {
  10. infos := make(map[string]interface{})
  11. infos["Version"] = util.VERSION
  12. args := struct {
  13. Version string
  14. Topology interface{}
  15. RaftServer raft.Server
  16. Stats map[string]interface{}
  17. Counters *stats.ServerStats
  18. }{
  19. util.VERSION,
  20. ms.Topo.ToMap(),
  21. ms.Topo.RaftServer,
  22. infos,
  23. serverStats,
  24. }
  25. ui.StatusTpl.Execute(w, args)
  26. }