<% app_hash = {} class_hash = {} event_hash = {} # collect each differently ::QueueBus::Application.all.each do |app| app_key = app.app_key app_hash[app_key] ||= [] app.event_display_tuples.each do |tuple| class_name, queue, filters = tuple if filters["bus_event_type"] event = filters["bus_event_type"] else event = "see filter" end app_hash[app_key] << [event, class_name, queue, filters] class_hash[class_name] ||= [] class_hash[class_name] << [app_key, event, queue, filters] event_hash[event] ||= [] event_hash[event] << [app_key, class_name, queue, filters] end end # sort each list item by secondary label class_hash.each do |_, array| array.sort!{ |a,b| a.first <=> b.first } end event_hash.each do |_, array| array.sort!{ |a,b| a.first <=> b.first } end # helper to display either def display_row(name, val, button=nil, first=false) form = "" if button text, url = button form = "
" end if !val out = "  " else one, two, queue, filters = val out = "#{h(one)}#{h(two)}#{h(queue)}" out << "#{h(::QueueBus::Util.encode(filters).gsub(/\"bus_special_value_(\w+)\"/){ "(#{$1})" }).gsub(" ", " ").gsub('","', '", "')}" end if first "#{h(name)}#{form}#{out}\n" else " #{out}\n" end end def output_hash(hash, action=nil) out = "" hash.keys.sort.each do |item| display = hash[item] first = display.shift out << display_row(item, first, action, true) display.each do |val| out << display_row(item, val, action) end end out end %>

Applications

The apps below have registered the given classes and queues.

<%= output_hash(app_hash, ["Unsubscribe", "bus/unsubscribe"]) %>
App Key Event Type Class Name Queue Filters

 

Events

The events below have been registered by the given applications and queues.

<%= output_hash(event_hash, false) %>
Event Type App Key Class Name Queue Filters

 

Classes

The classes below have been registered by the given applications and queues.

<%= output_hash(class_hash, false) %>
Class Name App Key Event Type Queue Filters