Sha256: 07a1bd15218eec4d38b3c36afb5bd9f01da1dd95775b6d4e9e3732579b516d19
Contents?: true
Size: 1.28 KB
Versions: 19
Compression:
Stored size: 1.28 KB
Contents
<% @subtabs = %w( resque mongo keys ) %> <% if params[:key] %> <%= partial :key_sets %> <% elsif params[:id] == "resque" %> <h1><%= resque %></h1> <table class='stats'> <% for key, value in resque.info.to_a.sort_by { |i| i[0].to_s } %> <tr> <th> <%= key %> </th> <td> <%= value %> </td> </tr> <% end %> </table> <% elsif params[:id] == 'mongo' %> <h1><%= resque.to_s %></h1> <table class='stats'> <% resque.mongo_stats.find.to_a.each do |hash| %> <tr> <th> <%= hash['stat'] %> </th> <td> <%= hash['value'].inspect %> </td> </tr> <% end %> </table> <h1>Mongo Database Health</h1> <table class='stats'> <% resque.mongo.stats.each_pair do |key, value| %> <tr> <th> <%= key %> </th> <td> <%= value %> </td> </tr> <% end %> </table> <% elsif params[:id] == 'keys' %> <h1>Collections in <%= resque.to_s %></h1> <table class='stats'> <tr> <th>collection</th> <th>size</th> </tr> <% for key in resque.keys.sort %> <tr> <th> <a href="<%=u "/stats/keys/#{key}" %>"><%= key %></a> </th> <td><%= resque.mongo[key].count %></td> </tr> <% end %> </table> <% else %> <% end %>
Version data entries
19 entries across 19 versions & 2 rubygems