summaryrefslogtreecommitdiff
path: root/app/finders
diff options
context:
space:
mode:
authorPeter Leitzen <pleitzen@gitlab.com>2018-10-12 14:10:34 +0000
committerSean McGivern <sean@mcgivern.me.uk>2018-10-12 14:10:34 +0000
commit4d9ede0be7ea4dae92d224454616f9e65da0a3e1 (patch)
treeb21808ddd85a2114bea1502a6ec06b16894e0ef2 /app/finders
parent0047869c27f0aede95f20de41c8498b7c23bf08d (diff)
downloadgitlab-ce-4d9ede0be7ea4dae92d224454616f9e65da0a3e1.tar.gz
Backport CE changes for Ops Dashboard in EE
Diffstat (limited to 'app/finders')
-rw-r--r--app/finders/projects_finder.rb27
1 files changed, 16 insertions, 11 deletions
diff --git a/app/finders/projects_finder.rb b/app/finders/projects_finder.rb
index c2404412006..6ececcd4152 100644
--- a/app/finders/projects_finder.rb
+++ b/app/finders/projects_finder.rb
@@ -42,17 +42,7 @@ class ProjectsFinder < UnionFinder
init_collection
end
- collection = by_ids(collection)
- collection = by_personal(collection)
- collection = by_starred(collection)
- collection = by_trending(collection)
- collection = by_visibilty_level(collection)
- collection = by_tags(collection)
- collection = by_search(collection)
- collection = by_archived(collection)
- collection = by_custom_attributes(collection)
- collection = by_deleted_status(collection)
-
+ collection = filter_projects(collection)
sort(collection)
end
@@ -66,6 +56,21 @@ class ProjectsFinder < UnionFinder
end
end
+ # EE would override this to add more filters
+ def filter_projects(collection)
+ collection = by_ids(collection)
+ collection = by_personal(collection)
+ collection = by_starred(collection)
+ collection = by_trending(collection)
+ collection = by_visibilty_level(collection)
+ collection = by_tags(collection)
+ collection = by_search(collection)
+ collection = by_archived(collection)
+ collection = by_custom_attributes(collection)
+ collection = by_deleted_status(collection)
+ collection
+ end
+
# rubocop: disable CodeReuse/ActiveRecord
def collection_with_user
if owned_projects?