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:
Diffstat (limited to 'app/controllers/projects/jobs_controller.rb')
-rw-r--r--app/controllers/projects/jobs_controller.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/app/controllers/projects/jobs_controller.rb b/app/controllers/projects/jobs_controller.rb
index 7878ace5015..557ac566733 100644
--- a/app/controllers/projects/jobs_controller.rb
+++ b/app/controllers/projects/jobs_controller.rb
@@ -20,6 +20,9 @@ class Projects::JobsController < Projects::ApplicationController
before_action :verify_proxy_request!, only: :proxy_websocket_authorize
before_action :push_job_log_jump_to_failures, only: [:show]
before_action :reject_if_build_artifacts_size_refreshing!, only: [:erase]
+ before_action do
+ push_frontend_feature_flag(:graphql_job_app, project, type: :development)
+ end
layout 'project'
@@ -120,11 +123,13 @@ class Projects::JobsController < Projects::ApplicationController
end
def erase
- if @build.erase(erased_by: current_user)
+ service_response = Ci::BuildEraseService.new(@build, current_user).execute
+
+ if service_response.success?
redirect_to project_job_path(project, @build),
notice: _("Job has been successfully erased!")
else
- respond_422
+ head service_response.http_status
end
end