build-base
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
{{define "title"}}Delivery Queue{{end}}
|
||||
{{define "content"}}
|
||||
<div class="flex items-center justify-between mb-6">
|
||||
<h1 class="text-xl font-bold text-white">Delivery Queue</h1>
|
||||
<a href="/admin/queue" class="btn btn-primary btn-sm">Refresh</a>
|
||||
</div>
|
||||
|
||||
<div class="card" style="padding:0;overflow:hidden">
|
||||
{{if .Entries}}
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Status</th>
|
||||
<th>From</th>
|
||||
<th>To</th>
|
||||
<th>Attempts</th>
|
||||
<th>Next attempt</th>
|
||||
<th>Expires</th>
|
||||
<th>Last error</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{range .Entries}}
|
||||
<tr>
|
||||
<td class="text-gray-400 text-xs">{{.ID}}</td>
|
||||
<td>
|
||||
{{if eq .Status "failed"}}<span class="badge badge-red">failed</span>
|
||||
{{else if eq .Status "pending"}}<span class="badge badge-yellow">pending</span>
|
||||
{{else}}<span class="badge badge-gray">{{.Status}}</span>{{end}}
|
||||
</td>
|
||||
<td class="text-xs">{{.FromAddr}}</td>
|
||||
<td class="text-xs">{{.ToAddr}}</td>
|
||||
<td class="text-gray-400 text-xs">{{.Attempts}}</td>
|
||||
<td class="text-gray-400 text-xs">{{shortTime .NextAttempt}}</td>
|
||||
<td class="text-gray-400 text-xs">{{shortTime .ExpiresAt}}</td>
|
||||
<td class="text-xs text-red-300" style="max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap">{{.ErrorLog}}</td>
|
||||
<td>
|
||||
<form method="POST" action="/admin/queue/{{.ID}}/retry" style="display:inline">
|
||||
<input type="hidden" name="_csrf" value="{{$.CSRF}}">
|
||||
<button type="submit" class="btn btn-primary btn-sm">Retry</button>
|
||||
</form>
|
||||
<form method="POST" action="/admin/queue/{{.ID}}/delete" style="display:inline;margin-left:.25rem"
|
||||
onsubmit="return confirm('Delete queue entry?')">
|
||||
<input type="hidden" name="_csrf" value="{{$.CSRF}}">
|
||||
<button type="submit" class="btn btn-danger btn-sm">Delete</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
{{else}}
|
||||
<div class="p-8 text-center text-gray-500 text-sm">Queue is empty.</div>
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
Reference in New Issue
Block a user