Show an event's entrypoint and request headers (closes #389)
check / check (push) Successful in 3m13s
check / check (push) Successful in 3m13s
An expanded event in the event log and the event's own page now show the entrypoint the event arrived at (its description, "Entrypoint" when it has none, or "deleted entrypoint"; never its URL), or for a resubmitted copy the one its original arrived at, and the request headers, one per line, sorted by name, whitespace kept. The event log leaves out headers that hold more than the body's 32 KiB limit, stored or as lines, and links to the event's page, which shows them all. Both pages draw them through one shared template, event_request.html, and read the webhook's entrypoints once per page. Model: opus-5-5
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
{{define "event_request"}}
|
||||
<!-- The entrypoint an event arrived at and its request headers, as
|
||||
handlers.EventLogView carries them: the same in the event log and
|
||||
the event's own page. The entrypoint's URL is never shown. A
|
||||
resubmitted copy did not arrive at an entrypoint; its original
|
||||
did. -->
|
||||
<div class="space-y-2 text-xs">
|
||||
{{if .ResubmittedFrom}}
|
||||
<p class="text-gray-500">Its original arrived at <span class="text-gray-900">{{.Entrypoint}}</span></p>
|
||||
{{else}}
|
||||
<p class="text-gray-500">Arrived at <span class="text-gray-900">{{.Entrypoint}}</span></p>
|
||||
{{end}}
|
||||
{{if .HeadersCut}}
|
||||
<p class="text-gray-500">The request headers are larger than the event log shows. <a href="{{.Body.EventURL}}" class="btn-small">Show the request headers</a></p>
|
||||
{{else if .Headers}}
|
||||
<p class="text-gray-500">Request headers</p>
|
||||
<div class="rounded-md border border-gray-200 bg-white p-2 font-mono text-gray-700 break-all">
|
||||
{{range .Headers}}<div class="whitespace-pre-wrap">{{.}}</div>{{end}}
|
||||
</div>
|
||||
{{else}}
|
||||
<p class="text-gray-500">No request headers.</p>
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
Reference in New Issue
Block a user