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(OCPADVISOR-70): Enable "Upgrade Risks" tab on the cluster details view #541

Merged
merged 3 commits into from
Apr 6, 2023

Conversation

gkarat
Copy link
Collaborator

@gkarat gkarat commented Apr 6, 2023

Implements https://issues.redhat.com/browse/OCPADVISOR-70.
Sketched at https://www.sketch.com/s/c5c07e06-f4a1-4c64-9cdf-8b12d8ac9ad5/a/8ylYyDw.

This makes the recommendations table render in a tab on the cluster details view (/clusters/%id) and adds the second tab called "Upgrade Risks." The latter temporarily uses placeholder content.

"Upgrade Risks" tab always rendered in beta (preview) release. The tab is displayed in stable if the feature flag ocp-advisor.upgrade-risks.enable-in-stable is set to true.

I will need to refactor component tests for the Cluster component a bit so I decided not to include tests in this PR.

How to test:

  1. Navigate to any cluster and make sure the main content is rendered in tabs.
  2. Tabs support URL search parameter "active_tab": you can play with it and make sure it doesn't break the page (by default, recommendations are shown unless "active_tab=upgrade_risks" is given.
  3. You can build the PR under stable release (stage-stable or prod-stable) and try to toggle the Unleash feature flag. When disabled, the tab must not be shown.

Screenshots

image

@gkarat gkarat added the enhancement New feature or request label Apr 6, 2023
@gkarat gkarat self-assigned this Apr 6, 2023
@gkarat gkarat requested a review from a team as a code owner April 6, 2023 08:44
</Provider>
</Intl>
</MemoryRouter>
<FlagProvider>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

will do soon in a separate PR 🪄

@codecov-commenter
Copy link

Codecov Report

Patch coverage: 66.66% and project coverage change: -0.51 ⚠️

Comparison is base (cc84d19) 84.82% compared to head (02f71bd) 84.32%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #541      +/-   ##
==========================================
- Coverage   84.82%   84.32%   -0.51%     
==========================================
  Files          25       27       +2     
  Lines        1160     1193      +33     
  Branches      450      458       +8     
==========================================
+ Hits          984     1006      +22     
- Misses        176      187      +11     
Impacted Files Coverage Δ
src/Components/Cluster/Cluster.js 100.00% <ø> (ø)
src/Utilities/Helpers.js 33.33% <20.00%> (-66.67%) ⬇️
src/Components/ClusterTabs/ClusterTabs.js 63.15% <63.15%> (ø)
src/Utilities/useFeatureFlag.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 in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@gkarat gkarat merged commit c47ac72 into RedHatInsights:master Apr 6, 2023
gkarat pushed a commit that referenced this pull request Apr 6, 2023
# [1.12.0](v1.11.2...v1.12.0) (2023-04-06)

### Features

* **OCPADVISOR-70:** Enable "Upgrade Risks" tab on the cluster details view ([#541](#541)) ([c47ac72](c47ac72))
@gkarat
Copy link
Collaborator Author

gkarat commented Apr 6, 2023

🎉 This PR is included in version 1.12.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@gkarat gkarat added the released label Apr 6, 2023
@gkarat gkarat deleted the ocpadvisor-70 branch April 11, 2023 10:52
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