tower-cli
tower-cli copied to clipboard
Show total entries and current page/offset of a paginated list
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.
-1, that requires an extra query and for tasks we cannot even count
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
totalSizeshow something likeshowing from 10 to 20 of a total 200 entries - If there is no
totalSizeshow only thisshowing from 10 to 20