admin/deposit: Use new deposit private API endpoint to list deposits
Previously, the admin-deposit-list view was retrieving all deposits data using the /1/private/deposits/ swh-deposit endpoint and was filtering those client side.
That approach was not efficient at all as the number of deposits increased.
So from now on, swh-web will simply forward the listing requests to the new /1/private/deposits/datatables/ endpoint of swh-deposit which will perform the same filtering and pagination operations as before in an efficient way.
Also remove code that is now dead and ensure deposit private API base URL can be set in configuration with or without trailing slash.
Related to T3128
Migrated from D7550 (view on Phabricator)
Merge request reports
Activity
Some references in the commit message have been migrated:
- T3128 is now swh/meta#3128
Build is green
Patch application report for D7550 (id=27371)
Rebasing onto 27f954f8...
Current branch diff-target is up to date.
Changes applied before test
commit 96b38d99363341ff8291ca987beaf16409ddaf0e Author: Antoine Lambert <anlambert@softwareheritage.org> Date: Wed Mar 30 18:07:47 2022 +0200 admin/deposit: Use new deposit private API endpoint to list deposits Previously, the admin-deposit-list view was retrieving all deposits data using the /1/private/deposits/ swh-deposit endpoint and was filtering those client side. That approach was not efficient at all as the number of deposits increased. So from now on, swh-web will simply forward the listing requests to the new /1/private/deposits/datatables/ endpoint of swh-deposit which will perform the same filtering and pagination operations as before in an efficient way. Also remove code that is now dead and ensure deposit private API base URL can be set in configuration with or without trailing slash. Related to [T3128](https://forge.softwareheritage.org/T3128 'view original for T3128 on Phabricator')
See https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/1707/ for more details.