gitlab-org--gitlab-foss/app/views/projects/hooks/index.html.haml

69 lines
2.6 KiB
Plaintext
Raw Normal View History

%h3.page-title
Web hooks
%p.light
#{link_to "Web hooks ", help_page_path("web_hooks", "web_hooks"), class: "vlink"} can be
2014-01-07 14:19:45 +00:00
used for binding events when something is happening within the project.
%hr.clearfix
2012-01-08 11:20:20 +00:00
= form_for [@project, @hook], as: :hook, url: project_hooks_path(@project), html: { class: 'form-horizontal' } do |f|
2012-04-26 17:43:12 +00:00
-if @hook.errors.any?
.alert.alert-danger
2012-04-26 17:43:12 +00:00
- @hook.errors.full_messages.each do |msg|
%p= msg
.form-group
= f.label :url, "URL", class: 'control-label'
.col-sm-10
= f.text_field :url, class: "form-control", placeholder: 'http://example.com/trigger-ci.json'
.form-group
= f.label :url, "Trigger", class: 'control-label'
.col-sm-10
%div
= f.check_box :push_events, class: 'pull-left'
.prepend-left-20
= f.label :push_events, class: 'list-label' do
%strong Push events
%p.light
2014-01-07 14:19:45 +00:00
This url will be triggered by a push to the repository
%div
= f.check_box :tag_push_events, class: 'pull-left'
.prepend-left-20
= f.label :tag_push_events, class: 'list-label' do
%strong Tag push events
%p.light
This url will be triggered when a new tag is pushed to the repository
%div
= f.check_box :issues_events, class: 'pull-left'
.prepend-left-20
= f.label :issues_events, class: 'list-label' do
%strong Issues events
%p.light
2014-01-07 14:19:45 +00:00
This url will be triggered when an issue is created
%div
= f.check_box :merge_requests_events, class: 'pull-left'
.prepend-left-20
= f.label :merge_requests_events, class: 'list-label' do
%strong Merge Request events
%p.light
2014-01-07 14:19:45 +00:00
This url will be triggered when a merge request is created
.form-actions
= f.submit "Add Web Hook", class: "btn btn-create"
2012-03-05 22:29:40 +00:00
-if @hooks.any?
.panel.panel-default
2013-07-13 17:36:21 +00:00
.title
Web hooks (#{@hooks.count})
2013-06-19 19:55:49 +00:00
%ul.well-list
- @hooks.each do |hook|
%li
2013-01-30 14:40:43 +00:00
.pull-right
= link_to 'Test Hook', test_project_hook_path(@project, hook), class: "btn btn-small btn-grouped"
= link_to 'Remove', project_hook_path(@project, hook), data: { confirm: 'Are you sure?'}, method: :delete, class: "btn btn-remove btn-small btn-grouped"
.clearfix
%span.monospace= hook.url
%p
- %w(push_events tag_push_events issues_events merge_requests_events).each do |trigger|
- if hook.send(trigger)
%span.label.label-gray= trigger.titleize