forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Security Solution] Refactor Timeline Notes to use EuiCommentList (el…
…astic#85256) * [Security Solution] Refactor Timeline Notes to use EuiCommentList * notes * fix types * unit tests * selector * uncomment Pinned tab * note event details * cleanup * cleanup * transparent background * don't display elastic as an owner when note is created * review + bugs fixed found Co-authored-by: Xavier Mouligneau <[email protected]>
- Loading branch information
1 parent
6e8ca9c
commit c206586
Showing
71 changed files
with
648 additions
and
1,929 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 14 additions & 12 deletions
26
...ity_solution/public/common/components/event_details/__snapshots__/json_view.test.tsx.snap
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
x-pack/plugins/security_solution/public/common/hooks/use_timeline_events_count.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import React, { useState } from 'react'; | ||
import { createPortalNode, OutPortal } from 'react-reverse-portal'; | ||
|
||
/** | ||
* A singleton portal for rendering content in the global header | ||
*/ | ||
const timelineEventsCountPortalNodeSingleton = createPortalNode(); | ||
|
||
export const useTimelineEventsCountPortal = () => { | ||
const [timelineEventsCountPortalNode] = useState(timelineEventsCountPortalNodeSingleton); | ||
|
||
return { timelineEventsCountPortalNode }; | ||
}; | ||
|
||
export const TimelineEventsCountBadge = React.memo(() => { | ||
const { timelineEventsCountPortalNode } = useTimelineEventsCountPortal(); | ||
|
||
return <OutPortal node={timelineEventsCountPortalNode} />; | ||
}); | ||
|
||
TimelineEventsCountBadge.displayName = 'TimelineEventsCountBadge'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.