Sha256: 18c1bfd81be577d3ec977e7aeacd3302c83342a666b8d4c830d4158cbfb9778b

Contents?: true

Size: 1.79 KB

Versions: 2

Compression:

Stored size: 1.79 KB

Contents

<% statuses = resque.kalashnikov_stats %>

<h1 class='wi'>Kalashnikov</h1>
<p class='intro'>The list below contains statistics of Kalashnikov</p>
<table>
  <tr>
    <th>HTTP code</th>
    <th>Jobs done</th>
  </tr>
  <% statuses.sort.each do |status, count| %>
  <tr>
    <td class='status'><%= status %></td>
    <td class='size'><%= count %></td>
  </tr>
  <% end %>
</table>

<% resque.kalashnikov_misfire_codes.each do |misfire_stats_key| %>
<% status = misfire_stats_key.split(':').last %>
<h1 class='wi'>Error code: <%= status %></h1>
<table>
  <tr>
    <th>Job</th>
    <th>HTTP</th>
    <th>URL</th>
    <th>Options</th>
    <th>Retries</th>
    <th>Retry</th>
    <th>Reset retries</th>
  </tr>
  <% resque.kalashnikov_misfire_stats(misfire_stats_key).sort_by { |k,v| v } .reverse.each do |misfire_json, count| %>
  <tr>
    <% job, payload = resque.decode misfire_json %>
    <% url, http_method, options = payload %>
    <td class='job'><%= job %></td>
    <td class='http_method'><%= http_method.upcase %></td>
    <td class='url'><a href="<%= url %>"><%= url %></a></td>
    <td class='options'><%= options %></td>
    <td class='size'><%= count %></td>
    <td class='url'>
      <form method="POST" action="<%= u %Q{kalashnikov/retry/#{status}} %>" >
        <input name="request_key" type="hidden" value="<%= Base64.encode64 misfire_json %>" />
        <input type='submit' name='' value='Retry' />
      </form>
     </td>
    <td class='url'>
      <form method="POST" action="<%= u %Q{kalashnikov/reset/#{status}} %>" >
        <input name="request_key" type="hidden" value="<%= Base64.encode64 misfire_json %>" />
        <input type='submit' name='' value='Reset' />
      </form>
     </td>
  </tr>
  <% end %>
</table>
<% end %>

<a href="<%= u %Q{kalashnikov/reset_stats} %>">Reset Kalashnikov statistics</a>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
resque-kalashnikov-1.1.1 lib/resque_kalashnikov/server/views/catridges.erb
resque-kalashnikov-1.1.0 lib/resque_kalashnikov/server/views/catridges.erb