@@ -0,0 +1,42 @@ |
| 1 | +{{ define "page" -}} |
| 2 | +<div class="shithub-settings-page"> |
| 3 | + {{ template "repo-settings-nav" . }} |
| 4 | + <div class="shithub-settings-content"> |
| 5 | + <h1>Delivery #{{ .Delivery.ID }}</h1> |
| 6 | + <p> |
| 7 | + <a href="/{{ .Owner }}/{{ .Repo.Name }}/settings/webhooks/{{ .Webhook.ID }}">← Back to webhook</a> |
| 8 | + </p> |
| 9 | + |
| 10 | + <section class="shithub-settings-section"> |
| 11 | + <h2>Summary</h2> |
| 12 | + <ul> |
| 13 | + <li>Event: <code>{{ .Delivery.EventKind }}</code></li> |
| 14 | + <li>Status: <code>{{ .Delivery.Status }}</code></li> |
| 15 | + <li>Attempt: {{ .Delivery.Attempt }} of {{ .Delivery.MaxAttempts }}</li> |
| 16 | + <li>Started: {{ relativeTime .Delivery.StartedAt.Time }}</li> |
| 17 | + {{ if .Delivery.CompletedAt.Valid }}<li>Completed: {{ relativeTime .Delivery.CompletedAt.Time }}</li>{{ end }} |
| 18 | + {{ if .Delivery.NextRetryAt.Valid }}<li>Next retry: {{ relativeTime .Delivery.NextRetryAt.Time }}</li>{{ end }} |
| 19 | + {{ if .Delivery.ResponseStatus.Valid }}<li>HTTP response: <code>{{ .Delivery.ResponseStatus.Int32 }}</code>{{ if .Delivery.ResponseTruncated }} (body truncated){{ end }}</li>{{ end }} |
| 20 | + {{ if .Delivery.RedeliverOf.Valid }}<li>Redelivery of #{{ .Delivery.RedeliverOf.Int64 }}</li>{{ end }} |
| 21 | + {{ if .Delivery.ErrorSummary.Valid }}<li>Error: <code>{{ .Delivery.ErrorSummary.String }}</code></li>{{ end }} |
| 22 | + </ul> |
| 23 | + <form method="POST" action="/{{ .Owner }}/{{ .Repo.Name }}/settings/webhooks/{{ .Webhook.ID }}/deliveries/{{ .Delivery.ID }}/redeliver"> |
| 24 | + <input type="hidden" name="csrf_token" value="{{ .CSRFToken }}"> |
| 25 | + <button type="submit" class="shithub-button shithub-button-primary">Redeliver</button> |
| 26 | + </form> |
| 27 | + </section> |
| 28 | + |
| 29 | + <section class="shithub-settings-section"> |
| 30 | + <h2>Request payload</h2> |
| 31 | + <pre class="shithub-code-pre">{{ .PayloadPretty }}</pre> |
| 32 | + </section> |
| 33 | + |
| 34 | + {{ with .ResponseBody }} |
| 35 | + <section class="shithub-settings-section"> |
| 36 | + <h2>Response body{{ if $.Delivery.ResponseTruncated }} (truncated){{ end }}</h2> |
| 37 | + <pre class="shithub-code-pre">{{ . }}</pre> |
| 38 | + </section> |
| 39 | + {{ end }} |
| 40 | + </div> |
| 41 | +</div> |
| 42 | +{{- end }} |