From e68b9d00a6e05b3a941f63ffb696f91e554ac5ec Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 18 Oct 2024 20:33:49 +0200 Subject: Adding upstream version 9.0.3. Signed-off-by: Daniel Baumann --- templates/repo/settings/webhook/history.tmpl | 90 ++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 templates/repo/settings/webhook/history.tmpl (limited to 'templates/repo/settings/webhook/history.tmpl') diff --git a/templates/repo/settings/webhook/history.tmpl b/templates/repo/settings/webhook/history.tmpl new file mode 100644 index 0000000..8ee1446 --- /dev/null +++ b/templates/repo/settings/webhook/history.tmpl @@ -0,0 +1,90 @@ +{{$isNew:=or .PageIsSettingsHooksNew .PageIsAdminDefaultHooksNew .PageIsAdminSystemHooksNew}} +{{if .PageIsSettingsHooksEdit}} +

+ {{ctx.Locale.Tr "repo.settings.recent_deliveries"}} + {{if .Permission.IsAdmin}} +
+ + + + +
+ {{end}} +

+
+
+ {{range .History}} +
+
+
+ {{if .IsSucceed}} + {{svg "octicon-check"}} + {{else if not .IsDelivered}} + {{svg "octicon-stopwatch"}} + {{else}} + {{svg "octicon-alert"}} + {{end}} + {{.UUID}} +
+ + {{TimeSince .Delivered.AsTime ctx.Locale}} + +
+
+ +
+ {{if .RequestInfo}} +
{{ctx.Locale.Tr "repo.settings.webhook.headers"}}
+
Request URL: {{.RequestInfo.URL}}
+Request method: {{if .RequestInfo.HTTPMethod}}{{.RequestInfo.HTTPMethod}}{{else}}POST{{end}}
+{{range $key, $val := .RequestInfo.Headers}}{{$key}}: {{$val}}
+{{end}}
+
{{ctx.Locale.Tr "repo.settings.webhook.payload"}}
+
{{or .RequestInfo.Body .PayloadContent}}
+ {{else}} + - + {{end}} +
+
+ {{if .ResponseInfo}} +
{{ctx.Locale.Tr "repo.settings.webhook.headers"}}
+
{{range $key, $val := .ResponseInfo.Headers}}{{$key}}: {{$val}}
+{{end}}
+
{{ctx.Locale.Tr "repo.settings.webhook.body"}}
+
{{.ResponseInfo.Body}}
+ {{else}} + - + {{end}} +
+
+
+ {{end}} +
+
+{{end}} -- cgit v1.2.3