-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[SIEM][CASE] Persist callout when dismissed #68372
Conversation
9b250a5
to
619dfff
Compare
Pinging @elastic/siem (Team:SIEM) |
619dfff
to
2f9d0c1
Compare
x-pack/plugins/security_solution/public/common/containers/use_local_storage.test.tsx
Outdated
Show resolved
Hide resolved
e2ff95d
to
c5ae8ba
Compare
@elasticmachine merge upstream |
x-pack/plugins/security_solution/public/cases/components/callout/callout.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is ok to have this kind of logic for primary/info callout. I feel strongly that we should not have it for error/warning messages. Since the user can hide them for a long time and it will not be aware of what's going on with the application.
You are right! |
02d45f6
to
53b191f
Compare
x-pack/plugins/security_solution/public/cases/components/callout/callout.test.tsx
Show resolved
Hide resolved
x-pack/plugins/security_solution/public/cases/components/callout/callout.test.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/security_solution/public/cases/components/callout/index.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/security_solution/public/cases/components/callout/index.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/security_solution/public/cases/components/callout/index.test.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/security_solution/public/cases/components/use_push_to_service/index.test.tsx
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for making the requested changes. Tested locally in chrome and safari, LGTM! Thanks @cnasikas
💚 Build SucceededBuild metrics@kbn/optimizer bundle module count
page load asset sizebeta
History
To update your PR or re-run it, just comment with: |
* master: skip failing suite (elastic#70104) (elastic#70103) [ENDPOINT] Hide the Timeline Flyout while on the Management Pages (elastic#69998) [SIEM][CASE] Persist callout when dismissed (elastic#68372) [SIEM][Exceptions] - Cleaned up and updated exception list item comment structure (elastic#69532) [Maps] remove indexing state from redux (elastic#69765) Add API integration test for deleting data streams. (elastic#70020) renames SIEM to Security Solution (elastic#70070)
# Conflicts: # x-pack/plugins/security_solution/package.json # x-pack/plugins/security_solution/public/alerts/components/no_write_alerts_callout/translations.ts # x-pack/plugins/security_solution/public/cases/components/callout/index.test.tsx # x-pack/plugins/security_solution/public/cases/components/callout/translations.ts # x-pack/plugins/security_solution/public/cases/components/use_push_to_service/helpers.tsx # x-pack/plugins/security_solution/public/cases/components/use_push_to_service/index.test.tsx # x-pack/plugins/security_solution/public/cases/components/use_push_to_service/index.tsx # x-pack/plugins/security_solution/public/cases/pages/case.tsx # x-pack/plugins/security_solution/public/cases/pages/case_details.tsx # x-pack/plugins/security_solution/public/common/mock/kibana_react.ts # x-pack/plugins/security_solution/public/timelines/components/timeline/header/translations.ts # x-pack/plugins/siem/public/containers/local_storage/use_messages_storage.test.tsx # x-pack/plugins/siem/public/containers/local_storage/use_messages_storage.tsx # x-pack/plugins/siem/public/pages/case/components/callout/callout.test.tsx # x-pack/plugins/siem/public/pages/case/components/callout/callout.tsx # x-pack/plugins/siem/public/pages/case/components/callout/helpers.test.tsx # x-pack/plugins/siem/public/pages/case/components/callout/types.ts
# Conflicts: # x-pack/plugins/security_solution/package.json # x-pack/plugins/security_solution/public/alerts/components/no_write_alerts_callout/translations.ts # x-pack/plugins/security_solution/public/cases/components/callout/index.test.tsx # x-pack/plugins/security_solution/public/cases/components/callout/translations.ts # x-pack/plugins/security_solution/public/cases/components/use_push_to_service/helpers.tsx # x-pack/plugins/security_solution/public/cases/components/use_push_to_service/index.test.tsx # x-pack/plugins/security_solution/public/cases/components/use_push_to_service/index.tsx # x-pack/plugins/security_solution/public/cases/pages/case.tsx # x-pack/plugins/security_solution/public/cases/pages/case_details.tsx # x-pack/plugins/security_solution/public/common/mock/kibana_react.ts # x-pack/plugins/security_solution/public/timelines/components/timeline/header/translations.ts # x-pack/plugins/siem/public/containers/local_storage/use_messages_storage.test.tsx # x-pack/plugins/siem/public/containers/local_storage/use_messages_storage.tsx # x-pack/plugins/siem/public/pages/case/components/callout/callout.test.tsx # x-pack/plugins/siem/public/pages/case/components/callout/callout.tsx # x-pack/plugins/siem/public/pages/case/components/callout/helpers.test.tsx # x-pack/plugins/siem/public/pages/case/components/callout/types.ts
* master: (59 commits) [Lens] Fix broken test (elastic#70117) [SIEM] Import timeline fix (elastic#65448) [SECURITY SOLUTION][INGEST] UX update for ingest manager edit/create datasource for endpoint (elastic#70079) [Telemetry] Collector Schema (elastic#64942) [Endpoint] Add Endpoint empty states for onboarding (elastic#69626) Hide unused resolver buttons (elastic#70112) [Security] `Investigate in Resolver` Timeline Integration (elastic#70111) [Discover] Improve styling of graphs in sidebar (elastic#69440) [Metrics UI] Fix EuiTheme type issue (elastic#69735) skip failing suite (elastic#70104) (elastic#70103) [ENDPOINT] Hide the Timeline Flyout while on the Management Pages (elastic#69998) [SIEM][CASE] Persist callout when dismissed (elastic#68372) [SIEM][Exceptions] - Cleaned up and updated exception list item comment structure (elastic#69532) [Maps] remove indexing state from redux (elastic#69765) Add API integration test for deleting data streams. (elastic#70020) renames SIEM to Security Solution (elastic#70070) Adding saved_objects_page in OSS (elastic#69900) [Lens] Use accordion menus in field list for available and empty fields (elastic#68871) Dynamic uiActions & license support (elastic#68507) [SIEM] Update readme for timeline apis (elastic#67038) ...
…bana into alerting/consumer-based-rbac * 'alerting/consumer-based-rbac' of github.com:gmmorris/kibana: (25 commits) [Lens] Fix broken test (elastic#70117) [SIEM] Import timeline fix (elastic#65448) [SECURITY SOLUTION][INGEST] UX update for ingest manager edit/create datasource for endpoint (elastic#70079) [Telemetry] Collector Schema (elastic#64942) [Endpoint] Add Endpoint empty states for onboarding (elastic#69626) Hide unused resolver buttons (elastic#70112) [Security] `Investigate in Resolver` Timeline Integration (elastic#70111) [Discover] Improve styling of graphs in sidebar (elastic#69440) [Metrics UI] Fix EuiTheme type issue (elastic#69735) skip failing suite (elastic#70104) (elastic#70103) [ENDPOINT] Hide the Timeline Flyout while on the Management Pages (elastic#69998) [SIEM][CASE] Persist callout when dismissed (elastic#68372) [SIEM][Exceptions] - Cleaned up and updated exception list item comment structure (elastic#69532) [Maps] remove indexing state from redux (elastic#69765) Add API integration test for deleting data streams. (elastic#70020) renames SIEM to Security Solution (elastic#70070) Adding saved_objects_page in OSS (elastic#69900) [Lens] Use accordion menus in field list for available and empty fields (elastic#68871) Dynamic uiActions & license support (elastic#68507) [SIEM] Update readme for timeline apis (elastic#67038) ...
Pinging @elastic/security-solution (Team: SecuritySolution) |
Summary
This PR persists the dismissal of the callout to local storage and changes the context and the type of some messages.
It Introduces a new hook
useMessagesStorage
. The hook returns the following functions:Messages are divided into sub plugin domains. Each sub plugin has its own messages.
For cases, all error messages are being grouped into a callout by the type of message: primary, info, warning, and danger. The id of the callout is created with the use of md5. Even though, md5 is an insecure function its sufficient for our needs as is used as a mechanism to create callout fingerprints for internal use only and there are no security considerations. ONLY callouts of type primary are being persisted to local storage.
Other plugins, like Alerts, could use the new hook to add or get messages from the local storage depending on their needs.
Ref: https://github.com/elastic/siem-team/issues/666 and #67884
Checklist
Delete any items that are not applicable to this PR.
For maintainers