Project

General

Profile

Actions

Feature #3898

closed

Pagination should be turned off by default in --csv mode

Added by Tomáš Strachota almost 11 years ago. Updated over 9 years ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
Hammer core
Target version:
-
Difficulty:
Triaged:
Team Backlog:
Fixed in Releases:
Found in Releases:
In Kanboard:

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


Related issues 5 (0 open5 closed)

Related to Hammer CLI - Bug #5073: [RFE] Ability to disable paginationClosed04/04/2014Actions
Related to Hammer CLI - Bug #10534: hammer pagination output should be disabled by default or respect terminal sizeClosedTomáš Strachota05/18/2015Actions
Has duplicate Foreman - Bug #8568: Hammer host list does not paginate correctly when interactive is set to "no"Duplicate12/03/2014Actions
Has duplicate Hammer CLI - Bug #10313: hammer truncates output when interactive=falseDuplicate04/29/2015Actions
Blocked by Foreman - Feature #3652: Add explicit way for API consumers to specifiy all pages in an index requestDuplicate11/14/2013Actions
Actions #1

Updated by Dominic Cleal almost 11 years ago

  • Blocked by Feature #3652: Add explicit way for API consumers to specifiy all pages in an index request added
Actions #2

Updated by Dominic Cleal over 10 years ago

  • Related to Bug #5073: [RFE] Ability to disable pagination added
Actions #3

Updated by Dominic Cleal about 10 years ago

  • Bugzilla link set to 1142258
Actions #4

Updated by Dominic Cleal almost 10 years ago

  • Has duplicate Bug #8568: Hammer host list does not paginate correctly when interactive is set to "no" added
Actions #5

Updated by Tom Caspy almost 10 years ago

  • 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
Actions #6

Updated by Anonymous almost 10 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #7

Updated by Tomáš Strachota almost 10 years ago

  • 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.

Actions #8

Updated by Tom Caspy almost 10 years ago

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

Actions #9

Updated by Ohad Levy almost 10 years ago

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?

Actions #10

Updated by Tom Caspy almost 10 years ago

yes. there are page and per_page options.

Actions #11

Updated by Dominic Cleal over 9 years ago

  • Has duplicate Bug #10313: hammer truncates output when interactive=false added
Actions #12

Updated by Tomáš Strachota over 9 years ago

  • Related to Bug #10534: hammer pagination output should be disabled by default or respect terminal size added
Actions #13

Updated by Tom Caspy over 9 years ago

I think #10534 fixes this.

Actions #14

Updated by Dominic Cleal over 9 years ago

  • Status changed from New to Duplicate
  • Assignee deleted (Tom Caspy)

Agreed.

Actions

Also available in: Atom PDF