-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Security] [Cases] Manage timeline UI API #67719
Conversation
Pinging @elastic/siem (Team:SIEM) |
x-pack/plugins/siem/public/timelines/components/timeline/body/events/event_column_view.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/siem/public/timelines/components/timeline/body/events/event_column_view.tsx
Show resolved
Hide resolved
x-pack/plugins/siem/public/timelines/components/timeline/body/events/event_column_view.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.
Checked out locally, and verified we've got all the features we need to support our 7.9 development effort! 🚀 🌕
Left a couple comments around the popover itself, but other than that LGTM from the Detections side. Nice implementation here @stephmilovic -- happy to have a nice easy way to fetch and manage timeline configurations! 🙂
PS: In testing, a future feature came to mind that I wanted to mention. It would be nice if we had the ability to programmatically generate/disable/hide actions for a given row based on the underlying row event data. This would be nice for hiding certain actions that aren't relevant to a specific event, or you know, all sorts of other things...😅 We almost ended up having this as a requirement as we had two separate actions Add Endpoint Exception
and Add Rule Exception
(which would require us to introspect the row event data to know which to show/hide), but they've since been combined to the Add Exception
action, so we can key off of the event data within the action itself.
Just commenting as this would change the implementation a little, and may end up being something we'll have to support in the future. Will chat with product/design tomorrow to see how near in the future something like this might be. Either way, awesome improvements here -- thanks again @stephmilovic!
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
…ms-column * 'master' of github.com:elastic/kibana: (63 commits) remove scripts. prettire update has been done (elastic#68130) Closes elastic#68055 by detecting the local Kibana version and using that as (elastic#68198) [apm] docs: add deployment annotation example (elastic#67408) [ML] Extend population preview chart to show actual and typical value (elastic#67569) Refactor index management client integration tests for scalability (elastic#67917) Add generator function that creates multiple alerts (elastic#67713) chore(NA): remove config arg from os packages (elastic#67871) [Reporting] Move code out of Legacy (elastic#67904) [Metrics UI] Add overrides to Snapshot API to support alert previews (elastic#68125) [Security] [Cases] Manage timeline UI API (elastic#67719) [ENDPOINT][INGEST]Task/endpoint ingest update (elastic#67234) Fix code coverage for jest, upload merged reports (elastic#68149) Update documentation/examples of deprecated namespaceAgnostic field (elastic#68039) [DOCS] Updates Canvas docs with new menus (elastic#66061) chore(NA): avoids imports of server or public code into common (elastic#67231) [SIEM] Fix GetOneTimeline graphql type (elastic#68137) skip flaky suite (elastic#67838) [Uptime] Add loading message for monitor list no items (elastic#67378) [Ingest Manager] Update indexing strategy docs to use dataset.* (elastic#68068) [Ingest Manager] Fix datasource validation for streams without vars (elastic#67950) ... # Conflicts: # x-pack/plugins/index_management/__jest__/client_integration/helpers/index.ts # x-pack/plugins/index_management/__jest__/client_integration/home.test.ts # x-pack/plugins/index_management/__jest__/client_integration/home/index_templates_tab.helpers.ts
* master: (26 commits) [Console]remove completion for type for filter queries and aggs (elastic#68103) [ML] Transforms: Filter aggregation support (elastic#67591) [ES UI Shared] Monaco XJSON (elastic#67485) [Index Management] Add data streams functionality to indices tab (elastic#67940) [Discover] Fix renaming of saved search not displayed in breadcrumb (elastic#67577) [SECURITY] Rename siem plugin to security_solution (elastic#67902) [Uptime] Fix Telemetry Api flaky test (elastic#67358) [Data plugin] Add configuration property to enable / disable autocomplete (elastic#67847) remove scripts. prettire update has been done (elastic#68130) Closes elastic#68055 by detecting the local Kibana version and using that as (elastic#68198) [apm] docs: add deployment annotation example (elastic#67408) [ML] Extend population preview chart to show actual and typical value (elastic#67569) Refactor index management client integration tests for scalability (elastic#67917) Add generator function that creates multiple alerts (elastic#67713) chore(NA): remove config arg from os packages (elastic#67871) [Reporting] Move code out of Legacy (elastic#67904) [Metrics UI] Add overrides to Snapshot API to support alert previews (elastic#68125) [Security] [Cases] Manage timeline UI API (elastic#67719) [ENDPOINT][INGEST]Task/endpoint ingest update (elastic#67234) Fix code coverage for jest, upload merged reports (elastic#68149) ...
Pinging @elastic/security-solution (Team: SecuritySolution) |
Summary
Introduces a new hook,
useTimelineManager
, to manage timelines at a global level. The hook is implemented by wrapping the entire app in a context provider<ManageGlobalTimeline>
, and theuseManageTimeline
hook is then called within the app wherever we want to expose theuseTimelineManager()
methods . The following timeline data is now managed in this hook, indexed by timelineId:The hook returns the following methods:
Timeline Row Actions
One of the new methods introduced in
useTimelineManager
issetTimelineRowActions
. This hook sets the icon actions that render at the beginning of a row in timeline as highlighted in the below screenshot.This is how the interface for timelineRowAction reads:
We can now display actions in either the existing top level icon pattern or a within a new context menu icon by setting
displayType
to eithericon
orcontextMenu
.width
only needs to be set ondisplayType: icon
. Here is the same action displayed first as anicon
, and next as acontextMenu
NOTE TO TESTER
Add the following object to the array returned in
getSignalsActions
withinx-pack/plugins/siem/public/alerts/components/signals/default_config.tsx
in order to test thecontextMenu
:Checklist
Delete any items that are not applicable to this PR.