Add recovery for orphaned jobs
This commit is contained in:
@@ -24,6 +24,10 @@
|
||||
</h1>
|
||||
</div>
|
||||
<div class="flex gap-2">
|
||||
<form method="post" action="/alerts/abandon-stuck"
|
||||
onsubmit="return confirm('Mark every currently alerted stuck job as cancelled? Use this only for jobs no longer running on their agents.');">
|
||||
<button type="submit" class="btn btn-danger">Abandon all stuck jobs</button>
|
||||
</form>
|
||||
<a href="/settings/notifications" class="btn">Channel settings →</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -66,6 +66,14 @@
|
||||
{{/* actions */}}
|
||||
<div style="display: flex; gap: 6px; justify-content: flex-end; align-items: center;">
|
||||
{{if eq $status "open"}}
|
||||
{{if eq $a.Kind "job_stuck"}}
|
||||
<form method="post" action="/alerts/{{$a.ID}}/abandon-job">
|
||||
<button type="submit" class="btn btn-danger"
|
||||
hx-post="/alerts/{{$a.ID}}/abandon-job{{if $qs}}?{{$qs}}{{end}}"
|
||||
hx-swap="none"
|
||||
hx-confirm="Mark this job cancelled on the server? Use this only when it is no longer running on the agent.">Abandon job</button>
|
||||
</form>
|
||||
{{end}}
|
||||
<form method="post" action="/alerts/{{$a.ID}}/acknowledge">
|
||||
{{if $qs}}<input type="hidden" name="qs" value="{{$qs}}">{{end}}
|
||||
<button type="submit" class="btn"
|
||||
@@ -89,6 +97,14 @@
|
||||
{{end}}
|
||||
ack'd{{if $ackedBy}} by {{$ackedBy}}{{end}} · {{relTime $a.AcknowledgedAt}}
|
||||
</span>
|
||||
{{if eq $a.Kind "job_stuck"}}
|
||||
<form method="post" action="/alerts/{{$a.ID}}/abandon-job">
|
||||
<button type="submit" class="btn btn-danger"
|
||||
hx-post="/alerts/{{$a.ID}}/abandon-job{{if $qs}}?{{$qs}}{{end}}"
|
||||
hx-swap="none"
|
||||
hx-confirm="Mark this job cancelled on the server? Use this only when it is no longer running on the agent.">Abandon job</button>
|
||||
</form>
|
||||
{{end}}
|
||||
<form method="post" action="/alerts/{{$a.ID}}/resolve">
|
||||
{{if $qs}}<input type="hidden" name="qs" value="{{$qs}}">{{end}}
|
||||
<button type="submit" class="btn"
|
||||
|
||||
Reference in New Issue
Block a user