Skip to content

Commit f1c0bdd

Browse files
[Security Solution] Fix networkTopNFlow search strategy response (#80362) (#80582)
1 parent d4145a2 commit f1c0bdd

File tree

29 files changed

+327
-260
lines changed

29 files changed

+327
-260
lines changed

x-pack/plugins/security_solution/common/ecs/geo/index.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,15 @@
66

77
export interface GeoEcs {
88
city_name?: string[];
9-
109
continent_name?: string[];
11-
1210
country_iso_code?: string[];
13-
1411
country_name?: string[];
15-
1612
location?: Location;
17-
1813
region_iso_code?: string[];
19-
2014
region_name?: string[];
2115
}
2216

2317
export interface Location {
2418
lon?: number[];
25-
2619
lat?: number[];
2720
}

x-pack/plugins/security_solution/common/ecs/source/index.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,9 @@ import { GeoEcs } from '../geo';
88

99
export interface SourceEcs {
1010
bytes?: number[];
11-
1211
ip?: string[];
13-
1412
port?: number[];
15-
1613
domain?: string[];
17-
1814
geo?: GeoEcs;
19-
2015
packets?: number[];
2116
}

x-pack/plugins/security_solution/public/common/components/tables/__snapshots__/helpers.test.tsx.snap

Lines changed: 0 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

x-pack/plugins/security_solution/public/common/components/tables/helpers.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import styled from 'styled-components';
1212
import { DragEffects, DraggableWrapper } from '../drag_and_drop/draggable_wrapper';
1313
import { escapeDataProviderId } from '../drag_and_drop/helpers';
1414
import { defaultToEmptyTag, getEmptyTagValue } from '../empty_value';
15-
import { MoreRowItems, Spacer } from '../page';
15+
import { MoreRowItems } from '../page';
1616
import { IS_OPERATOR } from '../../../timelines/components/timeline/data_providers/data_provider';
1717
import { Provider } from '../../../timelines/components/timeline/data_providers/provider';
1818

@@ -92,12 +92,6 @@ export const getRowItemDraggables = ({
9292
const id = escapeDataProviderId(`${idPrefix}-${attrName}-${rowItem}-${index}`);
9393
return (
9494
<React.Fragment key={id}>
95-
{index !== 0 && (
96-
<>
97-
{','}
98-
<Spacer />
99-
</>
100-
)}
10195
<DraggableWrapper
10296
key={id}
10397
dataProvider={{

x-pack/plugins/security_solution/public/common/containers/anomalies/anomalies_query_tab_body/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ const AnomaliesQueryTabBodyComponent: React.FC<AnomaliesQueryTabBodyProps> = ({
2929
AnomaliesTableComponent,
3030
flowTarget,
3131
ip,
32+
hostName,
3233
indexNames,
3334
}) => {
3435
const { jobs } = useInstalledSecurityJobs();
@@ -71,6 +72,7 @@ const AnomaliesQueryTabBodyComponent: React.FC<AnomaliesQueryTabBodyProps> = ({
7172
narrowDateRange={narrowDateRange}
7273
flowTarget={flowTarget}
7374
ip={ip}
75+
hostName={hostName}
7476
/>
7577
</>
7678
);

x-pack/plugins/security_solution/public/common/containers/anomalies/anomalies_query_tab_body/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,5 @@ export type AnomaliesQueryTabBodyProps = QueryTabBodyProps & {
3232
updateDateRange?: UpdateDateRange;
3333
hideHistogramIfEmpty?: boolean;
3434
ip?: string;
35+
hostName?: string;
3536
};

x-pack/plugins/security_solution/public/hosts/components/authentications_table/index.tsx

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -256,12 +256,7 @@ const getAuthenticationColumns = (): AuthTableColumns => [
256256
hideForMobile: false,
257257
render: ({ node }) =>
258258
getRowItemDraggables({
259-
rowItems:
260-
node.lastSuccess != null &&
261-
node.lastSuccess.source != null &&
262-
node.lastSuccess.source.ip != null
263-
? node.lastSuccess.source.ip
264-
: null,
259+
rowItems: node.lastSuccess?.source?.ip || null,
265260
attrName: 'source.ip',
266261
idPrefix: `authentications-table-${node._id}-lastSuccessSource`,
267262
render: (item) => <NetworkDetailsLink ip={item} />,
@@ -273,12 +268,7 @@ const getAuthenticationColumns = (): AuthTableColumns => [
273268
hideForMobile: false,
274269
render: ({ node }) =>
275270
getRowItemDraggables({
276-
rowItems:
277-
node.lastSuccess != null &&
278-
node.lastSuccess.host != null &&
279-
node.lastSuccess.host.name != null
280-
? node.lastSuccess.host.name
281-
: null,
271+
rowItems: node.lastSuccess?.host?.name ?? null,
282272
attrName: 'host.name',
283273
idPrefix: `authentications-table-${node._id}-lastSuccessfulDestination`,
284274
render: (item) => <HostDetailsLink hostName={item} />,
@@ -301,12 +291,7 @@ const getAuthenticationColumns = (): AuthTableColumns => [
301291
hideForMobile: false,
302292
render: ({ node }) =>
303293
getRowItemDraggables({
304-
rowItems:
305-
node.lastFailure != null &&
306-
node.lastFailure.source != null &&
307-
node.lastFailure.source.ip != null
308-
? node.lastFailure.source.ip
309-
: null,
294+
rowItems: node.lastFailure?.source?.ip || null,
310295
attrName: 'source.ip',
311296
idPrefix: `authentications-table-${node._id}-lastFailureSource`,
312297
render: (item) => <NetworkDetailsLink ip={item} />,
@@ -318,12 +303,7 @@ const getAuthenticationColumns = (): AuthTableColumns => [
318303
hideForMobile: false,
319304
render: ({ node }) =>
320305
getRowItemDraggables({
321-
rowItems:
322-
node.lastFailure != null &&
323-
node.lastFailure.host != null &&
324-
node.lastFailure.host.name != null
325-
? node.lastFailure.host.name
326-
: null,
306+
rowItems: node.lastFailure?.host?.name || null,
327307
attrName: 'host.name',
328308
idPrefix: `authentications-table-${node._id}-lastFailureDestination`,
329309
render: (item) => <HostDetailsLink hostName={item} />,

x-pack/plugins/security_solution/public/hosts/components/uncommon_process_table/index.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ describe('Uncommon Process Table Component', () => {
129129
);
130130

131131
expect(wrapper.find('.euiTableRow').at(2).find('.euiTableRowCell').at(3).text()).toBe(
132-
'Host nameshello-world,hello-world-2 '
132+
'Host nameshello-worldhello-world-2 '
133133
);
134134
});
135135

@@ -214,7 +214,7 @@ describe('Uncommon Process Table Component', () => {
214214
</TestProviders>
215215
);
216216
expect(wrapper.find('.euiTableRow').at(4).find('.euiTableRowCell').at(3).text()).toBe(
217-
'Host nameshello-world,hello-world-2 '
217+
'Host nameshello-worldhello-world-2 '
218218
);
219219
});
220220
});

x-pack/plugins/security_solution/public/network/components/embeddables/embedded_map.tsx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -198,15 +198,13 @@ export const EmbeddedMapComponent = ({
198198
if (embeddable != null) {
199199
embeddable.updateInput({ query });
200200
}
201-
// eslint-disable-next-line react-hooks/exhaustive-deps
202-
}, [query]);
201+
}, [embeddable, query]);
203202

204203
useEffect(() => {
205204
if (embeddable != null) {
206205
embeddable.updateInput({ filters });
207206
}
208-
// eslint-disable-next-line react-hooks/exhaustive-deps
209-
}, [filters]);
207+
}, [embeddable, filters]);
210208

211209
// DateRange updated useEffect
212210
useEffect(() => {
@@ -217,8 +215,7 @@ export const EmbeddedMapComponent = ({
217215
};
218216
embeddable.updateInput({ timeRange });
219217
}
220-
// eslint-disable-next-line react-hooks/exhaustive-deps
221-
}, [startDate, endDate]);
218+
}, [embeddable, startDate, endDate]);
222219

223220
return isError ? null : (
224221
<Embeddable>

x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/__snapshots__/map_tool_tip.test.tsx.snap

Lines changed: 26 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)