Sha256: 6f40969a770de818968f8272188893df4826953d0f4b4f2c389a1be43a514454

Contents?: true

Size: 1.62 KB

Versions: 1

Compression:

Stored size: 1.62 KB

Contents

<p>Delayed::Job.count: <%= Delayed::Job.count %></p>

<table id="jobs">
  <thead>
    <tr>
      <th>id</th>
      <th>priority</th>
      <th>attempts</th>
      <th>handler</th>
      <th>last_error</th>
      <th>run_at</th>
      <th>locked_at</th>
      <th>failed_at</th>
      <th>locked_by</th>
      <th>created_at</th>
      <th>updated_at</th>
    </tr>
  </thead>
  <tbody>
    <% Delayed::Job.all.reverse.each do |job| %>
      <tr class="job" id="job-<%= job.id %>">
        <td><%= job.id %></td>
        <td><%= job.priority %></td>
        <td><%= job.attempts %></td>
        <td><%= truncate(job.handler || '-', :length => 40).gsub('--- !', '') %></td>
        <td><%= truncate(job.last_error || '-', :length => 40) %></td>
        <td><%= job.run_at.present? ? job.run_at.to_s(:short) : '-' %></td>
        <td><%= job.locked_at.present? ? job.locked_at.to_s(:short) : '-' %></td>
        <td><%= job.failed_at.present? ? job.failed_at.to_s(:short) : '-' %></td>
        <td><%= job.locked_by || '-' %></td>
        <td><%= job.created_at.to_s(:short) %></td>
        <td><%= job.updated_at.to_s(:short) %></td>
      </tr>
      <tr class="job-details" id="job-details-<%= job.id %>">
        <td colspan="11"><p><pre><%= job.to_yaml %></pre></p></td>
      </tr>
    <% end %>
  </tbody>
</table>

<script>
  $(document).ready(function(){

    $(".job").hover(
      function () {
        $(this).css("cursor", "pointer");
        $(this).addClass("hover");
      },
      function () {
        $(this).removeClass("hover");
      }
    );

    $(".job").click(function(event){
      $(this).next("tr").toggle();
    });

  });
</script>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
delayed_job_admin-1.0.2 app/views/delayed_job_admin/index.html.erb