summaryrefslogtreecommitdiff
path: root/app/controllers/admin/runners_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/admin/runners_controller.rb')
-rw-r--r--app/controllers/admin/runners_controller.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/controllers/admin/runners_controller.rb b/app/controllers/admin/runners_controller.rb
index 6c76c55a9d4..090149fc1e2 100644
--- a/app/controllers/admin/runners_controller.rb
+++ b/app/controllers/admin/runners_controller.rb
@@ -1,6 +1,7 @@
class Admin::RunnersController < Admin::ApplicationController
before_action :runner, except: :index
+ # rubocop: disable CodeReuse/ActiveRecord
def index
sort = params[:sort] == 'contacted_asc' ? { contacted_at: :asc } : { id: :desc }
@runners = Ci::Runner.order(sort)
@@ -8,6 +9,7 @@ class Admin::RunnersController < Admin::ApplicationController
@runners = @runners.page(params[:page]).per(30)
@active_runners_cnt = Ci::Runner.online.count
end
+ # rubocop: enable CodeReuse/ActiveRecord
def show
assign_builds_and_projects
@@ -57,6 +59,7 @@ class Admin::RunnersController < Admin::ApplicationController
params.require(:runner).permit(Ci::Runner::FORM_EDITABLE)
end
+ # rubocop: disable CodeReuse/ActiveRecord
def assign_builds_and_projects
@builds = runner.builds.order('id DESC').first(30)
@projects =
@@ -69,4 +72,5 @@ class Admin::RunnersController < Admin::ApplicationController
@projects = @projects.where.not(id: runner.projects.select(:id)) if runner.projects.any?
@projects = @projects.page(params[:page]).per(30)
end
+ # rubocop: enable CodeReuse/ActiveRecord
end