mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-01-18 06:30:07 +08:00
[ui] add ui to status page
This commit is contained in:
parent
b113760cf4
commit
f56339f38d
@ -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,
|
||||
|
@ -29,6 +29,10 @@ var StatusTpl = template.Must(template.New("status").Parse(`<!DOCTYPE html>
|
||||
<th>Max</th>
|
||||
<td>{{ .Topology.Max }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Leader</th>
|
||||
<td><a href="http://{{ .Leader }}">{{ .Leader }}</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="col-sm-2 field-label"><label>Peers:</label></td>
|
||||
<td class="col-sm-10"><ul class="list-unstyled">
|
||||
|
Loading…
Reference in New Issue
Block a user