Skip to content
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

In UI and API, sort packages and vulnerabilities from newest to oldest. #1754

Open
pombredanne opened this issue Jan 21, 2025 · 3 comments
Open

Comments

@pombredanne
Copy link
Member

When I use the UI and search for packages, or when I use the API, I would like to see results of package lists sorted by version from newest to oldest. Same for vulnerabilities, from newest to oldest.

Why? because I am more likely to be interested by recent and current versions than older versions and older vulnerabilities.

@pombredanne pombredanne changed the title In UI and API, sorts packages by version from newest to oldest, and vulnerabilities too In UI and API, sort packages and vulnerabilities from newest to oldest. Jan 21, 2025
@atmajaa
Copy link

atmajaa commented Jan 22, 2025

@pombredanne Hi, I am working on this issue. Will update if I have any doubts!

@pombredanne
Copy link
Member Author

@atmajaa Thanks! please make sure to start by outlining the gist of your design as a comment.

@Rishi-source
Copy link

Rishi-source commented Jan 23, 2025

Hi @pombredanne , I have made some changes and testing them on my local server I have firstly imported some packages and vulnerability data and then runned python3 manage.py improve compute_version_rank imporover in order to assign the the version ranking to the packages.
After that I have impletelemented some changes in the views.py (https://gist.github.com/Rishi-source/25e42438c87c26c3b7d1324bba60609f) and I have got these results I am sharing a screenshot of the ordering of the results after implementing these changes which I have provided in the gist.
Please correct me If I am wrong at some point. I also want to ask that have I correctly sorted the vulnerability data on the basis of vulnerability_id or I have to use/make some other field in order to sort them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants