2014-02-06 07:14:41 +08:00
|
|
|
<header class="row">
|
2014-08-21 02:01:57 +08:00
|
|
|
<% if Sidekiq.paused? %>
|
|
|
|
<div class="col-sm-12">
|
|
|
|
<div class="alert alert-danger text-center">
|
|
|
|
<h2>SIDEKIQ IS PAUSED!</h2>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
<div class="col-sm-12">
|
2014-02-06 07:14:41 +08:00
|
|
|
<h3>Recurring Jobs</h3>
|
|
|
|
</div>
|
|
|
|
</header>
|
|
|
|
|
|
|
|
<div class="container">
|
|
|
|
<div class="row">
|
|
|
|
|
|
|
|
<div class="col-md-9">
|
|
|
|
<% if @schedules.length > 0 %>
|
|
|
|
<table class="table table-striped table-bordered table-white" style="width: 100%; margin: 0; table-layout:fixed;">
|
|
|
|
<thead>
|
|
|
|
<th style="width: 30%">Worker</th>
|
|
|
|
<th style="width: 15%">Last Run</th>
|
|
|
|
<th style="width: 15%">Last Result</th>
|
|
|
|
<th style="width: 15%">Last Duration</th>
|
2014-02-12 10:32:34 +08:00
|
|
|
<th style="width: 15%">Last Owner</th>
|
2014-02-06 07:14:41 +08:00
|
|
|
<th style="width: 15%">Next Run Due</th>
|
|
|
|
<th style="width: 10%">Actions</th>
|
|
|
|
</thead>
|
|
|
|
<% @schedules.each do |schedule| %>
|
|
|
|
<% @info = schedule.schedule_info %>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<%= schedule %>
|
|
|
|
<td>
|
|
|
|
<% prev = @info.prev_run %>
|
|
|
|
<% if prev.nil? %>
|
|
|
|
Never
|
|
|
|
<% else %>
|
|
|
|
<%= relative_time(Time.at(prev)) %>
|
|
|
|
<% end %>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<%= @info.prev_result %>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<%= @info.prev_duration %>
|
|
|
|
</td>
|
2014-02-12 10:32:34 +08:00
|
|
|
<td>
|
|
|
|
<%= @info.current_owner %>
|
|
|
|
</td>
|
2014-02-06 07:14:41 +08:00
|
|
|
<td>
|
|
|
|
<% next_run = @info.next_run %>
|
|
|
|
<% if next_run.nil? %>
|
|
|
|
Not Scheduled Yet
|
|
|
|
<% else %>
|
|
|
|
<%= relative_time(Time.at(next_run)) %>
|
|
|
|
<% end %>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<form action="<%= "#{root_path}scheduler/#{schedule}/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>
|