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

refactor(services): Use custom sorting for packages query #2129

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lamppu
Copy link
Contributor

@lamppu lamppu commented Feb 27, 2025

Allow sorting packages by identifier, purl and the processed declared license SPDX expression. This will provide needed sorting options to allow sorting the packages table in the UI.

Allow sorting packages by identifier, purl and the processed declared
license SPDX expression. This will provide needed sorting options to allow
sorting the packages table in the UI.

Signed-off-by: Johanna Lamppu <[email protected]>
Comment on lines +59 to +64
"identifier" -> {
orders += IdentifiersTable.type to sortOrder
orders += IdentifiersTable.namespace to sortOrder
orders += IdentifiersTable.name to sortOrder
orders += IdentifiersTable.version to sortOrder
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't sure if this kind of combination would be ok to use, but this is technically what we need right now in the frontend, but of course this could be separated like here, and just use a combination of those in the request from the frontend. I think I'll align these based on what would be the preferred way.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To me the question is what's needed by the frontend, but this should be the same for the packages and the vulnerabilities table. So does the vulnerabilities table actually use the flexibility to sort by the identifier properties separately?

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

Successfully merging this pull request may close these issues.

2 participants