diff options
author | Alexis Reigel <alexis.reigel.ext@siemens.com> | 2018-06-08 13:26:41 +0200 |
---|---|---|
committer | Alexis Reigel <alexis.reigel.ext@siemens.com> | 2018-08-20 17:15:11 +0200 |
commit | 16d12491c538121a4634ae69403cd66497bee82a (patch) | |
tree | 99c54aff76f92e4272088e46ac6f20ae419e4547 /app/controllers/admin/runners_controller.rb | |
parent | bbc305b1a24785d780fe0672d9e49f2c53af463b (diff) | |
download | gitlab-ce-16d12491c538121a4634ae69403cd66497bee82a.tar.gz |
add status filter to admin runners page
Diffstat (limited to 'app/controllers/admin/runners_controller.rb')
-rw-r--r-- | app/controllers/admin/runners_controller.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/controllers/admin/runners_controller.rb b/app/controllers/admin/runners_controller.rb index 6c76c55a9d4..ef2f9fadca0 100644 --- a/app/controllers/admin/runners_controller.rb +++ b/app/controllers/admin/runners_controller.rb @@ -5,6 +5,7 @@ class Admin::RunnersController < Admin::ApplicationController sort = params[:sort] == 'contacted_asc' ? { contacted_at: :asc } : { id: :desc } @runners = Ci::Runner.order(sort) @runners = @runners.search(params[:search]) if params[:search].present? + @runners = @runners.public_send(params[:status]) if params[:status].present? && Ci::Runner::AVAILABLE_STATUSES.include?(params[:status]) @runners = @runners.page(params[:page]).per(30) @active_runners_cnt = Ci::Runner.online.count end |