Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SIEM] Adds Connections (Pewpew) Map to Network Page #43965

Merged
merged 41 commits into from
Aug 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
9a624f3
Initial pass at working with new embeddables API
spong Aug 12, 2019
efddfa8
Merge branch 'master' of github.com:elastic/kibana into pewpew
XavierM Aug 14, 2019
1f8ae3d
wip
XavierM Aug 14, 2019
13ddb74
Merge branch 'master' of github.com:elastic/kibana into pewpew
spong Aug 16, 2019
453fb71
Render and style + configuration fixes to embedded map
spong Aug 16, 2019
933e79a
Merge branch 'master' of github.com:elastic/kibana into pewpew
spong Aug 19, 2019
1cf7d63
Adding support for KQL and timerange filtering
spong Aug 19, 2019
ffeeea1
Merge branch 'master' of github.com:elastic/kibana into pewpew
spong Aug 21, 2019
7574604
Adding support for loading from saved object and surrounding error sc…
spong Aug 22, 2019
af3026b
Merge branch 'master' of github.com:elastic/kibana into pewpew
spong Aug 22, 2019
f35c347
pew pew source
nreese Jul 18, 2019
d88908d
refetch data on zoom level change
nreese Jul 18, 2019
982400e
add metric aggs to request
nreese Aug 16, 2019
f52146c
fix bug where initial draw did not have styles set up
nreese Aug 16, 2019
789b855
make tooltips work
nreese Aug 16, 2019
d145054
fix import broken with merging master
nreese Aug 19, 2019
f7d8c87
use custom labels in tooltips
nreese Aug 19, 2019
bb5624e
Provide ability to create MapEmbeddable directly from a map configura…
nreese Aug 23, 2019
f557b2d
Now loading map from dynamic config based on configured index patterns
spong Aug 24, 2019
d54f843
Cleanup and consolidation
spong Aug 26, 2019
365c3df
Merge branch 'master' of github.com:elastic/kibana into pewpew
spong Aug 26, 2019
6ad2406
Merge branch 'master' of github.com:elastic/kibana into pewpew
spong Aug 26, 2019
226fdc7
Merge branch 'master' of github.com:elastic/kibana into pewpew
spong Aug 26, 2019
6755b74
Updating error message, fixing missing-index loading bug, and hiding …
spong Aug 27, 2019
e969d8a
Updating test snapshot
spong Aug 27, 2019
2e5d7e9
Wired up to global refresh, fixed stale filter on property bug, and c…
spong Aug 27, 2019
fdf9cf3
Merge branch 'master' of github.com:elastic/kibana into pewpew
spong Aug 27, 2019
9f641ba
Merge branch 'master' of github.com:elastic/kibana into pewpew
spong Aug 28, 2019
0ff47e1
Increasing test coverage
spong Aug 28, 2019
bec1aa2
Merge branch 'master' of github.com:elastic/kibana into pewpew
spong Aug 28, 2019
76f283b
Reverting changes from previous maps + bootstrap merge
spong Aug 28, 2019
b8bbba4
Changes from PR comments
spong Aug 28, 2019
a041dc2
Remaining comments from PR
spong Aug 29, 2019
c3772b0
Merge branch 'master' of github.com:elastic/kibana into pewpew
spong Aug 29, 2019
785c389
Fixing error scenario flag
spong Aug 29, 2019
30bae0e
Merge branch 'master' of github.com:elastic/kibana into pewpew
Aug 29, 2019
df9c3ed
Merge branch 'master' of github.com:elastic/kibana into pewpew
Aug 29, 2019
e5ea5bd
Merge branch 'master' of github.com:elastic/kibana into pewpew
tsg Aug 29, 2019
3fcf73b
Merge branch 'master' of github.com:elastic/kibana into pewpew
spong Aug 29, 2019
85dab2c
Resolving merge conflict
spong Aug 29, 2019
a60e76d
Merge branch 'master' of github.com:elastic/kibana into pewpew
spong Aug 29, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/

import { IndexPatternMapping } from '../types';

export const mockIndexPatternIds: IndexPatternMapping[] = [
{ title: 'filebeat-*', id: '8c7323ac-97ad-4b53-ac0a-40f8f691a918' },
];

