Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/finders/environments/environments_finder.rb')
-rw-r--r--app/finders/environments/environments_finder.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/finders/environments/environments_finder.rb b/app/finders/environments/environments_finder.rb
index 46c49f096c6..f2dcba04349 100644
--- a/app/finders/environments/environments_finder.rb
+++ b/app/finders/environments/environments_finder.rb
@@ -14,6 +14,7 @@ module Environments
def execute
environments = project.environments
+ environments = by_type(environments)
environments = by_name(environments)
environments = by_search(environments)
environments = by_ids(environments)
@@ -24,6 +25,12 @@ module Environments
private
+ def by_type(environments)
+ return environments unless params[:type].present?
+
+ environments.for_type(params[:type])
+ end
+
def by_name(environments)
if params[:name].present?
environments.for_name(params[:name])