summaryrefslogtreecommitdiff
path: root/app/views/projects/hooks/index.html.haml
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2016-04-26 10:56:18 +0100
committerPhil Hughes <me@iamphill.com>2016-04-26 10:56:18 +0100
commit4c772d9bc849e21349d6b01701db9beccf903c44 (patch)
tree5285465be984078fae4cbbfde30e56cd4cc9b767 /app/views/projects/hooks/index.html.haml
parent6ff740ff9484691750f3eadf12125fd362efe61c (diff)
downloadgitlab-ce-4c772d9bc849e21349d6b01701db9beccf903c44.tar.gz
Project webhooks updated UI
Closes #13993
Diffstat (limited to 'app/views/projects/hooks/index.html.haml')
-rw-r--r--app/views/projects/hooks/index.html.haml161
1 files changed, 76 insertions, 85 deletions
diff --git a/app/views/projects/hooks/index.html.haml b/app/views/projects/hooks/index.html.haml
index aae3abcad4b..6f1ee209430 100644
--- a/app/views/projects/hooks/index.html.haml
+++ b/app/views/projects/hooks/index.html.haml
@@ -1,88 +1,79 @@
- page_title "Webhooks"
-%h3.page-title
- Webhooks
+.row.prepend-top-default
+ .col-lg-3.profile-settings-sidebar
+ %h4.prepend-top-0
+ = page_title
+ %p
+ #{link_to "Webhooks", help_page_path("web_hooks", "web_hooks")} can be
+ used for binding events when something is happening within the project.
+ .col-lg-9.append-bottom-default
+ %h5.prepend-top-0
+ Add new webhook
+ = form_for [@project.namespace.becomes(Namespace), @project, @hook], as: :hook, url: namespace_project_hooks_path(@project.namespace, @project) do |f|
+ = form_errors(@hook)
-%p.light
- #{link_to "Webhooks ", help_page_path("web_hooks", "web_hooks"), class: "vlink"} can be
- used for binding events when something is happening within the project.
-
-%hr.clearfix
-
-= form_for [@project.namespace.becomes(Namespace), @project, @hook], as: :hook, url: namespace_project_hooks_path(@project.namespace, @project), html: { class: 'form-horizontal' } do |f|
- = form_errors(@hook)
-
- .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.prepend-top-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
- 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 :note_events, class: 'pull-left'
- .prepend-left-20
- = f.label :note_events, class: 'list-label' do
- %strong Comments
- %p.light
- This url will be triggered when someone adds a comment
- %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/updated/merged
- %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/updated/merged
- %div
- = f.check_box :build_events, class: 'pull-left'
- .prepend-left-20
- = f.label :build_events, class: 'list-label' do
- %strong Build events
- %p.light
- This url will be triggered when the build status changes
- .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
- .form-actions
- = f.submit "Add Webhook", class: "btn btn-create"
-
--if @hooks.any?
- .panel.panel-default
- .panel-heading
+ .form-group
+ = f.label :url, "URL", class: "label-light"
+ = f.text_field :url, class: "form-control", placeholder: "http://example.com/trigger-ci.json"
+ .form-group
+ = f.label :url, "Trigger", class: "label-light"
+ %div
+ = f.check_box :push_events, class: "pull-left"
+ .prepend-left-20
+ = f.label :push_events, class: "label-light append-bottom-0" do
+ Push events
+ %p.light
+ 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: "label-light append-bottom-0" do
+ Tag push events
+ %p.light
+ This url will be triggered when a new tag is pushed to the repository
+ %div
+ = f.check_box :note_events, class: "pull-left"
+ .prepend-left-20
+ = f.label :note_events, class: "label-light append-bottom-0" do
+ Comments
+ %p.light
+ This url will be triggered when someone adds a comment
+ %div
+ = f.check_box :issues_events, class: "pull-left"
+ .prepend-left-20
+ = f.label :issues_events, class: "label-light append-bottom-0" do
+ Issues events
+ %p.light
+ This url will be triggered when an issue is created/updated/merged
+ %div
+ = f.check_box :merge_requests_events, class: "pull-left"
+ .prepend-left-20
+ = f.label :merge_requests_events, class: "label-light append-bottom-0" do
+ Merge Request events
+ %p.light
+ This url will be triggered when a merge request is created/updated/merged
+ %div
+ = f.check_box :build_events, class: "pull-left"
+ .prepend-left-20
+ = f.label :build_events, class: "label-light append-bottom-0" do
+ Build events
+ %p.light
+ This url will be triggered when the build status changes
+ .form-group
+ = f.label :enable_ssl_verification, "SSL verification", class: "label-light"
+ %div
+ = f.check_box :enable_ssl_verification, class: "pull-left"
+ .prepend-left-20
+ = f.label :enable_ssl_verification, class: "label-light append-bottom-0" do
+ Enable SSL verification
+ = f.submit "Add Webhook", class: "btn btn-create"
+ %hr
+ %h5.prepend-top-default
Webhooks (#{@hooks.count})
- %ul.content-list
- - @hooks.each do |hook|
- %li
- .controls
- = link_to 'Test Hook', test_namespace_project_hook_path(@project.namespace, @project, hook), class: "btn btn-sm btn-grouped"
- = link_to 'Remove', namespace_project_hook_path(@project.namespace, @project, hook), data: { confirm: 'Are you sure?'}, method: :delete, class: "btn btn-remove btn-sm btn-grouped"
- .monospace= hook.url
- %div
- - %w(push_events tag_push_events issues_events note_events merge_requests_events build_events).each do |trigger|
- - if hook.send(trigger)
- %span.label.label-gray= trigger.titleize
- %span.label.label-gray SSL Verification: #{hook.enable_ssl_verification ? "enabled" : "disabled"}
+ - if @hooks.any?
+ %ul.well-list
+ - @hooks.each do |hook|
+ = render "project_hook", hook: hook
+ - else
+ %p.profile-settings-message.text-center.append-bottom-0
+ No webhooks found, add one in the form above.