From f56339f38d145234dfec0b14161edd3eb23c6810 Mon Sep 17 00:00:00 2001 From: chrislusf Date: Tue, 24 Mar 2015 10:52:14 -0700 Subject: [PATCH] [ui] add ui to status page --- go/weed/weed_server/master_server_handlers_ui.go | 2 ++ go/weed/weed_server/master_ui/templates.go | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/go/weed/weed_server/master_server_handlers_ui.go b/go/weed/weed_server/master_server_handlers_ui.go index cdcae714e..3d96234bb 100644 --- a/go/weed/weed_server/master_server_handlers_ui.go +++ b/go/weed/weed_server/master_server_handlers_ui.go @@ -14,12 +14,14 @@ func (ms *MasterServer) uiStatusHandler(w http.ResponseWriter, r *http.Request) args := struct { Version string Topology interface{} + Leader string Peers interface{} Stats map[string]interface{} Counters *stats.ServerStats }{ util.VERSION, ms.Topo.ToMap(), + ms.Topo.RaftServer.Leader(), ms.Topo.RaftServer.Peers(), infos, serverStats, diff --git a/go/weed/weed_server/master_ui/templates.go b/go/weed/weed_server/master_ui/templates.go index 96b8bd5ce..fb297398b 100644 --- a/go/weed/weed_server/master_ui/templates.go +++ b/go/weed/weed_server/master_ui/templates.go @@ -29,6 +29,10 @@ var StatusTpl = template.Must(template.New("status").Parse(` Max {{ .Topology.Max }} + + Leader + {{ .Leader }} +