-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: include PkgPath information in image cve list and list export in zui #426
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #426 +/- ##
==========================================
+ Coverage 82.82% 82.87% +0.04%
==========================================
Files 62 63 +1
Lines 1875 1880 +5
Branches 483 483
==========================================
+ Hits 1553 1558 +5
Misses 311 311
Partials 11 11 ☔ View full report in Codecov by Sentry. |
Thank you @vrajashkr for the PR! |
@raulkele , thanks a lot for the feedback! I'll address the review comments.
This sounds like a good idea! I'll give it a try to see how it looks. |
I made an attempt at trying out the sections as suggested. Here's what it looks like: @raulkele, what do you think about this design? |
IMHO the earlier implementation in the description looks better (but I'm not a front-end developer so I don't know what to say about how the code is written behind the scenes). |
Personally, I'm torn between the two. I can't seem to settle on one 😅. One key item here (at least in my opinion) appears to be the need to handle a variation in the length of the package name and the package path. In both approaches, what stands out to me is that there's a lot of horizontal space that's not being used. For instance, the python vulnerability has no paths and the library name and versions are short so we could ideally have 3 cards in the same line on wide screens and they can automatically scale to 2 on a line or 1 per line on smaller mobile screens. However, when there's a long path like in the spring web one, it needs to take up the full width on its own. The counter is that while this may lead to better use of horizontal space, it becomes somewhat inconsistent as some are multi per line and others are single per line depending on the package path length, so I'm not sure if it's such a good idea either. |
Design-wise I think I prefer the second implementation. I don't think it is an issue on larger screens that the row is empty if the path is not specified, we have examples where we do that in the ui. I'll take a look at the code again as well if you update the PR or perhaps open up a second one with the other version. One possible solution to the variance in the displayed data that you mentioned would be to make the row width dynamic. that way, depending on the amount of information, it would either be all three on one row or on separate rows as required. |
Signed-off-by: Vishwas Rajashekar <[email protected]>
7e0ffac
to
4e76918
Compare
Thanks for the inputs @raulkele ! I've updated this PR to address the review comments so it's green. Any further feedback is welcome! For the section approach, I'll raise a new PR. |
Maybe hide those rows entirely? Do not show both "Package Path" and the value? |
One thought about this that I had was related to consistency. For "Fixed Version", ZUI shows "Not Specified". |
We decided to use #428 instead. |
What type of PR is this?
feature
Which issue does this PR fix:
Partially addresses project-zot/zot#2175
What does this PR do / Why do we need it:
This PR displays the Package Path information for the package list for a given CVE in the vulnerabilities list.
Since there is more data being displayed, this PR also brings in a change to display this information in the form of a card that is vertically arranged.
Testing done on this change:
![Screenshot 2024-02-22 at 00 33 33](https://private-user-images.githubusercontent.com/30438425/307104522-2eee0847-ee6c-4d86-942c-7bdf5664720b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0NTg5MjUsIm5iZiI6MTczOTQ1ODYyNSwicGF0aCI6Ii8zMDQzODQyNS8zMDcxMDQ1MjItMmVlZTA4NDctZWU2Yy00ZDg2LTk0MmMtN2JkZjU2NjQ3MjBiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEzVDE0NTcwNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTRjNDgwZDM1MjY1NDA4MDRhYzZjODgyNTYyYTQ3YjhmNjZiN2I0ZDNmMTg5ZDRhYmI4Nzk3MWQ5ZTRmNDQ1ZGUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.yZ6BPPQMYnLySRAi4Cdox5v3sZyo8VpPeCpqe1_zBbA)
![Screenshot 2024-02-22 at 00 33 49](https://private-user-images.githubusercontent.com/30438425/307104538-d5967826-c1c7-4983-8fd7-8c413df3d000.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0NTg5MjUsIm5iZiI6MTczOTQ1ODYyNSwicGF0aCI6Ii8zMDQzODQyNS8zMDcxMDQ1MzgtZDU5Njc4MjYtYzFjNy00OTgzLThmZDctOGM0MTNkZjNkMDAwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEzVDE0NTcwNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPThmZGU0MmNkYjI4MzE4ZTNmMmNhMmYyMTFkZmI2MWM5ODc1NTc1NWM3MjVkYzY1MDhjOTcwNzAxZDY1NWZhYjkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.vioQ4h3w-ID_4DDTXeRJmjrtQWBe5trIxYZsrJ73-oM)
![Screenshot 2024-02-22 at 00 34 40](https://private-user-images.githubusercontent.com/30438425/307104568-facbec75-3a80-472c-b90a-55668c9e5db1.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0NTg5MjUsIm5iZiI6MTczOTQ1ODYyNSwicGF0aCI6Ii8zMDQzODQyNS8zMDcxMDQ1NjgtZmFjYmVjNzUtM2E4MC00NzJjLWI5MGEtNTU2NjhjOWU1ZGIxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1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kSGVhZGVycz1ob3N0In0.19G2diqVuiFRJAzA40c2_s9KsMQJ7Cve4V14RtJ0pZU)
![Screenshot 2024-02-22 at 00 34 15](https://private-user-images.githubusercontent.com/30438425/307104559-ac62f14e-644a-49d5-9839-20f1ec6442c8.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0NTg5MjUsIm5iZiI6MTczOTQ1ODYyNSwicGF0aCI6Ii8zMDQzODQyNS8zMDcxMDQ1NTktYWM2MmYxNGUtNjQ0YS00OWQ1LTk4MzktMjBmMWVjNjQ0MmM4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEzVDE0NTcwNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWViYWFiZDU3NDhjNzczOWFhMzM3ZWNmZjk2NTdmZmFiMDE0NmViNWIwNDkyY2YwY2M1ZGM4ODEzZWU3ZGI0OTEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.LzxXzBfKissc01LoCYofaCSX-i-vtY6tOaQfe8v2wN0)
Screenshots:
CSV export:
XLSX export:
![Screenshot 2024-02-22 at 23 38 56](https://private-user-images.githubusercontent.com/30438425/307104752-1cdcc19c-c8e8-455f-9d70-ee88362c0423.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0NTg5MjUsIm5iZiI6MTczOTQ1ODYyNSwicGF0aCI6Ii8zMDQzODQyNS8zMDcxMDQ3NTItMWNkY2MxOWMtYzhlOC00NTVmLTlkNzAtZWU4ODM2MmMwNDIzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEzVDE0NTcwNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTI2Yzc1YjFhM2RhNzAxNjIxMGU0NDAzOWMzNDMxMDAwMDE0ZTc4YTg4M2VlOGFjMjkwY2Y2YmJlMDJmZDQxYTkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.ksuzoOMAYir05wPAH2Jt6IPxZIYswcE-UfApgAErJU8)
Will this break upgrades or downgrades. Has updating a running cluster been tested?:
Ideally, this should not break upgrades or downgrades as the older graphQL query should continue working just fine as well as the updated query.
No, updating a running cluster has not been tested.
Does this change require updates to the CNI daemonset config files to work?:
N/A
Does this PR introduce any user-facing change?:
Yes
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.