Sha256: c93a7ba14b5d01e9522362621318afd42d74ce31579ac109f6b6e4319362c6e1

Contents?: true

Size: 1.46 KB

Versions: 1

Compression:

Stored size: 1.46 KB

Contents

<% size = Resque.redis.llen(Resque::Plugins::History::HISTORY_SET_NAME) %>
<% start = params[:start].to_i %>
<% history = Resque.redis.lrange(Resque::Plugins::History::HISTORY_SET_NAME, start, start + 20)%>

<h1 class='wi'>Job history</h1>

<% if size > 0 %>
  <form method="POST" action="<%=u 'history/clear'%>" class='clear-delayed'>
    <input type='submit' name='' value='Clear History' />
  </form>
<% end %>

<p class='intro'>Showing <%=start%> to <%= start + 20 %> of <b><%= size = Resque.redis.llen(Resque::Plugins::History::HISTORY_SET_NAME) %></b> jobs</p>
<div id="main">
  <%= partial :next_more, :start => params[:start].to_i, :size => size %>

  <table>
    <tr>
      <th>Job</th>
      <th>Arguments</th>
      <th>Time</th>
      <th>Execution</th>
    </tr>
    <% history.each do |history| %>
        <% j = JSON.parse(history) %>
        <tr class='<%= j["error"].nil? ? "" : "failure" %>' >
          <td class='queue'><%= j["class"] %></td>
          <td class='args'><%= j["args"] %></td>
          <td class='args'><%= j["time"] %></td>
          <td class='args'><%= format_execution(j["execution"]) %></td>
        </tr>
    <% end %>
  </table>

  <%= partial :next_more, :start => start, :size => size %>
</div>

<style type="text/css">
    #main table tr.failure td {
        background: #ffecec;
        border-top: 2px solid #d37474;
        font-size: 90%;
        color: #d37474;
    }

    #main table tr.failure td a {
        color: #d37474;
    }
</style>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
resque-history-1.9.0 lib/resque-history/server/views/history.erb