Skip to content
Snippets Groups Projects
Commit 4d52c146 authored by ale's avatar ale
Browse files

show number of partitions per target

parent bd080de3
Branches
No related tags found
No related merge requests found
......@@ -55,6 +55,7 @@ Versions:
<th>Host</th>
<th>Version</th>
<th>Stamp</th>
<th>#Part</th>
<th>#Items</th>
</tr>
</thead>
......@@ -62,9 +63,14 @@ Versions:
{{range $s := .GlobalStatus.Sort}}
<tr>
<td><a href="{{$s.Target | httpize}}/debug/part/{{.Name}}">{{$s.Target}}</a></td>
{{if $s.Err}}
<td colspan="4">{{$s.Err}}</td>
{{else}}
<td>{{$s.Version}}</td>
<td>{{$s.Stamp}}</td>
<td>{{$s.Partitions}}</td>
<td>{{$s.Total}}</td>
{{end}}
</tr>
{{end}}
</tbody>
......
......@@ -25,6 +25,10 @@ func (s PartitionStatus) Total() int {
return total
}
func (s PartitionStatus) Partitions() int {
return len(s.Counters)
}
type statusMap map[string]*PartitionStatus
func (m statusMap) AllVersions() []string {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment