#1941 Monior pagination has extremely short pages with no option to set pagesize
Closed: Duplicate 3 years ago by praiskup. Opened 3 years ago by churchyard.

Since recently, I see:

Warning! This is a large project with many packages and/or builds - we can not hold all the requested data on one page (as we usually do), please use the pagination buttons below the table.

...on our Monitor pages. No harm in that, but I need to read 83 pages of information now. Would it be possible to allow me to set some arbitrary page size (e.g. 1000)?

Thanks.


It is possible, but... Do you indeed prefer this webUI page, or do you parse it by some your code?
I am checking whether you actually want this or some new API call and command in copr-cli?

  1. We parse the HTML and we will migrate to copr list-packages --with-latest-build --output-format json instead. We started to parse it when https://pagure.io/copr/copr/issue/757 was a problem.
  2. But I also scan it with my eyes often. Using Ctrl+F in the browser to see how many packages are pending, etc.
  3. Often, I copy-paste the output to a text file, so I can grep it locally.

I guess having a copr command with exactly this output would help:

ansible-lint    succeeded
ansible-review  failed
antlr4-project  succeeded
apbs    succeeded
APLpy   succeeded
apostrophe  succeeded
...

But OTOH, so would larger pages :/

Often, I copy-paste the output to a text file, so I can grep it locally.

For comparison, now I need to:

  1. Run copr list-packages --with-latest-build --output-format json patch251 > copr-patch251.json
  2. Spin up a Python interpreter and do something like:
>>> import json                                                                                              
>>> with open('copr-patch251.json') as jf: j = json.loads(jf.read())                                         
>>> len([p for p in j if p['latest_build']['state'] == 'failed']) 

Or

>>> for package in j:
...     if package['latest_build']['state'] == 'failed':
...         print(package['name'])

That seems rather tedious. Is there a better way?

While previously, I'd coy-pasted the monitor page to a text file and I could do things like:

$ grep failed$ monitor.txt  | wc -l
$ grep failed$ monitor.txt  | cut -f1

There's #1953 pull request now fixing #1932, which provides 'copr-cli monitor' with
csv-like output. It should handle this use-case (as discussed with @churchyard 1:1).

Metadata Update from @praiskup:
- Issue close_status updated to: Duplicate
- Issue status updated to: Closed (was: Open)

3 years ago

Log in to comment on this ticket.

Metadata