summaryrefslogtreecommitdiff
path: root/app/controllers/projects/jobs_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/projects/jobs_controller.rb')
-rw-r--r--app/controllers/projects/jobs_controller.rb14
1 files changed, 11 insertions, 3 deletions
diff --git a/app/controllers/projects/jobs_controller.rb b/app/controllers/projects/jobs_controller.rb
index b0f032a01e5..4189419c3ba 100644
--- a/app/controllers/projects/jobs_controller.rb
+++ b/app/controllers/projects/jobs_controller.rb
@@ -18,6 +18,7 @@ class Projects::JobsController < Projects::ApplicationController
before_action :authorize_create_proxy_build!, only: :proxy_websocket_authorize
before_action :verify_proxy_request!, only: :proxy_websocket_authorize
before_action :push_jobs_table_vue, only: [:index]
+ before_action :push_jobs_table_vue_search, only: [:index]
before_action do
push_frontend_feature_flag(:infinitely_collapsible_sections, @project, default_enabled: :yaml)
@@ -77,10 +78,13 @@ class Projects::JobsController < Projects::ApplicationController
end
def retry
- return respond_422 unless @build.retryable?
+ response = Ci::RetryJobService.new(project, current_user).execute(@build)
- build = Ci::Build.retry(@build, current_user)
- redirect_to build_path(build)
+ if response.success?
+ redirect_to build_path(response[:job])
+ else
+ respond_422
+ end
end
def play
@@ -269,4 +273,8 @@ class Projects::JobsController < Projects::ApplicationController
def push_jobs_table_vue
push_frontend_feature_flag(:jobs_table_vue, @project, default_enabled: :yaml)
end
+
+ def push_jobs_table_vue_search
+ push_frontend_feature_flag(:jobs_table_vue_search, @project, default_enabled: :yaml)
+ end
end