Skip to content

Commit 1852cea

Browse files
committed
Web UI: Sort workers, don't always show subtabs
1 parent aba6f6f commit 1852cea

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/resque/server/views/queues.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<% @subtabs = resque.queues unless partial? %>
1+
<% @subtabs = resque.queues unless partial? || params[:id].nil? %>
22

33
<% if queue = params[:id] %>
44

lib/resque/server/views/workers.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,15 +85,15 @@
8585
<%=poll%>
8686

8787
<% else %>
88-
88+
<% @subtabs = [] %>
8989
<h1 class='wi'>Workers</h1>
9090
<p class='intro'>The hostnames below all have registered workers. Select a hostname to view its workers, or "all" to see all workers.</p>
9191
<table class='queues'>
9292
<tr>
9393
<th>Hostname</th>
9494
<th>Workers</th>
9595
</tr>
96-
<% for hostname, workers in worker_hosts %>
96+
<% for hostname, workers in worker_hosts.sort_by { |h,w| h } %>
9797
<tr>
9898
<td class='queue'><a class="queue" href="<%= url "workers/#{hostname}" %>"><%= hostname %></a></td>
9999
<td class='size'><%= workers.size %></td>

0 commit comments

Comments
 (0)