forked from mhfs/sidekiq-failures
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request mhfs#41 from tobiassvn/erb
Add ERB template for Sidekiq >= 2.14.0.
- Loading branch information
Showing
2 changed files
with
65 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
<header class="row"> | ||
<div class="span5"> | ||
<h3>Failed Jobs</h3> | ||
</div> | ||
<div class="span4"> | ||
<% if @messages.size > 0 %> | ||
<%= erb :_paging, :locals => { :url => "#{root_path}failures#@name" } %> | ||
<% end %> | ||
</div> | ||
</header> | ||
|
||
<% if @messages.size > 0 %> | ||
<table class="table table-striped table-bordered table-white" style="width: 100%; margin: 0; table-layout:fixed;"> | ||
<thead> | ||
<th style="width: 25%">Worker, Args</th> | ||
<th style="width: 10%">Queue</th> | ||
<th style="width: 15%">Failed At</th> | ||
<th style="width: 50%">Exception</th> | ||
</thead> | ||
<% @messages.each do |msg| %> | ||
<tr> | ||
<td style="overflow: hidden; text-overflow: ellipsis;"> | ||
<%= msg['worker'] %> | ||
<br /> | ||
<%= msg['payload']['args'].inspect[0..100] %> | ||
</td> | ||
<td><%= msg['queue'] %></td> | ||
<td> | ||
<time datetime="<%= "#{Time.parse(msg['failed_at']).getutc.iso8601}" %>"> | ||
<%= msg['failed_at'] %> | ||
</time> | ||
</td> | ||
<td style="overflow: auto; padding: 10px;"> | ||
<a class="backtrace" href="#" onclick="$(this).next().toggle(); return false"> | ||
<%= msg['exception'] %>: <%= msg['error'] %> | ||
</a> | ||
<pre style="display: none; background: none; border: 0; width: 100%; max-height: 30em; font-size: 0.8em; white-space: nowrap;"> | ||
<%= msg['backtrace'].join("<br />") %> | ||
</pre> | ||
<p> | ||
<span>Processor: <%= msg['processor'] %></span> | ||
</p> | ||
</td> | ||
</tr> | ||
<% end %> | ||
</table> | ||
<div class="row"> | ||
<div class="span5"> | ||
<form class="form-inline" action="<%= "#{root_path}failures/remove" %>" method="post" style="margin: 20px 0"> | ||
<input class="btn btn-danger btn-small" type="submit" name="delete" value="Clear All" /> | ||
<label class="checkbox"> | ||
<input type="checkbox" name="counter" value="true" /> | ||
reset failed counter | ||
</label> | ||
</form> | ||
</div> | ||
</div> | ||
<% else %> | ||
<div class="alert alert-success">No failed jobs found.</div> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters