Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
4c772d9b
Commit
4c772d9b
authored
Apr 26, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Project webhooks updated UI
Closes #13993
parent
6ff740ff
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
101 additions
and
85 deletions
+101
-85
app/assets/stylesheets/framework/typography.scss
app/assets/stylesheets/framework/typography.scss
+10
-0
app/views/projects/hooks/_project_hook.html.haml
app/views/projects/hooks/_project_hook.html.haml
+15
-0
app/views/projects/hooks/index.html.haml
app/views/projects/hooks/index.html.haml
+76
-85
No files found.
app/assets/stylesheets/framework/typography.scss
View file @
4c772d9b
...
@@ -205,6 +205,10 @@ h1, h2, h3, h4, h5, h6 {
...
@@ -205,6 +205,10 @@ h1, h2, h3, h4, h5, h6 {
font-weight
:
600
;
font-weight
:
600
;
}
}
.light-header
{
font-weight
:
600
;
}
/** CODE **/
/** CODE **/
pre
{
pre
{
font-family
:
$monospace_font
;
font-family
:
$monospace_font
;
...
@@ -259,3 +263,9 @@ h1, h2, h3, h4 {
...
@@ -259,3 +263,9 @@ h1, h2, h3, h4 {
color
:
$gl-gray
;
color
:
$gl-gray
;
}
}
}
}
.text-right-lg
{
@media
(
min-width
:
$screen-lg-min
)
{
text-align
:
right
;
}
}
app/views/projects/hooks/_project_hook.html.haml
0 → 100644
View file @
4c772d9b
%li
.row
.col-md-8.col-lg-7
%strong
.light-header
=
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.deploy-project-label
=
trigger
.
titleize
.col-md-4.col-lg-5.text-right-lg.prepend-top-5
%span
.append-right-10.inline
SSL Verification:
#{
hook
.
enable_ssl_verification
?
"enabled"
:
"disabled"
}
=
link_to
"Test"
,
test_namespace_project_hook_path
(
@project
.
namespace
,
@project
,
hook
),
class:
"btn btn-sm"
=
link_to
namespace_project_hook_path
(
@project
.
namespace
,
@project
,
hook
),
data:
{
confirm:
'Are you sure?'
},
method: :delete
,
class:
"btn btn-transparent"
do
%span
.sr-only
Remove
=
icon
(
'trash'
)
app/views/projects/hooks/index.html.haml
View file @
4c772d9b
-
page_title
"Webhooks"
-
page_title
"Webhooks"
%h3
.page-title
.row.prepend-top-default
Webhooks
.col-lg-3.profile-settings-sidebar
%h4
.prepend-top-0
%p
.light
=
page_title
#{
link_to
"Webhooks "
,
help_page_path
(
"web_hooks"
,
"web_hooks"
),
class:
"vlink"
}
can be
%p
#{
link_to
"Webhooks"
,
help_page_path
(
"web_hooks"
,
"web_hooks"
)
}
can be
used for binding events when something is happening within the project.
used for binding events when something is happening within the project.
.col-lg-9.append-bottom-default
%hr
.clearfix
%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
),
html:
{
class:
'form-horizontal'
}
do
|
f
|
=
form_for
[
@project
.
namespace
.
becomes
(
Namespace
),
@project
,
@hook
],
as: :hook
,
url:
namespace_project_hooks_path
(
@project
.
namespace
,
@project
)
do
|
f
|
=
form_errors
(
@hook
)
=
form_errors
(
@hook
)
.form-group
.form-group
=
f
.
label
:url
,
"URL"
,
class:
'control-label'
=
f
.
label
:url
,
"URL"
,
class:
"label-light"
.col-sm-10
=
f
.
text_field
:url
,
class:
"form-control"
,
placeholder:
"http://example.com/trigger-ci.json"
=
f
.
text_field
:url
,
class:
"form-control"
,
placeholder:
'http://example.com/trigger-ci.json'
.form-group
.form-group
=
f
.
label
:url
,
"Trigger"
,
class:
'control-label'
=
f
.
label
:url
,
"Trigger"
,
class:
"label-light"
.col-sm-10.prepend-top-10
%div
%div
=
f
.
check_box
:push_events
,
class:
'pull-left'
=
f
.
check_box
:push_events
,
class:
"pull-left"
.prepend-left-20
.prepend-left-20
=
f
.
label
:push_events
,
class:
'list-label'
do
=
f
.
label
:push_events
,
class:
"label-light append-bottom-0"
do
%strong
Push events
Push events
%p
.light
%p
.light
This url will be triggered by a push to the repository
This url will be triggered by a push to the repository
%div
%div
=
f
.
check_box
:tag_push_events
,
class:
'pull-left'
=
f
.
check_box
:tag_push_events
,
class:
"pull-left"
.prepend-left-20
.prepend-left-20
=
f
.
label
:tag_push_events
,
class:
'list-label'
do
=
f
.
label
:tag_push_events
,
class:
"label-light append-bottom-0"
do
%strong
Tag push events
Tag push events
%p
.light
%p
.light
This url will be triggered when a new tag is pushed to the repository
This url will be triggered when a new tag is pushed to the repository
%div
%div
=
f
.
check_box
:note_events
,
class:
'pull-left'
=
f
.
check_box
:note_events
,
class:
"pull-left"
.prepend-left-20
.prepend-left-20
=
f
.
label
:note_events
,
class:
'list-label'
do
=
f
.
label
:note_events
,
class:
"label-light append-bottom-0"
do
%strong
Comments
Comments
%p
.light
%p
.light
This url will be triggered when someone adds a comment
This url will be triggered when someone adds a comment
%div
%div
=
f
.
check_box
:issues_events
,
class:
'pull-left'
=
f
.
check_box
:issues_events
,
class:
"pull-left"
.prepend-left-20
.prepend-left-20
=
f
.
label
:issues_events
,
class:
'list-label'
do
=
f
.
label
:issues_events
,
class:
"label-light append-bottom-0"
do
%strong
Issues events
Issues events
%p
.light
%p
.light
This url will be triggered when an issue is created/updated/merged
This url will be triggered when an issue is created/updated/merged
%div
%div
=
f
.
check_box
:merge_requests_events
,
class:
'pull-left'
=
f
.
check_box
:merge_requests_events
,
class:
"pull-left"
.prepend-left-20
.prepend-left-20
=
f
.
label
:merge_requests_events
,
class:
'list-label'
do
=
f
.
label
:merge_requests_events
,
class:
"label-light append-bottom-0"
do
%strong
Merge Request events
Merge Request events
%p
.light
%p
.light
This url will be triggered when a merge request is created/updated/merged
This url will be triggered when a merge request is created/updated/merged
%div
%div
=
f
.
check_box
:build_events
,
class:
'pull-left'
=
f
.
check_box
:build_events
,
class:
"pull-left"
.prepend-left-20
.prepend-left-20
=
f
.
label
:build_events
,
class:
'list-label'
do
=
f
.
label
:build_events
,
class:
"label-light append-bottom-0"
do
%strong
Build events
Build events
%p
.light
%p
.light
This url will be triggered when the build status changes
This url will be triggered when the build status changes
.form-group
.form-group
=
f
.
label
:enable_ssl_verification
,
"SSL verification"
,
class:
'control-label checkbox'
=
f
.
label
:enable_ssl_verification
,
"SSL verification"
,
class:
"label-light"
.col-sm-10
%div
.checkbox
=
f
.
check_box
:enable_ssl_verification
,
class:
"pull-left"
=
f
.
label
:enable_ssl_verification
do
.prepend-left-20
=
f
.
check_box
:enable_ssl_verification
=
f
.
label
:enable_ssl_verification
,
class:
"label-light append-bottom-0"
do
%strong
Enable SSL verification
Enable SSL verification
.form-actions
=
f
.
submit
"Add Webhook"
,
class:
"btn btn-create"
=
f
.
submit
"Add Webhook"
,
class:
"btn btn-create"
%hr
-
if
@hooks
.
any?
%h5
.prepend-top-default
.panel.panel-default
.panel-heading
Webhooks (
#{
@hooks
.
count
}
)
Webhooks (
#{
@hooks
.
count
}
)
%ul
.content-list
-
if
@hooks
.
any?
%ul
.well-list
-
@hooks
.
each
do
|
hook
|
-
@hooks
.
each
do
|
hook
|
%li
=
render
"project_hook"
,
hook:
hook
.controls
-
else
=
link_to
'Test Hook'
,
test_namespace_project_hook_path
(
@project
.
namespace
,
@project
,
hook
),
class:
"btn btn-sm btn-grouped"
%p
.profile-settings-message.text-center.append-bottom-0
=
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"
No webhooks found, add one in the form above.
.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"
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment