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.

26 lines
541 B

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