53 lines
1.5 KiB
Plaintext
53 lines
1.5 KiB
Plaintext
<style>
|
|
<%= File.read(File.join(view_path, 'assets', 'styles.css')) %>
|
|
</style>
|
|
|
|
<header class="row">
|
|
<div class="col-md-5">
|
|
<h3>Recurring Job: <%= @worker.name %></h3>
|
|
</div>
|
|
</header>
|
|
|
|
<div class="container">
|
|
<div class="row">
|
|
<%= erb File.read(File.join(view_path, '_worker_nav.erb')) %>
|
|
|
|
<div class="col-md-9">
|
|
<table class="table table-striped table-bordered table-hover table-white table-sidetiq">
|
|
<thead>
|
|
<th style="width: 10%">Status</th>
|
|
<th style="width: 20%">Timestamp</th>
|
|
<th style="width: 10%">Runtime</th>
|
|
<th>Details</th>
|
|
</thead>
|
|
|
|
<% @history.each do |entry| %>
|
|
<% entry = Sidekiq.load_json(entry).symbolize_keys %>
|
|
<tr class="<%= 'error' if entry[:status] == 'failure' %>">
|
|
<td><%= entry[:status].capitalize %></td>
|
|
<td><%= Time.parse(entry[:timestamp]).strftime("%m/%d/%Y %I:%M:%S%p") %></td>
|
|
<td><%= entry[:runtime].round(3) %> s</td>
|
|
<td>
|
|
<% if entry[:status] == 'failure' %>
|
|
<a class="backtrace" href="#" onclick="$(this).next().toggle(); return false">
|
|
<%= entry[:exception] %>: <%= entry[:error] %>
|
|
</a>
|
|
<div class="backtrace">
|
|
<pre>
|
|
<%= entry[:backtrace].join("<br />") %>
|
|
</pre>
|
|
</div>
|
|
<% end %>
|
|
<p>
|
|
<span>Node: <%= entry[:node] %></span>
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<br />
|