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

feat(Single rec page): Show risk of change info #498

Conversation

gkarat
Copy link
Collaborator

@gkarat gkarat commented Jan 16, 2023

Implements https://issues.redhat.com/browse/OCPADVISOR-13.

This enables the risk of change (resolution risk) section at the single recommendation page.

How to test

Run the PR locally and navigate to /openshift/insights/advisor/recommendations. Select any recommendation and move to the details page. The "Risk of change" header must be rendered with all the additional labels and information. You can also check the API response from GET /rule/ID endpoint and check the resolution_risk integer value corresponds to the correct label (Very low = 1, Low = 2, Moderate = 3, High = 4).

Screenshots

image

Implements https://issues.redhat.com/browse/OCPADVISOR-13.

This enables the risk of change (resolution risk) section at the single
recommendation page.
@gkarat gkarat added the enhancement New feature or request label Jan 16, 2023
@gkarat gkarat self-assigned this Jan 16, 2023
@gkarat gkarat requested a review from a team as a code owner January 16, 2023 10:56
@@ -0,0 +1,3 @@
import React from 'react';

export const strong = (str) => <strong>{str}</strong>;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This was done because the webpack build for cypress behaved a bit differently. In the previous implementation, there was a circular dependency which cypress webpack config wasn't able to resolve, and strong was evaluated to undefined. It's tricky and I can't say how to properly fix it, but this module separation resolves that.

@codecov-commenter
Copy link

Codecov Report

Base: 87.08% // Head: 87.10% // Increases project coverage by +0.02% 🎉

Coverage data is based on head (1b24a14) compared to base (0453a99).
Patch coverage: 100.00% of modified lines in pull request are covered.

❗ Current head 1b24a14 differs from pull request most recent head d6beeb8. Consider uploading reports for the commit d6beeb8 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #498      +/-   ##
==========================================
+ Coverage   87.08%   87.10%   +0.02%     
==========================================
  Files          25       26       +1     
  Lines        1161     1163       +2     
  Branches      444      446       +2     
==========================================
+ Hits         1011     1013       +2     
  Misses        150      150              
Impacted Files Coverage Δ
src/Components/RecsListTable/RecsListTable.js 80.09% <ø> (ø)
src/Utilities/intlHelper.js 90.90% <ø> (-0.76%) ⬇️
src/Components/Recommendation/Recommendation.js 86.23% <100.00%> (+0.25%) ⬆️
src/Utilities/Helpers.js 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@Fewwy
Copy link
Collaborator

Fewwy commented Jan 16, 2023

Tested it locally. Works as intended. LGTM

@gkarat gkarat merged commit 39d546b into RedHatInsights:master Jan 17, 2023
gkarat pushed a commit that referenced this pull request Jan 17, 2023
# [1.9.0](v1.8.4...v1.9.0) (2023-01-17)

### Features

* **Single rec page:** Show risk of change info ([#498](#498)) ([39d546b](39d546b))
@gkarat
Copy link
Collaborator Author

gkarat commented Jan 17, 2023

🎉 This PR is included in version 1.9.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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