tower-cli icon indicating copy to clipboard operation
tower-cli copied to clipboard

Show total entries and current page/offset of a paginated list

Open jordeu opened this issue 3 years ago • 2 comments

Description

Commands that show paginated list do not give any info of how many items do we have in total and with page are we.

Proposal

Add a footer to the table with the total number of entries and were we are now. Something like Showing from 10 to 20 of a total 200 entries.

jordeu avatar Apr 12 '22 14:04 jordeu

-1, that requires an extra query and for tasks we cannot even count

pditommaso avatar Apr 12 '22 14:04 pditommaso

I see that there are some list responses that have the totalSize field, like the list of participants in a workspace. And others, like a list of workflows, that do not have it.

So the proposal is not to add any new query is just:

  • If the response has a totalSize show something like showing from 10 to 20 of a total 200 entries
  • If there is no totalSize show only this showing from 10 to 20

jordeu avatar Apr 12 '22 14:04 jordeu