Browse Source

[ui] format peers

pull/114/head
chrislusf 10 years ago
parent
commit
b113760cf4
  1. 2
      go/weed/weed_server/master_server_handlers_ui.go
  2. 4
      go/weed/weed_server/master_ui/templates.go

2
go/weed/weed_server/master_server_handlers_ui.go

@ -15,7 +15,7 @@ func (ms *MasterServer) uiStatusHandler(w http.ResponseWriter, r *http.Request)
Version string Version string
Topology interface{} Topology interface{}
Peers interface{} Peers interface{}
Stats interface{}
Stats map[string]interface{}
Counters *stats.ServerStats Counters *stats.ServerStats
}{ }{
util.VERSION, util.VERSION,

4
go/weed/weed_server/master_ui/templates.go

@ -32,8 +32,8 @@ var StatusTpl = template.Must(template.New("status").Parse(`<!DOCTYPE html>
<tr> <tr>
<td class="col-sm-2 field-label"><label>Peers:</label></td> <td class="col-sm-2 field-label"><label>Peers:</label></td>
<td class="col-sm-10"><ul class="list-unstyled"> <td class="col-sm-10"><ul class="list-unstyled">
{{ range .Peers }}
<li><a href="https://{{ . }}">{{ . }}</a></li>
{{ range $k, $p := .Peers }}
<li><a href="{{ $p.ConnectionString }}">{{ $p.Name }}</a></li>
{{ end }} {{ end }}
</ul></td> </ul></td>
</tr> </tr>

Loading…
Cancel
Save