Commit 5e2eedfa authored by anna_vovchenko's avatar anna_vovchenko Committed by Tom Quirk

Changed badges to the Pajamas-compliant component

parent 05caf683
......@@ -2,8 +2,7 @@
%h4
POST
= hook_log.url
%span.badge.gl-badge.badge-pill.badge-muted.sm.gl-ml-3
= hook_log.trigger.singularize.titleize
= gl_badge_tag hook_log.trigger.singularize.titleize, {size: :sm}, {class: 'gl-ml-3'}
%p
= _('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) }
......
......@@ -13,8 +13,7 @@
%td
= render partial: 'shared/hook_logs/status_label', locals: { hook_log: hook_log }
%td.d-none.d-sm-table-cell
%span.badge.badge-pill.gl-badge.badge-muted.sm
= hook_log.trigger.singularize.titleize
= gl_badge_tag hook_log.trigger.singularize.titleize, {size: :sm}
%td
#{number_with_precision(hook_log.execution_duration, precision: 2)} sec
%td
......
- label_status = hook_log.success? ? 'badge-success' : 'badge-danger'
%span{ class: "badge badge-pill gl-badge sm #{label_status}" }
= hook_log.internal_error? ? _('Error') : hook_log.response_status
- badge_variant = hook_log.success? ? :success : :danger
- badge_text = hook_log.internal_error? ? _('Error') : hook_log.response_status
= gl_badge_tag badge_text, { variant: badge_variant, size: :sm }
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