Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEva Kadlecová <evka.kadl@gmail.com>2018-08-26 18:57:51 +0300
committerEva Kadlecová <evka.kadl@gmail.com>2018-09-17 15:04:16 +0300
commit4899dfcafe55ca2935d699f85c13fc35a8e16545 (patch)
tree3f768fdd885c2f2535d964c38c46649ef84f77db /app/controllers/projects/jobs_controller.rb
parent120ce02e5e7e72654cb42edddc25ff3b057ec136 (diff)
Redirect to the pipeline builds page when a build is canceled
Diffstat (limited to 'app/controllers/projects/jobs_controller.rb')
-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