2022-03-02 08:16:31 +05:30
|
|
|
- sslStatus = hook.enable_ssl_verification ? _('enabled') : _('disabled')
|
|
|
|
- sslBadgeText = _('SSL Verification:') + ' ' + sslStatus
|
|
|
|
|
2020-01-01 13:55:28 +05:30
|
|
|
%li
|
|
|
|
.row
|
|
|
|
.col-md-8.col-lg-7
|
2022-01-26 12:08:38 +05:30
|
|
|
%strong.light-header
|
|
|
|
= hook.url
|
|
|
|
- if hook.rate_limited?
|
2022-03-02 08:16:31 +05:30
|
|
|
= gl_badge_tag(_('Disabled'), variant: :danger, size: :sm)
|
2022-01-26 12:08:38 +05:30
|
|
|
- elsif hook.permanently_disabled?
|
2022-03-02 08:16:31 +05:30
|
|
|
= gl_badge_tag(s_('Webhooks|Failed to connect'), variant: :danger, size: :sm)
|
2022-01-26 12:08:38 +05:30
|
|
|
- elsif hook.temporarily_disabled?
|
2022-03-02 08:16:31 +05:30
|
|
|
= gl_badge_tag(s_('Webhooks|Fails to connect'), variant: :warning, size: :sm)
|
2022-01-26 12:08:38 +05:30
|
|
|
|
2020-01-01 13:55:28 +05:30
|
|
|
%div
|
|
|
|
- hook.class.triggers.each_value do |trigger|
|
|
|
|
- if hook.public_send(trigger)
|
2023-03-04 22:38:38 +05:30
|
|
|
= gl_badge_tag(integration_webhook_event_human_name(trigger), size: :sm)
|
2022-03-02 08:16:31 +05:30
|
|
|
= gl_badge_tag(sslBadgeText, size: :sm)
|
2020-01-01 13:55:28 +05:30
|
|
|
|
2020-07-28 23:09:34 +05:30
|
|
|
.col-md-4.col-lg-5.text-right-md.gl-mt-2
|
2021-04-29 21:17:54 +05:30
|
|
|
%span>= render 'shared/web_hooks/test_button', hook: hook, button_class: 'btn-sm btn-default gl-mr-3'
|
|
|
|
%span>= link_to _('Edit'), edit_hook_path(hook), class: 'btn gl-button btn-default btn-sm gl-mr-3'
|
2022-04-04 11:22:00 +05:30
|
|
|
= link_to _('Delete'), destroy_hook_path(hook), aria: { label: s_('Webhooks|Delete webhook') }, data: { confirm_btn_variant: "danger", confirm: s_('Webhooks|Are you sure you want to delete this webhook?') }, method: :delete, class: 'btn gl-button btn-secondary btn-danger-secondary btn-sm'
|