Skip to content

Add toast handling for purge cache action#1824

Merged
DarshitChanpura merged 3 commits intoopensearch-project:mainfrom
derek-ho:purge-toast
Mar 13, 2024
Merged

Add toast handling for purge cache action#1824
DarshitChanpura merged 3 commits intoopensearch-project:mainfrom
derek-ho:purge-toast

Conversation

@derek-ho
Copy link
Copy Markdown
Collaborator

@derek-ho derek-ho commented Mar 12, 2024

Description

This PR adds a toast message for success and failure of the purge cache action.

Category

[Enhancement, New feature, Bug fix, Test fix, Refactoring, Maintenance, Documentation]
Enhancement

Why these changes are required?

Today, there is no indication that a purge cache action succeeded or failed. This can be confusing to the user as they would not know the result unless they have the network tab open or are checking the backend logs. This adds visual indication and brings this action more inline with other actions such as create user. This also acts as a shim for end to end testing which can rely on the new toast to see if some action succeeded or failed.

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

New behavior shown below:

Screen.Recording.2024-03-12.at.2.10.44.PM.mov

Issues Resolved

[List any issues this PR will resolve (Is this a backport? If so, please add backport PR # and/or commits #)]
Fix: #1815

Testing

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

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.

Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.52%. Comparing base (c80b64a) to head (f9c4a22).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1824      +/-   ##
==========================================
+ Coverage   67.38%   67.52%   +0.13%     
==========================================
  Files          94       94              
  Lines        2410     2414       +4     
  Branches      320      327       +7     
==========================================
+ Hits         1624     1630       +6     
+ Misses        708      706       -2     
  Partials       78       78              

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

@cwperks cwperks added the backport 2.x backport to 2.x branch label Mar 12, 2024
Copy link
Copy Markdown
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.

LGTM!

@DarshitChanpura DarshitChanpura merged commit 942b2f7 into opensearch-project:main Mar 13, 2024
opensearch-trigger-bot bot pushed a commit that referenced this pull request Mar 13, 2024
cwperks pushed a commit that referenced this pull request Mar 13, 2024
(cherry picked from commit 942b2f7)

Co-authored-by: Derek Ho <dxho@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport 2.x backport to 2.x branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Purge cache should have confirmation or Toast

3 participants