Skip to content

Commit

Permalink
add the subscription key to the table.
Browse files Browse the repository at this point in the history
  • Loading branch information
bleonard committed Jul 9, 2019
1 parent d05afd8 commit 7356bf6
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions lib/resque_bus/server/views/bus.erb
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ else
class_name = sub.class_name
queue = sub.queue_name
filters = sub.matcher.filters
sub_key = sub.key

if filters["bus_event_type"]
event = filters["bus_event_type"]
Expand All @@ -52,13 +53,13 @@ else
end

app_hash[app_key] ||= []
app_hash[app_key] << [event, class_name, queue, filters]
app_hash[app_key] << [sub_key, event, class_name, queue, filters]

class_hash[class_name] ||= []
class_hash[class_name] << [app_key, event, queue, filters]
class_hash[class_name] << [app_key, sub_key, event, queue, filters]

event_hash[event] ||= []
event_hash[event] << [app_key, class_name, queue, filters]
event_hash[event] << [app_key, sub_key, class_name, queue, filters]
end
end

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

Expand Down Expand Up @@ -138,6 +139,7 @@ else
<table class='queues'>
<tr>
<th>App Key</th>
<th>Subscription Key</th>
<th>Event Type</th>
<th>Class Name</th>
<th>Queue</th>
Expand All @@ -155,6 +157,7 @@ else
<tr>
<th>Event Type</th>
<th>App Key</th>
<th>Subscription Key</th>
<th>Class Name</th>
<th>Queue</th>
<th>Filters</th>
Expand All @@ -172,6 +175,7 @@ else
<tr>
<th>Class Name</th>
<th>App Key</th>
<th>Subscription Key</th>
<th>Event Type</th>
<th>Queue</th>
<th>Filters</th>
Expand Down

0 comments on commit 7356bf6

Please sign in to comment.