2017-04-20 04:31:37 -04:00
|
|
|
- page_title 'System Hooks'
|
2018-03-05 07:30:40 -05:00
|
|
|
.row.prepend-top-default
|
|
|
|
.col-lg-4
|
|
|
|
%h4.prepend-top-0
|
|
|
|
= page_title
|
|
|
|
%p
|
|
|
|
#{link_to 'System hooks ', help_page_path('system_hooks/system_hooks'), class: 'vlink'} can be
|
|
|
|
used for binding events when GitLab creates a User or Project.
|
2013-10-08 05:06:46 -04:00
|
|
|
|
2018-03-05 07:30:40 -05:00
|
|
|
.col-lg-8.append-bottom-default
|
|
|
|
= form_for @hook, as: :hook, url: admin_hooks_path do |f|
|
|
|
|
= render partial: 'form', locals: { form: f, hook: @hook }
|
2018-09-18 05:58:22 -04:00
|
|
|
= f.submit 'Add system hook', class: 'btn btn-success'
|
2013-10-08 05:06:46 -04:00
|
|
|
|
2018-03-05 07:30:40 -05:00
|
|
|
%hr
|
2013-10-08 05:06:46 -04:00
|
|
|
|
2018-03-05 07:30:40 -05:00
|
|
|
- if @hooks.any?
|
2018-04-10 13:11:34 -04:00
|
|
|
.card
|
|
|
|
.card-header
|
2018-03-05 07:30:40 -05:00
|
|
|
System hooks (#{@hooks.count})
|
|
|
|
%ul.content-list
|
|
|
|
- @hooks.each do |hook|
|
|
|
|
%li
|
|
|
|
.controls
|
|
|
|
= render 'shared/web_hooks/test_button', triggers: SystemHook.triggers, hook: hook, button_class: 'btn-sm'
|
|
|
|
= link_to 'Edit', edit_admin_hook_path(hook), class: 'btn btn-sm'
|
|
|
|
= link_to 'Remove', admin_hook_path(hook), data: { confirm: 'Are you sure?' }, method: :delete, class: 'btn btn-remove btn-sm'
|
|
|
|
.monospace= hook.url
|
|
|
|
%div
|
|
|
|
- SystemHook.triggers.each_value do |event|
|
|
|
|
- if hook.public_send(event)
|
2018-04-13 15:46:38 -04:00
|
|
|
%span.badge.badge-gray= event.to_s.titleize
|
|
|
|
%span.badge.badge-gray SSL Verification: #{hook.enable_ssl_verification ? 'enabled' : 'disabled'}
|
2012-07-12 15:10:34 -04:00
|
|
|
|
2018-03-05 07:30:40 -05:00
|
|
|
= render 'shared/plugins/index'
|