export const mockSourceLayer = {
sourceDescriptor: {
id: 'uuid.v4()',
spong marked this conversation as resolved.
Show resolved Hide resolved
type: 'ES_SEARCH',
geoField: 'source.geo.location',
filterByMapBounds: false,
tooltipProperties: ['host.name', 'host.ip'],
useTopHits: false,
topHitsTimeField: '@timestamp',
topHitsSize: 1,
indexPatternId: '8c7323ac-97ad-4b53-ac0a-40f8f691a918',
},
style: {
type: 'VECTOR',
properties: {
fillColor: { type: 'STATIC', options: { color: '#3cb44b' } },
lineColor: { type: 'STATIC', options: { color: '#FFFFFF' } },
lineWidth: { type: 'STATIC', options: { size: 1 } },
iconSize: { type: 'STATIC', options: { size: 6 } },
iconOrientation: { type: 'STATIC', options: { orientation: 0 } },
symbol: { options: { symbolizeAs: 'circle', symbolId: 'arrow-es' } },
},
},
id: 'uuid.v4()',
label: `filebeat-* | Source Point`,
minZoom: 0,
maxZoom: 24,
alpha: 0.75,
visible: true,
applyGlobalQuery: true,
type: 'VECTOR',
query: { query: 'source.geo.location:* and destination.geo.location:*', language: 'kuery' },
joins: [],
};

export const mockDestinationLayer = {
sourceDescriptor: {
id: 'uuid.v4()',
type: 'ES_SEARCH',
geoField: 'destination.geo.location',
filterByMapBounds: true,
tooltipProperties: ['host.name', 'host.ip'],
useTopHits: false,
topHitsTimeField: '@timestamp',
topHitsSize: 1,
indexPatternId: '8c7323ac-97ad-4b53-ac0a-40f8f691a918',
},
style: {
type: 'VECTOR',
properties: {
fillColor: { type: 'STATIC', options: { color: '#e6194b' } },
lineColor: { type: 'STATIC', options: { color: '#FFFFFF' } },
lineWidth: { type: 'STATIC', options: { size: 1 } },
iconSize: { type: 'STATIC', options: { size: 6 } },
iconOrientation: { type: 'STATIC', options: { orientation: 0 } },
symbol: { options: { symbolizeAs: 'circle', symbolId: 'airfield' } },
},
},
id: 'uuid.v4()',
label: `filebeat-* | Destination Point`,
minZoom: 0,
maxZoom: 24,
alpha: 0.75,
visible: true,
applyGlobalQuery: true,
type: 'VECTOR',
query: { query: 'source.geo.location:* and destination.geo.location:*', language: 'kuery' },
};

export const mockLineLayer = {
sourceDescriptor: {
type: 'ES_PEW_PEW',
id: 'uuid.v4()',
indexPatternId: '8c7323ac-97ad-4b53-ac0a-40f8f691a918',
sourceGeoField: 'source.geo.location',
destGeoField: 'destination.geo.location',
metrics: [
{ type: 'sum', field: 'source.bytes', label: 'Total Src Bytes' },
{ type: 'sum', field: 'destination.bytes', label: 'Total Dest Bytes' },
{ type: 'count', label: 'Total Documents' },
],
},
style: {
type: 'VECTOR',
properties: {
fillColor: { type: 'STATIC', options: { color: '#e6194b' } },
lineColor: {
type: 'DYNAMIC',
options: {
color: 'Green to Red',
field: { label: 'count', name: 'doc_count', origin: 'source' },
useCustomColorRamp: false,
},
},
lineWidth: {
type: 'DYNAMIC',
options: {
minSize: 1,
maxSize: 4,
field: { label: 'count', name: 'doc_count', origin: 'source' },
},
},
iconSize: { type: 'STATIC', options: { size: 10 } },
iconOrientation: { type: 'STATIC', options: { orientation: 0 } },
symbol: { options: { symbolizeAs: 'circle', symbolId: 'airfield' } },
},
},
id: 'uuid.v4()',
label: `filebeat-* | Line`,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: backticks with no variables :-), no need to fix w/ this PR though if you don't want.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch! Copypasta from creating the mocks -- will clean up in a followup to not test the CI Gods. We should probably turn on that linter for this at this point.

minZoom: 0,
maxZoom: 24,
alpha: 1,
visible: true,
applyGlobalQuery: true,
type: 'VECTOR',
query: { query: '', language: 'kuery' },
};

export const mockLayerList = [
{
sourceDescriptor: { type: 'EMS_TMS', isAutoSelect: true },
id: 'uuid.v4()',
label: null,
minZoom: 0,
maxZoom: 24,
alpha: 1,
visible: true,
applyGlobalQuery: true,
style: { type: 'TILE', properties: {} },
type: 'TILE',
},
mockLineLayer,
mockDestinationLayer,
mockSourceLayer,
];

export const mockLayerListDouble = [
{
sourceDescriptor: { type: 'EMS_TMS', isAutoSelect: true },
id: 'uuid.v4()',
label: null,
minZoom: 0,
maxZoom: 24,
alpha: 1,
visible: true,
applyGlobalQuery: true,
style: { type: 'TILE', properties: {} },
type: 'TILE',
},
mockLineLayer,
mockDestinationLayer,
mockSourceLayer,
mockLineLayer,
mockDestinationLayer,
mockSourceLayer,
];

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading