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 70b539e commit b434688
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ 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,10 +256,7 @@ const getAuthenticationColumns = (): AuthTableColumns => [
hideForMobile: false,
render: ({ node }) =>
getRowItemDraggables({
rowItems:
node.lastSuccess?.source?.ip ||
(node.lastSuccess?.['source.ip'] && [node.lastSuccess?.['source.ip']]) ||
null,
rowItems: node.lastSuccess?.source?.ip || null,
attrName: 'source.ip',
idPrefix: `authentications-table-${node._id}-lastSuccessSource`,
render: (item) => <NetworkDetailsLink ip={item} />,
Expand Down Expand Up @@ -294,10 +291,7 @@ const getAuthenticationColumns = (): AuthTableColumns => [
hideForMobile: false,
render: ({ node }) =>
getRowItemDraggables({
rowItems:
node.lastFailure?.source?.ip ||
(node.lastFailure?.['source.ip'] && [node.lastFailure?.['source.ip']]) ||
null,
rowItems: node.lastFailure?.source?.ip || null,
attrName: 'source.ip',
idPrefix: `authentications-table-${node._id}-lastFailureSource`,
render: (item) => <NetworkDetailsLink ip={item} />,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ export const mockData: { Authentications: HostAuthenticationsStrategyResponse }
},
lastFailure: {
timestamp: '2019-01-23T22:35:32.222Z',
'source.ip': '8.8.8.8',
source: {
ip: ['8.8.8.8'],
},
host: {
id: ['host-id-1'],
name: ['host-2'],
Expand All @@ -70,7 +72,9 @@ export const mockData: { Authentications: HostAuthenticationsStrategyResponse }
user: { name: ['Braden Hassanabad'] },
lastSuccess: {
timestamp: '2019-01-23T22:35:32.222Z',
'source.ip': '127.0.0.1',
source: {
ip: ['127.0.0.1'],
},
host: {
id: ['host-id-1'],
name: ['host-1'],
Expand Down

0 comments on commit b434688

Please sign in to comment.