From dd136858f1ea40ad3c94191d647487fa4f31926c 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.0. Signed-off-by: Daniel Baumann --- templates/repo/settings/webhook/base.tmpl | 5 ++ templates/repo/settings/webhook/base_list.tmpl | 26 +++++++ templates/repo/settings/webhook/delete_modal.tmpl | 10 +++ templates/repo/settings/webhook/history.tmpl | 90 +++++++++++++++++++++++ templates/repo/settings/webhook/link_menu.tmpl | 12 +++ templates/repo/settings/webhook/list.tmpl | 4 + templates/repo/settings/webhook/new.tmpl | 7 ++ 7 files changed, 154 insertions(+) create mode 100644 templates/repo/settings/webhook/base.tmpl create mode 100644 templates/repo/settings/webhook/base_list.tmpl create mode 100644 templates/repo/settings/webhook/delete_modal.tmpl create mode 100644 templates/repo/settings/webhook/history.tmpl create mode 100644 templates/repo/settings/webhook/link_menu.tmpl create mode 100644 templates/repo/settings/webhook/list.tmpl create mode 100644 templates/repo/settings/webhook/new.tmpl (limited to 'templates/repo/settings/webhook') diff --git a/templates/repo/settings/webhook/base.tmpl b/templates/repo/settings/webhook/base.tmpl new file mode 100644 index 0000000..d524722 --- /dev/null +++ b/templates/repo/settings/webhook/base.tmpl @@ -0,0 +1,5 @@ +{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings webhooks")}} +
+ {{template "repo/settings/webhook/list" .}} +
+{{template "repo/settings/layout_footer" .}} diff --git a/templates/repo/settings/webhook/base_list.tmpl b/templates/repo/settings/webhook/base_list.tmpl new file mode 100644 index 0000000..36e75a7 --- /dev/null +++ b/templates/repo/settings/webhook/base_list.tmpl @@ -0,0 +1,26 @@ +

+ {{.Title}} +
+ +
+

+
+
+
+ {{.Description}} +
+ {{range .Webhooks}} +
+ {{svg "octicon-dot-fill" 22}} +
+ {{.URL}} +
+ {{svg "octicon-pencil"}} + {{svg "octicon-trash"}} +
+ {{end}} +
+
diff --git a/templates/repo/settings/webhook/delete_modal.tmpl b/templates/repo/settings/webhook/delete_modal.tmpl new file mode 100644 index 0000000..9955ed3 --- /dev/null +++ b/templates/repo/settings/webhook/delete_modal.tmpl @@ -0,0 +1,10 @@ + 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}} diff --git a/templates/repo/settings/webhook/link_menu.tmpl b/templates/repo/settings/webhook/link_menu.tmpl new file mode 100644 index 0000000..2edc5af --- /dev/null +++ b/templates/repo/settings/webhook/link_menu.tmpl @@ -0,0 +1,12 @@ +{{$size := 20}} +{{if .Size}} + {{$size = .Size}} +{{end}} + diff --git a/templates/repo/settings/webhook/list.tmpl b/templates/repo/settings/webhook/list.tmpl new file mode 100644 index 0000000..b24159f --- /dev/null +++ b/templates/repo/settings/webhook/list.tmpl @@ -0,0 +1,4 @@ + +{{template "repo/settings/webhook/base_list" .}} + +{{template "repo/settings/webhook/delete_modal" .}} diff --git a/templates/repo/settings/webhook/new.tmpl b/templates/repo/settings/webhook/new.tmpl new file mode 100644 index 0000000..b04a442 --- /dev/null +++ b/templates/repo/settings/webhook/new.tmpl @@ -0,0 +1,7 @@ +{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings new webhook")}} +
+ {{$CustomHeaderTitle := ctx.Locale.Tr "repo.settings.update_webhook"}} + {{if .PageIsSettingsHooksNew}}{{$CustomHeaderTitle = ctx.Locale.Tr "repo.settings.add_webhook"}}{{end}} + {{template "webhook/new" (dict "ctxData" . "CustomHeaderTitle" $CustomHeaderTitle)}} +
+{{template "repo/settings/layout_footer" .}} -- cgit v1.2.3