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(Recommendations list): Map sorting search parameters from column names #359

Merged

Conversation

gkarat
Copy link
Collaborator

@gkarat gkarat commented Jul 14, 2022

Fixes https://issues.redhat.com/browse/CCXDEV-8064.

This changes the way how Advisor builds sorting parameters in the search URL query. The name for each parameter is taken from the column name instead of using the data field name from the API response. The PR also refactors the sorting function for the recommendations list table: the algorithm is now the same as for the clusters list table, and a switch-case clause is used.

@gkarat gkarat added the enhancement New feature or request label Jul 14, 2022
@gkarat gkarat requested review from ikerreyes and Fewwy July 14, 2022 15:13
@gkarat gkarat self-assigned this Jul 14, 2022
Copy link
Collaborator

@ikerreyes ikerreyes left a comment

Choose a reason for hiding this comment

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

Much better, now both tests are consistent and are quite simple. And the columnName2UrlParam is more meaningful now :)

Copy link
Collaborator

@Fewwy Fewwy left a comment

Choose a reason for hiding this comment

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

LGTM!

@gkarat gkarat merged commit 9899306 into RedHatInsights:master Jul 15, 2022
gkarat pushed a commit that referenced this pull request Jul 15, 2022
## [1.5.4](v1.5.3...v1.5.4) (2022-07-15)

### Bug Fixes

* **Recommendations list:** map sorting parameters from column names in the recs list table ([#359](#359)) ([9899306](9899306))
@gkarat
Copy link
Collaborator Author

gkarat commented Jul 15, 2022

🎉 This PR is included in version 1.5.4 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

gkarat added a commit that referenced this pull request Aug 17, 2022
gkarat pushed a commit that referenced this pull request Aug 17, 2022
## [1.5.4](v1.5.3...v1.5.4) (2022-07-15)

### Bug Fixes

* **Recommendations list:** map sorting parameters from column names in the recs list table ([#359](#359)) ([9899306](9899306))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants