Commit 91733c8d authored by Tom Quirk's avatar Tom Quirk

UI polish on the webhook log page

Changelog: changed
parent 8495a310
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
- add_to_breadcrumbs _('Webhook Settings'), namespace_project_hooks_path - add_to_breadcrumbs _('Webhook Settings'), namespace_project_hooks_path
- page_title _('Webhook Logs') - page_title _('Webhook Logs')
.row.gl-mt-3.gl-mb-3 %h3.page-title
.col-lg-3 = _("Request details")
%h4.gl-mt-0
= _("Request details") %hr
.col-lg-9
= link_to _('Resend Request'), @hook_log.present.retry_path, method: :post, class: "btn gl-button btn-default float-right gl-ml-3" = link_to _("Resend Request"), @hook_log.present.retry_path, method: :post, class: "btn gl-button btn-default float-right gl-ml-3"
= render partial: 'shared/hook_logs/content', locals: { hook_log: @hook_log } = render partial: 'shared/hook_logs/content', locals: { hook_log: @hook_log }
%p %span.gl-display-flex.gl-align-items-center
%strong Request URL: %h4
POST POST
= hook_log.url = hook_log.url
= render partial: 'shared/hook_logs/status_label', locals: { hook_log: hook_log } %span.badge.gl-badge.badge-pill.badge-muted.sm.gl-ml-3
= hook_log.trigger.singularize.titleize
%p %p
%strong Trigger: = _('Completed in %{duration_seconds} seconds (%{relative_time})').html_safe % { duration_seconds: number_with_precision(hook_log.execution_duration, precision: 2), relative_time: time_ago_with_tooltip(hook_log.created_at) }
%td.d-none.d-sm-block
%span.badge.badge-gray.deploy-project-label
= hook_log.trigger.singularize.titleize
%p
%strong Elapsed time:
#{number_with_precision(hook_log.execution_duration, precision: 2)} sec
%p
%strong Request time:
= time_ago_with_tooltip(hook_log.created_at)
%hr %hr
- if hook_log.internal_error_message.present? - if hook_log.internal_error_message.present?
.bs-callout.bs-callout-danger .gl-alert-container
= hook_log.internal_error_message .gl-alert.gl-alert-danger
.gl-alert-container
= sprite_icon('error', size: 16, css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title')
.gl-alert-content
%h4.gl-alert-title= _('Internal error occured while delivering this webhook.')
.gl-alert-body
= _('Error: %{error}') % { error: hook_log.internal_error_message }
%h4= _('Response')
= render partial: 'shared/hook_logs/status_label', locals: { hook_log: hook_log }
%pre.gl-mt-3
:escaped
#{hook_log.response_body}
%h5 Request headers: %h5= _('Headers')
%pre %pre
- hook_log.request_headers.each do |k, v| - hook_log.response_headers.each do |k, v|
<strong>#{k}:</strong> #{v} <span class="gl-font-weight-bold">#{k}:</span> #{v}
%br %br
%h5 Request body: %h4.gl-mt-6= _('Request')
%pre %pre
:escaped :escaped
#{Gitlab::Json.pretty_generate(hook_log.request_data)} #{Gitlab::Json.pretty_generate(hook_log.request_data)}
%h5 Response headers:
%h5= _('Headers')
%pre %pre
- hook_log.response_headers.each do |k, v| - hook_log.request_headers.each do |k, v|
<strong>#{k}:</strong> #{v} <span class="gl-font-weight-bold">#{k}:</span> #{v}
%br %br
%h5 Response body:
%pre
:escaped
#{hook_log.response_body}
...@@ -8488,6 +8488,9 @@ msgstr "" ...@@ -8488,6 +8488,9 @@ msgstr ""
msgid "Completed" msgid "Completed"
msgstr "" msgstr ""
msgid "Completed in %{duration_seconds} seconds (%{relative_time})"
msgstr ""
msgid "Compliance framework" msgid "Compliance framework"
msgstr "" msgstr ""
...@@ -13471,6 +13474,9 @@ msgstr "" ...@@ -13471,6 +13474,9 @@ msgstr ""
msgid "Error: %{error_message}" msgid "Error: %{error_message}"
msgstr "" msgstr ""
msgid "Error: %{error}"
msgstr ""
msgid "Error: Couldn't load some or all of the changes." msgid "Error: Couldn't load some or all of the changes."
msgstr "" msgstr ""
...@@ -16755,6 +16761,9 @@ msgstr "" ...@@ -16755,6 +16761,9 @@ msgstr ""
msgid "Header must be associated with a request or response" msgid "Header must be associated with a request or response"
msgstr "" msgstr ""
msgid "Headers"
msgstr ""
msgid "Heading 1" msgid "Heading 1"
msgstr "" msgstr ""
...@@ -18504,6 +18513,9 @@ msgstr "" ...@@ -18504,6 +18513,9 @@ msgstr ""
msgid "Internal URL (optional)" msgid "Internal URL (optional)"
msgstr "" msgstr ""
msgid "Internal error occured while delivering this webhook."
msgstr ""
msgid "Internal users" msgid "Internal users"
msgstr "" msgstr ""
...@@ -28946,6 +28958,9 @@ msgstr "" ...@@ -28946,6 +28958,9 @@ msgstr ""
msgid "RepositorySettingsAccessLevel|Select" msgid "RepositorySettingsAccessLevel|Select"
msgstr "" msgstr ""
msgid "Request"
msgstr ""
msgid "Request Access" msgid "Request Access"
msgstr "" msgstr ""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment