aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2021-04-22 14:22:46 -0700
committerChris Lu <chris.lu@gmail.com>2021-04-22 14:22:48 -0700
commit11c120c040c82a2eecc6f7f5d23b83266e22eb5e (patch)
treeb70908a5742a016f291c6452408164cc251d85eb
parent6e5df901e478c9effd94bae2fa1de53138380d8b (diff)
downloadseaweedfs-11c120c040c82a2eecc6f7f5d23b83266e22eb5e.tar.xz
seaweedfs-11c120c040c82a2eecc6f7f5d23b83266e22eb5e.zip
master UI adds volume size limit
-rw-r--r--weed/server/master_server_handlers_ui.go12
-rw-r--r--weed/server/master_ui/templates.go10
2 files changed, 14 insertions, 8 deletions
diff --git a/weed/server/master_server_handlers_ui.go b/weed/server/master_server_handlers_ui.go
index 9cd58158b..3822c6113 100644
--- a/weed/server/master_server_handlers_ui.go
+++ b/weed/server/master_server_handlers_ui.go
@@ -14,17 +14,19 @@ func (ms *MasterServer) uiStatusHandler(w http.ResponseWriter, r *http.Request)
infos := make(map[string]interface{})
infos["Up Time"] = time.Now().Sub(startTime).String()
args := struct {
- Version string
- Topology interface{}
- RaftServer raft.Server
- Stats map[string]interface{}
- Counters *stats.ServerStats
+ Version string
+ Topology interface{}
+ RaftServer raft.Server
+ Stats map[string]interface{}
+ Counters *stats.ServerStats
+ VolumeSizeLimitMB uint
}{
util.Version(),
ms.Topo.ToMap(),
ms.Topo.RaftServer,
infos,
serverStats,
+ ms.option.VolumeSizeLimitMB,
}
ui.StatusTpl.Execute(w, args)
}
diff --git a/weed/server/master_ui/templates.go b/weed/server/master_ui/templates.go
index 60873f6aa..31b6353e9 100644
--- a/weed/server/master_ui/templates.go
+++ b/weed/server/master_ui/templates.go
@@ -22,9 +22,13 @@ var StatusTpl = template.Must(template.New("status").Parse(`<!DOCTYPE html>
<div class="row">
<div class="col-sm-6">
<h2>Cluster status</h2>
- <table class="table">
+ <table class="table table-condensed table-striped">
<tbody>
<tr>
+ <th>Volume Size Limit</th>
+ <td>{{ .VolumeSizeLimitMB }}MB</td>
+ </tr>
+ <tr>
<th>Free</th>
<td>{{ .Topology.Free }}</td>
</tr>
@@ -38,8 +42,8 @@ var StatusTpl = template.Must(template.New("status").Parse(`<!DOCTYPE html>
<td><a href="http://{{ .Leader }}">{{ .Leader }}</a></td>
</tr>
<tr>
- <td class="col-sm-2 field-label"><label>Other Masters:</label></td>
- <td class="col-sm-10"><ul class="list-unstyled">
+ <th>Other Masters</th>
+ <td class="col-sm-5"><ul class="list-unstyled">
{{ range $k, $p := .Peers }}
<li><a href="http://{{ $p.Name }}/ui/index.html">{{ $p.Name }}</a></li>
{{ end }}