artefactual-sdps / enduro

A tool to support ingest and automation in digital preservation workflows
https://enduro.readthedocs.io/
Apache License 2.0
4 stars 3 forks source link

Problem: Packages count only ever counts packages listed on current page #988

Closed fiver-watson closed 1 month ago

fiver-watson commented 4 months ago

Description

The Packages browse page in Enduro includes a count of page results and total packages, just below the page header. However, this counter constantly only ever reads 20/20 - it is currently only ever listing the total package count as the current total page count.

To Reproduce

Steps to reproduce the behavior:

  1. Log into enduro
  2. Make sure you have more than 20 packages processed
  3. Navigate to the Packages page
  4. Look at the count below the Packages header

Error encountered

Package count reads:

Showing 20/20

Expected outcome

This counter should:

djjuhasz commented 3 months ago

Fixing the total package count is going to require changes to the Enduro API - the current /package GET endpoint doesn't return a count of the total number of packages stored in Enduro. This change will require changes to the Goa API layer, the package service layer, and the persistence layer so this is not a good first issue to tackle.

sallain commented 3 months ago

Thanks for the context, @djjuhasz!

fiver-watson commented 1 month ago

👍 LGTM! Also, I personally did end up liking have the results count both at the top and the bottom of the page. Even on a relatively large monitor, , the 20 results regularly went beyond my screen, so having that count repeated at the bottom by the pager (esp given that the pager doesn't reload the page fully and bring you back to the top) works well.