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
0
Merge Requests
0
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
Tatuya Kamada
gitlab-ce
Commits
9f0d7945
Commit
9f0d7945
authored
Dec 30, 2016
by
Jose Ivan Vargas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved the webhooks and services gear options to a single one called integrations
parent
61b6643e
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
32 additions
and
15 deletions
+32
-15
app/controllers/projects/hooks_controller.rb
app/controllers/projects/hooks_controller.rb
+3
-4
app/controllers/projects/services_controller.rb
app/controllers/projects/services_controller.rb
+1
-1
app/controllers/projects/settings/integrations_controller.rb
app/controllers/projects/settings/integrations_controller.rb
+18
-0
app/helpers/gitlab_routing_helper.rb
app/helpers/gitlab_routing_helper.rb
+3
-0
app/views/layouts/nav/_project_settings.html.haml
app/views/layouts/nav/_project_settings.html.haml
+3
-7
app/views/projects/hooks/_index.html.haml
app/views/projects/hooks/_index.html.haml
+0
-0
app/views/projects/services/_index.html.haml
app/views/projects/services/_index.html.haml
+0
-2
app/views/projects/settings/integrations/show.html.haml
app/views/projects/settings/integrations/show.html.haml
+3
-0
config/routes/project.rb
config/routes/project.rb
+1
-1
No files found.
app/controllers/projects/hooks_controller.rb
View file @
9f0d7945
...
@@ -7,8 +7,7 @@ class Projects::HooksController < Projects::ApplicationController
...
@@ -7,8 +7,7 @@ class Projects::HooksController < Projects::ApplicationController
layout
"project_settings"
layout
"project_settings"
def
index
def
index
@hooks
=
@project
.
hooks
redirect_to
namespace_project_settings_integrations_path
(
@project
.
namespace
,
@project
)
@hook
=
ProjectHook
.
new
end
end
def
create
def
create
...
@@ -16,7 +15,7 @@ class Projects::HooksController < Projects::ApplicationController
...
@@ -16,7 +15,7 @@ class Projects::HooksController < Projects::ApplicationController
@hook
.
save
@hook
.
save
if
@hook
.
valid?
if
@hook
.
valid?
redirect_to
namespace_project_
hook
s_path
(
@project
.
namespace
,
@project
)
redirect_to
namespace_project_
settings_integration
s_path
(
@project
.
namespace
,
@project
)
else
else
@hooks
=
@project
.
hooks
.
select
(
&
:persisted?
)
@hooks
=
@project
.
hooks
.
select
(
&
:persisted?
)
render
:index
render
:index
...
@@ -44,7 +43,7 @@ class Projects::HooksController < Projects::ApplicationController
...
@@ -44,7 +43,7 @@ class Projects::HooksController < Projects::ApplicationController
def
destroy
def
destroy
hook
.
destroy
hook
.
destroy
redirect_to
namespace_project_
hook
s_path
(
@project
.
namespace
,
@project
)
redirect_to
namespace_project_
settings_integration
s_path
(
@project
.
namespace
,
@project
)
end
end
private
private
...
...
app/controllers/projects/services_controller.rb
View file @
9f0d7945
...
@@ -10,7 +10,7 @@ class Projects::ServicesController < Projects::ApplicationController
...
@@ -10,7 +10,7 @@ class Projects::ServicesController < Projects::ApplicationController
layout
"project_settings"
layout
"project_settings"
def
index
def
index
@services
=
@project
.
find_or_initialize_services
redirect_to
namespace_project_settings_integrations_path
(
@project
.
namespace
,
@project
)
end
end
def
edit
def
edit
...
...
app/controllers/projects/settings/integrations_controller.rb
0 → 100644
View file @
9f0d7945
module
Projects
module
Settings
class
IntegrationsController
<
Projects
::
ApplicationController
include
ServiceParams
before_action
:authorize_admin_project!
layout
"project_settings"
def
show
@hooks
=
@project
.
hooks
@hook
=
ProjectHook
.
new
# Services
@services
=
@project
.
find_or_initialize_services
end
end
end
end
app/helpers/gitlab_routing_helper.rb
View file @
9f0d7945
...
@@ -208,6 +208,9 @@ module GitlabRoutingHelper
...
@@ -208,6 +208,9 @@ module GitlabRoutingHelper
end
end
# Settings
# Settings
def
project_settings_integrations_path
(
project
,
*
args
)
namespace_project_settings_integrations_path
(
project
.
namespace
,
project
,
*
args
)
end
def
project_settings_members_path
(
project
,
*
args
)
def
project_settings_members_path
(
project
,
*
args
)
namespace_project_settings_members_path
(
project
.
namespace
,
project
,
*
args
)
namespace_project_settings_members_path
(
project
.
namespace
,
project
,
*
args
)
end
end
...
...
app/views/layouts/nav/_project_settings.html.haml
View file @
9f0d7945
...
@@ -8,14 +8,10 @@
...
@@ -8,14 +8,10 @@
=
link_to
namespace_project_deploy_keys_path
(
@project
.
namespace
,
@project
),
title:
'Deploy Keys'
do
=
link_to
namespace_project_deploy_keys_path
(
@project
.
namespace
,
@project
),
title:
'Deploy Keys'
do
%span
%span
Deploy Keys
Deploy Keys
=
nav_link
(
controller: :
hook
s
)
do
=
nav_link
(
controller: :
integration
s
)
do
=
link_to
namespace_project_
hook
s_path
(
@project
.
namespace
,
@project
),
title:
'Webhooks'
do
=
link_to
namespace_project_
settings_integration
s_path
(
@project
.
namespace
,
@project
),
title:
'Webhooks'
do
%span
%span
Webhooks
Integrations
=
nav_link
(
controller: :services
)
do
=
link_to
namespace_project_services_path
(
@project
.
namespace
,
@project
),
title:
'Services'
do
%span
Services
=
nav_link
(
controller: :protected_branches
)
do
=
nav_link
(
controller: :protected_branches
)
do
=
link_to
namespace_project_protected_branches_path
(
@project
.
namespace
,
@project
),
title:
'Protected Branches'
do
=
link_to
namespace_project_protected_branches_path
(
@project
.
namespace
,
@project
),
title:
'Protected Branches'
do
%span
%span
...
...
app/views/projects/hooks/index.html.haml
→
app/views/projects/hooks/
_
index.html.haml
View file @
9f0d7945
File moved
app/views/projects/services/index.html.haml
→
app/views/projects/services/
_
index.html.haml
View file @
9f0d7945
-
page_title
"Services"
.row.prepend-top-default.append-bottom-default
.row.prepend-top-default.append-bottom-default
.col-lg-3
.col-lg-3
%h4
.prepend-top-0
%h4
.prepend-top-0
...
...
app/views/projects/settings/integrations/show.html.haml
0 → 100644
View file @
9f0d7945
-
page_title
'Integrations'
=
render
'projects/hooks/index'
=
render
'projects/services/index'
config/routes/project.rb
View file @
9f0d7945
...
@@ -307,9 +307,9 @@ constraints(ProjectUrlConstrainer.new) do
...
@@ -307,9 +307,9 @@ constraints(ProjectUrlConstrainer.new) do
end
end
end
end
end
end
namespace
:settings
do
namespace
:settings
do
resource
:members
,
only:
[
:show
]
resource
:members
,
only:
[
:show
]
resource
:integrations
,
only:
[
:show
]
end
end
# Since both wiki and repository routing contains wildcard characters
# Since both wiki and repository routing contains wildcard characters
...
...
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