diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-10-27 17:46:58 +0100 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-10-27 17:46:58 +0100 |
commit | 5b8e0f17a8e77bf4cbdb4ed61d116d29d9f3c9c7 (patch) | |
tree | 606bd29af2da226a85c1aa1953c2c2a21d476d84 /app/controllers/projects/runners_controller.rb | |
parent | 35d433a3200b64f80a21b940f68d97a4392611f2 (diff) | |
parent | 940d68cc4c349b574166b010666a36cf25f485b7 (diff) | |
download | gitlab-ce-ci-details.tar.gz |
Merge branch 'master' into ci-detailsci-details
Diffstat (limited to 'app/controllers/projects/runners_controller.rb')
-rw-r--r-- | app/controllers/projects/runners_controller.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/app/controllers/projects/runners_controller.rb b/app/controllers/projects/runners_controller.rb index deb07a21416..bfbcf2567f3 100644 --- a/app/controllers/projects/runners_controller.rb +++ b/app/controllers/projects/runners_controller.rb @@ -6,11 +6,10 @@ class Projects::RunnersController < Projects::ApplicationController layout 'project_settings' def index - @runners = @ci_project.runners.order('id DESC') - @specific_runners = - Ci::Runner.specific.includes(:runner_projects). - where(Ci::RunnerProject.table_name => { project_id: current_user.authorized_projects } ). - where.not(id: @runners).order("#{Ci::Runner.table_name}.id DESC").page(params[:page]).per(20) + @runners = @ci_project.runners.ordered + @specific_runners = current_user.ci_authorized_runners. + where.not(id: @ci_project.runners). + ordered.page(params[:page]).per(20) @shared_runners = Ci::Runner.shared.active @shared_runners_count = @shared_runners.count(:all) end |