mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: store history for scheduled job execution
This commit is contained in:
45
lib/scheduler/views/history.erb
Normal file
45
lib/scheduler/views/history.erb
Normal file
@@ -0,0 +1,45 @@
|
||||
<header class="row">
|
||||
<div class="col-sm-12">
|
||||
<h3>Scheduler History</h3>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<% if @scheduler_stats.length > 0 %>
|
||||
|
||||
<table class="table table-striped table-bordered table-white" style="width: 100%; margin: 0; table-layout:fixed;">
|
||||
<thead>
|
||||
<th style="width: 30%">Job Name</th>
|
||||
<th style="width: 15%">Hostname:Pid</th>
|
||||
<th style="width: 15%">Live Slots delta</th>
|
||||
<th style="width: 15%">Started At</th>
|
||||
<th style="width: 15%">Duration (ms)</th>
|
||||
<th style="width: 15%"></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @scheduler_stats.each do |stat| %>
|
||||
<tr>
|
||||
<td><%= stat.name %></td>
|
||||
<td><%= stat.hostname %>:<%= stat.pid %></td>
|
||||
<td>
|
||||
<% if stat.live_slots_start && stat.live_slots_finish %>
|
||||
<%= stat.live_slots_finish - stat.live_slots_start %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td><%= relative_time stat.started_at %></td>
|
||||
<td><%= stat.duration_ms %></td>
|
||||
<td>
|
||||
<% if !stat.success %>
|
||||
<span>FAILED</span>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user