-
Notifications
You must be signed in to change notification settings - Fork 104
Correct default number of items per page #4312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
The PR preview for c56797d is available at theforeman-foreman-documentation-preview-pr-4312.surge.sh The following output files are affected by this PR: |
guides/common/modules/proc_using-searches-with-pagination-control.adoc
Outdated
Show resolved
Hide resolved
guides/common/modules/proc_using-searches-with-pagination-control.adoc
Outdated
Show resolved
Hide resolved
guides/common/modules/proc_using-searches-with-pagination-control.adoc
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost there
guides/common/modules/proc_using-searches-with-pagination-control.adoc
Outdated
Show resolved
Hide resolved
Thanks @waldirio! You have my ack :) Now we need a tech ack to confirm the technical validity of the change. I'll ask the engineers. |
@waldirio Do you happen to know which versions of Foreman/Satellite this applies to? Just so we know which versions the fix should be cherry-picked to. |
I'm setting |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we mention the entries_per_page
setting?
The `per_page` parameter specifies the number of results per page and the `page` parameter specifies which page, as calculated by the `per_page` parameter, to return. | ||
|
||
The default number of items to return is set to 1000 when you do not specify any pagination parameters, but the `per_page` value has a default of 20 which applies when you specify the `page` parameter. | ||
The default number of items to be presented is set to `20`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/theforeman/foreman/blob/d048dc1e435cf3dd5d391607cdc7928f6713ee87/config/initializers/core_extensions.rb#L13-L18 is the logic for that. So it's the entries_per_page
setting with a fallback to 20. The entries_per_page
setting also defaults to 20 (https://github.com/theforeman/foreman/blob/d048dc1e435cf3dd5d391607cdc7928f6713ee87/config/initializers/f_foreman_settings_general.rb#L18-L22) but can obviously be changed by users.
This behavior dates back to theforeman/foreman@454fd3a (2011).
What changes are you introducing?
Fixing the wrong information.
Why are you introducing these changes? (Explanation, links to references, issues, etc.)
It's not accurate.
Anything else to add? (Considerations, potential downsides, alternative solutions you have explored, etc.)
Contributor checklists
Please cherry-pick my commits into: