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/ci/runner_jobs_finder.rb')
-rw-r--r--app/finders/ci/runner_jobs_finder.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/app/finders/ci/runner_jobs_finder.rb b/app/finders/ci/runner_jobs_finder.rb
index b659eda6646..91d8eccff21 100644
--- a/app/finders/ci/runner_jobs_finder.rb
+++ b/app/finders/ci/runner_jobs_finder.rb
@@ -13,7 +13,13 @@ module Ci
end
def execute
- items = @runner.builds
+ items = if params[:system_id].blank?
+ runner.builds
+ else
+ runner_manager = Ci::RunnerManager.for_runner(runner).with_system_xid(params[:system_id]).first
+ Ci::Build.belonging_to_runner_manager(runner_manager&.id)
+ end
+
items = by_permission(items)
items = by_status(items)
sort_items(items)