[Investigations] - Add _source back to security solution flyout (#180477)

Resolves https://github.com/elastic/security-team/issues/8806

<img width="1421" alt="image"
src="c58abb22-cd76-4531-b764-de99036923a1">
This commit is contained in:
Michael Olorunnisola 2024-04-11 08:37:44 -04:00 committed by GitHub
parent 195265cb81
commit 3511e0238f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 4 additions and 3 deletions

View file

@ -39,7 +39,8 @@ export const timelineEventsDetails: TimelineFactory<TimelineEventsQueries.detail
response: IEsSearchResponse<EventHit>
): Promise<TimelineEventsDetailsStrategyResponse> => {
const { indexName, eventId, runtimeMappings = {} } = options;
const { fields, ...hitsData } = response.rawResponse.hits.hits[0] ?? {};
// _source is removed here as it's only needed in the rawEventData below
const { fields, _source, ...hitsData } = response.rawResponse.hits.hits[0] ?? {};
const inspect = {
dsl: [

View file

@ -22,7 +22,7 @@ describe('buildTimelineDetailsQuery', () => {
Object {
"allow_no_indices": true,
"body": Object {
"_source": false,
"_source": true,
"fields": Array [
Object {
"field": "*",

View file

@ -61,7 +61,7 @@ export const buildTimelineDetailsQuery = ({
// Remove and instead pass index_pattern.id once issue resolved: https://github.com/elastic/kibana/issues/111762
runtime_mappings: runtimeMappings,
stored_fields: ['*'],
_source: false,
_source: true,
},
size: 1,
};