Skip to content

Commit 7356bf6

Browse files
committed
add the subscription key to the table.
1 parent d05afd8 commit 7356bf6

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

lib/resque_bus/server/views/bus.erb

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ else
4444
class_name = sub.class_name
4545
queue = sub.queue_name
4646
filters = sub.matcher.filters
47+
sub_key = sub.key
4748

4849
if filters["bus_event_type"]
4950
event = filters["bus_event_type"]
@@ -52,13 +53,13 @@ else
5253
end
5354

5455
app_hash[app_key] ||= []
55-
app_hash[app_key] << [event, class_name, queue, filters]
56+
app_hash[app_key] << [sub_key, event, class_name, queue, filters]
5657

5758
class_hash[class_name] ||= []
58-
class_hash[class_name] << [app_key, event, queue, filters]
59+
class_hash[class_name] << [app_key, sub_key, event, queue, filters]
5960

6061
event_hash[event] ||= []
61-
event_hash[event] << [app_key, class_name, queue, filters]
62+
event_hash[event] << [app_key, sub_key, class_name, queue, filters]
6263
end
6364
end
6465

@@ -81,8 +82,8 @@ else
8182
if !val
8283
out = "<td>&nbsp;</td><td>&nbsp;</td>"
8384
else
84-
one, two, queue, filters = val
85-
out = "<td>#{h(one)}</td><td>#{h(two)}</td><td><a href='#{u("queues/#{queue}")}'>#{h(queue)}</a></td>"
85+
one, two, three, queue, filters = val
86+
out = "<td>#{h(one)}</td><td>#{h(two)}</td><td>#{h(three)}</td><td><a href='#{u("queues/#{queue}")}'>#{h(queue)}</a></td>"
8687
out << "<td>#{h(::QueueBus::Util.encode(filters).gsub(/\"bus_special_value_(\w+)\"/){ "(#{$1})" }).gsub(" ", "&nbsp;").gsub('&quot;,&quot;', '&quot;, &quot;')}</td>"
8788
end
8889

@@ -138,6 +139,7 @@ else
138139
<table class='queues'>
139140
<tr>
140141
<th>App Key</th>
142+
<th>Subscription Key</th>
141143
<th>Event Type</th>
142144
<th>Class Name</th>
143145
<th>Queue</th>
@@ -155,6 +157,7 @@ else
155157
<tr>
156158
<th>Event Type</th>
157159
<th>App Key</th>
160+
<th>Subscription Key</th>
158161
<th>Class Name</th>
159162
<th>Queue</th>
160163
<th>Filters</th>
@@ -172,6 +175,7 @@ else
172175
<tr>
173176
<th>Class Name</th>
174177
<th>App Key</th>
178+
<th>Subscription Key</th>
175179
<th>Event Type</th>
176180
<th>Queue</th>
177181
<th>Filters</th>

0 commit comments

Comments
 (0)