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-73): Track clicks on the Upgrade risks tab #557

Merged
merged 8 commits into from
Apr 24, 2023

Conversation

gkarat
Copy link
Collaborator

@gkarat gkarat commented Apr 21, 2023

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

Send analytics to segment.io (Pendo) when users click on "Upgrade risks" tab or access the page via the /clusters/%id?active_tab=upgrade_risks link. UI must include two parameters to the request: cluster_id of the browsed cluster and whether the upgrade is recommended or not. The latter is obtained from the GET /upgrade-risks-prediction endpoint.

How to test

  1. Run PR together with mock service https://github.com/RedHatInsights/ocp-advisor-frontend#using-insights-results-aggregator-mock.
  2. Navigate to 00000001-624a-49a5-bab8-4fdc5e51a266 or 00000003-eeee-eeee-eeee-000000000001 clusters and click "Upgrade risks" tab.
  3. Check the network request is sent to segment.io (called /t) containing correct properties in its body.
  4. Access the same pages with ?active_tab=upgrade_risks and repeat the previous step.

@gkarat gkarat self-assigned this Apr 21, 2023
@codecov-commenter
Copy link

codecov-commenter commented Apr 21, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.85 🎉

Comparison is base (615c705) 87.87% compared to head (e357bb0) 88.73%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #557      +/-   ##
==========================================
+ Coverage   87.87%   88.73%   +0.85%     
==========================================
  Files          32       33       +1     
  Lines        1287     1305      +18     
  Branches      505      512       +7     
==========================================
+ Hits         1131     1158      +27     
+ Misses        156      147       -9     
Impacted Files Coverage Δ
src/Services/SmartProxy.js 43.75% <ø> (ø)
src/Components/Cluster/Cluster.js 100.00% <100.00%> (ø)
src/Components/ClusterTabs/ClusterTabs.js 88.46% <100.00%> (+20.04%) ⬆️
src/Components/UpgradeRisksTable/AlertsList.js 91.66% <100.00%> (ø)
...mponents/UpgradeRisksTable/ClusterOperatorsList.js 80.00% <100.00%> (ø)
...ponents/UpgradeRisksTracker/UpgradeRisksTracker.js 100.00% <100.00%> (ø)

... and 2 files with indirect coverage changes

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 added the enhancement New feature or request label Apr 24, 2023
@gkarat gkarat marked this pull request as ready for review April 24, 2023 15:42
@gkarat gkarat requested a review from a team as a code owner April 24, 2023 15:42
id: clusterId,
});

useEffect(() => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I like this useEffect, really nice

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 468e0cc into RedHatInsights:master Apr 24, 2023
@gkarat gkarat deleted the ocpadvisor-73 branch April 24, 2023 16:00
gkarat pushed a commit that referenced this pull request Apr 24, 2023
# [1.16.0](v1.15.2...v1.16.0) (2023-04-24)

### Features

* **OCPADVISOR-73:** Track clicks on the Upgrade risks tab ([#557](#557)) ([468e0cc](468e0cc))
@gkarat
Copy link
Collaborator Author

gkarat commented Apr 24, 2023

🎉 This PR is included in version 1.16.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