Sha256: 12a18866db538f5a476897140c0dfeac1f43be86a987f9128474c702d0a96709

Contents?: true

Size: 1.64 KB

Versions: 4

Compression:

Stored size: 1.64 KB

Contents

<style>
<%= File.read(File.join(view_path, 'assets', 'styles.css')) %>
</style>

<header class="row">
  <div class="col-sm-5">
    <h3>Recurring Jobs</h3>
  </div>
</header>

<div class="container">
  <div class="row">
    <%= erb File.read(File.join(view_path, '_home_nav.erb')) %>

    <div class="col-md-9">
      <% if @workers.length > 0 %>
      <table class="table table-striped table-bordered table-white table-sidetiq">
        <thead>
          <th style="width: 50%">Worker</th>
          <th style="width: 10%">Queue</th>
          <th style="width: 30%">Next Run</th>
          <th style="width: 10%">Actions</th>
        </thead>
        <% @workers.each do |worker| %>
        <% schedule = worker.schedule %>
        <tr>
          <td>
            <a href="<%= "#{root_path}sidetiq/#{worker.name}/schedule" %>"><%= worker.name %></a>
            <td><%= worker.get_sidekiq_options["queue"] %></td>
            <td>
              <% @next = schedule.next_occurrence(@time) %>
              <% if @next.nil? %>
              No schedule
              <% else %>
              <%= relative_time(schedule.next_occurrence(@time)) %>
              <% end %>
            </td>
            <td>
              <form action="<%= "#{root_path}sidetiq/#{worker.name}/trigger" %>" method="post">
                <input class="btn btn-danger btn-small" type="submit" name="trigger" value="Trigger" data-confirm="Are you sure you want to trigger this job?" />
              </form>
            </td>
        </tr>
        <% end %>
      </table>
      <% else %>
      <div class="alert alert-success">No recurring jobs found.</div>
      <% end %>
    </div>
  </div>
</div>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
sidetiq-0.6.3 lib/sidetiq/views/sidetiq.erb
sidetiq-0.6.2 lib/sidetiq/views/sidetiq.erb
sidetiq-0.6.1 lib/sidetiq/views/sidetiq.erb
sidetiq-0.6.0 lib/sidetiq/views/sidetiq.erb