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

Allow getCatalog wanda call to filter by provider #1098

Merged

Conversation

rtorrero
Copy link
Contributor

Description

This PR adds a provider search param to wanda's getCatalog call. This is particularly useful in the checks selection view, as we might want to limit the display of checks that can't be applied to certain provider.

How was this tested?

Manually by running wanda and checking that the checks selection view causes the search param to be added to the request while the catalog view doesn't.

@rtorrero rtorrero added enhancement New feature or request javascript Pull requests that update Javascript code labels Jan 11, 2023
@dottorblaster dottorblaster self-requested a review January 11, 2023 16:06
Copy link
Contributor

@dottorblaster dottorblaster left a comment

Choose a reason for hiding this comment

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

Overall a good job, I made some suggestions so that we end basically collecting an env object that we end up passing to the request. I'm uncertain about the suggestion I made on assets/js/state/actions/catalog.js because actually having a RORO there would ensure some extra parsing.

Ref about RORO: https://www.freecodecamp.org/news/elegant-patterns-in-modern-javascript-roro-be01e7669cbd/

assets/js/lib/api/wanda.js Outdated Show resolved Hide resolved
assets/js/state/sagas/catalog.js Outdated Show resolved Hide resolved
assets/js/state/sagas/catalog.js Outdated Show resolved Hide resolved
assets/js/state/actions/catalog.js Outdated Show resolved Hide resolved
assets/js/state/actions/catalog.js Outdated Show resolved Hide resolved
@rtorrero rtorrero marked this pull request as draft January 11, 2023 17:01
@rtorrero rtorrero force-pushed the add-catalog-filtering-per-provider branch from 0c1ac6c to c350f26 Compare January 12, 2023 07:58
@rtorrero rtorrero force-pushed the add-catalog-filtering-per-provider branch from c350f26 to a188b39 Compare January 12, 2023 08:01
@rtorrero rtorrero marked this pull request as ready for review January 12, 2023 08:07
Copy link
Contributor

@dottorblaster dottorblaster left a comment

Choose a reason for hiding this comment

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

LGTM

@rtorrero rtorrero merged commit c37f347 into trento-project:main Jan 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request javascript Pull requests that update Javascript code
Development

Successfully merging this pull request may close these issues.

2 participants