-
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 Solution] Integrate Vanilla Unified Data Table in Timeline #176064
Changes from 1 commit
78cfc74
7eb5b4d
5dff62f
72cfff5
258ed5d
20921de
dfde043
b1556c7
769d5ce
1a4b9a4
e87c5a9
aed026b
a5c7a81
c2e3719
6fb3bef
9595983
d42cb2e
f3faa32
aa41a23
aaf4ba4
c994a04
2d6e0b8
5a03ece
963363f
05bd286
332bfc2
d67ac0f
a8401a4
92cc95e
288195c
ff4feea
a22d803
c0fbb5f
1dfe8f4
1fe3ea6
4c8fe91
4a61483
fa5d8e0
b2d9ea5
6b81b0b
ab22474
2863544
20edaae
81ab130
df53346
a141c2b
2837017
9074af3
97425cd
6551476
374c0c7
1d05271
87655c5
642109f
077c0c1
c0934bd
557344d
d7af041
248226f
c421fa3
cf159a7
8694f9e
56c1ae6
0bfc88b
770f1f8
d01ba94
a4b1e9c
472c173
112a343
7360c8c
84fe0fb
c312a7b
8e840b2
2df4376
4aa05e9
2467a37
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -255,10 +255,12 @@ export const defaultTimelineToTimelineModel = ( | |
timeline: TimelineResult, | ||
duplicate: boolean, | ||
timelineType?: TimelineType, | ||
useDiscoverComponentsInTimeline?: boolean | ||
unifiedComponentsInTimelineEnabled?: boolean | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reminder @logeekal : add more tests for this. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. reminder 😄 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done here: 077c0c1 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The current approach forces many components to retrieve this value using Wouldn't it be easier to use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @semd , I did not even know that it existed. I agree with you but I have three more upcoming PRs for this functionality. Do you mind, if I do that change in next PR ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes sure, it's just a simplification, and also to reduce the scope of the changes. But if you keep it this way it's also fine, as you prefer 👍 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually I will have to check the Singleton class API but I will make changes accordingly in the next PR. I would be glad as well if I could remove this extra param from everywhere. |
||
): TimelineModel => { | ||
const isTemplate = timeline.timelineType === TimelineType.template; | ||
const defaultHeadersValue = useDiscoverComponentsInTimeline ? defaultUdtHeaders : defaultHeaders; | ||
const defaultHeadersValue = unifiedComponentsInTimelineEnabled | ||
? defaultUdtHeaders | ||
: defaultHeaders; | ||
|
||
const timelineEntries = { | ||
...timeline, | ||
|
@@ -308,7 +310,7 @@ export const formatTimelineResultToModel = ( | |
timelineToOpen: TimelineResult, | ||
duplicate: boolean = false, | ||
timelineType?: TimelineType, | ||
useDiscoverComponentsInTimeline?: boolean | ||
unifiedComponentsInTimelineEnabled?: boolean | ||
): { notes: Note[] | null | undefined; timeline: TimelineModel } => { | ||
const { notes, ...timelineModel } = timelineToOpen; | ||
return { | ||
|
@@ -317,7 +319,7 @@ export const formatTimelineResultToModel = ( | |
timelineModel, | ||
duplicate, | ||
timelineType, | ||
useDiscoverComponentsInTimeline | ||
unifiedComponentsInTimelineEnabled | ||
), | ||
}; | ||
}; | ||
|
@@ -340,7 +342,7 @@ export interface QueryTimelineById<TCache> { | |
}) => Action<{ id: string; isLoading: boolean }>; | ||
updateTimeline: DispatchUpdateTimeline; | ||
savedSearchId?: string; | ||
useDiscoverComponentsInTimeline?: boolean; // temporary til fully migrate | ||
unifiedComponentsInTimelineEnabled?: boolean; // temporary til fully migrate | ||
} | ||
|
||
export const queryTimelineById = <TCache>({ | ||
|
@@ -355,7 +357,7 @@ export const queryTimelineById = <TCache>({ | |
updateIsLoading, | ||
updateTimeline, | ||
savedSearchId, | ||
useDiscoverComponentsInTimeline = false, | ||
unifiedComponentsInTimelineEnabled = false, | ||
}: QueryTimelineById<TCache>) => { | ||
updateIsLoading({ id: TimelineId.active, isLoading: true }); | ||
if (timelineId == null) { | ||
|
@@ -367,7 +369,7 @@ export const queryTimelineById = <TCache>({ | |
to: DEFAULT_TO_MOMENT.toISOString(), | ||
timeline: { | ||
...timelineDefaults, | ||
columns: useDiscoverComponentsInTimeline ? defaultUdtHeaders : defaultHeaders, | ||
columns: unifiedComponentsInTimelineEnabled ? defaultUdtHeaders : defaultHeaders, | ||
id: TimelineId.active, | ||
activeTab: activeTimelineTab, | ||
show: openTimeline, | ||
|
@@ -387,7 +389,7 @@ export const queryTimelineById = <TCache>({ | |
timelineToOpen, | ||
duplicate, | ||
timelineType, | ||
useDiscoverComponentsInTimeline | ||
unifiedComponentsInTimelineEnabled | ||
); | ||
|
||
if (onOpenTimeline != null) { | ||
|
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.
Thanks for keeping these all constant. Going to make it much easier to remove when this becomes the default