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

Sort the node list in the debug status page

parent 544160a1
Branches
No related tags found
No related merge requests found
......@@ -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>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment