Skip to content

Commit

Permalink
Merge branch 'master' into shim-oss-telemetry
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine authored Dec 9, 2019
2 parents e602cfc + b66af16 commit 202f11f
Show file tree
Hide file tree
Showing 298 changed files with 7,333 additions and 6,363 deletions.
2 changes: 2 additions & 0 deletions docs/management/field-formatters/url-formatter.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ The `Url` field formatter can take on the following types:
* The *Image* type can be used to specify an image directory where a specified image is located.
* The *Audio* type can be used to specify an audio directory where a specified audio file is located.
For an *Image* type you can specify width and height attributes. These will be used to set the max width / max height of the image, while keeping the aspect ratio. Image will not be upscaled if it's smaller than the provided size parameters.

You can customize either type of URL field formats with templates. A _URL template_ enables you to add specific values
to a partial URL. Use the string `{{value}}` to add the contents of the field to a fixed URL.

Expand Down
13 changes: 11 additions & 2 deletions docs/maps/connect-to-ems.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,20 @@ EMS requests are made to the following domains:
* vector.maps.elastic.co

**Elastic Maps** makes requests directly from the browser to EMS.
To proxy EMS requests through the Kibana server, set `map.proxyElasticMapsServiceInMaps` to `true` in your <<settings, kibana.yml>> file.

[float]
=== Connect to Elastic Maps Service from an internal network

To connect to EMS when your Kibana server and browser are in an internal network:

. Set `map.proxyElasticMapsServiceInMaps` to `true` in your <<settings, kibana.yml>> file to proxy EMS requests through the Kibana server.
. Update your firewall rules to whitelist connections from your Kibana server to the EMS domains listed above.

NOTE: Coordinate map and region map visualizations do not support `map.proxyElasticMapsServiceInMaps` and will not proxy EMS requests through the Kibana server.


[float]
=== Disabling Elastic Maps Service
=== Disable Elastic Maps Service

You might experience EMS connection issues if your Kibana server or browser are on a private network or
behind a firewall. If this happens, you can disable the EMS connection to avoid unnecessary EMS requests.
Expand Down
13 changes: 6 additions & 7 deletions docs/visualize/most-frequent.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,19 @@ levels of {es} {ref}/search-aggregations-bucket.html[bucket] aggregations.

The most frequently used visualizations include:

* Line, Area and Bar charts
* Line, area, and bar charts
* Pie charts
* Data table
* Metric visualization
* Goal and Gauge visualization
* Data tables
* Metric, goals, and gauges
* Heat maps
* Tag cloud
* Tag clouds

[float]
=== Configure your visualization

You configure visualizations using the default editor, which is broken into *Metrics* and *Buckets*, and includes a default count
You configure visualizations using the default editor, which is broken into metrics and buckets, and includes a default count
metric. Each visualization supports different configurations for what the metrics and buckets
represent. For example, a Bar chart allows you to add an X-axis:
represent. For example, a bar chart allows you to add an X-axis:

[role="screenshot"]
image::images/add-bucket.png["",height=478]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,6 @@ export class VisualizeEmbeddable extends Embeddable<VisualizeInput, VisualizeOut

div.setAttribute('data-test-subj', 'visualizationLoader');
div.setAttribute('data-shared-item', '');
div.setAttribute('data-shared-item-container', '');
div.setAttribute('data-rendering-count', '0');
div.setAttribute('data-render-complete', 'false');

Expand Down
1 change: 1 addition & 0 deletions src/legacy/ui/public/vis/editors/default/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

<div
class="visEditor__canvas"
data-shared-items-container
/>

</div>
2 changes: 1 addition & 1 deletion test/functional/page_objects/common_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ export function CommonPageProvider({ getService, getPageObjects }: FtrProviderCo
}

async getSharedItemContainers() {
const cssSelector = '[data-shared-item-container]';
const cssSelector = '[data-shared-items-container]';
return find.allByCssSelector(cssSelector);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* 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 React from 'react';
import { shallow } from 'enzyme';
import { ServiceNodeMetrics } from '.';

describe('ServiceNodeMetrics', () => {
describe('render', () => {
it('renders', () => {
expect(() => shallow(<ServiceNodeMetrics />)).not.toThrowError();
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,22 @@ export function ServiceNodeMetrics() {
</EuiCallOut>
) : (
<EuiFlexGroup gutterSize="xl">
<EuiFlexItem grow={false}>
<EuiStat
titleSize="s"
description={i18n.translate(
'xpack.apm.serviceNodeMetrics.serviceName',
{
defaultMessage: 'Service name'
}
)}
title={
<EuiToolTip content={serviceName}>
<Truncate>{serviceName}</Truncate>
</EuiToolTip>
}
/>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiStat
titleSize="s"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ describe('RedirectToNodeLogs component', () => {
);

expect(component).toMatchInlineSnapshot(`
<Redirect
push={false}
to="/logs?logFilter=(expression:'HOST_FIELD:%20HOST_NAME',kind:kuery)&sourceId=default"
/>
`);
<Redirect
push={false}
to="/logs?logFilter=(expression:'HOST_FIELD:%20HOST_NAME',kind:kuery)&sourceId=default"
/>
`);
});

it('renders a redirect with the correct container filter', () => {
Expand All @@ -47,11 +47,11 @@ describe('RedirectToNodeLogs component', () => {
);

expect(component).toMatchInlineSnapshot(`
<Redirect
push={false}
to="/logs?logFilter=(expression:'CONTAINER_FIELD:%20CONTAINER_ID',kind:kuery)&sourceId=default"
/>
`);
<Redirect
push={false}
to="/logs?logFilter=(expression:'CONTAINER_FIELD:%20CONTAINER_ID',kind:kuery)&sourceId=default"
/>
`);
});

it('renders a redirect with the correct pod filter', () => {
Expand All @@ -60,11 +60,11 @@ describe('RedirectToNodeLogs component', () => {
);

expect(component).toMatchInlineSnapshot(`
<Redirect
push={false}
to="/logs?logFilter=(expression:'POD_FIELD:%20POD_ID',kind:kuery)&sourceId=default"
/>
`);
<Redirect
push={false}
to="/logs?logFilter=(expression:'POD_FIELD:%20POD_ID',kind:kuery)&sourceId=default"
/>
`);
});

it('renders a redirect with the correct position', () => {
Expand All @@ -75,11 +75,11 @@ describe('RedirectToNodeLogs component', () => {
);

expect(component).toMatchInlineSnapshot(`
<Redirect
push={false}
to="/logs?logFilter=(expression:'HOST_FIELD:%20HOST_NAME',kind:kuery)&logPosition=(position:(tiebreaker:0,time:1550671089404))&sourceId=default"
/>
`);
<Redirect
push={false}
to="/logs?logFilter=(expression:'HOST_FIELD:%20HOST_NAME',kind:kuery)&logPosition=(position:(tiebreaker:0,time:1550671089404))&sourceId=default"
/>
`);
});

it('renders a redirect with the correct user-defined filter', () => {
Expand All @@ -92,11 +92,11 @@ describe('RedirectToNodeLogs component', () => {
);

expect(component).toMatchInlineSnapshot(`
<Redirect
push={false}
to="/logs?logFilter=(expression:'(HOST_FIELD:%20HOST_NAME)%20and%20(FILTER_FIELD:FILTER_VALUE)',kind:kuery)&logPosition=(position:(tiebreaker:0,time:1550671089404))&sourceId=default"
/>
`);
<Redirect
push={false}
to="/logs?logFilter=(expression:'(HOST_FIELD:%20HOST_NAME)%20and%20(FILTER_FIELD:FILTER_VALUE)',kind:kuery)&logPosition=(position:(tiebreaker:0,time:1550671089404))&sourceId=default"
/>
`);
});

it('renders a redirect with the correct custom source id', () => {
Expand All @@ -107,11 +107,11 @@ describe('RedirectToNodeLogs component', () => {
);

expect(component).toMatchInlineSnapshot(`
<Redirect
push={false}
to="/logs?logFilter=(expression:'HOST_FIELD:%20HOST_NAME',kind:kuery)&sourceId=SOME-OTHER-SOURCE"
/>
`);
<Redirect
push={false}
to="/logs?logFilter=(expression:'HOST_FIELD:%20HOST_NAME',kind:kuery)&sourceId=SOME-OTHER-SOURCE"
/>
`);
});
});

Expand Down
2 changes: 2 additions & 0 deletions x-pack/legacy/plugins/siem/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,5 @@ export const DETECTION_ENGINE_INDEX_URL = `${DETECTION_ENGINE_URL}/index`;
* Default signals index key for kibana.dev.yml
*/
export const SIGNALS_INDEX_KEY = 'signalsIndex';
export const DETECTION_ENGINE_SIGNALS_URL = `${DETECTION_ENGINE_URL}/signals`;
export const DETECTION_ENGINE_SIGNALS_STATUS_URL = `${DETECTION_ENGINE_SIGNALS_URL}/status`;
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

import { EuiBadge } from '@elastic/eui';
import * as React from 'react';
import { pure } from 'recompose';
import styled from 'styled-components';

import * as i18n from './translations';
Expand Down Expand Up @@ -39,7 +38,7 @@ export type AndOr = 'and' | 'or';

/** Displays AND / OR in a round badge */
// Ref: https://github.com/elastic/eui/issues/1655
export const AndOrBadge = pure<{ type: AndOr }>(({ type }) => {
export const AndOrBadge = React.memo<{ type: AndOr }>(({ type }) => {
return (
<RoundedBadge data-test-subj="and-or-badge" color="hollow">
{type === 'and' ? i18n.AND : i18n.OR}
Expand Down

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

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/

import { mount, shallow } from 'enzyme';
import { mount } from 'enzyme';
import toJson from 'enzyme-to-json';
import * as React from 'react';

Expand All @@ -15,12 +15,12 @@ import { ArrowBody, ArrowHead } from '.';
describe('arrows', () => {
describe('ArrowBody', () => {
test('renders correctly against snapshot', () => {
const wrapper = shallow(
const wrapper = mount(
<TestProviders>
<ArrowBody height={3} />
</TestProviders>
);
expect(toJson(wrapper)).toMatchSnapshot();
expect(toJson(wrapper.find('ArrowBody'))).toMatchSnapshot();
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

import { EuiIcon } from '@elastic/eui';
import * as React from 'react';
import { pure } from 'recompose';
import styled from 'styled-components';

/** Renders the body (non-pointy part) of an arrow */
Expand All @@ -21,7 +20,7 @@ ArrowBody.displayName = 'ArrowBody';
export type ArrowDirection = 'arrowLeft' | 'arrowRight';

/** Renders the head of an arrow */
export const ArrowHead = pure<{
export const ArrowHead = React.memo<{
direction: ArrowDirection;
}>(({ direction }) => (
<EuiIcon color="subdued" data-test-subj="arrow-icon" size="s" type={direction} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

import { EuiText } from '@elastic/eui';
import * as React from 'react';
import { pure } from 'recompose';
import styled from 'styled-components';

import { DraggableBadge } from '../draggables';
Expand Down Expand Up @@ -36,7 +35,7 @@ FingerprintLabel.displayName = 'FingerprintLabel';
* 'tls.client_certificate.fingerprint.sha1'
* 'tls.server_certificate.fingerprint.sha1'
*/
export const CertificateFingerprint = pure<{
export const CertificateFingerprint = React.memo<{
eventId: string;
certificateType: CertificateType;
contextId: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
*/

import React from 'react';

import {
Chart,
BarSeries,
Expand Down Expand Up @@ -63,6 +62,7 @@ export const BarChartBaseComponent = ({
...chartDefaultSettings,
...get('configs.settings', chartConfigs),
};

return chartConfigs.width && chartConfigs.height ? (
<Chart>
<Settings {...settings} />
Expand Down Expand Up @@ -116,6 +116,7 @@ export const BarChartComponent = ({
}) => {
const customHeight = get('customHeight', configs);
const customWidth = get('customWidth', configs);

return checkIfAnyValidSeriesExist(barChart) ? (
<AutoSizer detectAnyWindowResize={false} content>
{({ measureRef, content: { height, width } }) => (
Expand Down
Loading

0 comments on commit 202f11f

Please sign in to comment.