Merge branch 'master' of github.com:elastic/kibana into pr/26477

This commit is contained in:
spalger 2019-02-15 13:10:58 -08:00
commit aa505342c6
24 changed files with 456 additions and 71 deletions

View file

@ -46,7 +46,6 @@
"xpack.watcher": "x-pack/plugins/watcher"
},
"exclude": [
"src/core/public/fatal_errors/get_error_info.ts",
"src/legacy/ui/ui_render/bootstrap/app_bootstrap.js",
"src/legacy/ui/ui_render/ui_render_mixin.js",
"x-pack/plugins/infra/public/graphql/types.ts",

View file

@ -10,8 +10,8 @@
`xpack.infra.sources.default.fields.tiebreaker`:: Field used to break ties between two entries with the same timestamp. Defaults to `_doc`.
`xpack.infra.sources.default.fields.host`:: Field used to identify hosts. Defaults to `beat.hostname`.
`xpack.infra.sources.default.fields.host`:: Field used to identify hosts. Defaults to `host.name`.
`xpack.infra.sources.default.fields.container`:: Field used to identify Docker containers. Defaults to `docker.container.name`.
`xpack.infra.sources.default.fields.container`:: Field used to identify Docker containers. Defaults to `container.id`.
`xpack.infra.sources.default.fields.pod`:: Field used to identify Kubernetes pods. Defaults to `kubernetes.pod.name`.
`xpack.infra.sources.default.fields.pod`:: Field used to identify Kubernetes pods. Defaults to `kubernetes.pod.uid`.

View file

@ -95,7 +95,7 @@
},
"dependencies": {
"@elastic/datemath": "5.0.2",
"@elastic/eui": "7.0.0",
"@elastic/eui": "7.1.0",
"@elastic/filesaver": "1.1.2",
"@elastic/good": "8.1.1-kibana2",
"@elastic/numeral": "2.3.2",

View file

@ -22,7 +22,7 @@ import { inspect } from 'util';
/**
* Produce a string version of an error,
*/
function formatMessage(error: any) {
function formatErrorMessage(error: any) {
if (typeof error === 'string') {
return error;
}
@ -70,7 +70,7 @@ function formatStack(err: Error) {
export function getErrorInfo(error: any, source?: string) {
const prefix = source ? source + ': ' : '';
return {
message: prefix + formatMessage(error),
message: prefix + formatErrorMessage(error),
stack: formatStack(error),
};
}

View file

@ -69,8 +69,21 @@ function runServerFunctions(server) {
if (Boom.isBoom(err)) {
return { err, statusCode: err.statusCode, message: err.output.payload };
}
return { err: 'Internal Server Error', statusCode: 500, message: 'See server logs for details.' };
return { err: 'Internal Server Error', statusCode: 500, message: 'See server logs for details.' };
});
if (result == null) {
const { functionName } = fnCall;
return {
id,
result: {
err: `No result from '${functionName}'`,
statusCode: 500,
message: `Function '${functionName}' did not return anything`
}
};
}
return { id, result };
}));

View file

