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

Add cluster info to toasts, adds cluster info to URL #1877

Conversation

derek-ho
Copy link
Collaborator

@derek-ho derek-ho commented Apr 5, 2024

Description

This PR adds cluster info to toasts for permissions, roles, and users. It also adds the data source id to the url and reads from the datasourceid if available from the url. This should help with page refreshes/auto logouts, and sharing links.

Category

Enhancement

Why these changes are required?

What is the old behavior before changes and new behavior after changes?

Toasts did not have cluster info, datasource was not saved in URL

Issues Resolved

Fix: #1858
Fix: #1860

Testing

[Please provide details of testing done: unit testing, integration testing and manual testing]

Check List

  • New functionality includes testing
  • New functionality has been documented
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Copy link

codecov bot commented Apr 5, 2024

Codecov Report

Attention: Patch coverage is 84.21053% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 68.35%. Comparing base (1ddef9b) to head (a63592e).

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

Files Patch % Lines
public/apps/configuration/top-nav-menu.tsx 33.33% 2 Missing ⚠️
public/apps/configuration/app-router.tsx 75.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@                             Coverage Diff                             @@
##           feature/supporting-multiple-datasources    #1877      +/-   ##
===========================================================================
- Coverage                                    68.90%   68.35%   -0.56%     
===========================================================================
  Files                                           96       96              
  Lines                                         2460     2474      +14     
  Branches                                       335      334       -1     
===========================================================================
- Hits                                          1695     1691       -4     
- Misses                                         686      703      +17     
- Partials                                        79       80       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Derek Ho <[email protected]>
@derek-ho derek-ho changed the title Add cluster info to toasts if available Add cluster info to toasts, adds cluster info to URL Apr 5, 2024
Copy link
Member

@DarshitChanpura DarshitChanpura left a comment

Choose a reason for hiding this comment

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

@derek-ho thanks for adding this. Will the tests suffice this? One more question, have tested the state after page refresh?

public/apps/configuration/app-router.tsx Outdated Show resolved Hide resolved
@derek-ho
Copy link
Collaborator Author

derek-ho commented Apr 8, 2024

Copy link
Member

@DarshitChanpura DarshitChanpura left a comment

Choose a reason for hiding this comment

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

Seems like this is still in progress based on bunch of log statements and linter errors. Should this marked as draft @derek-ho ?

@derek-ho
Copy link
Collaborator Author

derek-ho commented Apr 9, 2024

Seems like this is still in progress based on bunch of log statements and linter errors. Should this marked as draft @derek-ho ?

Just pulled in changes from core, letting CI finish, but it should be ready for review now.

DarshitChanpura and others added 3 commits April 10, 2024 16:58
Signed-off-by: Derek Ho <[email protected]>
…opensearch-project/security-dashboards-plugin into ui-fixes

Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
Copy link
Member

@DarshitChanpura DarshitChanpura left a comment

Choose a reason for hiding this comment

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

Looks good to me, waiting for CI to be green before approving. Nice work @derek-ho !

@DarshitChanpura
Copy link
Member

CI failures seems flaky and unrelated to this change. These will be addressed in follow-ups. Merging this now.

@DarshitChanpura DarshitChanpura merged commit 9f350b0 into opensearch-project:feature/supporting-multiple-datasources Apr 12, 2024
32 of 33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants