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

[7.x] [Security Solution][Detections] Update read-only callouts from warning to info so they persist when dismissed (#84904) #86047

Merged
merged 1 commit into from
Dec 16, 2020

Conversation

banderror
Copy link
Contributor

Backports the following commits to 7.x:

…g to info so they persist when dismissed (elastic#84904)

**Addresses:** elastic#76587

## Summary

In this PR I'm doing basically 2 things:

1. Making readonly callouts we have in Detections `primary` instead of `warning` and thus persistable in local storage (if a callout is dismissed, we remember it there)
2. Creating a reusable implementation for that.

TODO:

- [x] Adjust all callouts used in Detections to be of type `primary`
- [x] Implement the local storage logic (dumb)
- [x] Implement the local storage logic (reusable)
- [x] Add a new user role: "Reader" (read-only user)
- [x] Add Cypress tests

Out of scope:

- Add unit tests. I'll probably address this in a follow-up PR. Do you think it's worth it or better to wait until the rework (see the next point)?
- Rework callouts to standardise them across Detections, Cases and other parts of the Security app? See my comment below in this PR.

## Screen recordings

Quick demo of how this implementation works:

- [primary callouts](https://drive.google.com/file/d/1SYQd_ihKPvzlVUxELI8qNEqLBOkL18Gd/view?usp=sharing)
- [warning, danger](https://drive.google.com/file/d/1lrAFPyXNjOYSiEsUXxY_fjXsvmyDcdWY/view?usp=sharing) (callout types here were manually adjusted)

## Additional notes

Cypress tests are based on the work done in elastic#81866.

![](https://puu.sh/GXwOd/1c855cb03f.png)
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
securitySolution 2138 2148 +10

Async chunks

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

id before after diff
securitySolution 8.3MB 8.3MB +9.0KB
triggersActionsUi 1.5MB 1.5MB -26.9KB
total -17.9KB

Distributable file count

id before after diff
default 47517 48290 +773

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
triggersActionsUi 161.5KB 161.6KB +102.0B
Unknown metric groups

async chunk count

id before after diff
triggersActionsUi 31 32 +1

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

@spong spong merged commit 36fa4ad into elastic:7.x Dec 16, 2020
@banderror banderror deleted the backport/7.x/pr-84904 branch December 16, 2020 01:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants