Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
patrykkopycinski committed Oct 14, 2020
1 parent be333eb commit 70b539e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
5 changes: 0 additions & 5 deletions x-pack/plugins/security_solution/common/ecs/source/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,9 @@ import { GeoEcs } from '../geo';

export interface SourceEcs {
bytes?: number[];

ip?: string[];

port?: number[];

domain?: string[];

geo?: GeoEcs;

packets?: number[];
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export interface AuthenticationItem {
export interface LastSourceHost {
timestamp?: Maybe<string>;
source?: Maybe<SourceEcs>;
'source.ip'?: string;
host?: Maybe<HostEcs>;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,10 @@ const getAuthenticationColumns = (): AuthTableColumns => [
hideForMobile: false,
render: ({ node }) =>
getRowItemDraggables({
rowItems: node.lastSuccess?.source?.ip || node.lastSuccess?.['source.ip'] || null,
rowItems:
node.lastSuccess?.source?.ip ||
(node.lastSuccess?.['source.ip'] && [node.lastSuccess?.['source.ip']]) ||
null,
attrName: 'source.ip',
idPrefix: `authentications-table-${node._id}-lastSuccessSource`,
render: (item) => <NetworkDetailsLink ip={item} />,
Expand Down Expand Up @@ -291,7 +294,10 @@ const getAuthenticationColumns = (): AuthTableColumns => [
hideForMobile: false,
render: ({ node }) =>
getRowItemDraggables({
rowItems: node.lastFailure?.source?.ip || node.lastFailure?.['source.ip'] || null,
rowItems:
node.lastFailure?.source?.ip ||
(node.lastFailure?.['source.ip'] && [node.lastFailure?.['source.ip']]) ||
null,
attrName: 'source.ip',
idPrefix: `authentications-table-${node._id}-lastFailureSource`,
render: (item) => <NetworkDetailsLink ip={item} />,
Expand Down

0 comments on commit 70b539e

Please sign in to comment.