trustification / trustify

Apache License 2.0
10 stars 19 forks source link

/api/v1/sbom/by-package should do full pagination and filtering on the backend or let it to be done on the client #438

Closed carlosthe19916 closed 3 months ago

carlosthe19916 commented 3 months ago

Sorry, I missed this point when I reviewed the original PR that introduced this change.

The current endpoint does:

I think pagination and filtering come as a package: ALL or NONE. If the server does pagination, then it should also do filtering. Otherwise, it should not do neither pagination nor filtering and let it to be done in the client side.

The decision of where to do filtering/pagination should depend on how many SBOMs we expect for a single package. IMHO it should be less than thousands, and pagination/filtering could be done in the client side. But I am open to disagreement.

Should we:

image

carlosthe19916 commented 3 months ago

For a bit of context, I have the table below. And I am trying to filter the table by anything the user types into the Input Search Box

image

ctron commented 3 months ago

Good point, I'll create a PR.