Feature #3898
closed
Pagination should be turned off by default in --csv mode
Added by Tomáš Strachota about 11 years ago.
Updated over 9 years ago.
Description
The pagination should be turned off by default when using csv output adapter. Csv is intended to be used primarily for machine processing so there's not much use in pagination. This behaviour can be overridden by passing --per-page implicitly.
Depends on: http://projects.theforeman.org/issues/3652
- Blocked by Feature #3652: Add explicit way for API consumers to specifiy all pages in an index request added
- Related to Bug #5073: [RFE] Ability to disable pagination added
- Bugzilla link set to 1142258
- Has duplicate Bug #8568: Hammer host list does not paginate correctly when interactive is set to "no" added
- Status changed from New to Ready For Testing
- Assignee set to Tom Caspy
- Pull request https://github.com/theforeman/hammer-cli-foreman/pull/160 added
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
- Status changed from Closed to New
- % Done changed from 100 to 0
I'm reopening the issue since the PR actually fixed something different. It only turns off interactivity but data returned from server remain paginated.
I'm sorry if the issue description wasn't clear enough. Please contact me if you need more details.
this is by design. the data can't return without pagination (imagine a query returning 100K results, which is definitely possible)
the idea is that the machine reading the data will go through the pagination programatically.
i.e. this pseudo code:
current_results = get first page
all results += current_results
while current_results.size < per_page
current_results = get next page
all_results += current_results
end
Tom Caspy wrote:
this is by design. the data can't return without pagination (imagine a query returning 100K results, which is definitely possible)
I would assume that we can increase the default page size when we are in batch mode, so instead of 20 results, you can query for 500 or 1000 at a time?
yes. there are page and per_page options.
- Has duplicate Bug #10313: hammer truncates output when interactive=false added
- Related to Bug #10534: hammer pagination output should be disabled by default or respect terminal size added
- Status changed from New to Duplicate
- Assignee deleted (
Tom Caspy)
Also available in: Atom
PDF