mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
master UI adds volume size limit
This commit is contained in:
parent
6e5df901e4
commit
11c120c040
|
@ -14,17 +14,19 @@ func (ms *MasterServer) uiStatusHandler(w http.ResponseWriter, r *http.Request)
|
||||||
infos := make(map[string]interface{})
|
infos := make(map[string]interface{})
|
||||||
infos["Up Time"] = time.Now().Sub(startTime).String()
|
infos["Up Time"] = time.Now().Sub(startTime).String()
|
||||||
args := struct {
|
args := struct {
|
||||||
Version string
|
Version string
|
||||||
Topology interface{}
|
Topology interface{}
|
||||||
RaftServer raft.Server
|
RaftServer raft.Server
|
||||||
Stats map[string]interface{}
|
Stats map[string]interface{}
|
||||||
Counters *stats.ServerStats
|
Counters *stats.ServerStats
|
||||||
|
VolumeSizeLimitMB uint
|
||||||
}{
|
}{
|
||||||
util.Version(),
|
util.Version(),
|
||||||
ms.Topo.ToMap(),
|
ms.Topo.ToMap(),
|
||||||
ms.Topo.RaftServer,
|
ms.Topo.RaftServer,
|
||||||
infos,
|
infos,
|
||||||
serverStats,
|
serverStats,
|
||||||
|
ms.option.VolumeSizeLimitMB,
|
||||||
}
|
}
|
||||||
ui.StatusTpl.Execute(w, args)
|
ui.StatusTpl.Execute(w, args)
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,8 +22,12 @@ var StatusTpl = template.Must(template.New("status").Parse(`<!DOCTYPE html>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<h2>Cluster status</h2>
|
<h2>Cluster status</h2>
|
||||||
<table class="table">
|
<table class="table table-condensed table-striped">
|
||||||
<tbody>
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th>Volume Size Limit</th>
|
||||||
|
<td>{{ .VolumeSizeLimitMB }}MB</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Free</th>
|
<th>Free</th>
|
||||||
<td>{{ .Topology.Free }}</td>
|
<td>{{ .Topology.Free }}</td>
|
||||||
|
@ -38,8 +42,8 @@ var StatusTpl = template.Must(template.New("status").Parse(`<!DOCTYPE html>
|
||||||
<td><a href="http://{{ .Leader }}">{{ .Leader }}</a></td>
|
<td><a href="http://{{ .Leader }}">{{ .Leader }}</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="col-sm-2 field-label"><label>Other Masters:</label></td>
|
<th>Other Masters</th>
|
||||||
<td class="col-sm-10"><ul class="list-unstyled">
|
<td class="col-sm-5"><ul class="list-unstyled">
|
||||||
{{ range $k, $p := .Peers }}
|
{{ range $k, $p := .Peers }}
|
||||||
<li><a href="http://{{ $p.Name }}/ui/index.html">{{ $p.Name }}</a></li>
|
<li><a href="http://{{ $p.Name }}/ui/index.html">{{ $p.Name }}</a></li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
Loading…
Reference in a new issue