mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
* [SIEM] Default the Timeline events filter to show All events (#58953) ## [SIEM] Default the Timeline events filter to show All events The Timeline events filter introduced in `7.6` to support the [detection engine](https://www.elastic.co/guide/en/siem/guide/current/detection-engine-overview.html) defaulted to filtering by `Raw events`, and thus required manually selecting `All events` or `Signal events` from the dropdown to view signals. The new default is `All events`, per the screenshots below: ### Before  ### After  * * Added `eventType`, which is a required prop in `7.6.x` to pass the type check, along with this note: ``` CAUTION: `eventType` is an optional prop in post-`7.6.x` branches. In later branches, `eventType` is omitted from this test, to truly verify the new default from redux. In this branch, we must specify `eventType` to pass the type check, but this is not the true intent of this test. ```
This commit is contained in:
parent
188e9faa9c
commit
e29a53f5ba
4 changed files with 50 additions and 5 deletions
|
@ -236,7 +236,7 @@ describe('helpers', () => {
|
|||
description: '',
|
||||
deletedEventIds: [],
|
||||
eventIdToNoteIds: {},
|
||||
eventType: 'raw',
|
||||
eventType: 'all',
|
||||
filters: [],
|
||||
highlightedDropAndProviderId: '',
|
||||
historyIds: [],
|
||||
|
@ -330,7 +330,7 @@ describe('helpers', () => {
|
|||
description: '',
|
||||
deletedEventIds: [],
|
||||
eventIdToNoteIds: {},
|
||||
eventType: 'raw',
|
||||
eventType: 'all',
|
||||
filters: [],
|
||||
highlightedDropAndProviderId: '',
|
||||
historyIds: [],
|
||||
|
@ -417,7 +417,7 @@ describe('helpers', () => {
|
|||
description: '',
|
||||
deletedEventIds: [],
|
||||
eventIdToNoteIds: {},
|
||||
eventType: 'raw',
|
||||
eventType: 'all',
|
||||
filters: [],
|
||||
highlightedDropAndProviderId: '',
|
||||
historyIds: [],
|
||||
|
@ -539,7 +539,7 @@ describe('helpers', () => {
|
|||
description: '',
|
||||
deletedEventIds: [],
|
||||
eventIdToNoteIds: {},
|
||||
eventType: 'raw',
|
||||
eventType: 'all',
|
||||
filters: [
|
||||
{
|
||||
$state: {
|
||||
|
|
|
@ -77,6 +77,7 @@ const PickEventTypeComponents: React.FC<PickEventTypeProps> = ({
|
|||
return (
|
||||
<PickEventContainer>
|
||||
<EuiSuperSelect
|
||||
data-test-subj="pick-event-type"
|
||||
fullWidth={false}
|
||||
valueOfSelected={eventType}
|
||||
onChange={onChangeEventType}
|
||||
|
|
|
@ -208,6 +208,50 @@ describe('Timeline', () => {
|
|||
|
||||
expect(wrapper.find('[data-test-subj="table-pagination"]').exists()).toEqual(false);
|
||||
});
|
||||
|
||||
test('it defaults to showing `All events`', () => {
|
||||
const wrapper = mount(
|
||||
<TestProviders>
|
||||
<MockedProvider mocks={mocks}>
|
||||
<TimelineComponent
|
||||
browserFields={mockBrowserFields}
|
||||
columns={defaultHeaders}
|
||||
id="foo"
|
||||
dataProviders={mockDataProviders}
|
||||
end={endDate}
|
||||
eventType="all" // CAUTION: `eventType` is an optional prop in post-`7.6.x` branches. In later branches, `eventType` is omitted from this test, to truly verify the new default from redux. In this branch, we must specify `eventType` to pass the type check, but this is not the true intent of this test.
|
||||
filters={[]}
|
||||
flyoutHeight={testFlyoutHeight}
|
||||
flyoutHeaderHeight={flyoutHeaderHeight}
|
||||
indexPattern={indexPattern}
|
||||
indexToAdd={[]}
|
||||
isLive={false}
|
||||
itemsPerPage={5}
|
||||
itemsPerPageOptions={[5, 10, 20]}
|
||||
kqlMode="search"
|
||||
kqlQueryExpression=""
|
||||
loadingIndexName={false}
|
||||
onChangeDataProviderKqlQuery={jest.fn()}
|
||||
onChangeDroppableAndProvider={jest.fn()}
|
||||
onChangeItemsPerPage={jest.fn()}
|
||||
onDataProviderEdited={jest.fn()}
|
||||
onDataProviderRemoved={jest.fn()}
|
||||
onToggleDataProviderEnabled={jest.fn()}
|
||||
onToggleDataProviderExcluded={jest.fn()}
|
||||
show={true}
|
||||
showCallOutUnauthorizedMsg={false}
|
||||
start={startDate}
|
||||
sort={sort}
|
||||
toggleColumn={jest.fn()}
|
||||
/>
|
||||
</MockedProvider>
|
||||
</TestProviders>
|
||||
);
|
||||
|
||||
expect(wrapper.find('[data-test-subj="pick-event-type"] button').text()).toEqual(
|
||||
'All events'
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe('event wire up', () => {
|
||||
|
|
|
@ -14,7 +14,7 @@ export const timelineDefaults: SubsetTimelineModel & Pick<TimelineModel, 'filter
|
|||
dataProviders: [],
|
||||
deletedEventIds: [],
|
||||
description: '',
|
||||
eventType: 'raw',
|
||||
eventType: 'all',
|
||||
eventIdToNoteIds: {},
|
||||
highlightedDropAndProviderId: '',
|
||||
historyIds: [],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue