summaryrefslogtreecommitdiff
path: root/app/finders
diff options
context:
space:
mode:
authorAlexis Reigel <alexis.reigel.ext@siemens.com>2018-06-13 11:18:47 +0200
committerAlexis Reigel <alexis.reigel.ext@siemens.com>2019-02-27 20:19:49 +0100
commit0fad7aa79c7925391b3586187a6da464bffbd49d (patch)
tree2e12e6c995cc0e3882f1fd4a1469bddf223707ef /app/finders
parentd3accd36a0fda4014979c916ef1c0a3875a30199 (diff)
downloadgitlab-ce-0fad7aa79c7925391b3586187a6da464bffbd49d.tar.gz
add tag filter to admin runners page
Diffstat (limited to 'app/finders')
-rw-r--r--app/finders/admin/runners_finder.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/finders/admin/runners_finder.rb b/app/finders/admin/runners_finder.rb
index 8d936b8121c..b2799565f57 100644
--- a/app/finders/admin/runners_finder.rb
+++ b/app/finders/admin/runners_finder.rb
@@ -11,6 +11,7 @@ class Admin::RunnersFinder < UnionFinder
search!
filter_by_status!
filter_by_runner_type!
+ filter_by_tag_list!
sort!
paginate!
@@ -44,6 +45,14 @@ class Admin::RunnersFinder < UnionFinder
filter_by!(:type_type, Ci::Runner::AVAILABLE_TYPES)
end
+ def filter_by_tag_list!
+ tag_list = @params[:tag_name].presence
+
+ if tag_list
+ @runners = @runners.tagged_with(tag_list)
+ end
+ end
+
def sort!
@runners = @runners.order_by(sort_key)
end