diff --git a/x-pack/legacy/plugins/siem/common/constants.ts b/x-pack/legacy/plugins/siem/common/constants.ts index 3b5cdec4dc4d9..91e6d9d5e3be5 100644 --- a/x-pack/legacy/plugins/siem/common/constants.ts +++ b/x-pack/legacy/plugins/siem/common/constants.ts @@ -11,6 +11,7 @@ export const DEFAULT_DATE_FORMAT = 'dateFormat'; export const DEFAULT_DATE_FORMAT_TZ = 'dateFormat:tz'; export const DEFAULT_DARK_MODE = 'theme:darkMode'; export const DEFAULT_INDEX_KEY = 'siem:defaultIndex'; +export const DEFAULT_NUMBER_FORMAT = 'format:number:defaultPattern'; export const DEFAULT_TIME_RANGE = 'timepicker:timeDefaults'; export const DEFAULT_REFRESH_RATE_INTERVAL = 'timepicker:refreshIntervalDefaults'; export const DEFAULT_SIEM_TIME_RANGE = 'siem:timeDefaults'; diff --git a/x-pack/legacy/plugins/siem/public/components/alerts_viewer/alerts_table.tsx b/x-pack/legacy/plugins/siem/public/components/alerts_viewer/alerts_table.tsx index e0101dc3ab74b..8fa4f3625c34f 100644 --- a/x-pack/legacy/plugins/siem/public/components/alerts_viewer/alerts_table.tsx +++ b/x-pack/legacy/plugins/siem/public/components/alerts_viewer/alerts_table.tsx @@ -64,7 +64,7 @@ export const AlertsTable = React.memo( const alertsFilter = useMemo(() => [...defaultAlertsFilters, ...pageFilters], [pageFilters]); return ( ({ documentType: i18n.ALERTS_DOCUMENT_TYPE, footerText: i18n.TOTAL_COUNT_OF_ALERTS, - showCheckboxes: false, - showRowRenderers: false, title: i18n.ALERTS_TABLE_TITLE, }), [] diff --git a/x-pack/legacy/plugins/siem/public/components/alerts_viewer/default_headers.ts b/x-pack/legacy/plugins/siem/public/components/alerts_viewer/default_headers.ts index 52990f521b58d..936d43fff0b48 100644 --- a/x-pack/legacy/plugins/siem/public/components/alerts_viewer/default_headers.ts +++ b/x-pack/legacy/plugins/siem/public/components/alerts_viewer/default_headers.ts @@ -65,4 +65,5 @@ export const alertsHeaders: ColumnHeader[] = [ export const alertsDefaultModel: SubsetTimelineModel = { ...timelineDefaults, columns: alertsHeaders, + showRowRenderers: false, }; diff --git a/x-pack/legacy/plugins/siem/public/components/events_viewer/events_viewer.tsx b/x-pack/legacy/plugins/siem/public/components/events_viewer/events_viewer.tsx index 9878194a17826..7c4369e952d6f 100644 --- a/x-pack/legacy/plugins/siem/public/components/events_viewer/events_viewer.tsx +++ b/x-pack/legacy/plugins/siem/public/components/events_viewer/events_viewer.tsx @@ -5,8 +5,8 @@ */ import { EuiPanel } from '@elastic/eui'; -import { getOr, isEmpty, isEqual } from 'lodash/fp'; -import React from 'react'; +import { getOr, isEmpty, isEqual, union } from 'lodash/fp'; +import React, { useMemo } from 'react'; import styled from 'styled-components'; import { BrowserFields } from '../../containers/source'; @@ -46,6 +46,7 @@ interface Props { browserFields: BrowserFields; columns: ColumnHeader[]; dataProviders: DataProvider[]; + deletedEventIds: Readonly; end: number; filters: esFilters.Filter[]; headerFilterGroup?: React.ReactNode; @@ -71,6 +72,7 @@ export const EventsViewer = React.memo( browserFields, columns, dataProviders, + deletedEventIds, end, filters, headerFilterGroup, @@ -104,6 +106,14 @@ export const EventsViewer = React.memo( end, isEventViewer: true, }); + const queryFields = useMemo( + () => + union( + columnsHeader.map(c => c.id), + timelineTypeContext.queryFields ?? [] + ), + [columnsHeader, timelineTypeContext.queryFields] + ); return ( @@ -119,7 +129,7 @@ export const EventsViewer = React.memo( {combinedQueries != null ? ( c.id)} + fields={queryFields} filterQuery={combinedQueries.filterQuery} id={id} indexPattern={indexPattern} @@ -139,73 +149,81 @@ export const EventsViewer = React.memo( pageInfo, refetch, totalCount = 0, - }) => ( - <> - - {headerFilterGroup} - + }) => { + const totalCountMinusDeleted = + totalCount > 0 ? totalCount - deletedEventIds.length : 0; + + // TODO: Reset eventDeletedIds/eventLoadingIds on refresh/loadmore (getUpdatedAt) + return ( + <> + + {headerFilterGroup} + - {utilityBar?.(totalCount)} + {utilityBar?.(totalCountMinusDeleted)} -
- - + width={width} + type={timelineTypeContext} + > + - + !deletedEventIds.includes(e._id))} + id={id} + isEventViewer={true} + height={height} + sort={sort} + toggleColumn={toggleColumn} + /> -
- -
- - )} +