@ -78,6 +78,33 @@ export const migrations = {
delete doc.attributes.savedSearchId;
}
// Migrate controls
const visStateJSON = get(doc, 'attributes.visState');
if (visStateJSON) {
let visState;
try {
visState = JSON.parse(visStateJSON);
} catch (e) {
// Let it go, the data is invalid and we'll leave it as is
}
if (visState) {
const controls = get(visState, 'params.controls') || [];
controls.forEach((control, i) => {
if (!control.indexPattern) {
return;
}
control.indexPatternRefName = `control_${i}_index_pattern`;
doc.references.push({
name: control.indexPatternRefName,
type: 'index-pattern',
id: control.indexPattern,
});
delete control.indexPattern;
});
doc.attributes.visState = JSON.stringify(visState);
}
}
// Migrate table splits
try {
const visState = JSON.parse(doc.attributes.visState);

View file

@ -313,6 +313,50 @@ Object {
/* eslint-enable max-len */
});
it('extracts index patterns from controls', () => {
const doc = {
id: '1',
type: 'visualization',
attributes: {
foo: true,
visState: JSON.stringify({
bar: false,
params: {
controls: [
{
bar: true,
indexPattern: 'pattern*',
},
{
foo: true,
},
],
},
}),
},
};
const migratedDoc = migrate(doc);
/* eslint-disable max-len */
expect(migratedDoc).toMatchInlineSnapshot(`
Object {
"attributes": Object {
"foo": true,
"visState": "{\\"bar\\":false,\\"params\\":{\\"controls\\":[{\\"bar\\":true,\\"indexPatternRefName\\":\\"control_0_index_pattern\\"},{\\"foo\\":true}]}}",
},
"id": "1",
"references": Array [
Object {
"id": "pattern*",
"name": "control_0_index_pattern",
"type": "index-pattern",
},
],
"type": "visualization",
}
`);
/* eslint-enable max-len */
});
it('skips extracting savedSearchId when missing', () => {
const doc = {
id: '1',
@ -1157,7 +1201,7 @@ Object {
"type": "search",
}
`);
/* eslint-enable max-len */
/* eslint-enable max-len */
});
});
});

View file

@ -18,34 +18,66 @@
*/
export function extractReferences({ attributes, references = [] }) {
if (!attributes.savedSearchId) {
return { attributes, references };
const updatedAttributes = { ...attributes };
const updatedReferences = [...references];
// Extract saved search
if (updatedAttributes.savedSearchId) {
updatedReferences.push({
name: 'search_0',
type: 'search',
id: updatedAttributes.savedSearchId,
});
delete updatedAttributes.savedSearchId;
updatedAttributes.savedSearchRefName = 'search_0';
}
// Extract index patterns from controls
if (updatedAttributes.visState) {
const visState = JSON.parse(updatedAttributes.visState);
const controls = visState.params && visState.params.controls || [];
controls.forEach((control, i) => {
if (!control.indexPattern) {
return;
}
control.indexPatternRefName = `control_${i}_index_pattern`;
updatedReferences.push({
name: control.indexPatternRefName,
type: 'index-pattern',
id: control.indexPattern,
});
delete control.indexPattern;
});
updatedAttributes.visState = JSON.stringify(visState);
}
return {
references: [
...references,
{
type: 'search',
name: 'search_0',
id: attributes.savedSearchId,
},
],
attributes: {
...attributes,
savedSearchId: undefined,
savedSearchRefName: 'search_0',
},
references: updatedReferences,
attributes: updatedAttributes,
};
}
export function injectReferences(savedObject, references) {
if (!savedObject.savedSearchRefName) {
return;
if (savedObject.savedSearchRefName) {
const savedSearchReference = references.find(reference => reference.name === savedObject.savedSearchRefName);
if (!savedSearchReference) {
throw new Error(`Could not find saved search reference "${savedObject.savedSearchRefName}"`);
}
savedObject.savedSearchId = savedSearchReference.id;
delete savedObject.savedSearchRefName;
}
const reference = references.find(reference => reference.name === savedObject.savedSearchRefName);
if (!reference) {
throw new Error(`Could not find reference "${savedObject.savedSearchRefName}"`);
if (savedObject.visState) {
const controls = (savedObject.visState.params && savedObject.visState.params.controls) || [];
controls.forEach((control) => {
if (!control.indexPatternRefName) {
return;
}
const reference = references.find(reference => reference.name === control.indexPatternRefName);
if (!reference) {
throw new Error (`Could not find index pattern reference "${control.indexPatternRefName}"`);
}
control.indexPattern = reference.id;
delete control.indexPatternRefName;
});
}
savedObject.savedSearchId = reference.id;
delete savedObject.savedSearchRefName;
}

View file

@ -51,7 +51,6 @@ Object {
Object {
"attributes": Object {
"foo": true,
"savedSearchId": undefined,
"savedSearchRefName": "search_0",
},
"references": Array [
@ -64,6 +63,46 @@ Object {
}
`);
});
test('extracts references from controls', () => {
const doc = {
id: '1',
attributes: {
foo: true,
visState: JSON.stringify({
params: {
controls: [
{
bar: true,
indexPattern: 'pattern*',
},
{
bar: false,
},
],
},
}),
},
};
const updatedDoc = extractReferences(doc);
/* eslint-disable max-len */
expect(updatedDoc).toMatchInlineSnapshot(`
Object {
"attributes": Object {
"foo": true,
"visState": "{\\"params\\":{\\"controls\\":[{\\"bar\\":true,\\"indexPatternRefName\\":\\"control_0_index_pattern\\"},{\\"bar\\":false}]}}",
},
"references": Array [
Object {
"id": "pattern*",
"name": "control_0_index_pattern",
"type": "index-pattern",
},
],
}
`);
/* eslint-enable max-len */
});
});
describe('injectReferences', () => {
@ -86,6 +125,19 @@ Object {
id: '1',
foo: true,
savedSearchRefName: 'search_0',
visState: {
params: {
controls: [
{
foo: true,
indexPatternRefName: 'control_0_index_pattern',
},
{
foo: false,
},
],
},
},
};
const references = [
{
@ -93,6 +145,11 @@ Object {
type: 'search',
id: '123',
},
{
name: 'control_0_index_pattern',
type: 'index-pattern',
id: 'pattern*',
},
];
injectReferences(context, references);
expect(context).toMatchInlineSnapshot(`
@ -100,18 +157,50 @@ Object {
"foo": true,
"id": "1",
"savedSearchId": "123",
"visState": Object {
"params": Object {
"controls": Array [
Object {
"foo": true,
"indexPattern": "pattern*",
},
Object {
"foo": false,
},
],
},
},
}
`);
});
test(`fails when it can't find the reference in the array`, () => {
test(`fails when it can't find the saved search reference in the array`, () => {
const context = {
id: '1',
foo: true,
savedSearchRefName: 'search_0',
};
expect(() => injectReferences(context, [])).toThrowErrorMatchingInlineSnapshot(
`"Could not find reference \\"search_0\\""`
`"Could not find saved search reference \\"search_0\\""`
);
});
test(`fails when it can't find the index pattern reference in the array`, () => {
const context = {
id: '1',
visState: {
params: {
controls: [
{
foo: true,
indexPatternRefName: 'control_0_index_pattern',
},
],
},
},
};
expect(() => injectReferences(context, [])).toThrowErrorMatchingInlineSnapshot(
`"Could not find index pattern reference \\"control_0_index_pattern\\""`
);
});
});

View file

@ -136,7 +136,7 @@
},
"dependencies": {
"@elastic/datemath": "5.0.2",
"@elastic/eui": "7.0.0",
"@elastic/eui": "7.1.0",
"@elastic/node-crypto": "0.1.2",
"@elastic/numeral": "2.3.2",
"@kbn/babel-preset": "1.0.0",

View file

@ -6,29 +6,186 @@
Canvas is included with X-Pack and requires a Basic license or better to use.
Canvas has its own build pipeline that gets triggered as part of `node scripts/kbn bootstrap`. However, should you ever need to run the build manually, like if you updated one of the plugins, you can do so with the following command:
```bash
yarn kbn run build --include x-pack
```
### Developing in Canvas
As mentioned above, Canvas has its plugin build process, so if you are planning to work on any of the plugin code, you'll need to use the plugin build process.
To develop your own Canvas plugins, you simply create a Kibana plugin, and register your customizations with Canvas.
**If you are not working on Canvas plugins, you can just start Kibana like normal, as long as you've used `yarn kbn bootstrap`**.
The following is a step-by-step guide to adding your own custom random number Canvas plugin.
The easiest way to do develop on Canvas and have the plugins built automatically is to cd into the canvas plugin path and start the process from there:
#### Generating a Kibana plugin
```bash
# while in kibana/
cd x-pack/plugins/canvas
node scripts/start.js
# in the kibana directory
# Rename canvas_example to whatever you want your plugin to be named
node scripts/generate_plugin.js canvas_example
```
There are several other scripts available once you are in that path as well.
This will prompt you for some input. Generally, you can answer as follows:
```
node scripts/generate_plugin.js canvas_example
? Provide a short description An awesome Kibana plugin
? What Kibana version are you targeting? master
? Should an app component be generated? No
? Should translation files be generated? No
? Should a hack component be generated? No
? Should a server API be generated? No
```
Once this has completed, go to your plugin directory:
```bash
cd ../kibana-extra/canvas_example
```
Open that folder in your code editor of choice: `code .`
#### Creating a Canvas element and function
Open your plugin's `index.js` file, and modify it to look something like this (but replace canvas_example with whatever you named your plugin):
```js
export default function (kibana) {
return new kibana.Plugin({
// Tell Kibana that this plugin needs canvas and the Kibana interpreter
require: ['interpreter', 'canvas'],
// The name of your plugin. Make this whatever you want.
name: 'canvas_example',
uiExports: {
// Tell Kibana that the files in `/public` should be loaded into the
// browser only when the user is in the Canvas app.
canvas: ['plugins/canvas_example']
},
// Enable the plugin by default
config(Joi) {
return Joi.object({
enabled: Joi.boolean().default(true),
}).default();
},
});
}
```
Now that the Kibana plugin boilerplate is out of the way, you can write a Canvas plugin.
Create a new file: `public/index.js` and make it look like this:
```js
/*global kbnInterpreter */
// Elements show up in the Canvas elements menu and can be visually added to a canvas
const elements = [
() => ({
name: 'randomNumber',
displayName: 'Random Number',
help: 'A random number between 1 and 100',
image: 'https://images.contentstack.io/v3/assets/bltefdd0b53724fa2ce/bltb59c89a07c05b937/5c583a6602ac90e80ba0ab8f/icon-white-circle-elastic-stack.svg',
expression: 'random | metric "Random Number"',
}),
];
// Browser functions are Canvas functions which run in the browser, and can be used in
// expressions (such as `random | metric "Random Number"`)
const browserFunctions = [
() => ({
name: 'random',
help: 'Make a random number between 1 and 100',
args: {},
fn() {
return Math.floor(Math.random() * 100) + 1;
}
}),
];
// Register our elements and browserFunctions with the Canvas interpreter.
kbnInterpreter.register({
elements,
browserFunctions,
});
```
#### Trying out your new plugin
In the terminal, in your plugin's directory, run:
```bash
# In kibana-extra/canvas_example
yarn start
```
- Pull up Kibana in your browser: `http://localhost:5601`
- Go to canvas, and click: "Create workpad"
- Click: "Add element"
- Click: "Random Number"
#### Adding a server-side function
Now, let's add a function which runs on the server.
In your plugin's root `index.js` file, modify the `kibana.Plugin` definition to have an init function:
```js
export default function (kibana) {
return new kibana.Plugin({
// Tell Kibana that this plugin needs canvas and the Kibana interpreter
require: ['interpreter', 'canvas'],
// The name of your plugin. Make this whatever you want.
name: 'canvas_example',
uiExports: {
// Tell Kibana that the files in `/public` should be loaded into the
// browser only when the user is in the Canvas app.
canvas: ['plugins/canvas_example']
},
// Enable the plugin by default
config(Joi) {
return Joi.object({
enabled: Joi.boolean().default(true),
}).default();
},
// Add this init function, which registers a new function with Canvas: `serverTime`
init(server) {
const { register } = server.plugins.interpreter;
register({
serverFunctions: [
() => ({
name: 'serverTime',
help: 'Get the server time in milliseconds',
args: {},
fn() {
return Date.now();
},
})
],
});
},
});
}
```
Now, let's try out our new server function.
- Refresh your browser.
- In the same Canvas workpad:
- Add another Random Number element as before
- Click that element to select it
- Click "Expression editor"
- Modify the expression to look like this: `serverTime | metric "Server Time in ms"`
- Click "Run"
You should now see one random number and one "Server Time in ms" value.
## Scripts
There are several scripts available once you are in that path as well.
- `node scripts/build_plugins` - local alias to build Canvas plugins, an alternative to using `kbn`.
- `node scripts/lint` - local linter setup, can also be used with the `--fix` flag for automatic fixes.
- `node scripts/test` - local test runner, does not require a real Kibana instance. Runs all the same unit tests the normal runner does, just limited to Canvas, and *waaaaaay* faster (currently 12 seconds or less).
- `node scripts/test_dev` - Same as above, but watches for changes and only runs tests for the given scope (browser, server, or common).

View file

@ -13,14 +13,32 @@ export function queryDatatable(datatable, query) {
}
if (query.and) {
// Todo: figure out type of filters
query.and.forEach(filter => {
// handle exact matches
if (filter.type === 'exactly') {
datatable.rows = datatable.rows.filter(row => {
return row[filter.column] === filter.value;
});
}
// TODO: Handle timefilter
// handle time filters
if (filter.type === 'time') {
const columnNames = datatable.columns.map(col => col.name);
// remove row if no column match
if (!columnNames.includes(filter.column)) {
datatable.rows = [];
return;
}
datatable.rows = datatable.rows.filter(row => {
const fromTime = new Date(filter.from).getTime();
const toTime = new Date(filter.to).getTime();
const rowTime = new Date(row[filter.column]).getTime();
return rowTime >= fromTime && rowTime <= toTime;
});
}
});
}

View file

@ -94,7 +94,7 @@ export const FieldsConfigurationPanel = ({
id="xpack.infra.sourceConfiguration.containerFieldDescription"
defaultMessage="Field used to identify Docker containers. The recommended value is {defaultValue}."
values={{
defaultValue: <EuiCode>docker.container.id</EuiCode>,
defaultValue: <EuiCode>container.id</EuiCode>,
}}
/>
}

View file

@ -122,7 +122,7 @@ export const hostK8sOverview: InfraMetricModelCreator = (timeField, indexPattern
type: InfraMetricModelMetricType.max,
},
{
field: 'kubernetes.pod.name',
field: 'kubernetes.pod.uid',
id: 'card-pod-name',
type: InfraMetricModelMetricType.cardinality,
},

View file

@ -31,7 +31,7 @@ export const hostK8sPodCap: InfraMetricModelCreator = (timeField, indexPattern,
id: 'used',
metrics: [
{
field: 'kubernetes.pod.name',
field: 'kubernetes.pod.uid',
id: 'avg-pod',
type: InfraMetricModelMetricType.cardinality,
},

View file

@ -10,7 +10,7 @@ export const defaultSourceConfiguration = {
metricAlias: 'metricbeat-*',
logAlias: 'filebeat-*,kibana_sample_data_logs*',
fields: {
container: 'docker.container.id',
container: 'container.id',
host: 'host.name',
pod: 'kubernetes.pod.uid',
tiebreaker: '_doc',

View file

@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`RequestTrialExtension component should display when license is active and trial has been used 1`] = `"<div class=\\"euiFlexItem\\"><div class=\\"euiCard euiCard--centerAligned\\"><span class=\\"euiCard__content\\"><span class=\\"euiTitle euiTitle--medium euiCard__title\\">Extend your trial</span><div class=\\"euiText euiText--small euiCard__description\\"><p><span>If youd like to continuing using security, machine learning, and our other awesome <a class=\\"euiLink euiLink--primary\\" href=\\"https://www.elastic.co/subscriptions/xpack\\" target=\\"_blank\\" rel=\\"noopener noreferrer\\">Platinum features</a>, request an extension now.</span></p></div></span><span class=\\"euiCard__footer\\"><a class=\\"euiButton euiButton--primary\\" href=\\"https://www.elastic.co/trialextension\\" target=\\"_blank\\" rel=\\"noopener noreferrer\\" data-test-subj=\\"extendTrialButton\\"><span class=\\"euiButton__content\\"><span class=\\"euiButton__text\\">Extend trial</span></span></a></span></div></div>"`;
exports[`RequestTrialExtension component should display when license is active and trial has been used 1`] = `"<div class=\\"euiFlexItem\\"><div class=\\"euiCard euiCard--centerAligned\\"><span class=\\"euiCard__content\\"><span class=\\"euiTitle euiTitle--medium euiCard__title\\">Extend your trial</span><div class=\\"euiText euiText--small euiCard__description\\"><p><span>If youd like to continuing using security, machine learning, and our other awesome <a class=\\"euiLink euiLink--primary\\" href=\\"https://www.elastic.co/subscriptions/xpack\\" target=\\"_blank\\" rel=\\"noopener\\">Platinum features</a>, request an extension now.</span></p></div></span><span class=\\"euiCard__footer\\"><a class=\\"euiButton euiButton--primary\\" href=\\"https://www.elastic.co/trialextension\\" target=\\"_blank\\" rel=\\"noopener\\" data-test-subj=\\"extendTrialButton\\"><span class=\\"euiButton__content\\"><span class=\\"euiButton__text\\">Extend trial</span></span></a></span></div></div>"`;
exports[`RequestTrialExtension component should display when license is not active and trial has been used 1`] = `"<div class=\\"euiFlexItem\\"><div class=\\"euiCard euiCard--centerAligned\\"><span class=\\"euiCard__content\\"><span class=\\"euiTitle euiTitle--medium euiCard__title\\">Extend your trial</span><div class=\\"euiText euiText--small euiCard__description\\"><p><span>If youd like to continuing using security, machine learning, and our other awesome <a class=\\"euiLink euiLink--primary\\" href=\\"https://www.elastic.co/subscriptions/xpack\\" target=\\"_blank\\" rel=\\"noopener noreferrer\\">Platinum features</a>, request an extension now.</span></p></div></span><span class=\\"euiCard__footer\\"><a class=\\"euiButton euiButton--primary\\" href=\\"https://www.elastic.co/trialextension\\" target=\\"_blank\\" rel=\\"noopener noreferrer\\" data-test-subj=\\"extendTrialButton\\"><span class=\\"euiButton__content\\"><span class=\\"euiButton__text\\">Extend trial</span></span></a></span></div></div>"`;
exports[`RequestTrialExtension component should display when license is not active and trial has been used 1`] = `"<div class=\\"euiFlexItem\\"><div class=\\"euiCard euiCard--centerAligned\\"><span class=\\"euiCard__content\\"><span class=\\"euiTitle euiTitle--medium euiCard__title\\">Extend your trial</span><div class=\\"euiText euiText--small euiCard__description\\"><p><span>If youd like to continuing using security, machine learning, and our other awesome <a class=\\"euiLink euiLink--primary\\" href=\\"https://www.elastic.co/subscriptions/xpack\\" target=\\"_blank\\" rel=\\"noopener\\">Platinum features</a>, request an extension now.</span></p></div></span><span class=\\"euiCard__footer\\"><a class=\\"euiButton euiButton--primary\\" href=\\"https://www.elastic.co/trialextension\\" target=\\"_blank\\" rel=\\"noopener\\" data-test-subj=\\"extendTrialButton\\"><span class=\\"euiButton__content\\"><span class=\\"euiButton__text\\">Extend trial</span></span></a></span></div></div>"`;
exports[`RequestTrialExtension component should display when platinum license is not active and trial has been used 1`] = `"<div class=\\"euiFlexItem\\"><div class=\\"euiCard euiCard--centerAligned\\"><span class=\\"euiCard__content\\"><span class=\\"euiTitle euiTitle--medium euiCard__title\\">Extend your trial</span><div class=\\"euiText euiText--small euiCard__description\\"><p><span>If youd like to continuing using security, machine learning, and our other awesome <a class=\\"euiLink euiLink--primary\\" href=\\"https://www.elastic.co/subscriptions/xpack\\" target=\\"_blank\\" rel=\\"noopener noreferrer\\">Platinum features</a>, request an extension now.</span></p></div></span><span class=\\"euiCard__footer\\"><a class=\\"euiButton euiButton--primary\\" href=\\"https://www.elastic.co/trialextension\\" target=\\"_blank\\" rel=\\"noopener noreferrer\\" data-test-subj=\\"extendTrialButton\\"><span class=\\"euiButton__content\\"><span class=\\"euiButton__text\\">Extend trial</span></span></a></span></div></div>"`;
exports[`RequestTrialExtension component should display when platinum license is not active and trial has been used 1`] = `"<div class=\\"euiFlexItem\\"><div class=\\"euiCard euiCard--centerAligned\\"><span class=\\"euiCard__content\\"><span class=\\"euiTitle euiTitle--medium euiCard__title\\">Extend your trial</span><div class=\\"euiText euiText--small euiCard__description\\"><p><span>If youd like to continuing using security, machine learning, and our other awesome <a class=\\"euiLink euiLink--primary\\" href=\\"https://www.elastic.co/subscriptions/xpack\\" target=\\"_blank\\" rel=\\"noopener\\">Platinum features</a>, request an extension now.</span></p></div></span><span class=\\"euiCard__footer\\"><a class=\\"euiButton euiButton--primary\\" href=\\"https://www.elastic.co/trialextension\\" target=\\"_blank\\" rel=\\"noopener\\" data-test-subj=\\"extendTrialButton\\"><span class=\\"euiButton__content\\"><span class=\\"euiButton__text\\">Extend trial</span></span></a></span></div></div>"`;

View file

@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`RevertToBasic component should display when license is about to expire 1`] = `"<div class=\\"euiFlexItem\\"><div class=\\"euiCard euiCard--centerAligned\\"><span class=\\"euiCard__content\\"><span class=\\"euiTitle euiTitle--medium euiCard__title\\">Revert to Basic license</span><div class=\\"euiText euiText--small euiCard__description\\"><p><span>Youll revert to our free features and lose access to security, machine learning and other <a class=\\"euiLink euiLink--primary\\" href=\\"https://www.elastic.co/subscriptions/xpack\\" target=\\"_blank\\" rel=\\"noopener noreferrer\\">Platinum features</a>.</span></p></div></span><span class=\\"euiCard__footer\\"><button class=\\"euiButton euiButton--primary\\" type=\\"button\\" data-test-subj=\\"revertToBasicButton\\"><span class=\\"euiButton__content\\"><span class=\\"euiButton__text\\">Revert to Basic</span></span></button></span></div></div>"`;
exports[`RevertToBasic component should display when license is about to expire 1`] = `"<div class=\\"euiFlexItem\\"><div class=\\"euiCard euiCard--centerAligned\\"><span class=\\"euiCard__content\\"><span class=\\"euiTitle euiTitle--medium euiCard__title\\">Revert to Basic license</span><div class=\\"euiText euiText--small euiCard__description\\"><p><span>Youll revert to our free features and lose access to security, machine learning and other <a class=\\"euiLink euiLink--primary\\" href=\\"https://www.elastic.co/subscriptions/xpack\\" target=\\"_blank\\" rel=\\"noopener\\">Platinum features</a>.</span></p></div></span><span class=\\"euiCard__footer\\"><button class=\\"euiButton euiButton--primary\\" type=\\"button\\" data-test-subj=\\"revertToBasicButton\\"><span class=\\"euiButton__content\\"><span class=\\"euiButton__text\\">Revert to Basic</span></span></button></span></div></div>"`;
exports[`RevertToBasic component should display when license is expired 1`] = `"<div class=\\"euiFlexItem\\"><div class=\\"euiCard euiCard--centerAligned\\"><span class=\\"euiCard__content\\"><span class=\\"euiTitle euiTitle--medium euiCard__title\\">Revert to Basic license</span><div class=\\"euiText euiText--small euiCard__description\\"><p><span>Youll revert to our free features and lose access to security, machine learning and other <a class=\\"euiLink euiLink--primary\\" href=\\"https://www.elastic.co/subscriptions/xpack\\" target=\\"_blank\\" rel=\\"noopener noreferrer\\">Platinum features</a>.</span></p></div></span><span class=\\"euiCard__footer\\"><button class=\\"euiButton euiButton--primary\\" type=\\"button\\" data-test-subj=\\"revertToBasicButton\\"><span class=\\"euiButton__content\\"><span class=\\"euiButton__text\\">Revert to Basic</span></span></button></span></div></div>"`;
exports[`RevertToBasic component should display when license is expired 1`] = `"<div class=\\"euiFlexItem\\"><div class=\\"euiCard euiCard--centerAligned\\"><span class=\\"euiCard__content\\"><span class=\\"euiTitle euiTitle--medium euiCard__title\\">Revert to Basic license</span><div class=\\"euiText euiText--small euiCard__description\\"><p><span>Youll revert to our free features and lose access to security, machine learning and other <a class=\\"euiLink euiLink--primary\\" href=\\"https://www.elastic.co/subscriptions/xpack\\" target=\\"_blank\\" rel=\\"noopener\\">Platinum features</a>.</span></p></div></span><span class=\\"euiCard__footer\\"><button class=\\"euiButton euiButton--primary\\" type=\\"button\\" data-test-subj=\\"revertToBasicButton\\"><span class=\\"euiButton__content\\"><span class=\\"euiButton__text\\">Revert to Basic</span></span></button></span></div></div>"`;
exports[`RevertToBasic component should display when trial is active 1`] = `"<div class=\\"euiFlexItem\\"><div class=\\"euiCard euiCard--centerAligned\\"><span class=\\"euiCard__content\\"><span class=\\"euiTitle euiTitle--medium euiCard__title\\">Revert to Basic license</span><div class=\\"euiText euiText--small euiCard__description\\"><p><span>Youll revert to our free features and lose access to security, machine learning and other <a class=\\"euiLink euiLink--primary\\" href=\\"https://www.elastic.co/subscriptions/xpack\\" target=\\"_blank\\" rel=\\"noopener noreferrer\\">Platinum features</a>.</span></p></div></span><span class=\\"euiCard__footer\\"><button class=\\"euiButton euiButton--primary\\" type=\\"button\\" data-test-subj=\\"revertToBasicButton\\"><span class=\\"euiButton__content\\"><span class=\\"euiButton__text\\">Revert to Basic</span></span></button></span></div></div>"`;
exports[`RevertToBasic component should display when trial is active 1`] = `"<div class=\\"euiFlexItem\\"><div class=\\"euiCard euiCard--centerAligned\\"><span class=\\"euiCard__content\\"><span class=\\"euiTitle euiTitle--medium euiCard__title\\">Revert to Basic license</span><div class=\\"euiText euiText--small euiCard__description\\"><p><span>Youll revert to our free features and lose access to security, machine learning and other <a class=\\"euiLink euiLink--primary\\" href=\\"https://www.elastic.co/subscriptions/xpack\\" target=\\"_blank\\" rel=\\"noopener\\">Platinum features</a>.</span></p></div></span><span class=\\"euiCard__footer\\"><button class=\\"euiButton euiButton--primary\\" type=\\"button\\" data-test-subj=\\"revertToBasicButton\\"><span class=\\"euiButton__content\\"><span class=\\"euiButton__text\\">Revert to Basic</span></span></button></span></div></div>"`;

View file

@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`StartTrial component when trial is allowed display for basic license 1`] = `"<div class=\\"euiFlexItem\\"><div class=\\"euiCard euiCard--centerAligned\\"><span class=\\"euiCard__content\\"><span class=\\"euiTitle euiTitle--medium euiCard__title\\">Start a 30-day trial</span><div class=\\"euiText euiText--small euiCard__description\\"><p><span>Experience what security, machine learning, and all our other <a class=\\"euiLink euiLink--primary\\" href=\\"https://www.elastic.co/subscriptions/xpack\\" target=\\"_blank\\" rel=\\"noopener noreferrer\\">Platinum features</a> have to offer.</span></p></div></span><span class=\\"euiCard__footer\\"><button class=\\"euiButton euiButton--primary\\" type=\\"button\\" data-test-subj=\\"startTrialButton\\"><span class=\\"euiButton__content\\"><span class=\\"euiButton__text\\">Start trial</span></span></button></span></div></div>"`;
exports[`StartTrial component when trial is allowed display for basic license 1`] = `"<div class=\\"euiFlexItem\\"><div class=\\"euiCard euiCard--centerAligned\\"><span class=\\"euiCard__content\\"><span class=\\"euiTitle euiTitle--medium euiCard__title\\">Start a 30-day trial</span><div class=\\"euiText euiText--small euiCard__description\\"><p><span>Experience what security, machine learning, and all our other <a class=\\"euiLink euiLink--primary\\" href=\\"https://www.elastic.co/subscriptions/xpack\\" target=\\"_blank\\" rel=\\"noopener\\">Platinum features</a> have to offer.</span></p></div></span><span class=\\"euiCard__footer\\"><button class=\\"euiButton euiButton--primary\\" type=\\"button\\" data-test-subj=\\"startTrialButton\\"><span class=\\"euiButton__content\\"><span class=\\"euiButton__text\\">Start trial</span></span></button></span></div></div>"`;
exports[`StartTrial component when trial is allowed should display for expired platinum license 1`] = `"<div class=\\"euiFlexItem\\"><div class=\\"euiCard euiCard--centerAligned\\"><span class=\\"euiCard__content\\"><span class=\\"euiTitle euiTitle--medium euiCard__title\\">Start a 30-day trial</span><div class=\\"euiText euiText--small euiCard__description\\"><p><span>Experience what security, machine learning, and all our other <a class=\\"euiLink euiLink--primary\\" href=\\"https://www.elastic.co/subscriptions/xpack\\" target=\\"_blank\\" rel=\\"noopener noreferrer\\">Platinum features</a> have to offer.</span></p></div></span><span class=\\"euiCard__footer\\"><button class=\\"euiButton euiButton--primary\\" type=\\"button\\" data-test-subj=\\"startTrialButton\\"><span class=\\"euiButton__content\\"><span class=\\"euiButton__text\\">Start trial</span></span></button></span></div></div>"`;
exports[`StartTrial component when trial is allowed should display for expired platinum license 1`] = `"<div class=\\"euiFlexItem\\"><div class=\\"euiCard euiCard--centerAligned\\"><span class=\\"euiCard__content\\"><span class=\\"euiTitle euiTitle--medium euiCard__title\\">Start a 30-day trial</span><div class=\\"euiText euiText--small euiCard__description\\"><p><span>Experience what security, machine learning, and all our other <a class=\\"euiLink euiLink--primary\\" href=\\"https://www.elastic.co/subscriptions/xpack\\" target=\\"_blank\\" rel=\\"noopener\\">Platinum features</a> have to offer.</span></p></div></span><span class=\\"euiCard__footer\\"><button class=\\"euiButton euiButton--primary\\" type=\\"button\\" data-test-subj=\\"startTrialButton\\"><span class=\\"euiButton__content\\"><span class=\\"euiButton__text\\">Start trial</span></span></button></span></div></div>"`;
exports[`StartTrial component when trial is allowed should display for gold license 1`] = `"<div class=\\"euiFlexItem\\"><div class=\\"euiCard euiCard--centerAligned\\"><span class=\\"euiCard__content\\"><span class=\\"euiTitle euiTitle--medium euiCard__title\\">Start a 30-day trial</span><div class=\\"euiText euiText--small euiCard__description\\"><p><span>Experience what security, machine learning, and all our other <a class=\\"euiLink euiLink--primary\\" href=\\"https://www.elastic.co/subscriptions/xpack\\" target=\\"_blank\\" rel=\\"noopener noreferrer\\">Platinum features</a> have to offer.</span></p></div></span><span class=\\"euiCard__footer\\"><button class=\\"euiButton euiButton--primary\\" type=\\"button\\" data-test-subj=\\"startTrialButton\\"><span class=\\"euiButton__content\\"><span class=\\"euiButton__text\\">Start trial</span></span></button></span></div></div>"`;
exports[`StartTrial component when trial is allowed should display for gold license 1`] = `"<div class=\\"euiFlexItem\\"><div class=\\"euiCard euiCard--centerAligned\\"><span class=\\"euiCard__content\\"><span class=\\"euiTitle euiTitle--medium euiCard__title\\">Start a 30-day trial</span><div class=\\"euiText euiText--small euiCard__description\\"><p><span>Experience what security, machine learning, and all our other <a class=\\"euiLink euiLink--primary\\" href=\\"https://www.elastic.co/subscriptions/xpack\\" target=\\"_blank\\" rel=\\"noopener\\">Platinum features</a> have to offer.</span></p></div></span><span class=\\"euiCard__footer\\"><button class=\\"euiButton euiButton--primary\\" type=\\"button\\" data-test-subj=\\"startTrialButton\\"><span class=\\"euiButton__content\\"><span class=\\"euiButton__text\\">Start trial</span></span></button></span></div></div>"`;

View file

@ -194,6 +194,7 @@ exports[`ExplainCollectionEnabled should explain about xpack.monitoring.collecti
<EuiCodeBlockImpl
fontSize="s"
inline={true}
isCopyable={false}
paddingSize="l"
transparentBackground={false}
>
@ -214,6 +215,7 @@ exports[`ExplainCollectionEnabled should explain about xpack.monitoring.collecti
<EuiCodeBlockImpl
fontSize="s"
inline={true}
isCopyable={false}
paddingSize="l"
transparentBackground={false}
>

View file

@ -370,6 +370,7 @@ exports[`ExplainCollectionInterval collection interval setting updates should sh
<EuiCodeBlockImpl
fontSize="s"
inline={true}
isCopyable={false}
paddingSize="l"
transparentBackground={false}
>
@ -390,6 +391,7 @@ exports[`ExplainCollectionInterval collection interval setting updates should sh
<EuiCodeBlockImpl
fontSize="s"
inline={true}
isCopyable={false}
paddingSize="l"
transparentBackground={false}
>
@ -698,6 +700,7 @@ exports[`ExplainCollectionInterval should explain about xpack.monitoring.collect
<EuiCodeBlockImpl
fontSize="s"
inline={true}
isCopyable={false}
paddingSize="l"
transparentBackground={false}
>
@ -718,6 +721,7 @@ exports[`ExplainCollectionInterval should explain about xpack.monitoring.collect
<EuiCodeBlockImpl
fontSize="s"
inline={true}
isCopyable={false}
paddingSize="l"
transparentBackground={false}
>

View file

@ -225,7 +225,7 @@ exports[`EmptyState component doesn't render child components when count is fals
<a
className="euiLink euiLink--primary"
href="https://www.elastic.co/guide/en/beats/heartbeat/current/configuring-howto-heartbeat.html"
rel="noopener noreferrer"
rel="noopener"
target="_blank"
>
<FormattedMessage

View file

@ -37,7 +37,7 @@ const sourcesTests: KbnTestProvider = ({ getService }) => {
expect(sourceConfiguration.name).to.be('Default');
expect(sourceConfiguration.metricAlias).to.be('metricbeat-*');
expect(sourceConfiguration.logAlias).to.be('filebeat-*,kibana_sample_data_logs*');
expect(sourceConfiguration.fields.container).to.be('docker.container.id');
expect(sourceConfiguration.fields.container).to.be('container.id');
expect(sourceConfiguration.fields.host).to.be('host.name');
expect(sourceConfiguration.fields.pod).to.be('kubernetes.pod.uid');
@ -108,7 +108,7 @@ const sourcesTests: KbnTestProvider = ({ getService }) => {
expect(configuration.description).to.be('');
expect(configuration.metricAlias).to.be('metricbeat-*');
expect(configuration.logAlias).to.be('filebeat-*,kibana_sample_data_logs*');
expect(configuration.fields.container).to.be('docker.container.id');
expect(configuration.fields.container).to.be('container.id');
expect(configuration.fields.host).to.be('host.name');
expect(configuration.fields.pod).to.be('kubernetes.pod.uid');
expect(configuration.fields.tiebreaker).to.be('_doc');

View file

@ -911,10 +911,10 @@
tabbable "^1.1.0"
uuid "^3.1.0"
"@elastic/eui@7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-7.0.0.tgz#48fbaf290e60ceae9678b8ddf16eb03bc747876f"
integrity sha512-NPbIADwiWBBaIsxb05gYJLVt5xRagIcXQqmzTwGFbUbkIMiNp6j2otWRy3ZrQezRItsMGEIPHmeCrXlV1X7IAw==
"@elastic/eui@7.1.0":
version "7.1.0"
resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-7.1.0.tgz#0c5d26b5e43048de93bdde0878187442c3593fa6"
integrity sha512-B+ANn2zviDvdcgtZc+a8FbmAvfNTjgpkmEPHknRwVdZSnXIRHphdIWRYRKQTkBHsOKy5wmyMaBS06ENAKNBFFg==
dependencies:
"@types/lodash" "^4.14.116"
"@types/numeral" "^0.0.25"