feat: add user-facing deployment cancel endpoint

Add POST /apps/{id}/deployments/cancel endpoint that allows users to
cancel in-progress deployments via the web UI.

Changes:
- Add CancelDeploy() and HasActiveDeploy() public methods to deploy service
- Add HandleCancelDeploy handler
- Wire route in routes.go
- Add cancel button to app detail template (shown during active deployments)
- Add handler tests for cancel endpoint

fixes #66
This commit is contained in:
user
2026-02-16 00:15:24 -08:00
parent ebcae55302
commit c5f957477f
5 changed files with 92 additions and 0 deletions

View File

@@ -40,6 +40,10 @@
<span x-text="deploying ? 'Deploying...' : 'Deploy Now'"></span>
</button>
</form>
<form method="POST" action="/apps/{{.App.ID}}/deployments/cancel" class="inline" x-show="deploying" x-cloak x-data="confirmAction('Cancel the current deployment?')" @submit="confirm($event)">
{{ .CSRFField }}
<button type="submit" class="btn-danger">Cancel Deploy</button>
</form>
</div>
</div>