From b71646ccd8f5a304c4b3b95f1c70d3369eb81bef Mon Sep 17 00:00:00 2001 From: Gloria Hornero Date: Thu, 9 Jul 2020 17:33:58 +0200 Subject: [PATCH 1/4] fixes alphabetical order for index patterns --- x-pack/plugins/security_solution/common/constants.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/plugins/security_solution/common/constants.ts b/x-pack/plugins/security_solution/common/constants.ts index 3b5b5958c879fb..3f6f718596417e 100644 --- a/x-pack/plugins/security_solution/common/constants.ts +++ b/x-pack/plugins/security_solution/common/constants.ts @@ -59,9 +59,9 @@ export const DEFAULT_INDEX_PATTERN = [ 'auditbeat-*', 'endgame-*', 'filebeat-*', + 'logs-*', 'packetbeat-*', 'winlogbeat-*', - 'logs-*', ]; /** This Kibana Advanced Setting enables the `Security news` feed widget */ From 957e53c71d2ba1953413e9fa096bdf678e9f06d4 Mon Sep 17 00:00:00 2001 From: Gloria Hornero Date: Thu, 9 Jul 2020 17:34:20 +0200 Subject: [PATCH 2/4] fixes cypress tests adding the new index pattern --- .../cypress/integration/alerts_detection_rules_custom.spec.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/x-pack/plugins/security_solution/cypress/integration/alerts_detection_rules_custom.spec.ts b/x-pack/plugins/security_solution/cypress/integration/alerts_detection_rules_custom.spec.ts index 81832b3d9edea6..a51ad4388c428b 100644 --- a/x-pack/plugins/security_solution/cypress/integration/alerts_detection_rules_custom.spec.ts +++ b/x-pack/plugins/security_solution/cypress/integration/alerts_detection_rules_custom.spec.ts @@ -131,6 +131,7 @@ describe.skip('Detection rules, custom', () => { 'auditbeat-*', 'endgame-*', 'filebeat-*', + 'logs-*', 'packetbeat-*', 'winlogbeat-*', ]; From 221209f5203704b0e966e2a02b57f9f4ccdd90f7 Mon Sep 17 00:00:00 2001 From: Gloria Hornero Date: Thu, 9 Jul 2020 21:12:57 +0200 Subject: [PATCH 3/4] fixes jest tests --- .../__snapshots__/drag_drop_context_wrapper.test.tsx.snap | 2 +- .../__snapshots__/event_details.test.tsx.snap | 4 ++-- .../public/common/containers/source/index.test.tsx | 4 ++-- .../detection_engine/rules/fetch_index_patterns.test.tsx | 8 ++++---- .../overview/components/overview_host/index.test.tsx | 2 +- .../overview/components/overview_network/index.test.tsx | 2 +- .../timeline/__snapshots__/timeline.test.tsx.snap | 2 +- .../body/column_headers/__snapshots__/index.test.tsx.snap | 2 +- .../__snapshots__/suricata_row_renderer.test.tsx.snap | 2 +- .../zeek/__snapshots__/zeek_details.test.tsx.snap | 2 +- .../zeek/__snapshots__/zeek_row_renderer.test.tsx.snap | 2 +- 11 files changed, 16 insertions(+), 16 deletions(-) diff --git a/x-pack/plugins/security_solution/public/common/components/drag_and_drop/__snapshots__/drag_drop_context_wrapper.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/drag_and_drop/__snapshots__/drag_drop_context_wrapper.test.tsx.snap index 0c96d0320d1987..16f095e5effbb2 100644 --- a/x-pack/plugins/security_solution/public/common/components/drag_and_drop/__snapshots__/drag_drop_context_wrapper.test.tsx.snap +++ b/x-pack/plugins/security_solution/public/common/components/drag_and_drop/__snapshots__/drag_drop_context_wrapper.test.tsx.snap @@ -369,9 +369,9 @@ exports[`DragDropContextWrapper rendering it renders against the snapshot 1`] = "auditbeat-*", "endgame-*", "filebeat-*", + "logs-*", "packetbeat-*", "winlogbeat-*", - "logs-*", ], "name": "event.end", "searchable": true, diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/__snapshots__/event_details.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/event_details/__snapshots__/event_details.test.tsx.snap index 408a4c74e930fe..9ca9cd6cce3893 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/__snapshots__/event_details.test.tsx.snap +++ b/x-pack/plugins/security_solution/public/common/components/event_details/__snapshots__/event_details.test.tsx.snap @@ -377,9 +377,9 @@ exports[`EventDetails rendering should match snapshot 1`] = ` "auditbeat-*", "endgame-*", "filebeat-*", + "logs-*", "packetbeat-*", "winlogbeat-*", - "logs-*", ], "name": "event.end", "searchable": true, @@ -1070,9 +1070,9 @@ In other use cases the message field can be used to concatenate different values "auditbeat-*", "endgame-*", "filebeat-*", + "logs-*", "packetbeat-*", "winlogbeat-*", - "logs-*", ], "name": "event.end", "searchable": true, diff --git a/x-pack/plugins/security_solution/public/common/containers/source/index.test.tsx b/x-pack/plugins/security_solution/public/common/containers/source/index.test.tsx index b9daba9a409418..bfde17723aef48 100644 --- a/x-pack/plugins/security_solution/public/common/containers/source/index.test.tsx +++ b/x-pack/plugins/security_solution/public/common/containers/source/index.test.tsx @@ -29,7 +29,7 @@ describe('Index Fields & Browser Fields', () => { indexPattern: { fields: [], title: - 'apm-*-transaction*,auditbeat-*,endgame-*,filebeat-*,packetbeat-*,winlogbeat-*,logs-*', + 'apm-*-transaction*,auditbeat-*,endgame-*,filebeat-*,logs-*,packetbeat-*,winlogbeat-*', }, indicesExist: true, loading: true, @@ -59,7 +59,7 @@ describe('Index Fields & Browser Fields', () => { indexPattern: { fields: mockIndexFields, title: - 'apm-*-transaction*,auditbeat-*,endgame-*,filebeat-*,packetbeat-*,winlogbeat-*,logs-*', + 'apm-*-transaction*,auditbeat-*,endgame-*,filebeat-*,logs-*,packetbeat-*,winlogbeat-*', }, loading: false, errorMessage: null, diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/fetch_index_patterns.test.tsx b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/fetch_index_patterns.test.tsx index c282a204f19a5d..0204a2980b9fc7 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/fetch_index_patterns.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/fetch_index_patterns.test.tsx @@ -352,9 +352,9 @@ describe('useFetchIndexPatterns', () => { 'auditbeat-*', 'endgame-*', 'filebeat-*', + 'logs-*', 'packetbeat-*', 'winlogbeat-*', - 'logs-*', ], name: 'event.end', searchable: true, @@ -369,9 +369,9 @@ describe('useFetchIndexPatterns', () => { 'auditbeat-*', 'endgame-*', 'filebeat-*', + 'logs-*', 'packetbeat-*', 'winlogbeat-*', - 'logs-*', ], indicesExists: true, indexPatterns: { @@ -418,7 +418,7 @@ describe('useFetchIndexPatterns', () => { { name: 'event.end', searchable: true, type: 'date', aggregatable: true }, ], title: - 'apm-*-transaction*,auditbeat-*,endgame-*,filebeat-*,packetbeat-*,winlogbeat-*,logs-*', + 'apm-*-transaction*,auditbeat-*,endgame-*,filebeat-*,logs-*,packetbeat-*,winlogbeat-*', }, }, result.current[1], @@ -450,9 +450,9 @@ describe('useFetchIndexPatterns', () => { 'auditbeat-*', 'endgame-*', 'filebeat-*', + 'logs-*', 'packetbeat-*', 'winlogbeat-*', - 'logs-*', ], indicesExists: false, isLoading: false, diff --git a/x-pack/plugins/security_solution/public/overview/components/overview_host/index.test.tsx b/x-pack/plugins/security_solution/public/overview/components/overview_host/index.test.tsx index bb9fd73d2df8ea..d019a480a8045d 100644 --- a/x-pack/plugins/security_solution/public/overview/components/overview_host/index.test.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/overview_host/index.test.tsx @@ -58,9 +58,9 @@ const mockOpenTimelineQueryResults: MockedProvidedQuery[] = [ 'auditbeat-*', 'endgame-*', 'filebeat-*', + 'logs-*', 'packetbeat-*', 'winlogbeat-*', - 'logs-*', ], inspect: false, }, diff --git a/x-pack/plugins/security_solution/public/overview/components/overview_network/index.test.tsx b/x-pack/plugins/security_solution/public/overview/components/overview_network/index.test.tsx index 0f6fce1486ee7d..c7f7c4f4af2545 100644 --- a/x-pack/plugins/security_solution/public/overview/components/overview_network/index.test.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/overview_network/index.test.tsx @@ -73,9 +73,9 @@ const mockOpenTimelineQueryResults: MockedProvidedQuery[] = [ 'auditbeat-*', 'endgame-*', 'filebeat-*', + 'logs-*', 'packetbeat-*', 'winlogbeat-*', - 'logs-*', ], inspect: false, }, diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/__snapshots__/timeline.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/timeline/__snapshots__/timeline.test.tsx.snap index 7baefaa6ab9516..591f7d01e09258 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/__snapshots__/timeline.test.tsx.snap +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/__snapshots__/timeline.test.tsx.snap @@ -474,9 +474,9 @@ exports[`Timeline rendering renders correctly against snapshot 1`] = ` "auditbeat-*", "endgame-*", "filebeat-*", + "logs-*", "packetbeat-*", "winlogbeat-*", - "logs-*", ], "name": "event.end", "searchable": true, diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/__snapshots__/index.test.tsx.snap index efd99e781d827c..738e7cf1546ab6 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/__snapshots__/index.test.tsx.snap +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/__snapshots__/index.test.tsx.snap @@ -382,9 +382,9 @@ exports[`ColumnHeaders rendering renders correctly against snapshot 1`] = ` "auditbeat-*", "endgame-*", "filebeat-*", + "logs-*", "packetbeat-*", "winlogbeat-*", - "logs-*", ], "name": "event.end", "searchable": true, diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/suricata/__snapshots__/suricata_row_renderer.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/suricata/__snapshots__/suricata_row_renderer.test.tsx.snap index cba4b9aa72a250..8672b542eb6c64 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/suricata/__snapshots__/suricata_row_renderer.test.tsx.snap +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/suricata/__snapshots__/suricata_row_renderer.test.tsx.snap @@ -371,9 +371,9 @@ exports[`suricata_row_renderer renders correctly against snapshot 1`] = ` "auditbeat-*", "endgame-*", "filebeat-*", + "logs-*", "packetbeat-*", "winlogbeat-*", - "logs-*", ], "name": "event.end", "searchable": true, diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/zeek/__snapshots__/zeek_details.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/zeek/__snapshots__/zeek_details.test.tsx.snap index e1000637147a81..d13c3de00c780f 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/zeek/__snapshots__/zeek_details.test.tsx.snap +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/zeek/__snapshots__/zeek_details.test.tsx.snap @@ -369,9 +369,9 @@ exports[`ZeekDetails rendering it renders the default ZeekDetails 1`] = ` "auditbeat-*", "endgame-*", "filebeat-*", + "logs-*", "packetbeat-*", "winlogbeat-*", - "logs-*", ], "name": "event.end", "searchable": true, diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/zeek/__snapshots__/zeek_row_renderer.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/zeek/__snapshots__/zeek_row_renderer.test.tsx.snap index d4c80441e60377..b8f28026dfdb52 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/zeek/__snapshots__/zeek_row_renderer.test.tsx.snap +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/zeek/__snapshots__/zeek_row_renderer.test.tsx.snap @@ -371,9 +371,9 @@ exports[`zeek_row_renderer renders correctly against snapshot 1`] = ` "auditbeat-*", "endgame-*", "filebeat-*", + "logs-*", "packetbeat-*", "winlogbeat-*", - "logs-*", ], "name": "event.end", "searchable": true, From f31eb78d917d154742a7690fbdc32377a498797c Mon Sep 17 00:00:00 2001 From: Gloria Hornero Date: Mon, 13 Jul 2020 14:07:51 +0200 Subject: [PATCH 4/4] fixes jest tests --- .../__snapshots__/index.test.tsx.snap | 23 +------------------ 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/__snapshots__/index.test.tsx.snap index db7a778673d81e..a5610cabc1774b 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/__snapshots__/index.test.tsx.snap +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/__snapshots__/index.test.tsx.snap @@ -120,27 +120,6 @@ exports[`ColumnHeaders rendering renders correctly against snapshot 1`] = ` "type": "string", }, }, - "event": Object { - "fields": Object { - "event.end": Object { - "aggregatable": true, - "category": "event", - "description": "event.end contains the date when the event ended or when the activity was last observed.", - "example": null, - "format": "", - "indexes": Array [ - "apm-*-transaction*", - "auditbeat-*", - "endgame-*", - "filebeat-*", - "logs-*", - "packetbeat-*", - "winlogbeat-*", - ], - "name": "event.end", - "searchable": true, - "type": "date", - }, }, "base": Object { "fields": Object { @@ -400,9 +379,9 @@ exports[`ColumnHeaders rendering renders correctly against snapshot 1`] = ` "auditbeat-*", "endgame-*", "filebeat-*", + "logs-*", "packetbeat-*", "winlogbeat-*", - "logs-*", ], "name": "event.end", "searchable": true,