Commit f377f90c authored by ale's avatar ale

Sort the node list in the debug status page

parent 544160a1
Pipeline #6059 passed with stages
in 5 minutes and 32 seconds
......@@ -37,6 +37,14 @@ func newMountStatus(m *pb.Mount, nodes []*nodeInfo, icecastMounts map[string]*pb
}
}
type statusList []*pb.Status
func (l statusList) Len() int { return len(l) }
func (l statusList) Swap(i, j int) { l[i], l[j] = l[j], l[i] }
func (l statusList) Less(i, j int) bool {
return l[i].Name < l[j].Name
}
type mountStatusList []*mountStatus
func (l mountStatusList) Len() int { return len(l) }
......@@ -100,6 +108,7 @@ func serveStatusPage(n *Node, w http.ResponseWriter, r *http.Request, tpl *templ
}
}
}
sort.Sort(statusList(statuses))
ms := mountsToStatus(n.mounts.GetMounts(), nodes, exemplary)
ctx := struct {
......
......@@ -70,7 +70,7 @@
<div class="row">
<p>
<small>
Click on a stream to listen to it.<br>
Click on a stream to listen to it.
Hover on a stream to see more details.
</small>
</p>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment