Skip to content

Commit

Permalink
[Security Solution] Enable investigate in timeline for all events, no…
Browse files Browse the repository at this point in the history
…t just signals (#119375) (#119555)

* Enable investigate in timeline for all events, not just signals

* Update mocks

* Lint

Co-authored-by: Kevin Qualters <[email protected]>
  • Loading branch information
kibanamachine and kqualters-elastic authored Nov 24, 2021
1 parent 419c311 commit d3a15d0
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const EventsQueryTabBodyComponent: React.FC<HostsComponentsQueryProps> = ({
}) => {
const dispatch = useDispatch();
const { globalFullScreen } = useGlobalFullScreen();
const ACTION_BUTTON_COUNT = 3;
const ACTION_BUTTON_COUNT = 4;
const tGridEnabled = useIsExperimentalFeatureEnabled('tGridEnabled');

useEffect(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ const ActionsComponent: React.FC<ActionProps> = ({
</EventsTdContent>
</div>
<>
{timelineId !== TimelineId.active && eventType === 'signal' && (
{timelineId !== TimelineId.active && (
<InvestigateInTimelineAction
ariaLabel={i18n.SEND_ALERT_TO_TIMELINE_FOR_ROW({ ariaRowindex, columnValues })}
key="investigate-in-timeline"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,18 @@ import { getActionsColumnWidth } from '../../../../../../../timelines/public';

jest.mock('../../../../../common/hooks/use_experimental_features');
const useIsExperimentalFeatureEnabledMock = useIsExperimentalFeatureEnabled as jest.Mock;
jest.mock('../../../../../common/hooks/use_selector');
jest.mock('../../../../../common/hooks/use_selector', () => ({
useShallowEqualSelector: jest.fn(),
useDeepEqualSelector: jest.fn(),
}));
jest.mock('../../../../../common/lib/kibana', () => ({
useKibana: () => ({
services: {
timelines: { ...mockTimelines },
data: {
search: jest.fn(),
query: jest.fn(),
},
application: {
capabilities: {
siem: { crud_alerts: true, read_alerts: true },
Expand Down Expand Up @@ -146,7 +153,6 @@ describe('EventColumnView', () => {
const wrapper = mount(
<EventColumnView
{...props}
timelineId="timeline-test"
leadingControlColumns={[testLeadingControlColumn, ...leadingControlColumns]}
/>,
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ jest.mock('../../../../common/lib/kibana', () => {
siem: { crud_alerts: true, read_alerts: true },
},
},
data: {
search: jest.fn(),
query: jest.fn(),
},
uiSettings: {
get: jest.fn(),
},
Expand Down

0 comments on commit d3a15d0

Please sign in to comment.