2014-02-05 18:14:41 -05:00
|
|
|
<header class="row">
|
|
|
|
<div class="col-sm-5">
|
|
|
|
<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-11 21:32:34 -05:00
|
|
|
<th style="width: 15%">Last Owner</th>
|
2014-02-05 18:14:41 -05: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-11 21:32:34 -05:00
|
|
|
<td>
|
|
|
|
<%= @info.current_owner %>
|
|
|
|
</td>
|
2014-02-05 18:14:41 -05: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>
|