Add recovery for orphaned jobs

This commit is contained in:
2026-08-22 13:42:42 +01:00
parent 3ccefc254a
commit ec448157d9
9 changed files with 409 additions and 5 deletions
+16
View File
@@ -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"