summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorEva Kadlecová <evka.kadl@gmail.com>2018-08-26 17:57:51 +0200
committerEva Kadlecová <evka.kadl@gmail.com>2018-09-17 14:04:16 +0200
commit4899dfcafe55ca2935d699f85c13fc35a8e16545 (patch)
tree3f768fdd885c2f2535d964c38c46649ef84f77db /app/controllers
parent120ce02e5e7e72654cb42edddc25ff3b057ec136 (diff)
downloadgitlab-ce-4899dfcafe55ca2935d699f85c13fc35a8e16545.tar.gz
Redirect to the pipeline builds page when a build is canceled
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/projects/jobs_controller.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/app/controllers/projects/jobs_controller.rb b/app/controllers/projects/jobs_controller.rb
index e69faae754a..009d8afd523 100644
--- a/app/controllers/projects/jobs_controller.rb
+++ b/app/controllers/projects/jobs_controller.rb
@@ -1,5 +1,6 @@
class Projects::JobsController < Projects::ApplicationController
include SendFileUpload
+ include ContinueParams
before_action :build, except: [:index, :cancel_all]
before_action :authorize_read_build!
@@ -101,7 +102,12 @@ class Projects::JobsController < Projects::ApplicationController
return respond_422 unless @build.cancelable?
@build.cancel
- redirect_to build_path(@build)
+
+ if continue_params
+ redirect_to continue_params[:to]
+ else
+ redirect_to builds_project_pipeline_path(@project, @build.pipeline.id)
+ end
end
def status