Skip to content

Commit

Permalink
[Security Solution] Alerts details (elastic#83963)
Browse files Browse the repository at this point in the history
* init alert details tab

* styles

* readMore button

* readmore btn

* field mappings

* add unit tests

* unit test

* fix unit test

* functional test

* isolate lineClamp component

* review

* unit test

* fix rule name in events table

* originalvalue

* unit test

* add close event details button

* rollback cypress configs

* cypress

* close events details

* remove Ip

* review

* review

* review

* review

* review

* review

* review

* fix i18n check

* fix import

* fix eslint

* use connect

* close flyout when expanded event doesn't exist in the list

* Update x-pack/plugins/security_solution/public/timelines/components/timeline/expandable_event/index.tsx

Co-authored-by: Patryk Kopyciński <[email protected]>

* fix types

* unit test

* fix rule status badge

* isolate host name renderer

* fixup

* cypress

* cypress

* defaultModel

* review comments

* unit test

* replace findIndex with some

* review

* remove defaultModel from toggle event action

* review

* cleanup defaultModel

* unit test

* rollback handleClearSelection

* fixup

* fix i18n

* cleanup defaultmodel

* cleanup

* summary value

* fix showing timeline details

* layout

* fix timeline memoization

* fix long query

* styling

Co-authored-by: Kibana Machine <[email protected]>
Co-authored-by: Patryk Kopyciński <[email protected]>
  • Loading branch information
3 people committed Dec 12, 2020
1 parent ac49c78 commit 1399c47
Show file tree
Hide file tree
Showing 49 changed files with 1,617 additions and 176 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { Inspect, Maybe } from '../../../common';
import { TimelineRequestOptionsPaginated } from '../..';

export interface TimelineEventsDetailsItem {
category?: string;
field: string;
values?: Maybe<string[]>;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,6 @@ export type TimelineEventsType = 'all' | 'raw' | 'alert' | 'signal' | 'custom';
export interface TimelineExpandedEventType {
eventId: string;
indexName: string;
loading: boolean;
}

// eslint-disable-next-line @typescript-eslint/no-explicit-any
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,9 @@
* you may not use this file except in compliance with the Elastic License.
*/

import { ALERT_ID } from '../screens/alerts';
import { PROVIDER_BADGE } from '../screens/timeline';

import {
expandFirstAlert,
investigateFirstAlertInTimeline,
waitForAlertsPanelToBeLoaded,
} from '../tasks/alerts';
import { investigateFirstAlertInTimeline, waitForAlertsPanelToBeLoaded } from '../tasks/alerts';
import { esArchiverLoad, esArchiverUnload } from '../tasks/es_archiver';
import { loginAndWaitForPage } from '../tasks/login';

Expand All @@ -29,13 +24,13 @@ describe('Alerts timeline', () => {

it('Investigate alert in default timeline', () => {
waitForAlertsPanelToBeLoaded();
expandFirstAlert();
cy.get(ALERT_ID)
investigateFirstAlertInTimeline();
cy.get(PROVIDER_BADGE)
.first()
.invoke('text')
.then((eventId) => {
investigateFirstAlertInTimeline();
cy.get(PROVIDER_BADGE).filter(':visible').should('have.text', `_id: "${eventId}"`);
cy.get(PROVIDER_BADGE).filter(':visible').should('have.text', eventId);
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,6 @@ export const CaseComponent = React.memo<CaseProps>(
event: {
eventId: alertId,
indexName: index,
loading: false,
},
})
);
Expand Down
Loading

0 comments on commit 1399c47

Please sign in to comment.