-
Notifications
You must be signed in to change notification settings - Fork 223
/
retry.ego
56 lines (49 loc) · 1.49 KB
/
retry.ego
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<%
package webui
import (
"net/http"
"github.com/contribsys/faktory/client"
)
func ego_retry(w io.Writer, req *http.Request, key string, retry *client.Job) {
%>
<% ego_layout(w, req, func() { %>
<% ego_job_info(w, req, retry) %>
<h3><%= t(req, "Error") %></h3>
<div class="table-responsive">
<table class="error table table-bordered table-striped table-light">
<tbody>
<tr>
<th><%= t(req, "ErrorClass") %></th>
<td>
<code><%= retry.Failure.ErrorType %></code>
</td>
</tr>
<tr>
<th><%= t(req, "ErrorMessage") %></th>
<td><%= retry.Failure.ErrorMessage %></td>
</tr>
<% if retry.Failure.Backtrace != nil { %>
<tr>
<th><%= t(req, "ErrorBacktrace") %></th>
<td>
<code>
<% for _, line := range retry.Failure.Backtrace { %>
<%= line %><br/>
<% } %>
</code>
</td>
</tr>
<% } %>
</tbody>
</table>
</div>
<form class="form-horizontal" action="<%= root(req) %>/retries/<%= key %>" method="post">
<%== csrfTag(req) %>
<div class="pull-left">
<a class="btn btn-default" href="<%= root(req) %>/retries"><%= t(req, "GoBack") %></a>
<button class="btn btn-primary btn-sm" type="submit" name="action" value="retry"><%= t(req, "RetryNow") %></button>
<button class="btn btn-danger btn-sm" type="submit" name="action" value="delete"><%= t(req, "Delete") %></button>
</div>
</form>
<% }) %>
<% } %>