diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-12-07 15:23:23 +0300 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-12-10 18:04:08 +0300 |
commit | 2988e1fbf50b3c9e803a9358933e3e969e64dcc3 (patch) | |
tree | a131797c706f2dba8081fb96ef61660f9f02510a /app/controllers/projects/ci_services_controller.rb | |
parent | 4e5897f51ef97d7c3ff6c57f81521f552979a3da (diff) |
Migrate CI::Services and CI::WebHooks to Services and WebHooks
Diffstat (limited to 'app/controllers/projects/ci_services_controller.rb')
-rw-r--r-- | app/controllers/projects/ci_services_controller.rb | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/app/controllers/projects/ci_services_controller.rb b/app/controllers/projects/ci_services_controller.rb deleted file mode 100644 index 550a019e8e2..00000000000 --- a/app/controllers/projects/ci_services_controller.rb +++ /dev/null @@ -1,49 +0,0 @@ -class Projects::CiServicesController < Projects::ApplicationController - before_action :ci_project - before_action :authorize_admin_project! - - layout "project_settings" - - def index - @ci_project.build_missing_services - @services = @ci_project.services.reload - end - - def edit - service - end - - def update - if service.update_attributes(service_params) - redirect_to edit_namespace_project_ci_service_path(@project.namespace, @project, service.to_param) - else - render 'edit' - end - end - - def test - last_build = @project.ci_builds.last - - if service.execute(last_build) - message = { notice: 'We successfully tested the service' } - else - message = { alert: 'We tried to test the service but error occurred' } - end - - redirect_back_or_default(options: message) - end - - private - - def service - @service ||= @ci_project.services.find { |service| service.to_param == params[:id] } - end - - def service_params - params.require(:service).permit( - :type, :active, :webhook, :notify_only_broken_builds, - :email_recipients, :email_only_broken_builds, :email_add_pusher, - :hipchat_token, :hipchat_room, :hipchat_server - ) - end -end |