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

[SecuritySolution] Add success toast to timeline deletion #99612

Merged
merged 3 commits into from
May 10, 2021

Conversation

machadoum
Copy link
Member

Summary

closes #99326

  • Add success toast to timeline deletion
  • Refactor "export timeline" to use useAppToasts instead of useStateToaster

Screenshot 2021-05-10 at 12 27 42

Steps to verify:

  1. Create a new timeline/template
  2. Export the timeline/template
  3. "exported timeline/template" toast should be displayed
  4. Delete the timeline/template
  5. "deleted timeline/template" toats should be displayed

Checklist

Delete any items that are not applicable to this PR.

@machadoum machadoum added bug Fixes for quality problems that affect the customer experience v8.0.0 release_note:skip Skip the PR/issue when compiling release notes Team:Threat Hunting Security Solution Threat Hunting Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v7.14.0 v7.13.1 labels May 10, 2021
@machadoum machadoum self-assigned this May 10, 2021
@machadoum machadoum requested a review from cnasikas May 10, 2021 10:56
@machadoum machadoum changed the title Add success toast to timeline deletion issue 99326 [SecuritySolution] Add success toast to timeline deletion May 10, 2021
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
securitySolution 6.6MB 6.6MB +1.2KB
Unknown metric groups

References to deprecated APIs

id before after diff
canvas 29 25 -4
crossClusterReplication 8 6 -2
fleet 4 2 -2
globalSearch 4 2 -2
indexManagement 12 7 -5
infra 5 3 -2
licensing 18 15 -3
monitoring 109 56 -53
total -73

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @machadoum

@machadoum machadoum marked this pull request as ready for review May 10, 2021 13:45
@machadoum machadoum requested a review from a team as a code owner May 10, 2021 13:45
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-threat-hunting (Team:Threat Hunting)

const internalCloseModal = useCallback(() => {
if (onComplete != null) {
onComplete();
}
}, [onComplete]);
const onDelete = useCallback(() => {
if (savedObjectIds != null) {
Copy link
Member Author

@machadoum machadoum May 10, 2021

Choose a reason for hiding this comment

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

TypeScript says that it can't be null.

color: 'success',
iconType: 'check',
},
addSuccess({
Copy link
Member Author

Choose a reason for hiding this comment

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

Small refactor. Uses addSuccess intead of dispatchToaster

Copy link
Member

@cnasikas cnasikas left a comment

Choose a reason for hiding this comment

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

LTGM! Tested locally and everything is working as expected! 🚀

@machadoum machadoum merged commit 0ffe4c7 into elastic:master May 10, 2021
machadoum added a commit to machadoum/kibana that referenced this pull request May 11, 2021
)

* Add success toast to timeline deletion

* Add unit tests for timeline deletion toast

* Refactor export_timeline to use useAppToasts instead of useStateToaster
machadoum added a commit to machadoum/kibana that referenced this pull request May 11, 2021
)

* Add success toast to timeline deletion

* Add unit tests for timeline deletion toast

* Refactor export_timeline to use useAppToasts instead of useStateToaster
@machadoum machadoum added v7.13.0 and removed v7.13.1 labels May 11, 2021
machadoum added a commit that referenced this pull request May 11, 2021
…99764)

* Add success toast to timeline deletion

* Add unit tests for timeline deletion toast

* Refactor export_timeline to use useAppToasts instead of useStateToaster
@kibanamachine
Copy link
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.

@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label May 12, 2021
machadoum added a commit that referenced this pull request May 12, 2021
…99765)

* Add success toast to timeline deletion

* Add unit tests for timeline deletion toast

* Refactor export_timeline to use useAppToasts instead of useStateToaster

Co-authored-by: Kibana Machine <[email protected]>
@kibanamachine kibanamachine removed the backport missing Added to PRs automatically when the are determined to be missing a backport. label May 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience release_note:skip Skip the PR/issue when compiling release notes Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Threat Hunting Security Solution Threat Hunting Team v7.13.0 v7.14.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Security Solution]"Successfully deleted <timeline name /count> timeline" is not received on deleting timeline
4 participants