Replies: 1 comment
-
1Q: we should align the filter in Image with the values in Image name. that might mean some of this is dropped? spent some time on this, we could think of smart ways to parse the registry/repo/repo:tag string and AND/OR parts together, however we would then also need to do something different for sort (which is possible). at this stage though, if fields are already being manually constructed in the imageMetadata object anyway this one should be added there as well update: it looks like this might be happening already, see 2group by disabled
group by enabledApproach 1
this won't work, the UI only supports one server-side paginated list of a type at the same time. it can do server-side stuff outside of lists, but not within them. Approach 2
Indexed FieldsImportant note - anything sorted or filtered on server-side needs to be indexed by rancher. it does some fields automatically though (https://extensions.rancher.io/extensions/next/performance/scaling/lists#choosing-fields-to-display-sort-and-filter-on), specifically CRD additionalPrinterColumns. It looks like some of this is happening already, specifically for vulnerabilityreports
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently we implement client side filtering for the various column filters provided under the Images page. In order to support server side pagination, there are a few roadblocks with respect to the Rancher

<PaginatedResourceTable/>component.Based on the new Steve API pagination documentation here, it is unclear how we would implement server-side filtering for the
Image namecolumn, which is constructed from theVulnerabilityReportobject through a combination of fields:${report.imageMetadata.registryURI}/${report.imageMetadata.repository}:${report.imageMetadata.tag}exactfield here it seems to me that we would need to inverse behavior where for each of the fieldsregistryURI,repository,tag:Meaning a partial of the filter value must match at least one of the composite fields, but if there are multiple partials of the filter value that match fields, all must match (so that we don't return
quay.io/testRepo/alpine:3.4when the filter param isdocker.io/testRepo/alpine.It is unclear how the
Group by repositoryflag would function under server-side pagination.It seems this structure would require 2 levels of pagination (ie. Load the first X repositories, then for each one load the first X images matching that repository field). It may be possible to use sorting to ensure the Steve API returns VulnerabilityReport in an ordered way (by repository field), however it is unclear how the frontend could translate that into a workable UI.
Consider the case where
Table rows per pageis set to 50 and there are 100VulnerabilityReportsof which 51 belong toregistryAand 49 toregistryB. Then we would receive the first 50 records (all belonging toregistryA) and render the table as having one row (registryA) with a paginated subtable containing the 50 loaded images. If the user clicks to the next page on the subtable (since there are 51 images associated withregistryA), should the UI load the next 50 records (1 belonging toregistryAand the restregistryB) and then at that time render a second row within the master table?We can also consider the case where there are >50 repositories (each containing >50 images) and likewise run into implementation issues
Beta Was this translation helpful? Give feedback.
All reactions