summaryrefslogtreecommitdiff
path: root/app/views/admin/services/_form.html.haml
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-02-28 17:33:18 +0100
committerDouwe Maan <douwe@gitlab.com>2015-03-03 11:14:32 +0100
commitd57e809cbd56aea8a49c6595663fc4b7250c5a34 (patch)
tree495d73da8f7edad0852a856774ef907ca6bfac60 /app/views/admin/services/_form.html.haml
parent85fa334eb6fd2069287a660e6ffa2295ea3a787f (diff)
downloadgitlab-ce-d57e809cbd56aea8a49c6595663fc4b7250c5a34.tar.gz
Set supported events per project service.
Diffstat (limited to 'app/views/admin/services/_form.html.haml')
-rw-r--r--app/views/admin/services/_form.html.haml37
1 files changed, 37 insertions, 0 deletions
diff --git a/app/views/admin/services/_form.html.haml b/app/views/admin/services/_form.html.haml
index 5df8849317b..62f4001ca66 100644
--- a/app/views/admin/services/_form.html.haml
+++ b/app/views/admin/services/_form.html.haml
@@ -14,6 +14,43 @@
= preserve do
= markdown @service.help
+ .form-group
+ = f.label :url, "Trigger", class: 'control-label'
+ - if @service.supported_events.length > 1
+ .col-sm-10
+ - if @service.supported_events.include?("push")
+ %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
+ This url will be triggered by a push to the repository
+ - if @service.supported_events.include?("tag_push")
+ %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
+ - if @service.supported_events.include?("issue")
+ %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
+ This url will be triggered when an issue is created
+ - if @service.supported_events.include?("merge_request")
+ %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
+ This url will be triggered when a merge request is created
+
- @service.fields.each do |field|
- name = field[:name]
- value = @service.send(name) unless field[:type] == 'password'