diff options
author | Greg Stark <stark@gitlab.com> | 2018-01-11 16:22:52 +0300 |
---|---|---|
committer | Greg Stark <stark@gitlab.com> | 2018-01-11 20:45:42 +0300 |
commit | b64b7d70038fcf38495f67bc2f9cb320c2c168e7 (patch) | |
tree | 3c27fcf014677507de71c08cb0ddaee94de65357 /app | |
parent | 2f585071cba37b2b85f3148460d98c415a1df2d8 (diff) |
Use simple Next/Prev paging for jobs to avoid large count queries on arbitrarily large sets of historical jobs
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/projects/jobs_controller.rb | 2 | ||||
-rw-r--r-- | app/views/projects/jobs/_table.html.haml | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/projects/jobs_controller.rb b/app/controllers/projects/jobs_controller.rb index 4865ec3dfe5..8b54ba3ad7c 100644 --- a/app/controllers/projects/jobs_controller.rb +++ b/app/controllers/projects/jobs_controller.rb @@ -29,7 +29,7 @@ class Projects::JobsController < Projects::ApplicationController :project, :tags ]) - @builds = @builds.page(params[:page]).per(30) + @builds = @builds.page(params[:page]).per(30).without_count end def cancel_all diff --git a/app/views/projects/jobs/_table.html.haml b/app/views/projects/jobs/_table.html.haml index 82806f022ee..d124d3ebfc1 100644 --- a/app/views/projects/jobs/_table.html.haml +++ b/app/views/projects/jobs/_table.html.haml @@ -22,4 +22,4 @@ = render partial: "projects/ci/builds/build", collection: builds, as: :build, locals: { commit_sha: true, ref: true, pipeline_link: true, stage: true, allow_retry: true, admin: admin } - = paginate builds, theme: 'gitlab' + = paginate_collection(builds) |