basename: /app/app2
@@ -70,29 +78,77 @@ describe('AppContainer', () => {
mounters.set(...createAppMounter('spaces', '
Custom Space
', '/spaces/fake-login'));
mounters.set(...createAppMounter('login', '
Login Page
', '/fake-login'));
history = createMemoryHistory();
- navigate = createRenderer(
, history.push);
+ update = createRenderer(
);
await navigate('/fake-login');
- expect(mounters.get('spaces')!.mount).not.toHaveBeenCalled();
- expect(mounters.get('login')!.mount).toHaveBeenCalled();
+ expect(mounters.get('spaces')!.mounter.mount).not.toHaveBeenCalled();
+ expect(mounters.get('login')!.mounter.mount).toHaveBeenCalled();
});
it('should not mount when partial route path has higher specificity', async () => {
mounters.set(...createAppMounter('login', '
Login Page
', '/fake-login'));
mounters.set(...createAppMounter('spaces', '
Custom Space
', '/spaces/fake-login'));
history = createMemoryHistory();
- navigate = createRenderer(
, history.push);
+ update = createRenderer(
);
await navigate('/spaces/fake-login');
- expect(mounters.get('spaces')!.mount).toHaveBeenCalled();
- expect(mounters.get('login')!.mount).not.toHaveBeenCalled();
+ expect(mounters.get('spaces')!.mounter.mount).toHaveBeenCalled();
+ expect(mounters.get('login')!.mounter.mount).not.toHaveBeenCalled();
+ });
+
+ it('should not remount when changing pages within app', async () => {
+ const { mounter, unmount } = mounters.get('app1')!;
+ await navigate('/app/app1/page1');
+ expect(mounter.mount).toHaveBeenCalledTimes(1);
+
+ // Navigating to page within app does not trigger re-render
+ await navigate('/app/app1/page2');
+ expect(mounter.mount).toHaveBeenCalledTimes(1);
+ expect(unmount).not.toHaveBeenCalled();
+ });
+
+ it('should not remount when going back within app', async () => {
+ const { mounter, unmount } = mounters.get('app1')!;
+ await navigate('/app/app1/page1');
+ expect(mounter.mount).toHaveBeenCalledTimes(1);
+
+ // Hitting back button within app does not trigger re-render
+ await navigate('/app/app1/page2');
+ history.goBack();
+ await update();
+ expect(mounter.mount).toHaveBeenCalledTimes(1);
+ expect(unmount).not.toHaveBeenCalled();
+ });
+
+ it('should not remount when when changing pages within app using hash history', async () => {
+ history = createHashHistory();
+ update = createRenderer(
);
+
+ const { mounter, unmount } = mounters.get('app1')!;
+ await navigate('/app/app1/page1');
+ expect(mounter.mount).toHaveBeenCalledTimes(1);
+
+ // Changing hash history does not trigger re-render
+ await navigate('/app/app1/page2');
+ expect(mounter.mount).toHaveBeenCalledTimes(1);
+ expect(unmount).not.toHaveBeenCalled();
+ });
+
+ it('should unmount when changing between apps', async () => {
+ const { mounter, unmount } = mounters.get('app1')!;
+ await navigate('/app/app1/page1');
+ expect(mounter.mount).toHaveBeenCalledTimes(1);
+
+ // Navigating to other app triggers unmount
+ await navigate('/app/app2/page1');
+ expect(unmount).toHaveBeenCalledTimes(1);
});
it('calls legacy mount handler', async () => {
await navigate('/app/legacyApp1');
- expect(mounters.get('legacyApp1')!.mount.mock.calls[0]).toMatchInlineSnapshot(`
+ expect(mounters.get('legacyApp1')!.mounter.mount.mock.calls[0]).toMatchInlineSnapshot(`
Array [
Object {
"appBasePath": "/app/legacyApp1",
@@ -104,7 +160,7 @@ describe('AppContainer', () => {
it('handles legacy apps with subapps', async () => {
await navigate('/app/baseApp');
- expect(mounters.get('baseApp:legacyApp2')!.mount.mock.calls[0]).toMatchInlineSnapshot(`
+ expect(mounters.get('baseApp:legacyApp2')!.mounter.mount.mock.calls[0]).toMatchInlineSnapshot(`
Array [
Object {
"appBasePath": "/app/baseApp",
diff --git a/src/core/public/application/integration_tests/utils.tsx b/src/core/public/application/integration_tests/utils.tsx
index b8ade4d1d8787..6367d1fa12697 100644
--- a/src/core/public/application/integration_tests/utils.tsx
+++ b/src/core/public/application/integration_tests/utils.tsx
@@ -26,19 +26,13 @@ import { App, LegacyApp, AppMountParameters } from '../types';
import { MockedMounter, MockedMounterTuple } from '../test_types';
type Dom = ReturnType
| null;
-type Renderer = (item: string) => Dom | Promise;
+type Renderer = () => Dom | Promise;
-export const createRenderer = (
- element: ReactElement | null,
- callback?: (item: string) => void | Promise
-): Renderer => {
+export const createRenderer = (element: ReactElement | null): Renderer => {
const dom: Dom = element && mount({element});
- return item =>
+ return () =>
new Promise(async resolve => {
- if (callback) {
- await callback(item);
- }
if (dom) {
dom.update();
}
@@ -50,19 +44,26 @@ export const createAppMounter = (
appId: string,
html: string,
appRoute = `/app/${appId}`
-): MockedMounterTuple => [
- appId,
- {
- appRoute,
- appBasePath: appRoute,
- mount: jest.fn(async ({ appBasePath: basename, element }: AppMountParameters) => {
- Object.assign(element, {
- innerHTML: `\nbasename: ${basename}\nhtml: ${html}\n
`,
- });
- return jest.fn(() => Object.assign(element, { innerHTML: '' }));
- }),
- },
-];
+): MockedMounterTuple => {
+ const unmount = jest.fn();
+ return [
+ appId,
+ {
+ mounter: {
+ appRoute,
+ appBasePath: appRoute,
+ mount: jest.fn(async ({ appBasePath: basename, element }: AppMountParameters) => {
+ Object.assign(element, {
+ innerHTML: `\nbasename: ${basename}\nhtml: ${html}\n
`,
+ });
+ unmount.mockImplementation(() => Object.assign(element, { innerHTML: '' }));
+ return unmount;
+ }),
+ },
+ unmount,
+ },
+ ];
+};
export const createLegacyAppMounter = (
appId: string,
@@ -70,9 +71,12 @@ export const createLegacyAppMounter = (
): MockedMounterTuple => [
appId,
{
- appRoute: `/app/${appId.split(':')[0]}`,
- appBasePath: `/app/${appId.split(':')[0]}`,
- unmountBeforeMounting: true,
- mount: legacyMount,
+ mounter: {
+ appRoute: `/app/${appId.split(':')[0]}`,
+ appBasePath: `/app/${appId.split(':')[0]}`,
+ unmountBeforeMounting: true,
+ mount: legacyMount,
+ },
+ unmount: jest.fn(),
},
];
diff --git a/src/core/public/application/test_types.ts b/src/core/public/application/test_types.ts
index f5fb639eaa32c..3d992cb950eb4 100644
--- a/src/core/public/application/test_types.ts
+++ b/src/core/public/application/test_types.ts
@@ -17,7 +17,7 @@
* under the License.
*/
-import { App, LegacyApp, Mounter } from './types';
+import { App, LegacyApp, Mounter, AppUnmount } from './types';
import { ApplicationService } from './application_service';
/** @internal */
@@ -25,11 +25,19 @@ export type ApplicationServiceContract = PublicMethodsOf;
/** @internal */
export type EitherApp = App | LegacyApp;
/** @internal */
+export type MockedUnmount = jest.Mocked;
+/** @internal */
export type MockedMounter = jest.Mocked>>;
/** @internal */
-export type MockedMounterTuple = [string, MockedMounter];
+export type MockedMounterTuple = [
+ string,
+ { mounter: MockedMounter; unmount: MockedUnmount }
+];
/** @internal */
-export type MockedMounterMap = Map>;
+export type MockedMounterMap = Map<
+ string,
+ { mounter: MockedMounter; unmount: MockedUnmount }
+>;
/** @internal */
export type MockLifecycle<
T extends keyof ApplicationService,
diff --git a/src/core/public/application/ui/app_container.tsx b/src/core/public/application/ui/app_container.tsx
index 96ee91c7c21fb..153582e805fa1 100644
--- a/src/core/public/application/ui/app_container.tsx
+++ b/src/core/public/application/ui/app_container.tsx
@@ -65,7 +65,7 @@ export const AppContainer: FunctionComponent = ({ mounter, appId }: Props
mount();
return unmount;
- });
+ }, [mounter]);
return (
diff --git a/src/core/server/config/__mocks__/env.ts b/src/core/server/config/__mocks__/env.ts
index 644b499ff56d8..80cfab81fb557 100644
--- a/src/core/server/config/__mocks__/env.ts
+++ b/src/core/server/config/__mocks__/env.ts
@@ -38,6 +38,7 @@ export function getEnvOptions(options: DeepPartial = {}): EnvOptions
basePath: false,
optimize: false,
oss: false,
+ runExamples: false,
...(options.cliArgs || {}),
},
isDevClusterMaster:
diff --git a/src/core/server/config/__snapshots__/env.test.ts.snap b/src/core/server/config/__snapshots__/env.test.ts.snap
index 1f4661283de6e..204b8a70aa877 100644
--- a/src/core/server/config/__snapshots__/env.test.ts.snap
+++ b/src/core/server/config/__snapshots__/env.test.ts.snap
@@ -12,6 +12,7 @@ Env {
"oss": false,
"quiet": false,
"repl": false,
+ "runExamples": false,
"silent": false,
"watch": false,
},
@@ -40,7 +41,6 @@ Env {
"/test/kibanaRoot/plugins",
"/test/kibanaRoot/../kibana-extra",
],
- "staticFilesDir": "/test/kibanaRoot/ui",
}
`;
@@ -56,6 +56,7 @@ Env {
"oss": false,
"quiet": false,
"repl": false,
+ "runExamples": false,
"silent": false,
"watch": false,
},
@@ -84,7 +85,6 @@ Env {
"/test/kibanaRoot/plugins",
"/test/kibanaRoot/../kibana-extra",
],
- "staticFilesDir": "/test/kibanaRoot/ui",
}
`;
@@ -99,6 +99,7 @@ Env {
"oss": false,
"quiet": false,
"repl": false,
+ "runExamples": false,
"silent": false,
"watch": false,
},
@@ -127,7 +128,6 @@ Env {
"/test/kibanaRoot/plugins",
"/test/kibanaRoot/../kibana-extra",
],
- "staticFilesDir": "/test/kibanaRoot/ui",
}
`;
@@ -142,6 +142,7 @@ Env {
"oss": false,
"quiet": false,
"repl": false,
+ "runExamples": false,
"silent": false,
"watch": false,
},
@@ -170,7 +171,6 @@ Env {
"/test/kibanaRoot/plugins",
"/test/kibanaRoot/../kibana-extra",
],
- "staticFilesDir": "/test/kibanaRoot/ui",
}
`;
@@ -185,6 +185,7 @@ Env {
"oss": false,
"quiet": false,
"repl": false,
+ "runExamples": false,
"silent": false,
"watch": false,
},
@@ -213,7 +214,6 @@ Env {
"/test/kibanaRoot/plugins",
"/test/kibanaRoot/../kibana-extra",
],
- "staticFilesDir": "/test/kibanaRoot/ui",
}
`;
@@ -228,6 +228,7 @@ Env {
"oss": false,
"quiet": false,
"repl": false,
+ "runExamples": false,
"silent": false,
"watch": false,
},
@@ -256,6 +257,5 @@ Env {
"/some/home/dir/plugins",
"/some/home/dir/../kibana-extra",
],
- "staticFilesDir": "/some/home/dir/ui",
}
`;
diff --git a/src/core/server/config/deprecation/core_deprecations.ts b/src/core/server/config/deprecation/core_deprecations.ts
index 6a401ec6625a2..36fe95e05cb53 100644
--- a/src/core/server/config/deprecation/core_deprecations.ts
+++ b/src/core/server/config/deprecation/core_deprecations.ts
@@ -97,7 +97,6 @@ export const coreDeprecationProvider: ConfigDeprecationProvider = ({
}) => [
unusedFromRoot('savedObjects.indexCheckTimeout'),
unusedFromRoot('server.xsrf.token'),
- unusedFromRoot('uiSettings.enabled'),
renameFromRoot('optimize.lazy', 'optimize.watch'),
renameFromRoot('optimize.lazyPort', 'optimize.watchPort'),
renameFromRoot('optimize.lazyHost', 'optimize.watchHost'),
diff --git a/src/core/server/config/env.test.ts b/src/core/server/config/env.test.ts
index 5812fa93cf18f..c244012e34469 100644
--- a/src/core/server/config/env.test.ts
+++ b/src/core/server/config/env.test.ts
@@ -152,3 +152,25 @@ test('pluginSearchPaths does not contains x-pack plugins path if --oss flag is t
expect(env.pluginSearchPaths).not.toContain('/some/home/dir/x-pack/plugins');
});
+
+test('pluginSearchPaths contains examples plugins path if --run-examples flag is true', () => {
+ const env = new Env(
+ '/some/home/dir',
+ getEnvOptions({
+ cliArgs: { runExamples: true },
+ })
+ );
+
+ expect(env.pluginSearchPaths).toContain('/some/home/dir/examples');
+});
+
+test('pluginSearchPaths does not contains examples plugins path if --run-examples flag is false', () => {
+ const env = new Env(
+ '/some/home/dir',
+ getEnvOptions({
+ cliArgs: { runExamples: false },
+ })
+ );
+
+ expect(env.pluginSearchPaths).not.toContain('/some/home/dir/examples');
+});
diff --git a/src/core/server/config/env.ts b/src/core/server/config/env.ts
index 460773d89db85..db363fcd4d751 100644
--- a/src/core/server/config/env.ts
+++ b/src/core/server/config/env.ts
@@ -43,6 +43,7 @@ export interface CliArgs {
optimize: boolean;
open: boolean;
oss: boolean;
+ runExamples: boolean;
}
export class Env {
@@ -61,8 +62,6 @@ export class Env {
/** @internal */
public readonly logDir: string;
/** @internal */
- public readonly staticFilesDir: string;
- /** @internal */
public readonly pluginSearchPaths: readonly string[];
/**
@@ -100,14 +99,14 @@ export class Env {
this.configDir = resolve(this.homeDir, 'config');
this.binDir = resolve(this.homeDir, 'bin');
this.logDir = resolve(this.homeDir, 'log');
- this.staticFilesDir = resolve(this.homeDir, 'ui');
this.pluginSearchPaths = [
resolve(this.homeDir, 'src', 'plugins'),
- options.cliArgs.oss ? '' : resolve(this.homeDir, 'x-pack', 'plugins'),
+ ...(options.cliArgs.oss ? [] : [resolve(this.homeDir, 'x-pack', 'plugins')]),
resolve(this.homeDir, 'plugins'),
+ ...(options.cliArgs.runExamples ? [resolve(this.homeDir, 'examples')] : []),
resolve(this.homeDir, '..', 'kibana-extra'),
- ].filter(Boolean);
+ ];
this.cliArgs = Object.freeze(options.cliArgs);
this.configs = Object.freeze(options.configs);
diff --git a/src/core/server/http/__snapshots__/http_config.test.ts.snap b/src/core/server/http/__snapshots__/http_config.test.ts.snap
index 6c690f9da70c3..8856eb95ba722 100644
--- a/src/core/server/http/__snapshots__/http_config.test.ts.snap
+++ b/src/core/server/http/__snapshots__/http_config.test.ts.snap
@@ -31,11 +31,13 @@ Object {
"enabled": true,
},
"cors": false,
+ "customResponseHeaders": Object {},
"host": "localhost",
"keepaliveTimeout": 120000,
"maxPayload": ByteSizeValue {
"valueInBytes": 1048576,
},
+ "name": "kibana-hostname",
"port": 5601,
"rewriteBasePath": false,
"socketTimeout": 120000,
@@ -70,6 +72,10 @@ Object {
"TLSv1.2",
],
},
+ "xsrf": Object {
+ "disableProtection": false,
+ "whitelist": Array [],
+ },
}
`;
diff --git a/src/core/server/http/cookie_session_storage.test.ts b/src/core/server/http/cookie_session_storage.test.ts
index 0e4f3972fe9dc..4ce422e1f65c4 100644
--- a/src/core/server/http/cookie_session_storage.test.ts
+++ b/src/core/server/http/cookie_session_storage.test.ts
@@ -58,6 +58,10 @@ configService.atPath.mockReturnValue(
verificationMode: 'none',
},
compression: { enabled: true },
+ xsrf: {
+ disableProtection: true,
+ whitelist: [],
+ },
} as any)
);
diff --git a/src/core/server/http/http_config.test.ts b/src/core/server/http/http_config.test.ts
index 9b6fab8f3daec..3dc5fa48bc366 100644
--- a/src/core/server/http/http_config.test.ts
+++ b/src/core/server/http/http_config.test.ts
@@ -19,12 +19,15 @@
import uuid from 'uuid';
import { config, HttpConfig } from '.';
-import { Env } from '../config';
-import { getEnvOptions } from '../config/__mocks__/env';
const validHostnames = ['www.example.com', '8.8.8.8', '::1', 'localhost'];
const invalidHostname = 'asdf$%^';
+jest.mock('os', () => ({
+ ...jest.requireActual('os'),
+ hostname: () => 'kibana-hostname',
+}));
+
test('has defaults for config', () => {
const httpSchema = config.schema;
const obj = {};
@@ -86,6 +89,24 @@ test('accepts only valid uuids for server.uuid', () => {
);
});
+test('uses os.hostname() as default for server.name', () => {
+ const httpSchema = config.schema;
+ const validated = httpSchema.validate({});
+ expect(validated.name).toEqual('kibana-hostname');
+});
+
+test('throws if xsrf.whitelist element does not start with a slash', () => {
+ const httpSchema = config.schema;
+ const obj = {
+ xsrf: {
+ whitelist: ['/valid-path', 'invalid-path'],
+ },
+ };
+ expect(() => httpSchema.validate(obj)).toThrowErrorMatchingInlineSnapshot(
+ `"[xsrf.whitelist.1]: must start with a slash"`
+ );
+});
+
describe('with TLS', () => {
test('throws if TLS is enabled but `key` is not specified', () => {
const httpSchema = config.schema;
@@ -265,8 +286,7 @@ describe('with TLS', () => {
clientAuthentication: 'none',
},
}),
- {} as any,
- Env.createDefault(getEnvOptions())
+ {} as any
);
expect(httpConfig.ssl.requestCert).toBe(false);
@@ -283,8 +303,7 @@ describe('with TLS', () => {
clientAuthentication: 'optional',
},
}),
- {} as any,
- Env.createDefault(getEnvOptions())
+ {} as any
);
expect(httpConfig.ssl.requestCert).toBe(true);
@@ -301,8 +320,7 @@ describe('with TLS', () => {
clientAuthentication: 'required',
},
}),
- {} as any,
- Env.createDefault(getEnvOptions())
+ {} as any
);
expect(httpConfig.ssl.requestCert).toBe(true);
diff --git a/src/core/server/http/http_config.ts b/src/core/server/http/http_config.ts
index ef6a9c0a5f1a5..73f44f3c5ab5c 100644
--- a/src/core/server/http/http_config.ts
+++ b/src/core/server/http/http_config.ts
@@ -18,7 +18,8 @@
*/
import { ByteSizeValue, schema, TypeOf } from '@kbn/config-schema';
-import { Env } from '../config';
+import { hostname } from 'os';
+
import { CspConfigType, CspConfig, ICspConfig } from '../csp';
import { SslConfig, sslSchema } from './ssl_config';
@@ -34,21 +35,13 @@ export const config = {
path: 'server',
schema: schema.object(
{
+ name: schema.string({ defaultValue: () => hostname() }),
autoListen: schema.boolean({ defaultValue: true }),
basePath: schema.maybe(
schema.string({
validate: match(validBasePathRegex, "must start with a slash, don't end with one"),
})
),
- defaultRoute: schema.maybe(
- schema.string({
- validate(value) {
- if (!value.startsWith('/')) {
- return 'must start with a slash';
- }
- },
- })
- ),
cors: schema.conditional(
schema.contextRef('dev'),
true,
@@ -64,6 +57,9 @@ export const config = {
),
schema.boolean({ defaultValue: false })
),
+ customResponseHeaders: schema.recordOf(schema.string(), schema.string(), {
+ defaultValue: {},
+ }),
host: schema.string({
defaultValue: 'localhost',
hostname: true,
@@ -98,6 +94,13 @@ export const config = {
validate: match(uuidRegexp, 'must be a valid uuid'),
})
),
+ xsrf: schema.object({
+ disableProtection: schema.boolean({ defaultValue: false }),
+ whitelist: schema.arrayOf(
+ schema.string({ validate: match(/^\//, 'must start with a slash') }),
+ { defaultValue: [] }
+ ),
+ }),
},
{
validate: rawConfig => {
@@ -126,38 +129,40 @@ export const config = {
export type HttpConfigType = TypeOf;
export class HttpConfig {
+ public name: string;
public autoListen: boolean;
public host: string;
public keepaliveTimeout: number;
public socketTimeout: number;
public port: number;
public cors: boolean | { origin: string[] };
+ public customResponseHeaders: Record;
public maxPayload: ByteSizeValue;
public basePath?: string;
public rewriteBasePath: boolean;
- public publicDir: string;
- public defaultRoute?: string;
public ssl: SslConfig;
public compression: { enabled: boolean; referrerWhitelist?: string[] };
public csp: ICspConfig;
+ public xsrf: { disableProtection: boolean; whitelist: string[] };
/**
* @internal
*/
- constructor(rawHttpConfig: HttpConfigType, rawCspConfig: CspConfigType, env: Env) {
+ constructor(rawHttpConfig: HttpConfigType, rawCspConfig: CspConfigType) {
this.autoListen = rawHttpConfig.autoListen;
this.host = rawHttpConfig.host;
this.port = rawHttpConfig.port;
this.cors = rawHttpConfig.cors;
+ this.customResponseHeaders = rawHttpConfig.customResponseHeaders;
this.maxPayload = rawHttpConfig.maxPayload;
+ this.name = rawHttpConfig.name;
this.basePath = rawHttpConfig.basePath;
this.keepaliveTimeout = rawHttpConfig.keepaliveTimeout;
this.socketTimeout = rawHttpConfig.socketTimeout;
this.rewriteBasePath = rawHttpConfig.rewriteBasePath;
- this.publicDir = env.staticFilesDir;
this.ssl = new SslConfig(rawHttpConfig.ssl || {});
- this.defaultRoute = rawHttpConfig.defaultRoute;
this.compression = rawHttpConfig.compression;
this.csp = new CspConfig(rawCspConfig);
+ this.xsrf = rawHttpConfig.xsrf;
}
}
diff --git a/src/core/server/http/http_server.mocks.ts b/src/core/server/http/http_server.mocks.ts
index ba742292e9e83..230a229b36888 100644
--- a/src/core/server/http/http_server.mocks.ts
+++ b/src/core/server/http/http_server.mocks.ts
@@ -30,6 +30,9 @@ import {
RouteMethod,
KibanaResponseFactory,
} from './router';
+import { OnPreResponseToolkit } from './lifecycle/on_pre_response';
+import { OnPostAuthToolkit } from './lifecycle/on_post_auth';
+import { OnPreAuthToolkit } from './lifecycle/on_pre_auth';
interface RequestFixtureOptions {
headers?: Record;
@@ -137,9 +140,19 @@ const createLifecycleResponseFactoryMock = (): jest.Mocked;
+
+const createToolkitMock = (): ToolkitMock => {
+ return {
+ next: jest.fn(),
+ rewriteUrl: jest.fn(),
+ };
+};
+
export const httpServerMock = {
createKibanaRequest: createKibanaRequestMock,
createRawRequest: createRawRequestMock,
createResponseFactory: createResponseFactoryMock,
createLifecycleResponseFactory: createLifecycleResponseFactoryMock,
+ createToolkit: createToolkitMock,
};
diff --git a/src/core/server/http/http_server.ts b/src/core/server/http/http_server.ts
index 994a6cced8914..6b978b71c6f2b 100644
--- a/src/core/server/http/http_server.ts
+++ b/src/core/server/http/http_server.ts
@@ -60,6 +60,12 @@ export interface HttpServerSetup {
};
}
+/** @internal */
+export type LifecycleRegistrar = Pick<
+ HttpServerSetup,
+ 'registerAuth' | 'registerOnPreAuth' | 'registerOnPostAuth' | 'registerOnPreResponse'
+>;
+
export class HttpServer {
private server?: Server;
private config?: HttpConfig;
diff --git a/src/core/server/http/http_service.mock.ts b/src/core/server/http/http_service.mock.ts
index 700ae04f00d47..6db1ca80ab437 100644
--- a/src/core/server/http/http_service.mock.ts
+++ b/src/core/server/http/http_service.mock.ts
@@ -68,7 +68,6 @@ const createSetupContractMock = () => {
getAuthHeaders: jest.fn(),
},
isTlsEnabled: false,
- config: {},
};
setupContract.createCookieSessionStorageFactory.mockResolvedValue(
sessionStorageMock.createFactory()
diff --git a/src/core/server/http/http_service.test.mocks.ts b/src/core/server/http/http_service.test.mocks.ts
index c147944f2b7d8..e18008d3b405d 100644
--- a/src/core/server/http/http_service.test.mocks.ts
+++ b/src/core/server/http/http_service.test.mocks.ts
@@ -27,3 +27,7 @@ jest.mock('./http_server', () => {
HttpServer: mockHttpServer,
};
});
+
+jest.mock('./lifecycle_handlers', () => ({
+ registerCoreHandlers: jest.fn(),
+}));
diff --git a/src/core/server/http/http_service.ts b/src/core/server/http/http_service.ts
index faeae0b559b6b..ae9d53f9fd3db 100644
--- a/src/core/server/http/http_service.ts
+++ b/src/core/server/http/http_service.ts
@@ -21,11 +21,10 @@ import { Observable, Subscription, combineLatest } from 'rxjs';
import { first, map } from 'rxjs/operators';
import { Server } from 'hapi';
-import { LoggerFactory } from '../logging';
import { CoreService } from '../../types';
-
-import { Logger } from '../logging';
+import { Logger, LoggerFactory } from '../logging';
import { ContextSetup } from '../context';
+import { Env } from '../config';
import { CoreContext } from '../core_context';
import { PluginOpaqueId } from '../plugins';
import { CspConfigType, config as cspConfig } from '../csp';
@@ -43,6 +42,7 @@ import {
} from './types';
import { RequestHandlerContext } from '../../server';
+import { registerCoreHandlers } from './lifecycle_handlers';
interface SetupDeps {
context: ContextSetup;
@@ -57,6 +57,7 @@ export class HttpService implements CoreService(httpConfig.path),
- configService.atPath(cspConfig.path)
- ).pipe(map(([http, csp]) => new HttpConfig(http, csp, env)));
+ configService.atPath(cspConfig.path),
+ ]).pipe(map(([http, csp]) => new HttpConfig(http, csp)));
this.httpServer = new HttpServer(logger, 'Kibana');
this.httpsRedirectServer = new HttpsRedirectServer(logger.get('http', 'redirect', 'server'));
}
@@ -92,6 +94,9 @@ export class HttpService implements CoreService
) => this.requestHandlerContext!.registerContext(pluginOpaqueId, contextName, provider),
-
- config: {
- defaultRoute: config.defaultRoute,
- },
};
return contract;
diff --git a/src/core/server/http/http_tools.test.ts b/src/core/server/http/http_tools.test.ts
index b889ebd64971f..c1322a5aa94db 100644
--- a/src/core/server/http/http_tools.test.ts
+++ b/src/core/server/http/http_tools.test.ts
@@ -31,8 +31,6 @@ import { HttpConfig, config } from './http_config';
import { Router } from './router';
import { loggingServiceMock } from '../logging/logging_service.mock';
import { ByteSizeValue } from '@kbn/config-schema';
-import { Env } from '../config';
-import { getEnvOptions } from '../config/__mocks__/env';
const emptyOutput = {
statusCode: 400,
@@ -122,8 +120,7 @@ describe('getServerOptions', () => {
certificate: 'some-certificate-path',
},
}),
- {} as any,
- Env.createDefault(getEnvOptions())
+ {} as any
);
expect(getServerOptions(httpConfig).tls).toMatchInlineSnapshot(`
@@ -152,8 +149,7 @@ describe('getServerOptions', () => {
clientAuthentication: 'required',
},
}),
- {} as any,
- Env.createDefault(getEnvOptions())
+ {} as any
);
expect(getServerOptions(httpConfig).tls).toMatchInlineSnapshot(`
diff --git a/src/core/server/http/integration_tests/lifecycle_handlers.test.ts b/src/core/server/http/integration_tests/lifecycle_handlers.test.ts
new file mode 100644
index 0000000000000..f4c5f16870c7e
--- /dev/null
+++ b/src/core/server/http/integration_tests/lifecycle_handlers.test.ts
@@ -0,0 +1,241 @@
+/*
+ * Licensed to Elasticsearch B.V. under one or more contributor
+ * license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright
+ * ownership. Elasticsearch B.V. licenses this file to you under
+ * the Apache License, Version 2.0 (the "License"); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { resolve } from 'path';
+import supertest from 'supertest';
+import { BehaviorSubject } from 'rxjs';
+import { ByteSizeValue } from '@kbn/config-schema';
+
+import { createHttpServer } from '../test_utils';
+import { HttpService } from '../http_service';
+import { HttpServerSetup } from '../http_server';
+import { IRouter, RouteRegistrar } from '../router';
+
+import { configServiceMock } from '../../config/config_service.mock';
+import { contextServiceMock } from '../../context/context_service.mock';
+
+const pkgPath = resolve(__dirname, '../../../../../package.json');
+const actualVersion = require(pkgPath).version;
+const versionHeader = 'kbn-version';
+const xsrfHeader = 'kbn-xsrf';
+const nameHeader = 'kbn-name';
+const whitelistedTestPath = '/xsrf/test/route/whitelisted';
+const kibanaName = 'my-kibana-name';
+const setupDeps = {
+ context: contextServiceMock.createSetupContract(),
+};
+
+describe('core lifecycle handlers', () => {
+ let server: HttpService;
+ let innerServer: HttpServerSetup['server'];
+ let router: IRouter;
+
+ beforeEach(async () => {
+ const configService = configServiceMock.create();
+ configService.atPath.mockReturnValue(
+ new BehaviorSubject({
+ hosts: ['localhost'],
+ maxPayload: new ByteSizeValue(1024),
+ autoListen: true,
+ ssl: {
+ enabled: false,
+ },
+ compression: { enabled: true },
+ name: kibanaName,
+ customResponseHeaders: {
+ 'some-header': 'some-value',
+ },
+ xsrf: { disableProtection: false, whitelist: [whitelistedTestPath] },
+ } as any)
+ );
+ server = createHttpServer({ configService });
+
+ const serverSetup = await server.setup(setupDeps);
+ router = serverSetup.createRouter('/');
+ innerServer = serverSetup.server;
+ }, 30000);
+
+ afterEach(async () => {
+ await server.stop();
+ });
+
+ describe('versionCheck post-auth handler', () => {
+ const testRoute = '/version_check/test/route';
+
+ beforeEach(async () => {
+ router.get({ path: testRoute, validate: false }, (context, req, res) => {
+ return res.ok({ body: 'ok' });
+ });
+ await server.start();
+ });
+
+ it('accepts requests with the correct version passed in the version header', async () => {
+ await supertest(innerServer.listener)
+ .get(testRoute)
+ .set(versionHeader, actualVersion)
+ .expect(200, 'ok');
+ });
+
+ it('accepts requests that do not include a version header', async () => {
+ await supertest(innerServer.listener)
+ .get(testRoute)
+ .expect(200, 'ok');
+ });
+
+ it('rejects requests with an incorrect version passed in the version header', async () => {
+ await supertest(innerServer.listener)
+ .get(testRoute)
+ .set(versionHeader, 'invalid-version')
+ .expect(400, /Browser client is out of date/);
+ });
+ });
+
+ describe('customHeaders pre-response handler', () => {
+ const testRoute = '/custom_headers/test/route';
+ const testErrorRoute = '/custom_headers/test/error_route';
+
+ beforeEach(async () => {
+ router.get({ path: testRoute, validate: false }, (context, req, res) => {
+ return res.ok({ body: 'ok' });
+ });
+ router.get({ path: testErrorRoute, validate: false }, (context, req, res) => {
+ return res.badRequest({ body: 'bad request' });
+ });
+ await server.start();
+ });
+
+ it('adds the kbn-name header', async () => {
+ const result = await supertest(innerServer.listener)
+ .get(testRoute)
+ .expect(200, 'ok');
+ const headers = result.header as Record;
+ expect(headers).toEqual(
+ expect.objectContaining({
+ [nameHeader]: kibanaName,
+ })
+ );
+ });
+
+ it('adds the kbn-name header in case of error', async () => {
+ const result = await supertest(innerServer.listener)
+ .get(testErrorRoute)
+ .expect(400);
+ const headers = result.header as Record;
+ expect(headers).toEqual(
+ expect.objectContaining({
+ [nameHeader]: kibanaName,
+ })
+ );
+ });
+
+ it('adds the custom headers', async () => {
+ const result = await supertest(innerServer.listener)
+ .get(testRoute)
+ .expect(200, 'ok');
+ const headers = result.header as Record;
+ expect(headers).toEqual(expect.objectContaining({ 'some-header': 'some-value' }));
+ });
+
+ it('adds the custom headers in case of error', async () => {
+ const result = await supertest(innerServer.listener)
+ .get(testErrorRoute)
+ .expect(400);
+ const headers = result.header as Record;
+ expect(headers).toEqual(expect.objectContaining({ 'some-header': 'some-value' }));
+ });
+ });
+
+ describe('xsrf post-auth handler', () => {
+ const testPath = '/xsrf/test/route';
+ const destructiveMethods = ['POST', 'PUT', 'DELETE'];
+ const nonDestructiveMethods = ['GET', 'HEAD'];
+
+ const getSupertest = (method: string, path: string): supertest.Test => {
+ return (supertest(innerServer.listener) as any)[method.toLowerCase()](path) as supertest.Test;
+ };
+
+ beforeEach(async () => {
+ router.get({ path: testPath, validate: false }, (context, req, res) => {
+ return res.ok({ body: 'ok' });
+ });
+
+ destructiveMethods.forEach(method => {
+ ((router as any)[method.toLowerCase()] as RouteRegistrar)(
+ { path: testPath, validate: false },
+ (context, req, res) => {
+ return res.ok({ body: 'ok' });
+ }
+ );
+ ((router as any)[method.toLowerCase()] as RouteRegistrar)(
+ { path: whitelistedTestPath, validate: false },
+ (context, req, res) => {
+ return res.ok({ body: 'ok' });
+ }
+ );
+ });
+
+ await server.start();
+ });
+
+ nonDestructiveMethods.forEach(method => {
+ describe(`When using non-destructive ${method} method`, () => {
+ it('accepts requests without a token', async () => {
+ await getSupertest(method.toLowerCase(), testPath).expect(
+ 200,
+ method === 'HEAD' ? undefined : 'ok'
+ );
+ });
+
+ it('accepts requests with the xsrf header', async () => {
+ await getSupertest(method.toLowerCase(), testPath)
+ .set(xsrfHeader, 'anything')
+ .expect(200, method === 'HEAD' ? undefined : 'ok');
+ });
+ });
+ });
+
+ destructiveMethods.forEach(method => {
+ describe(`When using destructive ${method} method`, () => {
+ it('accepts requests with the xsrf header', async () => {
+ await getSupertest(method.toLowerCase(), testPath)
+ .set(xsrfHeader, 'anything')
+ .expect(200, 'ok');
+ });
+
+ it('accepts requests with the version header', async () => {
+ await getSupertest(method.toLowerCase(), testPath)
+ .set(versionHeader, actualVersion)
+ .expect(200, 'ok');
+ });
+
+ it('rejects requests without either an xsrf or version header', async () => {
+ await getSupertest(method.toLowerCase(), testPath).expect(400, {
+ statusCode: 400,
+ error: 'Bad Request',
+ message: 'Request must contain a kbn-xsrf header.',
+ });
+ });
+
+ it('accepts whitelisted requests without either an xsrf or version header', async () => {
+ await getSupertest(method.toLowerCase(), whitelistedTestPath).expect(200, 'ok');
+ });
+ });
+ });
+ });
+});
diff --git a/src/core/server/http/lifecycle_handlers.test.ts b/src/core/server/http/lifecycle_handlers.test.ts
new file mode 100644
index 0000000000000..48a6973b741ba
--- /dev/null
+++ b/src/core/server/http/lifecycle_handlers.test.ts
@@ -0,0 +1,269 @@
+/*
+ * Licensed to Elasticsearch B.V. under one or more contributor
+ * license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright
+ * ownership. Elasticsearch B.V. licenses this file to you under
+ * the Apache License, Version 2.0 (the "License"); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import {
+ createCustomHeadersPreResponseHandler,
+ createVersionCheckPostAuthHandler,
+ createXsrfPostAuthHandler,
+} from './lifecycle_handlers';
+import { httpServerMock } from './http_server.mocks';
+import { HttpConfig } from './http_config';
+import { KibanaRequest, RouteMethod } from './router';
+
+const createConfig = (partial: Partial): HttpConfig => partial as HttpConfig;
+
+const forgeRequest = ({
+ headers = {},
+ path = '/',
+ method = 'get',
+}: Partial<{
+ headers: Record;
+ path: string;
+ method: RouteMethod;
+}>): KibanaRequest => {
+ return httpServerMock.createKibanaRequest({ headers, path, method });
+};
+
+describe('xsrf post-auth handler', () => {
+ let toolkit: ReturnType;
+ let responseFactory: ReturnType;
+
+ beforeEach(() => {
+ toolkit = httpServerMock.createToolkit();
+ responseFactory = httpServerMock.createLifecycleResponseFactory();
+ });
+
+ describe('non destructive methods', () => {
+ it('accepts requests without version or xsrf header', () => {
+ const config = createConfig({ xsrf: { whitelist: [], disableProtection: false } });
+ const handler = createXsrfPostAuthHandler(config);
+ const request = forgeRequest({ method: 'get', headers: {} });
+
+ toolkit.next.mockReturnValue('next' as any);
+
+ const result = handler(request, responseFactory, toolkit);
+
+ expect(responseFactory.badRequest).not.toHaveBeenCalled();
+ expect(toolkit.next).toHaveBeenCalledTimes(1);
+ expect(result).toEqual('next');
+ });
+ });
+
+ describe('destructive methods', () => {
+ it('accepts requests with xsrf header', () => {
+ const config = createConfig({ xsrf: { whitelist: [], disableProtection: false } });
+ const handler = createXsrfPostAuthHandler(config);
+ const request = forgeRequest({ method: 'post', headers: { 'kbn-xsrf': 'xsrf' } });
+
+ toolkit.next.mockReturnValue('next' as any);
+
+ const result = handler(request, responseFactory, toolkit);
+
+ expect(responseFactory.badRequest).not.toHaveBeenCalled();
+ expect(toolkit.next).toHaveBeenCalledTimes(1);
+ expect(result).toEqual('next');
+ });
+
+ it('accepts requests with version header', () => {
+ const config = createConfig({ xsrf: { whitelist: [], disableProtection: false } });
+ const handler = createXsrfPostAuthHandler(config);
+ const request = forgeRequest({ method: 'post', headers: { 'kbn-version': 'some-version' } });
+
+ toolkit.next.mockReturnValue('next' as any);
+
+ const result = handler(request, responseFactory, toolkit);
+
+ expect(responseFactory.badRequest).not.toHaveBeenCalled();
+ expect(toolkit.next).toHaveBeenCalledTimes(1);
+ expect(result).toEqual('next');
+ });
+
+ it('returns a bad request if called without xsrf or version header', () => {
+ const config = createConfig({ xsrf: { whitelist: [], disableProtection: false } });
+ const handler = createXsrfPostAuthHandler(config);
+ const request = forgeRequest({ method: 'post' });
+
+ responseFactory.badRequest.mockReturnValue('badRequest' as any);
+
+ const result = handler(request, responseFactory, toolkit);
+
+ expect(toolkit.next).not.toHaveBeenCalled();
+ expect(responseFactory.badRequest).toHaveBeenCalledTimes(1);
+ expect(responseFactory.badRequest.mock.calls[0][0]).toMatchInlineSnapshot(`
+ Object {
+ "body": "Request must contain a kbn-xsrf header.",
+ }
+ `);
+ expect(result).toEqual('badRequest');
+ });
+
+ it('accepts requests if protection is disabled', () => {
+ const config = createConfig({ xsrf: { whitelist: [], disableProtection: true } });
+ const handler = createXsrfPostAuthHandler(config);
+ const request = forgeRequest({ method: 'post', headers: {} });
+
+ toolkit.next.mockReturnValue('next' as any);
+
+ const result = handler(request, responseFactory, toolkit);
+
+ expect(responseFactory.badRequest).not.toHaveBeenCalled();
+ expect(toolkit.next).toHaveBeenCalledTimes(1);
+ expect(result).toEqual('next');
+ });
+
+ it('accepts requests if path is whitelisted', () => {
+ const config = createConfig({
+ xsrf: { whitelist: ['/some-path'], disableProtection: false },
+ });
+ const handler = createXsrfPostAuthHandler(config);
+ const request = forgeRequest({ method: 'post', headers: {}, path: '/some-path' });
+
+ toolkit.next.mockReturnValue('next' as any);
+
+ const result = handler(request, responseFactory, toolkit);
+
+ expect(responseFactory.badRequest).not.toHaveBeenCalled();
+ expect(toolkit.next).toHaveBeenCalledTimes(1);
+ expect(result).toEqual('next');
+ });
+ });
+});
+
+describe('versionCheck post-auth handler', () => {
+ let toolkit: ReturnType;
+ let responseFactory: ReturnType;
+
+ beforeEach(() => {
+ toolkit = httpServerMock.createToolkit();
+ responseFactory = httpServerMock.createLifecycleResponseFactory();
+ });
+
+ it('forward the request to the next interceptor if header matches', () => {
+ const handler = createVersionCheckPostAuthHandler('actual-version');
+ const request = forgeRequest({ headers: { 'kbn-version': 'actual-version' } });
+
+ toolkit.next.mockReturnValue('next' as any);
+
+ const result = handler(request, responseFactory, toolkit);
+
+ expect(toolkit.next).toHaveBeenCalledTimes(1);
+ expect(responseFactory.badRequest).not.toHaveBeenCalled();
+ expect(result).toBe('next');
+ });
+
+ it('returns a badRequest error if header does not match', () => {
+ const handler = createVersionCheckPostAuthHandler('actual-version');
+ const request = forgeRequest({ headers: { 'kbn-version': 'another-version' } });
+
+ responseFactory.badRequest.mockReturnValue('badRequest' as any);
+
+ const result = handler(request, responseFactory, toolkit);
+
+ expect(toolkit.next).not.toHaveBeenCalled();
+ expect(responseFactory.badRequest).toHaveBeenCalledTimes(1);
+ expect(responseFactory.badRequest.mock.calls[0][0]).toMatchInlineSnapshot(`
+ Object {
+ "body": Object {
+ "attributes": Object {
+ "expected": "actual-version",
+ "got": "another-version",
+ },
+ "message": "Browser client is out of date, please refresh the page (\\"kbn-version\\" header was \\"another-version\\" but should be \\"actual-version\\")",
+ },
+ }
+ `);
+ expect(result).toBe('badRequest');
+ });
+
+ it('forward the request to the next interceptor if header is not present', () => {
+ const handler = createVersionCheckPostAuthHandler('actual-version');
+ const request = forgeRequest({ headers: {} });
+
+ toolkit.next.mockReturnValue('next' as any);
+
+ const result = handler(request, responseFactory, toolkit);
+
+ expect(toolkit.next).toHaveBeenCalledTimes(1);
+ expect(responseFactory.badRequest).not.toHaveBeenCalled();
+ expect(result).toBe('next');
+ });
+});
+
+describe('customHeaders pre-response handler', () => {
+ let toolkit: ReturnType;
+
+ beforeEach(() => {
+ toolkit = httpServerMock.createToolkit();
+ });
+
+ it('adds the kbn-name header to the response', () => {
+ const config = createConfig({ name: 'my-server-name' });
+ const handler = createCustomHeadersPreResponseHandler(config as HttpConfig);
+
+ handler({} as any, {} as any, toolkit);
+
+ expect(toolkit.next).toHaveBeenCalledTimes(1);
+ expect(toolkit.next).toHaveBeenCalledWith({ headers: { 'kbn-name': 'my-server-name' } });
+ });
+
+ it('adds the custom headers defined in the configuration', () => {
+ const config = createConfig({
+ name: 'my-server-name',
+ customResponseHeaders: {
+ headerA: 'value-A',
+ headerB: 'value-B',
+ },
+ });
+ const handler = createCustomHeadersPreResponseHandler(config as HttpConfig);
+
+ handler({} as any, {} as any, toolkit);
+
+ expect(toolkit.next).toHaveBeenCalledTimes(1);
+ expect(toolkit.next).toHaveBeenCalledWith({
+ headers: {
+ 'kbn-name': 'my-server-name',
+ headerA: 'value-A',
+ headerB: 'value-B',
+ },
+ });
+ });
+
+ it('preserve the kbn-name value from server.name if definied in custom headders ', () => {
+ const config = createConfig({
+ name: 'my-server-name',
+ customResponseHeaders: {
+ 'kbn-name': 'custom-name',
+ headerA: 'value-A',
+ headerB: 'value-B',
+ },
+ });
+ const handler = createCustomHeadersPreResponseHandler(config as HttpConfig);
+
+ handler({} as any, {} as any, toolkit);
+
+ expect(toolkit.next).toHaveBeenCalledTimes(1);
+ expect(toolkit.next).toHaveBeenCalledWith({
+ headers: {
+ 'kbn-name': 'my-server-name',
+ headerA: 'value-A',
+ headerB: 'value-B',
+ },
+ });
+ });
+});
diff --git a/src/core/server/http/lifecycle_handlers.ts b/src/core/server/http/lifecycle_handlers.ts
new file mode 100644
index 0000000000000..ee877ee031a2b
--- /dev/null
+++ b/src/core/server/http/lifecycle_handlers.ts
@@ -0,0 +1,93 @@
+/*
+ * Licensed to Elasticsearch B.V. under one or more contributor
+ * license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright
+ * ownership. Elasticsearch B.V. licenses this file to you under
+ * the Apache License, Version 2.0 (the "License"); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { OnPostAuthHandler } from './lifecycle/on_post_auth';
+import { OnPreResponseHandler } from './lifecycle/on_pre_response';
+import { HttpConfig } from './http_config';
+import { Env } from '../config';
+import { LifecycleRegistrar } from './http_server';
+
+const VERSION_HEADER = 'kbn-version';
+const XSRF_HEADER = 'kbn-xsrf';
+const KIBANA_NAME_HEADER = 'kbn-name';
+
+export const createXsrfPostAuthHandler = (config: HttpConfig): OnPostAuthHandler => {
+ const { whitelist, disableProtection } = config.xsrf;
+
+ return (request, response, toolkit) => {
+ if (disableProtection || whitelist.includes(request.route.path)) {
+ return toolkit.next();
+ }
+
+ const isSafeMethod = request.route.method === 'get' || request.route.method === 'head';
+ const hasVersionHeader = VERSION_HEADER in request.headers;
+ const hasXsrfHeader = XSRF_HEADER in request.headers;
+
+ if (!isSafeMethod && !hasVersionHeader && !hasXsrfHeader) {
+ return response.badRequest({ body: `Request must contain a ${XSRF_HEADER} header.` });
+ }
+
+ return toolkit.next();
+ };
+};
+
+export const createVersionCheckPostAuthHandler = (kibanaVersion: string): OnPostAuthHandler => {
+ return (request, response, toolkit) => {
+ const requestVersion = request.headers[VERSION_HEADER];
+ if (requestVersion && requestVersion !== kibanaVersion) {
+ return response.badRequest({
+ body: {
+ message:
+ `Browser client is out of date, please refresh the page ` +
+ `("${VERSION_HEADER}" header was "${requestVersion}" but should be "${kibanaVersion}")`,
+ attributes: {
+ expected: kibanaVersion,
+ got: requestVersion,
+ },
+ },
+ });
+ }
+
+ return toolkit.next();
+ };
+};
+
+export const createCustomHeadersPreResponseHandler = (config: HttpConfig): OnPreResponseHandler => {
+ const serverName = config.name;
+ const customHeaders = config.customResponseHeaders;
+
+ return (request, response, toolkit) => {
+ const additionalHeaders = {
+ ...customHeaders,
+ [KIBANA_NAME_HEADER]: serverName,
+ };
+
+ return toolkit.next({ headers: additionalHeaders });
+ };
+};
+
+export const registerCoreHandlers = (
+ registrar: LifecycleRegistrar,
+ config: HttpConfig,
+ env: Env
+) => {
+ registrar.registerOnPreResponse(createCustomHeadersPreResponseHandler(config));
+ registrar.registerOnPostAuth(createXsrfPostAuthHandler(config));
+ registrar.registerOnPostAuth(createVersionCheckPostAuthHandler(env.packageInfo.version));
+};
diff --git a/src/core/server/http/test_utils.ts b/src/core/server/http/test_utils.ts
index e0a15cdc6e839..ffdc04d156ca0 100644
--- a/src/core/server/http/test_utils.ts
+++ b/src/core/server/http/test_utils.ts
@@ -41,6 +41,10 @@ configService.atPath.mockReturnValue(
enabled: false,
},
compression: { enabled: true },
+ xsrf: {
+ disableProtection: true,
+ whitelist: [],
+ },
} as any)
);
diff --git a/src/core/server/http/types.ts b/src/core/server/http/types.ts
index 92217515a22a1..9c8bfc073a524 100644
--- a/src/core/server/http/types.ts
+++ b/src/core/server/http/types.ts
@@ -250,16 +250,6 @@ export interface InternalHttpServiceSetup
contextName: T,
provider: RequestHandlerContextProvider
) => RequestHandlerContextContainer;
- config: {
- /**
- * @internalRemarks
- * Deprecated part of the server config, provided until
- * https://github.com/elastic/kibana/issues/40255
- *
- * @deprecated
- * */
- defaultRoute?: string;
- };
}
/** @public */
diff --git a/src/core/server/internal_types.ts b/src/core/server/internal_types.ts
index be4d830c55eab..ff68d1544d119 100644
--- a/src/core/server/internal_types.ts
+++ b/src/core/server/internal_types.ts
@@ -17,7 +17,10 @@
* under the License.
*/
+import { Type } from '@kbn/config-schema';
+
import { CapabilitiesSetup, CapabilitiesStart } from './capabilities';
+import { ConfigDeprecationProvider } from './config';
import { ContextSetup } from './context';
import { InternalElasticsearchServiceSetup } from './elasticsearch';
import { InternalHttpServiceSetup } from './http';
@@ -47,3 +50,18 @@ export interface InternalCoreStart {
savedObjects: InternalSavedObjectsServiceStart;
uiSettings: InternalUiSettingsServiceStart;
}
+
+/**
+ * @internal
+ */
+export interface ServiceConfigDescriptor {
+ path: string;
+ /**
+ * Schema to use to validate the configuration.
+ */
+ schema: Type;
+ /**
+ * Provider for the {@link ConfigDeprecation} to apply to the plugin configuration.
+ */
+ deprecations?: ConfigDeprecationProvider;
+}
diff --git a/src/core/server/legacy/config/__snapshots__/legacy_object_to_config_adapter.test.ts.snap b/src/core/server/legacy/config/__snapshots__/legacy_object_to_config_adapter.test.ts.snap
index 0ebd8b8371628..74ecaa9f09c0e 100644
--- a/src/core/server/legacy/config/__snapshots__/legacy_object_to_config_adapter.test.ts.snap
+++ b/src/core/server/legacy/config/__snapshots__/legacy_object_to_config_adapter.test.ts.snap
@@ -8,10 +8,13 @@ Object {
"enabled": true,
},
"cors": false,
- "defaultRoute": undefined,
+ "customResponseHeaders": Object {
+ "custom-header": "custom-value",
+ },
"host": "host",
"keepaliveTimeout": 5000,
"maxPayload": 1000,
+ "name": "kibana-hostname",
"port": 1234,
"rewriteBasePath": false,
"socketTimeout": 2000,
@@ -21,6 +24,10 @@ Object {
"someNewValue": "new",
},
"uuid": undefined,
+ "xsrf": Object {
+ "disableProtection": false,
+ "whitelist": Array [],
+ },
}
`;
@@ -32,10 +39,13 @@ Object {
"enabled": true,
},
"cors": false,
- "defaultRoute": undefined,
+ "customResponseHeaders": Object {
+ "custom-header": "custom-value",
+ },
"host": "host",
"keepaliveTimeout": 5000,
"maxPayload": 1000,
+ "name": "kibana-hostname",
"port": 1234,
"rewriteBasePath": false,
"socketTimeout": 2000,
@@ -45,6 +55,10 @@ Object {
"key": "key",
},
"uuid": undefined,
+ "xsrf": Object {
+ "disableProtection": false,
+ "whitelist": Array [],
+ },
}
`;
diff --git a/src/core/server/legacy/config/legacy_object_to_config_adapter.test.ts b/src/core/server/legacy/config/legacy_object_to_config_adapter.test.ts
index db2bc117280ca..1c51564187442 100644
--- a/src/core/server/legacy/config/legacy_object_to_config_adapter.test.ts
+++ b/src/core/server/legacy/config/legacy_object_to_config_adapter.test.ts
@@ -80,9 +80,11 @@ describe('#get', () => {
test('correctly handles server config.', () => {
const configAdapter = new LegacyObjectToConfigAdapter({
server: {
+ name: 'kibana-hostname',
autoListen: true,
basePath: '/abc',
cors: false,
+ customResponseHeaders: { 'custom-header': 'custom-value' },
host: 'host',
maxPayloadBytes: 1000,
keepaliveTimeout: 5000,
@@ -92,14 +94,20 @@ describe('#get', () => {
ssl: { enabled: true, keyPassphrase: 'some-phrase', someNewValue: 'new' },
compression: { enabled: true },
someNotSupportedValue: 'val',
+ xsrf: {
+ disableProtection: false,
+ whitelist: [],
+ },
},
});
const configAdapterWithDisabledSSL = new LegacyObjectToConfigAdapter({
server: {
+ name: 'kibana-hostname',
autoListen: true,
basePath: '/abc',
cors: false,
+ customResponseHeaders: { 'custom-header': 'custom-value' },
host: 'host',
maxPayloadBytes: 1000,
keepaliveTimeout: 5000,
@@ -109,6 +117,10 @@ describe('#get', () => {
ssl: { enabled: false, certificate: 'cert', key: 'key' },
compression: { enabled: true },
someNotSupportedValue: 'val',
+ xsrf: {
+ disableProtection: false,
+ whitelist: [],
+ },
},
});
diff --git a/src/core/server/legacy/config/legacy_object_to_config_adapter.ts b/src/core/server/legacy/config/legacy_object_to_config_adapter.ts
index bdcde8262ef98..30bb150e6c15a 100644
--- a/src/core/server/legacy/config/legacy_object_to_config_adapter.ts
+++ b/src/core/server/legacy/config/legacy_object_to_config_adapter.ts
@@ -60,14 +60,15 @@ export class LegacyObjectToConfigAdapter extends ObjectToConfigAdapter {
private static transformServer(configValue: any = {}) {
// TODO: New platform uses just a subset of `server` config from the legacy platform,
- // new values will be exposed once we need them (eg. customResponseHeaders or xsrf).
+ // new values will be exposed once we need them
return {
autoListen: configValue.autoListen,
basePath: configValue.basePath,
- defaultRoute: configValue.defaultRoute,
cors: configValue.cors,
+ customResponseHeaders: configValue.customResponseHeaders,
host: configValue.host,
maxPayload: configValue.maxPayloadBytes,
+ name: configValue.name,
port: configValue.port,
rewriteBasePath: configValue.rewriteBasePath,
ssl: configValue.ssl,
@@ -75,6 +76,7 @@ export class LegacyObjectToConfigAdapter extends ObjectToConfigAdapter {
socketTimeout: configValue.socketTimeout,
compression: configValue.compression,
uuid: configValue.uuid,
+ xsrf: configValue.xsrf,
};
}
diff --git a/src/core/server/legacy/legacy_service.ts b/src/core/server/legacy/legacy_service.ts
index 2ed87f4c6d488..e17de7364ce59 100644
--- a/src/core/server/legacy/legacy_service.ts
+++ b/src/core/server/legacy/legacy_service.ts
@@ -84,7 +84,7 @@ export class LegacyService implements CoreService {
private settings?: LegacyVars;
constructor(private readonly coreContext: CoreContext) {
- const { logger, configService, env } = coreContext;
+ const { logger, configService } = coreContext;
this.log = logger.get('legacy-service');
this.devConfig$ = configService
@@ -93,7 +93,7 @@ export class LegacyService implements CoreService {
this.httpConfig$ = combineLatest(
configService.atPath(httpConfig.path),
configService.atPath(cspConfig.path)
- ).pipe(map(([http, csp]) => new HttpConfig(http, csp, env)));
+ ).pipe(map(([http, csp]) => new HttpConfig(http, csp)));
}
public async discoverPlugins(): Promise {
diff --git a/src/core/server/plugins/discovery/plugins_discovery.test.ts b/src/core/server/plugins/discovery/plugins_discovery.test.ts
index bf55fc7caae4c..2902aafdbf146 100644
--- a/src/core/server/plugins/discovery/plugins_discovery.test.ts
+++ b/src/core/server/plugins/discovery/plugins_discovery.test.ts
@@ -18,13 +18,14 @@
*/
import { mockPackage, mockReaddir, mockReadFile, mockStat } from './plugins_discovery.test.mocks';
+import { rawConfigServiceMock } from '../../config/raw_config_service.mock';
+import { loggingServiceMock } from '../../logging/logging_service.mock';
import { resolve } from 'path';
import { first, map, toArray } from 'rxjs/operators';
+
import { ConfigService, Env } from '../../config';
-import { rawConfigServiceMock } from '../../config/raw_config_service.mock';
import { getEnvOptions } from '../../config/__mocks__/env';
-import { loggingServiceMock } from '../../logging/logging_service.mock';
import { PluginWrapper } from '../plugin';
import { PluginsConfig, PluginsConfigType, config } from '../plugins_config';
import { discover } from './plugins_discovery';
@@ -37,6 +38,7 @@ const TEST_PLUGIN_SEARCH_PATHS = {
const TEST_EXTRA_PLUGIN_PATH = resolve(process.cwd(), 'my-extra-plugin');
const logger = loggingServiceMock.create();
+
beforeEach(() => {
mockReaddir.mockImplementation((path, cb) => {
if (path === TEST_PLUGIN_SEARCH_PATHS.nonEmptySrcPlugins) {
@@ -182,12 +184,84 @@ test('properly iterates through plugin search locations', async () => {
'kibana.json'
)})`,
]);
+});
+
+test('logs a warning about --plugin-path when used in development', async () => {
+ mockPackage.raw = {
+ branch: 'master',
+ version: '1.2.3',
+ build: {
+ distributable: true,
+ number: 1,
+ sha: '',
+ },
+ };
+
+ const env = Env.createDefault(
+ getEnvOptions({
+ cliArgs: { dev: false, envName: 'development' },
+ })
+ );
+ const configService = new ConfigService(
+ rawConfigServiceMock.create({ rawConfig: { plugins: { paths: [TEST_EXTRA_PLUGIN_PATH] } } }),
+ env,
+ logger
+ );
+ await configService.setSchema(config.path, config.schema);
+
+ const rawConfig = await configService
+ .atPath('plugins')
+ .pipe(first())
+ .toPromise();
+
+ discover(new PluginsConfig(rawConfig, env), {
+ coreId: Symbol(),
+ configService,
+ env,
+ logger,
+ });
+
+ expect(loggingServiceMock.collect(logger).warn).toEqual([
+ [
+ `Explicit plugin paths [${TEST_EXTRA_PLUGIN_PATH}] should only be used in development. Relative imports may not work properly in production.`,
+ ],
+ ]);
+});
+
+test('does not log a warning about --plugin-path when used in production', async () => {
+ mockPackage.raw = {
+ branch: 'master',
+ version: '1.2.3',
+ build: {
+ distributable: true,
+ number: 1,
+ sha: '',
+ },
+ };
+
+ const env = Env.createDefault(
+ getEnvOptions({
+ cliArgs: { dev: false, envName: 'production' },
+ })
+ );
+ const configService = new ConfigService(
+ rawConfigServiceMock.create({ rawConfig: { plugins: { paths: [TEST_EXTRA_PLUGIN_PATH] } } }),
+ env,
+ logger
+ );
+ await configService.setSchema(config.path, config.schema);
+
+ const rawConfig = await configService
+ .atPath('plugins')
+ .pipe(first())
+ .toPromise();
+
+ discover(new PluginsConfig(rawConfig, env), {
+ coreId: Symbol(),
+ configService,
+ env,
+ logger,
+ });
- expect(loggingServiceMock.collect(logger).warn).toMatchInlineSnapshot(`
-Array [
- Array [
- "Explicit plugin paths [${TEST_EXTRA_PLUGIN_PATH}] are only supported in development. Relative imports will not work in production.",
- ],
-]
-`);
+ expect(loggingServiceMock.collect(logger).warn).toEqual([]);
});
diff --git a/src/core/server/plugins/discovery/plugins_discovery.ts b/src/core/server/plugins/discovery/plugins_discovery.ts
index 521d02e487df6..79238afdf5c81 100644
--- a/src/core/server/plugins/discovery/plugins_discovery.ts
+++ b/src/core/server/plugins/discovery/plugins_discovery.ts
@@ -46,9 +46,9 @@ export function discover(config: PluginsConfig, coreContext: CoreContext) {
const log = coreContext.logger.get('plugins-discovery');
log.debug('Discovering plugins...');
- if (config.additionalPluginPaths.length) {
+ if (config.additionalPluginPaths.length && coreContext.env.mode.dev) {
log.warn(
- `Explicit plugin paths [${config.additionalPluginPaths}] are only supported in development. Relative imports will not work in production.`
+ `Explicit plugin paths [${config.additionalPluginPaths}] should only be used in development. Relative imports may not work properly in production.`
);
}
diff --git a/src/core/server/plugins/plugins_config.test.ts b/src/core/server/plugins/plugins_config.test.ts
new file mode 100644
index 0000000000000..180d6093e0404
--- /dev/null
+++ b/src/core/server/plugins/plugins_config.test.ts
@@ -0,0 +1,44 @@
+/*
+ * Licensed to Elasticsearch B.V. under one or more contributor
+ * license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright
+ * ownership. Elasticsearch B.V. licenses this file to you under
+ * the Apache License, Version 2.0 (the "License"); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { PluginsConfig, PluginsConfigType } from './plugins_config';
+import { Env } from '../config';
+import { getEnvOptions } from '../config/__mocks__/env';
+
+describe('PluginsConfig', () => {
+ it('retrieves additionalPluginPaths from config.paths when in production mode', () => {
+ const env = Env.createDefault(getEnvOptions({ cliArgs: { dev: false } }));
+ const rawConfig: PluginsConfigType = {
+ initialize: true,
+ paths: ['some-path', 'another-path'],
+ };
+ const config = new PluginsConfig(rawConfig, env);
+ expect(config.additionalPluginPaths).toEqual(['some-path', 'another-path']);
+ });
+
+ it('retrieves additionalPluginPaths from config.paths when in development mode', () => {
+ const env = Env.createDefault(getEnvOptions({ cliArgs: { dev: true } }));
+ const rawConfig: PluginsConfigType = {
+ initialize: true,
+ paths: ['some-path', 'another-path'],
+ };
+ const config = new PluginsConfig(rawConfig, env);
+ expect(config.additionalPluginPaths).toEqual(['some-path', 'another-path']);
+ });
+});
diff --git a/src/core/server/plugins/plugins_config.ts b/src/core/server/plugins/plugins_config.ts
index 93ae229737fae..8ebcc92672dde 100644
--- a/src/core/server/plugins/plugins_config.ts
+++ b/src/core/server/plugins/plugins_config.ts
@@ -29,7 +29,6 @@ export const config = {
/**
* Defines an array of directories where another plugin should be loaded from.
- * Should only be used in a development environment.
*/
paths: schema.arrayOf(schema.string(), { defaultValue: [] }),
}),
@@ -55,7 +54,6 @@ export class PluginsConfig {
constructor(rawConfig: PluginsConfigType, env: Env) {
this.initialize = rawConfig.initialize;
this.pluginSearchPaths = env.pluginSearchPaths;
- // Only allow custom plugin paths in dev.
- this.additionalPluginPaths = env.mode.dev ? rawConfig.paths : [];
+ this.additionalPluginPaths = rawConfig.paths;
}
}
diff --git a/src/core/server/rendering/__snapshots__/rendering_service.test.ts.snap b/src/core/server/rendering/__snapshots__/rendering_service.test.ts.snap
index edde1dee85f4f..5e6e977663bc4 100644
--- a/src/core/server/rendering/__snapshots__/rendering_service.test.ts.snap
+++ b/src/core/server/rendering/__snapshots__/rendering_service.test.ts.snap
@@ -18,6 +18,7 @@ Object {
"oss": false,
"quiet": false,
"repl": false,
+ "runExamples": false,
"silent": false,
"watch": false,
},
@@ -39,7 +40,6 @@ Object {
"version": Any,
},
"pluginSearchPaths": Any,
- "staticFilesDir": Any,
},
"i18n": Object {
"translationsUrl": "/mock-server-basepath/translations/en.json",
@@ -89,6 +89,7 @@ Object {
"oss": false,
"quiet": false,
"repl": false,
+ "runExamples": false,
"silent": false,
"watch": false,
},
@@ -110,7 +111,6 @@ Object {
"version": Any,
},
"pluginSearchPaths": Any,
- "staticFilesDir": Any,
},
"i18n": Object {
"translationsUrl": "/mock-server-basepath/translations/en.json",
@@ -160,6 +160,7 @@ Object {
"oss": false,
"quiet": false,
"repl": false,
+ "runExamples": false,
"silent": false,
"watch": false,
},
@@ -181,7 +182,6 @@ Object {
"version": Any,
},
"pluginSearchPaths": Any,
- "staticFilesDir": Any,
},
"i18n": Object {
"translationsUrl": "/mock-server-basepath/translations/en.json",
@@ -235,6 +235,7 @@ Object {
"oss": false,
"quiet": false,
"repl": false,
+ "runExamples": false,
"silent": false,
"watch": false,
},
@@ -256,7 +257,6 @@ Object {
"version": Any,
},
"pluginSearchPaths": Any,
- "staticFilesDir": Any,
},
"i18n": Object {
"translationsUrl": "/translations/en.json",
@@ -306,6 +306,7 @@ Object {
"oss": false,
"quiet": false,
"repl": false,
+ "runExamples": false,
"silent": false,
"watch": false,
},
@@ -327,7 +328,6 @@ Object {
"version": Any,
},
"pluginSearchPaths": Any,
- "staticFilesDir": Any,
},
"i18n": Object {
"translationsUrl": "/mock-server-basepath/translations/en.json",
@@ -377,6 +377,7 @@ Object {
"oss": false,
"quiet": false,
"repl": false,
+ "runExamples": false,
"silent": false,
"watch": false,
},
@@ -398,7 +399,6 @@ Object {
"version": Any,
},
"pluginSearchPaths": Any,
- "staticFilesDir": Any,
},
"i18n": Object {
"translationsUrl": "/mock-server-basepath/translations/en.json",
@@ -448,6 +448,7 @@ Object {
"oss": false,
"quiet": false,
"repl": false,
+ "runExamples": false,
"silent": false,
"watch": false,
},
@@ -469,7 +470,6 @@ Object {
"version": Any,
},
"pluginSearchPaths": Any,
- "staticFilesDir": Any,
},
"i18n": Object {
"translationsUrl": "/translations/en.json",
@@ -519,6 +519,7 @@ Object {
"oss": false,
"quiet": false,
"repl": false,
+ "runExamples": false,
"silent": false,
"watch": false,
},
@@ -540,7 +541,6 @@ Object {
"version": Any,
},
"pluginSearchPaths": Any,
- "staticFilesDir": Any,
},
"i18n": Object {
"translationsUrl": "/mock-server-basepath/translations/en.json",
@@ -592,6 +592,7 @@ Object {
"oss": false,
"quiet": false,
"repl": false,
+ "runExamples": false,
"silent": false,
"watch": false,
},
@@ -613,7 +614,6 @@ Object {
"version": Any,
},
"pluginSearchPaths": Any,
- "staticFilesDir": Any,
},
"i18n": Object {
"translationsUrl": "/mock-server-basepath/translations/en.json",
@@ -663,6 +663,7 @@ Object {
"oss": false,
"quiet": false,
"repl": false,
+ "runExamples": false,
"silent": false,
"watch": false,
},
@@ -684,7 +685,6 @@ Object {
"version": Any,
},
"pluginSearchPaths": Any,
- "staticFilesDir": Any,
},
"i18n": Object {
"translationsUrl": "/mock-server-basepath/translations/en.json",
diff --git a/src/core/server/rendering/rendering_service.test.ts b/src/core/server/rendering/rendering_service.test.ts
index 63145f2b30573..43ff4f633085c 100644
--- a/src/core/server/rendering/rendering_service.test.ts
+++ b/src/core/server/rendering/rendering_service.test.ts
@@ -41,7 +41,6 @@ const INJECTED_METADATA = {
version: expect.any(String),
},
pluginSearchPaths: expect.any(Array),
- staticFilesDir: expect.any(String),
},
legacyMetadata: {
branch: expect.any(String),
@@ -50,6 +49,7 @@ const INJECTED_METADATA = {
version: expect.any(String),
},
};
+
const { createKibanaRequest, createRawRequest } = httpServerMock;
const legacyApp = { getId: () => 'legacy' };
diff --git a/src/core/server/rendering/views/styles.tsx b/src/core/server/rendering/views/styles.tsx
index 40261321dcffc..dfcb4213d90f7 100644
--- a/src/core/server/rendering/views/styles.tsx
+++ b/src/core/server/rendering/views/styles.tsx
@@ -28,8 +28,6 @@ interface Props {
}
export const Styles: FunctionComponent = ({ darkMode }) => {
- const themeBackground = darkMode ? '#25262e' : '#f5f7fa';
-
return (
\ No newline at end of file
diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/__jest__/render.test.js b/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/__jest__/render.test.js
index be4866f9dfdd4..375e80028f317 100644
--- a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/__jest__/render.test.js
+++ b/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/__jest__/render.test.js
@@ -22,12 +22,6 @@ const unmountComponentAtNode = jest.fn();
jest.doMock('react-dom', () => ({ render, unmountComponentAtNode }));
-// If we don't mock this, Jest fails with the error `TypeError: Cannot redefine property: prototype
-// at Function.defineProperties`.
-jest.mock('ui/index_patterns', () => ({
- INDEX_PATTERN_ILLEGAL_CHARACTERS: ['\\', '/', '?', '"', '<', '>', '|', ' '],
-}));
-
jest.mock('ui/chrome', () => ({
getUiSettingsClient: () => ({
get: () => '',
diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_index_pattern/__jest__/step_index_pattern.test.js b/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_index_pattern/__jest__/step_index_pattern.test.js
index 1797fc203ccd8..85e610bbbf993 100644
--- a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_index_pattern/__jest__/step_index_pattern.test.js
+++ b/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_index_pattern/__jest__/step_index_pattern.test.js
@@ -32,11 +32,6 @@ const mockIndexPatternCreationType = {
checkIndicesForErrors: () => false,
getShowSystemIndices: () => false,
};
-// If we don't mock this, Jest fails with the error `TypeError: Cannot redefine property: prototype
-// at Function.defineProperties`.
-jest.mock('ui/index_patterns', () => ({
- INDEX_PATTERN_ILLEGAL_CHARACTERS: ['\\', '/', '?', '"', '<', '>', '|', ' '],
-}));
jest.mock('ui/chrome', () => ({
getUiSettingsClient: () => ({
diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_index_pattern/step_index_pattern.js b/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_index_pattern/step_index_pattern.js
index 4764b516dffec..c990efaf43547 100644
--- a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_index_pattern/step_index_pattern.js
+++ b/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_index_pattern/step_index_pattern.js
@@ -19,7 +19,7 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
-import { INDEX_PATTERN_ILLEGAL_CHARACTERS as ILLEGAL_CHARACTERS } from 'ui/index_patterns';
+import { indexPatterns } from '../../../../../../../../../../plugins/data/public';
import { MAX_SEARCH_SIZE } from '../../constants';
import {
getIndices,
@@ -71,7 +71,7 @@ export class StepIndexPattern extends Component {
indexPatternName: indexPatternCreationType.getIndexPatternName(),
};
- this.ILLEGAL_CHARACTERS = [...ILLEGAL_CHARACTERS];
+ this.ILLEGAL_CHARACTERS = [...indexPatterns.ILLEGAL_CHARACTERS];
this.lastQuery = null;
}
@@ -243,7 +243,7 @@ export class StepIndexPattern extends Component {
if (!query || !query.length || query === '.' || query === '..') {
// This is an error scenario but do not report an error
containsErrors = true;
- } else if (containsIllegalCharacters(query, ILLEGAL_CHARACTERS)) {
+ } else if (containsIllegalCharacters(query, indexPatterns.ILLEGAL_CHARACTERS)) {
const errorMessage = i18n.translate(
'kbn.management.createIndexPattern.step.invalidCharactersErrorMessage',
{
diff --git a/src/legacy/core_plugins/kibana/server/tutorials/apm/index_pattern.json b/src/legacy/core_plugins/kibana/server/tutorials/apm/index_pattern.json
index 25ce0cb58a0ca..090586a612d4f 100644
--- a/src/legacy/core_plugins/kibana/server/tutorials/apm/index_pattern.json
+++ b/src/legacy/core_plugins/kibana/server/tutorials/apm/index_pattern.json
@@ -1,7 +1,7 @@
{
"attributes": {
"fieldFormatMap": "{\"client.bytes\":{\"id\":\"bytes\"},\"client.nat.port\":{\"id\":\"string\"},\"client.port\":{\"id\":\"string\"},\"destination.bytes\":{\"id\":\"bytes\"},\"destination.nat.port\":{\"id\":\"string\"},\"destination.port\":{\"id\":\"string\"},\"event.duration\":{\"id\":\"duration\",\"params\":{\"inputFormat\":\"nanoseconds\",\"outputFormat\":\"asMilliseconds\",\"outputPrecision\":1}},\"event.sequence\":{\"id\":\"string\"},\"event.severity\":{\"id\":\"string\"},\"http.request.body.bytes\":{\"id\":\"bytes\"},\"http.request.bytes\":{\"id\":\"bytes\"},\"http.response.body.bytes\":{\"id\":\"bytes\"},\"http.response.bytes\":{\"id\":\"bytes\"},\"http.response.status_code\":{\"id\":\"string\"},\"log.syslog.facility.code\":{\"id\":\"string\"},\"log.syslog.priority\":{\"id\":\"string\"},\"network.bytes\":{\"id\":\"bytes\"},\"package.size\":{\"id\":\"string\"},\"process.pgid\":{\"id\":\"string\"},\"process.pid\":{\"id\":\"string\"},\"process.ppid\":{\"id\":\"string\"},\"process.thread.id\":{\"id\":\"string\"},\"server.bytes\":{\"id\":\"bytes\"},\"server.nat.port\":{\"id\":\"string\"},\"server.port\":{\"id\":\"string\"},\"source.bytes\":{\"id\":\"bytes\"},\"source.nat.port\":{\"id\":\"string\"},\"source.port\":{\"id\":\"string\"},\"system.cpu.total.norm.pct\":{\"id\":\"percent\"},\"system.memory.actual.free\":{\"id\":\"bytes\"},\"system.memory.total\":{\"id\":\"bytes\"},\"system.process.cpu.total.norm.pct\":{\"id\":\"percent\"},\"system.process.memory.rss.bytes\":{\"id\":\"bytes\"},\"system.process.memory.size\":{\"id\":\"bytes\"},\"url.port\":{\"id\":\"string\"},\"view spans\":{\"id\":\"url\",\"params\":{\"labelTemplate\":\"View Spans\"}}}",
- "fields": "[{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"@timestamp\",\"scripted\":false,\"searchable\":true,\"type\":\"date\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"labels\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":false,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"message\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"tags\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"agent.ephemeral_id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"agent.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"agent.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"agent.type\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"agent.version\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"as.number\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"as.organization.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"client.address\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"client.as.number\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"client.as.organization.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"client.bytes\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"client.domain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"client.geo.city_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"client.geo.continent_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"client.geo.country_iso_code\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"client.geo.country_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"client.geo.location\",\"scripted\":false,\"searchable\":true,\"type\":\"geo_point\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"client.geo.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"client.geo.region_iso_code\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"client.geo.region_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"client.ip\",\"scripted\":false,\"searchable\":true,\"type\":\"ip\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"client.mac\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"client.nat.ip\",\"scripted\":false,\"searchable\":true,\"type\":\"ip\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"client.nat.port\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"client.packets\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"client.port\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"client.registered_domain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"client.top_level_domain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"client.user.domain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"client.user.email\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"client.user.full_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"client.user.group.domain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"client.user.group.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"client.user.group.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"client.user.hash\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"client.user.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"client.user.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"cloud.account.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"cloud.availability_zone\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"cloud.instance.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"cloud.instance.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"cloud.machine.type\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"cloud.provider\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"cloud.region\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"container.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"container.image.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"container.image.tag\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"container.labels\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"container.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"container.runtime\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.address\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.as.number\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.as.organization.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.bytes\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.domain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.geo.city_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.geo.continent_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.geo.country_iso_code\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.geo.country_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.geo.location\",\"scripted\":false,\"searchable\":true,\"type\":\"geo_point\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.geo.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.geo.region_iso_code\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.geo.region_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.ip\",\"scripted\":false,\"searchable\":true,\"type\":\"ip\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.mac\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.nat.ip\",\"scripted\":false,\"searchable\":true,\"type\":\"ip\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.nat.port\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.packets\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.port\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.registered_domain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.top_level_domain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.user.domain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.user.email\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.user.full_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.user.group.domain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.user.group.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.user.group.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.user.hash\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.user.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.user.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"dns.answers\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"dns.answers.class\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"dns.answers.data\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"dns.answers.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"dns.answers.ttl\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"dns.answers.type\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"dns.header_flags\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"dns.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"dns.op_code\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"dns.question.class\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"dns.question.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"dns.question.registered_domain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"dns.question.subdomain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"dns.question.top_level_domain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"dns.question.type\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"dns.resolved_ip\",\"scripted\":false,\"searchable\":true,\"type\":\"ip\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"dns.response_code\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"dns.type\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"ecs.version\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"error.code\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":4,\"doc_values\":true,\"indexed\":true,\"name\":\"error.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":false,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"error.message\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"error.stack_trace\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"error.type\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.action\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.category\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.code\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.created\",\"scripted\":false,\"searchable\":true,\"type\":\"date\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.dataset\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.duration\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.end\",\"scripted\":false,\"searchable\":true,\"type\":\"date\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.hash\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.kind\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.module\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.original\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.outcome\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.provider\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.risk_score\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.risk_score_norm\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.sequence\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.severity\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.start\",\"scripted\":false,\"searchable\":true,\"type\":\"date\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.timezone\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.type\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.accessed\",\"scripted\":false,\"searchable\":true,\"type\":\"date\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.created\",\"scripted\":false,\"searchable\":true,\"type\":\"date\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.ctime\",\"scripted\":false,\"searchable\":true,\"type\":\"date\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.device\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.directory\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.extension\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.gid\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.group\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.hash.md5\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.hash.sha1\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.hash.sha256\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.hash.sha512\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.inode\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.mode\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.mtime\",\"scripted\":false,\"searchable\":true,\"type\":\"date\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.owner\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.path\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.size\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.target_path\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.type\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.uid\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"geo.city_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"geo.continent_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"geo.country_iso_code\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"geo.country_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"geo.location\",\"scripted\":false,\"searchable\":true,\"type\":\"geo_point\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"geo.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"geo.region_iso_code\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"geo.region_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"group.domain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"group.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"group.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"hash.md5\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"hash.sha1\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"hash.sha256\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"hash.sha512\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.architecture\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.geo.city_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.geo.continent_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.geo.country_iso_code\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.geo.country_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.geo.location\",\"scripted\":false,\"searchable\":true,\"type\":\"geo_point\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.geo.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.geo.region_iso_code\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.geo.region_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.hostname\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.ip\",\"scripted\":false,\"searchable\":true,\"type\":\"ip\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.mac\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.os.family\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.os.full\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.os.kernel\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.os.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.os.platform\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.os.version\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.type\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.uptime\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.user.domain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.user.email\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.user.full_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.user.group.domain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.user.group.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.user.group.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.user.hash\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.user.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.user.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"http.request.body.bytes\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"http.request.body.content\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"http.request.bytes\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"http.request.method\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"http.request.referrer\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"http.response.body.bytes\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"http.response.body.content\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"http.response.bytes\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"http.response.status_code\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"http.version\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"log.level\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"log.logger\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"log.origin.file.line\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"log.origin.file.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"log.origin.function\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"log.original\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"log.syslog\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"log.syslog.facility.code\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"log.syslog.facility.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"log.syslog.priority\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"log.syslog.severity.code\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"log.syslog.severity.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"network.application\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"network.bytes\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"network.community_id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"network.direction\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"network.forwarded_ip\",\"scripted\":false,\"searchable\":true,\"type\":\"ip\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"network.iana_number\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"network.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"network.packets\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"network.protocol\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"network.transport\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"network.type\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"observer.geo.city_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"observer.geo.continent_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"observer.geo.country_iso_code\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"observer.geo.country_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"observer.geo.location\",\"scripted\":false,\"searchable\":true,\"type\":\"geo_point\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"observer.geo.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"observer.geo.region_iso_code\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"observer.geo.region_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"observer.hostname\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"observer.ip\",\"scripted\":false,\"searchable\":true,\"type\":\"ip\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"observer.mac\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"observer.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"observer.os.family\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"observer.os.full\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"observer.os.kernel\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"observer.os.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"observer.os.platform\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"observer.os.version\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"observer.product\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"observer.serial_number\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"observer.type\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"observer.vendor\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"observer.version\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"organization.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"organization.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"os.family\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"os.full\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"os.kernel\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"os.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"os.platform\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"os.version\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"package.architecture\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"package.checksum\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"package.description\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"package.install_scope\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"package.installed\",\"scripted\":false,\"searchable\":true,\"type\":\"date\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"package.license\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"package.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"package.path\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"package.size\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"package.version\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"process.args\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"process.executable\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"process.hash.md5\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"process.hash.sha1\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"process.hash.sha256\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"process.hash.sha512\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"process.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"process.pgid\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"process.pid\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"process.ppid\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"process.start\",\"scripted\":false,\"searchable\":true,\"type\":\"date\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"process.thread.id\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"process.thread.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"process.title\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"process.uptime\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"process.working_directory\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"related.ip\",\"scripted\":false,\"searchable\":true,\"type\":\"ip\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"server.address\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"server.as.number\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"server.as.organization.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"server.bytes\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"server.domain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"server.geo.city_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"server.geo.continent_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"server.geo.country_iso_code\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"server.geo.country_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"server.geo.location\",\"scripted\":false,\"searchable\":true,\"type\":\"geo_point\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"server.geo.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"server.geo.region_iso_code\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"server.geo.region_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"server.ip\",\"scripted\":false,\"searchable\":true,\"type\":\"ip\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"server.mac\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"server.nat.ip\",\"scripted\":false,\"searchable\":true,\"type\":\"ip\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"server.nat.port\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"server.packets\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"server.port\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"server.registered_domain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"server.top_level_domain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"server.user.domain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"server.user.email\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"server.user.full_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"server.user.group.domain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"server.user.group.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"server.user.group.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"server.user.hash\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"server.user.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"server.user.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"service.ephemeral_id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"service.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"service.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"service.node.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"service.state\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"service.type\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"service.version\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.address\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.as.number\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.as.organization.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.bytes\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.domain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.geo.city_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.geo.continent_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.geo.country_iso_code\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.geo.country_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.geo.location\",\"scripted\":false,\"searchable\":true,\"type\":\"geo_point\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.geo.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.geo.region_iso_code\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.geo.region_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.ip\",\"scripted\":false,\"searchable\":true,\"type\":\"ip\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.mac\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.nat.ip\",\"scripted\":false,\"searchable\":true,\"type\":\"ip\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.nat.port\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.packets\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.port\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.registered_domain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.top_level_domain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.user.domain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.user.email\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.user.full_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.user.group.domain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.user.group.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.user.group.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.user.hash\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.user.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.user.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"threat.framework\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"threat.tactic.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"threat.tactic.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"threat.tactic.reference\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"threat.technique.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"threat.technique.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"threat.technique.reference\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"tracing.trace.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"tracing.transaction.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"url.domain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"url.extension\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"url.fragment\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"url.full\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"url.original\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"url.password\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"url.path\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"url.port\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"url.query\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"url.registered_domain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"url.scheme\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"url.top_level_domain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"url.username\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user.domain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user.email\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user.full_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user.group.domain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user.group.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user.group.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user.hash\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user_agent.device.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user_agent.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user_agent.original\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user_agent.os.family\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user_agent.os.full\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user_agent.os.kernel\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user_agent.os.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user_agent.os.platform\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user_agent.os.version\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user_agent.version\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"agent.hostname\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"fields\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"timeseries.instance\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"cloud.project.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"cloud.image.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"docker.container.labels\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.containerized\",\"scripted\":false,\"searchable\":true,\"type\":\"boolean\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.os.build\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.os.codename\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"kubernetes.pod.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"kubernetes.pod.uid\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"kubernetes.namespace\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"kubernetes.node.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"kubernetes.labels.*\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"kubernetes.annotations.*\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"kubernetes.replicaset.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"kubernetes.deployment.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"kubernetes.statefulset.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"kubernetes.container.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"kubernetes.container.image\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"processor.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"processor.event\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":1,\"doc_values\":true,\"indexed\":true,\"name\":\"timestamp.us\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":false,\"analyzed\":false,\"count\":0,\"doc_values\":false,\"enabled\":false,\"indexed\":false,\"name\":\"http.request.headers\",\"scripted\":false,\"searchable\":false},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"http.response.finished\",\"scripted\":false,\"searchable\":true,\"type\":\"boolean\"},{\"aggregatable\":false,\"analyzed\":false,\"count\":0,\"doc_values\":false,\"enabled\":false,\"indexed\":false,\"name\":\"http.response.headers\",\"scripted\":false,\"searchable\":false},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"service.environment\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"service.language.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"service.language.version\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"service.runtime.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"service.runtime.version\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"service.framework.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"service.framework.version\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"transaction.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"transaction.sampled\",\"scripted\":false,\"searchable\":true,\"type\":\"boolean\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"transaction.type\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"transaction.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":false,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"transaction.name.text\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"transaction.duration.count\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"transaction.duration.sum.us\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"transaction.self_time.count\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"transaction.self_time.sum.us\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"transaction.breakdown.count\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":1,\"doc_values\":true,\"indexed\":true,\"name\":\"span.type\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":1,\"doc_values\":true,\"indexed\":true,\"name\":\"span.subtype\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"span.self_time.count\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"span.self_time.sum.us\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"trace.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"parent.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"observer.listening\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"observer.version_major\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":false,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user_agent.original.text\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"experimental\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":true,\"analyzed\":false,\"count\":2,\"doc_values\":true,\"indexed\":true,\"name\":\"error.culprit\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"error.grouping_key\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"error.exception.code\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":false,\"analyzed\":false,\"count\":2,\"doc_values\":true,\"indexed\":true,\"name\":\"error.exception.message\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"error.exception.module\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":4,\"doc_values\":true,\"indexed\":true,\"name\":\"error.exception.type\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":2,\"doc_values\":true,\"indexed\":true,\"name\":\"error.exception.handled\",\"scripted\":false,\"searchable\":true,\"type\":\"boolean\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"error.log.level\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"error.log.logger_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":false,\"analyzed\":false,\"count\":2,\"doc_values\":true,\"indexed\":true,\"name\":\"error.log.message\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"error.log.param_message\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"system.cpu.total.norm.pct\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"system.memory.total\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"system.memory.actual.free\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"system.process.cpu.total.norm.pct\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"system.process.memory.size\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"system.process.memory.rss.bytes\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":1,\"doc_values\":true,\"indexed\":true,\"name\":\"profile.cpu.ns\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":1,\"doc_values\":true,\"indexed\":true,\"name\":\"profile.samples.count\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":1,\"doc_values\":true,\"indexed\":true,\"name\":\"profile.alloc_objects.count\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":1,\"doc_values\":true,\"indexed\":true,\"name\":\"profile.alloc_space.bytes\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":1,\"doc_values\":true,\"indexed\":true,\"name\":\"profile.inuse_objects.count\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":1,\"doc_values\":true,\"indexed\":true,\"name\":\"profile.inuse_space.bytes\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":1,\"doc_values\":true,\"indexed\":true,\"name\":\"profile.duration\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"profile.top.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":1,\"doc_values\":true,\"indexed\":true,\"name\":\"profile.top.function\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":1,\"doc_values\":true,\"indexed\":true,\"name\":\"profile.top.filename\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":1,\"doc_values\":true,\"indexed\":true,\"name\":\"profile.top.line\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"profile.stack.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"profile.stack.function\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"profile.stack.filename\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"profile.stack.line\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"sourcemap.service.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"sourcemap.service.version\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"sourcemap.bundle_filepath\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"view spans\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"span.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":1,\"doc_values\":true,\"indexed\":true,\"name\":\"span.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":1,\"doc_values\":true,\"indexed\":true,\"name\":\"span.action\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":1,\"doc_values\":true,\"indexed\":true,\"name\":\"span.start.us\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":1,\"doc_values\":true,\"indexed\":true,\"name\":\"span.duration.us\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"span.sync\",\"scripted\":false,\"searchable\":true,\"type\":\"boolean\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"span.db.link\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"span.destination.service.type\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"span.destination.service.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"span.destination.service.resource\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"transaction.duration.us\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"transaction.result\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"transaction.marks\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"transaction.marks.*.*\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"transaction.span_count.dropped\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":false,\"analyzed\":false,\"count\":0,\"doc_values\":false,\"indexed\":false,\"name\":\"_id\",\"scripted\":false,\"searchable\":false,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":false,\"indexed\":false,\"name\":\"_type\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":false,\"analyzed\":false,\"count\":0,\"doc_values\":false,\"indexed\":false,\"name\":\"_index\",\"scripted\":false,\"searchable\":false,\"type\":\"string\"},{\"aggregatable\":false,\"analyzed\":false,\"count\":0,\"doc_values\":false,\"indexed\":false,\"name\":\"_score\",\"scripted\":false,\"searchable\":false,\"type\":\"number\"}]",
+ "fields": "[{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"@timestamp\",\"scripted\":false,\"searchable\":true,\"type\":\"date\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"labels\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":false,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"message\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"tags\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"agent.ephemeral_id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"agent.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"agent.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"agent.type\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"agent.version\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"as.number\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"as.organization.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"client.address\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"client.as.number\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"client.as.organization.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"client.bytes\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"client.domain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"client.geo.city_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"client.geo.continent_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"client.geo.country_iso_code\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"client.geo.country_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"client.geo.location\",\"scripted\":false,\"searchable\":true,\"type\":\"geo_point\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"client.geo.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"client.geo.region_iso_code\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"client.geo.region_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"client.ip\",\"scripted\":false,\"searchable\":true,\"type\":\"ip\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"client.mac\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"client.nat.ip\",\"scripted\":false,\"searchable\":true,\"type\":\"ip\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"client.nat.port\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"client.packets\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"client.port\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"client.registered_domain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"client.top_level_domain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"client.user.domain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"client.user.email\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"client.user.full_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"client.user.group.domain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"client.user.group.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"client.user.group.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"client.user.hash\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"client.user.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"client.user.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"cloud.account.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"cloud.availability_zone\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"cloud.instance.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"cloud.instance.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"cloud.machine.type\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"cloud.provider\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"cloud.region\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"container.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"container.image.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"container.image.tag\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"container.labels\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"container.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"container.runtime\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.address\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.as.number\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.as.organization.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.bytes\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.domain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.geo.city_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.geo.continent_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.geo.country_iso_code\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.geo.country_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.geo.location\",\"scripted\":false,\"searchable\":true,\"type\":\"geo_point\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.geo.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.geo.region_iso_code\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.geo.region_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.ip\",\"scripted\":false,\"searchable\":true,\"type\":\"ip\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.mac\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.nat.ip\",\"scripted\":false,\"searchable\":true,\"type\":\"ip\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.nat.port\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.packets\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.port\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.registered_domain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.top_level_domain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.user.domain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.user.email\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.user.full_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.user.group.domain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.user.group.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.user.group.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.user.hash\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.user.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"destination.user.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"dns.answers\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"dns.answers.class\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"dns.answers.data\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"dns.answers.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"dns.answers.ttl\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"dns.answers.type\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"dns.header_flags\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"dns.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"dns.op_code\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"dns.question.class\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"dns.question.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"dns.question.registered_domain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"dns.question.subdomain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"dns.question.top_level_domain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"dns.question.type\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"dns.resolved_ip\",\"scripted\":false,\"searchable\":true,\"type\":\"ip\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"dns.response_code\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"dns.type\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"ecs.version\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"error.code\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":4,\"doc_values\":true,\"indexed\":true,\"name\":\"error.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":false,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"error.message\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"error.stack_trace\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"error.type\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.action\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.category\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.code\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.created\",\"scripted\":false,\"searchable\":true,\"type\":\"date\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.dataset\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.duration\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.end\",\"scripted\":false,\"searchable\":true,\"type\":\"date\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.hash\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.kind\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.module\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.original\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.outcome\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.provider\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.risk_score\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.risk_score_norm\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.sequence\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.severity\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.start\",\"scripted\":false,\"searchable\":true,\"type\":\"date\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.timezone\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"event.type\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.accessed\",\"scripted\":false,\"searchable\":true,\"type\":\"date\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.created\",\"scripted\":false,\"searchable\":true,\"type\":\"date\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.ctime\",\"scripted\":false,\"searchable\":true,\"type\":\"date\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.device\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.directory\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.extension\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.gid\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.group\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.hash.md5\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.hash.sha1\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.hash.sha256\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.hash.sha512\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.inode\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.mode\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.mtime\",\"scripted\":false,\"searchable\":true,\"type\":\"date\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.owner\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.path\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.size\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.target_path\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.type\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"file.uid\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"geo.city_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"geo.continent_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"geo.country_iso_code\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"geo.country_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"geo.location\",\"scripted\":false,\"searchable\":true,\"type\":\"geo_point\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"geo.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"geo.region_iso_code\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"geo.region_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"group.domain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"group.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"group.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"hash.md5\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"hash.sha1\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"hash.sha256\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"hash.sha512\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.architecture\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.geo.city_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.geo.continent_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.geo.country_iso_code\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.geo.country_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.geo.location\",\"scripted\":false,\"searchable\":true,\"type\":\"geo_point\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.geo.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.geo.region_iso_code\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.geo.region_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.hostname\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.ip\",\"scripted\":false,\"searchable\":true,\"type\":\"ip\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.mac\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.os.family\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.os.full\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.os.kernel\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.os.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.os.platform\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.os.version\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.type\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.uptime\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.user.domain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.user.email\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.user.full_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.user.group.domain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.user.group.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.user.group.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.user.hash\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.user.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.user.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"http.request.body.bytes\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"http.request.body.content\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"http.request.bytes\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"http.request.method\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"http.request.referrer\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"http.response.body.bytes\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"http.response.body.content\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"http.response.bytes\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"http.response.status_code\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"http.version\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"log.level\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"log.logger\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"log.origin.file.line\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"log.origin.file.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"log.origin.function\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"log.original\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"log.syslog\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"log.syslog.facility.code\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"log.syslog.facility.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"log.syslog.priority\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"log.syslog.severity.code\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"log.syslog.severity.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"network.application\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"network.bytes\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"network.community_id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"network.direction\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"network.forwarded_ip\",\"scripted\":false,\"searchable\":true,\"type\":\"ip\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"network.iana_number\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"network.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"network.packets\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"network.protocol\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"network.transport\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"network.type\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"observer.geo.city_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"observer.geo.continent_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"observer.geo.country_iso_code\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"observer.geo.country_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"observer.geo.location\",\"scripted\":false,\"searchable\":true,\"type\":\"geo_point\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"observer.geo.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"observer.geo.region_iso_code\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"observer.geo.region_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"observer.hostname\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"observer.ip\",\"scripted\":false,\"searchable\":true,\"type\":\"ip\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"observer.mac\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"observer.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"observer.os.family\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"observer.os.full\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"observer.os.kernel\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"observer.os.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"observer.os.platform\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"observer.os.version\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"observer.product\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"observer.serial_number\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"observer.type\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"observer.vendor\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"observer.version\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"organization.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"organization.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"os.family\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"os.full\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"os.kernel\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"os.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"os.platform\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"os.version\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"package.architecture\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"package.checksum\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"package.description\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"package.install_scope\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"package.installed\",\"scripted\":false,\"searchable\":true,\"type\":\"date\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"package.license\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"package.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"package.path\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"package.size\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"package.version\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"process.args\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"process.executable\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"process.hash.md5\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"process.hash.sha1\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"process.hash.sha256\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"process.hash.sha512\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"process.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"process.pgid\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"process.pid\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"process.ppid\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"process.start\",\"scripted\":false,\"searchable\":true,\"type\":\"date\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"process.thread.id\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"process.thread.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"process.title\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"process.uptime\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"process.working_directory\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"related.ip\",\"scripted\":false,\"searchable\":true,\"type\":\"ip\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"server.address\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"server.as.number\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"server.as.organization.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"server.bytes\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"server.domain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"server.geo.city_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"server.geo.continent_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"server.geo.country_iso_code\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"server.geo.country_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"server.geo.location\",\"scripted\":false,\"searchable\":true,\"type\":\"geo_point\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"server.geo.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"server.geo.region_iso_code\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"server.geo.region_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"server.ip\",\"scripted\":false,\"searchable\":true,\"type\":\"ip\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"server.mac\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"server.nat.ip\",\"scripted\":false,\"searchable\":true,\"type\":\"ip\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"server.nat.port\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"server.packets\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"server.port\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"server.registered_domain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"server.top_level_domain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"server.user.domain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"server.user.email\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"server.user.full_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"server.user.group.domain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"server.user.group.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"server.user.group.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"server.user.hash\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"server.user.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"server.user.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"service.ephemeral_id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"service.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"service.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"service.node.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"service.state\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"service.type\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"service.version\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.address\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.as.number\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.as.organization.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.bytes\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.domain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.geo.city_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.geo.continent_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.geo.country_iso_code\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.geo.country_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.geo.location\",\"scripted\":false,\"searchable\":true,\"type\":\"geo_point\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.geo.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.geo.region_iso_code\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.geo.region_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.ip\",\"scripted\":false,\"searchable\":true,\"type\":\"ip\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.mac\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.nat.ip\",\"scripted\":false,\"searchable\":true,\"type\":\"ip\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.nat.port\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.packets\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.port\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.registered_domain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.top_level_domain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.user.domain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.user.email\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.user.full_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.user.group.domain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.user.group.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.user.group.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.user.hash\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.user.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"source.user.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"threat.framework\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"threat.tactic.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"threat.tactic.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"threat.tactic.reference\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"threat.technique.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"threat.technique.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"threat.technique.reference\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"tracing.trace.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"tracing.transaction.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"url.domain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"url.extension\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"url.fragment\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"url.full\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"url.original\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"url.password\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"url.path\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"url.port\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"url.query\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"url.registered_domain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"url.scheme\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"url.top_level_domain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"url.username\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user.domain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user.email\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user.full_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user.group.domain\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user.group.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user.group.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user.hash\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user_agent.device.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user_agent.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user_agent.original\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user_agent.os.family\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user_agent.os.full\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user_agent.os.kernel\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user_agent.os.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user_agent.os.platform\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user_agent.os.version\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user_agent.version\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"agent.hostname\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"fields\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"timeseries.instance\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"cloud.project.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"cloud.image.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"docker.container.labels\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.containerized\",\"scripted\":false,\"searchable\":true,\"type\":\"boolean\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.os.build\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.os.codename\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"kubernetes.pod.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"kubernetes.pod.uid\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"kubernetes.namespace\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"kubernetes.node.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"kubernetes.labels.*\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"kubernetes.annotations.*\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"kubernetes.replicaset.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"kubernetes.deployment.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"kubernetes.statefulset.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"kubernetes.container.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"kubernetes.container.image\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"processor.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"processor.event\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":1,\"doc_values\":true,\"indexed\":true,\"name\":\"timestamp.us\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":false,\"analyzed\":false,\"count\":0,\"doc_values\":false,\"enabled\":false,\"indexed\":false,\"name\":\"http.request.headers\",\"scripted\":false,\"searchable\":false},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"http.response.finished\",\"scripted\":false,\"searchable\":true,\"type\":\"boolean\"},{\"aggregatable\":false,\"analyzed\":false,\"count\":0,\"doc_values\":false,\"enabled\":false,\"indexed\":false,\"name\":\"http.response.headers\",\"scripted\":false,\"searchable\":false},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"service.environment\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"service.language.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"service.language.version\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"service.runtime.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"service.runtime.version\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"service.framework.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"service.framework.version\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"transaction.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"transaction.sampled\",\"scripted\":false,\"searchable\":true,\"type\":\"boolean\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"transaction.type\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"transaction.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":false,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"transaction.name.text\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"transaction.duration.count\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"transaction.duration.sum.us\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"transaction.self_time.count\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"transaction.self_time.sum.us\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"transaction.breakdown.count\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":1,\"doc_values\":true,\"indexed\":true,\"name\":\"span.type\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":1,\"doc_values\":true,\"indexed\":true,\"name\":\"span.subtype\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"span.self_time.count\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"span.self_time.sum.us\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"trace.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"parent.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"observer.listening\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"observer.version_major\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":false,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"user_agent.original.text\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"experimental\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":true,\"analyzed\":false,\"count\":2,\"doc_values\":true,\"indexed\":true,\"name\":\"error.culprit\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"error.grouping_key\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"error.exception.code\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":false,\"analyzed\":false,\"count\":2,\"doc_values\":true,\"indexed\":true,\"name\":\"error.exception.message\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"error.exception.module\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":4,\"doc_values\":true,\"indexed\":true,\"name\":\"error.exception.type\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":2,\"doc_values\":true,\"indexed\":true,\"name\":\"error.exception.handled\",\"scripted\":false,\"searchable\":true,\"type\":\"boolean\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"error.log.level\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"error.log.logger_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":false,\"analyzed\":false,\"count\":2,\"doc_values\":true,\"indexed\":true,\"name\":\"error.log.message\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"error.log.param_message\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"system.cpu.total.norm.pct\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"system.memory.total\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"system.memory.actual.free\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"system.process.cpu.total.norm.pct\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"system.process.memory.size\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"system.process.memory.rss.bytes\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":1,\"doc_values\":true,\"indexed\":true,\"name\":\"profile.cpu.ns\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":1,\"doc_values\":true,\"indexed\":true,\"name\":\"profile.samples.count\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":1,\"doc_values\":true,\"indexed\":true,\"name\":\"profile.alloc_objects.count\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":1,\"doc_values\":true,\"indexed\":true,\"name\":\"profile.alloc_space.bytes\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":1,\"doc_values\":true,\"indexed\":true,\"name\":\"profile.inuse_objects.count\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":1,\"doc_values\":true,\"indexed\":true,\"name\":\"profile.inuse_space.bytes\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":1,\"doc_values\":true,\"indexed\":true,\"name\":\"profile.duration\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"profile.top.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":1,\"doc_values\":true,\"indexed\":true,\"name\":\"profile.top.function\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":1,\"doc_values\":true,\"indexed\":true,\"name\":\"profile.top.filename\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":1,\"doc_values\":true,\"indexed\":true,\"name\":\"profile.top.line\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"profile.stack.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"profile.stack.function\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"profile.stack.filename\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"profile.stack.line\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"sourcemap.service.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"sourcemap.service.version\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"sourcemap.bundle_filepath\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"view spans\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"span.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":1,\"doc_values\":true,\"indexed\":true,\"name\":\"span.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":1,\"doc_values\":true,\"indexed\":true,\"name\":\"span.action\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":1,\"doc_values\":true,\"indexed\":true,\"name\":\"span.start.us\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":1,\"doc_values\":true,\"indexed\":true,\"name\":\"span.duration.us\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"span.sync\",\"scripted\":false,\"searchable\":true,\"type\":\"boolean\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"span.db.link\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"span.db.rows_affected\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"span.destination.service.type\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"span.destination.service.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"span.destination.service.resource\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"span.message.queue.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"span.message.age.ms\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"transaction.duration.us\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"transaction.result\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"transaction.marks\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"transaction.marks.*.*\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"transaction.span_count.dropped\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"transaction.message.queue.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"transaction.message.age.ms\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":false,\"analyzed\":false,\"count\":0,\"doc_values\":false,\"indexed\":false,\"name\":\"_id\",\"scripted\":false,\"searchable\":false,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":false,\"indexed\":false,\"name\":\"_type\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":false,\"analyzed\":false,\"count\":0,\"doc_values\":false,\"indexed\":false,\"name\":\"_index\",\"scripted\":false,\"searchable\":false,\"type\":\"string\"},{\"aggregatable\":false,\"analyzed\":false,\"count\":0,\"doc_values\":false,\"indexed\":false,\"name\":\"_score\",\"scripted\":false,\"searchable\":false,\"type\":\"number\"}]",
"sourceFilters": "[{\"value\":\"sourcemap.sourcemap\"}]",
"timeFieldName": "@timestamp"
},
diff --git a/src/legacy/core_plugins/kibana/server/tutorials/envoyproxy_metrics/index.js b/src/legacy/core_plugins/kibana/server/tutorials/envoyproxy_metrics/index.js
new file mode 100644
index 0000000000000..4e5301149b35b
--- /dev/null
+++ b/src/legacy/core_plugins/kibana/server/tutorials/envoyproxy_metrics/index.js
@@ -0,0 +1,60 @@
+/*
+ * Licensed to Elasticsearch B.V. under one or more contributor
+ * license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright
+ * ownership. Elasticsearch B.V. licenses this file to you under
+ * the Apache License, Version 2.0 (the "License"); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { i18n } from '@kbn/i18n';
+import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
+import {
+ onPremInstructions,
+ cloudInstructions,
+ onPremCloudInstructions,
+} from '../../../common/tutorials/metricbeat_instructions';
+
+export function envoyproxyMetricsSpecProvider(server, context) {
+ const moduleName = 'envoyproxy';
+ return {
+ id: 'envoyproxyMetrics',
+ name: i18n.translate('kbn.server.tutorials.envoyproxyMetrics.nameTitle', {
+ defaultMessage: 'Envoy Proxy metrics',
+ }),
+ category: TUTORIAL_CATEGORY.METRICS,
+ shortDescription: i18n.translate('kbn.server.tutorials.envoyproxyMetrics.shortDescription', {
+ defaultMessage: 'Fetch monitoring metrics from Envoy Proxy.',
+ }),
+ longDescription: i18n.translate('kbn.server.tutorials.envoyproxyMetrics.longDescription', {
+ defaultMessage:
+ 'The `envoyproxy` Metricbeat module fetches monitoring metrics from Envoy Proxy. \
+[Learn more]({learnMoreLink}).',
+ values: {
+ learnMoreLink: '{config.docs.beats.metricbeat}/metricbeat-module-envoyproxy.html',
+ },
+ }),
+ euiIconType: '/plugins/kibana/home/tutorial_resources/logos/envoyproxy.svg',
+ artifacts: {
+ dashboards: [],
+ exportedFields: {
+ documentationUrl: '{config.docs.beats.metricbeat}/exported-fields-envoyproxy.html',
+ },
+ },
+ completionTimeMinutes: 10,
+ // previewImagePath: '/plugins/kibana/home/tutorial_resources/envoyproxy_metrics/screenshot.png',
+ onPrem: onPremInstructions(moduleName, null, null, null, context),
+ elasticCloud: cloudInstructions(moduleName),
+ onPremElasticCloud: onPremCloudInstructions(moduleName),
+ };
+}
diff --git a/src/legacy/core_plugins/kibana/server/tutorials/register.js b/src/legacy/core_plugins/kibana/server/tutorials/register.js
index eb06c97629b17..ecc2d1df8c388 100644
--- a/src/legacy/core_plugins/kibana/server/tutorials/register.js
+++ b/src/legacy/core_plugins/kibana/server/tutorials/register.js
@@ -83,6 +83,7 @@ import { awsLogsSpecProvider } from './aws_logs';
import { activemqLogsSpecProvider } from './activemq_logs';
import { activemqMetricsSpecProvider } from './activemq_metrics';
import { azureMetricsSpecProvider } from './azure_metrics';
+import { envoyproxyMetricsSpecProvider } from './envoyproxy_metrics';
export function registerTutorials(server) {
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(systemLogsSpecProvider);
@@ -154,4 +155,5 @@ export function registerTutorials(server) {
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(activemqLogsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(activemqMetricsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(azureMetricsSpecProvider);
+ server.newPlatform.setup.plugins.home.tutorials.registerTutorial(envoyproxyMetricsSpecProvider);
}
diff --git a/src/legacy/core_plugins/tile_map/index.ts b/src/legacy/core_plugins/tile_map/index.ts
index 298675e75b0d7..27f019318a82b 100644
--- a/src/legacy/core_plugins/tile_map/index.ts
+++ b/src/legacy/core_plugins/tile_map/index.ts
@@ -30,7 +30,14 @@ const tileMapPluginInitializer: LegacyPluginInitializer = ({ Plugin }: LegacyPlu
uiExports: {
styleSheetPaths: resolve(__dirname, 'public/index.scss'),
hacks: [resolve(__dirname, 'public/legacy')],
- injectDefaultVars: server => ({}),
+ injectDefaultVars: server => {
+ const serverConfig = server.config();
+ const mapConfig: Record = serverConfig.get('map');
+
+ return {
+ emsTileLayerId: mapConfig.emsTileLayerId,
+ };
+ },
},
config(Joi: any) {
return Joi.object({
diff --git a/src/legacy/core_plugins/vis_type_timeseries/public/visualizations/views/timeseries/__mocks__/@elastic/charts.js b/src/legacy/core_plugins/vis_type_timeseries/public/visualizations/views/timeseries/__mocks__/@elastic/charts.js
index cb59bef63681b..d7f96cf4354b5 100644
--- a/src/legacy/core_plugins/vis_type_timeseries/public/visualizations/views/timeseries/__mocks__/@elastic/charts.js
+++ b/src/legacy/core_plugins/vis_type_timeseries/public/visualizations/views/timeseries/__mocks__/@elastic/charts.js
@@ -38,8 +38,5 @@ export const ScaleType = {
Time: 'time',
};
-export const getSpecId = x => `id:${x}`;
-export const getGroupId = x => `groupId:${x}`;
-
export const BarSeries = () => null;
export const AreaSeries = () => null;
diff --git a/src/legacy/core_plugins/vis_type_timeseries/public/visualizations/views/timeseries/decorators/__snapshots__/area_decorator.test.js.snap b/src/legacy/core_plugins/vis_type_timeseries/public/visualizations/views/timeseries/decorators/__snapshots__/area_decorator.test.js.snap
index 822de4cef0813..56504ca11ca39 100644
--- a/src/legacy/core_plugins/vis_type_timeseries/public/visualizations/views/timeseries/decorators/__snapshots__/area_decorator.test.js.snap
+++ b/src/legacy/core_plugins/vis_type_timeseries/public/visualizations/views/timeseries/decorators/__snapshots__/area_decorator.test.js.snap
@@ -24,12 +24,9 @@ exports[`src/legacy/core_plugins/metrics/public/visualizations/views/timeseries/
}
curve={9}
customSeriesColors={
- Map {
- Object {
- "colorValues": Array [],
- "specId": "id:61ca57f1-469d-11e7-af02-69e470af7417:Rome",
- } => "rgb(0, 156, 224)",
- }
+ Array [
+ "rgb(0, 156, 224)",
+ ]
}
data={
Array [
@@ -44,10 +41,10 @@ exports[`src/legacy/core_plugins/metrics/public/visualizations/views/timeseries/
]
}
enableHistogramMode={true}
- groupId="groupId:yaxis_main_group"
+ groupId="yaxis_main_group"
hideInLegend={false}
histogramModeAlignment="center"
- id="id:61ca57f1-469d-11e7-af02-69e470af7417:Rome"
+ id="61ca57f1-469d-11e7-af02-69e470af7417:Rome"
name="Rome"
stackAsPercentage={false}
timeZone="local"
diff --git a/src/legacy/core_plugins/vis_type_timeseries/public/visualizations/views/timeseries/decorators/__snapshots__/bar_decorator.test.js.snap b/src/legacy/core_plugins/vis_type_timeseries/public/visualizations/views/timeseries/decorators/__snapshots__/bar_decorator.test.js.snap
index 78133f2dda7cc..6317973cef536 100644
--- a/src/legacy/core_plugins/vis_type_timeseries/public/visualizations/views/timeseries/decorators/__snapshots__/bar_decorator.test.js.snap
+++ b/src/legacy/core_plugins/vis_type_timeseries/public/visualizations/views/timeseries/decorators/__snapshots__/bar_decorator.test.js.snap
@@ -16,12 +16,9 @@ exports[`src/legacy/core_plugins/metrics/public/visualizations/views/timeseries/
}
}
customSeriesColors={
- Map {
- Object {
- "colorValues": Array [],
- "specId": "id:61ca57f1-469d-11e7-af02-69e470af7417:Rome",
- } => "rgb(0, 156, 224)",
- }
+ Array [
+ "rgb(0, 156, 224)",
+ ]
}
data={
Array [
@@ -36,10 +33,10 @@ exports[`src/legacy/core_plugins/metrics/public/visualizations/views/timeseries/
]
}
enableHistogramMode={true}
- groupId="groupId:yaxis_main_group"
+ groupId="yaxis_main_group"
hideInLegend={false}
histogramModeAlignment="center"
- id="id:61ca57f1-469d-11e7-af02-69e470af7417:Rome"
+ id="61ca57f1-469d-11e7-af02-69e470af7417:Rome"
name="Rome"
stackAsPercentage={false}
timeZone="local"
diff --git a/src/legacy/core_plugins/vis_type_timeseries/public/visualizations/views/timeseries/decorators/area_decorator.js b/src/legacy/core_plugins/vis_type_timeseries/public/visualizations/views/timeseries/decorators/area_decorator.js
index 536064139e6ea..411c0813cad7c 100644
--- a/src/legacy/core_plugins/vis_type_timeseries/public/visualizations/views/timeseries/decorators/area_decorator.js
+++ b/src/legacy/core_plugins/vis_type_timeseries/public/visualizations/views/timeseries/decorators/area_decorator.js
@@ -18,8 +18,8 @@
*/
import React from 'react';
-import { getSpecId, getGroupId, ScaleType, AreaSeries } from '@elastic/charts';
-import { getSeriesColors, getAreaStyles } from '../utils/series_styles';
+import { ScaleType, AreaSeries } from '@elastic/charts';
+import { getAreaStyles } from '../utils/series_styles';
import { ChartsEntities } from '../model/charts';
import { X_ACCESSOR_INDEX, Y_ACCESSOR_INDEXES } from '../../../constants';
@@ -41,9 +41,9 @@ export function AreaSeriesDecorator({
useDefaultGroupDomain,
sortIndex,
}) {
- const id = getSpecId(seriesId);
- const groupId = getGroupId(seriesGroupId);
- const customSeriesColors = getSeriesColors(color, id);
+ const id = seriesId;
+ const groupId = seriesGroupId;
+ const customSeriesColors = [color];
const areaSeriesStyle = getAreaStyles({ points, lines, color });
const seriesSettings = {
diff --git a/src/legacy/core_plugins/vis_type_timeseries/public/visualizations/views/timeseries/decorators/bar_decorator.js b/src/legacy/core_plugins/vis_type_timeseries/public/visualizations/views/timeseries/decorators/bar_decorator.js
index 3dbe04dca06b8..9cc8931b48d9f 100644
--- a/src/legacy/core_plugins/vis_type_timeseries/public/visualizations/views/timeseries/decorators/bar_decorator.js
+++ b/src/legacy/core_plugins/vis_type_timeseries/public/visualizations/views/timeseries/decorators/bar_decorator.js
@@ -18,8 +18,8 @@
*/
import React from 'react';
-import { getSpecId, getGroupId, ScaleType, BarSeries } from '@elastic/charts';
-import { getSeriesColors, getBarStyles } from '../utils/series_styles';
+import { ScaleType, BarSeries } from '@elastic/charts';
+import { getBarStyles } from '../utils/series_styles';
import { ChartsEntities } from '../model/charts';
import { X_ACCESSOR_INDEX, Y_ACCESSOR_INDEXES } from '../../../constants';
@@ -40,9 +40,9 @@ export function BarSeriesDecorator({
useDefaultGroupDomain,
sortIndex,
}) {
- const id = getSpecId(seriesId);
- const groupId = getGroupId(seriesGroupId);
- const customSeriesColors = getSeriesColors(color, id);
+ const id = seriesId;
+ const groupId = seriesGroupId;
+ const customSeriesColors = [color];
const barSeriesStyle = getBarStyles(bars, color);
const seriesSettings = {
diff --git a/src/legacy/core_plugins/vis_type_timeseries/public/visualizations/views/timeseries/index.js b/src/legacy/core_plugins/vis_type_timeseries/public/visualizations/views/timeseries/index.js
index a02ea83e5104b..bcd0b6314cef1 100644
--- a/src/legacy/core_plugins/vis_type_timeseries/public/visualizations/views/timeseries/index.js
+++ b/src/legacy/core_plugins/vis_type_timeseries/public/visualizations/views/timeseries/index.js
@@ -25,11 +25,8 @@ import {
Chart,
Position,
Settings,
- getAxisId,
- getGroupId,
DARK_THEME,
LIGHT_THEME,
- getAnnotationId,
AnnotationDomainTypes,
LineAnnotation,
TooltipType,
@@ -75,7 +72,7 @@ export const TimeSeries = ({
const chartRef = useRef();
const updateCursor = (_, cursor) => {
if (chartRef.current) {
- chartRef.current.dispatchExternalCursorEvent(cursor);
+ chartRef.current.dispatchExternalPointerEvent(cursor);
}
};
@@ -99,7 +96,7 @@ export const TimeSeries = ({
legendPosition={legendPosition}
onBrushEnd={onBrush}
animateData={false}
- onCursorUpdate={handleCursorUpdate}
+ onPointerUpdate={handleCursorUpdate}
theme={
hasBarChart
? {}
@@ -126,7 +123,7 @@ export const TimeSeries = ({
return (
}
@@ -213,8 +210,8 @@ export const TimeSeries = ({
{yAxis.map(({ id, groupId, position, tickFormatter, domain, hide }) => (
"rgb(224, 0, 221)",
-}
-`;
diff --git a/src/legacy/core_plugins/vis_type_timeseries/public/visualizations/views/timeseries/utils/series_styles.js b/src/legacy/core_plugins/vis_type_timeseries/public/visualizations/views/timeseries/utils/series_styles.js
index 63be14790c6c5..2891751f121ca 100644
--- a/src/legacy/core_plugins/vis_type_timeseries/public/visualizations/views/timeseries/utils/series_styles.js
+++ b/src/legacy/core_plugins/vis_type_timeseries/public/visualizations/views/timeseries/utils/series_styles.js
@@ -56,12 +56,3 @@ export const getBarStyles = ({ show = true, lineWidth = 0, fill = 1 }, color) =>
},
},
});
-
-export const getSeriesColors = (color, specId) => {
- const map = new Map();
- const seriesColorsValues = { specId, colorValues: [] };
-
- map.set(seriesColorsValues, color);
-
- return map;
-};
diff --git a/src/legacy/core_plugins/vis_type_timeseries/public/visualizations/views/timeseries/utils/series_styles.test.js b/src/legacy/core_plugins/vis_type_timeseries/public/visualizations/views/timeseries/utils/series_styles.test.js
index ac0a7610f2660..c04ec457d1523 100644
--- a/src/legacy/core_plugins/vis_type_timeseries/public/visualizations/views/timeseries/utils/series_styles.test.js
+++ b/src/legacy/core_plugins/vis_type_timeseries/public/visualizations/views/timeseries/utils/series_styles.test.js
@@ -17,12 +17,11 @@
* under the License.
*/
-import { getBarStyles, getSeriesColors, getAreaStyles } from './series_styles';
+import { getBarStyles, getAreaStyles } from './series_styles';
describe('src/legacy/core_plugins/metrics/public/visualizations/views/timeseries/utils/series_styles.js', () => {
let bars;
let color;
- let specId;
let points;
let lines;
@@ -33,7 +32,6 @@ describe('src/legacy/core_plugins/metrics/public/visualizations/views/timeseries
show: true,
};
color = 'rgb(224, 0, 221)';
- specId = 'IT';
points = {
lineWidth: 1,
show: true,
@@ -60,12 +58,6 @@ describe('src/legacy/core_plugins/metrics/public/visualizations/views/timeseries
});
});
- describe('getSeriesColors()', () => {
- test('should match a snapshot', () => {
- expect(getSeriesColors(color, specId)).toMatchSnapshot();
- });
- });
-
describe('getAreaStyles()', () => {
test('should match a snapshot', () => {
expect(getAreaStyles({ points, lines, color })).toMatchSnapshot();
diff --git a/src/legacy/core_plugins/vis_type_vega/index.ts b/src/legacy/core_plugins/vis_type_vega/index.ts
index 153cd6afb3ccc..52c253c6ac0b5 100644
--- a/src/legacy/core_plugins/vis_type_vega/index.ts
+++ b/src/legacy/core_plugins/vis_type_vega/index.ts
@@ -33,9 +33,15 @@ const vegaPluginInitializer: LegacyPluginInitializer = ({ Plugin }: LegacyPlugin
uiExports: {
styleSheetPaths: resolve(__dirname, 'public/index.scss'),
hacks: [resolve(__dirname, 'public/legacy')],
- injectDefaultVars: server => ({
- enableExternalUrls: server.config().get('vega.enableExternalUrls'),
- }),
+ injectDefaultVars: server => {
+ const serverConfig = server.config();
+ const mapConfig: Record = serverConfig.get('map');
+
+ return {
+ emsTileLayerId: mapConfig.emsTileLayerId,
+ enableExternalUrls: serverConfig.get('vega.enableExternalUrls'),
+ };
+ },
},
init: (server: Legacy.Server) => ({}),
config(Joi: any) {
diff --git a/src/legacy/server/config/schema.js b/src/legacy/server/config/schema.js
index f886fd598f5c9..a18cb7de5a61b 100644
--- a/src/legacy/server/config/schema.js
+++ b/src/legacy/server/config/schema.js
@@ -70,20 +70,6 @@ export default () =>
server: Joi.object({
name: Joi.string().default(os.hostname()),
- defaultRoute: Joi.string().regex(/^\//, `start with a slash`),
- customResponseHeaders: Joi.object()
- .unknown(true)
- .default({}),
- xsrf: Joi.object({
- disableProtection: Joi.boolean().default(false),
- whitelist: Joi.array()
- .items(Joi.string().regex(/^\//, 'start with a slash'))
- .default([]),
- token: Joi.string()
- .optional()
- .notes('Deprecated'),
- }).default(),
-
// keep them for BWC, remove when not used in Legacy.
// validation should be in sync with one in New platform.
// https://github.com/elastic/kibana/blob/master/src/core/server/http/http_config.ts
@@ -103,12 +89,14 @@ export default () =>
autoListen: HANDLED_IN_NEW_PLATFORM,
cors: HANDLED_IN_NEW_PLATFORM,
+ customResponseHeaders: HANDLED_IN_NEW_PLATFORM,
keepaliveTimeout: HANDLED_IN_NEW_PLATFORM,
maxPayloadBytes: HANDLED_IN_NEW_PLATFORM,
socketTimeout: HANDLED_IN_NEW_PLATFORM,
ssl: HANDLED_IN_NEW_PLATFORM,
compression: HANDLED_IN_NEW_PLATFORM,
uuid: HANDLED_IN_NEW_PLATFORM,
+ xsrf: HANDLED_IN_NEW_PLATFORM,
}).default(),
uiSettings: HANDLED_IN_NEW_PLATFORM,
diff --git a/src/legacy/server/config/schema.test.js b/src/legacy/server/config/schema.test.js
index 1207a05a47497..03d2fe53c2ce7 100644
--- a/src/legacy/server/config/schema.test.js
+++ b/src/legacy/server/config/schema.test.js
@@ -19,7 +19,6 @@
import schemaProvider from './schema';
import Joi from 'joi';
-import { set } from 'lodash';
describe('Config schema', function() {
let schema;
@@ -100,60 +99,5 @@ describe('Config schema', function() {
expect(error.details[0]).toHaveProperty('path', ['server', 'rewriteBasePath']);
});
});
-
- describe('xsrf', () => {
- it('disableProtection is `false` by default.', () => {
- const {
- error,
- value: {
- server: {
- xsrf: { disableProtection },
- },
- },
- } = validate({});
- expect(error).toBe(null);
- expect(disableProtection).toBe(false);
- });
-
- it('whitelist is empty by default.', () => {
- const {
- value: {
- server: {
- xsrf: { whitelist },
- },
- },
- } = validate({});
- expect(whitelist).toBeInstanceOf(Array);
- expect(whitelist).toHaveLength(0);
- });
-
- it('whitelist rejects paths that do not start with a slash.', () => {
- const config = {};
- set(config, 'server.xsrf.whitelist', ['path/to']);
-
- const { error } = validate(config);
- expect(error).toBeInstanceOf(Object);
- expect(error).toHaveProperty('details');
- expect(error.details[0]).toHaveProperty('path', ['server', 'xsrf', 'whitelist', 0]);
- });
-
- it('whitelist accepts paths that start with a slash.', () => {
- const config = {};
- set(config, 'server.xsrf.whitelist', ['/path/to']);
-
- const {
- error,
- value: {
- server: {
- xsrf: { whitelist },
- },
- },
- } = validate(config);
- expect(error).toBe(null);
- expect(whitelist).toBeInstanceOf(Array);
- expect(whitelist).toHaveLength(1);
- expect(whitelist).toContain('/path/to');
- });
- });
});
});
diff --git a/src/legacy/server/http/index.js b/src/legacy/server/http/index.js
index 9b5ce2046c5d3..265d71e95b301 100644
--- a/src/legacy/server/http/index.js
+++ b/src/legacy/server/http/index.js
@@ -22,11 +22,9 @@ import { resolve } from 'path';
import _ from 'lodash';
import Boom from 'boom';
-import { setupVersionCheck } from './version_check';
import { registerHapiPlugins } from './register_hapi_plugins';
import { setupBasePathProvider } from './setup_base_path_provider';
import { setupDefaultRouteProvider } from './setup_default_route_provider';
-import { setupXsrf } from './xsrf';
export default async function(kbnServer, server, config) {
server = kbnServer.server;
@@ -62,29 +60,6 @@ export default async function(kbnServer, server, config) {
});
});
- // attach the app name to the server, so we can be sure we are actually talking to kibana
- server.ext('onPreResponse', function onPreResponse(req, h) {
- const response = req.response;
-
- const customHeaders = {
- ...config.get('server.customResponseHeaders'),
- 'kbn-name': kbnServer.name,
- };
-
- if (response.isBoom) {
- response.output.headers = {
- ...response.output.headers,
- ...customHeaders,
- };
- } else {
- Object.keys(customHeaders).forEach(name => {
- response.header(name, customHeaders[name]);
- });
- }
-
- return h.continue;
- });
-
server.route({
path: '/',
method: 'GET',
@@ -116,7 +91,4 @@ export default async function(kbnServer, server, config) {
// Expose static assets
server.exposeStaticDir('/ui/{path*}', resolve(__dirname, '../../ui/public/assets'));
-
- setupVersionCheck(server, config);
- setupXsrf(server, config);
}
diff --git a/src/legacy/server/http/integration_tests/version_check.test.js b/src/legacy/server/http/integration_tests/version_check.test.js
deleted file mode 100644
index 8d71c98d64969..0000000000000
--- a/src/legacy/server/http/integration_tests/version_check.test.js
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import { resolve } from 'path';
-import * as kbnTestServer from '../../../../test_utils/kbn_server';
-
-const src = resolve.bind(null, __dirname, '../../../../../src');
-
-const versionHeader = 'kbn-version';
-const version = require(src('../package.json')).version; // eslint-disable-line import/no-dynamic-require
-
-describe('version_check request filter', function() {
- let root;
- beforeAll(async () => {
- root = kbnTestServer.createRoot();
-
- await root.setup();
- await root.start();
-
- kbnTestServer.getKbnServer(root).server.route({
- path: '/version_check/test/route',
- method: 'GET',
- handler: function() {
- return 'ok';
- },
- });
- }, 30000);
-
- afterAll(async () => await root.shutdown());
-
- it('accepts requests with the correct version passed in the version header', async function() {
- await kbnTestServer.request
- .get(root, '/version_check/test/route')
- .set(versionHeader, version)
- .expect(200, 'ok');
- });
-
- it('rejects requests with an incorrect version passed in the version header', async function() {
- await kbnTestServer.request
- .get(root, '/version_check/test/route')
- .set(versionHeader, `invalid:${version}`)
- .expect(400, /"Browser client is out of date/);
- });
-
- it('accepts requests that do not include a version header', async function() {
- await kbnTestServer.request.get(root, '/version_check/test/route').expect(200, 'ok');
- });
-});
diff --git a/src/legacy/server/http/integration_tests/xsrf.test.js b/src/legacy/server/http/integration_tests/xsrf.test.js
deleted file mode 100644
index a06f4eec4fd5c..0000000000000
--- a/src/legacy/server/http/integration_tests/xsrf.test.js
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import { resolve } from 'path';
-import * as kbnTestServer from '../../../../test_utils/kbn_server';
-
-const destructiveMethods = ['POST', 'PUT', 'DELETE'];
-const src = resolve.bind(null, __dirname, '../../../../../src');
-
-const xsrfHeader = 'kbn-xsrf';
-const versionHeader = 'kbn-version';
-const testPath = '/xsrf/test/route';
-const whitelistedTestPath = '/xsrf/test/route/whitelisted';
-const actualVersion = require(src('../package.json')).version; // eslint-disable-line import/no-dynamic-require
-
-describe('xsrf request filter', () => {
- let root;
- beforeAll(async () => {
- root = kbnTestServer.createRoot({
- server: {
- xsrf: { disableProtection: false, whitelist: [whitelistedTestPath] },
- },
- });
-
- await root.setup();
- await root.start();
-
- const kbnServer = kbnTestServer.getKbnServer(root);
- kbnServer.server.route({
- path: testPath,
- method: 'GET',
- handler: async function() {
- return 'ok';
- },
- });
-
- kbnServer.server.route({
- path: testPath,
- method: destructiveMethods,
- config: {
- // Disable payload parsing to make HapiJS server accept any content-type header.
- payload: {
- parse: false,
- },
- validate: { payload: null },
- },
- handler: async function() {
- return 'ok';
- },
- });
-
- kbnServer.server.route({
- path: whitelistedTestPath,
- method: destructiveMethods,
- config: {
- // Disable payload parsing to make HapiJS server accept any content-type header.
- payload: {
- parse: false,
- },
- validate: { payload: null },
- },
- handler: async function() {
- return 'ok';
- },
- });
- }, 30000);
-
- afterAll(async () => await root.shutdown());
-
- describe(`nonDestructiveMethod: GET`, function() {
- it('accepts requests without a token', async function() {
- await kbnTestServer.request.get(root, testPath).expect(200, 'ok');
- });
-
- it('accepts requests with the xsrf header', async function() {
- await kbnTestServer.request
- .get(root, testPath)
- .set(xsrfHeader, 'anything')
- .expect(200, 'ok');
- });
- });
-
- describe(`nonDestructiveMethod: HEAD`, function() {
- it('accepts requests without a token', async function() {
- await kbnTestServer.request.head(root, testPath).expect(200, undefined);
- });
-
- it('accepts requests with the xsrf header', async function() {
- await kbnTestServer.request
- .head(root, testPath)
- .set(xsrfHeader, 'anything')
- .expect(200, undefined);
- });
- });
-
- for (const method of destructiveMethods) {
- // eslint-disable-next-line no-loop-func
- describe(`destructiveMethod: ${method}`, function() {
- it('accepts requests with the xsrf header', async function() {
- await kbnTestServer.request[method.toLowerCase()](root, testPath)
- .set(xsrfHeader, 'anything')
- .expect(200, 'ok');
- });
-
- // this is still valid for existing csrf protection support
- // it does not actually do any validation on the version value itself
- it('accepts requests with the version header', async function() {
- await kbnTestServer.request[method.toLowerCase()](root, testPath)
- .set(versionHeader, actualVersion)
- .expect(200, 'ok');
- });
-
- it('rejects requests without either an xsrf or version header', async function() {
- await kbnTestServer.request[method.toLowerCase()](root, testPath).expect(400, {
- statusCode: 400,
- error: 'Bad Request',
- message: 'Request must contain a kbn-xsrf header.',
- });
- });
-
- it('accepts whitelisted requests without either an xsrf or version header', async function() {
- await kbnTestServer.request[method.toLowerCase()](root, whitelistedTestPath).expect(
- 200,
- 'ok'
- );
- });
- });
- }
-});
diff --git a/src/legacy/server/http/setup_default_route_provider.ts b/src/legacy/server/http/setup_default_route_provider.ts
index 0e7bcf1f56f6f..9a580dd1c59bd 100644
--- a/src/legacy/server/http/setup_default_route_provider.ts
+++ b/src/legacy/server/http/setup_default_route_provider.ts
@@ -29,7 +29,7 @@ export function setupDefaultRouteProvider(server: Legacy.Server) {
const uiSettings = request.getUiSettingsService();
- const defaultRoute = await uiSettings.get('defaultRoute');
+ const defaultRoute = await uiSettings.get('defaultRoute');
const qualifiedDefaultRoute = `${request.getBasePath()}${defaultRoute}`;
if (isRelativePath(qualifiedDefaultRoute, serverBasePath)) {
diff --git a/src/legacy/server/http/xsrf.js b/src/legacy/server/http/xsrf.js
deleted file mode 100644
index 79ac3af6d9f90..0000000000000
--- a/src/legacy/server/http/xsrf.js
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import { badRequest } from 'boom';
-
-export function setupXsrf(server, config) {
- const disabled = config.get('server.xsrf.disableProtection');
- const whitelist = config.get('server.xsrf.whitelist');
- const versionHeader = 'kbn-version';
- const xsrfHeader = 'kbn-xsrf';
-
- server.ext('onPostAuth', function onPostAuthXsrf(req, h) {
- if (disabled) {
- return h.continue;
- }
-
- if (whitelist.includes(req.path)) {
- return h.continue;
- }
-
- const isSafeMethod = req.method === 'get' || req.method === 'head';
- const hasVersionHeader = versionHeader in req.headers;
- const hasXsrfHeader = xsrfHeader in req.headers;
-
- if (!isSafeMethod && !hasVersionHeader && !hasXsrfHeader) {
- throw badRequest(`Request must contain a ${xsrfHeader} header.`);
- }
-
- return h.continue;
- });
-}
diff --git a/src/legacy/ui/public/agg_types/agg_configs.ts b/src/legacy/ui/public/agg_types/agg_configs.ts
index ece9c90d09b68..6e811afb1849d 100644
--- a/src/legacy/ui/public/agg_types/agg_configs.ts
+++ b/src/legacy/ui/public/agg_types/agg_configs.ts
@@ -31,7 +31,7 @@ import { TimeRange } from 'src/plugins/data/public';
import { Schema } from '../vis/editors/default/schemas';
import { AggConfig, AggConfigOptions } from './agg_config';
import { AggGroupNames } from '../vis/editors/default/agg_groups';
-import { IndexPattern } from '../../../core_plugins/data/public';
+import { IndexPattern } from '../../../../plugins/data/public';
import { ISearchSource, FetchOptions } from '../courier/types';
type Schemas = Record;
diff --git a/src/legacy/ui/public/agg_types/filter/agg_type_filters.test.ts b/src/legacy/ui/public/agg_types/filter/agg_type_filters.test.ts
index f470ebbc90b48..517cee23e6be1 100644
--- a/src/legacy/ui/public/agg_types/filter/agg_type_filters.test.ts
+++ b/src/legacy/ui/public/agg_types/filter/agg_type_filters.test.ts
@@ -17,7 +17,7 @@
* under the License.
*/
-import { IndexPattern } from 'ui/index_patterns';
+import { IndexPattern } from '../../../../../plugins/data/public';
import { AggTypeFilters } from './agg_type_filters';
import { AggType } from '..';
import { AggConfig } from '../../vis';
diff --git a/src/legacy/ui/public/agg_types/filter/agg_type_filters.ts b/src/legacy/ui/public/agg_types/filter/agg_type_filters.ts
index 4d99575e4ae38..2388d458d4abb 100644
--- a/src/legacy/ui/public/agg_types/filter/agg_type_filters.ts
+++ b/src/legacy/ui/public/agg_types/filter/agg_type_filters.ts
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-import { IndexPattern } from '../../index_patterns';
+import { IndexPattern } from '../../../../../plugins/data/public';
import { AggConfig } from '../../vis';
import { AggType } from '..';
diff --git a/src/legacy/ui/public/agg_types/param_types/field.ts b/src/legacy/ui/public/agg_types/param_types/field.ts
index 4fda86bd1379f..0ca60267becec 100644
--- a/src/legacy/ui/public/agg_types/param_types/field.ts
+++ b/src/legacy/ui/public/agg_types/param_types/field.ts
@@ -25,7 +25,7 @@ import { FieldParamEditor } from '../../vis/editors/default/controls/field';
import { BaseParamType } from './base';
import { toastNotifications } from '../../notify';
import { propFilter } from '../filter';
-import { Field, IFieldList } from '../../index_patterns';
+import { Field, IFieldList } from '../../../../../plugins/data/public';
const filterByType = propFilter('type');
diff --git a/src/legacy/ui/public/agg_types/param_types/filter/field_filters.test.ts b/src/legacy/ui/public/agg_types/param_types/filter/field_filters.test.ts
index e8d53754f6682..978b7edaa83ff 100644
--- a/src/legacy/ui/public/agg_types/param_types/filter/field_filters.test.ts
+++ b/src/legacy/ui/public/agg_types/param_types/filter/field_filters.test.ts
@@ -17,10 +17,10 @@
* under the License.
*/
-import { Field } from 'ui/index_patterns';
import { IndexedArray } from 'ui/indexed_array';
import { AggTypeFieldFilters } from './field_filters';
import { AggConfig } from 'ui/vis';
+import { Field } from '../../../../../../plugins/data/public';
describe('AggTypeFieldFilters', () => {
let registry: AggTypeFieldFilters;
diff --git a/src/legacy/ui/public/agg_types/param_types/filter/field_filters.ts b/src/legacy/ui/public/agg_types/param_types/filter/field_filters.ts
index b3dbcf05681db..e5cb5226435ff 100644
--- a/src/legacy/ui/public/agg_types/param_types/filter/field_filters.ts
+++ b/src/legacy/ui/public/agg_types/param_types/filter/field_filters.ts
@@ -16,8 +16,8 @@
* specific language governing permissions and limitations
* under the License.
*/
-import { Field } from 'ui/index_patterns';
import { AggConfig } from '../../../vis';
+import { Field } from '../../../../../../plugins/data/public';
type AggTypeFieldFilter = (field: Field, aggConfig: AggConfig) => boolean;
diff --git a/src/legacy/ui/public/index_patterns/__mocks__/index.ts b/src/legacy/ui/public/index_patterns/__mocks__/index.ts
deleted file mode 100644
index 0cb1cf897b166..0000000000000
--- a/src/legacy/ui/public/index_patterns/__mocks__/index.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import { indexPatterns as npIndexPatterns } from '../../../../../plugins/data/public';
-
-export const flattenHitWrapper = npIndexPatterns.flattenHitWrapper;
-
-// static code
-export { getFromSavedObject, getRoutes } from '../../../../core_plugins/data/public';
diff --git a/src/legacy/ui/public/index_patterns/index.ts b/src/legacy/ui/public/index_patterns/index.ts
deleted file mode 100644
index 47f6e697c54e9..0000000000000
--- a/src/legacy/ui/public/index_patterns/index.ts
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-/**
- * Nothing to see here!
- *
- * Index Patterns have moved to the data plugin, and are being re-exported
- * from ui/index_patterns for backwards compatibility.
- */
-
-import { indexPatterns } from '../../../../plugins/data/public';
-
-// static code
-export const INDEX_PATTERN_ILLEGAL_CHARACTERS = indexPatterns.ILLEGAL_CHARACTERS;
-export const INDEX_PATTERN_ILLEGAL_CHARACTERS_VISIBLE = indexPatterns.ILLEGAL_CHARACTERS_VISIBLE;
-export const ILLEGAL_CHARACTERS = indexPatterns.ILLEGAL_CHARACTERS_KEY;
-export const CONTAINS_SPACES = indexPatterns.CONTAINS_SPACES_KEY;
-export const validateIndexPattern = indexPatterns.validate;
-export const flattenHitWrapper = indexPatterns.flattenHitWrapper;
-export const getFromSavedObject = indexPatterns.getFromSavedObject;
-export const getRoutes = indexPatterns.getRoutes;
-
-// types
-export { Field, FieldType, IFieldList, IndexPattern } from '../../../core_plugins/data/public';
diff --git a/src/legacy/ui/public/indices/constants/index.js b/src/legacy/ui/public/indices/constants/index.js
index 87d36d1c6d14a..72ecc2e4c87de 100644
--- a/src/legacy/ui/public/indices/constants/index.js
+++ b/src/legacy/ui/public/indices/constants/index.js
@@ -17,11 +17,11 @@
* under the License.
*/
-import { INDEX_PATTERN_ILLEGAL_CHARACTERS_VISIBLE } from '../../index_patterns';
+import { indexPatterns } from '../../../../../plugins/data/public';
-export const INDEX_ILLEGAL_CHARACTERS_VISIBLE = [...INDEX_PATTERN_ILLEGAL_CHARACTERS_VISIBLE, '*'];
+export const INDEX_ILLEGAL_CHARACTERS_VISIBLE = [...indexPatterns.ILLEGAL_CHARACTERS_VISIBLE, '*'];
// Insert the comma into the middle, so it doesn't look as if it has grammatical meaning when
// these characters are rendered in the UI.
-const insertionIndex = Math.floor(INDEX_PATTERN_ILLEGAL_CHARACTERS_VISIBLE.length / 2);
+const insertionIndex = Math.floor(indexPatterns.ILLEGAL_CHARACTERS_VISIBLE.length / 2);
INDEX_ILLEGAL_CHARACTERS_VISIBLE.splice(insertionIndex, 0, ',');
diff --git a/src/legacy/ui/public/new_platform/new_platform.karma_mock.js b/src/legacy/ui/public/new_platform/new_platform.karma_mock.js
index 3d4292cef27f4..06424ea48a40f 100644
--- a/src/legacy/ui/public/new_platform/new_platform.karma_mock.js
+++ b/src/legacy/ui/public/new_platform/new_platform.karma_mock.js
@@ -148,6 +148,8 @@ export const npStart = {
legacy: {
getSection: () => ({
register: sinon.fake(),
+ deregister: sinon.fake(),
+ hasItem: sinon.fake(),
}),
},
},
diff --git a/src/legacy/ui/public/registry/doc_views.ts b/src/legacy/ui/public/registry/doc_views.ts
deleted file mode 100644
index bf1e8416ae66d..0000000000000
--- a/src/legacy/ui/public/registry/doc_views.ts
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-import { convertDirectiveToRenderFn } from './doc_views_helpers';
-import { DocView, DocViewInput, ElasticSearchHit, DocViewInputFn } from './doc_views_types';
-
-export { DocViewRenderProps, DocView, DocViewRenderFn } from './doc_views_types';
-
-export interface DocViewsRegistry {
- docViews: DocView[];
- addDocView: (docView: DocViewInput) => void;
- getDocViewsSorted: (hit: ElasticSearchHit) => DocView[];
-}
-
-export const docViews: DocView[] = [];
-
-/**
- * Extends and adds the given doc view to the registry array
- */
-export function addDocView(docView: DocViewInput) {
- if (docView.directive) {
- // convert angular directive to render function for backwards compatibility
- docView.render = convertDirectiveToRenderFn(docView.directive);
- }
- if (typeof docView.shouldShow !== 'function') {
- docView.shouldShow = () => true;
- }
- docViews.push(docView as DocView);
-}
-
-/**
- * Empty array of doc views for testing
- */
-export function emptyDocViews() {
- docViews.length = 0;
-}
-
-/**
- * Returns a sorted array of doc_views for rendering tabs
- */
-export function getDocViewsSorted(hit: ElasticSearchHit): DocView[] {
- return docViews
- .filter(docView => docView.shouldShow(hit))
- .sort((a, b) => (Number(a.order) > Number(b.order) ? 1 : -1));
-}
-/**
- * Provider for compatibility with 3rd Party plugins
- */
-export const DocViewsRegistryProvider = {
- register: (docViewRaw: DocViewInput | DocViewInputFn) => {
- const docView = typeof docViewRaw === 'function' ? docViewRaw() : docViewRaw;
- addDocView(docView);
- },
-};
diff --git a/src/legacy/ui/public/saved_objects/helpers/apply_es_resp.ts b/src/legacy/ui/public/saved_objects/helpers/apply_es_resp.ts
index bec0a1d96ba92..ee49b7495f2af 100644
--- a/src/legacy/ui/public/saved_objects/helpers/apply_es_resp.ts
+++ b/src/legacy/ui/public/saved_objects/helpers/apply_es_resp.ts
@@ -20,7 +20,7 @@ import _ from 'lodash';
import { EsResponse, SavedObject, SavedObjectConfig } from 'ui/saved_objects/types';
import { parseSearchSource } from 'ui/saved_objects/helpers/parse_search_source';
import { expandShorthand, SavedObjectNotFound } from '../../../../../plugins/kibana_utils/public';
-import { IndexPattern } from '../../../../core_plugins/data/public';
+import { IndexPattern } from '../../../../../plugins/data/public';
/**
* A given response of and ElasticSearch containing a plain saved object is applied to the given
diff --git a/src/legacy/ui/public/vis/editors/config/editor_config_providers.ts b/src/legacy/ui/public/vis/editors/config/editor_config_providers.ts
index 3dd911efc324c..31fc0d90be101 100644
--- a/src/legacy/ui/public/vis/editors/config/editor_config_providers.ts
+++ b/src/legacy/ui/public/vis/editors/config/editor_config_providers.ts
@@ -20,7 +20,7 @@
import { TimeIntervalParam } from 'ui/vis/editors/config/types';
import { AggConfig } from '../..';
import { AggType } from '../../../agg_types';
-import { IndexPattern } from '../../../index_patterns';
+import { IndexPattern } from '../../../../../../plugins/data/public';
import { leastCommonMultiple } from '../../../utils/math';
import { parseEsInterval } from '../../../../../core_plugins/data/public';
import { leastCommonInterval } from '../../lib/least_common_interval';
diff --git a/src/legacy/ui/public/vis/editors/default/components/agg.test.tsx b/src/legacy/ui/public/vis/editors/default/components/agg.test.tsx
index 661ece5944fa3..c19f101fa2c32 100644
--- a/src/legacy/ui/public/vis/editors/default/components/agg.test.tsx
+++ b/src/legacy/ui/public/vis/editors/default/components/agg.test.tsx
@@ -24,8 +24,8 @@ import { AggGroupNames } from '../agg_groups';
import { DefaultEditorAgg, DefaultEditorAggProps } from './agg';
import { act } from 'react-dom/test-utils';
import { DefaultEditorAggParams } from './agg_params';
-import { IndexPattern } from 'ui/index_patterns';
import { AggType } from 'ui/agg_types';
+import { IndexPattern } from '../../../../../../../plugins/data/public';
jest.mock('./agg_params', () => ({
DefaultEditorAggParams: () => null,
diff --git a/src/legacy/ui/public/vis/editors/default/components/agg_param_props.ts b/src/legacy/ui/public/vis/editors/default/components/agg_param_props.ts
index aafba008f97c5..df77ea9e43eab 100644
--- a/src/legacy/ui/public/vis/editors/default/components/agg_param_props.ts
+++ b/src/legacy/ui/public/vis/editors/default/components/agg_param_props.ts
@@ -17,13 +17,13 @@
* under the License.
*/
-import { Field } from 'ui/index_patterns';
import { AggParam } from 'ui/agg_types';
import { AggConfig } from '../../../../agg_types/agg_config';
import { ComboBoxGroupedOptions } from '../utils';
import { EditorConfig } from '../../config/types';
import { VisState } from '../../..';
import { SubAggParamsProp } from './agg_params';
+import { Field } from '../../../../../../../plugins/data/public';
// NOTE: we cannot export the interface with export { InterfaceName }
// as there is currently a bug on babel typescript transform plugin for it
diff --git a/src/legacy/ui/public/vis/editors/default/components/agg_params.test.tsx b/src/legacy/ui/public/vis/editors/default/components/agg_params.test.tsx
index 25e2db8ef1836..9f3f5bff3f56e 100644
--- a/src/legacy/ui/public/vis/editors/default/components/agg_params.test.tsx
+++ b/src/legacy/ui/public/vis/editors/default/components/agg_params.test.tsx
@@ -19,9 +19,9 @@
import React from 'react';
import { mount, shallow } from 'enzyme';
-import { IndexPattern } from 'ui/index_patterns';
import { AggConfig, VisState } from '../../..';
import { DefaultEditorAggParams, DefaultEditorAggParamsProps } from './agg_params';
+import { IndexPattern } from '../../../../../../../plugins/data/public';
const mockEditorConfig = {
useNormalizedEsInterval: { hidden: false, fixedValue: false },
diff --git a/src/legacy/ui/public/vis/editors/default/components/agg_params.tsx b/src/legacy/ui/public/vis/editors/default/components/agg_params.tsx
index 4f4c0bda6520a..c62e2837908c7 100644
--- a/src/legacy/ui/public/vis/editors/default/components/agg_params.tsx
+++ b/src/legacy/ui/public/vis/editors/default/components/agg_params.tsx
@@ -20,10 +20,11 @@
import React, { useReducer, useEffect, useMemo } from 'react';
import { EuiForm, EuiAccordion, EuiSpacer, EuiFormRow } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
+import useUnmount from 'react-use/lib/useUnmount';
import { VisState } from 'ui/vis';
import { aggTypes, AggType, AggParam, AggConfig } from 'ui/agg_types/';
-import { IndexPattern } from 'ui/index_patterns';
+import { IndexPattern } from '../../../../../../../plugins/data/public';
import { DefaultEditorAggSelect } from './agg_select';
import { DefaultEditorAggParam } from './agg_param';
@@ -44,9 +45,6 @@ import {
} from './agg_params_state';
import { editorConfigProviders } from '../../config/editor_config_providers';
import { FixedParam, TimeIntervalParam, EditorParamConfig } from '../../config/types';
-// TODO: Below import is temporary, use `react-use` lib instead.
-// eslint-disable-next-line @kbn/eslint/no-restricted-paths
-import { useUnmount } from '../../../../../../../plugins/kibana_react/public/util/use_unmount';
import { AggGroupNames } from '../agg_groups';
import { OnAggParamsChange } from './agg_common_props';
diff --git a/src/legacy/ui/public/vis/editors/default/components/agg_params_helper.test.ts b/src/legacy/ui/public/vis/editors/default/components/agg_params_helper.test.ts
index eb6bef4887642..fb37dd5d94618 100644
--- a/src/legacy/ui/public/vis/editors/default/components/agg_params_helper.test.ts
+++ b/src/legacy/ui/public/vis/editors/default/components/agg_params_helper.test.ts
@@ -19,7 +19,6 @@
import { AggConfig, VisState } from '../../..';
import { AggType } from 'ui/agg_types';
-import { IndexPattern, Field } from 'ui/index_patterns';
import { IndexedArray } from 'ui/indexed_array';
import {
getAggParamsToRender,
@@ -28,6 +27,7 @@ import {
isInvalidParamsTouched,
} from './agg_params_helper';
import { EditorConfig } from '../../config/types';
+import { IndexPattern, Field } from '../../../../../../../plugins/data/public';
jest.mock('ui/agg_types', () => ({
aggTypes: {
diff --git a/src/legacy/ui/public/vis/editors/default/components/agg_params_helper.ts b/src/legacy/ui/public/vis/editors/default/components/agg_params_helper.ts
index d233f561940da..e0e014f69ef3f 100644
--- a/src/legacy/ui/public/vis/editors/default/components/agg_params_helper.ts
+++ b/src/legacy/ui/public/vis/editors/default/components/agg_params_helper.ts
@@ -20,7 +20,6 @@
import { get, isEmpty } from 'lodash';
import { i18n } from '@kbn/i18n';
import { aggTypeFilters } from 'ui/agg_types/filter';
-import { IndexPattern, Field } from 'ui/index_patterns';
import { aggTypes, AggParam, FieldParamType, AggType } from 'ui/agg_types';
import { aggTypeFieldFilters } from 'ui/agg_types/param_types/filter';
import { AggConfig, VisState } from '../../..';
@@ -28,6 +27,7 @@ import { groupAndSortBy, ComboBoxGroupedOptions } from '../utils';
import { EditorConfig } from '../../config/types';
import { AggTypeState, AggParamsState } from './agg_params_state';
import { AggParamEditorProps } from './agg_param_props';
+import { IndexPattern, Field } from '../../../../../../../plugins/data/public';
interface ParamInstanceBase {
agg: AggConfig;
diff --git a/src/legacy/ui/public/vis/editors/default/components/agg_select.tsx b/src/legacy/ui/public/vis/editors/default/components/agg_select.tsx
index 2934711b2357a..443c655912a55 100644
--- a/src/legacy/ui/public/vis/editors/default/components/agg_select.tsx
+++ b/src/legacy/ui/public/vis/editors/default/components/agg_select.tsx
@@ -23,9 +23,9 @@ import { EuiComboBox, EuiComboBoxOptionProps, EuiFormRow, EuiLink, EuiText } fro
import { i18n } from '@kbn/i18n';
import { FormattedMessage } from '@kbn/i18n/react';
import { AggType } from 'ui/agg_types';
-import { IndexPattern } from 'ui/index_patterns';
import { documentationLinks } from '../../../../documentation_links/documentation_links';
import { ComboBoxGroupedOptions } from '../utils';
+import { IndexPattern } from '../../../../../../../plugins/data/public';
interface DefaultEditorAggSelectProps {
aggError?: string;
diff --git a/src/legacy/ui/public/vis/editors/default/controls/field.test.tsx b/src/legacy/ui/public/vis/editors/default/controls/field.test.tsx
index aac32e28c80a5..4d15ac8e80e63 100644
--- a/src/legacy/ui/public/vis/editors/default/controls/field.test.tsx
+++ b/src/legacy/ui/public/vis/editors/default/controls/field.test.tsx
@@ -21,7 +21,7 @@ import React from 'react';
import { act } from 'react-dom/test-utils';
import { mount, shallow, ReactWrapper } from 'enzyme';
import { EuiComboBoxProps, EuiComboBox } from '@elastic/eui';
-import { Field } from '../../../../index_patterns';
+import { Field } from '../../../../../../../plugins/data/public';
import { ComboBoxGroupedOptions, SubAggParamsProp } from '..';
import { FieldParamEditor, FieldParamEditorProps } from './field';
import { AggConfig, VisState } from '../../..';
diff --git a/src/legacy/ui/public/vis/editors/default/controls/field.tsx b/src/legacy/ui/public/vis/editors/default/controls/field.tsx
index a96be3a14b7ef..75a9e24cd0dee 100644
--- a/src/legacy/ui/public/vis/editors/default/controls/field.tsx
+++ b/src/legacy/ui/public/vis/editors/default/controls/field.tsx
@@ -23,7 +23,7 @@ import React, { useEffect } from 'react';
import { EuiComboBox, EuiComboBoxOptionProps, EuiFormRow } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { AggConfig } from '../../..';
-import { Field } from '../../../../index_patterns';
+import { Field } from '../../../../../../../plugins/data/public';
import { formatListAsProse, parseCommaSeparatedList } from '../../../../../../utils';
import { AggParam, FieldParamType } from '../../../../agg_types';
import { AggParamEditorProps, ComboBoxGroupedOptions } from '..';
diff --git a/src/legacy/ui/public/vis/editors/default/controls/top_field.tsx b/src/legacy/ui/public/vis/editors/default/controls/top_field.tsx
index 5a5f2ceee3a56..e15187621954f 100644
--- a/src/legacy/ui/public/vis/editors/default/controls/top_field.tsx
+++ b/src/legacy/ui/public/vis/editors/default/controls/top_field.tsx
@@ -19,7 +19,7 @@
import React from 'react';
import { i18n } from '@kbn/i18n';
-import { Field } from '../../../../index_patterns';
+import { Field } from '../../../../../../../plugins/data/public';
import { FieldParamEditor } from './field';
import { getCompatibleAggs } from './top_aggregate';
import { AggParamEditorProps } from '..';
diff --git a/src/legacy/ui/public/vis/editors/default/controls/top_sort_field.tsx b/src/legacy/ui/public/vis/editors/default/controls/top_sort_field.tsx
index 4116ae878209e..905bd052ec695 100644
--- a/src/legacy/ui/public/vis/editors/default/controls/top_sort_field.tsx
+++ b/src/legacy/ui/public/vis/editors/default/controls/top_sort_field.tsx
@@ -19,7 +19,7 @@
import React from 'react';
import { i18n } from '@kbn/i18n';
-import { Field } from '../../../../index_patterns';
+import { Field } from '../../../../../../../plugins/data/public';
import { FieldParamEditor } from './field';
import { AggParamEditorProps } from '..';
diff --git a/src/legacy/ui/public/vis/editors/default/vis_type_agg_filter.ts b/src/legacy/ui/public/vis/editors/default/vis_type_agg_filter.ts
index 5842d7579f60a..c64907fff58a1 100644
--- a/src/legacy/ui/public/vis/editors/default/vis_type_agg_filter.ts
+++ b/src/legacy/ui/public/vis/editors/default/vis_type_agg_filter.ts
@@ -18,7 +18,7 @@
*/
import { AggType } from '../../../agg_types';
import { aggTypeFilters, propFilter } from '../../../agg_types/filter';
-import { IndexPattern } from '../../../index_patterns';
+import { IndexPattern } from '../../../../../../plugins/data/public';
import { AggConfig } from '../../../vis';
const filterByName = propFilter('name');
diff --git a/src/plugins/data/public/query/timefilter/timefilter.ts b/src/plugins/data/public/query/timefilter/timefilter.ts
index 639f3f4a66f18..58806a9328b1c 100644
--- a/src/plugins/data/public/query/timefilter/timefilter.ts
+++ b/src/plugins/data/public/query/timefilter/timefilter.ts
@@ -20,13 +20,13 @@
import _ from 'lodash';
import { Subject, BehaviorSubject } from 'rxjs';
import moment from 'moment';
-import { IndexPattern } from 'src/legacy/core_plugins/data/public';
import { areRefreshIntervalsDifferent, areTimeRangesDifferent } from './lib/diff_time_picker_vals';
import { parseQueryString } from './lib/parse_querystring';
import { calculateBounds, getTime } from './get_time';
import { TimefilterConfig, InputTimeRange, TimeRangeBounds } from './types';
import { RefreshInterval, TimeRange } from '../../../common';
import { TimeHistoryContract } from './time_history';
+import { IndexPattern } from '../../index_patterns';
// TODO: remove!
diff --git a/src/plugins/es_ui_shared/static/forms/helpers/field_validators/index_pattern_field.ts b/src/plugins/es_ui_shared/static/forms/helpers/field_validators/index_pattern_field.ts
index 7f178eabdcd19..48702a32bfde8 100644
--- a/src/plugins/es_ui_shared/static/forms/helpers/field_validators/index_pattern_field.ts
+++ b/src/plugins/es_ui_shared/static/forms/helpers/field_validators/index_pattern_field.ts
@@ -16,12 +16,13 @@
* specific language governing permissions and limitations
* under the License.
*/
-import { ILLEGAL_CHARACTERS, validateIndexPattern } from 'ui/index_patterns';
import { ValidationFunc } from '../../hook_form_lib';
import { containsChars } from '../../../validators/string';
import { ERROR_CODE } from './types';
+import { indexPatterns } from '../../../../../data/public';
+
export const indexPatternField = (i18n: any) => (
...args: Parameters
): ReturnType> => {
@@ -45,9 +46,9 @@ export const indexPatternField = (i18n: any) => (
}
// Validate illegal characters
- const errors = validateIndexPattern(value);
+ const errors = indexPatterns.validate(value);
- if (errors[ILLEGAL_CHARACTERS]) {
+ if (errors[indexPatterns.ILLEGAL_CHARACTERS_KEY]) {
return {
code: 'ERR_FIELD_FORMAT',
formatType: 'INDEX_PATTERN',
@@ -55,8 +56,8 @@ export const indexPatternField = (i18n: any) => (
defaultMessage:
'The index pattern contains the invalid {characterListLength, plural, one {character} other {characters}} { characterList }.',
values: {
- characterList: errors[ILLEGAL_CHARACTERS].join(' '),
- characterListLength: errors[ILLEGAL_CHARACTERS].length,
+ characterList: errors[indexPatterns.ILLEGAL_CHARACTERS_KEY].join(' '),
+ characterListLength: errors[indexPatterns.ILLEGAL_CHARACTERS_KEY].length,
},
}),
};
diff --git a/src/plugins/expressions/public/expression_renderer.tsx b/src/plugins/expressions/public/expression_renderer.tsx
index 3989f4ed7d698..5c04d8405479f 100644
--- a/src/plugins/expressions/public/expression_renderer.tsx
+++ b/src/plugins/expressions/public/expression_renderer.tsx
@@ -22,9 +22,9 @@ import React from 'react';
import classNames from 'classnames';
import { Subscription } from 'rxjs';
import { filter } from 'rxjs/operators';
+import useShallowCompareEffect from 'react-use/lib/useShallowCompareEffect';
import { EuiLoadingChart, EuiProgress } from '@elastic/eui';
import theme from '@elastic/eui/dist/eui_theme_light.json';
-import { useShallowCompareEffect } from '../../kibana_react/public';
import { IExpressionLoaderParams, IInterpreterRenderHandlers, RenderError } from './types';
import { ExpressionAST } from '../common/types';
import { ExpressionLoader } from './loader';
diff --git a/src/plugins/inspector/public/views/data/components/download_options.tsx b/src/plugins/inspector/public/views/data/components/download_options.tsx
index 6d21dcdafa84d..e7bfbed23c074 100644
--- a/src/plugins/inspector/public/views/data/components/download_options.tsx
+++ b/src/plugins/inspector/public/views/data/components/download_options.tsx
@@ -20,6 +20,7 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage } from '@kbn/i18n/react';
+import { i18n } from '@kbn/i18n';
import { EuiButton, EuiContextMenuItem, EuiContextMenuPanel, EuiPopover } from '@elastic/eui';
import { DataViewColumn, DataViewRow } from '../types';
@@ -66,8 +67,14 @@ class DataDownloadOptions extends Component {
+ let filename = this.props.title;
+ if (!filename || filename.length === 0) {
+ filename = i18n.translate('inspector.data.downloadOptionsUnsavedFilename', {
+ defaultMessage: 'unsaved',
+ });
+ }
exportAsCsv({
- filename: `${this.props.title}.csv`,
+ filename: `${filename}.csv`,
columns: this.props.columns,
rows: this.props.rows,
csvSeparator: this.props.csvSeparator,
diff --git a/src/plugins/kibana_react/public/index.ts b/src/plugins/kibana_react/public/index.ts
index 258b0e94ef955..10b7dd2b4da44 100644
--- a/src/plugins/kibana_react/public/index.ts
+++ b/src/plugins/kibana_react/public/index.ts
@@ -25,4 +25,4 @@ export * from './overlays';
export * from './ui_settings';
export * from './field_icon';
export * from './table_list_view';
-export { toMountPoint, useObservable, useShallowCompareEffect } from './util';
+export { toMountPoint } from './util';
diff --git a/src/plugins/kibana_react/public/ui_settings/use_ui_setting.test.tsx b/src/plugins/kibana_react/public/ui_settings/use_ui_setting.test.tsx
index 0879b0cb3f36a..db6d92a12841a 100644
--- a/src/plugins/kibana_react/public/ui_settings/use_ui_setting.test.tsx
+++ b/src/plugins/kibana_react/public/ui_settings/use_ui_setting.test.tsx
@@ -24,10 +24,10 @@ import { useUiSetting$ } from './use_ui_setting';
import { createKibanaReactContext } from '../context';
import { KibanaServices } from '../context/types';
import { Subject } from 'rxjs';
-import { useObservable } from '../util/use_observable';
import { coreMock } from '../../../../core/public/mocks';
+import useObservable from 'react-use/lib/useObservable';
-jest.mock('../util/use_observable');
+jest.mock('react-use/lib/useObservable');
const useObservableSpy = (useObservable as any) as jest.SpyInstance;
useObservableSpy.mockImplementation((observable, def) => def);
diff --git a/src/plugins/kibana_react/public/ui_settings/use_ui_setting.ts b/src/plugins/kibana_react/public/ui_settings/use_ui_setting.ts
index 295515bfa51af..a8bc01bb8d2c4 100644
--- a/src/plugins/kibana_react/public/ui_settings/use_ui_setting.ts
+++ b/src/plugins/kibana_react/public/ui_settings/use_ui_setting.ts
@@ -18,8 +18,8 @@
*/
import { useCallback, useMemo } from 'react';
+import useObservable from 'react-use/lib/useObservable';
import { useKibana } from '../context';
-import { useObservable } from '../util/use_observable';
/**
* Returns the current UI-settings value.
diff --git a/src/plugins/kibana_react/public/util/index.ts b/src/plugins/kibana_react/public/util/index.ts
index 4f64d6c9c81ab..71a281dbdaad3 100644
--- a/src/plugins/kibana_react/public/util/index.ts
+++ b/src/plugins/kibana_react/public/util/index.ts
@@ -17,7 +17,4 @@
* under the License.
*/
-export * from './use_observable';
-export * from './use_unmount';
export * from './react_mount';
-export * from './use_shallow_compare_effect';
diff --git a/src/plugins/kibana_react/public/util/use_observable.test.tsx b/src/plugins/kibana_react/public/util/use_observable.test.tsx
deleted file mode 100644
index 2dfbea06ecbb3..0000000000000
--- a/src/plugins/kibana_react/public/util/use_observable.test.tsx
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import { renderHook, act } from '@testing-library/react-hooks';
-import { Subject } from 'rxjs';
-import { useObservable } from './use_observable';
-
-test('default initial value is undefined', () => {
- const subject$ = new Subject();
- const { result } = renderHook(() => useObservable(subject$));
-
- expect(result.current).toBe(undefined);
-});
-
-test('can specify initial value', () => {
- const subject$ = new Subject();
- const { result } = renderHook(() => useObservable(subject$, 123));
-
- expect(result.current).toBe(123);
-});
-
-test('returns the latest value of observables', () => {
- const subject$ = new Subject();
- const { result } = renderHook(() => useObservable(subject$, 123));
-
- act(() => {
- subject$.next(125);
- });
- expect(result.current).toBe(125);
-
- act(() => {
- subject$.next(300);
- subject$.next(400);
- });
- expect(result.current).toBe(400);
-});
-
-xtest('subscribes to observable only once', () => {});
diff --git a/src/plugins/kibana_react/public/util/use_observable.ts b/src/plugins/kibana_react/public/util/use_observable.ts
deleted file mode 100644
index 6a7ce1f5290d2..0000000000000
--- a/src/plugins/kibana_react/public/util/use_observable.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import { useLayoutEffect, useState } from 'react';
-import { Observable } from 'rxjs';
-
-export function useObservable(observable$: Observable): T | undefined;
-export function useObservable(observable$: Observable, initialValue: T): T;
-export function useObservable(observable$: Observable, initialValue?: T): T | undefined {
- const [value, update] = useState(initialValue);
-
- useLayoutEffect(() => {
- const s = observable$.subscribe(update);
- return () => s.unsubscribe();
- }, [observable$]);
-
- return value;
-}
diff --git a/src/plugins/kibana_react/public/util/use_shallow_compare_effect.test.ts b/src/plugins/kibana_react/public/util/use_shallow_compare_effect.test.ts
deleted file mode 100644
index 810c727fcdb0b..0000000000000
--- a/src/plugins/kibana_react/public/util/use_shallow_compare_effect.test.ts
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import { renderHook } from '@testing-library/react-hooks';
-import { useShallowCompareEffect } from './use_shallow_compare_effect';
-
-describe('useShallowCompareEffect', () => {
- test("doesn't run effect on shallow change", () => {
- const callback = jest.fn();
- let deps = [1, { a: 'b' }, true];
- const { rerender } = renderHook(() => useShallowCompareEffect(callback, deps));
-
- expect(callback).toHaveBeenCalledTimes(1);
- callback.mockClear();
-
- // no change
- rerender();
- expect(callback).toHaveBeenCalledTimes(0);
- callback.mockClear();
-
- // no-change (new object with same properties)
- deps = [1, { a: 'b' }, true];
- rerender();
- expect(callback).toHaveBeenCalledTimes(0);
- callback.mockClear();
-
- // change (new primitive value)
- deps = [2, { a: 'b' }, true];
- rerender();
- expect(callback).toHaveBeenCalledTimes(1);
- callback.mockClear();
-
- // no-change
- rerender();
- expect(callback).toHaveBeenCalledTimes(0);
- callback.mockClear();
-
- // change (new primitive value)
- deps = [1, { a: 'b' }, false];
- rerender();
- expect(callback).toHaveBeenCalledTimes(1);
- callback.mockClear();
-
- // change (new properties on object)
- deps = [1, { a: 'c' }, false];
- rerender();
- expect(callback).toHaveBeenCalledTimes(1);
- callback.mockClear();
- });
-
- test('runs effect on deep change', () => {
- const callback = jest.fn();
- let deps = [1, { a: { b: 'c' } }, true];
- const { rerender } = renderHook(() => useShallowCompareEffect(callback, deps));
-
- expect(callback).toHaveBeenCalledTimes(1);
- callback.mockClear();
-
- // no change
- rerender();
- expect(callback).toHaveBeenCalledTimes(0);
- callback.mockClear();
-
- // change (new nested object )
- deps = [1, { a: { b: 'c' } }, true];
- rerender();
- expect(callback).toHaveBeenCalledTimes(1);
- callback.mockClear();
- });
-});
diff --git a/src/plugins/kibana_react/public/util/use_shallow_compare_effect.ts b/src/plugins/kibana_react/public/util/use_shallow_compare_effect.ts
deleted file mode 100644
index dfba7b907f5fb..0000000000000
--- a/src/plugins/kibana_react/public/util/use_shallow_compare_effect.ts
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import React, { useEffect, useRef } from 'react';
-
-/**
- * Similar to https://github.com/kentcdodds/use-deep-compare-effect
- * but uses shallow compare instead of deep
- */
-export function useShallowCompareEffect(
- callback: React.EffectCallback,
- deps: React.DependencyList
-) {
- useEffect(callback, useShallowCompareMemoize(deps));
-}
-function useShallowCompareMemoize(deps: React.DependencyList) {
- const ref = useRef(undefined);
-
- if (!ref.current || deps.some((dep, index) => !shallowEqual(dep, ref.current![index]))) {
- ref.current = deps;
- }
-
- return ref.current;
-}
-// https://github.com/facebook/fbjs/blob/master/packages/fbjs/src/core/shallowEqual.js
-function shallowEqual(objA: any, objB: any): boolean {
- if (is(objA, objB)) {
- return true;
- }
-
- if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {
- return false;
- }
-
- const keysA = Object.keys(objA);
- const keysB = Object.keys(objB);
-
- if (keysA.length !== keysB.length) {
- return false;
- }
-
- // Test for A's keys different from B.
- for (let i = 0; i < keysA.length; i++) {
- if (
- !Object.prototype.hasOwnProperty.call(objB, keysA[i]) ||
- !is(objA[keysA[i]], objB[keysA[i]])
- ) {
- return false;
- }
- }
-
- return true;
-}
-
-/**
- * IE11 does not support Object.is
- */
-function is(x: any, y: any): boolean {
- if (x === y) {
- return x !== 0 || y !== 0 || 1 / x === 1 / y;
- } else {
- return x !== x && y !== y;
- }
-}
diff --git a/src/plugins/kibana_react/public/util/use_unmount.ts b/src/plugins/kibana_react/public/util/use_unmount.ts
deleted file mode 100644
index 009bf8c4caa1c..0000000000000
--- a/src/plugins/kibana_react/public/util/use_unmount.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import { useEffect } from 'react';
-
-export function useUnmount(fn: () => void): void {
- useEffect(() => fn, []);
-}
diff --git a/src/test_utils/kbn_server.ts b/src/test_utils/kbn_server.ts
index 40700e05bcde8..e1b4a823e7e87 100644
--- a/src/test_utils/kbn_server.ts
+++ b/src/test_utils/kbn_server.ts
@@ -37,7 +37,7 @@ import { Root } from '../core/server/root';
import KbnServer from '../legacy/server/kbn_server';
import { CallCluster } from '../legacy/core_plugins/elasticsearch';
-type HttpMethod = 'delete' | 'get' | 'head' | 'post' | 'put';
+export type HttpMethod = 'delete' | 'get' | 'head' | 'post' | 'put';
const DEFAULTS_SETTINGS = {
server: {
@@ -76,6 +76,7 @@ export function createRootWithSettings(
repl: false,
basePath: false,
optimize: false,
+ runExamples: false,
oss: true,
...cliArgs,
},
@@ -96,7 +97,7 @@ export function createRootWithSettings(
* @param method
* @param path
*/
-function getSupertest(root: Root, method: HttpMethod, path: string) {
+export function getSupertest(root: Root, method: HttpMethod, path: string) {
const testUserCredentials = Buffer.from(`${kibanaTestUser.username}:${kibanaTestUser.password}`);
return supertest((root as any).server.http.httpServer.server.listener)
[method](path)
diff --git a/test/api_integration/apis/ui_metric/ui_metric.js b/test/api_integration/apis/ui_metric/ui_metric.js
index 5b02ba7e72430..5ddbd8649589c 100644
--- a/test/api_integration/apis/ui_metric/ui_metric.js
+++ b/test/api_integration/apis/ui_metric/ui_metric.js
@@ -25,15 +25,13 @@ export default function({ getService }) {
const es = getService('legacyEs');
const createStatsMetric = eventName => ({
- key: ReportManager.createMetricKey({ appName: 'myApp', type: METRIC_TYPE.CLICK, eventName }),
eventName,
appName: 'myApp',
type: METRIC_TYPE.CLICK,
- stats: { sum: 1, avg: 1, min: 1, max: 1 },
+ count: 1,
});
const createUserAgentMetric = appName => ({
- key: ReportManager.createMetricKey({ appName, type: METRIC_TYPE.USER_AGENT }),
appName,
type: METRIC_TYPE.USER_AGENT,
userAgent:
@@ -42,12 +40,9 @@ export default function({ getService }) {
describe('ui_metric API', () => {
it('increments the count field in the document defined by the {app}/{action_type} path', async () => {
+ const reportManager = new ReportManager();
const uiStatsMetric = createStatsMetric('myEvent');
- const report = {
- uiStatsMetrics: {
- [uiStatsMetric.key]: uiStatsMetric,
- },
- };
+ const { report } = reportManager.assignReports([uiStatsMetric]);
await supertest
.post('/api/ui_metric/report')
.set('kbn-xsrf', 'kibana')
@@ -61,21 +56,18 @@ export default function({ getService }) {
});
it('supports multiple events', async () => {
+ const reportManager = new ReportManager();
const userAgentMetric = createUserAgentMetric('kibana');
const uiStatsMetric1 = createStatsMetric('myEvent');
const hrTime = process.hrtime();
const nano = hrTime[0] * 1000000000 + hrTime[1];
const uniqueEventName = `myEvent${nano}`;
const uiStatsMetric2 = createStatsMetric(uniqueEventName);
- const report = {
- userAgent: {
- [userAgentMetric.key]: userAgentMetric,
- },
- uiStatsMetrics: {
- [uiStatsMetric1.key]: uiStatsMetric1,
- [uiStatsMetric2.key]: uiStatsMetric2,
- },
- };
+ const { report } = reportManager.assignReports([
+ userAgentMetric,
+ uiStatsMetric1,
+ uiStatsMetric2,
+ ]);
await supertest
.post('/api/ui_metric/report')
.set('kbn-xsrf', 'kibana')
diff --git a/test/common/fixtures/plugins/newsfeed/newsfeed_simulation.ts b/test/common/fixtures/plugins/newsfeed/newsfeed_simulation.ts
index 2a7ea3793324d..4bf92868b0eca 100644
--- a/test/common/fixtures/plugins/newsfeed/newsfeed_simulation.ts
+++ b/test/common/fixtures/plugins/newsfeed/newsfeed_simulation.ts
@@ -88,7 +88,7 @@ const mockNewsfeed = (version: string) => ({
badge: null,
image_url: null,
publish_on: '2019-06-21T00:00:00',
- expire_on: '2019-12-31T00:00:00',
+ expire_on: '2040-01-31T00:00:00',
hash: '39ca7d409c7eb25f4c69a5a6a11309b2f5ced7ca3f9b3a0109517126e0fd91ca',
},
{
@@ -100,6 +100,18 @@ const mockNewsfeed = (version: string) => ({
badge: null,
image_url: null,
publish_on: '2019-06-21T00:00:00',
+ expire_on: '2040-01-31T00:00:00',
+ hash: 'db445c9443eb50ea2eb15f20edf89cf0f7dac2b058b11cafc2c8c288b6e4ce2a',
+ },
+ {
+ title: { en: 'This item is expired!' },
+ description: { en: 'This should not show up.' },
+ link_text: { en: 'Generic feed-viewer could go here' },
+ link_url: { en: 'https://feeds-staging.elastic.co' },
+ languages: null,
+ badge: null,
+ image_url: null,
+ publish_on: '2019-06-21T00:00:00',
expire_on: '2019-12-31T00:00:00',
hash: 'db445c9443eb50ea2eb15f20edf89cf0f7dac2b058b11cafc2c8c288b6e4ce2a',
},
diff --git a/test/functional/apps/dashboard/dashboard_state.js b/test/functional/apps/dashboard/dashboard_state.js
index 3caab3db44cb3..3b9e404e9b94d 100644
--- a/test/functional/apps/dashboard/dashboard_state.js
+++ b/test/functional/apps/dashboard/dashboard_state.js
@@ -27,7 +27,14 @@ import {
} from '../../../../src/plugins/dashboard_embeddable_container/public/embeddable/dashboard_constants';
export default function({ getService, getPageObjects }) {
- const PageObjects = getPageObjects(['dashboard', 'visualize', 'header', 'discover']);
+ const PageObjects = getPageObjects([
+ 'dashboard',
+ 'visualize',
+ 'header',
+ 'discover',
+ 'tileMap',
+ 'visChart',
+ ]);
const testSubjects = getService('testSubjects');
const browser = getService('browser');
const queryBar = getService('queryBar');
@@ -58,14 +65,14 @@ export default function({ getService, getPageObjects }) {
await PageObjects.dashboard.switchToEditMode();
- await PageObjects.visualize.openLegendOptionColors('Count');
- await PageObjects.visualize.selectNewLegendColorChoice('#EA6460');
+ await PageObjects.visChart.openLegendOptionColors('Count');
+ await PageObjects.visChart.selectNewLegendColorChoice('#EA6460');
await PageObjects.dashboard.saveDashboard('Overridden colors');
await PageObjects.dashboard.gotoDashboardLandingPage();
await PageObjects.dashboard.loadSavedDashboard('Overridden colors');
- const colorChoiceRetained = await PageObjects.visualize.doesSelectedLegendColorExist(
+ const colorChoiceRetained = await PageObjects.visChart.doesSelectedLegendColorExist(
'#EA6460'
);
@@ -153,10 +160,10 @@ export default function({ getService, getPageObjects }) {
await dashboardPanelActions.openContextMenu();
await dashboardPanelActions.clickEdit();
- await PageObjects.visualize.clickMapZoomIn();
- await PageObjects.visualize.clickMapZoomIn();
- await PageObjects.visualize.clickMapZoomIn();
- await PageObjects.visualize.clickMapZoomIn();
+ await PageObjects.tileMap.clickMapZoomIn();
+ await PageObjects.tileMap.clickMapZoomIn();
+ await PageObjects.tileMap.clickMapZoomIn();
+ await PageObjects.tileMap.clickMapZoomIn();
await PageObjects.visualize.saveVisualizationExpectSuccess('Visualization TileMap');
@@ -225,8 +232,8 @@ export default function({ getService, getPageObjects }) {
describe('for embeddable config color parameters on a visualization', () => {
it('updates a pie slice color on a soft refresh', async function() {
await dashboardAddPanel.addVisualization(PIE_CHART_VIS_NAME);
- await PageObjects.visualize.openLegendOptionColors('80,000');
- await PageObjects.visualize.selectNewLegendColorChoice('#F9D9F9');
+ await PageObjects.visChart.openLegendOptionColors('80,000');
+ await PageObjects.visChart.selectNewLegendColorChoice('#F9D9F9');
const currentUrl = await browser.getCurrentUrl();
const newUrl = currentUrl.replace('F9D9F9', 'FFFFFF');
await browser.get(newUrl.toString(), false);
@@ -248,7 +255,7 @@ export default function({ getService, getPageObjects }) {
// Unskip once https://github.com/elastic/kibana/issues/15736 is fixed.
it.skip('and updates the pie slice legend color', async function() {
await retry.try(async () => {
- const colorExists = await PageObjects.visualize.doesSelectedLegendColorExist('#FFFFFF');
+ const colorExists = await PageObjects.visChart.doesSelectedLegendColorExist('#FFFFFF');
expect(colorExists).to.be(true);
});
});
@@ -269,7 +276,7 @@ export default function({ getService, getPageObjects }) {
// Unskip once https://github.com/elastic/kibana/issues/15736 is fixed.
it.skip('resets the legend color as well', async function() {
await retry.try(async () => {
- const colorExists = await PageObjects.visualize.doesSelectedLegendColorExist('#57c17b');
+ const colorExists = await PageObjects.visChart.doesSelectedLegendColorExist('#57c17b');
expect(colorExists).to.be(true);
});
});
diff --git a/test/functional/apps/dashboard/empty_dashboard.js b/test/functional/apps/dashboard/empty_dashboard.js
index d46daff183abf..c91b7bd1ecee0 100644
--- a/test/functional/apps/dashboard/empty_dashboard.js
+++ b/test/functional/apps/dashboard/empty_dashboard.js
@@ -44,13 +44,13 @@ export default function({ getService, getPageObjects }) {
await PageObjects.dashboard.gotoDashboardLandingPage();
});
- it('should display add button', async () => {
- const addButtonExists = await testSubjects.exists('emptyDashboardAddPanelButton');
- expect(addButtonExists).to.be(true);
+ it('should display empty widget', async () => {
+ const emptyWidgetExists = await testSubjects.exists('emptyDashboardWidget');
+ expect(emptyWidgetExists).to.be(true);
});
it.skip('should open add panel when add button is clicked', async () => {
- await testSubjects.click('emptyDashboardAddPanelButton');
+ await testSubjects.click('dashboardAddPanelButton');
const isAddPanelOpen = await dashboardAddPanel.isAddPanelOpen();
expect(isAddPanelOpen).to.be(true);
});
diff --git a/test/functional/apps/getting_started/_shakespeare.js b/test/functional/apps/getting_started/_shakespeare.js
index 04d81f4b46083..5af1676cf423f 100644
--- a/test/functional/apps/getting_started/_shakespeare.js
+++ b/test/functional/apps/getting_started/_shakespeare.js
@@ -23,7 +23,14 @@ export default function({ getService, getPageObjects }) {
const log = getService('log');
const esArchiver = getService('esArchiver');
const retry = getService('retry');
- const PageObjects = getPageObjects(['console', 'common', 'settings', 'visualize']);
+ const PageObjects = getPageObjects([
+ 'console',
+ 'common',
+ 'settings',
+ 'visualize',
+ 'visEditor',
+ 'visChart',
+ ]);
// https://www.elastic.co/guide/en/kibana/current/tutorial-load-dataset.html
@@ -63,11 +70,11 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.navigateToNewVisualization();
await PageObjects.visualize.clickVerticalBarChart();
await PageObjects.visualize.clickNewSearch('shakes*');
- await PageObjects.visualize.waitForVisualization();
+ await PageObjects.visChart.waitForVisualization();
const expectedChartValues = [111396];
await retry.try(async () => {
- const data = await PageObjects.visualize.getBarChartData('Count');
+ const data = await PageObjects.visChart.getBarChartData('Count');
log.debug('data=' + data);
log.debug('data.length=' + data.length);
expect(data[0] - expectedChartValues[0]).to.be.lessThan(5);
@@ -84,22 +91,22 @@ export default function({ getService, getPageObjects }) {
it('should configure metric Unique Count Speaking Parts', async function() {
log.debug('Metric = Unique Count, speaker, Speaking Parts');
// this first change to the YAxis metric agg uses the default aggIndex of 1
- await PageObjects.visualize.selectYAxisAggregation(
+ await PageObjects.visEditor.selectYAxisAggregation(
'Unique Count',
'speaker',
'Speaking Parts'
);
// then increment the aggIndex for the next one we create
aggIndex = aggIndex + 1;
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.clickGo();
const expectedChartValues = [935];
await retry.try(async () => {
- const data = await PageObjects.visualize.getBarChartData('Speaking Parts');
+ const data = await PageObjects.visChart.getBarChartData('Speaking Parts');
log.debug('data=' + data);
log.debug('data.length=' + data.length);
expect(data).to.eql(expectedChartValues);
});
- const title = await PageObjects.visualize.getYAxisTitle();
+ const title = await PageObjects.visChart.getYAxisTitle();
expect(title).to.be('Speaking Parts');
});
@@ -110,23 +117,23 @@ export default function({ getService, getPageObjects }) {
5. Click Apply changes images/apply-changes-button.png to view the results.
*/
it('should configure Terms aggregation on play_name', async function() {
- await PageObjects.visualize.clickBucket('X-axis');
+ await PageObjects.visEditor.clickBucket('X-axis');
log.debug('Aggregation = Terms');
- await PageObjects.visualize.selectAggregation('Terms');
+ await PageObjects.visEditor.selectAggregation('Terms');
aggIndex = aggIndex + 1;
log.debug('Field = play_name');
- await PageObjects.visualize.selectField('play_name');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.selectField('play_name');
+ await PageObjects.visEditor.clickGo();
const expectedChartValues = [71, 65, 62, 55, 55];
await retry.try(async () => {
- const data = await PageObjects.visualize.getBarChartData('Speaking Parts');
+ const data = await PageObjects.visChart.getBarChartData('Speaking Parts');
log.debug('data=' + data);
log.debug('data.length=' + data.length);
expect(data).to.eql(expectedChartValues);
});
- const labels = await PageObjects.visualize.getXAxisLabels();
+ const labels = await PageObjects.visChart.getXAxisLabels();
expect(labels).to.eql([
'Richard III',
'Henry VI Part 2',
@@ -145,21 +152,21 @@ export default function({ getService, getPageObjects }) {
2. Choose the Max aggregation and select the speech_number field.
*/
it('should configure Max aggregation metric on speech_number', async function() {
- await PageObjects.visualize.clickBucket('Y-axis', 'metrics');
+ await PageObjects.visEditor.clickBucket('Y-axis', 'metrics');
log.debug('Aggregation = Max');
- await PageObjects.visualize.selectYAxisAggregation(
+ await PageObjects.visEditor.selectYAxisAggregation(
'Max',
'speech_number',
'Max Speaking Parts',
aggIndex
);
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.clickGo();
const expectedChartValues = [71, 65, 62, 55, 55];
const expectedChartValues2 = [177, 106, 153, 132, 162];
await retry.try(async () => {
- const data = await PageObjects.visualize.getBarChartData('Speaking Parts');
- const data2 = await PageObjects.visualize.getBarChartData('Max Speaking Parts');
+ const data = await PageObjects.visChart.getBarChartData('Speaking Parts');
+ const data2 = await PageObjects.visChart.getBarChartData('Max Speaking Parts');
log.debug('data=' + data);
log.debug('data.length=' + data.length);
log.debug('data2=' + data2);
@@ -168,7 +175,7 @@ export default function({ getService, getPageObjects }) {
expect(data2).to.eql(expectedChartValues2);
});
- const labels = await PageObjects.visualize.getXAxisLabels();
+ const labels = await PageObjects.visChart.getXAxisLabels();
expect(labels).to.eql([
'Richard III',
'Henry VI Part 2',
@@ -184,15 +191,15 @@ export default function({ getService, getPageObjects }) {
4. Click Apply changes images/apply-changes-button.png. Your chart should now look like this:
*/
it('should configure change options to normal bars', async function() {
- await PageObjects.visualize.clickMetricsAndAxes();
- await PageObjects.visualize.selectChartMode('normal');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.clickMetricsAndAxes();
+ await PageObjects.visEditor.selectChartMode('normal');
+ await PageObjects.visEditor.clickGo();
const expectedChartValues = [71, 65, 62, 55, 55];
const expectedChartValues2 = [177, 106, 153, 132, 162];
await retry.try(async () => {
- const data = await PageObjects.visualize.getBarChartData('Speaking Parts');
- const data2 = await PageObjects.visualize.getBarChartData('Max Speaking Parts');
+ const data = await PageObjects.visChart.getBarChartData('Speaking Parts');
+ const data2 = await PageObjects.visChart.getBarChartData('Max Speaking Parts');
log.debug('data=' + data);
log.debug('data.length=' + data.length);
log.debug('data2=' + data2);
@@ -210,15 +217,15 @@ export default function({ getService, getPageObjects }) {
Save this chart with the name Bar Example.
*/
it('should change the Y-Axis extents', async function() {
- await PageObjects.visualize.setAxisExtents('50', '250');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.setAxisExtents('50', '250');
+ await PageObjects.visEditor.clickGo();
// same values as previous test except scaled down by the 50 for Y-Axis min
const expectedChartValues = [21, 15, 12, 5, 5];
const expectedChartValues2 = [127, 56, 103, 82, 112];
await retry.try(async () => {
- const data = await PageObjects.visualize.getBarChartData('Speaking Parts');
- const data2 = await PageObjects.visualize.getBarChartData('Max Speaking Parts');
+ const data = await PageObjects.visChart.getBarChartData('Speaking Parts');
+ const data2 = await PageObjects.visChart.getBarChartData('Max Speaking Parts');
log.debug('data=' + data);
log.debug('data.length=' + data.length);
log.debug('data2=' + data2);
diff --git a/test/functional/apps/visualize/_area_chart.js b/test/functional/apps/visualize/_area_chart.js
index b8fa253f72104..e52cfdf478c33 100644
--- a/test/functional/apps/visualize/_area_chart.js
+++ b/test/functional/apps/visualize/_area_chart.js
@@ -24,7 +24,14 @@ export default function({ getService, getPageObjects }) {
const inspector = getService('inspector');
const browser = getService('browser');
const retry = getService('retry');
- const PageObjects = getPageObjects(['common', 'visualize', 'header', 'settings', 'timePicker']);
+ const PageObjects = getPageObjects([
+ 'common',
+ 'visualize',
+ 'visEditor',
+ 'visChart',
+ 'header',
+ 'timePicker',
+ ]);
describe('area charts', function indexPatternCreation() {
const vizName1 = 'Visualization AreaChart Name Test';
@@ -38,17 +45,17 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.clickNewSearch();
await PageObjects.timePicker.setDefaultAbsoluteRange();
log.debug('Click X-axis');
- await PageObjects.visualize.clickBucket('X-axis');
+ await PageObjects.visEditor.clickBucket('X-axis');
log.debug('Click Date Histogram');
- await PageObjects.visualize.selectAggregation('Date Histogram');
+ await PageObjects.visEditor.selectAggregation('Date Histogram');
log.debug('Check field value');
- const fieldValues = await PageObjects.visualize.getField();
+ const fieldValues = await PageObjects.visEditor.getField();
log.debug('fieldValue = ' + fieldValues);
expect(fieldValues[0]).to.be('@timestamp');
- const intervalValue = await PageObjects.visualize.getInterval();
+ const intervalValue = await PageObjects.visEditor.getInterval();
log.debug('intervalValue = ' + intervalValue);
expect(intervalValue[0]).to.be('Auto');
- return PageObjects.visualize.clickGo();
+ return PageObjects.visEditor.clickGo();
};
before(initAreaChart);
@@ -70,7 +77,7 @@ export default function({ getService, getPageObjects }) {
it('should save and load', async function() {
await PageObjects.visualize.saveVisualizationExpectSuccessAndBreadcrumb(vizName1);
await PageObjects.visualize.loadSavedVisualization(vizName1);
- await PageObjects.visualize.waitForVisualization();
+ await PageObjects.visChart.waitForVisualization();
});
it('should have inspector enabled', async function() {
@@ -113,14 +120,14 @@ export default function({ getService, getPageObjects }) {
];
await retry.try(async function tryingForTime() {
- const labels = await PageObjects.visualize.getXAxisLabels();
+ const labels = await PageObjects.visChart.getXAxisLabels();
log.debug('X-Axis labels = ' + labels);
expect(labels).to.eql(xAxisLabels);
});
- const labels = await PageObjects.visualize.getYAxisLabels();
+ const labels = await PageObjects.visChart.getYAxisLabels();
log.debug('Y-Axis labels = ' + labels);
expect(labels).to.eql(yAxisLabels);
- const paths = await PageObjects.visualize.getAreaChartData('Count');
+ const paths = await PageObjects.visChart.getAreaChartData('Count');
log.debug('expectedAreaChartData = ' + expectedAreaChartData);
log.debug('actual chart data = ' + paths);
expect(paths).to.eql(expectedAreaChartData);
@@ -185,9 +192,9 @@ export default function({ getService, getPageObjects }) {
['2015-09-20 19:00', '55'],
];
- await PageObjects.visualize.toggleOpenEditor(2);
- await PageObjects.visualize.setInterval('Second');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.toggleOpenEditor(2);
+ await PageObjects.visEditor.setInterval('Second');
+ await PageObjects.visEditor.clickGo();
await inspector.open();
await inspector.expectTableData(expectedTableData);
await inspector.close();
@@ -217,9 +224,9 @@ export default function({ getService, getPageObjects }) {
['2015-09-20 19:00', '0.015'],
];
- await PageObjects.visualize.toggleAdvancedParams('2');
- await PageObjects.visualize.toggleScaleMetrics();
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.toggleAdvancedParams('2');
+ await PageObjects.visEditor.toggleScaleMetrics();
+ await PageObjects.visEditor.clickGo();
await inspector.open();
await inspector.expectTableData(expectedTableData);
await inspector.close();
@@ -249,11 +256,11 @@ export default function({ getService, getPageObjects }) {
['2015-09-20 19:00', '55', '2.053KB'],
];
- await PageObjects.visualize.clickBucket('Y-axis', 'metrics');
- await PageObjects.visualize.selectAggregation('Top Hit', 'metrics');
- await PageObjects.visualize.selectField('bytes', 'metrics');
- await PageObjects.visualize.selectAggregateWith('average');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.clickBucket('Y-axis', 'metrics');
+ await PageObjects.visEditor.selectAggregation('Top Hit', 'metrics');
+ await PageObjects.visEditor.selectField('bytes', 'metrics');
+ await PageObjects.visEditor.selectAggregateWith('average');
+ await PageObjects.visEditor.clickGo();
await inspector.open();
await inspector.expectTableData(expectedTableData);
await inspector.close();
@@ -285,13 +292,13 @@ export default function({ getService, getPageObjects }) {
const axisId = 'ValueAxis-1';
it('should show ticks on selecting log scale', async () => {
- await PageObjects.visualize.clickMetricsAndAxes();
- await PageObjects.visualize.clickYAxisOptions(axisId);
- await PageObjects.visualize.selectYAxisScaleType(axisId, 'log');
- await PageObjects.visualize.clickYAxisAdvancedOptions(axisId);
- await PageObjects.visualize.changeYAxisFilterLabelsCheckbox(axisId, false);
- await PageObjects.visualize.clickGo();
- const labels = await PageObjects.visualize.getYAxisLabels();
+ await PageObjects.visEditor.clickMetricsAndAxes();
+ await PageObjects.visEditor.clickYAxisOptions(axisId);
+ await PageObjects.visEditor.selectYAxisScaleType(axisId, 'log');
+ await PageObjects.visEditor.clickYAxisAdvancedOptions(axisId);
+ await PageObjects.visEditor.changeYAxisFilterLabelsCheckbox(axisId, false);
+ await PageObjects.visEditor.clickGo();
+ const labels = await PageObjects.visChart.getYAxisLabels();
const expectedLabels = [
'2',
'3',
@@ -317,9 +324,9 @@ export default function({ getService, getPageObjects }) {
});
it('should show filtered ticks on selecting log scale', async () => {
- await PageObjects.visualize.changeYAxisFilterLabelsCheckbox(axisId, true);
- await PageObjects.visualize.clickGo();
- const labels = await PageObjects.visualize.getYAxisLabels();
+ await PageObjects.visEditor.changeYAxisFilterLabelsCheckbox(axisId, true);
+ await PageObjects.visEditor.clickGo();
+ const labels = await PageObjects.visChart.getYAxisLabels();
const expectedLabels = [
'2',
'3',
@@ -345,10 +352,10 @@ export default function({ getService, getPageObjects }) {
});
it('should show ticks on selecting square root scale', async () => {
- await PageObjects.visualize.selectYAxisScaleType(axisId, 'square root');
- await PageObjects.visualize.changeYAxisFilterLabelsCheckbox(axisId, false);
- await PageObjects.visualize.clickGo();
- const labels = await PageObjects.visualize.getYAxisLabels();
+ await PageObjects.visEditor.selectYAxisScaleType(axisId, 'square root');
+ await PageObjects.visEditor.changeYAxisFilterLabelsCheckbox(axisId, false);
+ await PageObjects.visEditor.clickGo();
+ const labels = await PageObjects.visChart.getYAxisLabels();
const expectedLabels = [
'0',
'200',
@@ -364,18 +371,18 @@ export default function({ getService, getPageObjects }) {
});
it('should show filtered ticks on selecting square root scale', async () => {
- await PageObjects.visualize.changeYAxisFilterLabelsCheckbox(axisId, true);
- await PageObjects.visualize.clickGo();
- const labels = await PageObjects.visualize.getYAxisLabels();
+ await PageObjects.visEditor.changeYAxisFilterLabelsCheckbox(axisId, true);
+ await PageObjects.visEditor.clickGo();
+ const labels = await PageObjects.visChart.getYAxisLabels();
const expectedLabels = ['200', '400', '600', '800', '1,000', '1,200', '1,400'];
expect(labels).to.eql(expectedLabels);
});
it('should show ticks on selecting linear scale', async () => {
- await PageObjects.visualize.selectYAxisScaleType(axisId, 'linear');
- await PageObjects.visualize.changeYAxisFilterLabelsCheckbox(axisId, false);
- await PageObjects.visualize.clickGo();
- const labels = await PageObjects.visualize.getYAxisLabels();
+ await PageObjects.visEditor.selectYAxisScaleType(axisId, 'linear');
+ await PageObjects.visEditor.changeYAxisFilterLabelsCheckbox(axisId, false);
+ await PageObjects.visEditor.clickGo();
+ const labels = await PageObjects.visChart.getYAxisLabels();
log.debug(labels);
const expectedLabels = [
'0',
@@ -392,9 +399,9 @@ export default function({ getService, getPageObjects }) {
});
it('should show filtered ticks on selecting linear scale', async () => {
- await PageObjects.visualize.changeYAxisFilterLabelsCheckbox(axisId, true);
- await PageObjects.visualize.clickGo();
- const labels = await PageObjects.visualize.getYAxisLabels();
+ await PageObjects.visEditor.changeYAxisFilterLabelsCheckbox(axisId, true);
+ await PageObjects.visEditor.clickGo();
+ const labels = await PageObjects.visChart.getYAxisLabels();
const expectedLabels = ['200', '400', '600', '800', '1,000', '1,200', '1,400'];
expect(labels).to.eql(expectedLabels);
});
@@ -412,16 +419,16 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.clickNewSearch('long-window-logstash-*');
await PageObjects.timePicker.setAbsoluteRange(fromTime, toTime);
log.debug('Click X-axis');
- await PageObjects.visualize.clickBucket('X-axis');
+ await PageObjects.visEditor.clickBucket('X-axis');
log.debug('Click Date Histogram');
- await PageObjects.visualize.selectAggregation('Date Histogram');
- await PageObjects.visualize.selectField('@timestamp');
- await PageObjects.visualize.setInterval('Yearly');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.selectAggregation('Date Histogram');
+ await PageObjects.visEditor.selectField('@timestamp');
+ await PageObjects.visEditor.setInterval('Yearly');
+ await PageObjects.visEditor.clickGo();
// This svg area is composed by 7 years (2013 - 2019).
// 7 points are used to draw the upper line (usually called y1)
// 7 points compose the lower line (usually called y0)
- const paths = await PageObjects.visualize.getAreaChartPaths('Count');
+ const paths = await PageObjects.visChart.getAreaChartPaths('Count');
log.debug('actual chart data = ' + paths);
const numberOfSegments = 7 * 2;
expect(paths.length).to.eql(numberOfSegments);
@@ -435,17 +442,17 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.clickNewSearch('long-window-logstash-*');
await PageObjects.timePicker.setAbsoluteRange(fromTime, toTime);
log.debug('Click X-axis');
- await PageObjects.visualize.clickBucket('X-axis');
+ await PageObjects.visEditor.clickBucket('X-axis');
log.debug('Click Date Histogram');
- await PageObjects.visualize.selectAggregation('Date Histogram');
- await PageObjects.visualize.selectField('@timestamp');
- await PageObjects.visualize.setInterval('Monthly');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.selectAggregation('Date Histogram');
+ await PageObjects.visEditor.selectField('@timestamp');
+ await PageObjects.visEditor.setInterval('Monthly');
+ await PageObjects.visEditor.clickGo();
// This svg area is composed by 67 months 3 (2013) + 5 * 12 + 4 (2019)
// 67 points are used to draw the upper line (usually called y1)
// 67 points compose the lower line (usually called y0)
const numberOfSegments = 67 * 2;
- const paths = await PageObjects.visualize.getAreaChartPaths('Count');
+ const paths = await PageObjects.visChart.getAreaChartPaths('Count');
log.debug('actual chart data = ' + paths);
expect(paths.length).to.eql(numberOfSegments);
});
diff --git a/test/functional/apps/visualize/_data_table.js b/test/functional/apps/visualize/_data_table.js
index e8fe8fb656877..0a9ff1e77a2ef 100644
--- a/test/functional/apps/visualize/_data_table.js
+++ b/test/functional/apps/visualize/_data_table.js
@@ -22,9 +22,10 @@ import expect from '@kbn/expect';
export default function({ getService, getPageObjects }) {
const log = getService('log');
const inspector = getService('inspector');
+ const testSubjects = getService('testSubjects');
const retry = getService('retry');
const filterBar = getService('filterBar');
- const PageObjects = getPageObjects(['common', 'visualize', 'header', 'timePicker']);
+ const PageObjects = getPageObjects(['visualize', 'timePicker', 'visEditor', 'visChart']);
describe('data table', function indexPatternCreation() {
const vizName1 = 'Visualization DataTable';
@@ -38,27 +39,27 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.clickNewSearch();
await PageObjects.timePicker.setDefaultAbsoluteRange();
log.debug('Bucket = Split rows');
- await PageObjects.visualize.clickBucket('Split rows');
+ await PageObjects.visEditor.clickBucket('Split rows');
log.debug('Aggregation = Histogram');
- await PageObjects.visualize.selectAggregation('Histogram');
+ await PageObjects.visEditor.selectAggregation('Histogram');
log.debug('Field = bytes');
- await PageObjects.visualize.selectField('bytes');
+ await PageObjects.visEditor.selectField('bytes');
log.debug('Interval = 2000');
- await PageObjects.visualize.setNumericInterval('2000');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.setInterval('2000', { type: 'numeric' });
+ await PageObjects.visEditor.clickGo();
});
it('should allow applying changed params', async () => {
- await PageObjects.visualize.setNumericInterval('1', { append: true });
- const interval = await PageObjects.visualize.getNumericInterval();
+ await PageObjects.visEditor.setInterval('1', { type: 'numeric', append: true });
+ const interval = await PageObjects.visEditor.getNumericInterval();
expect(interval).to.be('20001');
- const isApplyButtonEnabled = await PageObjects.visualize.isApplyEnabled();
+ const isApplyButtonEnabled = await PageObjects.visEditor.isApplyEnabled();
expect(isApplyButtonEnabled).to.be(true);
});
it('should allow reseting changed params', async () => {
- await PageObjects.visualize.clickReset();
- const interval = await PageObjects.visualize.getNumericInterval();
+ await PageObjects.visEditor.clickReset();
+ const interval = await PageObjects.visEditor.getNumericInterval();
expect(interval).to.be('2000');
});
@@ -66,7 +67,7 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.saveVisualizationExpectSuccessAndBreadcrumb(vizName1);
await PageObjects.visualize.loadSavedVisualization(vizName1);
- await PageObjects.visualize.waitForVisualization();
+ await PageObjects.visChart.waitForVisualization();
});
it('should have inspector enabled', async function() {
@@ -96,7 +97,7 @@ export default function({ getService, getPageObjects }) {
it('should show percentage columns', async () => {
async function expectValidTableData() {
- const data = await PageObjects.visualize.getTableVisData();
+ const data = await PageObjects.visChart.getTableVisData();
expect(data.trim().split('\n')).to.be.eql([
'≥ 0 and < 1000',
'1,351 64.7%',
@@ -110,16 +111,16 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.clickDataTable();
await PageObjects.visualize.clickNewSearch();
await PageObjects.timePicker.setDefaultAbsoluteRange();
- await PageObjects.visualize.clickBucket('Split rows');
- await PageObjects.visualize.selectAggregation('Range');
- await PageObjects.visualize.selectField('bytes');
- await PageObjects.visualize.clickGo();
- await PageObjects.visualize.clickOptionsTab();
- await PageObjects.visualize.setSelectByOptionText(
+ await PageObjects.visEditor.clickBucket('Split rows');
+ await PageObjects.visEditor.selectAggregation('Range');
+ await PageObjects.visEditor.selectField('bytes');
+ await PageObjects.visEditor.clickGo();
+ await PageObjects.visEditor.clickOptionsTab();
+ await PageObjects.visEditor.setSelectByOptionText(
'datatableVisualizationPercentageCol',
'Count'
);
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.clickGo();
await expectValidTableData();
@@ -128,20 +129,20 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.saveVisualizationExpectSuccessAndBreadcrumb(SAVE_NAME);
await PageObjects.visualize.loadSavedVisualization(SAVE_NAME);
- await PageObjects.visualize.waitForVisualization();
+ await PageObjects.visChart.waitForVisualization();
await expectValidTableData();
// check that it works after selecting a column that's deleted
- await PageObjects.visualize.clickData();
- await PageObjects.visualize.clickBucket('Metric', 'metrics');
- await PageObjects.visualize.selectAggregation('Average', 'metrics');
- await PageObjects.visualize.selectField('bytes', 'metrics');
- await PageObjects.visualize.removeDimension(1);
- await PageObjects.visualize.clickGo();
- await PageObjects.visualize.clickOptionsTab();
-
- const data = await PageObjects.visualize.getTableVisData();
+ await PageObjects.visEditor.clickDataTab();
+ await PageObjects.visEditor.clickBucket('Metric', 'metrics');
+ await PageObjects.visEditor.selectAggregation('Average', 'metrics');
+ await PageObjects.visEditor.selectField('bytes', 'metrics');
+ await PageObjects.visEditor.removeDimension(1);
+ await PageObjects.visEditor.clickGo();
+ await PageObjects.visEditor.clickOptionsTab();
+
+ const data = await PageObjects.visChart.getTableVisData();
expect(data.trim().split('\n')).to.be.eql([
'≥ 0 and < 1000',
'344.094B',
@@ -155,12 +156,12 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.clickDataTable();
await PageObjects.visualize.clickNewSearch();
await PageObjects.timePicker.setDefaultAbsoluteRange();
- await PageObjects.visualize.clickBucket('Metric', 'metrics');
- await PageObjects.visualize.selectAggregation('Average Bucket', 'metrics');
- await PageObjects.visualize.selectAggregation('Terms', 'metrics', 'buckets');
- await PageObjects.visualize.selectField('geo.src', 'metrics', 'buckets');
- await PageObjects.visualize.clickGo();
- const data = await PageObjects.visualize.getTableVisData();
+ await PageObjects.visEditor.clickBucket('Metric', 'metrics');
+ await PageObjects.visEditor.selectAggregation('Average Bucket', 'metrics');
+ await PageObjects.visEditor.selectAggregation('Terms', 'metrics', 'buckets');
+ await PageObjects.visEditor.selectField('geo.src', 'metrics', 'buckets');
+ await PageObjects.visEditor.clickGo();
+ const data = await PageObjects.visChart.getTableVisData();
log.debug(data.split('\n'));
expect(data.trim().split('\n')).to.be.eql(['14,004 1,412.6']);
});
@@ -170,12 +171,12 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.clickDataTable();
await PageObjects.visualize.clickNewSearch();
await PageObjects.timePicker.setDefaultAbsoluteRange();
- await PageObjects.visualize.clickBucket('Split rows');
- await PageObjects.visualize.selectAggregation('Date Histogram');
- await PageObjects.visualize.selectField('@timestamp');
- await PageObjects.visualize.setInterval('Daily');
- await PageObjects.visualize.clickGo();
- const data = await PageObjects.visualize.getTableVisData();
+ await PageObjects.visEditor.clickBucket('Split rows');
+ await PageObjects.visEditor.selectAggregation('Date Histogram');
+ await PageObjects.visEditor.selectField('@timestamp');
+ await PageObjects.visEditor.setInterval('Daily');
+ await PageObjects.visEditor.clickGo();
+ const data = await PageObjects.visChart.getTableVisData();
log.debug(data.split('\n'));
expect(data.trim().split('\n')).to.be.eql([
'2015-09-20',
@@ -192,12 +193,12 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.clickDataTable();
await PageObjects.visualize.clickNewSearch();
await PageObjects.timePicker.setDefaultAbsoluteRange();
- await PageObjects.visualize.clickBucket('Split rows');
- await PageObjects.visualize.selectAggregation('Date Histogram');
- await PageObjects.visualize.selectField('@timestamp');
- await PageObjects.visualize.setInterval('Daily');
- await PageObjects.visualize.clickGo();
- const data = await PageObjects.visualize.getTableVisData();
+ await PageObjects.visEditor.clickBucket('Split rows');
+ await PageObjects.visEditor.selectAggregation('Date Histogram');
+ await PageObjects.visEditor.selectField('@timestamp');
+ await PageObjects.visEditor.setInterval('Daily');
+ await PageObjects.visEditor.clickGo();
+ const data = await PageObjects.visChart.getTableVisData();
expect(data.trim().split('\n')).to.be.eql([
'2015-09-20',
'4,757',
@@ -210,15 +211,15 @@ export default function({ getService, getPageObjects }) {
it('should correctly filter for applied time filter on the main timefield', async () => {
await filterBar.addFilter('@timestamp', 'is between', '2015-09-19', '2015-09-21');
- await PageObjects.visualize.waitForVisualizationRenderingStabilized();
- const data = await PageObjects.visualize.getTableVisData();
+ await PageObjects.visChart.waitForVisualizationRenderingStabilized();
+ const data = await PageObjects.visChart.getTableVisData();
expect(data.trim().split('\n')).to.be.eql(['2015-09-20', '4,757']);
});
it('should correctly filter for pinned filters', async () => {
await filterBar.toggleFilterPinned('@timestamp');
- await PageObjects.visualize.waitForVisualizationRenderingStabilized();
- const data = await PageObjects.visualize.getTableVisData();
+ await PageObjects.visChart.waitForVisualizationRenderingStabilized();
+ const data = await PageObjects.visChart.getTableVisData();
expect(data.trim().split('\n')).to.be.eql(['2015-09-20', '4,757']);
});
@@ -227,11 +228,11 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.clickDataTable();
await PageObjects.visualize.clickNewSearch();
await PageObjects.timePicker.setDefaultAbsoluteRange();
- await PageObjects.visualize.clickMetricEditor();
- await PageObjects.visualize.selectAggregation('Top Hit', 'metrics');
- await PageObjects.visualize.selectField('agent.raw', 'metrics');
- await PageObjects.visualize.clickGo();
- const data = await PageObjects.visualize.getTableVisData();
+ await PageObjects.visEditor.clickMetricEditor();
+ await PageObjects.visEditor.selectAggregation('Top Hit', 'metrics');
+ await PageObjects.visEditor.selectField('agent.raw', 'metrics');
+ await PageObjects.visEditor.clickGo();
+ const data = await PageObjects.visChart.getTableVisData();
log.debug(data);
expect(data.length).to.be.greaterThan(0);
});
@@ -241,11 +242,11 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.clickDataTable();
await PageObjects.visualize.clickNewSearch();
await PageObjects.timePicker.setDefaultAbsoluteRange();
- await PageObjects.visualize.clickBucket('Split rows');
- await PageObjects.visualize.selectAggregation('Range');
- await PageObjects.visualize.selectField('bytes');
- await PageObjects.visualize.clickGo();
- const data = await PageObjects.visualize.getTableVisData();
+ await PageObjects.visEditor.clickBucket('Split rows');
+ await PageObjects.visEditor.selectAggregation('Range');
+ await PageObjects.visEditor.selectField('bytes');
+ await PageObjects.visEditor.clickGo();
+ const data = await PageObjects.visChart.getTableVisData();
expect(data.trim().split('\n')).to.be.eql([
'≥ 0 and < 1000',
'1,351',
@@ -260,19 +261,19 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.clickDataTable();
await PageObjects.visualize.clickNewSearch();
await PageObjects.timePicker.setDefaultAbsoluteRange();
- await PageObjects.visualize.clickBucket('Split rows');
- await PageObjects.visualize.selectAggregation('Terms');
- await PageObjects.visualize.selectField('extension.raw');
- await PageObjects.visualize.setSize(2);
- await PageObjects.visualize.clickGo();
-
- await PageObjects.visualize.toggleOtherBucket();
- await PageObjects.visualize.toggleMissingBucket();
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.clickBucket('Split rows');
+ await PageObjects.visEditor.selectAggregation('Terms');
+ await PageObjects.visEditor.selectField('extension.raw');
+ await PageObjects.visEditor.setSize(2);
+ await PageObjects.visEditor.clickGo();
+
+ await PageObjects.visEditor.toggleOtherBucket();
+ await PageObjects.visEditor.toggleMissingBucket();
+ await PageObjects.visEditor.clickGo();
});
it('should show correct data', async () => {
- const data = await PageObjects.visualize.getTableVisContent();
+ const data = await PageObjects.visChart.getTableVisContent();
expect(data).to.be.eql([
['jpg', '9,109'],
['css', '2,159'],
@@ -281,9 +282,9 @@ export default function({ getService, getPageObjects }) {
});
it('should apply correct filter', async () => {
- await PageObjects.visualize.filterOnTableCell(1, 3);
- await PageObjects.visualize.waitForVisualizationRenderingStabilized();
- const data = await PageObjects.visualize.getTableVisContent();
+ await PageObjects.visChart.filterOnTableCell(1, 3);
+ await PageObjects.visChart.waitForVisualizationRenderingStabilized();
+ const data = await PageObjects.visChart.getTableVisContent();
expect(data).to.be.eql([
['png', '1,373'],
['gif', '918'],
@@ -298,20 +299,20 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.clickDataTable();
await PageObjects.visualize.clickNewSearch();
await PageObjects.timePicker.setDefaultAbsoluteRange();
- await PageObjects.visualize.clickBucket('Split rows');
- await PageObjects.visualize.selectAggregation('Terms');
- await PageObjects.visualize.selectField('extension.raw');
- await PageObjects.visualize.setSize(2);
- await PageObjects.visualize.toggleOpenEditor(2, 'false');
- await PageObjects.visualize.clickBucket('Split rows');
- await PageObjects.visualize.selectAggregation('Terms');
- await PageObjects.visualize.selectField('geo.dest');
- await PageObjects.visualize.toggleOpenEditor(3, 'false');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.clickBucket('Split rows');
+ await PageObjects.visEditor.selectAggregation('Terms');
+ await PageObjects.visEditor.selectField('extension.raw');
+ await PageObjects.visEditor.setSize(2);
+ await PageObjects.visEditor.toggleOpenEditor(2, 'false');
+ await PageObjects.visEditor.clickBucket('Split rows');
+ await PageObjects.visEditor.selectAggregation('Terms');
+ await PageObjects.visEditor.selectField('geo.dest');
+ await PageObjects.visEditor.toggleOpenEditor(3, 'false');
+ await PageObjects.visEditor.clickGo();
});
it('should show correct data without showMetricsAtAllLevels', async () => {
- const data = await PageObjects.visualize.getTableVisContent();
+ const data = await PageObjects.visChart.getTableVisContent();
expect(data).to.be.eql([
['jpg', 'CN', '1,718'],
['jpg', 'IN', '1,511'],
@@ -327,10 +328,10 @@ export default function({ getService, getPageObjects }) {
});
it('should show correct data without showMetricsAtAllLevels even if showPartialRows is selected', async () => {
- await PageObjects.visualize.clickOptionsTab();
- await PageObjects.visualize.checkCheckbox('showPartialRows');
- await PageObjects.visualize.clickGo();
- const data = await PageObjects.visualize.getTableVisContent();
+ await PageObjects.visEditor.clickOptionsTab();
+ await testSubjects.setCheckbox('showPartialRows', 'check');
+ await PageObjects.visEditor.clickGo();
+ const data = await PageObjects.visChart.getTableVisContent();
expect(data).to.be.eql([
['jpg', 'CN', '1,718'],
['jpg', 'IN', '1,511'],
@@ -346,10 +347,10 @@ export default function({ getService, getPageObjects }) {
});
it('should show metrics on each level', async () => {
- await PageObjects.visualize.clickOptionsTab();
- await PageObjects.visualize.checkCheckbox('showMetricsAtAllLevels');
- await PageObjects.visualize.clickGo();
- const data = await PageObjects.visualize.getTableVisContent();
+ await PageObjects.visEditor.clickOptionsTab();
+ await testSubjects.setCheckbox('showMetricsAtAllLevels', 'check');
+ await PageObjects.visEditor.clickGo();
+ const data = await PageObjects.visChart.getTableVisContent();
expect(data).to.be.eql([
['jpg', '9,109', 'CN', '1,718'],
['jpg', '9,109', 'IN', '1,511'],
@@ -365,12 +366,12 @@ export default function({ getService, getPageObjects }) {
});
it('should show metrics other than count on each level', async () => {
- await PageObjects.visualize.clickData();
- await PageObjects.visualize.clickBucket('Metric', 'metrics');
- await PageObjects.visualize.selectAggregation('Average', 'metrics');
- await PageObjects.visualize.selectField('bytes', 'metrics');
- await PageObjects.visualize.clickGo();
- const data = await PageObjects.visualize.getTableVisContent();
+ await PageObjects.visEditor.clickDataTab();
+ await PageObjects.visEditor.clickBucket('Metric', 'metrics');
+ await PageObjects.visEditor.selectAggregation('Average', 'metrics');
+ await PageObjects.visEditor.selectField('bytes', 'metrics');
+ await PageObjects.visEditor.clickGo();
+ const data = await PageObjects.visChart.getTableVisContent();
expect(data).to.be.eql([
['jpg', '9,109', '5.469KB', 'CN', '1,718', '5.477KB'],
['jpg', '9,109', '5.469KB', 'IN', '1,511', '5.456KB'],
@@ -392,26 +393,26 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.clickDataTable();
await PageObjects.visualize.clickNewSearch();
await PageObjects.timePicker.setDefaultAbsoluteRange();
- await PageObjects.visualize.clickBucket('Split table');
- await PageObjects.visualize.selectAggregation('Terms');
- await PageObjects.visualize.selectField('extension.raw');
- await PageObjects.visualize.setSize(2);
- await PageObjects.visualize.toggleOpenEditor(2, 'false');
- await PageObjects.visualize.clickBucket('Split rows');
- await PageObjects.visualize.selectAggregation('Terms');
- await PageObjects.visualize.selectField('geo.dest');
- await PageObjects.visualize.setSize(3, 3);
- await PageObjects.visualize.toggleOpenEditor(3, 'false');
- await PageObjects.visualize.clickBucket('Split rows');
- await PageObjects.visualize.selectAggregation('Terms');
- await PageObjects.visualize.selectField('geo.src');
- await PageObjects.visualize.setSize(3, 4);
- await PageObjects.visualize.toggleOpenEditor(4, 'false');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.clickBucket('Split table');
+ await PageObjects.visEditor.selectAggregation('Terms');
+ await PageObjects.visEditor.selectField('extension.raw');
+ await PageObjects.visEditor.setSize(2);
+ await PageObjects.visEditor.toggleOpenEditor(2, 'false');
+ await PageObjects.visEditor.clickBucket('Split rows');
+ await PageObjects.visEditor.selectAggregation('Terms');
+ await PageObjects.visEditor.selectField('geo.dest');
+ await PageObjects.visEditor.setSize(3, 3);
+ await PageObjects.visEditor.toggleOpenEditor(3, 'false');
+ await PageObjects.visEditor.clickBucket('Split rows');
+ await PageObjects.visEditor.selectAggregation('Terms');
+ await PageObjects.visEditor.selectField('geo.src');
+ await PageObjects.visEditor.setSize(3, 4);
+ await PageObjects.visEditor.toggleOpenEditor(4, 'false');
+ await PageObjects.visEditor.clickGo();
});
it('should have a splitted table', async () => {
- const data = await PageObjects.visualize.getTableVisContent();
+ const data = await PageObjects.visChart.getTableVisContent();
expect(data).to.be.eql([
[
['CN', 'CN', '330'],
@@ -439,10 +440,10 @@ export default function({ getService, getPageObjects }) {
});
it('should show metrics for split bucket when using showMetricsAtAllLevels', async () => {
- await PageObjects.visualize.clickOptionsTab();
- await PageObjects.visualize.checkCheckbox('showMetricsAtAllLevels');
- await PageObjects.visualize.clickGo();
- const data = await PageObjects.visualize.getTableVisContent();
+ await PageObjects.visEditor.clickOptionsTab();
+ await testSubjects.setCheckbox('showMetricsAtAllLevels', 'check');
+ await PageObjects.visEditor.clickGo();
+ const data = await PageObjects.visChart.getTableVisContent();
expect(data).to.be.eql([
[
['CN', '1,718', 'CN', '330'],
diff --git a/test/functional/apps/visualize/_data_table_nontimeindex.js b/test/functional/apps/visualize/_data_table_nontimeindex.js
index 77478f5d10edc..3db3cd094a81b 100644
--- a/test/functional/apps/visualize/_data_table_nontimeindex.js
+++ b/test/functional/apps/visualize/_data_table_nontimeindex.js
@@ -25,7 +25,7 @@ export default function({ getService, getPageObjects }) {
const retry = getService('retry');
const filterBar = getService('filterBar');
const renderable = getService('renderable');
- const PageObjects = getPageObjects(['common', 'visualize', 'header']);
+ const PageObjects = getPageObjects(['visualize', 'visEditor', 'header', 'visChart']);
describe.skip('data table with index without time filter', function indexPatternCreation() {
const vizName1 = 'Visualization DataTable without time filter';
@@ -40,27 +40,27 @@ export default function({ getService, getPageObjects }) {
PageObjects.visualize.index.LOGSTASH_NON_TIME_BASED
);
log.debug('Bucket = Split Rows');
- await PageObjects.visualize.clickBucket('Split rows');
+ await PageObjects.visEditor.clickBucket('Split rows');
log.debug('Aggregation = Histogram');
- await PageObjects.visualize.selectAggregation('Histogram');
+ await PageObjects.visEditor.selectAggregation('Histogram');
log.debug('Field = bytes');
- await PageObjects.visualize.selectField('bytes');
+ await PageObjects.visEditor.selectField('bytes');
log.debug('Interval = 2000');
- await PageObjects.visualize.setNumericInterval('2000');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.setInterval('2000', { type: 'numeric' });
+ await PageObjects.visEditor.clickGo();
});
it('should allow applying changed params', async () => {
- await PageObjects.visualize.setNumericInterval('1', { append: true });
- const interval = await PageObjects.visualize.getNumericInterval();
+ await PageObjects.visEditor.setInterval('1', { type: 'numeric', append: true });
+ const interval = await PageObjects.visEditor.getNumericInterval();
expect(interval).to.be('20001');
- const isApplyButtonEnabled = await PageObjects.visualize.isApplyEnabled();
+ const isApplyButtonEnabled = await PageObjects.visEditor.isApplyEnabled();
expect(isApplyButtonEnabled).to.be(true);
});
it('should allow reseting changed params', async () => {
- await PageObjects.visualize.clickReset();
- const interval = await PageObjects.visualize.getNumericInterval();
+ await PageObjects.visEditor.clickReset();
+ const interval = await PageObjects.visEditor.getNumericInterval();
expect(interval).to.be('2000');
});
@@ -68,7 +68,7 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.saveVisualizationExpectSuccessAndBreadcrumb(vizName1);
await PageObjects.visualize.loadSavedVisualization(vizName1);
- await PageObjects.visualize.waitForVisualization();
+ await PageObjects.visChart.waitForVisualization();
});
it('should have inspector enabled', async function() {
@@ -102,12 +102,12 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.clickNewSearch(
PageObjects.visualize.index.LOGSTASH_NON_TIME_BASED
);
- await PageObjects.visualize.clickBucket('Metric', 'metrics');
- await PageObjects.visualize.selectAggregation('Average Bucket', 'metrics');
- await PageObjects.visualize.selectAggregation('Terms', 'metrics', 'buckets');
- await PageObjects.visualize.selectField('geo.src', 'metrics', 'buckets');
- await PageObjects.visualize.clickGo();
- const data = await PageObjects.visualize.getTableVisData();
+ await PageObjects.visEditor.clickBucket('Metric', 'metrics');
+ await PageObjects.visEditor.selectAggregation('Average Bucket', 'metrics');
+ await PageObjects.visEditor.selectAggregation('Terms', 'metrics', 'buckets');
+ await PageObjects.visEditor.selectField('geo.src', 'metrics', 'buckets');
+ await PageObjects.visEditor.clickGo();
+ const data = await PageObjects.visChart.getTableVisData();
log.debug(data.split('\n'));
expect(data.trim().split('\n')).to.be.eql(['14,004 1,412.6']);
});
@@ -118,12 +118,12 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.clickNewSearch(
PageObjects.visualize.index.LOGSTASH_NON_TIME_BASED
);
- await PageObjects.visualize.clickBucket('Split rows');
- await PageObjects.visualize.selectAggregation('Date Histogram');
- await PageObjects.visualize.selectField('@timestamp');
- await PageObjects.visualize.setInterval('Daily');
- await PageObjects.visualize.clickGo();
- const data = await PageObjects.visualize.getTableVisData();
+ await PageObjects.visEditor.clickBucket('Split rows');
+ await PageObjects.visEditor.selectAggregation('Date Histogram');
+ await PageObjects.visEditor.selectField('@timestamp');
+ await PageObjects.visEditor.setInterval('Daily');
+ await PageObjects.visEditor.clickGo();
+ const data = await PageObjects.visChart.getTableVisData();
log.debug(data.split('\n'));
expect(data.trim().split('\n')).to.be.eql([
'2015-09-20',
@@ -141,12 +141,12 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.clickNewSearch(
PageObjects.visualize.index.LOGSTASH_NON_TIME_BASED
);
- await PageObjects.visualize.clickBucket('Split rows');
- await PageObjects.visualize.selectAggregation('Date Histogram');
- await PageObjects.visualize.selectField('@timestamp');
- await PageObjects.visualize.setInterval('Daily');
- await PageObjects.visualize.clickGo();
- const data = await PageObjects.visualize.getTableVisData();
+ await PageObjects.visEditor.clickBucket('Split rows');
+ await PageObjects.visEditor.selectAggregation('Date Histogram');
+ await PageObjects.visEditor.selectField('@timestamp');
+ await PageObjects.visEditor.setInterval('Daily');
+ await PageObjects.visEditor.clickGo();
+ const data = await PageObjects.visChart.getTableVisData();
expect(data.trim().split('\n')).to.be.eql([
'2015-09-20',
'4,757',
@@ -161,7 +161,7 @@ export default function({ getService, getPageObjects }) {
await filterBar.addFilter('@timestamp', 'is between', '2015-09-19', '2015-09-21');
await PageObjects.header.waitUntilLoadingHasFinished();
await renderable.waitForRender();
- const data = await PageObjects.visualize.getTableVisData();
+ const data = await PageObjects.visChart.getTableVisData();
expect(data.trim().split('\n')).to.be.eql(['2015-09-20', '4,757']);
});
@@ -169,7 +169,7 @@ export default function({ getService, getPageObjects }) {
await filterBar.toggleFilterPinned('@timestamp');
await PageObjects.header.waitUntilLoadingHasFinished();
await renderable.waitForRender();
- const data = await PageObjects.visualize.getTableVisData();
+ const data = await PageObjects.visChart.getTableVisData();
expect(data.trim().split('\n')).to.be.eql(['2015-09-20', '4,757']);
});
});
diff --git a/test/functional/apps/visualize/_embedding_chart.js b/test/functional/apps/visualize/_embedding_chart.js
index c16dc3b1279ff..940aa3eb5d462 100644
--- a/test/functional/apps/visualize/_embedding_chart.js
+++ b/test/functional/apps/visualize/_embedding_chart.js
@@ -24,7 +24,13 @@ export default function({ getService, getPageObjects }) {
const log = getService('log');
const renderable = getService('renderable');
const embedding = getService('embedding');
- const PageObjects = getPageObjects(['common', 'visualize', 'header', 'timePicker']);
+ const PageObjects = getPageObjects([
+ 'visualize',
+ 'visEditor',
+ 'visChart',
+ 'header',
+ 'timePicker',
+ ]);
describe('embedding', () => {
describe('a data table', () => {
@@ -33,22 +39,22 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.clickDataTable();
await PageObjects.visualize.clickNewSearch();
await PageObjects.timePicker.setDefaultAbsoluteRange();
- await PageObjects.visualize.clickBucket('Split rows');
- await PageObjects.visualize.selectAggregation('Date Histogram');
- await PageObjects.visualize.selectField('@timestamp');
- await PageObjects.visualize.toggleOpenEditor(2, 'false');
- await PageObjects.visualize.clickBucket('Split rows');
- await PageObjects.visualize.selectAggregation('Histogram');
- await PageObjects.visualize.selectField('bytes');
- await PageObjects.visualize.setNumericInterval('2000', undefined, 3);
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.clickBucket('Split rows');
+ await PageObjects.visEditor.selectAggregation('Date Histogram');
+ await PageObjects.visEditor.selectField('@timestamp');
+ await PageObjects.visEditor.toggleOpenEditor(2, 'false');
+ await PageObjects.visEditor.clickBucket('Split rows');
+ await PageObjects.visEditor.selectAggregation('Histogram');
+ await PageObjects.visEditor.selectField('bytes');
+ await PageObjects.visEditor.setInterval('2000', { type: 'numeric', aggNth: 3 });
+ await PageObjects.visEditor.clickGo();
});
it('should allow opening table vis in embedded mode', async () => {
await embedding.openInEmbeddedMode();
await renderable.waitForRender();
- const data = await PageObjects.visualize.getTableVisData();
+ const data = await PageObjects.visChart.getTableVisData();
log.debug(data.split('\n'));
expect(data.trim().split('\n')).to.be.eql([
'2015-09-20 00:00',
@@ -89,7 +95,7 @@ export default function({ getService, getPageObjects }) {
await PageObjects.header.waitUntilLoadingHasFinished();
await renderable.waitForRender();
- const data = await PageObjects.visualize.getTableVisData();
+ const data = await PageObjects.visChart.getTableVisData();
log.debug(data.split('\n'));
expect(data.trim().split('\n')).to.be.eql([
'2015-09-21 00:00',
@@ -126,11 +132,11 @@ export default function({ getService, getPageObjects }) {
});
it('should allow to change timerange from the visualization in embedded mode', async () => {
- await PageObjects.visualize.filterOnTableCell(1, 7);
+ await PageObjects.visChart.filterOnTableCell(1, 7);
await PageObjects.header.waitUntilLoadingHasFinished();
await renderable.waitForRender();
- const data = await PageObjects.visualize.getTableVisData();
+ const data = await PageObjects.visChart.getTableVisData();
log.debug(data.split('\n'));
expect(data.trim().split('\n')).to.be.eql([
'03:00',
diff --git a/test/functional/apps/visualize/_experimental_vis.js b/test/functional/apps/visualize/_experimental_vis.js
index ae364244b4f5c..2ce15cf913eff 100644
--- a/test/functional/apps/visualize/_experimental_vis.js
+++ b/test/functional/apps/visualize/_experimental_vis.js
@@ -21,7 +21,7 @@ import expect from '@kbn/expect';
export default ({ getService, getPageObjects }) => {
const log = getService('log');
- const PageObjects = getPageObjects(['common', 'visualize']);
+ const PageObjects = getPageObjects(['visualize']);
describe('visualize app', function() {
this.tags('smoke');
diff --git a/test/functional/apps/visualize/_gauge_chart.js b/test/functional/apps/visualize/_gauge_chart.js
index 2b9033d1ae9d2..7ebb4548f967b 100644
--- a/test/functional/apps/visualize/_gauge_chart.js
+++ b/test/functional/apps/visualize/_gauge_chart.js
@@ -24,7 +24,7 @@ export default function({ getService, getPageObjects }) {
const retry = getService('retry');
const inspector = getService('inspector');
const testSubjects = getService('testSubjects');
- const PageObjects = getPageObjects(['common', 'visualize', 'timePicker']);
+ const PageObjects = getPageObjects(['visualize', 'visEditor', 'visChart', 'timePicker']);
// FLAKY: https://github.com/elastic/kibana/issues/45089
describe('gauge chart', function indexPatternCreation() {
@@ -50,24 +50,24 @@ export default function({ getService, getPageObjects }) {
// initial metric of "Count" is selected by default
return retry.try(async function tryingForTime() {
- const metricValue = await PageObjects.visualize.getGaugeValue();
+ const metricValue = await PageObjects.visChart.getGaugeValue();
expect(expectedCount).to.eql(metricValue);
});
});
it('should show Split Gauges', async function() {
log.debug('Bucket = Split Group');
- await PageObjects.visualize.clickBucket('Split group');
+ await PageObjects.visEditor.clickBucket('Split group');
log.debug('Aggregation = Terms');
- await PageObjects.visualize.selectAggregation('Terms');
+ await PageObjects.visEditor.selectAggregation('Terms');
log.debug('Field = machine.os.raw');
- await PageObjects.visualize.selectField('machine.os.raw');
+ await PageObjects.visEditor.selectField('machine.os.raw');
log.debug('Size = 4');
- await PageObjects.visualize.setSize('4');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.setSize('4');
+ await PageObjects.visEditor.clickGo();
await retry.try(async () => {
- expect(await PageObjects.visualize.getGaugeValue()).to.eql([
+ expect(await PageObjects.visChart.getGaugeValue()).to.eql([
'2,904',
'win 8',
'2,858',
@@ -83,34 +83,34 @@ export default function({ getService, getPageObjects }) {
it('should show correct values for fields with fieldFormatters', async function() {
const expectedTexts = ['2,904', 'win 8: Count', '0B', 'win 8: Min bytes'];
- await PageObjects.visualize.selectAggregation('Terms');
- await PageObjects.visualize.selectField('machine.os.raw');
- await PageObjects.visualize.setSize('1');
- await PageObjects.visualize.clickBucket('Metric', 'metrics');
- await PageObjects.visualize.selectAggregation('Min', 'metrics');
- await PageObjects.visualize.selectField('bytes', 'metrics');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.selectAggregation('Terms');
+ await PageObjects.visEditor.selectField('machine.os.raw');
+ await PageObjects.visEditor.setSize('1');
+ await PageObjects.visEditor.clickBucket('Metric', 'metrics');
+ await PageObjects.visEditor.selectAggregation('Min', 'metrics');
+ await PageObjects.visEditor.selectField('bytes', 'metrics');
+ await PageObjects.visEditor.clickGo();
await retry.try(async function tryingForTime() {
- const metricValue = await PageObjects.visualize.getGaugeValue();
+ const metricValue = await PageObjects.visChart.getGaugeValue();
expect(expectedTexts).to.eql(metricValue);
});
});
it('should format the metric correctly in percentage mode', async function() {
await initGaugeVis();
- await PageObjects.visualize.clickMetricEditor();
- await PageObjects.visualize.selectAggregation('Average', 'metrics');
- await PageObjects.visualize.selectField('bytes', 'metrics');
- await PageObjects.visualize.clickOptionsTab();
+ await PageObjects.visEditor.clickMetricEditor();
+ await PageObjects.visEditor.selectAggregation('Average', 'metrics');
+ await PageObjects.visEditor.selectField('bytes', 'metrics');
+ await PageObjects.visEditor.clickOptionsTab();
await testSubjects.setValue('gaugeColorRange2__to', '10000');
await testSubjects.click('gaugePercentageMode');
- await PageObjects.visualize.waitForVisualizationRenderingStabilized();
- await PageObjects.visualize.clickGo();
+ await PageObjects.visChart.waitForVisualizationRenderingStabilized();
+ await PageObjects.visEditor.clickGo();
await retry.try(async function tryingForTime() {
const expectedTexts = ['57.273%', 'Average bytes'];
- const metricValue = await PageObjects.visualize.getGaugeValue();
+ const metricValue = await PageObjects.visChart.getGaugeValue();
expect(expectedTexts).to.eql(metricValue);
});
});
diff --git a/test/functional/apps/visualize/_heatmap_chart.js b/test/functional/apps/visualize/_heatmap_chart.js
index 226e490a6b232..2cea861d0f64d 100644
--- a/test/functional/apps/visualize/_heatmap_chart.js
+++ b/test/functional/apps/visualize/_heatmap_chart.js
@@ -22,7 +22,7 @@ import expect from '@kbn/expect';
export default function({ getService, getPageObjects }) {
const log = getService('log');
const inspector = getService('inspector');
- const PageObjects = getPageObjects(['common', 'visualize', 'timePicker']);
+ const PageObjects = getPageObjects(['visualize', 'visEditor', 'visChart', 'timePicker']);
describe('heatmap chart', function indexPatternCreation() {
this.tags('smoke');
@@ -36,20 +36,20 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.clickNewSearch();
await PageObjects.timePicker.setDefaultAbsoluteRange();
log.debug('Bucket = X-Axis');
- await PageObjects.visualize.clickBucket('X-axis');
+ await PageObjects.visEditor.clickBucket('X-axis');
log.debug('Aggregation = Date Histogram');
- await PageObjects.visualize.selectAggregation('Date Histogram');
+ await PageObjects.visEditor.selectAggregation('Date Histogram');
log.debug('Field = @timestamp');
- await PageObjects.visualize.selectField('@timestamp');
+ await PageObjects.visEditor.selectField('@timestamp');
// leaving Interval set to Auto
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.clickGo();
});
it('should save and load', async function() {
await PageObjects.visualize.saveVisualizationExpectSuccessAndBreadcrumb(vizName1);
await PageObjects.visualize.loadSavedVisualization(vizName1);
- await PageObjects.visualize.waitForVisualization();
+ await PageObjects.visChart.waitForVisualization();
});
it('should have inspector enabled', async function() {
@@ -87,16 +87,16 @@ export default function({ getService, getPageObjects }) {
});
it('should show 4 color ranges as default colorNumbers param', async function() {
- const legends = await PageObjects.visualize.getLegendEntries();
+ const legends = await PageObjects.visChart.getLegendEntries();
const expectedLegends = ['0 - 400', '400 - 800', '800 - 1,200', '1,200 - 1,600'];
expect(legends).to.eql(expectedLegends);
});
it('should show 6 color ranges if changed on options', async function() {
- await PageObjects.visualize.clickOptionsTab();
- await PageObjects.visualize.changeHeatmapColorNumbers(6);
- await PageObjects.visualize.clickGo();
- const legends = await PageObjects.visualize.getLegendEntries();
+ await PageObjects.visEditor.clickOptionsTab();
+ await PageObjects.visEditor.changeHeatmapColorNumbers(6);
+ await PageObjects.visEditor.clickGo();
+ const legends = await PageObjects.visChart.getLegendEntries();
const expectedLegends = [
'0 - 267',
'267 - 534',
@@ -108,23 +108,23 @@ export default function({ getService, getPageObjects }) {
expect(legends).to.eql(expectedLegends);
});
it('should show 6 custom color ranges', async function() {
- await PageObjects.visualize.clickOptionsTab();
- await PageObjects.visualize.clickEnableCustomRanges();
- await PageObjects.visualize.clickAddRange();
- await PageObjects.visualize.clickAddRange();
- await PageObjects.visualize.clickAddRange();
- await PageObjects.visualize.clickAddRange();
- await PageObjects.visualize.clickAddRange();
- await PageObjects.visualize.clickAddRange();
- await PageObjects.visualize.clickAddRange();
+ await PageObjects.visEditor.clickOptionsTab();
+ await PageObjects.visEditor.clickEnableCustomRanges();
+ await PageObjects.visEditor.clickAddRange();
+ await PageObjects.visEditor.clickAddRange();
+ await PageObjects.visEditor.clickAddRange();
+ await PageObjects.visEditor.clickAddRange();
+ await PageObjects.visEditor.clickAddRange();
+ await PageObjects.visEditor.clickAddRange();
+ await PageObjects.visEditor.clickAddRange();
log.debug('customize 2 last ranges');
- await PageObjects.visualize.setCustomRangeByIndex(6, '650', '720');
- await PageObjects.visualize.setCustomRangeByIndex(7, '800', '905');
+ await PageObjects.visEditor.setCustomRangeByIndex(6, '650', '720');
+ await PageObjects.visEditor.setCustomRangeByIndex(7, '800', '905');
- await PageObjects.visualize.waitForVisualizationRenderingStabilized();
- await PageObjects.visualize.clickGo();
- const legends = await PageObjects.visualize.getLegendEntries();
+ await PageObjects.visChart.waitForVisualizationRenderingStabilized();
+ await PageObjects.visEditor.clickGo();
+ const legends = await PageObjects.visChart.getLegendEntries();
const expectedLegends = [
'0 - 100',
'100 - 200',
diff --git a/test/functional/apps/visualize/_histogram_request_start.js b/test/functional/apps/visualize/_histogram_request_start.js
index a601e370a568f..a74fa8856a3b3 100644
--- a/test/functional/apps/visualize/_histogram_request_start.js
+++ b/test/functional/apps/visualize/_histogram_request_start.js
@@ -22,7 +22,13 @@ import expect from '@kbn/expect';
export default function({ getService, getPageObjects }) {
const log = getService('log');
const retry = getService('retry');
- const PageObjects = getPageObjects(['common', 'visualize', 'timePicker']);
+ const PageObjects = getPageObjects([
+ 'common',
+ 'visualize',
+ 'visEditor',
+ 'visChart',
+ 'timePicker',
+ ]);
describe('histogram agg onSearchRequestStart', function() {
before(async function() {
@@ -33,21 +39,21 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.clickNewSearch();
await PageObjects.timePicker.setDefaultAbsoluteRange();
log.debug('Bucket = Split Rows');
- await PageObjects.visualize.clickBucket('Split rows');
+ await PageObjects.visEditor.clickBucket('Split rows');
log.debug('Aggregation = Histogram');
- await PageObjects.visualize.selectAggregation('Histogram');
+ await PageObjects.visEditor.selectAggregation('Histogram');
log.debug('Field = machine.ram');
- await PageObjects.visualize.selectField('machine.ram');
+ await PageObjects.visEditor.selectField('machine.ram');
});
describe('interval parameter uses autoBounds', function() {
it('should use provided value when number of generated buckets is less than histogram:maxBars', async function() {
const providedInterval = 2400000000;
log.debug(`Interval = ${providedInterval}`);
- await PageObjects.visualize.setNumericInterval(providedInterval);
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.setInterval(providedInterval, { type: 'numeric' });
+ await PageObjects.visEditor.clickGo();
await retry.try(async () => {
- const data = await PageObjects.visualize.getTableVisData();
+ const data = await PageObjects.visChart.getTableVisData();
const dataArray = data.replace(/,/g, '').split('\n');
expect(dataArray.length).to.eql(20);
const bucketStart = parseInt(dataArray[0], 10);
@@ -60,11 +66,11 @@ export default function({ getService, getPageObjects }) {
it('should scale value to round number when number of generated buckets is greater than histogram:maxBars', async function() {
const providedInterval = 100;
log.debug(`Interval = ${providedInterval}`);
- await PageObjects.visualize.setNumericInterval(providedInterval);
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.setInterval(providedInterval, { type: 'numeric' });
+ await PageObjects.visEditor.clickGo();
await PageObjects.common.sleep(1000); //fix this
await retry.try(async () => {
- const data = await PageObjects.visualize.getTableVisData();
+ const data = await PageObjects.visChart.getTableVisData();
const dataArray = data.replace(/,/g, '').split('\n');
expect(dataArray.length).to.eql(20);
const bucketStart = parseInt(dataArray[0], 10);
diff --git a/test/functional/apps/visualize/_inspector.js b/test/functional/apps/visualize/_inspector.js
index 76b75f62b5f2a..84f955d9c7879 100644
--- a/test/functional/apps/visualize/_inspector.js
+++ b/test/functional/apps/visualize/_inspector.js
@@ -21,7 +21,7 @@ export default function({ getService, getPageObjects }) {
const log = getService('log');
const inspector = getService('inspector');
const filterBar = getService('filterBar');
- const PageObjects = getPageObjects(['common', 'visualize', 'timePicker']);
+ const PageObjects = getPageObjects(['visualize', 'visEditor', 'visChart', 'timePicker']);
describe('inspector', function describeIndexTests() {
this.tags('smoke');
@@ -39,10 +39,10 @@ export default function({ getService, getPageObjects }) {
await inspector.expectTableHeaders(['Count']);
log.debug('Add Average Metric on machine.ram field');
- await PageObjects.visualize.clickBucket('Y-axis', 'metrics');
- await PageObjects.visualize.selectAggregation('Average', 'metrics');
- await PageObjects.visualize.selectField('machine.ram', 'metrics');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.clickBucket('Y-axis', 'metrics');
+ await PageObjects.visEditor.selectAggregation('Average', 'metrics');
+ await PageObjects.visEditor.selectField('machine.ram', 'metrics');
+ await PageObjects.visEditor.clickGo();
await inspector.open();
await inspector.expectTableHeaders(['Count', 'Average machine.ram']);
});
@@ -50,23 +50,23 @@ export default function({ getService, getPageObjects }) {
describe('filtering on inspector table values', function() {
before(async function() {
log.debug('Add X-axis terms agg on machine.os.raw');
- await PageObjects.visualize.clickBucket('X-axis');
- await PageObjects.visualize.selectAggregation('Terms');
- await PageObjects.visualize.selectField('machine.os.raw');
- await PageObjects.visualize.setSize(2);
- await PageObjects.visualize.toggleOtherBucket(3);
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.clickBucket('X-axis');
+ await PageObjects.visEditor.selectAggregation('Terms');
+ await PageObjects.visEditor.selectField('machine.os.raw');
+ await PageObjects.visEditor.setSize(2);
+ await PageObjects.visEditor.toggleOtherBucket(3);
+ await PageObjects.visEditor.clickGo();
});
beforeEach(async function() {
await inspector.open();
- await PageObjects.visualize.waitForVisualizationRenderingStabilized();
+ await PageObjects.visChart.waitForVisualizationRenderingStabilized();
});
afterEach(async function() {
await inspector.close();
await filterBar.removeFilter('machine.os.raw');
- await PageObjects.visualize.waitForVisualizationRenderingStabilized();
+ await PageObjects.visChart.waitForVisualizationRenderingStabilized();
});
it('should allow filtering for values', async function() {
diff --git a/test/functional/apps/visualize/_line_chart.js b/test/functional/apps/visualize/_line_chart.js
index 6a0a21e76924d..becf66f0fd5b1 100644
--- a/test/functional/apps/visualize/_line_chart.js
+++ b/test/functional/apps/visualize/_line_chart.js
@@ -24,7 +24,13 @@ export default function({ getService, getPageObjects }) {
const inspector = getService('inspector');
const retry = getService('retry');
const testSubjects = getService('testSubjects');
- const PageObjects = getPageObjects(['common', 'visualize', 'timePicker']);
+ const PageObjects = getPageObjects([
+ 'common',
+ 'visualize',
+ 'visEditor',
+ 'visChart',
+ 'timePicker',
+ ]);
describe('line charts', function() {
const vizName1 = 'Visualization LineChart';
@@ -37,14 +43,14 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.clickNewSearch();
await PageObjects.timePicker.setDefaultAbsoluteRange();
log.debug('Bucket = Split chart');
- await PageObjects.visualize.clickBucket('Split chart');
+ await PageObjects.visEditor.clickBucket('Split chart');
log.debug('Aggregation = Terms');
- await PageObjects.visualize.selectAggregation('Terms');
+ await PageObjects.visEditor.selectAggregation('Terms');
log.debug('Field = extension');
- await PageObjects.visualize.selectField('extension.raw');
+ await PageObjects.visEditor.selectField('extension.raw');
log.debug('switch from Rows to Columns');
- await PageObjects.visualize.clickSplitDirection('Columns');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.clickSplitDirection('Columns');
+ await PageObjects.visEditor.clickGo();
};
before(initLineChart);
@@ -60,7 +66,7 @@ export default function({ getService, getPageObjects }) {
// sleep a bit before trying to get the chart data
await PageObjects.common.sleep(3000);
- const data = await PageObjects.visualize.getLineChartData();
+ const data = await PageObjects.visChart.getLineChartData();
log.debug('data=' + data);
const tolerance = 10; // the y-axis scale is 10000 so 10 is 0.1%
for (let x = 0; x < data.length; x++) {
@@ -91,10 +97,10 @@ export default function({ getService, getPageObjects }) {
const expectedChartData = ['png 1,373', 'php 445', 'jpg 9,109', 'gif 918', 'css 2,159'];
log.debug('Order By = Term');
- await PageObjects.visualize.selectOrderByMetric(2, '_key');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.selectOrderByMetric(2, '_key');
+ await PageObjects.visEditor.clickGo();
await retry.try(async function() {
- const data = await PageObjects.visualize.getLineChartData();
+ const data = await PageObjects.visChart.getLineChartData();
log.debug('data=' + data);
const tolerance = 10; // the y-axis scale is 10000 so 10 is 0.1%
for (let x = 0; x < data.length; x++) {
@@ -172,7 +178,7 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.saveVisualizationExpectSuccessAndBreadcrumb(vizName1);
await PageObjects.visualize.loadSavedVisualization(vizName1);
- await PageObjects.visualize.waitForVisualization();
+ await PageObjects.visChart.waitForVisualization();
});
describe.skip('switch between Y axis scale types', () => {
@@ -180,13 +186,13 @@ export default function({ getService, getPageObjects }) {
const axisId = 'ValueAxis-1';
it('should show ticks on selecting log scale', async () => {
- await PageObjects.visualize.clickMetricsAndAxes();
- await PageObjects.visualize.clickYAxisOptions(axisId);
- await PageObjects.visualize.selectYAxisScaleType(axisId, 'log');
- await PageObjects.visualize.clickYAxisAdvancedOptions(axisId);
- await PageObjects.visualize.changeYAxisFilterLabelsCheckbox(axisId, false);
- await PageObjects.visualize.clickGo();
- const labels = await PageObjects.visualize.getYAxisLabels();
+ await PageObjects.visEditor.clickMetricsAndAxes();
+ await PageObjects.visEditor.clickYAxisOptions(axisId);
+ await PageObjects.visEditor.selectYAxisScaleType(axisId, 'log');
+ await PageObjects.visEditor.clickYAxisAdvancedOptions(axisId);
+ await PageObjects.visEditor.changeYAxisFilterLabelsCheckbox(axisId, false);
+ await PageObjects.visEditor.clickGo();
+ const labels = await PageObjects.visChart.getYAxisLabels();
const expectedLabels = [
'2',
'3',
@@ -212,9 +218,9 @@ export default function({ getService, getPageObjects }) {
});
it('should show filtered ticks on selecting log scale', async () => {
- await PageObjects.visualize.changeYAxisFilterLabelsCheckbox(axisId, true);
- await PageObjects.visualize.clickGo();
- const labels = await PageObjects.visualize.getYAxisLabels();
+ await PageObjects.visEditor.changeYAxisFilterLabelsCheckbox(axisId, true);
+ await PageObjects.visEditor.clickGo();
+ const labels = await PageObjects.visChart.getYAxisLabels();
const expectedLabels = [
'2',
'3',
@@ -240,36 +246,36 @@ export default function({ getService, getPageObjects }) {
});
it('should show ticks on selecting square root scale', async () => {
- await PageObjects.visualize.selectYAxisScaleType(axisId, 'square root');
- await PageObjects.visualize.changeYAxisFilterLabelsCheckbox(axisId, false);
- await PageObjects.visualize.clickGo();
- const labels = await PageObjects.visualize.getYAxisLabels();
+ await PageObjects.visEditor.selectYAxisScaleType(axisId, 'square root');
+ await PageObjects.visEditor.changeYAxisFilterLabelsCheckbox(axisId, false);
+ await PageObjects.visEditor.clickGo();
+ const labels = await PageObjects.visChart.getYAxisLabels();
const expectedLabels = ['0', '2,000', '4,000', '6,000', '8,000', '10,000'];
expect(labels).to.eql(expectedLabels);
});
it('should show filtered ticks on selecting square root scale', async () => {
- await PageObjects.visualize.changeYAxisFilterLabelsCheckbox(axisId, true);
- await PageObjects.visualize.clickGo();
- const labels = await PageObjects.visualize.getYAxisLabels();
+ await PageObjects.visEditor.changeYAxisFilterLabelsCheckbox(axisId, true);
+ await PageObjects.visEditor.clickGo();
+ const labels = await PageObjects.visChart.getYAxisLabels();
const expectedLabels = ['2,000', '4,000', '6,000', '8,000'];
expect(labels).to.eql(expectedLabels);
});
it('should show ticks on selecting linear scale', async () => {
- await PageObjects.visualize.selectYAxisScaleType(axisId, 'linear');
- await PageObjects.visualize.changeYAxisFilterLabelsCheckbox(axisId, false);
- await PageObjects.visualize.clickGo();
- const labels = await PageObjects.visualize.getYAxisLabels();
+ await PageObjects.visEditor.selectYAxisScaleType(axisId, 'linear');
+ await PageObjects.visEditor.changeYAxisFilterLabelsCheckbox(axisId, false);
+ await PageObjects.visEditor.clickGo();
+ const labels = await PageObjects.visChart.getYAxisLabels();
log.debug(labels);
const expectedLabels = ['0', '2,000', '4,000', '6,000', '8,000', '10,000'];
expect(labels).to.eql(expectedLabels);
});
it('should show filtered ticks on selecting linear scale', async () => {
- await PageObjects.visualize.changeYAxisFilterLabelsCheckbox(axisId, true);
- await PageObjects.visualize.clickGo();
- const labels = await PageObjects.visualize.getYAxisLabels();
+ await PageObjects.visEditor.changeYAxisFilterLabelsCheckbox(axisId, true);
+ await PageObjects.visEditor.clickGo();
+ const labels = await PageObjects.visChart.getYAxisLabels();
const expectedLabels = ['2,000', '4,000', '6,000', '8,000'];
expect(labels).to.eql(expectedLabels);
});
diff --git a/test/functional/apps/visualize/_linked_saved_searches.js b/test/functional/apps/visualize/_linked_saved_searches.js
index 9bbe8c9d2147c..37ec3f06f2ecd 100644
--- a/test/functional/apps/visualize/_linked_saved_searches.js
+++ b/test/functional/apps/visualize/_linked_saved_searches.js
@@ -22,7 +22,14 @@ import expect from '@kbn/expect';
export default function({ getService, getPageObjects }) {
const filterBar = getService('filterBar');
const retry = getService('retry');
- const PageObjects = getPageObjects(['common', 'discover', 'visualize', 'header', 'timePicker']);
+ const PageObjects = getPageObjects([
+ 'common',
+ 'discover',
+ 'visualize',
+ 'header',
+ 'timePicker',
+ 'visChart',
+ ]);
describe('visualize app', function describeIndexTests() {
describe('linked saved searched', () => {
@@ -43,7 +50,7 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.clickSavedSearch(savedSearchName);
await PageObjects.timePicker.setDefaultAbsoluteRange();
await retry.waitFor('wait for count to equal 9,109', async () => {
- const data = await PageObjects.visualize.getTableVisData();
+ const data = await PageObjects.visChart.getTableVisData();
return data.trim() === '9,109';
});
});
@@ -54,7 +61,7 @@ export default function({ getService, getPageObjects }) {
'Sep 21, 2015 @ 10:00:00.000'
);
await retry.waitFor('wait for count to equal 3,950', async () => {
- const data = await PageObjects.visualize.getTableVisData();
+ const data = await PageObjects.visChart.getTableVisData();
return data.trim() === '3,950';
});
});
@@ -63,7 +70,7 @@ export default function({ getService, getPageObjects }) {
await filterBar.addFilter('bytes', 'is between', '100', '3000');
await PageObjects.header.waitUntilLoadingHasFinished();
await retry.waitFor('wait for count to equal 707', async () => {
- const data = await PageObjects.visualize.getTableVisData();
+ const data = await PageObjects.visChart.getTableVisData();
return data.trim() === '707';
});
});
@@ -71,7 +78,7 @@ export default function({ getService, getPageObjects }) {
it('should allow unlinking from a linked search', async () => {
await PageObjects.visualize.clickUnlinkSavedSearch();
await retry.waitFor('wait for count to equal 707', async () => {
- const data = await PageObjects.visualize.getTableVisData();
+ const data = await PageObjects.visChart.getTableVisData();
return data.trim() === '707';
});
// The filter on the saved search should now be in the editor
@@ -82,7 +89,7 @@ export default function({ getService, getPageObjects }) {
await filterBar.toggleFilterEnabled('extension.raw');
await PageObjects.header.waitUntilLoadingHasFinished();
await retry.waitFor('wait for count to equal 1,293', async () => {
- const unfilteredData = await PageObjects.visualize.getTableVisData();
+ const unfilteredData = await PageObjects.visChart.getTableVisData();
return unfilteredData.trim() === '1,293';
});
});
@@ -91,7 +98,7 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.saveVisualizationExpectSuccess('Unlinked before saved');
await PageObjects.header.waitUntilLoadingHasFinished();
await retry.waitFor('wait for count to equal 1,293', async () => {
- const data = await PageObjects.visualize.getTableVisData();
+ const data = await PageObjects.visChart.getTableVisData();
return data.trim() === '1,293';
});
});
diff --git a/test/functional/apps/visualize/_markdown_vis.js b/test/functional/apps/visualize/_markdown_vis.js
index 870c465f2de37..51c03c90f507b 100644
--- a/test/functional/apps/visualize/_markdown_vis.js
+++ b/test/functional/apps/visualize/_markdown_vis.js
@@ -20,7 +20,7 @@
import expect from '@kbn/expect';
export default function({ getPageObjects, getService }) {
- const PageObjects = getPageObjects(['common', 'visualize', 'header']);
+ const PageObjects = getPageObjects(['visualize', 'visEditor', 'visChart', 'header']);
const find = getService('find');
const inspector = getService('inspector');
const markdown = `
@@ -33,8 +33,8 @@ export default function({ getPageObjects, getService }) {
before(async function() {
await PageObjects.visualize.navigateToNewVisualization();
await PageObjects.visualize.clickMarkdownWidget();
- await PageObjects.visualize.setMarkdownTxt(markdown);
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.setMarkdownTxt(markdown);
+ await PageObjects.visEditor.clickGo();
});
describe('markdown vis', () => {
@@ -43,29 +43,29 @@ export default function({ getPageObjects, getService }) {
});
it('should render markdown as html', async function() {
- const h1Txt = await PageObjects.visualize.getMarkdownBodyDescendentText('h1');
+ const h1Txt = await PageObjects.visChart.getMarkdownBodyDescendentText('h1');
expect(h1Txt).to.equal('Heading 1');
});
it('should not render html in markdown as html', async function() {
const expected = 'Heading 1\nInline HTML that should not be rendered as html
';
- const actual = await PageObjects.visualize.getMarkdownText();
+ const actual = await PageObjects.visChart.getMarkdownText();
expect(actual).to.equal(expected);
});
it('should auto apply changes if auto mode is turned on', async function() {
const markdown2 = '## Heading 2';
- await PageObjects.visualize.toggleAutoMode();
- await PageObjects.visualize.setMarkdownTxt(markdown2);
+ await PageObjects.visEditor.toggleAutoMode();
+ await PageObjects.visEditor.setMarkdownTxt(markdown2);
await PageObjects.header.waitUntilLoadingHasFinished();
- const h1Txt = await PageObjects.visualize.getMarkdownBodyDescendentText('h2');
+ const h1Txt = await PageObjects.visChart.getMarkdownBodyDescendentText('h2');
expect(h1Txt).to.equal('Heading 2');
});
it('should resize the editor', async function() {
const editorSidebar = await find.byCssSelector('.visEditor__sidebar');
const initialSize = await editorSidebar.getSize();
- await PageObjects.visualize.sizeUpEditor();
+ await PageObjects.visEditor.sizeUpEditor();
const afterSize = await editorSidebar.getSize();
expect(afterSize.width).to.be.greaterThan(initialSize.width);
});
diff --git a/test/functional/apps/visualize/_metric_chart.js b/test/functional/apps/visualize/_metric_chart.js
index 31140a1718cfe..6a95f7553943c 100644
--- a/test/functional/apps/visualize/_metric_chart.js
+++ b/test/functional/apps/visualize/_metric_chart.js
@@ -24,7 +24,7 @@ export default function({ getService, getPageObjects }) {
const retry = getService('retry');
const filterBar = getService('filterBar');
const inspector = getService('inspector');
- const PageObjects = getPageObjects(['common', 'visualize', 'timePicker']);
+ const PageObjects = getPageObjects(['visualize', 'visEditor', 'visChart', 'timePicker']);
describe('metric chart', function() {
before(async function() {
@@ -45,21 +45,21 @@ export default function({ getService, getPageObjects }) {
// initial metric of "Count" is selected by default
await retry.try(async function tryingForTime() {
- const metricValue = await PageObjects.visualize.getMetric();
+ const metricValue = await PageObjects.visChart.getMetric();
expect(expectedCount).to.eql(metricValue);
});
});
it('should show Average', async function() {
const avgMachineRam = ['13,104,036,080.615', 'Average machine.ram'];
- await PageObjects.visualize.clickMetricEditor();
+ await PageObjects.visEditor.clickMetricEditor();
log.debug('Aggregation = Average');
- await PageObjects.visualize.selectAggregation('Average', 'metrics');
+ await PageObjects.visEditor.selectAggregation('Average', 'metrics');
log.debug('Field = machine.ram');
- await PageObjects.visualize.selectField('machine.ram', 'metrics');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.selectField('machine.ram', 'metrics');
+ await PageObjects.visEditor.clickGo();
await retry.try(async function tryingForTime() {
- const metricValue = await PageObjects.visualize.getMetric();
+ const metricValue = await PageObjects.visChart.getMetric();
expect(avgMachineRam).to.eql(metricValue);
});
});
@@ -67,12 +67,12 @@ export default function({ getService, getPageObjects }) {
it('should show Sum', async function() {
const sumPhpMemory = ['85,865,880', 'Sum of phpmemory'];
log.debug('Aggregation = Sum');
- await PageObjects.visualize.selectAggregation('Sum', 'metrics');
+ await PageObjects.visEditor.selectAggregation('Sum', 'metrics');
log.debug('Field = phpmemory');
- await PageObjects.visualize.selectField('phpmemory', 'metrics');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.selectField('phpmemory', 'metrics');
+ await PageObjects.visEditor.clickGo();
await retry.try(async function tryingForTime() {
- const metricValue = await PageObjects.visualize.getMetric();
+ const metricValue = await PageObjects.visChart.getMetric();
expect(sumPhpMemory).to.eql(metricValue);
});
});
@@ -81,12 +81,12 @@ export default function({ getService, getPageObjects }) {
const medianBytes = ['5,565.263', '50th percentile of bytes'];
// For now, only comparing the text label part of the metric
log.debug('Aggregation = Median');
- await PageObjects.visualize.selectAggregation('Median', 'metrics');
+ await PageObjects.visEditor.selectAggregation('Median', 'metrics');
log.debug('Field = bytes');
- await PageObjects.visualize.selectField('bytes', 'metrics');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.selectField('bytes', 'metrics');
+ await PageObjects.visEditor.clickGo();
await retry.try(async function tryingForTime() {
- const metricValue = await PageObjects.visualize.getMetric();
+ const metricValue = await PageObjects.visChart.getMetric();
// only comparing the text label!
expect(medianBytes[1]).to.eql(metricValue[1]);
});
@@ -95,12 +95,12 @@ export default function({ getService, getPageObjects }) {
it('should show Min', async function() {
const minTimestamp = ['Sep 20, 2015 @ 00:00:00.000', 'Min @timestamp'];
log.debug('Aggregation = Min');
- await PageObjects.visualize.selectAggregation('Min', 'metrics');
+ await PageObjects.visEditor.selectAggregation('Min', 'metrics');
log.debug('Field = @timestamp');
- await PageObjects.visualize.selectField('@timestamp', 'metrics');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.selectField('@timestamp', 'metrics');
+ await PageObjects.visEditor.clickGo();
await retry.try(async function tryingForTime() {
- const metricValue = await PageObjects.visualize.getMetric();
+ const metricValue = await PageObjects.visChart.getMetric();
expect(minTimestamp).to.eql(metricValue);
});
});
@@ -111,12 +111,12 @@ export default function({ getService, getPageObjects }) {
'Max relatedContent.article:modified_time',
];
log.debug('Aggregation = Max');
- await PageObjects.visualize.selectAggregation('Max', 'metrics');
+ await PageObjects.visEditor.selectAggregation('Max', 'metrics');
log.debug('Field = relatedContent.article:modified_time');
- await PageObjects.visualize.selectField('relatedContent.article:modified_time', 'metrics');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.selectField('relatedContent.article:modified_time', 'metrics');
+ await PageObjects.visEditor.clickGo();
await retry.try(async function tryingForTime() {
- const metricValue = await PageObjects.visualize.getMetric();
+ const metricValue = await PageObjects.visChart.getMetric();
expect(maxRelatedContentArticleModifiedTime).to.eql(metricValue);
});
});
@@ -124,12 +124,12 @@ export default function({ getService, getPageObjects }) {
it('should show Unique Count', async function() {
const uniqueCountClientip = ['1,000', 'Unique count of clientip'];
log.debug('Aggregation = Unique Count');
- await PageObjects.visualize.selectAggregation('Unique Count', 'metrics');
+ await PageObjects.visEditor.selectAggregation('Unique Count', 'metrics');
log.debug('Field = clientip');
- await PageObjects.visualize.selectField('clientip', 'metrics');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.selectField('clientip', 'metrics');
+ await PageObjects.visEditor.clickGo();
await retry.try(async function tryingForTime() {
- const metricValue = await PageObjects.visualize.getMetric();
+ const metricValue = await PageObjects.visChart.getMetric();
expect(uniqueCountClientip).to.eql(metricValue);
});
});
@@ -153,12 +153,12 @@ export default function({ getService, getPageObjects }) {
];
log.debug('Aggregation = Percentiles');
- await PageObjects.visualize.selectAggregation('Percentiles', 'metrics');
+ await PageObjects.visEditor.selectAggregation('Percentiles', 'metrics');
log.debug('Field = machine.ram');
- await PageObjects.visualize.selectField('machine.ram', 'metrics');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.selectField('machine.ram', 'metrics');
+ await PageObjects.visEditor.clickGo();
await retry.try(async function tryingForTime() {
- const metricValue = await PageObjects.visualize.getMetric();
+ const metricValue = await PageObjects.visChart.getMetric();
expect(percentileMachineRam).to.eql(metricValue);
});
});
@@ -166,14 +166,14 @@ export default function({ getService, getPageObjects }) {
it('should show Percentile Ranks', async function() {
const percentileRankBytes = ['2.036%', 'Percentile rank 99 of "memory"'];
log.debug('Aggregation = Percentile Ranks');
- await PageObjects.visualize.selectAggregation('Percentile Ranks', 'metrics');
+ await PageObjects.visEditor.selectAggregation('Percentile Ranks', 'metrics');
log.debug('Field = bytes');
- await PageObjects.visualize.selectField('memory', 'metrics');
+ await PageObjects.visEditor.selectField('memory', 'metrics');
log.debug('Values = 99');
- await PageObjects.visualize.setValue('99');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.setValue('99');
+ await PageObjects.visEditor.clickGo();
await retry.try(async function tryingForTime() {
- const metricValue = await PageObjects.visualize.getMetric();
+ const metricValue = await PageObjects.visChart.getMetric();
expect(percentileRankBytes).to.eql(metricValue);
});
});
@@ -183,7 +183,7 @@ export default function({ getService, getPageObjects }) {
let filterCount = 0;
await retry.try(async function tryingForTime() {
// click first metric bucket
- await PageObjects.visualize.clickMetricByIndex(0);
+ await PageObjects.visEditor.clickMetricByIndex(0);
filterCount = await filterBar.getFilterCount();
});
expect(filterCount).to.equal(0);
@@ -191,17 +191,17 @@ export default function({ getService, getPageObjects }) {
it('should allow filtering with buckets', async function() {
log.debug('Bucket = Split Group');
- await PageObjects.visualize.clickBucket('Split group');
+ await PageObjects.visEditor.clickBucket('Split group');
log.debug('Aggregation = Terms');
- await PageObjects.visualize.selectAggregation('Terms');
+ await PageObjects.visEditor.selectAggregation('Terms');
log.debug('Field = machine.os.raw');
- await PageObjects.visualize.selectField('machine.os.raw');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.selectField('machine.os.raw');
+ await PageObjects.visEditor.clickGo();
let filterCount = 0;
await retry.try(async function tryingForTime() {
// click first metric bucket
- await PageObjects.visualize.clickMetricByIndex(0);
+ await PageObjects.visEditor.clickMetricByIndex(0);
filterCount = await filterBar.getFilterCount();
});
await filterBar.removeAllFilters();
diff --git a/test/functional/apps/visualize/_pie_chart.js b/test/functional/apps/visualize/_pie_chart.js
index 03067bb2182c5..313a4e39e5030 100644
--- a/test/functional/apps/visualize/_pie_chart.js
+++ b/test/functional/apps/visualize/_pie_chart.js
@@ -24,7 +24,14 @@ export default function({ getService, getPageObjects }) {
const filterBar = getService('filterBar');
const pieChart = getService('pieChart');
const inspector = getService('inspector');
- const PageObjects = getPageObjects(['common', 'visualize', 'header', 'settings', 'timePicker']);
+ const PageObjects = getPageObjects([
+ 'common',
+ 'visualize',
+ 'visEditor',
+ 'visChart',
+ 'header',
+ 'timePicker',
+ ]);
describe('pie chart', function() {
const vizName1 = 'Visualization PieChart';
@@ -36,24 +43,24 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.clickNewSearch();
await PageObjects.timePicker.setDefaultAbsoluteRange();
log.debug('select bucket Split slices');
- await PageObjects.visualize.clickBucket('Split slices');
+ await PageObjects.visEditor.clickBucket('Split slices');
log.debug('Click aggregation Histogram');
- await PageObjects.visualize.selectAggregation('Histogram');
+ await PageObjects.visEditor.selectAggregation('Histogram');
log.debug('Click field memory');
- await PageObjects.visualize.selectField('memory');
+ await PageObjects.visEditor.selectField('memory');
await PageObjects.header.waitUntilLoadingHasFinished();
await PageObjects.common.sleep(1003);
log.debug('setNumericInterval 4000');
- await PageObjects.visualize.setNumericInterval('40000');
+ await PageObjects.visEditor.setInterval('40000', { type: 'numeric' });
log.debug('clickGo');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.clickGo();
});
it('should save and load', async function() {
await PageObjects.visualize.saveVisualizationExpectSuccessAndBreadcrumb(vizName1);
await PageObjects.visualize.loadSavedVisualization(vizName1);
- await PageObjects.visualize.waitForVisualization();
+ await PageObjects.visChart.waitForVisualization();
});
it('should have inspector enabled', async function() {
@@ -93,15 +100,15 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.clickNewSearch();
await PageObjects.timePicker.setDefaultAbsoluteRange();
log.debug('select bucket Split slices');
- await PageObjects.visualize.clickBucket('Split slices');
+ await PageObjects.visEditor.clickBucket('Split slices');
log.debug('Click aggregation Terms');
- await PageObjects.visualize.selectAggregation('Terms');
+ await PageObjects.visEditor.selectAggregation('Terms');
log.debug('Click field machine.os.raw');
- await PageObjects.visualize.selectField('machine.os.raw');
- await PageObjects.visualize.toggleOtherBucket(2);
- await PageObjects.visualize.toggleMissingBucket(2);
+ await PageObjects.visEditor.selectField('machine.os.raw');
+ await PageObjects.visEditor.toggleOtherBucket(2);
+ await PageObjects.visEditor.toggleMissingBucket(2);
log.debug('clickGo');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.clickGo();
await pieChart.expectPieChartLabels(expectedTableData);
});
@@ -109,20 +116,20 @@ export default function({ getService, getPageObjects }) {
const expectedTableData = ['Missing', 'osx'];
await pieChart.filterOnPieSlice('Other');
- await PageObjects.visualize.waitForVisualization();
+ await PageObjects.visChart.waitForVisualization();
await pieChart.expectPieChartLabels(expectedTableData);
await filterBar.removeFilter('machine.os.raw');
- await PageObjects.visualize.waitForVisualization();
+ await PageObjects.visChart.waitForVisualization();
});
it('should apply correct filter on other bucket by clicking on a legend', async () => {
const expectedTableData = ['Missing', 'osx'];
- await PageObjects.visualize.filterLegend('Other');
- await PageObjects.visualize.waitForVisualization();
+ await PageObjects.visChart.filterLegend('Other');
+ await PageObjects.visChart.waitForVisualization();
await pieChart.expectPieChartLabels(expectedTableData);
await filterBar.removeFilter('machine.os.raw');
- await PageObjects.visualize.waitForVisualization();
+ await PageObjects.visChart.waitForVisualization();
});
it('should show two levels of other buckets', async () => {
@@ -171,15 +178,15 @@ export default function({ getService, getPageObjects }) {
'Other',
];
- await PageObjects.visualize.toggleOpenEditor(2, 'false');
- await PageObjects.visualize.clickBucket('Split slices');
- await PageObjects.visualize.selectAggregation('Terms');
+ await PageObjects.visEditor.toggleOpenEditor(2, 'false');
+ await PageObjects.visEditor.clickBucket('Split slices');
+ await PageObjects.visEditor.selectAggregation('Terms');
log.debug('Click field geo.src');
- await PageObjects.visualize.selectField('geo.src');
- await PageObjects.visualize.toggleOtherBucket(3);
- await PageObjects.visualize.toggleMissingBucket(3);
+ await PageObjects.visEditor.selectField('geo.src');
+ await PageObjects.visEditor.toggleOtherBucket(3);
+ await PageObjects.visEditor.toggleMissingBucket(3);
log.debug('clickGo');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.clickGo();
await pieChart.expectPieChartLabels(expectedTableData);
});
});
@@ -187,17 +194,17 @@ export default function({ getService, getPageObjects }) {
describe('disabled aggs', () => {
before(async () => {
await PageObjects.visualize.loadSavedVisualization(vizName1);
- await PageObjects.visualize.waitForRenderingCount();
+ await PageObjects.visChart.waitForRenderingCount();
});
it('should show correct result with one agg disabled', async () => {
const expectedTableData = ['win 8', 'win xp', 'win 7', 'ios', 'osx'];
- await PageObjects.visualize.clickBucket('Split slices');
- await PageObjects.visualize.selectAggregation('Terms');
- await PageObjects.visualize.selectField('machine.os.raw');
- await PageObjects.visualize.toggleDisabledAgg(2);
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.clickBucket('Split slices');
+ await PageObjects.visEditor.selectAggregation('Terms');
+ await PageObjects.visEditor.selectField('machine.os.raw');
+ await PageObjects.visEditor.toggleDisabledAgg(2);
+ await PageObjects.visEditor.clickGo();
await pieChart.expectPieChartLabels(expectedTableData);
});
@@ -206,15 +213,15 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.saveVisualizationExpectSuccessAndBreadcrumb(vizName1);
await PageObjects.visualize.loadSavedVisualization(vizName1);
- await PageObjects.visualize.waitForRenderingCount();
+ await PageObjects.visChart.waitForRenderingCount();
const expectedTableData = ['win 8', 'win xp', 'win 7', 'ios', 'osx'];
await pieChart.expectPieChartLabels(expectedTableData);
});
it('should show correct result when agg is re-enabled', async () => {
- await PageObjects.visualize.toggleDisabledAgg(2);
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.toggleDisabledAgg(2);
+ await PageObjects.visEditor.clickGo();
const expectedTableData = [
'0',
@@ -291,24 +298,24 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.clickNewSearch();
await PageObjects.timePicker.setDefaultAbsoluteRange();
log.debug('select bucket Split slices');
- await PageObjects.visualize.clickBucket('Split slices');
+ await PageObjects.visEditor.clickBucket('Split slices');
log.debug('Click aggregation Filters');
- await PageObjects.visualize.selectAggregation('Filters');
+ await PageObjects.visEditor.selectAggregation('Filters');
log.debug('Set the 1st filter value');
- await PageObjects.visualize.setFilterAggregationValue('geo.dest:"US"');
+ await PageObjects.visEditor.setFilterAggregationValue('geo.dest:"US"');
log.debug('Add new filter');
- await PageObjects.visualize.addNewFilterAggregation();
+ await PageObjects.visEditor.addNewFilterAggregation();
log.debug('Set the 2nd filter value');
- await PageObjects.visualize.setFilterAggregationValue('geo.dest:"CN"', 1);
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.setFilterAggregationValue('geo.dest:"CN"', 1);
+ await PageObjects.visEditor.clickGo();
const emptyFromTime = 'Sep 19, 2016 @ 06:31:44.000';
const emptyToTime = 'Sep 23, 2016 @ 18:31:44.000';
log.debug(
'Switch to a different time range from "' + emptyFromTime + '" to "' + emptyToTime + '"'
);
await PageObjects.timePicker.setAbsoluteRange(emptyFromTime, emptyToTime);
- await PageObjects.visualize.waitForVisualization();
- await PageObjects.visualize.expectError();
+ await PageObjects.visChart.waitForVisualization();
+ await PageObjects.visChart.expectError();
});
});
describe('multi series slice', () => {
@@ -327,22 +334,22 @@ export default function({ getService, getPageObjects }) {
);
await PageObjects.timePicker.setDefaultAbsoluteRange();
log.debug('select bucket Split slices');
- await PageObjects.visualize.clickBucket('Split slices');
+ await PageObjects.visEditor.clickBucket('Split slices');
log.debug('Click aggregation Histogram');
- await PageObjects.visualize.selectAggregation('Histogram');
+ await PageObjects.visEditor.selectAggregation('Histogram');
log.debug('Click field memory');
- await PageObjects.visualize.selectField('memory');
+ await PageObjects.visEditor.selectField('memory');
await PageObjects.header.waitUntilLoadingHasFinished();
await PageObjects.common.sleep(1003);
log.debug('setNumericInterval 4000');
- await PageObjects.visualize.setNumericInterval('40000');
+ await PageObjects.visEditor.setInterval('40000', { type: 'numeric' });
log.debug('Toggle previous editor');
- await PageObjects.visualize.toggleAggregationEditor(2);
+ await PageObjects.visEditor.toggleAggregationEditor(2);
log.debug('select bucket Split slices');
- await PageObjects.visualize.clickBucket('Split slices');
- await PageObjects.visualize.selectAggregation('Terms');
- await PageObjects.visualize.selectField('geo.dest');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.clickBucket('Split slices');
+ await PageObjects.visEditor.selectAggregation('Terms');
+ await PageObjects.visEditor.selectField('geo.dest');
+ await PageObjects.visEditor.clickGo();
});
it('should show correct chart', async () => {
@@ -428,11 +435,11 @@ export default function({ getService, getPageObjects }) {
'360,000',
'CN',
];
- await PageObjects.visualize.filterLegend('CN');
- await PageObjects.visualize.waitForVisualization();
+ await PageObjects.visChart.filterLegend('CN');
+ await PageObjects.visChart.waitForVisualization();
await pieChart.expectPieChartLabels(expectedTableData);
await filterBar.removeFilter('geo.dest');
- await PageObjects.visualize.waitForVisualization();
+ await PageObjects.visChart.waitForVisualization();
});
it('should still showing pie chart when a subseries have zero data', async function() {
@@ -442,21 +449,21 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.clickNewSearch();
await PageObjects.timePicker.setDefaultAbsoluteRange();
log.debug('select bucket Split slices');
- await PageObjects.visualize.clickBucket('Split slices');
+ await PageObjects.visEditor.clickBucket('Split slices');
log.debug('Click aggregation Filters');
- await PageObjects.visualize.selectAggregation('Filters');
+ await PageObjects.visEditor.selectAggregation('Filters');
log.debug('Set the 1st filter value');
- await PageObjects.visualize.setFilterAggregationValue('geo.dest:"US"');
+ await PageObjects.visEditor.setFilterAggregationValue('geo.dest:"US"');
log.debug('Toggle previous editor');
- await PageObjects.visualize.toggleAggregationEditor(2);
+ await PageObjects.visEditor.toggleAggregationEditor(2);
log.debug('Add a new series, select bucket Split slices');
- await PageObjects.visualize.clickBucket('Split slices');
+ await PageObjects.visEditor.clickBucket('Split slices');
log.debug('Click aggregation Filters');
- await PageObjects.visualize.selectAggregation('Filters');
+ await PageObjects.visEditor.selectAggregation('Filters');
log.debug('Set the 1st filter value of the aggregation id 3');
- await PageObjects.visualize.setFilterAggregationValue('geo.dest:"UX"', 0, 3);
- await PageObjects.visualize.clickGo();
- const legends = await PageObjects.visualize.getLegendEntries();
+ await PageObjects.visEditor.setFilterAggregationValue('geo.dest:"UX"', 0, 3);
+ await PageObjects.visEditor.clickGo();
+ const legends = await PageObjects.visChart.getLegendEntries();
const expectedLegends = ['geo.dest:"US"', 'geo.dest:"UX"'];
expect(legends).to.eql(expectedLegends);
});
@@ -469,15 +476,15 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.clickNewSearch();
await PageObjects.timePicker.setDefaultAbsoluteRange();
log.debug('select bucket Split chart');
- await PageObjects.visualize.clickBucket('Split chart');
- await PageObjects.visualize.selectAggregation('Terms');
- await PageObjects.visualize.selectField('machine.os.raw');
- await PageObjects.visualize.toggleAggregationEditor(2);
+ await PageObjects.visEditor.clickBucket('Split chart');
+ await PageObjects.visEditor.selectAggregation('Terms');
+ await PageObjects.visEditor.selectField('machine.os.raw');
+ await PageObjects.visEditor.toggleAggregationEditor(2);
log.debug('Add a new series, select bucket Split slices');
- await PageObjects.visualize.clickBucket('Split slices');
- await PageObjects.visualize.selectAggregation('Terms');
- await PageObjects.visualize.selectField('geo.src');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.clickBucket('Split slices');
+ await PageObjects.visEditor.selectAggregation('Terms');
+ await PageObjects.visEditor.selectField('geo.src');
+ await PageObjects.visEditor.clickGo();
});
it('shows correct split chart', async () => {
@@ -522,7 +529,7 @@ export default function({ getService, getPageObjects }) {
['ios', '478', 'CN', '478'],
['osx', '228', 'CN', '228'],
];
- await PageObjects.visualize.filterLegend('CN');
+ await PageObjects.visChart.filterLegend('CN');
await PageObjects.header.waitUntilLoadingHasFinished();
await inspector.open();
await inspector.setTablePageSize(50);
diff --git a/test/functional/apps/visualize/_point_series_options.js b/test/functional/apps/visualize/_point_series_options.js
index 2d496cb575db7..e7ce5808554b4 100644
--- a/test/functional/apps/visualize/_point_series_options.js
+++ b/test/functional/apps/visualize/_point_series_options.js
@@ -25,11 +25,12 @@ export default function({ getService, getPageObjects }) {
const kibanaServer = getService('kibanaServer');
const browser = getService('browser');
const PageObjects = getPageObjects([
- 'common',
'visualize',
'header',
'pointSeries',
'timePicker',
+ 'visEditor',
+ 'visChart',
]);
const pointSeriesVis = PageObjects.pointSeries;
const inspector = getService('inspector');
@@ -42,18 +43,18 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.clickNewSearch();
await PageObjects.timePicker.setDefaultAbsoluteRange();
log.debug('Bucket = X-axis');
- await PageObjects.visualize.clickBucket('X-axis');
+ await PageObjects.visEditor.clickBucket('X-axis');
log.debug('Aggregation = Date Histogram');
- await PageObjects.visualize.selectAggregation('Date Histogram');
+ await PageObjects.visEditor.selectAggregation('Date Histogram');
log.debug('Field = @timestamp');
- await PageObjects.visualize.selectField('@timestamp');
+ await PageObjects.visEditor.selectField('@timestamp');
// add another metrics
log.debug('Metric = Value Axis');
- await PageObjects.visualize.clickBucket('Y-axis', 'metrics');
+ await PageObjects.visEditor.clickBucket('Y-axis', 'metrics');
log.debug('Aggregation = Average');
- await PageObjects.visualize.selectAggregation('Average', 'metrics');
+ await PageObjects.visEditor.selectAggregation('Average', 'metrics');
log.debug('Field = memory');
- await PageObjects.visualize.selectField('machine.ram', 'metrics');
+ await PageObjects.visEditor.selectField('machine.ram', 'metrics');
// go to options page
log.debug('Going to axis options');
await pointSeriesVis.clickAxisOptions();
@@ -61,11 +62,11 @@ export default function({ getService, getPageObjects }) {
log.debug('adding axis');
await pointSeriesVis.clickAddAxis();
// set average count to use second value axis
- await PageObjects.visualize.toggleAccordion('visEditorSeriesAccordion3');
+ await PageObjects.visEditor.toggleAccordion('visEditorSeriesAccordion3');
log.debug('Average memory value axis - ValueAxis-2');
await pointSeriesVis.setSeriesAxis(1, 'ValueAxis-2');
- await PageObjects.visualize.waitForVisualizationRenderingStabilized();
- await PageObjects.visualize.clickGo();
+ await PageObjects.visChart.waitForVisualizationRenderingStabilized();
+ await PageObjects.visEditor.clickGo();
}
describe('point series', function describeIndexTests() {
@@ -129,14 +130,14 @@ export default function({ getService, getPageObjects }) {
];
await retry.try(async () => {
- const data = await PageObjects.visualize.getLineChartData('Count');
+ const data = await PageObjects.visChart.getLineChartData('Count');
log.debug('count data=' + data);
log.debug('data.length=' + data.length);
expect(data).to.eql(expectedChartValues[0]);
});
await retry.try(async () => {
- const avgMemoryData = await PageObjects.visualize.getLineChartData(
+ const avgMemoryData = await PageObjects.visChart.getLineChartData(
'Average machine.ram',
'ValueAxis-2'
);
@@ -158,7 +159,7 @@ export default function({ getService, getPageObjects }) {
describe('multiple chart types', function() {
it('should change average series type to histogram', async function() {
await pointSeriesVis.setSeriesType(1, 'histogram');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.clickGo();
const length = await pointSeriesVis.getHistogramSeries();
expect(length).to.be(1);
});
@@ -166,12 +167,12 @@ export default function({ getService, getPageObjects }) {
describe('grid lines', function() {
before(async function() {
- await pointSeriesVis.clickOptions();
+ await PageObjects.visEditor.clickOptionsTab();
});
it('should show category grid lines', async function() {
await pointSeriesVis.toggleGridCategoryLines();
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.clickGo();
const gridLines = await pointSeriesVis.getGridLines();
expect(gridLines.length).to.be(9);
gridLines.forEach(gridLine => {
@@ -182,7 +183,7 @@ export default function({ getService, getPageObjects }) {
it('should show value axis grid lines', async function() {
await pointSeriesVis.setGridValueAxis('ValueAxis-2');
await pointSeriesVis.toggleGridCategoryLines();
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.clickGo();
const gridLines = await pointSeriesVis.getGridLines();
expect(gridLines.length).to.be(9);
gridLines.forEach(gridLine => {
@@ -199,36 +200,36 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.navigateToNewVisualization();
await PageObjects.visualize.clickLineChart();
await PageObjects.visualize.clickNewSearch();
- await PageObjects.visualize.selectYAxisAggregation('Average', 'bytes', customLabel, 1);
- await PageObjects.visualize.clickGo();
- await PageObjects.visualize.clickMetricsAndAxes();
- await PageObjects.visualize.clickYAxisOptions('ValueAxis-1');
+ await PageObjects.visEditor.selectYAxisAggregation('Average', 'bytes', customLabel, 1);
+ await PageObjects.visEditor.clickGo();
+ await PageObjects.visEditor.clickMetricsAndAxes();
+ await PageObjects.visEditor.clickYAxisOptions('ValueAxis-1');
});
it('should render a custom label when one is set', async function() {
- const title = await PageObjects.visualize.getYAxisTitle();
+ const title = await PageObjects.visChart.getYAxisTitle();
expect(title).to.be(customLabel);
});
it('should render a custom axis title when one is set, overriding the custom label', async function() {
await pointSeriesVis.setAxisTitle(axisTitle);
- await PageObjects.visualize.clickGo();
- const title = await PageObjects.visualize.getYAxisTitle();
+ await PageObjects.visEditor.clickGo();
+ const title = await PageObjects.visChart.getYAxisTitle();
expect(title).to.be(axisTitle);
});
it('should preserve saved axis titles after a vis is saved and reopened', async function() {
await PageObjects.visualize.saveVisualizationExpectSuccess(visName);
- await PageObjects.visualize.waitForVisualization();
+ await PageObjects.visChart.waitForVisualization();
await PageObjects.visualize.loadSavedVisualization(visName);
- await PageObjects.visualize.waitForRenderingCount();
- await PageObjects.visualize.clickData();
- await PageObjects.visualize.toggleOpenEditor(1);
- await PageObjects.visualize.setCustomLabel('test', 1);
- await PageObjects.visualize.clickGo();
- await PageObjects.visualize.clickMetricsAndAxes();
- await PageObjects.visualize.clickYAxisOptions('ValueAxis-1');
- const title = await PageObjects.visualize.getYAxisTitle();
+ await PageObjects.visChart.waitForRenderingCount();
+ await PageObjects.visEditor.clickDataTab();
+ await PageObjects.visEditor.toggleOpenEditor(1);
+ await PageObjects.visEditor.setCustomLabel('test', 1);
+ await PageObjects.visEditor.clickGo();
+ await PageObjects.visEditor.clickMetricsAndAxes();
+ await PageObjects.visEditor.clickYAxisOptions('ValueAxis-1');
+ const title = await PageObjects.visChart.getYAxisTitle();
expect(title).to.be(axisTitle);
});
});
@@ -238,7 +239,7 @@ export default function({ getService, getPageObjects }) {
it('should show round labels in default timezone', async function() {
await initChart();
- const labels = await PageObjects.visualize.getXAxisLabels();
+ const labels = await PageObjects.visChart.getXAxisLabels();
expect(labels.join()).to.contain(expectedLabels.join());
});
@@ -248,7 +249,7 @@ export default function({ getService, getPageObjects }) {
await PageObjects.header.awaitKibanaChrome();
await initChart();
- const labels = await PageObjects.visualize.getXAxisLabels();
+ const labels = await PageObjects.visChart.getXAxisLabels();
expect(labels.join()).to.contain(expectedLabels.join());
});
@@ -258,10 +259,10 @@ export default function({ getService, getPageObjects }) {
const toTime = 'Sep 22, 2015 @ 16:08:34.554';
// note that we're setting the absolute time range while we're in 'America/Phoenix' tz
await PageObjects.timePicker.setAbsoluteRange(fromTime, toTime);
- await PageObjects.visualize.waitForRenderingCount();
+ await PageObjects.visChart.waitForRenderingCount();
await retry.waitFor('wait for x-axis labels to match expected for Phoenix', async () => {
- const labels = await PageObjects.visualize.getXAxisLabels();
+ const labels = await PageObjects.visChart.getXAxisLabels();
log.debug(`Labels: ${labels}`);
return (
labels.toString() === ['10:00', '11:00', '12:00', '13:00', '14:00', '15:00'].toString()
@@ -303,11 +304,11 @@ export default function({ getService, getPageObjects }) {
await browser.refresh();
// wait some time before trying to check for rendering count
await PageObjects.header.awaitKibanaChrome();
- await PageObjects.visualize.waitForRenderingCount();
+ await PageObjects.visChart.waitForRenderingCount();
log.debug('getXAxisLabels');
await retry.waitFor('wait for x-axis labels to match expected for UTC', async () => {
- const labels2 = await PageObjects.visualize.getXAxisLabels();
+ const labels2 = await PageObjects.visChart.getXAxisLabels();
log.debug(`Labels: ${labels2}`);
return (
labels2.toString() === ['17:00', '18:00', '19:00', '20:00', '21:00', '22:00'].toString()
diff --git a/test/functional/apps/visualize/_region_map.js b/test/functional/apps/visualize/_region_map.js
index f6c81dab5921f..10cbd9913c70c 100644
--- a/test/functional/apps/visualize/_region_map.js
+++ b/test/functional/apps/visualize/_region_map.js
@@ -24,7 +24,7 @@ export default function({ getService, getPageObjects }) {
const inspector = getService('inspector');
const log = getService('log');
const find = getService('find');
- const PageObjects = getPageObjects(['common', 'visualize', 'timePicker', 'settings']);
+ const PageObjects = getPageObjects(['visualize', 'visEditor', 'timePicker']);
before(async function() {
log.debug('navigateToApp visualize');
@@ -34,12 +34,12 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.clickNewSearch();
await PageObjects.timePicker.setDefaultAbsoluteRange();
log.debug('Bucket = Shape field');
- await PageObjects.visualize.clickBucket('Shape field');
+ await PageObjects.visEditor.clickBucket('Shape field');
log.debug('Aggregation = Terms');
- await PageObjects.visualize.selectAggregation('Terms');
+ await PageObjects.visEditor.selectAggregation('Terms');
log.debug('Field = geo.src');
- await PageObjects.visualize.selectField('geo.src');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.selectField('geo.src');
+ await PageObjects.visEditor.clickGo();
});
describe('vector map', function indexPatternCreation() {
@@ -60,26 +60,26 @@ export default function({ getService, getPageObjects }) {
});
it('should change results after changing layer to world', async function() {
- await PageObjects.visualize.clickOptions();
- await PageObjects.visualize.setSelectByOptionText(
+ await PageObjects.visEditor.clickOptionsTab();
+ await PageObjects.visEditor.setSelectByOptionText(
'regionMapOptionsSelectLayer',
'World Countries'
);
//ensure all fields are there
- await PageObjects.visualize.setSelectByOptionText(
+ await PageObjects.visEditor.setSelectByOptionText(
'regionMapOptionsSelectJoinField',
'ISO 3166-1 alpha-2 code'
);
- await PageObjects.visualize.setSelectByOptionText(
+ await PageObjects.visEditor.setSelectByOptionText(
'regionMapOptionsSelectJoinField',
'ISO 3166-1 alpha-3 code'
);
- await PageObjects.visualize.setSelectByOptionText(
+ await PageObjects.visEditor.setSelectByOptionText(
'regionMapOptionsSelectJoinField',
'name'
);
- await PageObjects.visualize.setSelectByOptionText(
+ await PageObjects.visEditor.setSelectByOptionText(
'regionMapOptionsSelectJoinField',
'ISO 3166-1 alpha-2 code'
);
diff --git a/test/functional/apps/visualize/_tag_cloud.js b/test/functional/apps/visualize/_tag_cloud.js
index 97b8036b30503..4f921cec1fdf1 100644
--- a/test/functional/apps/visualize/_tag_cloud.js
+++ b/test/functional/apps/visualize/_tag_cloud.js
@@ -26,7 +26,16 @@ export default function({ getService, getPageObjects }) {
const browser = getService('browser');
const retry = getService('retry');
const find = getService('find');
- const PageObjects = getPageObjects(['common', 'visualize', 'header', 'settings', 'timePicker']);
+ const PageObjects = getPageObjects([
+ 'common',
+ 'visualize',
+ 'visEditor',
+ 'visChart',
+ 'header',
+ 'settings',
+ 'timePicker',
+ 'tagCloud',
+ ]);
describe('tag cloud chart', function() {
const vizName1 = 'Visualization tagCloud';
@@ -40,15 +49,15 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.clickNewSearch();
await PageObjects.timePicker.setDefaultAbsoluteRange();
log.debug('select Tags');
- await PageObjects.visualize.clickBucket('Tags');
+ await PageObjects.visEditor.clickBucket('Tags');
log.debug('Click aggregation Terms');
- await PageObjects.visualize.selectAggregation('Terms');
+ await PageObjects.visEditor.selectAggregation('Terms');
log.debug('Click field machine.ram');
await retry.try(async function tryingForTime() {
- await PageObjects.visualize.selectField(termsField);
+ await PageObjects.visEditor.selectField(termsField);
});
- await PageObjects.visualize.selectOrderByMetric(2, '_key');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.selectOrderByMetric(2, '_key');
+ await PageObjects.visEditor.clickGo();
});
it('should have inspector enabled', async function() {
@@ -56,7 +65,7 @@ export default function({ getService, getPageObjects }) {
});
it('should show correct tag cloud data', async function() {
- const data = await PageObjects.visualize.getTextTag();
+ const data = await PageObjects.tagCloud.getTextTag();
log.debug(data);
expect(data).to.eql([
'32,212,254,720',
@@ -69,22 +78,22 @@ export default function({ getService, getPageObjects }) {
it('should collapse the sidebar', async function() {
const editorSidebar = await find.byCssSelector('.collapsible-sidebar');
- await PageObjects.visualize.clickEditorSidebarCollapse();
+ await PageObjects.visEditor.clickEditorSidebarCollapse();
// Give d3 tag cloud some time to rearrange tags
await PageObjects.common.sleep(1000);
const afterSize = await editorSidebar.getSize();
expect(afterSize.width).to.be(0);
- await PageObjects.visualize.clickEditorSidebarCollapse();
+ await PageObjects.visEditor.clickEditorSidebarCollapse();
});
it('should still show all tags after sidebar has been collapsed', async function() {
- await PageObjects.visualize.clickEditorSidebarCollapse();
+ await PageObjects.visEditor.clickEditorSidebarCollapse();
// Give d3 tag cloud some time to rearrange tags
await PageObjects.common.sleep(1000);
- await PageObjects.visualize.clickEditorSidebarCollapse();
+ await PageObjects.visEditor.clickEditorSidebarCollapse();
// Give d3 tag cloud some time to rearrange tags
await PageObjects.common.sleep(1000);
- const data = await PageObjects.visualize.getTextTag();
+ const data = await PageObjects.tagCloud.getTextTag();
log.debug(data);
expect(data).to.eql([
'32,212,254,720',
@@ -100,7 +109,7 @@ export default function({ getService, getPageObjects }) {
await PageObjects.common.sleep(1000);
await browser.setWindowSize(1200, 800);
await PageObjects.common.sleep(1000);
- const data = await PageObjects.visualize.getTextTag();
+ const data = await PageObjects.tagCloud.getTextTag();
expect(data).to.eql([
'32,212,254,720',
'21,474,836,480',
@@ -114,11 +123,11 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.saveVisualizationExpectSuccessAndBreadcrumb(vizName1);
await PageObjects.visualize.loadSavedVisualization(vizName1);
- await PageObjects.visualize.waitForVisualization();
+ await PageObjects.visChart.waitForVisualization();
});
it('should show the tags and relative size', function() {
- return PageObjects.visualize.getTextSizes().then(function(results) {
+ return PageObjects.tagCloud.getTextSizes().then(function(results) {
log.debug('results here ' + results);
expect(results).to.eql(['72px', '63px', '25px', '32px', '18px']);
});
@@ -153,7 +162,7 @@ export default function({ getService, getPageObjects }) {
});
await PageObjects.header.waitUntilLoadingHasFinished();
await PageObjects.timePicker.setDefaultAbsoluteRange();
- await PageObjects.visualize.waitForVisualization();
+ await PageObjects.visChart.waitForVisualization();
});
after(async function() {
@@ -168,15 +177,15 @@ export default function({ getService, getPageObjects }) {
});
it('should format tags with field formatter', async function() {
- const data = await PageObjects.visualize.getTextTag();
+ const data = await PageObjects.tagCloud.getTextTag();
log.debug(data);
expect(data).to.eql(['30GB', '20GB', '19GB', '18GB', '17GB']);
});
it('should apply filter with unformatted value', async function() {
- await PageObjects.visualize.selectTagCloudTag('30GB');
+ await PageObjects.tagCloud.selectTagCloudTag('30GB');
await PageObjects.header.waitUntilLoadingHasFinished();
- const data = await PageObjects.visualize.getTextTag();
+ const data = await PageObjects.tagCloud.getTextTag();
expect(data).to.eql(['30GB']);
});
});
diff --git a/test/functional/apps/visualize/_tile_map.js b/test/functional/apps/visualize/_tile_map.js
index e2946339b1f08..397eaeb0f3013 100644
--- a/test/functional/apps/visualize/_tile_map.js
+++ b/test/functional/apps/visualize/_tile_map.js
@@ -27,7 +27,14 @@ export default function({ getService, getPageObjects }) {
const filterBar = getService('filterBar');
const testSubjects = getService('testSubjects');
const browser = getService('browser');
- const PageObjects = getPageObjects(['common', 'visualize', 'timePicker', 'settings']);
+ const PageObjects = getPageObjects([
+ 'common',
+ 'visualize',
+ 'visEditor',
+ 'visChart',
+ 'timePicker',
+ 'tileMap',
+ ]);
describe('tile map visualize app', function() {
describe('incomplete config', function describeIndexTests() {
@@ -45,8 +52,8 @@ export default function({ getService, getPageObjects }) {
it('should be able to zoom in twice', async () => {
//should not throw
- await PageObjects.visualize.clickMapZoomIn();
- await PageObjects.visualize.clickMapZoomIn();
+ await PageObjects.tileMap.clickMapZoomIn();
+ await PageObjects.tileMap.clickMapZoomIn();
});
});
@@ -61,14 +68,14 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.clickNewSearch();
await PageObjects.timePicker.setDefaultAbsoluteRange();
log.debug('select bucket Geo Coordinates');
- await PageObjects.visualize.clickBucket('Geo coordinates');
+ await PageObjects.visEditor.clickBucket('Geo coordinates');
log.debug('Click aggregation Geohash');
- await PageObjects.visualize.selectAggregation('Geohash');
+ await PageObjects.visEditor.selectAggregation('Geohash');
log.debug('Click field geo.coordinates');
await retry.try(async function tryingForTime() {
- await PageObjects.visualize.selectField('geo.coordinates');
+ await PageObjects.visEditor.selectField('geo.coordinates');
});
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.clickGo();
});
/**
@@ -106,9 +113,9 @@ export default function({ getService, getPageObjects }) {
['-', '8', '108', { lat: 18, lon: -157 }],
];
//level 1
- await PageObjects.visualize.clickMapZoomOut();
+ await PageObjects.tileMap.clickMapZoomOut();
//level 0
- await PageObjects.visualize.clickMapZoomOut();
+ await PageObjects.tileMap.clickMapZoomOut();
await inspector.open();
await inspector.setTablePageSize(50);
@@ -118,8 +125,8 @@ export default function({ getService, getPageObjects }) {
});
it('should not be able to zoom out beyond 0', async function() {
- await PageObjects.visualize.zoomAllTheWayOut();
- const enabled = await PageObjects.visualize.getMapZoomOutEnabled();
+ await PageObjects.tileMap.zoomAllTheWayOut();
+ const enabled = await PageObjects.tileMap.getMapZoomOutEnabled();
expect(enabled).to.be(false);
});
@@ -148,7 +155,7 @@ export default function({ getService, getPageObjects }) {
['-', 'b7', '167', { lat: 64, lon: -163 }],
];
- await PageObjects.visualize.clickMapFitDataBounds();
+ await PageObjects.tileMap.clickMapFitDataBounds();
await inspector.open();
const data = await inspector.getTableData();
await inspector.close();
@@ -164,8 +171,8 @@ export default function({ getService, getPageObjects }) {
await filterBar.addFilter('bytes', 'is between', '19980', '19990');
await filterBar.toggleFilterPinned('bytes');
- await PageObjects.visualize.zoomAllTheWayOut();
- await PageObjects.visualize.clickMapFitDataBounds();
+ await PageObjects.tileMap.zoomAllTheWayOut();
+ await PageObjects.tileMap.clickMapFitDataBounds();
await inspector.open();
const data = await inspector.getTableData();
@@ -178,15 +185,15 @@ export default function({ getService, getPageObjects }) {
it('Newly saved visualization retains map bounds', async () => {
const vizName1 = 'Visualization TileMap';
- await PageObjects.visualize.clickMapZoomIn();
- await PageObjects.visualize.clickMapZoomIn();
+ await PageObjects.tileMap.clickMapZoomIn();
+ await PageObjects.tileMap.clickMapZoomIn();
- const mapBounds = await PageObjects.visualize.getMapBounds();
+ const mapBounds = await PageObjects.tileMap.getMapBounds();
await inspector.close();
await PageObjects.visualize.saveVisualizationExpectSuccess(vizName1);
- const afterSaveMapBounds = await PageObjects.visualize.getMapBounds();
+ const afterSaveMapBounds = await PageObjects.tileMap.getMapBounds();
await inspector.close();
// For some reason the values are slightly different, so we can't check that they are equal. But we did
@@ -207,17 +214,17 @@ export default function({ getService, getPageObjects }) {
});
it('when not checked does not add filters to aggregation', async () => {
- await PageObjects.visualize.toggleOpenEditor(2);
- await PageObjects.visualize.setIsFilteredByCollarCheckbox(false);
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.toggleOpenEditor(2);
+ await PageObjects.visEditor.setIsFilteredByCollarCheckbox(false);
+ await PageObjects.visEditor.clickGo();
await inspector.open();
await inspector.expectTableHeaders(['geohash_grid', 'Count', 'Geo Centroid']);
await inspector.close();
});
after(async () => {
- await PageObjects.visualize.setIsFilteredByCollarCheckbox(true);
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.setIsFilteredByCollarCheckbox(true);
+ await PageObjects.visEditor.clickGo();
});
});
});
@@ -245,18 +252,18 @@ export default function({ getService, getPageObjects }) {
const zoomLevel = 9;
for (let i = 0; i < zoomLevel; i++) {
- await PageObjects.visualize.clickMapZoomIn();
+ await PageObjects.tileMap.clickMapZoomIn();
}
});
beforeEach(async function() {
- await PageObjects.visualize.clickMapZoomIn(waitForLoading);
+ await PageObjects.tileMap.clickMapZoomIn(waitForLoading);
});
afterEach(async function() {
if (!last) {
await PageObjects.common.sleep(toastDefaultLife);
- await PageObjects.visualize.clickMapZoomOut(waitForLoading);
+ await PageObjects.tileMap.clickMapZoomOut(waitForLoading);
}
});
@@ -270,11 +277,11 @@ export default function({ getService, getPageObjects }) {
it('should suppress zoom warning if suppress warnings button clicked', async () => {
last = true;
- await PageObjects.visualize.waitForVisualization();
+ await PageObjects.visChart.waitForVisualization();
await find.clickByCssSelector('[data-test-subj="suppressZoomWarnings"]');
- await PageObjects.visualize.clickMapZoomOut(waitForLoading);
+ await PageObjects.tileMap.clickMapZoomOut(waitForLoading);
await testSubjects.waitForDeleted('suppressZoomWarnings');
- await PageObjects.visualize.clickMapZoomIn(waitForLoading);
+ await PageObjects.tileMap.clickMapZoomIn(waitForLoading);
await testSubjects.missingOrFail('maxZoomWarning');
});
diff --git a/test/functional/apps/visualize/_tsvb_chart.ts b/test/functional/apps/visualize/_tsvb_chart.ts
index dc4b9a786eaa4..8dbe356889568 100644
--- a/test/functional/apps/visualize/_tsvb_chart.ts
+++ b/test/functional/apps/visualize/_tsvb_chart.ts
@@ -25,7 +25,7 @@ export default function({ getService, getPageObjects }: FtrProviderContext) {
const esArchiver = getService('esArchiver');
const log = getService('log');
const inspector = getService('inspector');
- const PageObjects = getPageObjects(['visualize', 'visualBuilder', 'timePicker']);
+ const PageObjects = getPageObjects(['visualize', 'visualBuilder', 'timePicker', 'visChart']);
describe('visual builder', function describeIndexTests() {
this.tags('smoke');
@@ -80,7 +80,7 @@ export default function({ getService, getPageObjects }: FtrProviderContext) {
});
it('should verify gauge label and count display', async () => {
- await PageObjects.visualize.waitForVisualizationRenderingStabilized();
+ await PageObjects.visChart.waitForVisualizationRenderingStabilized();
const labelString = await PageObjects.visualBuilder.getGaugeLabel();
expect(labelString).to.be('Count');
const gaugeCount = await PageObjects.visualBuilder.getGaugeCount();
@@ -96,7 +96,7 @@ export default function({ getService, getPageObjects }: FtrProviderContext) {
});
it('should verify topN label and count display', async () => {
- await PageObjects.visualize.waitForVisualizationRenderingStabilized();
+ await PageObjects.visChart.waitForVisualizationRenderingStabilized();
const labelString = await PageObjects.visualBuilder.getTopNLabel();
expect(labelString).to.be('Count');
const gaugeCount = await PageObjects.visualBuilder.getTopNCount();
diff --git a/test/functional/apps/visualize/_tsvb_table.ts b/test/functional/apps/visualize/_tsvb_table.ts
index a36b6facb3039..5808212559b18 100644
--- a/test/functional/apps/visualize/_tsvb_table.ts
+++ b/test/functional/apps/visualize/_tsvb_table.ts
@@ -21,7 +21,11 @@ import expect from '@kbn/expect';
import { FtrProviderContext } from '../../ftr_provider_context';
export default function({ getPageObjects }: FtrProviderContext) {
- const { visualBuilder, visualize } = getPageObjects(['visualBuilder', 'visualize']);
+ const { visualBuilder, visualize, visChart } = getPageObjects([
+ 'visualBuilder',
+ 'visualize',
+ 'visChart',
+ ]);
describe('visual builder', function describeIndexTests() {
describe('table', () => {
@@ -32,7 +36,7 @@ export default function({ getPageObjects }: FtrProviderContext) {
await visualBuilder.checkTableTabIsPresent();
await visualBuilder.selectGroupByField('machine.os.raw');
await visualBuilder.setColumnLabelValue('OS');
- await visualize.waitForVisualizationRenderingStabilized();
+ await visChart.waitForVisualizationRenderingStabilized();
});
it('should display correct values on changing group by field and column name', async () => {
diff --git a/test/functional/apps/visualize/_vega_chart.js b/test/functional/apps/visualize/_vega_chart.js
index 224dec7ef2a71..df0603c7f95f5 100644
--- a/test/functional/apps/visualize/_vega_chart.js
+++ b/test/functional/apps/visualize/_vega_chart.js
@@ -20,7 +20,7 @@
import expect from '@kbn/expect';
export default function({ getService, getPageObjects }) {
- const PageObjects = getPageObjects(['common', 'header', 'timePicker', 'visualize']);
+ const PageObjects = getPageObjects(['timePicker', 'visualize', 'visChart', 'vegaChart']);
const filterBar = getService('filterBar');
const inspector = getService('inspector');
const log = getService('log');
@@ -40,7 +40,7 @@ export default function({ getService, getPageObjects }) {
});
it.skip('should have some initial vega spec text', async function() {
- const vegaSpec = await PageObjects.visualize.getVegaSpec();
+ const vegaSpec = await PageObjects.vegaChart.getSpec();
expect(vegaSpec)
.to.contain('{')
.and.to.contain('data');
@@ -48,7 +48,7 @@ export default function({ getService, getPageObjects }) {
});
it('should have view and control containers', async function() {
- const view = await PageObjects.visualize.getVegaViewContainer();
+ const view = await PageObjects.vegaChart.getViewContainer();
expect(view).to.be.ok();
const size = await view.getSize();
expect(size)
@@ -57,7 +57,7 @@ export default function({ getService, getPageObjects }) {
expect(size.width).to.be.above(0);
expect(size.height).to.be.above(0);
- const controls = await PageObjects.visualize.getVegaControlContainer();
+ const controls = await PageObjects.vegaChart.getControlContainer();
expect(controls).to.be.ok();
});
});
@@ -73,9 +73,9 @@ export default function({ getService, getPageObjects }) {
});
it.skip('should render different data in response to filter change', async function() {
- await PageObjects.visualize.expectVisToMatchScreenshot('vega_chart');
+ await PageObjects.vegaChart.expectVisToMatchScreenshot('vega_chart');
await filterBar.addFilter('@tags.raw', 'is', 'error');
- await PageObjects.visualize.expectVisToMatchScreenshot('vega_chart_filtered');
+ await PageObjects.vegaChart.expectVisToMatchScreenshot('vega_chart_filtered');
});
});
});
diff --git a/test/functional/apps/visualize/_vertical_bar_chart.js b/test/functional/apps/visualize/_vertical_bar_chart.js
index 1153cc12e23ed..2efa812c7a734 100644
--- a/test/functional/apps/visualize/_vertical_bar_chart.js
+++ b/test/functional/apps/visualize/_vertical_bar_chart.js
@@ -23,8 +23,9 @@ export default function({ getService, getPageObjects }) {
const log = getService('log');
const retry = getService('retry');
const inspector = getService('inspector');
+ const testSubjects = getService('testSubjects');
const filterBar = getService('filterBar');
- const PageObjects = getPageObjects(['common', 'visualize', 'header', 'timePicker']);
+ const PageObjects = getPageObjects(['visualize', 'visEditor', 'visChart', 'timePicker']);
// FLAKY: https://github.com/elastic/kibana/issues/22322
describe('vertical bar chart', function() {
@@ -38,13 +39,13 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.clickNewSearch();
await PageObjects.timePicker.setDefaultAbsoluteRange();
log.debug('Bucket = X-Axis');
- await PageObjects.visualize.clickBucket('X-axis');
+ await PageObjects.visEditor.clickBucket('X-axis');
log.debug('Aggregation = Date Histogram');
- await PageObjects.visualize.selectAggregation('Date Histogram');
+ await PageObjects.visEditor.selectAggregation('Date Histogram');
log.debug('Field = @timestamp');
- await PageObjects.visualize.selectField('@timestamp');
+ await PageObjects.visEditor.selectField('@timestamp');
// leaving Interval set to Auto
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.clickGo();
};
before(initBarChart);
@@ -53,7 +54,7 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.saveVisualizationExpectSuccessAndBreadcrumb(vizName1);
await PageObjects.visualize.loadSavedVisualization(vizName1);
- await PageObjects.visualize.waitForVisualization();
+ await PageObjects.visChart.waitForVisualization();
});
it('should have inspector enabled', async function() {
@@ -92,7 +93,7 @@ export default function({ getService, getPageObjects }) {
// return arguments[0].getAttribute(arguments[1]);","args":[{"ELEMENT":"592"},"fill"]}] arguments[0].getAttribute is not a function
// try sleeping a bit before getting that data
await retry.try(async () => {
- const data = await PageObjects.visualize.getBarChartData();
+ const data = await PageObjects.visChart.getBarChartData();
log.debug('data=' + data);
log.debug('data.length=' + data.length);
expect(data).to.eql(expectedChartValues);
@@ -203,15 +204,15 @@ export default function({ getService, getPageObjects }) {
// return arguments[0].getAttribute(arguments[1]);","args":[{"ELEMENT":"592"},"fill"]}] arguments[0].getAttribute is not a function
// try sleeping a bit before getting that data
await retry.try(async () => {
- const data = await PageObjects.visualize.getBarChartData();
+ const data = await PageObjects.visChart.getBarChartData();
log.debug('data=' + data);
log.debug('data.length=' + data.length);
expect(data).to.eql(expectedChartValues);
});
- await PageObjects.visualize.toggleOpenEditor(2);
- await PageObjects.visualize.clickDropPartialBuckets();
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.toggleOpenEditor(2);
+ await PageObjects.visEditor.clickDropPartialBuckets();
+ await PageObjects.visEditor.clickGo();
expectedChartValues = [
218,
@@ -279,7 +280,7 @@ export default function({ getService, getPageObjects }) {
// return arguments[0].getAttribute(arguments[1]);","args":[{"ELEMENT":"592"},"fill"]}] arguments[0].getAttribute is not a function
// try sleeping a bit before getting that data
await retry.try(async () => {
- const data = await PageObjects.visualize.getBarChartData();
+ const data = await PageObjects.visChart.getBarChartData();
log.debug('data=' + data);
log.debug('data.length=' + data.length);
expect(data).to.eql(expectedChartValues);
@@ -291,13 +292,13 @@ export default function({ getService, getPageObjects }) {
const axisId = 'ValueAxis-1';
it('should show ticks on selecting log scale', async () => {
- await PageObjects.visualize.clickMetricsAndAxes();
- await PageObjects.visualize.clickYAxisOptions(axisId);
- await PageObjects.visualize.selectYAxisScaleType(axisId, 'log');
- await PageObjects.visualize.clickYAxisAdvancedOptions(axisId);
- await PageObjects.visualize.changeYAxisFilterLabelsCheckbox(axisId, false);
- await PageObjects.visualize.clickGo();
- const labels = await PageObjects.visualize.getYAxisLabels();
+ await PageObjects.visEditor.clickMetricsAndAxes();
+ await PageObjects.visEditor.clickYAxisOptions(axisId);
+ await PageObjects.visEditor.selectYAxisScaleType(axisId, 'log');
+ await PageObjects.visEditor.clickYAxisAdvancedOptions(axisId);
+ await PageObjects.visEditor.changeYAxisFilterLabelsCheckbox(axisId, false);
+ await PageObjects.visEditor.clickGo();
+ const labels = await PageObjects.visChart.getYAxisLabels();
const expectedLabels = [
'2',
'3',
@@ -323,9 +324,9 @@ export default function({ getService, getPageObjects }) {
});
it('should show filtered ticks on selecting log scale', async () => {
- await PageObjects.visualize.changeYAxisFilterLabelsCheckbox(axisId, true);
- await PageObjects.visualize.clickGo();
- const labels = await PageObjects.visualize.getYAxisLabels();
+ await PageObjects.visEditor.changeYAxisFilterLabelsCheckbox(axisId, true);
+ await PageObjects.visEditor.clickGo();
+ const labels = await PageObjects.visChart.getYAxisLabels();
const expectedLabels = [
'2',
'3',
@@ -351,10 +352,10 @@ export default function({ getService, getPageObjects }) {
});
it('should show ticks on selecting square root scale', async () => {
- await PageObjects.visualize.selectYAxisScaleType(axisId, 'square root');
- await PageObjects.visualize.changeYAxisFilterLabelsCheckbox(axisId, false);
- await PageObjects.visualize.clickGo();
- const labels = await PageObjects.visualize.getYAxisLabels();
+ await PageObjects.visEditor.selectYAxisScaleType(axisId, 'square root');
+ await PageObjects.visEditor.changeYAxisFilterLabelsCheckbox(axisId, false);
+ await PageObjects.visEditor.clickGo();
+ const labels = await PageObjects.visChart.getYAxisLabels();
const expectedLabels = [
'0',
'200',
@@ -370,18 +371,18 @@ export default function({ getService, getPageObjects }) {
});
it('should show filtered ticks on selecting square root scale', async () => {
- await PageObjects.visualize.changeYAxisFilterLabelsCheckbox(axisId, true);
- await PageObjects.visualize.clickGo();
- const labels = await PageObjects.visualize.getYAxisLabels();
+ await PageObjects.visEditor.changeYAxisFilterLabelsCheckbox(axisId, true);
+ await PageObjects.visEditor.clickGo();
+ const labels = await PageObjects.visChart.getYAxisLabels();
const expectedLabels = ['200', '400', '600', '800', '1,000', '1,200', '1,400'];
expect(labels).to.eql(expectedLabels);
});
it('should show ticks on selecting linear scale', async () => {
- await PageObjects.visualize.selectYAxisScaleType(axisId, 'linear');
- await PageObjects.visualize.changeYAxisFilterLabelsCheckbox(axisId, false);
- await PageObjects.visualize.clickGo();
- const labels = await PageObjects.visualize.getYAxisLabels();
+ await PageObjects.visEditor.selectYAxisScaleType(axisId, 'linear');
+ await PageObjects.visEditor.changeYAxisFilterLabelsCheckbox(axisId, false);
+ await PageObjects.visEditor.clickGo();
+ const labels = await PageObjects.visChart.getYAxisLabels();
log.debug(labels);
const expectedLabels = [
'0',
@@ -398,9 +399,9 @@ export default function({ getService, getPageObjects }) {
});
it('should show filtered ticks on selecting linear scale', async () => {
- await PageObjects.visualize.changeYAxisFilterLabelsCheckbox(axisId, true);
- await PageObjects.visualize.clickGo();
- const labels = await PageObjects.visualize.getYAxisLabels();
+ await PageObjects.visEditor.changeYAxisFilterLabelsCheckbox(axisId, true);
+ await PageObjects.visEditor.clickGo();
+ const labels = await PageObjects.visChart.getYAxisLabels();
const expectedLabels = ['200', '400', '600', '800', '1,000', '1,200', '1,400'];
expect(labels).to.eql(expectedLabels);
});
@@ -409,11 +410,11 @@ export default function({ getService, getPageObjects }) {
describe('vertical bar in percent mode', async () => {
it('should show ticks with percentage values', async function() {
const axisId = 'ValueAxis-1';
- await PageObjects.visualize.clickMetricsAndAxes();
- await PageObjects.visualize.clickYAxisOptions(axisId);
- await PageObjects.visualize.selectYAxisMode('percentage');
- await PageObjects.visualize.clickGo();
- const labels = await PageObjects.visualize.getYAxisLabels();
+ await PageObjects.visEditor.clickMetricsAndAxes();
+ await PageObjects.visEditor.clickYAxisOptions(axisId);
+ await PageObjects.visEditor.selectYAxisMode('percentage');
+ await PageObjects.visEditor.clickGo();
+ const labels = await PageObjects.visChart.getYAxisLabels();
expect(labels[0]).to.eql('0%');
expect(labels[labels.length - 1]).to.eql('100%');
});
@@ -423,36 +424,36 @@ export default function({ getService, getPageObjects }) {
before(initBarChart);
it('should show correct series', async function() {
- await PageObjects.visualize.toggleOpenEditor(2, 'false');
- await PageObjects.visualize.clickBucket('Split series');
- await PageObjects.visualize.selectAggregation('Terms');
- await PageObjects.visualize.selectField('response.raw');
- await PageObjects.visualize.waitForVisualizationRenderingStabilized();
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.toggleOpenEditor(2, 'false');
+ await PageObjects.visEditor.clickBucket('Split series');
+ await PageObjects.visEditor.selectAggregation('Terms');
+ await PageObjects.visEditor.selectField('response.raw');
+ await PageObjects.visChart.waitForVisualizationRenderingStabilized();
+ await PageObjects.visEditor.clickGo();
const expectedEntries = ['200', '404', '503'];
- const legendEntries = await PageObjects.visualize.getLegendEntries();
+ const legendEntries = await PageObjects.visChart.getLegendEntries();
expect(legendEntries).to.eql(expectedEntries);
});
it('should allow custom sorting of series', async () => {
- await PageObjects.visualize.toggleOpenEditor(1, 'false');
- await PageObjects.visualize.selectCustomSortMetric(3, 'Min', 'bytes');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.toggleOpenEditor(1, 'false');
+ await PageObjects.visEditor.selectCustomSortMetric(3, 'Min', 'bytes');
+ await PageObjects.visEditor.clickGo();
const expectedEntries = ['404', '200', '503'];
- const legendEntries = await PageObjects.visualize.getLegendEntries();
+ const legendEntries = await PageObjects.visChart.getLegendEntries();
expect(legendEntries).to.eql(expectedEntries);
});
it('should correctly filter by legend', async () => {
- await PageObjects.visualize.filterLegend('200');
- await PageObjects.visualize.waitForVisualization();
- const legendEntries = await PageObjects.visualize.getLegendEntries();
+ await PageObjects.visChart.filterLegend('200');
+ await PageObjects.visChart.waitForVisualization();
+ const legendEntries = await PageObjects.visChart.getLegendEntries();
const expectedEntries = ['200'];
expect(legendEntries).to.eql(expectedEntries);
await filterBar.removeFilter('response.raw');
- await PageObjects.visualize.waitForVisualization();
+ await PageObjects.visChart.waitForVisualization();
});
});
@@ -460,18 +461,18 @@ export default function({ getService, getPageObjects }) {
before(initBarChart);
it('should show correct series', async function() {
- await PageObjects.visualize.toggleOpenEditor(2, 'false');
- await PageObjects.visualize.clickBucket('Split series');
- await PageObjects.visualize.selectAggregation('Terms');
- await PageObjects.visualize.selectField('response.raw');
- await PageObjects.visualize.waitForVisualizationRenderingStabilized();
-
- await PageObjects.visualize.toggleOpenEditor(3, 'false');
- await PageObjects.visualize.clickBucket('Split series');
- await PageObjects.visualize.selectAggregation('Terms');
- await PageObjects.visualize.selectField('machine.os');
- await PageObjects.visualize.waitForVisualizationRenderingStabilized();
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.toggleOpenEditor(2, 'false');
+ await PageObjects.visEditor.clickBucket('Split series');
+ await PageObjects.visEditor.selectAggregation('Terms');
+ await PageObjects.visEditor.selectField('response.raw');
+ await PageObjects.visChart.waitForVisualizationRenderingStabilized();
+
+ await PageObjects.visEditor.toggleOpenEditor(3, 'false');
+ await PageObjects.visEditor.clickBucket('Split series');
+ await PageObjects.visEditor.selectAggregation('Terms');
+ await PageObjects.visEditor.selectField('machine.os');
+ await PageObjects.visChart.waitForVisualizationRenderingStabilized();
+ await PageObjects.visEditor.clickGo();
const expectedEntries = [
'200 - win 8',
@@ -490,18 +491,18 @@ export default function({ getService, getPageObjects }) {
'404 - win 8',
'404 - win xp',
];
- const legendEntries = await PageObjects.visualize.getLegendEntries();
+ const legendEntries = await PageObjects.visChart.getLegendEntries();
expect(legendEntries).to.eql(expectedEntries);
});
it('should show correct series when disabling first agg', async function() {
// this will avoid issues with the play tooltip covering the disable agg button
- await PageObjects.visualize.scrollSubjectIntoView('metricsAggGroup');
- await PageObjects.visualize.toggleDisabledAgg(3);
- await PageObjects.visualize.clickGo();
+ await testSubjects.scrollIntoView('metricsAggGroup');
+ await PageObjects.visEditor.toggleDisabledAgg(3);
+ await PageObjects.visEditor.clickGo();
const expectedEntries = ['win 8', 'win xp', 'ios', 'osx', 'win 7'];
- const legendEntries = await PageObjects.visualize.getLegendEntries();
+ const legendEntries = await PageObjects.visChart.getLegendEntries();
expect(legendEntries).to.eql(expectedEntries);
});
});
@@ -510,24 +511,24 @@ export default function({ getService, getPageObjects }) {
before(initBarChart);
it('should show correct series', async function() {
- await PageObjects.visualize.toggleOpenEditor(2, 'false');
- await PageObjects.visualize.toggleOpenEditor(1);
- await PageObjects.visualize.selectAggregation('Derivative', 'metrics');
- await PageObjects.visualize.waitForVisualizationRenderingStabilized();
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.toggleOpenEditor(2, 'false');
+ await PageObjects.visEditor.toggleOpenEditor(1);
+ await PageObjects.visEditor.selectAggregation('Derivative', 'metrics');
+ await PageObjects.visChart.waitForVisualizationRenderingStabilized();
+ await PageObjects.visEditor.clickGo();
const expectedEntries = ['Derivative of Count'];
- const legendEntries = await PageObjects.visualize.getLegendEntries();
+ const legendEntries = await PageObjects.visChart.getLegendEntries();
expect(legendEntries).to.eql(expectedEntries);
});
it('should show an error if last bucket aggregation is terms', async () => {
- await PageObjects.visualize.toggleOpenEditor(2, 'false');
- await PageObjects.visualize.clickBucket('Split series');
- await PageObjects.visualize.selectAggregation('Terms');
- await PageObjects.visualize.selectField('response.raw');
+ await PageObjects.visEditor.toggleOpenEditor(2, 'false');
+ await PageObjects.visEditor.clickBucket('Split series');
+ await PageObjects.visEditor.selectAggregation('Terms');
+ await PageObjects.visEditor.selectField('response.raw');
- const errorMessage = await PageObjects.visualize.getBucketErrorMessage();
+ const errorMessage = await PageObjects.visEditor.getBucketErrorMessage();
expect(errorMessage).to.contain('Last bucket aggregation must be "Date Histogram"');
});
});
diff --git a/test/functional/apps/visualize/_vertical_bar_chart_nontimeindex.js b/test/functional/apps/visualize/_vertical_bar_chart_nontimeindex.js
index e796f281b0689..2371df6e92476 100644
--- a/test/functional/apps/visualize/_vertical_bar_chart_nontimeindex.js
+++ b/test/functional/apps/visualize/_vertical_bar_chart_nontimeindex.js
@@ -23,7 +23,7 @@ export default function({ getService, getPageObjects }) {
const log = getService('log');
const retry = getService('retry');
const inspector = getService('inspector');
- const PageObjects = getPageObjects(['common', 'visualize', 'header']);
+ const PageObjects = getPageObjects(['common', 'visualize', 'header', 'visEditor', 'visChart']);
// FLAKY: https://github.com/elastic/kibana/issues/22322
describe.skip('vertical bar chart with index without time filter', function() {
@@ -39,13 +39,13 @@ export default function({ getService, getPageObjects }) {
);
await PageObjects.common.sleep(500);
log.debug('Bucket = X-Axis');
- await PageObjects.visualize.clickBucket('X-axis');
+ await PageObjects.visEditor.clickBucket('X-axis');
log.debug('Aggregation = Date Histogram');
- await PageObjects.visualize.selectAggregation('Date Histogram');
+ await PageObjects.visEditor.selectAggregation('Date Histogram');
log.debug('Field = @timestamp');
- await PageObjects.visualize.selectField('@timestamp');
- await PageObjects.visualize.setCustomInterval('3h');
- await PageObjects.visualize.waitForVisualizationRenderingStabilized();
+ await PageObjects.visEditor.selectField('@timestamp');
+ await PageObjects.visEditor.setInterval('3h', { type: 'custom' });
+ await PageObjects.visChart.waitForVisualizationRenderingStabilized();
};
before(initBarChart);
@@ -54,7 +54,7 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visualize.saveVisualizationExpectSuccessAndBreadcrumb(vizName1);
await PageObjects.visualize.loadSavedVisualization(vizName1);
- await PageObjects.visualize.waitForVisualization();
+ await PageObjects.visChart.waitForVisualization();
});
it('should have inspector enabled', async function() {
@@ -93,7 +93,7 @@ export default function({ getService, getPageObjects }) {
// return arguments[0].getAttribute(arguments[1]);","args":[{"ELEMENT":"592"},"fill"]}] arguments[0].getAttribute is not a function
// try sleeping a bit before getting that data
await retry.try(async () => {
- const data = await PageObjects.visualize.getBarChartData();
+ const data = await PageObjects.visChart.getBarChartData();
log.debug('data=' + data);
log.debug('data.length=' + data.length);
expect(data).to.eql(expectedChartValues);
@@ -134,13 +134,13 @@ export default function({ getService, getPageObjects }) {
const axisId = 'ValueAxis-1';
it('should show ticks on selecting log scale', async () => {
- await PageObjects.visualize.clickMetricsAndAxes();
- await PageObjects.visualize.clickYAxisOptions(axisId);
- await PageObjects.visualize.selectYAxisScaleType(axisId, 'log');
- await PageObjects.visualize.clickYAxisAdvancedOptions(axisId);
- await PageObjects.visualize.changeYAxisFilterLabelsCheckbox(axisId, false);
- await PageObjects.visualize.clickGo();
- const labels = await PageObjects.visualize.getYAxisLabels();
+ await PageObjects.visEditor.clickMetricsAndAxes();
+ await PageObjects.visEditor.clickYAxisOptions(axisId);
+ await PageObjects.visEditor.selectYAxisScaleType(axisId, 'log');
+ await PageObjects.visEditor.clickYAxisAdvancedOptions(axisId);
+ await PageObjects.visEditor.changeYAxisFilterLabelsCheckbox(axisId, false);
+ await PageObjects.visEditor.clickGo();
+ const labels = await PageObjects.visChart.getYAxisLabels();
const expectedLabels = [
'2',
'3',
@@ -166,9 +166,9 @@ export default function({ getService, getPageObjects }) {
});
it('should show filtered ticks on selecting log scale', async () => {
- await PageObjects.visualize.changeYAxisFilterLabelsCheckbox(axisId, true);
- await PageObjects.visualize.clickGo();
- const labels = await PageObjects.visualize.getYAxisLabels();
+ await PageObjects.visEditor.changeYAxisFilterLabelsCheckbox(axisId, true);
+ await PageObjects.visEditor.clickGo();
+ const labels = await PageObjects.visChart.getYAxisLabels();
const expectedLabels = [
'2',
'3',
@@ -194,10 +194,10 @@ export default function({ getService, getPageObjects }) {
});
it('should show ticks on selecting square root scale', async () => {
- await PageObjects.visualize.selectYAxisScaleType(axisId, 'square root');
- await PageObjects.visualize.changeYAxisFilterLabelsCheckbox(axisId, false);
- await PageObjects.visualize.clickGo();
- const labels = await PageObjects.visualize.getYAxisLabels();
+ await PageObjects.visEditor.selectYAxisScaleType(axisId, 'square root');
+ await PageObjects.visEditor.changeYAxisFilterLabelsCheckbox(axisId, false);
+ await PageObjects.visEditor.clickGo();
+ const labels = await PageObjects.visChart.getYAxisLabels();
const expectedLabels = [
'0',
'200',
@@ -213,18 +213,18 @@ export default function({ getService, getPageObjects }) {
});
it('should show filtered ticks on selecting square root scale', async () => {
- await PageObjects.visualize.changeYAxisFilterLabelsCheckbox(axisId, true);
- await PageObjects.visualize.clickGo();
- const labels = await PageObjects.visualize.getYAxisLabels();
+ await PageObjects.visEditor.changeYAxisFilterLabelsCheckbox(axisId, true);
+ await PageObjects.visEditor.clickGo();
+ const labels = await PageObjects.visChart.getYAxisLabels();
const expectedLabels = ['200', '400', '600', '800', '1,000', '1,200', '1,400'];
expect(labels).to.eql(expectedLabels);
});
it('should show ticks on selecting linear scale', async () => {
- await PageObjects.visualize.selectYAxisScaleType(axisId, 'linear');
- await PageObjects.visualize.changeYAxisFilterLabelsCheckbox(axisId, false);
- await PageObjects.visualize.clickGo();
- const labels = await PageObjects.visualize.getYAxisLabels();
+ await PageObjects.visEditor.selectYAxisScaleType(axisId, 'linear');
+ await PageObjects.visEditor.changeYAxisFilterLabelsCheckbox(axisId, false);
+ await PageObjects.visEditor.clickGo();
+ const labels = await PageObjects.visChart.getYAxisLabels();
log.debug(labels);
const expectedLabels = [
'0',
@@ -241,9 +241,9 @@ export default function({ getService, getPageObjects }) {
});
it('should show filtered ticks on selecting linear scale', async () => {
- await PageObjects.visualize.changeYAxisFilterLabelsCheckbox(axisId, true);
- await PageObjects.visualize.clickGo();
- const labels = await PageObjects.visualize.getYAxisLabels();
+ await PageObjects.visEditor.changeYAxisFilterLabelsCheckbox(axisId, true);
+ await PageObjects.visEditor.clickGo();
+ const labels = await PageObjects.visChart.getYAxisLabels();
const expectedLabels = ['200', '400', '600', '800', '1,000', '1,200', '1,400'];
expect(labels).to.eql(expectedLabels);
});
@@ -253,18 +253,18 @@ export default function({ getService, getPageObjects }) {
before(initBarChart);
it('should show correct series', async function() {
- await PageObjects.visualize.toggleOpenEditor(2, 'false');
- await PageObjects.visualize.clickBucket('Split series');
- await PageObjects.visualize.selectAggregation('Terms');
- await PageObjects.visualize.selectField('response.raw');
+ await PageObjects.visEditor.toggleOpenEditor(2, 'false');
+ await PageObjects.visEditor.clickBucket('Split series');
+ await PageObjects.visEditor.selectAggregation('Terms');
+ await PageObjects.visEditor.selectField('response.raw');
await PageObjects.header.waitUntilLoadingHasFinished();
await PageObjects.common.sleep(1003);
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.clickGo();
await PageObjects.header.waitUntilLoadingHasFinished();
const expectedEntries = ['200', '404', '503'];
- const legendEntries = await PageObjects.visualize.getLegendEntries();
+ const legendEntries = await PageObjects.visChart.getLegendEntries();
expect(legendEntries).to.eql(expectedEntries);
});
});
@@ -273,20 +273,20 @@ export default function({ getService, getPageObjects }) {
before(initBarChart);
it('should show correct series', async function() {
- await PageObjects.visualize.toggleOpenEditor(2, 'false');
- await PageObjects.visualize.clickBucket('Split series');
- await PageObjects.visualize.selectAggregation('Terms');
- await PageObjects.visualize.selectField('response.raw');
+ await PageObjects.visEditor.toggleOpenEditor(2, 'false');
+ await PageObjects.visEditor.clickBucket('Split series');
+ await PageObjects.visEditor.selectAggregation('Terms');
+ await PageObjects.visEditor.selectField('response.raw');
await PageObjects.header.waitUntilLoadingHasFinished();
- await PageObjects.visualize.toggleOpenEditor(3, 'false');
- await PageObjects.visualize.clickBucket('Split series');
- await PageObjects.visualize.selectAggregation('Terms');
- await PageObjects.visualize.selectField('machine.os');
+ await PageObjects.visEditor.toggleOpenEditor(3, 'false');
+ await PageObjects.visEditor.clickBucket('Split series');
+ await PageObjects.visEditor.selectAggregation('Terms');
+ await PageObjects.visEditor.selectField('machine.os');
await PageObjects.header.waitUntilLoadingHasFinished();
await PageObjects.common.sleep(1003);
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.clickGo();
await PageObjects.header.waitUntilLoadingHasFinished();
const expectedEntries = [
@@ -306,17 +306,17 @@ export default function({ getService, getPageObjects }) {
'404 - win 8',
'404 - win xp',
];
- const legendEntries = await PageObjects.visualize.getLegendEntries();
+ const legendEntries = await PageObjects.visChart.getLegendEntries();
expect(legendEntries).to.eql(expectedEntries);
});
it('should show correct series when disabling first agg', async function() {
- await PageObjects.visualize.toggleDisabledAgg(3);
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.toggleDisabledAgg(3);
+ await PageObjects.visEditor.clickGo();
await PageObjects.header.waitUntilLoadingHasFinished();
const expectedEntries = ['win 8', 'win xp', 'ios', 'osx', 'win 7'];
- const legendEntries = await PageObjects.visualize.getLegendEntries();
+ const legendEntries = await PageObjects.visChart.getLegendEntries();
expect(legendEntries).to.eql(expectedEntries);
});
});
@@ -325,17 +325,17 @@ export default function({ getService, getPageObjects }) {
before(initBarChart);
it('should show correct series', async function() {
- await PageObjects.visualize.toggleOpenEditor(2, 'false');
- await PageObjects.visualize.toggleOpenEditor(1);
- await PageObjects.visualize.selectAggregation('Derivative', 'metrics');
+ await PageObjects.visEditor.toggleOpenEditor(2, 'false');
+ await PageObjects.visEditor.toggleOpenEditor(1);
+ await PageObjects.visEditor.selectAggregation('Derivative', 'metrics');
await PageObjects.header.waitUntilLoadingHasFinished();
await PageObjects.common.sleep(1003);
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.clickGo();
await PageObjects.header.waitUntilLoadingHasFinished();
const expectedEntries = ['Derivative of Count'];
- const legendEntries = await PageObjects.visualize.getLegendEntries();
+ const legendEntries = await PageObjects.visChart.getLegendEntries();
expect(legendEntries).to.eql(expectedEntries);
});
});
diff --git a/test/functional/apps/visualize/_visualize_listing.js b/test/functional/apps/visualize/_visualize_listing.js
index 63a8a8310d2c1..e277c3c7d104d 100644
--- a/test/functional/apps/visualize/_visualize_listing.js
+++ b/test/functional/apps/visualize/_visualize_listing.js
@@ -19,8 +19,9 @@
import expect from '@kbn/expect';
-export default function({ getPageObjects }) {
- const PageObjects = getPageObjects(['visualize', 'header', 'common']);
+export default function({ getService, getPageObjects }) {
+ const PageObjects = getPageObjects(['visualize', 'visEditor']);
+ const listingTable = getService('listingTable');
// FLAKY: https://github.com/elastic/kibana/issues/40912
describe.skip('visualize listing page', function describeIndexTests() {
@@ -36,7 +37,7 @@ export default function({ getPageObjects }) {
// type markdown is used for simplicity
await PageObjects.visualize.createSimpleMarkdownViz(vizName);
await PageObjects.visualize.gotoVisualizationLandingPage();
- const visCount = await PageObjects.visualize.getCountOfItemsInListingTable();
+ const visCount = await listingTable.getItemsCount('visualize');
expect(visCount).to.equal(1);
});
@@ -45,11 +46,11 @@ export default function({ getPageObjects }) {
await PageObjects.visualize.createSimpleMarkdownViz(vizName + '2');
await PageObjects.visualize.gotoVisualizationLandingPage();
- let visCount = await PageObjects.visualize.getCountOfItemsInListingTable();
+ let visCount = await listingTable.getItemsCount('visualize');
expect(visCount).to.equal(3);
await PageObjects.visualize.deleteAllVisualizations();
- visCount = await PageObjects.visualize.getCountOfItemsInListingTable();
+ visCount = await listingTable.getItemsCount('visualize');
expect(visCount).to.equal(0);
});
});
@@ -60,45 +61,45 @@ export default function({ getPageObjects }) {
await PageObjects.visualize.gotoVisualizationLandingPage();
await PageObjects.visualize.navigateToNewVisualization();
await PageObjects.visualize.clickMarkdownWidget();
- await PageObjects.visualize.setMarkdownTxt('HELLO');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.setMarkdownTxt('HELLO');
+ await PageObjects.visEditor.clickGo();
await PageObjects.visualize.saveVisualization('Hello World');
await PageObjects.visualize.gotoVisualizationLandingPage();
});
it('matches on the first word', async function() {
- await PageObjects.visualize.searchForItemWithName('Hello');
- const itemCount = await PageObjects.visualize.getCountOfItemsInListingTable();
+ await listingTable.searchForItemWithName('Hello');
+ const itemCount = await listingTable.getItemsCount('visualize');
expect(itemCount).to.equal(1);
});
it('matches the second word', async function() {
- await PageObjects.visualize.searchForItemWithName('World');
- const itemCount = await PageObjects.visualize.getCountOfItemsInListingTable();
+ await listingTable.searchForItemWithName('World');
+ const itemCount = await listingTable.getItemsCount('visualize');
expect(itemCount).to.equal(1);
});
it('matches the second word prefix', async function() {
- await PageObjects.visualize.searchForItemWithName('Wor');
- const itemCount = await PageObjects.visualize.getCountOfItemsInListingTable();
+ await listingTable.searchForItemWithName('Wor');
+ const itemCount = await listingTable.getItemsCount('visualize');
expect(itemCount).to.equal(1);
});
it('does not match mid word', async function() {
- await PageObjects.visualize.searchForItemWithName('orld');
- const itemCount = await PageObjects.visualize.getCountOfItemsInListingTable();
+ await listingTable.searchForItemWithName('orld');
+ const itemCount = await listingTable.getItemsCount('visualize');
expect(itemCount).to.equal(0);
});
it('is case insensitive', async function() {
- await PageObjects.visualize.searchForItemWithName('hello world');
- const itemCount = await PageObjects.visualize.getCountOfItemsInListingTable();
+ await listingTable.searchForItemWithName('hello world');
+ const itemCount = await listingTable.getItemsCount('visualize');
expect(itemCount).to.equal(1);
});
it('is using AND operator', async function() {
- await PageObjects.visualize.searchForItemWithName('hello banana');
- const itemCount = await PageObjects.visualize.getCountOfItemsInListingTable();
+ await listingTable.searchForItemWithName('hello banana');
+ const itemCount = await listingTable.getItemsCount('visualize');
expect(itemCount).to.equal(0);
});
});
diff --git a/test/functional/apps/visualize/input_control_vis/chained_controls.js b/test/functional/apps/visualize/input_control_vis/chained_controls.js
index 96d9dae519b51..b56a37218aba5 100644
--- a/test/functional/apps/visualize/input_control_vis/chained_controls.js
+++ b/test/functional/apps/visualize/input_control_vis/chained_controls.js
@@ -21,7 +21,7 @@ import expect from '@kbn/expect';
export default function({ getService, getPageObjects }) {
const filterBar = getService('filterBar');
- const PageObjects = getPageObjects(['common', 'visualize', 'header', 'timePicker']);
+ const PageObjects = getPageObjects(['common', 'visualize', 'visEditor', 'header', 'timePicker']);
const testSubjects = getService('testSubjects');
const find = getService('find');
const comboBox = getService('comboBox');
@@ -65,7 +65,7 @@ export default function({ getService, getPageObjects }) {
it('should create a seperate filter pill for parent control and child control', async () => {
await comboBox.set('listControlSelect1', '14.61.182.136');
- await PageObjects.visualize.inputControlSubmit();
+ await PageObjects.visEditor.inputControlSubmit();
const hasParentControlFilter = await filterBar.hasFilter('geo.src', 'BR');
expect(hasParentControlFilter).to.equal(true);
diff --git a/test/functional/apps/visualize/input_control_vis/dynamic_options.js b/test/functional/apps/visualize/input_control_vis/dynamic_options.js
index 2354855f12079..d78c780a728a7 100644
--- a/test/functional/apps/visualize/input_control_vis/dynamic_options.js
+++ b/test/functional/apps/visualize/input_control_vis/dynamic_options.js
@@ -20,7 +20,7 @@
import expect from '@kbn/expect';
export default function({ getService, getPageObjects }) {
- const PageObjects = getPageObjects(['common', 'visualize', 'header', 'timePicker']);
+ const PageObjects = getPageObjects(['common', 'visualize', 'visEditor', 'header', 'timePicker']);
const comboBox = getService('comboBox');
describe('dynamic options', () => {
@@ -55,7 +55,7 @@ export default function({ getService, getPageObjects }) {
it('should not fetch new options when non-string is filtered', async () => {
await comboBox.set('fieldSelect-0', 'clientip');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.clickGo();
const initialOptions = await comboBox.getOptionsList('listControlSelect0');
expect(
diff --git a/test/functional/apps/visualize/input_control_vis/input_control_options.js b/test/functional/apps/visualize/input_control_vis/input_control_options.js
index 1c3f63e94ae75..8e8891ac585b3 100644
--- a/test/functional/apps/visualize/input_control_vis/input_control_options.js
+++ b/test/functional/apps/visualize/input_control_vis/input_control_options.js
@@ -21,7 +21,7 @@ import expect from '@kbn/expect';
export default function({ getService, getPageObjects }) {
const filterBar = getService('filterBar');
- const PageObjects = getPageObjects(['common', 'visualize', 'header', 'timePicker']);
+ const PageObjects = getPageObjects(['common', 'visualize', 'visEditor', 'header', 'timePicker']);
const testSubjects = getService('testSubjects');
const inspector = getService('inspector');
const find = getService('find');
@@ -38,11 +38,11 @@ export default function({ getService, getPageObjects }) {
'Jan 1, 2017 @ 00:00:00.000',
'Jan 1, 2017 @ 00:00:00.000'
);
- await PageObjects.visualize.clickVisEditorTab('controls');
- await PageObjects.visualize.addInputControl();
+ await PageObjects.visEditor.clickVisEditorTab('controls');
+ await PageObjects.visEditor.addInputControl();
await comboBox.set('indexPatternSelect-0', 'logstash- ');
await comboBox.set('fieldSelect-0', FIELD_NAME);
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.clickGo();
});
it('should not have inspector enabled', async function() {
@@ -89,7 +89,7 @@ export default function({ getService, getPageObjects }) {
});
it('should add filter pill when submit button is clicked', async () => {
- await PageObjects.visualize.inputControlSubmit();
+ await PageObjects.visEditor.inputControlSubmit();
const hasFilter = await filterBar.hasFilter(FIELD_NAME, 'ios');
expect(hasFilter).to.equal(true);
@@ -98,7 +98,7 @@ export default function({ getService, getPageObjects }) {
it('should replace existing filter pill(s) when new item is selected', async () => {
await comboBox.clear('listControlSelect0');
await comboBox.set('listControlSelect0', 'osx');
- await PageObjects.visualize.inputControlSubmit();
+ await PageObjects.visEditor.inputControlSubmit();
await PageObjects.common.sleep(1000);
const hasOldFilter = await filterBar.hasFilter(FIELD_NAME, 'ios');
@@ -117,11 +117,11 @@ export default function({ getService, getPageObjects }) {
it('should clear form when Clear button is clicked but not remove filter pill', async () => {
await comboBox.set('listControlSelect0', 'ios');
- await PageObjects.visualize.inputControlSubmit();
+ await PageObjects.visEditor.inputControlSubmit();
const hasFilterBeforeClearBtnClicked = await filterBar.hasFilter(FIELD_NAME, 'ios');
expect(hasFilterBeforeClearBtnClicked).to.equal(true);
- await PageObjects.visualize.inputControlClear();
+ await PageObjects.visEditor.inputControlClear();
const hasValue = await comboBox.doesComboBoxHaveSelectedOptions('listControlSelect0');
expect(hasValue).to.equal(false);
@@ -130,7 +130,7 @@ export default function({ getService, getPageObjects }) {
});
it('should remove filter pill when cleared form is submitted', async () => {
- await PageObjects.visualize.inputControlSubmit();
+ await PageObjects.visEditor.inputControlSubmit();
const hasFilter = await filterBar.hasFilter(FIELD_NAME, 'ios');
expect(hasFilter).to.equal(false);
});
@@ -138,17 +138,17 @@ export default function({ getService, getPageObjects }) {
describe('updateFiltersOnChange is true', () => {
before(async () => {
- await PageObjects.visualize.clickVisEditorTab('options');
- await PageObjects.visualize.checkSwitch('inputControlEditorUpdateFiltersOnChangeCheckbox');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.clickVisEditorTab('options');
+ await PageObjects.visEditor.checkSwitch('inputControlEditorUpdateFiltersOnChangeCheckbox');
+ await PageObjects.visEditor.clickGo();
});
after(async () => {
- await PageObjects.visualize.clickVisEditorTab('options');
- await PageObjects.visualize.uncheckSwitch(
+ await PageObjects.visEditor.clickVisEditorTab('options');
+ await PageObjects.visEditor.uncheckSwitch(
'inputControlEditorUpdateFiltersOnChangeCheckbox'
);
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.clickGo();
});
it('should not display staging control buttons', async () => {
@@ -173,9 +173,9 @@ export default function({ getService, getPageObjects }) {
describe('useTimeFilter', () => {
it('should use global time filter when getting terms', async () => {
- await PageObjects.visualize.clickVisEditorTab('options');
- await PageObjects.visualize.checkCheckbox('inputControlEditorUseTimeFilterCheckbox');
- await PageObjects.visualize.clickGo();
+ await PageObjects.visEditor.clickVisEditorTab('options');
+ await testSubjects.setCheckbox('inputControlEditorUseTimeFilterCheckbox', 'check');
+ await PageObjects.visEditor.clickGo();
// Expect control to be disabled because no terms could be gathered with time filter applied
const input = await find.byCssSelector('[data-test-subj="inputControl0"] input');
diff --git a/test/functional/apps/visualize/input_control_vis/input_control_range.ts b/test/functional/apps/visualize/input_control_vis/input_control_range.ts
index 2d6550de5dec9..f48ba7b54daf1 100644
--- a/test/functional/apps/visualize/input_control_vis/input_control_range.ts
+++ b/test/functional/apps/visualize/input_control_vis/input_control_range.ts
@@ -25,7 +25,7 @@ export default function({ getService, getPageObjects }: FtrProviderContext) {
const esArchiver = getService('esArchiver');
const kibanaServer = getService('kibanaServer');
const find = getService('find');
- const { visualize } = getPageObjects(['visualize']);
+ const { visualize, visEditor } = getPageObjects(['visualize', 'visEditor']);
describe('input control range', () => {
before(async () => {
@@ -35,36 +35,22 @@ export default function({ getService, getPageObjects }: FtrProviderContext) {
});
it('should add filter with scripted field', async () => {
- await visualize.addInputControl('range');
- await visualize.setFilterParams({
- indexPattern: 'kibana_sample_data_flights',
- field: 'hour_of_day',
- });
- await visualize.clickGo();
- await visualize.setFilterRange({
- min: '7',
- max: '10',
- });
- await visualize.inputControlSubmit();
+ await visEditor.addInputControl('range');
+ await visEditor.setFilterParams(0, 'kibana_sample_data_flights', 'hour_of_day');
+ await visEditor.clickGo();
+ await visEditor.setFilterRange(0, '7', '10');
+ await visEditor.inputControlSubmit();
const controlFilters = await find.allByCssSelector('[data-test-subj^="filter"]');
expect(controlFilters).to.have.length(1);
expect(await controlFilters[0].getVisibleText()).to.equal('hour_of_day: 7 to 10');
});
it('should add filter with price field', async () => {
- await visualize.addInputControl('range');
- await visualize.setFilterParams({
- aggNth: 1,
- indexPattern: 'kibana_sample_data_flights',
- field: 'AvgTicketPrice',
- });
- await visualize.clickGo();
- await visualize.setFilterRange({
- aggNth: 1,
- min: '400',
- max: '999',
- });
- await visualize.inputControlSubmit();
+ await visEditor.addInputControl('range');
+ await visEditor.setFilterParams(1, 'kibana_sample_data_flights', 'AvgTicketPrice');
+ await visEditor.clickGo();
+ await visEditor.setFilterRange(1, '400', '999');
+ await visEditor.inputControlSubmit();
const controlFilters = await find.allByCssSelector('[data-test-subj^="filter"]');
expect(controlFilters).to.have.length(2);
expect(await controlFilters[1].getVisibleText()).to.equal('AvgTicketPrice: $400 to $999');
diff --git a/test/functional/page_objects/common_page.ts b/test/functional/page_objects/common_page.ts
index 9629b8ccf28e1..75a15cc16db2e 100644
--- a/test/functional/page_objects/common_page.ts
+++ b/test/functional/page_objects/common_page.ts
@@ -39,6 +39,14 @@ export function CommonPageProvider({ getService, getPageObjects }: FtrProviderCo
const defaultTryTimeout = config.get('timeouts.try');
const defaultFindTimeout = config.get('timeouts.find');
+ interface NavigateProps {
+ appConfig: {};
+ ensureCurrentUrl: boolean;
+ shouldLoginIfPrompted: boolean;
+ shouldAcceptAlert: boolean;
+ useActualUrl: boolean;
+ }
+
class CommonPage {
/**
* Navigates the browser window to provided URL
@@ -115,6 +123,34 @@ export function CommonPageProvider({ getService, getPageObjects }: FtrProviderCo
return currentUrl;
}
+ private async navigate(navigateProps: NavigateProps) {
+ const {
+ appConfig,
+ ensureCurrentUrl,
+ shouldLoginIfPrompted,
+ shouldAcceptAlert,
+ useActualUrl,
+ } = navigateProps;
+ const appUrl = getUrl.noAuth(config.get('servers.kibana'), appConfig);
+
+ await retry.try(async () => {
+ if (useActualUrl) {
+ log.debug(`navigateToActualUrl ${appUrl}`);
+ await browser.get(appUrl);
+ } else {
+ await CommonPage.navigateToUrlAndHandleAlert(appUrl, shouldAcceptAlert);
+ }
+
+ const currentUrl = shouldLoginIfPrompted
+ ? await this.loginIfPrompted(appUrl)
+ : await browser.getCurrentUrl();
+
+ if (ensureCurrentUrl && !currentUrl.includes(appUrl)) {
+ throw new Error(`expected ${currentUrl}.includes(${appUrl})`);
+ }
+ });
+ }
+
/**
* Navigates browser using the pathname from the appConfig and subUrl as the hash
* @param appName As defined in the apps config, e.g. 'home'
@@ -137,23 +173,44 @@ export function CommonPageProvider({ getService, getPageObjects }: FtrProviderCo
hash: useActualUrl ? subUrl : `/${appName}/${subUrl}`,
};
- const appUrl = getUrl.noAuth(config.get('servers.kibana'), appConfig);
-
- await retry.try(async () => {
- if (useActualUrl) {
- log.debug(`navigateToActualUrl ${appUrl}`);
- await browser.get(appUrl);
- } else {
- await CommonPage.navigateToUrlAndHandleAlert(appUrl, shouldAcceptAlert);
- }
+ await this.navigate({
+ appConfig,
+ ensureCurrentUrl,
+ shouldLoginIfPrompted,
+ shouldAcceptAlert,
+ useActualUrl,
+ });
+ }
- const currentUrl = shouldLoginIfPrompted
- ? await this.loginIfPrompted(appUrl)
- : await browser.getCurrentUrl();
+ /**
+ * Navigates browser using the pathname from the appConfig and subUrl as the extended path.
+ * This was added to be able to test an application that uses browser history over hash history.
+ * @param appName As defined in the apps config, e.g. 'home'
+ * @param subUrl The route after the appUrl, e.g. 'tutorial_directory/sampleData'
+ * @param args additional arguments
+ */
+ public async navigateToUrlWithBrowserHistory(
+ appName: string,
+ subUrl?: string,
+ {
+ basePath = '',
+ ensureCurrentUrl = true,
+ shouldLoginIfPrompted = true,
+ shouldAcceptAlert = true,
+ useActualUrl = true,
+ } = {}
+ ) {
+ const appConfig = {
+ // subUrl following the basePath, assumes no hashes. Ex: 'app/endpoint/management'
+ pathname: `${basePath}${config.get(['apps', appName]).pathname}${subUrl}`,
+ };
- if (ensureCurrentUrl && !currentUrl.includes(appUrl)) {
- throw new Error(`expected ${currentUrl}.includes(${appUrl})`);
- }
+ await this.navigate({
+ appConfig,
+ ensureCurrentUrl,
+ shouldLoginIfPrompted,
+ shouldAcceptAlert,
+ useActualUrl,
});
}
diff --git a/test/functional/page_objects/index.ts b/test/functional/page_objects/index.ts
index 5a104c8d17bf2..5526243ea2bbd 100644
--- a/test/functional/page_objects/index.ts
+++ b/test/functional/page_objects/index.ts
@@ -39,7 +39,6 @@ import { NewsfeedPageProvider } from './newsfeed_page';
import { PointSeriesPageProvider } from './point_series_page';
// @ts-ignore not TS yet
import { SettingsPageProvider } from './settings_page';
-// @ts-ignore not TS yet
import { SharePageProvider } from './share_page';
// @ts-ignore not TS yet
import { ShieldPageProvider } from './shield_page';
@@ -48,8 +47,12 @@ import { TimePickerPageProvider } from './time_picker';
// @ts-ignore not TS yet
import { TimelionPageProvider } from './timelion_page';
import { VisualBuilderPageProvider } from './visual_builder_page';
-// @ts-ignore not TS yet
import { VisualizePageProvider } from './visualize_page';
+import { VisualizeEditorPageProvider } from './visualize_editor_page';
+import { VisualizeChartPageProvider } from './visualize_chart_page';
+import { TileMapPageProvider } from './tile_map_page';
+import { TagCloudPageProvider } from './tag_cloud_page';
+import { VegaChartPageProvider } from './vega_chart_page';
export const pageObjects = {
common: CommonPageProvider,
@@ -70,4 +73,9 @@ export const pageObjects = {
timePicker: TimePickerPageProvider,
visualBuilder: VisualBuilderPageProvider,
visualize: VisualizePageProvider,
+ visEditor: VisualizeEditorPageProvider,
+ visChart: VisualizeChartPageProvider,
+ tileMap: TileMapPageProvider,
+ tagCloud: TagCloudPageProvider,
+ vegaChart: VegaChartPageProvider,
};
diff --git a/test/functional/page_objects/point_series_page.js b/test/functional/page_objects/point_series_page.js
index 9172809eb73e5..74bf07b59bc38 100644
--- a/test/functional/page_objects/point_series_page.js
+++ b/test/functional/page_objects/point_series_page.js
@@ -23,10 +23,6 @@ export function PointSeriesPageProvider({ getService }) {
const find = getService('find');
class PointSeriesVis {
- async clickOptions() {
- return await testSubjects.click('visEditorTaboptions');
- }
-
async clickAxisOptions() {
return await testSubjects.click('visEditorTabadvanced');
}
diff --git a/test/functional/page_objects/share_page.ts b/test/functional/page_objects/share_page.ts
index 906effcb54a26..fc8db9b78a03f 100644
--- a/test/functional/page_objects/share_page.ts
+++ b/test/functional/page_objects/share_page.ts
@@ -19,10 +19,9 @@
import { FtrProviderContext } from '../ftr_provider_context';
-export function SharePageProvider({ getService, getPageObjects }: FtrProviderContext) {
+export function SharePageProvider({ getService }: FtrProviderContext) {
const testSubjects = getService('testSubjects');
const find = getService('find');
- const PageObjects = getPageObjects(['visualize', 'common']);
const log = getService('log');
class SharePage {
@@ -78,7 +77,7 @@ export function SharePageProvider({ getService, getPageObjects }: FtrProviderCon
async checkShortenUrl() {
const shareForm = await testSubjects.find('shareUrlForm');
- await PageObjects.visualize.checkCheckbox('useShortUrl');
+ await testSubjects.setCheckbox('useShortUrl', 'check');
await shareForm.waitForDeletedByCssSelector('.euiLoadingSpinner');
}
diff --git a/test/functional/page_objects/tag_cloud_page.ts b/test/functional/page_objects/tag_cloud_page.ts
new file mode 100644
index 0000000000000..7d87caa39b2fb
--- /dev/null
+++ b/test/functional/page_objects/tag_cloud_page.ts
@@ -0,0 +1,52 @@
+/*
+ * Licensed to Elasticsearch B.V. under one or more contributor
+ * license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright
+ * ownership. Elasticsearch B.V. licenses this file to you under
+ * the Apache License, Version 2.0 (the "License"); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { FtrProviderContext } from '../ftr_provider_context';
+import { WebElementWrapper } from '../services/lib/web_element_wrapper';
+
+export function TagCloudPageProvider({ getService, getPageObjects }: FtrProviderContext) {
+ const find = getService('find');
+ const testSubjects = getService('testSubjects');
+ const { header, visChart } = getPageObjects(['header', 'visChart']);
+
+ class TagCloudPage {
+ public async selectTagCloudTag(tagDisplayText: string) {
+ await testSubjects.click(tagDisplayText);
+ await header.waitUntilLoadingHasFinished();
+ }
+
+ public async getTextTag() {
+ await visChart.waitForVisualization();
+ const elements = await find.allByCssSelector('text');
+ return await Promise.all(elements.map(async element => await element.getVisibleText()));
+ }
+
+ public async getTextSizes() {
+ const tags = await find.allByCssSelector('text');
+ async function returnTagSize(tag: WebElementWrapper) {
+ const style = await tag.getAttribute('style');
+ const fontSize = style.match(/font-size: ([^;]*);/);
+ return fontSize ? fontSize[1] : '';
+ }
+ return await Promise.all(tags.map(returnTagSize));
+ }
+ }
+
+ return new TagCloudPage();
+}
diff --git a/test/functional/page_objects/tile_map_page.ts b/test/functional/page_objects/tile_map_page.ts
new file mode 100644
index 0000000000000..b41578f782af4
--- /dev/null
+++ b/test/functional/page_objects/tile_map_page.ts
@@ -0,0 +1,102 @@
+/*
+ * Licensed to Elasticsearch B.V. under one or more contributor
+ * license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright
+ * ownership. Elasticsearch B.V. licenses this file to you under
+ * the Apache License, Version 2.0 (the "License"); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { FtrProviderContext } from '../ftr_provider_context';
+
+export function TileMapPageProvider({ getService, getPageObjects }: FtrProviderContext) {
+ const find = getService('find');
+ const testSubjects = getService('testSubjects');
+ const retry = getService('retry');
+ const log = getService('log');
+ const inspector = getService('inspector');
+ const { header } = getPageObjects(['header']);
+
+ class TileMapPage {
+ public async getZoomSelectors(zoomSelector: string) {
+ return await find.allByCssSelector(zoomSelector);
+ }
+
+ public async clickMapButton(zoomSelector: string, waitForLoading?: boolean) {
+ await retry.try(async () => {
+ const zooms = await this.getZoomSelectors(zoomSelector);
+ await Promise.all(zooms.map(async zoom => await zoom.click()));
+ if (waitForLoading) {
+ await header.waitUntilLoadingHasFinished();
+ }
+ });
+ }
+
+ public async getVisualizationRequest() {
+ log.debug('getVisualizationRequest');
+ await inspector.open();
+ await testSubjects.click('inspectorViewChooser');
+ await testSubjects.click('inspectorViewChooserRequests');
+ await testSubjects.click('inspectorRequestDetailRequest');
+ return await testSubjects.getVisibleText('inspectorRequestBody');
+ }
+
+ public async getMapBounds(): Promise