diff options
author | Jose Ivan Vargas <jvargas@gitlab.com> | 2016-12-30 11:30:25 -0600 |
---|---|---|
committer | Jose Ivan Vargas <jvargas@gitlab.com> | 2017-01-18 15:19:35 -0600 |
commit | 9f0d794513d2ce1c990e61f4d21efe1dcad845fd (patch) | |
tree | 7a7b11f5ce6b42977855ef25fa87aec1a272a244 /app/controllers/projects | |
parent | 61b6643eae98640a7ea73152f0e8b1cde6e27386 (diff) | |
download | gitlab-ce-9f0d794513d2ce1c990e61f4d21efe1dcad845fd.tar.gz |
Moved the webhooks and services gear options to a single one called integrations
Diffstat (limited to 'app/controllers/projects')
-rw-r--r-- | app/controllers/projects/hooks_controller.rb | 7 | ||||
-rw-r--r-- | app/controllers/projects/services_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/projects/settings/integrations_controller.rb | 18 |
3 files changed, 22 insertions, 5 deletions
diff --git a/app/controllers/projects/hooks_controller.rb b/app/controllers/projects/hooks_controller.rb index 0ae8ff98009..8c52aa748ae 100644 --- a/app/controllers/projects/hooks_controller.rb +++ b/app/controllers/projects/hooks_controller.rb @@ -7,8 +7,7 @@ class Projects::HooksController < Projects::ApplicationController layout "project_settings" def index - @hooks = @project.hooks - @hook = ProjectHook.new + redirect_to namespace_project_settings_integrations_path(@project.namespace, @project) end def create @@ -16,7 +15,7 @@ class Projects::HooksController < Projects::ApplicationController @hook.save if @hook.valid? - redirect_to namespace_project_hooks_path(@project.namespace, @project) + redirect_to namespace_project_settings_integrations_path(@project.namespace, @project) else @hooks = @project.hooks.select(&:persisted?) render :index @@ -44,7 +43,7 @@ class Projects::HooksController < Projects::ApplicationController def destroy hook.destroy - redirect_to namespace_project_hooks_path(@project.namespace, @project) + redirect_to namespace_project_settings_integrations_path(@project.namespace, @project) end private diff --git a/app/controllers/projects/services_controller.rb b/app/controllers/projects/services_controller.rb index 30c2a5d9982..b4c40c6bf14 100644 --- a/app/controllers/projects/services_controller.rb +++ b/app/controllers/projects/services_controller.rb @@ -10,7 +10,7 @@ class Projects::ServicesController < Projects::ApplicationController layout "project_settings" def index - @services = @project.find_or_initialize_services + redirect_to namespace_project_settings_integrations_path(@project.namespace, @project) end def edit diff --git a/app/controllers/projects/settings/integrations_controller.rb b/app/controllers/projects/settings/integrations_controller.rb new file mode 100644 index 00000000000..07563e45865 --- /dev/null +++ b/app/controllers/projects/settings/integrations_controller.rb @@ -0,0 +1,18 @@ +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 |