diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2018-01-12 14:03:04 +0000 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2018-01-12 14:03:04 +0000 |
commit | 140935fbfd68bcf883d3f232e278b90896ee8d84 (patch) | |
tree | c7e333c539bafc87a0492ef419481a430e2e4634 | |
parent | 977c9b2ac5e745475b1e9347a8b1eede9934c952 (diff) | |
parent | b64b7d70038fcf38495f67bc2f9cb320c2c168e7 (diff) | |
download | gitlab-ce-140935fbfd68bcf883d3f232e278b90896ee8d84.tar.gz |
Merge branch 'disable-pages-on-jobs' into 'master'
Use simple Next/Prev paging for CI Jobs page
Closes #41058
See merge request gitlab-org/gitlab-ce!16392
-rw-r--r-- | app/controllers/projects/jobs_controller.rb | 2 | ||||
-rw-r--r-- | app/views/projects/jobs/_table.html.haml | 2 | ||||
-rw-r--r-- | changelogs/unreleased/disable-pages-on-jobs.yml | 6 |
3 files changed, 8 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) diff --git a/changelogs/unreleased/disable-pages-on-jobs.yml b/changelogs/unreleased/disable-pages-on-jobs.yml new file mode 100644 index 00000000000..629768efce1 --- /dev/null +++ b/changelogs/unreleased/disable-pages-on-jobs.yml @@ -0,0 +1,6 @@ +--- +title: Use simple Next/Prev paging for jobs to avoid large count queries on arbitrarily + large sets of historical jobs +merge_request: +author: +type: performance |