debian-mirror-gitlab/app/views/admin/hooks/index.html.haml

34 lines
1.3 KiB
Text
Raw Normal View History

2017-08-17 22:00:37 +05:30
- page_title 'System Hooks'
2014-09-02 18:07:02 +05:30
%h3.page-title
System hooks
%p.light
2017-08-17 22:00:37 +05:30
#{link_to 'System hooks ', help_page_path('system_hooks/system_hooks'), class: 'vlink'} can be
2014-09-02 18:07:02 +05:30
used for binding events when GitLab creates a User or Project.
%hr
= form_for @hook, as: :hook, url: admin_hooks_path, html: { class: 'form-horizontal' } do |f|
2017-08-17 22:00:37 +05:30
= render partial: 'form', locals: { form: f, hook: @hook }
2014-09-02 18:07:02 +05:30
.form-actions
2017-08-17 22:00:37 +05:30
= f.submit 'Add system hook', class: 'btn btn-create'
2014-09-02 18:07:02 +05:30
%hr
2017-08-17 22:00:37 +05:30
- if @hooks.any?
2014-09-02 18:07:02 +05:30
.panel.panel-default
.panel-heading
System hooks (#{@hooks.count})
2016-06-02 11:05:42 +05:30
%ul.content-list
2014-09-02 18:07:02 +05:30
- @hooks.each do |hook|
%li
2016-06-02 11:05:42 +05:30
.controls
2018-03-17 18:26:18 +05:30
= render 'shared/web_hooks/test_button', triggers: SystemHook.triggers, hook: hook, button_class: 'btn-sm'
2017-08-17 22:00:37 +05:30
= 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'
2016-06-02 11:05:42 +05:30
.monospace= hook.url
%div
2018-03-17 18:26:18 +05:30
- SystemHook.triggers.each_value do |event|
2017-09-10 17:25:29 +05:30
- if hook.public_send(event)
%span.label.label-gray= event.to_s.titleize
2017-08-17 22:00:37 +05:30
%span.label.label-gray SSL Verification: #{hook.enable_ssl_verification ? 'enabled' : 'disabled'}