Page MenuHomeSoftware Heritage

Allow filtering out test deposits on the deposit admin page
Closed, ResolvedPublic

Description

(I'm not sure why this administration page is in swh.web and not swh.deposit, but here goes)

The https://archive.softwareheritage.org/admin/deposit/ page shows a bunch of test deposits, created by our end to end infrastructure testing.

For now, while the deposit "throughput" is low, these deposits are quite preeminent and clutter the interface.

We should add a toggle to allow filtering them out.

I think this feature request can be adequately turned into adding a "filter by depositing entity" feature.

Event Timeline

olasd triaged this task as Normal priority.May 14 2020, 11:10 AM
olasd created this task.
olasd updated the task description. (Show Details)

A generic way to address this feature is by adding "exclusion" criteria to the existing "inclusion" criteria.

The current UI allows to filter results to include only those matching a certain string entered in the "Search" box.

We should add a dual filter to exclude items that match a certain pattern, entered in an "Excluding" box; multiple patterns must be supported.
This box can be pre-filled with the pattern corresponding to test deposits.

(I'm not sure why this administration page is in swh.web and not swh.deposit, but here goes)

There has been previous discussions about this, I don't recall the details though.
It's related to T1170 (and its parent tasks) if we ever wanted to dig more.

ardumont added a comment.EditedMay 22 2020, 7:08 PM

Well, I tried but failed so far... [1]

I successfully injected a dom element to have an actual text box search like
dedicated to an exclusion pattern (<- there is actually no way that i could see
to configure the dataTable thing to do it otherwise).

Then trying to make the search works with both including and excluding pattern
was actually full of... failures...

Well, at least from the integration test point of view.
I'll let it rest a bit for now.

[1] P679 with my tryout, well the last iteration of it

D3176 landed, packaged, deployed.

ardumont closed this task as Resolved.May 26 2020, 5:29 PM
ardumont claimed this task.
rdicosmo reopened this task as Open.Jun 25 2020, 11:15 AM

Filtering is broken in the admin interface for deposits.

Here is what one sees when accessing the page the first time: "No record founds" and "Showing 1 to 10 of 10" are contradictory, and there are by the way really more than 10 entries that should pass the filter

And here is what one gets if one discards the exclude filter: one sees quite a bunch of results, but at the bottom one sees "0 to 0 our of 0 entries"

rdicosmo reassigned this task from ardumont to anlambert.Jun 25 2020, 11:17 AM

This seems to be related to T2465 too

I can also reproduce the issue. @ardumont, do you mind if I take care of the fix ?