index.html.haml 1.44 KB
Newer Older
Douwe Maan's avatar
Douwe Maan committed
1
- page_title "System Hooks"
2
%h3.page-title
3
  System hooks
4
5

%p.light
6
  #{link_to "System hooks ", help_page_path("system_hooks", "system_hooks"), class: "vlink"} can be
7
8
9
10
  used for binding events when GitLab creates a User or Project.

%hr

Valeriy Sizov's avatar
Valeriy Sizov committed
11

Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
12
= form_for @hook, as: :hook, url: admin_hooks_path, html: { class: 'form-horizontal' } do |f|
Valeriy Sizov's avatar
Valeriy Sizov committed
13
  -if @hook.errors.any?
14
    .alert.alert-danger
Valeriy Sizov's avatar
Valeriy Sizov committed
15
16
      - @hook.errors.full_messages.each do |msg|
        %p= msg
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
17
  .form-group
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
18
    = f.label :url, "URL:", class: 'control-label'
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
19
    .col-sm-10
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
20
      = f.text_field :url, class: "form-control"
21
22
23
24
25
26
27
  .form-group
    = f.label :enable_ssl_verification, "SSL verification", class: 'control-label checkbox'
    .col-sm-10
      .checkbox
        = f.label :enable_ssl_verification do
          = f.check_box :enable_ssl_verification
          %strong Enable SSL verification
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
28
29
  .form-actions
    = f.submit "Add System Hook", class: "btn btn-create"
Valeriy Sizov's avatar
Valeriy Sizov committed
30
31
32
%hr

-if @hooks.any?
33
  .panel.panel-default
34
    .panel-heading
35
36
37
38
      System hooks (#{@hooks.count})
    %ul.well-list
      - @hooks.each do |hook|
        %li
39
          .list-item-name
Robert Speicher's avatar
Robert Speicher committed
40
            %strong= hook.url
41
            %p SSL Verification: #{hook.enable_ssl_verification ? "enabled" : "disabled"}
42

43
          .pull-right
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
44
45
            = link_to 'Test Hook', admin_hook_test_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"