diff --git a/.buildkite/scripts/steps/functional/performance_sub_playwright.sh b/.buildkite/scripts/steps/functional/performance_sub_playwright.sh index 771afe6c78c60..596304d156cf0 100644 --- a/.buildkite/scripts/steps/functional/performance_sub_playwright.sh +++ b/.buildkite/scripts/steps/functional/performance_sub_playwright.sh @@ -23,7 +23,7 @@ cd "$XPACK_DIR" jobId=$(npx uuid) export TEST_JOB_ID="$jobId" -journeys=("login" "ecommerce_dashboard" "flight_dashboard" "web_logs_dashboard" "promotion_tracking_dashboard") +journeys=("ecommerce_dashboard" "flight_dashboard" "web_logs_dashboard" "promotion_tracking_dashboard") for i in "${journeys[@]}"; do echo "JOURNEY[${i}] is running" diff --git a/docs/development/core/public/kibana-plugin-core-public.simplesavedobject._constructor_.md b/docs/development/core/public/kibana-plugin-core-public.simplesavedobject._constructor_.md index f53b6e5292861..412154f7ac2e3 100644 --- a/docs/development/core/public/kibana-plugin-core-public.simplesavedobject._constructor_.md +++ b/docs/development/core/public/kibana-plugin-core-public.simplesavedobject._constructor_.md @@ -9,7 +9,7 @@ Constructs a new instance of the `SimpleSavedObject` class Signature: ```typescript -constructor(client: SavedObjectsClientContract, { id, type, version, attributes, error, references, migrationVersion, coreMigrationVersion, namespaces, }: SavedObjectType); +constructor(client: SavedObjectsClientContract, { id, type, version, attributes, error, references, migrationVersion, coreMigrationVersion, namespaces, updated_at: updatedAt, }: SavedObjectType); ``` ## Parameters @@ -17,5 +17,5 @@ constructor(client: SavedObjectsClientContract, { id, type, version, attributes, | Parameter | Type | Description | | --- | --- | --- | | client | SavedObjectsClientContract | | -| { id, type, version, attributes, error, references, migrationVersion, coreMigrationVersion, namespaces, } | SavedObjectType<T> | | +| { id, type, version, attributes, error, references, migrationVersion, coreMigrationVersion, namespaces, updated\_at: updatedAt, } | SavedObjectType<T> | | diff --git a/docs/development/core/public/kibana-plugin-core-public.simplesavedobject.md b/docs/development/core/public/kibana-plugin-core-public.simplesavedobject.md index 2aac93f9b5bc1..512fc74d538e3 100644 --- a/docs/development/core/public/kibana-plugin-core-public.simplesavedobject.md +++ b/docs/development/core/public/kibana-plugin-core-public.simplesavedobject.md @@ -18,7 +18,7 @@ export declare class SimpleSavedObject | Constructor | Modifiers | Description | | --- | --- | --- | -| [(constructor)(client, { id, type, version, attributes, error, references, migrationVersion, coreMigrationVersion, namespaces, })](./kibana-plugin-core-public.simplesavedobject._constructor_.md) | | Constructs a new instance of the SimpleSavedObject class | +| [(constructor)(client, { id, type, version, attributes, error, references, migrationVersion, coreMigrationVersion, namespaces, updated\_at: updatedAt, })](./kibana-plugin-core-public.simplesavedobject._constructor_.md) | | Constructs a new instance of the SimpleSavedObject class | ## Properties @@ -33,6 +33,7 @@ export declare class SimpleSavedObject | [namespaces](./kibana-plugin-core-public.simplesavedobject.namespaces.md) | | SavedObjectType<T>\['namespaces'\] | Space(s) that this saved object exists in. This attribute is not used for "global" saved object types which are registered with namespaceType: 'agnostic'. | | [references](./kibana-plugin-core-public.simplesavedobject.references.md) | | SavedObjectType<T>\['references'\] | | | [type](./kibana-plugin-core-public.simplesavedobject.type.md) | | SavedObjectType<T>\['type'\] | | +| [updatedAt](./kibana-plugin-core-public.simplesavedobject.updatedat.md) | | SavedObjectType<T>\['updated\_at'\] | | ## Methods diff --git a/docs/development/core/public/kibana-plugin-core-public.simplesavedobject.updatedat.md b/docs/development/core/public/kibana-plugin-core-public.simplesavedobject.updatedat.md new file mode 100644 index 0000000000000..80b1f95969934 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-core-public.simplesavedobject.updatedat.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [SimpleSavedObject](./kibana-plugin-core-public.simplesavedobject.md) > [updatedAt](./kibana-plugin-core-public.simplesavedobject.updatedat.md) + +## SimpleSavedObject.updatedAt property + +Signature: + +```typescript +updatedAt: SavedObjectType['updated_at']; +``` diff --git a/docs/development/core/server/kibana-plugin-core-server.elasticsearchservicesetup.legacy.md b/docs/development/core/server/kibana-plugin-core-server.elasticsearchservicesetup.legacy.md index bcc2f474fa483..03e2be0da7a10 100644 --- a/docs/development/core/server/kibana-plugin-core-server.elasticsearchservicesetup.legacy.md +++ b/docs/development/core/server/kibana-plugin-core-server.elasticsearchservicesetup.legacy.md @@ -6,7 +6,6 @@ > Warning: This API is now obsolete. > -> Use [ElasticsearchServiceStart.legacy](./kibana-plugin-core-server.elasticsearchservicestart.legacy.md) instead. > Signature: diff --git a/docs/development/core/server/kibana-plugin-core-server.elasticsearchservicestart.legacy.md b/docs/development/core/server/kibana-plugin-core-server.elasticsearchservicestart.legacy.md deleted file mode 100644 index 844ebf3815a99..0000000000000 --- a/docs/development/core/server/kibana-plugin-core-server.elasticsearchservicestart.legacy.md +++ /dev/null @@ -1,18 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [ElasticsearchServiceStart](./kibana-plugin-core-server.elasticsearchservicestart.md) > [legacy](./kibana-plugin-core-server.elasticsearchservicestart.legacy.md) - -## ElasticsearchServiceStart.legacy property - -> Warning: This API is now obsolete. -> -> Provided for the backward compatibility. Switch to the new elasticsearch client as soon as https://github.com/elastic/kibana/issues/35508 done. -> - -Signature: - -```typescript -legacy: { - readonly config$: Observable; - }; -``` diff --git a/docs/development/core/server/kibana-plugin-core-server.elasticsearchservicestart.md b/docs/development/core/server/kibana-plugin-core-server.elasticsearchservicestart.md index 5bd8f9d0a4332..66ff94ee9c80d 100644 --- a/docs/development/core/server/kibana-plugin-core-server.elasticsearchservicestart.md +++ b/docs/development/core/server/kibana-plugin-core-server.elasticsearchservicestart.md @@ -17,5 +17,4 @@ export interface ElasticsearchServiceStart | --- | --- | --- | | [client](./kibana-plugin-core-server.elasticsearchservicestart.client.md) | IClusterClient | A pre-configured [Elasticsearch client](./kibana-plugin-core-server.iclusterclient.md) | | [createClient](./kibana-plugin-core-server.elasticsearchservicestart.createclient.md) | (type: string, clientConfig?: Partial<ElasticsearchClientConfig>) => ICustomClusterClient | Create application specific Elasticsearch cluster API client with customized config. See [IClusterClient](./kibana-plugin-core-server.iclusterclient.md). | -| [legacy](./kibana-plugin-core-server.elasticsearchservicestart.legacy.md) | { readonly config$: Observable<ElasticsearchConfig>; } | | diff --git a/docs/development/core/server/kibana-plugin-core-server.httpservicesetup.auth.md b/docs/development/core/server/kibana-plugin-core-server.httpservicesetup.auth.md deleted file mode 100644 index da348a2282b1a..0000000000000 --- a/docs/development/core/server/kibana-plugin-core-server.httpservicesetup.auth.md +++ /dev/null @@ -1,18 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [HttpServiceSetup](./kibana-plugin-core-server.httpservicesetup.md) > [auth](./kibana-plugin-core-server.httpservicesetup.auth.md) - -## HttpServiceSetup.auth property - -> Warning: This API is now obsolete. -> -> use [the start contract](./kibana-plugin-core-server.httpservicestart.auth.md) instead. -> - -Auth status. See [HttpAuth](./kibana-plugin-core-server.httpauth.md) - -Signature: - -```typescript -auth: HttpAuth; -``` diff --git a/docs/development/core/server/kibana-plugin-core-server.httpservicesetup.md b/docs/development/core/server/kibana-plugin-core-server.httpservicesetup.md index 81ddeaaaa5a12..f3be1a9130b9c 100644 --- a/docs/development/core/server/kibana-plugin-core-server.httpservicesetup.md +++ b/docs/development/core/server/kibana-plugin-core-server.httpservicesetup.md @@ -77,7 +77,6 @@ async (context, request, response) => { | Property | Type | Description | | --- | --- | --- | -| [auth](./kibana-plugin-core-server.httpservicesetup.auth.md) | HttpAuth | Auth status. See [HttpAuth](./kibana-plugin-core-server.httpauth.md) | | [basePath](./kibana-plugin-core-server.httpservicesetup.basepath.md) | IBasePath | Access or manipulate the Kibana base path See [IBasePath](./kibana-plugin-core-server.ibasepath.md). | | [createCookieSessionStorageFactory](./kibana-plugin-core-server.httpservicesetup.createcookiesessionstoragefactory.md) | <T>(cookieOptions: SessionStorageCookieOptions<T>) => Promise<SessionStorageFactory<T>> | Creates cookie based session storage factory [SessionStorageFactory](./kibana-plugin-core-server.sessionstoragefactory.md) | | [createRouter](./kibana-plugin-core-server.httpservicesetup.createrouter.md) | <Context extends RequestHandlerContext = RequestHandlerContext>() => IRouter<Context> | Provides ability to declare a handler function for a particular path and HTTP request method. | diff --git a/packages/kbn-es/src/cli_commands/snapshot.js b/packages/kbn-es/src/cli_commands/snapshot.js index 1c902796a0a0c..095ce3cb04299 100644 --- a/packages/kbn-es/src/cli_commands/snapshot.js +++ b/packages/kbn-es/src/cli_commands/snapshot.js @@ -33,6 +33,8 @@ exports.help = (defaults = {}) => { --use-cached Skips cache verification and use cached ES snapshot. --skip-ready-check Disable the ready check, --ready-timeout Customize the ready check timeout, in seconds or "Xm" format, defaults to 1m + --plugins Comma seperated list of Elasticsearch plugins to install + --secure-files Comma seperated list of secure_setting_name=/path pairs Example: @@ -58,6 +60,7 @@ exports.run = async (defaults = {}) => { useCached: 'use-cached', skipReadyCheck: 'skip-ready-check', readyTimeout: 'ready-timeout', + secureFiles: 'secure-files', }, string: ['version', 'ready-timeout'], @@ -76,6 +79,13 @@ exports.run = async (defaults = {}) => { if (options.dataArchive) { await cluster.extractDataDirectory(installPath, options.dataArchive); } + if (options.plugins) { + await cluster.installPlugins(installPath, options.plugins, options); + } + if (options.secureFiles) { + const pairs = options.secureFiles.split(',').map((kv) => kv.split('=').map((v) => v.trim())); + await cluster.configureKeystoreWithSecureSettingsFiles(installPath, pairs); + } reportTime(installStartTime, 'installed', { success: true, diff --git a/packages/kbn-es/src/cli_commands/source.js b/packages/kbn-es/src/cli_commands/source.js index c16e89e2c7f32..d1f8e02b55680 100644 --- a/packages/kbn-es/src/cli_commands/source.js +++ b/packages/kbn-es/src/cli_commands/source.js @@ -27,6 +27,8 @@ exports.help = (defaults = {}) => { --password Sets password for elastic user [default: ${password}] --password.[user] Sets password for native realm user [default: ${password}] --ssl Sets up SSL on Elasticsearch + --plugins Comma seperated list of Elasticsearch plugins to install + --secure-files Comma seperated list of secure_setting_name=/path pairs -E Additional key=value settings to pass to Elasticsearch --skip-ready-check Disable the ready check, --ready-timeout Customize the ready check timeout, in seconds or "Xm" format, defaults to 1m @@ -47,6 +49,7 @@ exports.run = async (defaults = {}) => { dataArchive: 'data-archive', skipReadyCheck: 'skip-ready-check', readyTimeout: 'ready-timeout', + secureFiles: 'secure-files', esArgs: 'E', }, @@ -62,6 +65,13 @@ exports.run = async (defaults = {}) => { if (options.dataArchive) { await cluster.extractDataDirectory(installPath, options.dataArchive); } + if (options.plugins) { + await cluster.installPlugins(installPath, options.plugins, options); + } + if (options.secureFiles) { + const pairs = options.secureFiles.split(',').map((kv) => kv.split('=').map((v) => v.trim())); + await cluster.configureKeystoreWithSecureSettingsFiles(installPath, pairs); + } await cluster.run(installPath, { ...options, diff --git a/packages/kbn-es/src/cluster.js b/packages/kbn-es/src/cluster.js index 3dd6d79fcb14e..a6faffc2cfcd7 100644 --- a/packages/kbn-es/src/cluster.js +++ b/packages/kbn-es/src/cluster.js @@ -12,7 +12,7 @@ const chalk = require('chalk'); const path = require('path'); const { Client } = require('@elastic/elasticsearch'); const { downloadSnapshot, installSnapshot, installSource, installArchive } = require('./install'); -const { ES_BIN } = require('./paths'); +const { ES_BIN, ES_PLUGIN_BIN, ES_KEYSTORE_BIN } = require('./paths'); const { log: defaultLog, parseEsLog, @@ -150,6 +150,42 @@ exports.Cluster = class Cluster { }); } + /** + * Starts ES and returns resolved promise once started + * + * @param {String} installPath + * @param {String} plugins - comma separated list of plugins to install + * @param {Object} options + * @returns {Promise} + */ + async installPlugins(installPath, plugins, options) { + const esJavaOpts = this.javaOptions(options); + for (const plugin of plugins.split(',')) { + await execa(ES_PLUGIN_BIN, ['install', plugin.trim()], { + cwd: installPath, + env: { + JAVA_HOME: '', // By default, we want to always unset JAVA_HOME so that the bundled JDK will be used + ES_JAVA_OPTS: esJavaOpts.trim(), + }, + }); + } + } + + async configureKeystoreWithSecureSettingsFiles(installPath, secureSettingsFiles) { + const env = { JAVA_HOME: '' }; + for (const [secureSettingName, secureSettingFile] of secureSettingsFiles) { + this._log.info( + `setting secure setting %s to %s`, + chalk.bold(secureSettingName), + chalk.bold(secureSettingFile) + ); + await execa(ES_KEYSTORE_BIN, ['add-file', secureSettingName, secureSettingFile], { + cwd: installPath, + env, + }); + } + } + /** * Starts ES and returns resolved promise once started * @@ -280,19 +316,9 @@ exports.Cluster = class Cluster { ); this._log.info('%s %s', ES_BIN, args.join(' ')); + const esJavaOpts = this.javaOptions(options); - let esJavaOpts = `${options.esJavaOpts || ''} ${process.env.ES_JAVA_OPTS || ''}`; - - // ES now automatically sets heap size to 50% of the machine's available memory - // so we need to set it to a smaller size for local dev and CI - // especially because we currently run many instances of ES on the same machine during CI - // inital and max must be the same, so we only need to check the max - if (!esJavaOpts.includes('Xmx')) { - // 1536m === 1.5g - esJavaOpts += ' -Xms1536m -Xmx1536m'; - } - - this._log.info('ES_JAVA_OPTS: %s', esJavaOpts.trim()); + this._log.info('ES_JAVA_OPTS: %s', esJavaOpts); this._process = execa(ES_BIN, args, { cwd: installPath, @@ -300,7 +326,7 @@ exports.Cluster = class Cluster { ...(installPath ? { ES_TMPDIR: path.resolve(installPath, 'ES_TMPDIR') } : {}), ...process.env, JAVA_HOME: '', // By default, we want to always unset JAVA_HOME so that the bundled JDK will be used - ES_JAVA_OPTS: esJavaOpts.trim(), + ES_JAVA_OPTS: esJavaOpts, }, stdio: ['ignore', 'pipe', 'pipe'], }); @@ -429,4 +455,18 @@ exports.Cluster = class Cluster { } } } + + javaOptions(options) { + let esJavaOpts = `${options.esJavaOpts || ''} ${process.env.ES_JAVA_OPTS || ''}`; + + // ES now automatically sets heap size to 50% of the machine's available memory + // so we need to set it to a smaller size for local dev and CI + // especially because we currently run many instances of ES on the same machine during CI + // inital and max must be the same, so we only need to check the max + if (!esJavaOpts.includes('Xmx')) { + // 1536m === 1.5g + esJavaOpts += ' -Xms1536m -Xmx1536m'; + } + return esJavaOpts.trim(); + } }; diff --git a/packages/kbn-es/src/paths.ts b/packages/kbn-es/src/paths.ts index c1b859af4e1f5..1d909f523302e 100644 --- a/packages/kbn-es/src/paths.ts +++ b/packages/kbn-es/src/paths.ts @@ -19,6 +19,7 @@ export const BASE_PATH = Path.resolve(tempDir, 'kbn-es'); export const GRADLE_BIN = maybeUseBat('./gradlew'); export const ES_BIN = maybeUseBat('bin/elasticsearch'); +export const ES_PLUGIN_BIN = maybeUseBat('bin/elasticsearch-plugin'); export const ES_CONFIG = 'config/elasticsearch.yml'; export const ES_KEYSTORE_BIN = maybeUseBat('./bin/elasticsearch-keystore'); diff --git a/packages/kbn-test/src/kbn_client/kbn_client_saved_objects.ts b/packages/kbn-test/src/kbn_client/kbn_client_saved_objects.ts index 717f214211d95..02861fcb27fdb 100644 --- a/packages/kbn-test/src/kbn_client/kbn_client_saved_objects.ts +++ b/packages/kbn-test/src/kbn_client/kbn_client_saved_objects.ts @@ -219,6 +219,25 @@ export class KbnClientSavedObjects { this.log.success('deleted', deleted, 'objects'); } + public async cleanStandardList(options?: { space?: string }) { + // add types here + const types = [ + 'search', + 'index-pattern', + 'visualization', + 'dashboard', + 'lens', + 'map', + 'graph-workspace', + 'query', + 'tag', + 'url', + 'canvas-workpad', + ]; + const newOptions = { types, space: options?.space }; + await this.clean(newOptions); + } + public async bulkDelete(options: DeleteObjectsOptions) { let deleted = 0; let missing = 0; diff --git a/src/core/public/public.api.md b/src/core/public/public.api.md index ed119620ac08b..6145cce3912fd 100644 --- a/src/core/public/public.api.md +++ b/src/core/public/public.api.md @@ -1389,7 +1389,7 @@ export class ScopedHistory implements History_2< // @public export class SimpleSavedObject { - constructor(client: SavedObjectsClientContract, { id, type, version, attributes, error, references, migrationVersion, coreMigrationVersion, namespaces, }: SavedObject); + constructor(client: SavedObjectsClientContract, { id, type, version, attributes, error, references, migrationVersion, coreMigrationVersion, namespaces, updated_at: updatedAt, }: SavedObject); // (undocumented) attributes: T; // (undocumented) @@ -1416,6 +1416,8 @@ export class SimpleSavedObject { // (undocumented) type: SavedObject['type']; // (undocumented) + updatedAt: SavedObject['updated_at']; + // (undocumented) _version?: SavedObject['version']; } diff --git a/src/core/public/saved_objects/simple_saved_object.test.ts b/src/core/public/saved_objects/simple_saved_object.test.ts index b9338f4dc38bf..432bc215a5b4c 100644 --- a/src/core/public/saved_objects/simple_saved_object.test.ts +++ b/src/core/public/saved_objects/simple_saved_object.test.ts @@ -45,4 +45,67 @@ describe('SimpleSavedObject', () => { const savedObject = new SimpleSavedObject(client, { version } as SavedObject); expect(savedObject._version).toEqual(version); }); + + it('save() changes updatedAt field on existing SimpleSavedObject with an id', async function () { + const date = new Date(); + const initialDate = date.toISOString(); + date.setDate(date.getDate() + 1); + const secondDate = date.toISOString(); + + const config = { + attributes: {}, + id: 'id', + type: 'type', + }; + + const initialSavedObject = new SimpleSavedObject(client, { + ...config, + updated_at: initialDate, + } as SavedObject); + + const updatedSavedObject = new SimpleSavedObject(client, { + ...config, + updated_at: secondDate, + } as SavedObject); + + (client.update as jest.Mock).mockReturnValue(Promise.resolve(updatedSavedObject)); + + const initialValue = initialSavedObject.updatedAt; + await initialSavedObject.save(); + const updatedValue = updatedSavedObject.updatedAt; + + expect(initialValue).not.toEqual(updatedValue); + expect(initialSavedObject.updatedAt).toEqual(updatedValue); + }); + + it('save() changes updatedAt field on existing SimpleSavedObject without an id', async () => { + const date = new Date(); + const initialDate = date.toISOString(); + date.setDate(date.getDate() + 1); + const secondDate = date.toISOString(); + + const config = { + attributes: {}, + type: 'type', + }; + + const initialSavedObject = new SimpleSavedObject(client, { + ...config, + updated_at: initialDate, + } as SavedObject); + + const updatedSavedObject = new SimpleSavedObject(client, { + ...config, + updated_at: secondDate, + } as SavedObject); + + (client.create as jest.Mock).mockReturnValue(Promise.resolve(updatedSavedObject)); + + const initialValue = initialSavedObject.updatedAt; + await initialSavedObject.save(); + const updatedValue = updatedSavedObject.updatedAt; + + expect(initialValue).not.toEqual(updatedValue); + expect(initialSavedObject.updatedAt).toEqual(updatedValue); + }); }); diff --git a/src/core/public/saved_objects/simple_saved_object.ts b/src/core/public/saved_objects/simple_saved_object.ts index 449d3d7943fca..512c6c7656741 100644 --- a/src/core/public/saved_objects/simple_saved_object.ts +++ b/src/core/public/saved_objects/simple_saved_object.ts @@ -30,6 +30,7 @@ export class SimpleSavedObject { public coreMigrationVersion: SavedObjectType['coreMigrationVersion']; public error: SavedObjectType['error']; public references: SavedObjectType['references']; + public updatedAt: SavedObjectType['updated_at']; /** * Space(s) that this saved object exists in. This attribute is not used for "global" saved object types which are registered with * `namespaceType: 'agnostic'`. @@ -48,6 +49,7 @@ export class SimpleSavedObject { migrationVersion, coreMigrationVersion, namespaces, + updated_at: updatedAt, }: SavedObjectType ) { this.id = id; @@ -58,6 +60,7 @@ export class SimpleSavedObject { this.migrationVersion = migrationVersion; this.coreMigrationVersion = coreMigrationVersion; this.namespaces = namespaces; + this.updatedAt = updatedAt; if (error) { this.error = error; } @@ -77,15 +80,25 @@ export class SimpleSavedObject { public save(): Promise> { if (this.id) { - return this.client.update(this.type, this.id, this.attributes, { - references: this.references, - }); + return this.client + .update(this.type, this.id, this.attributes, { + references: this.references, + }) + .then((sso) => { + this.updatedAt = sso.updatedAt; + return sso; + }); } else { - return this.client.create(this.type, this.attributes, { - migrationVersion: this.migrationVersion, - coreMigrationVersion: this.coreMigrationVersion, - references: this.references, - }); + return this.client + .create(this.type, this.attributes, { + migrationVersion: this.migrationVersion, + coreMigrationVersion: this.coreMigrationVersion, + references: this.references, + }) + .then((sso) => { + this.updatedAt = sso.updatedAt; + return sso; + }); } } diff --git a/src/core/server/elasticsearch/elasticsearch_service.mock.ts b/src/core/server/elasticsearch/elasticsearch_service.mock.ts index f217dbe35c7e9..3ef44e2690a95 100644 --- a/src/core/server/elasticsearch/elasticsearch_service.mock.ts +++ b/src/core/server/elasticsearch/elasticsearch_service.mock.ts @@ -37,9 +37,6 @@ export type MockedElasticSearchServiceSetup = jest.Mocked< }; export interface MockedElasticSearchServiceStart { - legacy: { - config$: BehaviorSubject; - }; client: ClusterClientMock; createClient: jest.MockedFunction< (name: string, config?: Partial) => CustomClusterClientMock @@ -71,9 +68,6 @@ const createStartContractMock = () => { const startContract: MockedElasticSearchServiceStart = { client: elasticsearchClientMock.createClusterClient(), createClient: jest.fn(), - legacy: { - config$: new BehaviorSubject({} as ElasticsearchConfig), - }, }; startContract.createClient.mockImplementation(() => diff --git a/src/core/server/elasticsearch/elasticsearch_service.ts b/src/core/server/elasticsearch/elasticsearch_service.ts index 642b0ab75eaaf..4ab59d12942e7 100644 --- a/src/core/server/elasticsearch/elasticsearch_service.ts +++ b/src/core/server/elasticsearch/elasticsearch_service.ts @@ -141,9 +141,6 @@ export class ElasticsearchService return { client: this.client!, createClient: (type, clientConfig) => this.createClusterClient(type, config, clientConfig), - legacy: { - config$: this.config$, - }, }; } diff --git a/src/core/server/elasticsearch/types.ts b/src/core/server/elasticsearch/types.ts index c37e33426f7b9..ad26eb427edbc 100644 --- a/src/core/server/elasticsearch/types.ts +++ b/src/core/server/elasticsearch/types.ts @@ -81,7 +81,6 @@ export interface ElasticsearchServiceSetup { /** * @deprecated - * Use {@link ElasticsearchServiceStart.legacy} instead. */ legacy: { /** @@ -136,20 +135,6 @@ export interface ElasticsearchServiceStart { type: string, clientConfig?: Partial ) => ICustomClusterClient; - - /** - * @deprecated - * Provided for the backward compatibility. - * Switch to the new elasticsearch client as soon as https://github.com/elastic/kibana/issues/35508 done. - * */ - legacy: { - /** - * Provide direct access to the current elasticsearch configuration. - * - * @deprecated this will be removed in a later version. - */ - readonly config$: Observable; - }; } /** diff --git a/src/core/server/http/http_service.mock.ts b/src/core/server/http/http_service.mock.ts index 14baf9ba9257b..f251d3fb64cab 100644 --- a/src/core/server/http/http_service.mock.ts +++ b/src/core/server/http/http_service.mock.ts @@ -179,10 +179,6 @@ const createSetupContractMock = () => { csp: CspConfig.DEFAULT, createRouter: jest.fn(), registerRouteHandlerContext: jest.fn(), - auth: { - get: internalMock.auth.get, - isAuthenticated: internalMock.auth.isAuthenticated, - }, getServerInfo: internalMock.getServerInfo, }; diff --git a/src/core/server/http/types.ts b/src/core/server/http/types.ts index f12533dba4286..e6d9514107798 100644 --- a/src/core/server/http/types.ts +++ b/src/core/server/http/types.ts @@ -312,14 +312,6 @@ export interface HttpServiceSetup { */ basePath: IBasePath; - /** - * Auth status. - * See {@link HttpAuth} - * - * @deprecated use {@link HttpServiceStart.auth | the start contract} instead. - */ - auth: HttpAuth; - /** * The CSP config used for Kibana. */ diff --git a/src/core/server/metrics/integration_tests/server_collector.test.ts b/src/core/server/metrics/integration_tests/server_collector.test.ts index b64e7d55560d4..713d3ed1dc96e 100644 --- a/src/core/server/metrics/integration_tests/server_collector.test.ts +++ b/src/core/server/metrics/integration_tests/server_collector.test.ts @@ -17,10 +17,7 @@ import { executionContextServiceMock } from '../../execution_context/execution_c import { ServerMetricsCollector } from '../collectors/server'; import { setTimeout as setTimeoutPromise } from 'timers/promises'; -const requestWaitDelay = 25; - -// FLAKY: https://github.com/elastic/kibana/issues/59234 -describe.skip('ServerMetricsCollector', () => { +describe('ServerMetricsCollector', () => { let server: HttpService; let collector: ServerMetricsCollector; let hapiServer: HapiServer; @@ -79,30 +76,32 @@ describe.skip('ServerMetricsCollector', () => { it('collect disconnects requests infos', async () => { const never = new Promise((resolve) => undefined); - const hitSubject = new BehaviorSubject(0); + const disconnectRequested$ = new Subject(); // Controls the number of requests in the /disconnect endpoint + const disconnectAborted$ = new Subject(); // Controls the abort event in the /disconnect endpoint router.get({ path: '/', validate: false }, async (ctx, req, res) => { return res.ok({ body: '' }); }); router.get({ path: '/disconnect', validate: false }, async (ctx, req, res) => { - hitSubject.next(hitSubject.value + 1); - await never; + disconnectRequested$.next(); + req.events.aborted$.subscribe(() => { + disconnectAborted$.next(); + }); + await never; // Never resolve the request return res.ok({ body: '' }); }); await server.start(); await sendGet('/'); - // superTest.get(path).end needs to be called with a callback to actually send the request. - const discoReq1 = sendGet('/disconnect').end(() => null); - const discoReq2 = sendGet('/disconnect').end(() => null); - - await hitSubject - .pipe( - filter((count) => count >= 2), - take(1) - ) - .toPromise(); - await delay(requestWaitDelay); // wait for the requests to send + + // Subscribe to expect 2 requests to /disconnect + const waitFor2Requests = disconnectRequested$.pipe(take(2)).toPromise(); + + const discoReq1 = sendGet('/disconnect').end(); + const discoReq2 = sendGet('/disconnect').end(); + + // Wait for 2 requests to /disconnect + await waitFor2Requests; let metrics = await collector.collect(); expect(metrics.requests).toEqual( @@ -113,8 +112,13 @@ describe.skip('ServerMetricsCollector', () => { }) ); + // Subscribe to the aborted$ event + const waitFor1stAbort = disconnectAborted$.pipe(take(1)).toPromise(); + discoReq1.abort(); - await delay(requestWaitDelay); + + // Wait for the aborted$ event + await waitFor1stAbort; metrics = await collector.collect(); expect(metrics.requests).toEqual( @@ -124,8 +128,13 @@ describe.skip('ServerMetricsCollector', () => { }) ); + // Subscribe to the aborted$ event + const waitFor2ndAbort = disconnectAborted$.pipe(take(1)).toPromise(); + discoReq2.abort(); - await delay(requestWaitDelay); + + // Wait for the aborted$ event + await waitFor2ndAbort; metrics = await collector.collect(); expect(metrics.requests).toEqual( diff --git a/src/core/server/plugins/plugin_context.ts b/src/core/server/plugins/plugin_context.ts index 983a12627b7f3..56d749b79289f 100644 --- a/src/core/server/plugins/plugin_context.ts +++ b/src/core/server/plugins/plugin_context.ts @@ -181,10 +181,6 @@ export function createPluginSetupContext( registerOnPostAuth: deps.http.registerOnPostAuth, registerOnPreResponse: deps.http.registerOnPreResponse, basePath: deps.http.basePath, - auth: { - get: deps.http.auth.get, - isAuthenticated: deps.http.auth.isAuthenticated, - }, csp: deps.http.csp, getServerInfo: deps.http.getServerInfo, }, @@ -246,7 +242,6 @@ export function createPluginStartContext( elasticsearch: { client: deps.elasticsearch.client, createClient: deps.elasticsearch.createClient, - legacy: deps.elasticsearch.legacy, }, executionContext: deps.executionContext, http: { diff --git a/src/core/server/server.api.md b/src/core/server/server.api.md index 65ef524f83949..fcf505a13ddbe 100644 --- a/src/core/server/server.api.md +++ b/src/core/server/server.api.md @@ -959,10 +959,6 @@ export interface ElasticsearchServiceSetup { export interface ElasticsearchServiceStart { readonly client: IClusterClient; readonly createClient: (type: string, clientConfig?: Partial) => ICustomClusterClient; - // @deprecated (undocumented) - legacy: { - readonly config$: Observable; - }; } // @public (undocumented) @@ -1127,8 +1123,6 @@ export interface HttpServicePreboot { // @public export interface HttpServiceSetup { - // @deprecated - auth: HttpAuth; basePath: IBasePath; createCookieSessionStorageFactory: (cookieOptions: SessionStorageCookieOptions) => Promise>; createRouter: () => IRouter; diff --git a/src/plugins/advanced_settings/kibana.json b/src/plugins/advanced_settings/kibana.json index 033d5e9da9eab..98b7ec6d7e6d8 100644 --- a/src/plugins/advanced_settings/kibana.json +++ b/src/plugins/advanced_settings/kibana.json @@ -7,7 +7,7 @@ "optionalPlugins": ["home", "usageCollection"], "requiredBundles": ["kibanaReact", "kibanaUtils", "home"], "owner": { - "name": "Vis Editors", - "githubTeam": "kibana-vis-editors" + "name": "Kibana Core", + "githubTeam": "kibana-core" } } diff --git a/src/plugins/chart_expressions/expression_gauge/common/types/expression_renderers.ts b/src/plugins/chart_expressions/expression_gauge/common/types/expression_renderers.ts index 9e72a0eabef65..4c2133e8572f8 100644 --- a/src/plugins/chart_expressions/expression_gauge/common/types/expression_renderers.ts +++ b/src/plugins/chart_expressions/expression_gauge/common/types/expression_renderers.ts @@ -6,6 +6,7 @@ * Side Public License, v 1. */ +import { PersistedState } from '../../../../visualizations/public'; import type { ChartsPluginSetup, PaletteRegistry } from '../../../../charts/public'; import type { IFieldFormat, SerializedFieldFormat } from '../../../../field_formats/common'; import type { GaugeExpressionProps } from './expression_functions'; @@ -16,6 +17,7 @@ export type GaugeRenderProps = GaugeExpressionProps & { formatFactory: FormatFactory; chartsThemeService: ChartsPluginSetup['theme']; paletteService: PaletteRegistry; + uiState: PersistedState; }; export interface ColorStop { diff --git a/src/plugins/chart_expressions/expression_gauge/public/components/gauge_component.test.tsx b/src/plugins/chart_expressions/expression_gauge/public/components/gauge_component.test.tsx index c71b95a95d02c..e7e1e47ca65f2 100644 --- a/src/plugins/chart_expressions/expression_gauge/public/components/gauge_component.test.tsx +++ b/src/plugins/chart_expressions/expression_gauge/public/components/gauge_component.test.tsx @@ -79,6 +79,16 @@ const createData = ( }; }; +const mockState = new Map(); +const uiState = { + get: jest + .fn() + .mockImplementation((key, fallback) => (mockState.has(key) ? mockState.get(key) : fallback)), + set: jest.fn().mockImplementation((key, value) => mockState.set(key, value)), + emit: jest.fn(), + setSilent: jest.fn(), +} as any; + describe('GaugeComponent', function () { let wrapperProps: GaugeRenderProps; @@ -89,6 +99,7 @@ describe('GaugeComponent', function () { args, formatFactory: formatService.deserialize, paletteService: await paletteThemeService.getPalettes(), + uiState, }; }); diff --git a/src/plugins/chart_expressions/expression_gauge/public/components/gauge_component.tsx b/src/plugins/chart_expressions/expression_gauge/public/components/gauge_component.tsx index dfb560a33b092..9db6b81acefce 100644 --- a/src/plugins/chart_expressions/expression_gauge/public/components/gauge_component.tsx +++ b/src/plugins/chart_expressions/expression_gauge/public/components/gauge_component.tsx @@ -8,6 +8,7 @@ import React, { FC, memo, useCallback } from 'react'; import { Chart, Goal, Settings } from '@elastic/charts'; import { FormattedMessage } from '@kbn/i18n-react'; +import { FieldFormat } from '../../../../field_formats/common'; import type { CustomPaletteState, PaletteOutput } from '../../../../charts/public'; import { EmptyPlaceholder } from '../../../../charts/public'; import { isVisDimension } from '../../../../visualizations/common/utils'; @@ -183,8 +184,23 @@ const calculateRealRangeValueMax = ( return max; }; +const getPreviousSectionValue = (value: number, bands: number[]) => { + // bands value is equal to the stop. The purpose of this value is coloring the previous section, which is smaller, then the band. + // So, the smaller value should be taken. For the first element -1, for the next - middle value of the previous section. + + let prevSectionValue = value - 1; + const valueIndex = bands.indexOf(value); + const prevBand = bands[valueIndex - 1]; + const curBand = bands[valueIndex]; + if (valueIndex > 0) { + prevSectionValue = value - (curBand - prevBand) / 2; + } + + return prevSectionValue; +}; + export const GaugeComponent: FC = memo( - ({ data, args, formatFactory, paletteService, chartsThemeService }) => { + ({ data, args, uiState, formatFactory, paletteService, chartsThemeService }) => { const { shape: gaugeType, palette, @@ -230,6 +246,34 @@ export const GaugeComponent: FC = memo( [paletteService] ); + // Legacy chart was not formatting numbers, when was forming overrideColors. + // To support the behavior of the color overriding, it is required to skip all the formatting, except percent. + const overrideColor = useCallback( + (value: number, bands: number[], formatter?: FieldFormat) => { + const overrideColors = uiState?.get('vis.colors') ?? {}; + const valueIndex = bands.findIndex((band, index, allBands) => { + if (index === allBands.length - 1) { + return false; + } + + return value >= band && value < allBands[index + 1]; + }); + + if (valueIndex < 0 || valueIndex === bands.length - 1) { + return undefined; + } + const curValue = bands[valueIndex]; + const nextValue = bands[valueIndex + 1]; + + return overrideColors[ + `${formatter?.convert(curValue) ?? curValue} - ${ + formatter?.convert(nextValue) ?? nextValue + }` + ]; + }, + [uiState] + ); + const table = data; const accessors = getAccessorsFromArgs(args, table.columns); @@ -353,12 +397,16 @@ export const GaugeComponent: FC = memo( bandFillColor={ colorMode === GaugeColorModes.PALETTE ? (val) => { - // bands value is equal to the stop. The purpose of this value is coloring the previous section, which is smaller, then the band. - // So, the smaller value should be taken. For the first element -1, for the next - middle value of the previous section. - let value = val.value - 1; - const valueIndex = bands.indexOf(val.value); - if (valueIndex > 0) { - value = val.value - (bands[valueIndex] - bands[valueIndex - 1]) / 2; + const value = getPreviousSectionValue(val.value, bands); + + const overridedColor = overrideColor( + value, + args.percentageMode ? bands : args.palette?.params?.stops ?? [], + args.percentageMode ? tickFormatter : undefined + ); + + if (overridedColor) { + return overridedColor; } return args.palette diff --git a/src/plugins/chart_expressions/expression_gauge/public/expression_renderers/gauge_renderer.tsx b/src/plugins/chart_expressions/expression_gauge/public/expression_renderers/gauge_renderer.tsx index ebd2aaa6fc948..c75f60f75c004 100644 --- a/src/plugins/chart_expressions/expression_gauge/public/expression_renderers/gauge_renderer.tsx +++ b/src/plugins/chart_expressions/expression_gauge/public/expression_renderers/gauge_renderer.tsx @@ -8,6 +8,7 @@ import { i18n } from '@kbn/i18n'; import React from 'react'; import { render, unmountComponentAtNode } from 'react-dom'; +import { PersistedState } from '../../../../visualizations/public'; import { ThemeServiceStart } from '../../../../../core/public'; import { KibanaThemeProvider } from '../../../../kibana_react/public'; import { ExpressionRenderDefinition } from '../../../../expressions/common/expression_renderers'; @@ -40,6 +41,7 @@ export const gaugeRenderer: ( formatFactory={getFormatService().deserialize} chartsThemeService={getThemeService()} paletteService={getPaletteService()} + uiState={handlers.uiState as PersistedState} /> , diff --git a/src/plugins/chart_expressions/expression_metric/public/components/metric_value.tsx b/src/plugins/chart_expressions/expression_metric/public/components/metric_value.tsx index 35c754d8b0b24..095dec8d37aab 100644 --- a/src/plugins/chart_expressions/expression_metric/public/components/metric_value.tsx +++ b/src/plugins/chart_expressions/expression_metric/public/components/metric_value.tsx @@ -43,6 +43,7 @@ export const MetricVisValue = ({ style={autoScale && colorFullBackground ? {} : { backgroundColor: metric.bgColor }} >
{labelConfig.show && (
{ field: 'day_of_week_i', }, ] as Metric[]; - const config = getSeries(metric); + const config = getSeries(metric, 1); expect(config).toStrictEqual([ { agg: 'average', @@ -44,7 +44,7 @@ describe('getSeries', () => { }, }, ] as Metric[]; - const config = getSeries(metric); + const config = getSeries(metric, 1); expect(config).toStrictEqual([ { agg: 'formula', @@ -71,7 +71,7 @@ describe('getSeries', () => { field: '123456', }, ] as Metric[]; - const config = getSeries(metric); + const config = getSeries(metric, 1); expect(config).toStrictEqual([ { agg: 'formula', @@ -97,7 +97,7 @@ describe('getSeries', () => { field: '123456', }, ] as Metric[]; - const config = getSeries(metric); + const config = getSeries(metric, 1); expect(config).toStrictEqual([ { agg: 'formula', @@ -122,7 +122,7 @@ describe('getSeries', () => { field: '123456', }, ] as Metric[]; - const config = getSeries(metric); + const config = getSeries(metric, 1); expect(config).toStrictEqual([ { agg: 'cumulative_sum', @@ -147,7 +147,7 @@ describe('getSeries', () => { field: '123456', }, ] as Metric[]; - const config = getSeries(metric); + const config = getSeries(metric, 1); expect(config).toStrictEqual([ { agg: 'formula', @@ -174,7 +174,7 @@ describe('getSeries', () => { unit: '1m', }, ] as Metric[]; - const config = getSeries(metric); + const config = getSeries(metric, 1); expect(config).toStrictEqual([ { agg: 'differences', @@ -202,7 +202,7 @@ describe('getSeries', () => { window: 6, }, ] as Metric[]; - const config = getSeries(metric); + const config = getSeries(metric, 1); expect(config).toStrictEqual([ { agg: 'moving_average', @@ -246,7 +246,7 @@ describe('getSeries', () => { window: 6, }, ] as Metric[]; - const config = getSeries(metric); + const config = getSeries(metric, 1); expect(config).toStrictEqual([ { agg: 'formula', @@ -293,7 +293,7 @@ describe('getSeries', () => { ], }, ] as Metric[]; - const config = getSeries(metric); + const config = getSeries(metric, 1); expect(config).toStrictEqual([ { agg: 'percentile', @@ -335,7 +335,7 @@ describe('getSeries', () => { order_by: 'timestamp', }, ] as Metric[]; - const config = getSeries(metric); + const config = getSeries(metric, 1); expect(config).toStrictEqual([ { agg: 'last_value', @@ -357,10 +357,43 @@ describe('getSeries', () => { size: 2, }, ] as Metric[]; - const config = getSeries(metric); + const config = getSeries(metric, 1); expect(config).toBeNull(); }); + test('should return null for a static aggregation with 1 layer', () => { + const metric = [ + { + id: '12345', + type: 'static', + value: '10', + }, + ] as Metric[]; + const config = getSeries(metric, 1); + expect(config).toBeNull(); + }); + + test('should return the correct config for a static aggregation with 2 layers', () => { + const metric = [ + { + id: '12345', + type: 'static', + value: '10', + }, + ] as Metric[]; + const config = getSeries(metric, 2); + expect(config).toStrictEqual([ + { + agg: 'static_value', + fieldName: 'document', + isFullReference: true, + params: { + value: '10', + }, + }, + ]); + }); + test('should return the correct formula for the math aggregation with percentiles as variables', () => { const metric = [ { @@ -415,7 +448,7 @@ describe('getSeries', () => { ], }, ] as Metric[]; - const config = getSeries(metric); + const config = getSeries(metric, 1); expect(config).toStrictEqual([ { agg: 'formula', diff --git a/src/plugins/vis_types/timeseries/public/trigger_action/get_series.ts b/src/plugins/vis_types/timeseries/public/trigger_action/get_series.ts index 5e7d39f3085f6..641890b68b83c 100644 --- a/src/plugins/vis_types/timeseries/public/trigger_action/get_series.ts +++ b/src/plugins/vis_types/timeseries/public/trigger_action/get_series.ts @@ -21,7 +21,10 @@ import { getTimeScale, } from './metrics_helpers'; -export const getSeries = (metrics: Metric[]): VisualizeEditorLayersContext['metrics'] | null => { +export const getSeries = ( + metrics: Metric[], + totalSeriesNum: number +): VisualizeEditorLayersContext['metrics'] | null => { const metricIdx = metrics.length - 1; const aggregation = metrics[metricIdx].type; const fieldName = metrics[metricIdx].field; @@ -50,12 +53,10 @@ export const getSeries = (metrics: Metric[]): VisualizeEditorLayersContext['metr const variables = metrics[mathMetricIdx].variables; const layerMetricsArray = metrics; if (!finalScript || !variables) return null; + const metricsWithoutMath = layerMetricsArray.filter((metric) => metric.type !== 'math'); // create the script - for (let layerMetricIdx = 0; layerMetricIdx < layerMetricsArray.length; layerMetricIdx++) { - if (layerMetricsArray[layerMetricIdx].type === 'math') { - continue; - } + for (let layerMetricIdx = 0; layerMetricIdx < metricsWithoutMath.length; layerMetricIdx++) { const currentMetric = metrics[layerMetricIdx]; // We can only support top_hit with size 1 if ( @@ -102,7 +103,7 @@ export const getSeries = (metrics: Metric[]): VisualizeEditorLayersContext['metr // percentile value is derived from the field Id. It has the format xxx-xxx-xxx-xxx[percentile] const [fieldId, meta] = metrics[metricIdx]?.field?.split('[') ?? []; const subFunctionMetric = metrics.find((metric) => metric.id === fieldId); - if (!subFunctionMetric) { + if (!subFunctionMetric || subFunctionMetric.type === 'static') { return null; } const pipelineAgg = getPipelineAgg(subFunctionMetric); @@ -184,6 +185,24 @@ export const getSeries = (metrics: Metric[]): VisualizeEditorLayersContext['metr ]; break; } + case 'static': { + // Lens support reference lines only when at least one layer data exists + if (totalSeriesNum === 1) { + return null; + } + const staticValue = metrics[metricIdx].value; + metricsArray = [ + { + agg: aggregationMap.name, + isFullReference: aggregationMap.isFullReference, + fieldName: 'document', + params: { + ...(staticValue && { value: staticValue }), + }, + }, + ]; + break; + } default: { const timeScale = getTimeScale(metrics[metricIdx]); metricsArray = [ diff --git a/src/plugins/vis_types/timeseries/public/trigger_action/index.ts b/src/plugins/vis_types/timeseries/public/trigger_action/index.ts index 8e757b98c125d..286b1eaf4725c 100644 --- a/src/plugins/vis_types/timeseries/public/trigger_action/index.ts +++ b/src/plugins/vis_types/timeseries/public/trigger_action/index.ts @@ -37,6 +37,11 @@ export const triggerTSVBtoLensConfiguration = async ( return null; } const layersConfiguration: { [key: string]: VisualizeEditorLayersContext } = {}; + // get the active series number + let seriesNum = 0; + model.series.forEach((series) => { + if (!series.hidden) seriesNum++; + }); // handle multiple layers/series for (let layerIdx = 0; layerIdx < model.series.length; layerIdx++) { @@ -64,7 +69,7 @@ export const triggerTSVBtoLensConfiguration = async ( } // handle multiple metrics - let metricsArray = getSeries(layer.metrics); + let metricsArray = getSeries(layer.metrics, seriesNum); if (!metricsArray) { return null; } diff --git a/src/plugins/vis_types/timeseries/public/trigger_action/metrics_helpers.ts b/src/plugins/vis_types/timeseries/public/trigger_action/metrics_helpers.ts index dc9457ac1fafc..a71f43f2a6a25 100644 --- a/src/plugins/vis_types/timeseries/public/trigger_action/metrics_helpers.ts +++ b/src/plugins/vis_types/timeseries/public/trigger_action/metrics_helpers.ts @@ -91,7 +91,7 @@ export const getParentPipelineSeries = ( // percentile value is derived from the field Id. It has the format xxx-xxx-xxx-xxx[percentile] const [fieldId, meta] = currentMetric?.field?.split('[') ?? []; const subFunctionMetric = metrics.find((metric) => metric.id === fieldId); - if (!subFunctionMetric) { + if (!subFunctionMetric || subFunctionMetric.type === 'static') { return null; } const pipelineAgg = getPipelineAgg(subFunctionMetric); @@ -184,7 +184,7 @@ export const getSiblingPipelineSeriesFormula = ( metrics: Metric[] ) => { const subFunctionMetric = metrics.find((metric) => metric.id === currentMetric.field); - if (!subFunctionMetric) { + if (!subFunctionMetric || subFunctionMetric.type === 'static') { return null; } const pipelineAggMap = SUPPORTED_METRICS[subFunctionMetric.type]; @@ -311,6 +311,9 @@ export const getFormulaEquivalent = ( case 'filter_ratio': { return getFilterRatioFormula(currentMetric); } + case 'static': { + return `${currentMetric.value}`; + } default: { return `${aggregation}(${currentMetric.field})`; } diff --git a/src/plugins/vis_types/timeseries/public/trigger_action/supported_metrics.ts b/src/plugins/vis_types/timeseries/public/trigger_action/supported_metrics.ts index 354b60c31854a..3a304590b642d 100644 --- a/src/plugins/vis_types/timeseries/public/trigger_action/supported_metrics.ts +++ b/src/plugins/vis_types/timeseries/public/trigger_action/supported_metrics.ts @@ -92,4 +92,8 @@ export const SUPPORTED_METRICS: { [key: string]: AggOptions } = { name: 'clamp', isFullReference: true, }, + static: { + name: 'static_value', + isFullReference: true, + }, }; diff --git a/src/plugins/vis_types/xy/public/utils/render_all_series.tsx b/src/plugins/vis_types/xy/public/utils/render_all_series.tsx index e2672380c390f..d9e4e9a47c23f 100644 --- a/src/plugins/vis_types/xy/public/utils/render_all_series.tsx +++ b/src/plugins/vis_types/xy/public/utils/render_all_series.tsx @@ -196,6 +196,11 @@ export const renderAllSeries = ( area: { ...(type === ChartType.Line ? { opacity: 0 } : { opacity: fillOpacity }), }, + fit: { + area: { + ...(type === ChartType.Line ? { opacity: 0 } : { opacity: fillOpacity }), + }, + }, line: { strokeWidth, visible: drawLinesBetweenPoints, diff --git a/test/examples/embeddables/dashboard.ts b/test/examples/embeddables/dashboard.ts index 23f221c40d4da..6be6d833a8ddf 100644 --- a/test/examples/embeddables/dashboard.ts +++ b/test/examples/embeddables/dashboard.ts @@ -93,6 +93,7 @@ export const testDashboardInput = { // eslint-disable-next-line import/no-default-export export default function ({ getService, getPageObjects }: PluginFunctionalProviderContext) { const esArchiver = getService('esArchiver'); + const kibanaServer = getService('kibanaServer'); const testSubjects = getService('testSubjects'); const pieChart = getService('pieChart'); const dashboardExpect = getService('dashboardExpect'); @@ -103,8 +104,9 @@ export default function ({ getService, getPageObjects }: PluginFunctionalProvide describe('dashboard container', () => { before(async () => { await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/dashboard/current/data'); - await esArchiver.loadIfNeeded( - 'test/functional/fixtures/es_archiver/dashboard/current/kibana' + await kibanaServer.savedObjects.cleanStandardList(); + await kibanaServer.importExport.load( + 'test/functional/fixtures/kbn_archiver/dashboard/current/kibana' ); await PageObjects.common.navigateToApp('dashboardEmbeddableExamples'); await testSubjects.click('dashboardEmbeddableByValue'); diff --git a/test/functional/apps/dashboard/copy_panel_to.ts b/test/functional/apps/dashboard/copy_panel_to.ts index 8877e5e47bd95..9a61b289ee1f3 100644 --- a/test/functional/apps/dashboard/copy_panel_to.ts +++ b/test/functional/apps/dashboard/copy_panel_to.ts @@ -14,7 +14,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const dashboardPanelActions = getService('dashboardPanelActions'); const testSubjects = getService('testSubjects'); const kibanaServer = getService('kibanaServer'); - const esArchiver = getService('esArchiver'); const find = getService('find'); const PageObjects = getPageObjects([ @@ -40,7 +39,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('dashboard panel copy to', function viewEditModeTests() { before(async function () { - await esArchiver.load('test/functional/fixtures/es_archiver/dashboard/current/kibana'); + await kibanaServer.savedObjects.cleanStandardList(); + await kibanaServer.importExport.load( + 'test/functional/fixtures/kbn_archiver/dashboard/current/kibana' + ); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); @@ -61,6 +63,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { after(async function () { await PageObjects.dashboard.gotoDashboardLandingPage(); + await kibanaServer.savedObjects.cleanStandardList(); }); it('does not show the new dashboard option when on a new dashboard', async () => { diff --git a/test/functional/apps/dashboard/create_and_add_embeddables.ts b/test/functional/apps/dashboard/create_and_add_embeddables.ts index 1390a7517cdbf..d8bf67b6d2873 100644 --- a/test/functional/apps/dashboard/create_and_add_embeddables.ts +++ b/test/functional/apps/dashboard/create_and_add_embeddables.ts @@ -16,13 +16,15 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const retry = getService('retry'); const PageObjects = getPageObjects(['dashboard', 'header', 'visualize', 'settings', 'common']); const browser = getService('browser'); - const esArchiver = getService('esArchiver'); const kibanaServer = getService('kibanaServer'); const dashboardAddPanel = getService('dashboardAddPanel'); describe('create and add embeddables', () => { before(async () => { - await esArchiver.load('test/functional/fixtures/es_archiver/dashboard/current/kibana'); + await kibanaServer.savedObjects.cleanStandardList(); + await kibanaServer.importExport.load( + 'test/functional/fixtures/kbn_archiver/dashboard/current/kibana' + ); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); @@ -37,6 +39,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await dashboardAddPanel.expectEditorMenuClosed(); }); + after(async () => { + await kibanaServer.savedObjects.cleanStandardList(); + }); + describe('add new visualization link', () => { before(async () => { await PageObjects.common.navigateToApp('dashboard'); diff --git a/test/functional/apps/dashboard/dashboard_back_button.ts b/test/functional/apps/dashboard/dashboard_back_button.ts index 3b03ea525b903..d532444befdab 100644 --- a/test/functional/apps/dashboard/dashboard_back_button.ts +++ b/test/functional/apps/dashboard/dashboard_back_button.ts @@ -10,7 +10,6 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { - const esArchiver = getService('esArchiver'); const kibanaServer = getService('kibanaServer'); const PageObjects = getPageObjects(['dashboard', 'header', 'common', 'visualize', 'timePicker']); const browser = getService('browser'); @@ -18,8 +17,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('dashboard back button', () => { before(async () => { - await esArchiver.loadIfNeeded( - 'test/functional/fixtures/es_archiver/dashboard/current/kibana' + await kibanaServer.savedObjects.cleanStandardList(); + await kibanaServer.importExport.load( + 'test/functional/fixtures/kbn_archiver/dashboard/current/kibana' ); await security.testUser.setRoles(['kibana_admin', 'animals', 'test_logstash_reader']); await kibanaServer.uiSettings.replace({ @@ -31,6 +31,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { after(async () => { await security.testUser.restoreDefaults(); + await kibanaServer.savedObjects.cleanStandardList(); }); it('after navigation from listing page to dashboard back button works', async () => { diff --git a/test/functional/apps/dashboard/dashboard_controls_integration.ts b/test/functional/apps/dashboard/dashboard_controls_integration.ts index 5ede80bf8eb8a..96a0bcdc0346b 100644 --- a/test/functional/apps/dashboard/dashboard_controls_integration.ts +++ b/test/functional/apps/dashboard/dashboard_controls_integration.ts @@ -16,7 +16,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const queryBar = getService('queryBar'); const pieChart = getService('pieChart'); const filterBar = getService('filterBar'); - const esArchiver = getService('esArchiver'); const testSubjects = getService('testSubjects'); const kibanaServer = getService('kibanaServer'); const dashboardAddPanel = getService('dashboardAddPanel'); @@ -30,7 +29,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('Dashboard controls integration', () => { before(async () => { - await esArchiver.load('test/functional/fixtures/es_archiver/dashboard/current/kibana'); + await kibanaServer.savedObjects.cleanStandardList(); + await kibanaServer.importExport.load( + 'test/functional/fixtures/kbn_archiver/dashboard/current/kibana' + ); await security.testUser.setRoles(['kibana_admin', 'test_logstash_reader', 'animals']); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', @@ -44,6 +46,11 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await timePicker.setDefaultDataRange(); }); + after(async () => { + await security.testUser.restoreDefaults(); + await kibanaServer.savedObjects.cleanStandardList(); + }); + it('shows the empty control callout on a new dashboard', async () => { await testSubjects.existOrFail('controls-empty'); }); diff --git a/test/functional/apps/dashboard/dashboard_error_handling.ts b/test/functional/apps/dashboard/dashboard_error_handling.ts index d120fb518f103..58304359458c7 100644 --- a/test/functional/apps/dashboard/dashboard_error_handling.ts +++ b/test/functional/apps/dashboard/dashboard_error_handling.ts @@ -10,7 +10,6 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { - const esArchiver = getService('esArchiver'); const PageObjects = getPageObjects(['dashboard', 'header', 'common']); const kibanaServer = getService('kibanaServer'); const testSubjects = getService('testSubjects'); @@ -22,8 +21,15 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { */ describe('dashboard error handling', () => { before(async () => { - await esArchiver.loadIfNeeded( - 'test/functional/fixtures/es_archiver/dashboard/current/kibana' + await kibanaServer.savedObjects.cleanStandardList(); + await kibanaServer.importExport.load( + 'test/functional/fixtures/kbn_archiver/dashboard/current/kibana' + ); + // The kbn_archiver above was created from an es_archiver which intentionally had + // 2 missing index patterns. But that would fail to load with kbn_archiver. + // So we unload those 2 index patterns here. + await kibanaServer.importExport.unload( + 'test/functional/fixtures/kbn_archiver/dashboard/current/kibana_unload' ); await kibanaServer.importExport.load( 'test/functional/fixtures/kbn_archiver/dashboard_error_cases.json' @@ -31,6 +37,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.common.navigateToApp('dashboard'); }); + after(async () => { + await kibanaServer.savedObjects.cleanStandardList(); + }); + it('correctly loads default index pattern on first load with an error embeddable', async () => { await PageObjects.dashboard.gotoDashboardLandingPage(); await PageObjects.dashboard.loadSavedDashboard('Dashboard with Missing Lens Panel'); diff --git a/test/functional/apps/dashboard/dashboard_filter_bar.ts b/test/functional/apps/dashboard/dashboard_filter_bar.ts index 62eac2454ae96..a56143fa8b05e 100644 --- a/test/functional/apps/dashboard/dashboard_filter_bar.ts +++ b/test/functional/apps/dashboard/dashboard_filter_bar.ts @@ -17,7 +17,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const testSubjects = getService('testSubjects'); const filterBar = getService('filterBar'); const pieChart = getService('pieChart'); - const esArchiver = getService('esArchiver'); const kibanaServer = getService('kibanaServer'); const browser = getService('browser'); const security = getService('security'); @@ -32,7 +31,16 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('dashboard filter bar', () => { before(async () => { - await esArchiver.load('test/functional/fixtures/es_archiver/dashboard/current/kibana'); + await kibanaServer.savedObjects.cleanStandardList(); + await kibanaServer.importExport.load( + 'test/functional/fixtures/kbn_archiver/dashboard/current/kibana' + ); + // The kbn_archiver above was created from an es_archiver which intentionally had + // 2 missing index patterns. But that would fail to load with kbn_archiver. + // So we unload those 2 index patterns here. + await kibanaServer.importExport.unload( + 'test/functional/fixtures/kbn_archiver/dashboard/current/kibana_unload' + ); await security.testUser.setRoles(['kibana_admin', 'test_logstash_reader', 'animals']); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', @@ -42,6 +50,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { after(async () => { await security.testUser.restoreDefaults(); + await kibanaServer.savedObjects.cleanStandardList(); }); describe('Add a filter bar', function () { diff --git a/test/functional/apps/dashboard/dashboard_filtering.ts b/test/functional/apps/dashboard/dashboard_filtering.ts index 6c8a378831340..9522c47f907fc 100644 --- a/test/functional/apps/dashboard/dashboard_filtering.ts +++ b/test/functional/apps/dashboard/dashboard_filtering.ts @@ -22,7 +22,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const renderable = getService('renderable'); const testSubjects = getService('testSubjects'); const filterBar = getService('filterBar'); - const esArchiver = getService('esArchiver'); const kibanaServer = getService('kibanaServer'); const security = getService('security'); const dashboardPanelActions = getService('dashboardPanelActions'); @@ -51,7 +50,16 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }; before(async () => { - await esArchiver.load('test/functional/fixtures/es_archiver/dashboard/current/kibana'); + await kibanaServer.savedObjects.cleanStandardList(); + await kibanaServer.importExport.load( + 'test/functional/fixtures/kbn_archiver/dashboard/current/kibana' + ); + // The kbn_archiver above was created from an es_archiver which intentionally had + // 2 missing index patterns. But that would fail to load with kbn_archiver. + // So we unload those 2 index patterns here. + await kibanaServer.importExport.unload( + 'test/functional/fixtures/kbn_archiver/dashboard/current/kibana_unload' + ); await security.testUser.setRoles(['kibana_admin', 'test_logstash_reader', 'animals']); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', @@ -63,6 +71,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { after(async () => { await security.testUser.restoreDefaults(); + await kibanaServer.savedObjects.cleanStandardList(); }); describe('adding a filter that excludes all data', () => { diff --git a/test/functional/apps/dashboard/dashboard_grid.ts b/test/functional/apps/dashboard/dashboard_grid.ts index fecec34fd91e3..25e901fd25d8b 100644 --- a/test/functional/apps/dashboard/dashboard_grid.ts +++ b/test/functional/apps/dashboard/dashboard_grid.ts @@ -12,14 +12,16 @@ import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { const browser = getService('browser'); - const esArchiver = getService('esArchiver'); const kibanaServer = getService('kibanaServer'); const dashboardPanelActions = getService('dashboardPanelActions'); const PageObjects = getPageObjects(['common', 'dashboard']); describe('dashboard grid', function () { before(async () => { - await esArchiver.load('test/functional/fixtures/es_archiver/dashboard/current/kibana'); + await kibanaServer.savedObjects.cleanStandardList(); + await kibanaServer.importExport.load( + 'test/functional/fixtures/kbn_archiver/dashboard/current/kibana' + ); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); @@ -29,6 +31,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.dashboard.switchToEditMode(); }); + after(async () => { + await kibanaServer.savedObjects.cleanStandardList(); + }); + describe('move panel', () => { // Specific test after https://github.com/elastic/kibana/issues/14764 fix it('Can move panel from bottom to top row', async () => { diff --git a/test/functional/apps/dashboard/dashboard_options.ts b/test/functional/apps/dashboard/dashboard_options.ts index 8080c6cb4cc7f..282674d0cec98 100644 --- a/test/functional/apps/dashboard/dashboard_options.ts +++ b/test/functional/apps/dashboard/dashboard_options.ts @@ -12,7 +12,6 @@ import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { const retry = getService('retry'); - const esArchiver = getService('esArchiver'); const kibanaServer = getService('kibanaServer'); const PageObjects = getPageObjects(['common', 'dashboard']); @@ -20,7 +19,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { let originalTitles: string[] = []; before(async () => { - await esArchiver.load('test/functional/fixtures/es_archiver/dashboard/current/kibana'); + await kibanaServer.savedObjects.cleanStandardList(); + await kibanaServer.importExport.load( + 'test/functional/fixtures/kbn_archiver/dashboard/current/kibana' + ); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); @@ -31,6 +33,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { originalTitles = await PageObjects.dashboard.getPanelTitles(); }); + after(async () => { + await kibanaServer.savedObjects.cleanStandardList(); + }); + it('should be able to hide all panel titles', async () => { await PageObjects.dashboard.checkHideTitle(); await retry.try(async () => { diff --git a/test/functional/apps/dashboard/dashboard_query_bar.ts b/test/functional/apps/dashboard/dashboard_query_bar.ts index 07fa3355c6fba..5092cadaf9d26 100644 --- a/test/functional/apps/dashboard/dashboard_query_bar.ts +++ b/test/functional/apps/dashboard/dashboard_query_bar.ts @@ -20,7 +20,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('dashboard query bar', () => { before(async () => { - await esArchiver.load('test/functional/fixtures/es_archiver/dashboard/current/kibana'); + await kibanaServer.savedObjects.cleanStandardList(); + await kibanaServer.importExport.load( + 'test/functional/fixtures/kbn_archiver/dashboard/current/kibana' + ); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); @@ -29,6 +32,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.dashboard.loadSavedDashboard('dashboard with filter'); }); + after(async () => { + await kibanaServer.savedObjects.cleanStandardList(); + }); + it('causes panels to reload when refresh is clicked', async () => { await esArchiver.unload('test/functional/fixtures/es_archiver/dashboard/current/data'); diff --git a/test/functional/apps/dashboard/dashboard_saved_query.ts b/test/functional/apps/dashboard/dashboard_saved_query.ts index 015a00a713bdc..658afb9c641b2 100644 --- a/test/functional/apps/dashboard/dashboard_saved_query.ts +++ b/test/functional/apps/dashboard/dashboard_saved_query.ts @@ -11,7 +11,6 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { - const esArchiver = getService('esArchiver'); const kibanaServer = getService('kibanaServer'); const PageObjects = getPageObjects(['common', 'dashboard', 'timePicker']); const browser = getService('browser'); @@ -21,13 +20,20 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('dashboard saved queries', function describeIndexTests() { before(async function () { - await esArchiver.load('test/functional/fixtures/es_archiver/dashboard/current/kibana'); + await kibanaServer.savedObjects.cleanStandardList(); + await kibanaServer.importExport.load( + 'test/functional/fixtures/kbn_archiver/dashboard/current/kibana' + ); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); await PageObjects.common.navigateToApp('dashboard'); }); + after(async () => { + await kibanaServer.savedObjects.cleanStandardList(); + }); + describe('saved query management component functionality', function () { before(async () => { await PageObjects.dashboard.gotoDashboardLandingPage(); diff --git a/test/functional/apps/dashboard/dashboard_snapshots.ts b/test/functional/apps/dashboard/dashboard_snapshots.ts index 9279bbd5806e7..9cb52c5dd5511 100644 --- a/test/functional/apps/dashboard/dashboard_snapshots.ts +++ b/test/functional/apps/dashboard/dashboard_snapshots.ts @@ -18,14 +18,16 @@ export default function ({ const PageObjects = getPageObjects(['dashboard', 'header', 'visualize', 'common', 'timePicker']); const screenshot = getService('screenshots'); const browser = getService('browser'); - const esArchiver = getService('esArchiver'); const kibanaServer = getService('kibanaServer'); const dashboardPanelActions = getService('dashboardPanelActions'); const dashboardAddPanel = getService('dashboardAddPanel'); describe('dashboard snapshots', function describeIndexTests() { before(async function () { - await esArchiver.load('test/functional/fixtures/es_archiver/dashboard/current/kibana'); + await kibanaServer.savedObjects.cleanStandardList(); + await kibanaServer.importExport.load( + 'test/functional/fixtures/kbn_archiver/dashboard/current/kibana' + ); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); @@ -38,6 +40,7 @@ export default function ({ after(async function () { await browser.setWindowSize(1300, 900); + await kibanaServer.savedObjects.cleanStandardList(); }); it('compare TSVB snapshot', async () => { diff --git a/test/functional/apps/dashboard/dashboard_unsaved_listing.ts b/test/functional/apps/dashboard/dashboard_unsaved_listing.ts index 2b2d96e8d723a..d9451eda5ff62 100644 --- a/test/functional/apps/dashboard/dashboard_unsaved_listing.ts +++ b/test/functional/apps/dashboard/dashboard_unsaved_listing.ts @@ -12,7 +12,6 @@ import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { const PageObjects = getPageObjects(['dashboard', 'header', 'visualize', 'settings', 'common']); - const esArchiver = getService('esArchiver'); const kibanaServer = getService('kibanaServer'); const dashboardAddPanel = getService('dashboardAddPanel'); const dashboardPanelActions = getService('dashboardPanelActions'); @@ -36,7 +35,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }; before(async () => { - await esArchiver.load('test/functional/fixtures/es_archiver/dashboard/current/kibana'); + await kibanaServer.savedObjects.cleanStandardList(); + await kibanaServer.importExport.load( + 'test/functional/fixtures/kbn_archiver/dashboard/current/kibana' + ); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); @@ -44,6 +46,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.dashboard.preserveCrossAppState(); }); + after(async () => { + await kibanaServer.savedObjects.cleanStandardList(); + }); + it('lists unsaved changes to existing dashboards', async () => { await PageObjects.dashboard.loadSavedDashboard(dashboardTitle); await PageObjects.dashboard.switchToEditMode(); diff --git a/test/functional/apps/dashboard/dashboard_unsaved_state.ts b/test/functional/apps/dashboard/dashboard_unsaved_state.ts index c2da82a96cd0c..5afe3b9937433 100644 --- a/test/functional/apps/dashboard/dashboard_unsaved_state.ts +++ b/test/functional/apps/dashboard/dashboard_unsaved_state.ts @@ -15,7 +15,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const browser = getService('browser'); const queryBar = getService('queryBar'); const filterBar = getService('filterBar'); - const esArchiver = getService('esArchiver'); const testSubjects = getService('testSubjects'); const kibanaServer = getService('kibanaServer'); const dashboardAddPanel = getService('dashboardAddPanel'); @@ -27,7 +26,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { // FLAKY https://github.com/elastic/kibana/issues/112812 describe.skip('dashboard unsaved state', () => { before(async () => { - await esArchiver.load('test/functional/fixtures/es_archiver/dashboard/current/kibana'); + await kibanaServer.savedObjects.cleanStandardList(); + await kibanaServer.importExport.load( + 'test/functional/fixtures/kbn_archiver/dashboard/current/kibana' + ); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); @@ -39,6 +41,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { originalPanelCount = await PageObjects.dashboard.getPanelCount(); }); + after(async () => { + await kibanaServer.savedObjects.cleanStandardList(); + }); + describe('view mode state', () => { before(async () => { await queryBar.setQuery(testQuery); diff --git a/test/functional/apps/dashboard/data_shared_attributes.ts b/test/functional/apps/dashboard/data_shared_attributes.ts index 4b993287ffe42..a94cf1b6063a9 100644 --- a/test/functional/apps/dashboard/data_shared_attributes.ts +++ b/test/functional/apps/dashboard/data_shared_attributes.ts @@ -12,7 +12,6 @@ import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { const retry = getService('retry'); - const esArchiver = getService('esArchiver'); const kibanaServer = getService('kibanaServer'); const dashboardPanelActions = getService('dashboardPanelActions'); const security = getService('security'); @@ -22,7 +21,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { let originalPanelTitles: string[]; before(async () => { - await esArchiver.load('test/functional/fixtures/es_archiver/dashboard/current/kibana'); + await kibanaServer.savedObjects.cleanStandardList(); + await kibanaServer.importExport.load( + 'test/functional/fixtures/kbn_archiver/dashboard/current/kibana' + ); await security.testUser.setRoles(['kibana_admin', 'test_logstash_reader', 'animals']); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', @@ -35,6 +37,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { after(async () => { await security.testUser.restoreDefaults(); + await kibanaServer.savedObjects.cleanStandardList(); }); it('should have time picker with data-shared-timefilter-duration', async () => { diff --git a/test/functional/apps/dashboard/edit_embeddable_redirects.ts b/test/functional/apps/dashboard/edit_embeddable_redirects.ts index 02f178a5153a2..763488cc21ab1 100644 --- a/test/functional/apps/dashboard/edit_embeddable_redirects.ts +++ b/test/functional/apps/dashboard/edit_embeddable_redirects.ts @@ -12,14 +12,16 @@ import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { const PageObjects = getPageObjects(['dashboard', 'header', 'visualize', 'settings', 'common']); - const esArchiver = getService('esArchiver'); const kibanaServer = getService('kibanaServer'); const dashboardPanelActions = getService('dashboardPanelActions'); const dashboardAddPanel = getService('dashboardAddPanel'); describe('edit embeddable redirects', () => { before(async () => { - await esArchiver.load('test/functional/fixtures/es_archiver/dashboard/current/kibana'); + await kibanaServer.savedObjects.cleanStandardList(); + await kibanaServer.importExport.load( + 'test/functional/fixtures/kbn_archiver/dashboard/current/kibana' + ); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); @@ -29,6 +31,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.dashboard.switchToEditMode(); }); + after(async () => { + await kibanaServer.savedObjects.cleanStandardList(); + }); + it('redirects via save and return button after edit', async () => { await dashboardPanelActions.openContextMenu(); await dashboardPanelActions.clickEdit(); diff --git a/test/functional/apps/dashboard/edit_visualizations.js b/test/functional/apps/dashboard/edit_visualizations.js index 507d4b8308d4c..d4de54586b731 100644 --- a/test/functional/apps/dashboard/edit_visualizations.js +++ b/test/functional/apps/dashboard/edit_visualizations.js @@ -10,7 +10,6 @@ import expect from '@kbn/expect'; export default function ({ getService, getPageObjects }) { const PageObjects = getPageObjects(['dashboard', 'header', 'visualize', 'common', 'visEditor']); - const esArchiver = getService('esArchiver'); const testSubjects = getService('testSubjects'); const appsMenu = getService('appsMenu'); const kibanaServer = getService('kibanaServer'); @@ -44,13 +43,20 @@ export default function ({ getService, getPageObjects }) { describe('edit visualizations from dashboard', () => { before(async () => { - await esArchiver.load('test/functional/fixtures/es_archiver/dashboard/current/kibana'); + await kibanaServer.savedObjects.cleanStandardList(); + await kibanaServer.importExport.load( + 'test/functional/fixtures/kbn_archiver/dashboard/current/kibana' + ); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); await PageObjects.common.navigateToApp('dashboard'); }); + after(async () => { + await kibanaServer.savedObjects.cleanStandardList(); + }); + it('save button returns to dashboard after editing visualization with changes saved', async () => { const title = 'test save'; await PageObjects.dashboard.gotoDashboardLandingPage(); diff --git a/test/functional/apps/dashboard/embed_mode.ts b/test/functional/apps/dashboard/embed_mode.ts index 943a6b3bdb469..7e53bff7387ca 100644 --- a/test/functional/apps/dashboard/embed_mode.ts +++ b/test/functional/apps/dashboard/embed_mode.ts @@ -13,7 +13,6 @@ import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { const testSubjects = getService('testSubjects'); const retry = getService('retry'); - const esArchiver = getService('esArchiver'); const kibanaServer = getService('kibanaServer'); const PageObjects = getPageObjects(['dashboard', 'common']); const browser = getService('browser'); @@ -28,7 +27,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { ]; before(async () => { - await esArchiver.load('test/functional/fixtures/es_archiver/dashboard/current/kibana'); + await kibanaServer.savedObjects.cleanStandardList(); + await kibanaServer.importExport.load( + 'test/functional/fixtures/kbn_archiver/dashboard/current/kibana' + ); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); @@ -81,6 +83,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { // Then get rid of the timestamp so the rest of the tests work with state and app switching. useTimeStamp = false; await browser.get(newUrl.toString(), useTimeStamp); + await kibanaServer.savedObjects.cleanStandardList(); }); }); } diff --git a/test/functional/apps/dashboard/embeddable_data_grid.ts b/test/functional/apps/dashboard/embeddable_data_grid.ts index 5dea22f5006c5..060c467656662 100644 --- a/test/functional/apps/dashboard/embeddable_data_grid.ts +++ b/test/functional/apps/dashboard/embeddable_data_grid.ts @@ -23,8 +23,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { before(async () => { await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/dashboard/current/data'); - await esArchiver.loadIfNeeded( - 'test/functional/fixtures/es_archiver/dashboard/current/kibana' + await kibanaServer.savedObjects.cleanStandardList(); + await kibanaServer.importExport.load( + 'test/functional/fixtures/kbn_archiver/dashboard/current/kibana' ); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', @@ -39,6 +40,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.header.waitUntilLoadingHasFinished(); }); + after(async function () { + await kibanaServer.savedObjects.cleanStandardList(); + }); + it('should expand the detail row when the toggle arrow is clicked', async function () { await retry.try(async function () { await dataGrid.clickRowToggle({ isAnchorRow: false, rowIndex: 0 }); diff --git a/test/functional/apps/dashboard/embeddable_library.ts b/test/functional/apps/dashboard/embeddable_library.ts index fd1aa0d91def7..2abf75f6385ac 100644 --- a/test/functional/apps/dashboard/embeddable_library.ts +++ b/test/functional/apps/dashboard/embeddable_library.ts @@ -12,7 +12,6 @@ import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { const PageObjects = getPageObjects(['dashboard', 'header', 'visualize', 'settings', 'common']); - const esArchiver = getService('esArchiver'); const find = getService('find'); const kibanaServer = getService('kibanaServer'); const testSubjects = getService('testSubjects'); @@ -21,7 +20,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('embeddable library', () => { before(async () => { - await esArchiver.load('test/functional/fixtures/es_archiver/dashboard/current/kibana'); + await kibanaServer.savedObjects.cleanStandardList(); + await kibanaServer.importExport.load( + 'test/functional/fixtures/kbn_archiver/dashboard/current/kibana' + ); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); diff --git a/test/functional/apps/dashboard/embeddable_rendering.ts b/test/functional/apps/dashboard/embeddable_rendering.ts index 8fa2337eef0cd..840826be46532 100644 --- a/test/functional/apps/dashboard/embeddable_rendering.ts +++ b/test/functional/apps/dashboard/embeddable_rendering.ts @@ -21,7 +21,6 @@ import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { const find = getService('find'); const browser = getService('browser'); - const esArchiver = getService('esArchiver'); const kibanaServer = getService('kibanaServer'); const pieChart = getService('pieChart'); const elasticChart = getService('elasticChart'); @@ -103,7 +102,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('dashboard embeddable rendering', function describeIndexTests() { before(async () => { await security.testUser.setRoles(['kibana_admin', 'animals', 'test_logstash_reader']); - await esArchiver.load('test/functional/fixtures/es_archiver/dashboard/current/kibana'); + await kibanaServer.savedObjects.cleanStandardList(); + await kibanaServer.importExport.load( + 'test/functional/fixtures/kbn_archiver/dashboard/current/kibana' + ); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); @@ -122,12 +124,14 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const newUrl = currentUrl.replace(/\?.*$/, ''); await browser.get(newUrl, false); await security.testUser.restoreDefaults(); + await kibanaServer.savedObjects.cleanStandardList(); }); it('adding visualizations', async () => { await elasticChart.setNewChartUiDebugFlag(true); visNames = await dashboardAddPanel.addEveryVisualization('"Rendering Test"'); + expect(visNames.length).to.be.equal(24); await dashboardExpect.visualizationsArePresent(visNames); // This one is rendered via svg which lets us do better testing of what is being rendered. diff --git a/test/functional/apps/dashboard/empty_dashboard.ts b/test/functional/apps/dashboard/empty_dashboard.ts index 46a8545b79596..a7524eaa94b8a 100644 --- a/test/functional/apps/dashboard/empty_dashboard.ts +++ b/test/functional/apps/dashboard/empty_dashboard.ts @@ -12,7 +12,6 @@ import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { const testSubjects = getService('testSubjects'); - const esArchiver = getService('esArchiver'); const kibanaServer = getService('kibanaServer'); const dashboardAddPanel = getService('dashboardAddPanel'); const dashboardVisualizations = getService('dashboardVisualizations'); @@ -21,7 +20,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('empty dashboard', () => { before(async () => { - await esArchiver.load('test/functional/fixtures/es_archiver/dashboard/current/kibana'); + await kibanaServer.savedObjects.cleanStandardList(); + await kibanaServer.importExport.load( + 'test/functional/fixtures/kbn_archiver/dashboard/current/kibana' + ); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); @@ -33,6 +35,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { after(async () => { await dashboardAddPanel.closeAddPanel(); await PageObjects.dashboard.gotoDashboardLandingPage(); + await kibanaServer.savedObjects.cleanStandardList(); }); it('should display empty widget', async () => { diff --git a/test/functional/apps/dashboard/full_screen_mode.ts b/test/functional/apps/dashboard/full_screen_mode.ts index fcfd0fc49dd2b..74fa2168a1461 100644 --- a/test/functional/apps/dashboard/full_screen_mode.ts +++ b/test/functional/apps/dashboard/full_screen_mode.ts @@ -13,7 +13,6 @@ import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { const retry = getService('retry'); const browser = getService('browser'); - const esArchiver = getService('esArchiver'); const kibanaServer = getService('kibanaServer'); const dashboardPanelActions = getService('dashboardPanelActions'); const PageObjects = getPageObjects(['dashboard', 'common']); @@ -21,7 +20,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('full screen mode', () => { before(async () => { - await esArchiver.load('test/functional/fixtures/es_archiver/dashboard/current/kibana'); + await kibanaServer.savedObjects.cleanStandardList(); + await kibanaServer.importExport.load( + 'test/functional/fixtures/kbn_archiver/dashboard/current/kibana' + ); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); @@ -30,6 +32,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.dashboard.loadSavedDashboard('few panels'); }); + after(async () => { + await kibanaServer.savedObjects.cleanStandardList(); + }); + it('option not available in edit mode', async () => { await PageObjects.dashboard.switchToEditMode(); const exists = await PageObjects.dashboard.fullScreenModeMenuItemExists(); diff --git a/test/functional/apps/dashboard/legacy_urls.ts b/test/functional/apps/dashboard/legacy_urls.ts index b449c0f6728a5..1e4138e63d393 100644 --- a/test/functional/apps/dashboard/legacy_urls.ts +++ b/test/functional/apps/dashboard/legacy_urls.ts @@ -23,7 +23,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const log = getService('log'); const dashboardAddPanel = getService('dashboardAddPanel'); const listingTable = getService('listingTable'); - const esArchiver = getService('esArchiver'); + const kibanaServer = getService('kibanaServer'); const security = getService('security'); let kibanaLegacyBaseUrl: string; @@ -33,7 +33,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('legacy urls', function describeIndexTests() { before(async function () { await security.testUser.setRoles(['kibana_admin', 'test_logstash_reader', 'animals']); - await esArchiver.load('test/functional/fixtures/es_archiver/dashboard/current/kibana'); + await kibanaServer.savedObjects.cleanStandardList(); + await kibanaServer.importExport.load( + 'test/functional/fixtures/kbn_archiver/dashboard/current/kibana' + ); await PageObjects.common.navigateToApp('dashboard'); await PageObjects.dashboard.clickNewDashboard(); await dashboardAddPanel.addVisualization('Rendering-Test:-animal-sounds-pie'); diff --git a/test/functional/apps/dashboard/panel_expand_toggle.ts b/test/functional/apps/dashboard/panel_expand_toggle.ts index 00500450595eb..272ec3824e233 100644 --- a/test/functional/apps/dashboard/panel_expand_toggle.ts +++ b/test/functional/apps/dashboard/panel_expand_toggle.ts @@ -12,14 +12,16 @@ import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { const retry = getService('retry'); - const esArchiver = getService('esArchiver'); const kibanaServer = getService('kibanaServer'); const dashboardPanelActions = getService('dashboardPanelActions'); const PageObjects = getPageObjects(['dashboard', 'visualize', 'header', 'common']); describe('expanding a panel', () => { before(async () => { - await esArchiver.load('test/functional/fixtures/es_archiver/dashboard/current/kibana'); + await kibanaServer.savedObjects.cleanStandardList(); + await kibanaServer.importExport.load( + 'test/functional/fixtures/kbn_archiver/dashboard/current/kibana' + ); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); @@ -28,6 +30,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.dashboard.loadSavedDashboard('few panels'); }); + after(async () => { + await kibanaServer.savedObjects.cleanStandardList(); + }); + it('hides other panels', async () => { await dashboardPanelActions.openContextMenu(); await dashboardPanelActions.clickExpandPanelToggle(); diff --git a/test/functional/apps/dashboard/saved_search_embeddable.ts b/test/functional/apps/dashboard/saved_search_embeddable.ts index b08dc43210d26..02050eec30227 100644 --- a/test/functional/apps/dashboard/saved_search_embeddable.ts +++ b/test/functional/apps/dashboard/saved_search_embeddable.ts @@ -22,8 +22,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { before(async () => { await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/dashboard/current/data'); - await esArchiver.loadIfNeeded( - 'test/functional/fixtures/es_archiver/dashboard/current/kibana' + await kibanaServer.savedObjects.cleanStandardList(); + await kibanaServer.importExport.load( + 'test/functional/fixtures/kbn_archiver/dashboard/current/kibana' ); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', @@ -38,6 +39,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { ); }); + after(async () => { + await kibanaServer.savedObjects.cleanStandardList(); + }); + it('highlighting on filtering works', async function () { await dashboardAddPanel.addSavedSearch('Rendering-Test:-saved-search'); await filterBar.addFilter('agent', 'is', 'Mozilla'); diff --git a/test/functional/apps/dashboard/share.ts b/test/functional/apps/dashboard/share.ts index 77a858b22ec79..7fe8048ab7c04 100644 --- a/test/functional/apps/dashboard/share.ts +++ b/test/functional/apps/dashboard/share.ts @@ -10,13 +10,15 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { - const esArchiver = getService('esArchiver'); const kibanaServer = getService('kibanaServer'); const PageObjects = getPageObjects(['dashboard', 'common', 'share']); describe('share dashboard', () => { before(async () => { - await esArchiver.load('test/functional/fixtures/es_archiver/dashboard/current/kibana'); + await kibanaServer.savedObjects.cleanStandardList(); + await kibanaServer.importExport.load( + 'test/functional/fixtures/kbn_archiver/dashboard/current/kibana' + ); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); @@ -25,6 +27,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.dashboard.loadSavedDashboard('few panels'); }); + after(async () => { + await kibanaServer.savedObjects.cleanStandardList(); + }); + it('has "panels" state when sharing a snapshot', async () => { await PageObjects.share.clickShareTopNavButton(); const sharedUrl = await PageObjects.share.getSharedUrl(); diff --git a/test/functional/apps/dashboard/url_field_formatter.ts b/test/functional/apps/dashboard/url_field_formatter.ts index 16cdb62768219..be480066c0365 100644 --- a/test/functional/apps/dashboard/url_field_formatter.ts +++ b/test/functional/apps/dashboard/url_field_formatter.ts @@ -18,7 +18,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { 'timePicker', 'visChart', ]); - const esArchiver = getService('esArchiver'); const kibanaServer = getService('kibanaServer'); const testSubjects = getService('testSubjects'); const browser = getService('browser'); @@ -38,7 +37,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('Changing field formatter to Url', () => { before(async function () { - await esArchiver.load('test/functional/fixtures/es_archiver/dashboard/current/kibana'); + await kibanaServer.savedObjects.cleanStandardList(); + await kibanaServer.importExport.load( + 'test/functional/fixtures/kbn_archiver/dashboard/current/kibana' + ); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); @@ -52,6 +54,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await settings.controlChangeSave(); }); + after(async () => { + await kibanaServer.savedObjects.cleanStandardList(); + }); + it('applied on dashboard', async () => { await common.navigateToApp('dashboard'); await dashboard.loadSavedDashboard('dashboard with table'); diff --git a/test/functional/apps/dashboard/view_edit.ts b/test/functional/apps/dashboard/view_edit.ts index f0ee5aad7a7cf..a73924a8ae75f 100644 --- a/test/functional/apps/dashboard/view_edit.ts +++ b/test/functional/apps/dashboard/view_edit.ts @@ -12,7 +12,6 @@ import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { const queryBar = getService('queryBar'); - const esArchiver = getService('esArchiver'); const kibanaServer = getService('kibanaServer'); const dashboardAddPanel = getService('dashboardAddPanel'); const PageObjects = getPageObjects(['dashboard', 'header', 'common', 'visualize', 'timePicker']); @@ -22,7 +21,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('dashboard view edit mode', function viewEditModeTests() { before(async () => { - await esArchiver.load('test/functional/fixtures/es_archiver/dashboard/current/kibana'); + await kibanaServer.savedObjects.cleanStandardList(); + await kibanaServer.importExport.load( + 'test/functional/fixtures/kbn_archiver/dashboard/current/kibana' + ); await security.testUser.setRoles(['kibana_admin', 'test_logstash_reader', 'animals']); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', @@ -33,6 +35,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { after(async () => { await security.testUser.restoreDefaults(); + await kibanaServer.savedObjects.cleanStandardList(); }); it('create new dashboard opens in edit mode', async function () { diff --git a/test/functional/fixtures/es_archiver/dashboard/current/kibana/data.json b/test/functional/fixtures/es_archiver/dashboard/current/kibana/data.json deleted file mode 100644 index eef30ceb606ed..0000000000000 --- a/test/functional/fixtures/es_archiver/dashboard/current/kibana/data.json +++ /dev/null @@ -1,3392 +0,0 @@ -{ - "type": "doc", - "value": { - "id": "search:a16d1990-3dca-11e8-8660-4d65aa086b3c", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "migrationVersion": { - "search": "7.9.3" - }, - "references": [ - { - "id": "a0f483a0-3dc9-11e8-8660-4d65aa086b3c", - "name": "kibanaSavedObjectMeta.searchSourceJSON.index", - "type": "index-pattern" - } - ], - "search": { - "columns": [ - "animal", - "isDog", - "name", - "sound", - "weightLbs" - ], - "description": "", - "hits": 0, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"highlightAll\":true,\"version\":true,\"query\":{\"language\":\"lucene\",\"query\":\"weightLbs:>40\"},\"filter\":[],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" - }, - "sort": [ - [ - "weightLbs", - "desc" - ] - ], - "title": "animal weights", - "version": 1 - }, - "type": "search", - "updated_at": "2018-04-11T20:55:26.317Z" - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "config:6.3.0", - "index": ".kibana", - "source": { - "config": { - "buildNum": 8467, - "defaultIndex": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c" - }, - "coreMigrationVersion": "7.14.0", - "migrationVersion": { - "config": "7.13.0" - }, - "references": [ - ], - "type": "config", - "updated_at": "2018-04-11T20:43:55.434Z" - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "dashboard:61c58ad0-3dd3-11e8-b2b9-5d5dc1715159", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "dashboard": { - "description": "", - "hits": 0, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[{\"meta\":{\"negate\":false,\"disabled\":false,\"alias\":null,\"type\":\"phrase\",\"key\":\"animal\",\"value\":\"dog\",\"params\":{\"query\":\"dog\",\"type\":\"phrase\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"query\":{\"match\":{\"animal\":{\"query\":\"dog\",\"type\":\"phrase\"}}},\"$state\":{\"store\":\"appState\"}}],\"highlightAll\":true,\"version\":true}" - }, - "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", - "panelsJSON": "[{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"w\":24,\"h\":15,\"x\":0,\"y\":0,\"i\":\"1\"},\"panelIndex\":\"1\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_1\"},{\"version\":\"7.3.0\",\"type\":\"search\",\"gridData\":{\"w\":24,\"h\":15,\"x\":24,\"y\":0,\"i\":\"2\"},\"panelIndex\":\"2\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_2\"}]", - "refreshInterval": { - "display": "Off", - "pause": false, - "value": 0 - }, - "timeFrom": "Mon Apr 09 2018 17:56:08 GMT-0400", - "timeRestore": true, - "timeTo": "Wed Apr 11 2018 17:56:08 GMT-0400", - "title": "dashboard with filter", - "version": 1 - }, - "migrationVersion": { - "dashboard": "7.14.0" - }, - "references": [ - { - "id": "a0f483a0-3dc9-11e8-8660-4d65aa086b3c", - "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", - "type": "index-pattern" - }, - { - "id": "50643b60-3dd3-11e8-b2b9-5d5dc1715159", - "name": "1:panel_1", - "type": "visualization" - }, - { - "id": "a16d1990-3dca-11e8-8660-4d65aa086b3c", - "name": "2:panel_2", - "type": "search" - } - ], - "type": "dashboard", - "updated_at": "2018-04-11T21:57:52.253Z" - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "dashboard:2ae34a60-3dd4-11e8-b2b9-5d5dc1715159", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "dashboard": { - "description": "", - "hits": 0, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" - }, - "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", - "panelsJSON": "[{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"w\":24,\"h\":15,\"x\":0,\"y\":0,\"i\":\"1\"},\"panelIndex\":\"1\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_1\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"w\":24,\"h\":15,\"x\":24,\"y\":0,\"i\":\"2\"},\"panelIndex\":\"2\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_2\"}]", - "timeRestore": false, - "title": "couple panels", - "version": 1 - }, - "migrationVersion": { - "dashboard": "7.14.0" - }, - "references": [ - { - "id": "145ced90-3dcb-11e8-8660-4d65aa086b3c", - "name": "1:panel_1", - "type": "visualization" - }, - { - "id": "e2023110-3dcb-11e8-8660-4d65aa086b3c", - "name": "2:panel_2", - "type": "visualization" - } - ], - "type": "dashboard", - "updated_at": "2018-04-11T22:03:29.670Z" - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "dashboard:76d03330-3dd3-11e8-b2b9-5d5dc1715159", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "dashboard": { - "description": "and_descriptions_has_underscores", - "hits": 0, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" - }, - "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", - "panelsJSON": "[]", - "timeRestore": false, - "title": "dashboard_with_underscores", - "version": 1 - }, - "migrationVersion": { - "dashboard": "7.14.0" - }, - "references": [ - ], - "type": "dashboard", - "updated_at": "2018-04-11T21:58:27.555Z" - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "dashboard:9b780cd0-3dd3-11e8-b2b9-5d5dc1715159", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "dashboard": { - "description": "", - "hits": 0, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" - }, - "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", - "panelsJSON": "[]", - "timeRestore": false, - "title": "* hi & $%!!@# 漢字 ^--=++[]{};'~`~<>?,./:\";'\\|\\\\ special chars", - "version": 1 - }, - "migrationVersion": { - "dashboard": "7.14.0" - }, - "references": [ - ], - "type": "dashboard", - "updated_at": "2018-04-11T22:00:07.322Z" - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "dashboard:6c0b16e0-3dd3-11e8-b2b9-5d5dc1715159", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "dashboard": { - "description": "", - "hits": 0, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" - }, - "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", - "panelsJSON": "[]", - "timeRestore": false, - "title": "dashboard-name-has-dashes", - "version": 1 - }, - "migrationVersion": { - "dashboard": "7.14.0" - }, - "references": [ - ], - "type": "dashboard", - "updated_at": "2018-04-11T21:58:09.486Z" - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "dashboard:19523860-3dd4-11e8-b2b9-5d5dc1715159", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "dashboard": { - "description": "", - "hits": 0, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" - }, - "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", - "panelsJSON": "[]", - "timeRestore": false, - "title": "im empty too", - "version": 1 - }, - "migrationVersion": { - "dashboard": "7.14.0" - }, - "references": [ - ], - "type": "dashboard", - "updated_at": "2018-04-11T22:03:00.198Z" - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "dashboard:14616b50-3dd4-11e8-b2b9-5d5dc1715159", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "dashboard": { - "description": "", - "hits": 0, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" - }, - "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", - "panelsJSON": "[]", - "timeRestore": false, - "title": "im empty", - "version": 1 - }, - "migrationVersion": { - "dashboard": "7.14.0" - }, - "references": [ - ], - "type": "dashboard", - "updated_at": "2018-04-11T22:02:51.909Z" - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "dashboard:33bb8ad0-3dd4-11e8-b2b9-5d5dc1715159", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "dashboard": { - "description": "", - "hits": 0, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" - }, - "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", - "panelsJSON": "[{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":0,\"w\":24,\"h\":15,\"i\":\"1\"},\"panelIndex\":\"1\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_1\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":0,\"w\":24,\"h\":15,\"i\":\"2\"},\"panelIndex\":\"2\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_2\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":15,\"w\":24,\"h\":15,\"i\":\"3\"},\"panelIndex\":\"3\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_3\"}]", - "timeRestore": false, - "title": "few panels", - "version": 1 - }, - "migrationVersion": { - "dashboard": "7.14.0" - }, - "references": [ - { - "id": "145ced90-3dcb-11e8-8660-4d65aa086b3c", - "name": "1:panel_1", - "type": "visualization" - }, - { - "id": "e2023110-3dcb-11e8-8660-4d65aa086b3c", - "name": "2:panel_2", - "type": "visualization" - }, - { - "id": "4b5d6ef0-3dcb-11e8-8660-4d65aa086b3c", - "name": "3:panel_3", - "type": "visualization" - } - ], - "type": "dashboard", - "updated_at": "2018-04-11T22:03:44.509Z" - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "dashboard:60659030-3dd4-11e8-b2b9-5d5dc1715159", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "dashboard": { - "description": "", - "hits": 0, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" - }, - "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", - "panelsJSON": "[]", - "timeRestore": false, - "title": "zz 2", - "version": 1 - }, - "migrationVersion": { - "dashboard": "7.14.0" - }, - "references": [ - ], - "type": "dashboard", - "updated_at": "2018-04-11T22:04:59.443Z" - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "dashboard:65227c00-3dd4-11e8-b2b9-5d5dc1715159", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "dashboard": { - "description": "", - "hits": 0, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" - }, - "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", - "panelsJSON": "[]", - "timeRestore": false, - "title": "zz 3", - "version": 1 - }, - "migrationVersion": { - "dashboard": "7.14.0" - }, - "references": [ - ], - "type": "dashboard", - "updated_at": "2018-04-11T22:05:07.392Z" - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "dashboard:6803a2f0-3dd4-11e8-b2b9-5d5dc1715159", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "dashboard": { - "description": "", - "hits": 0, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" - }, - "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", - "panelsJSON": "[]", - "timeRestore": false, - "title": "zz 4", - "version": 1 - }, - "migrationVersion": { - "dashboard": "7.14.0" - }, - "references": [ - ], - "type": "dashboard", - "updated_at": "2018-04-11T22:05:12.223Z" - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "dashboard:6b18f940-3dd4-11e8-b2b9-5d5dc1715159", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "dashboard": { - "description": "", - "hits": 0, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" - }, - "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", - "panelsJSON": "[]", - "timeRestore": false, - "title": "zz 5", - "version": 1 - }, - "migrationVersion": { - "dashboard": "7.14.0" - }, - "references": [ - ], - "type": "dashboard", - "updated_at": "2018-04-11T22:05:17.396Z" - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "dashboard:6e12ff60-3dd4-11e8-b2b9-5d5dc1715159", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "dashboard": { - "description": "", - "hits": 0, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" - }, - "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", - "panelsJSON": "[]", - "timeRestore": false, - "title": "zz 6", - "version": 1 - }, - "migrationVersion": { - "dashboard": "7.14.0" - }, - "references": [ - ], - "type": "dashboard", - "updated_at": "2018-04-11T22:05:22.390Z" - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "dashboard:4f0fd980-3dd4-11e8-b2b9-5d5dc1715159", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "dashboard": { - "description": "", - "hits": 0, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" - }, - "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", - "panelsJSON": "[]", - "timeRestore": false, - "title": "zz", - "version": 1 - }, - "migrationVersion": { - "dashboard": "7.14.0" - }, - "references": [ - ], - "type": "dashboard", - "updated_at": "2018-04-11T22:04:30.360Z" - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "dashboard:3de0bda0-3dd4-11e8-b2b9-5d5dc1715159", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "dashboard": { - "description": "", - "hits": 0, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" - }, - "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", - "panelsJSON": "[]", - "timeRestore": false, - "title": "1", - "version": 1 - }, - "migrationVersion": { - "dashboard": "7.14.0" - }, - "references": [ - ], - "type": "dashboard", - "updated_at": "2018-04-11T22:04:01.530Z" - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "dashboard:46c8b580-3dd4-11e8-b2b9-5d5dc1715159", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "dashboard": { - "description": "", - "hits": 0, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" - }, - "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", - "panelsJSON": "[]", - "timeRestore": false, - "title": "2", - "version": 1 - }, - "migrationVersion": { - "dashboard": "7.14.0" - }, - "references": [ - ], - "type": "dashboard", - "updated_at": "2018-04-11T22:04:16.472Z" - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "dashboard:708fe640-3dd4-11e8-b2b9-5d5dc1715159", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "dashboard": { - "description": "", - "hits": 0, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" - }, - "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", - "panelsJSON": "[]", - "timeRestore": false, - "title": "zz 7", - "version": 1 - }, - "migrationVersion": { - "dashboard": "7.14.0" - }, - "references": [ - ], - "type": "dashboard", - "updated_at": "2018-04-11T22:05:26.564Z" - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "dashboard:7b8d50a0-3dd4-11e8-b2b9-5d5dc1715159", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "dashboard": { - "description": "", - "hits": 0, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" - }, - "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", - "panelsJSON": "[]", - "timeRestore": false, - "title": "Hi i have a lot of words in my dashboard name! It's pretty long i wonder what it'll look like", - "version": 1 - }, - "migrationVersion": { - "dashboard": "7.14.0" - }, - "references": [ - ], - "type": "dashboard", - "updated_at": "2018-04-11T22:05:45.002Z" - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "dashboard:7e42d3b0-3dd4-11e8-b2b9-5d5dc1715159", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "dashboard": { - "description": "", - "hits": 0, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" - }, - "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", - "panelsJSON": "[]", - "timeRestore": false, - "title": "bye", - "version": 1 - }, - "migrationVersion": { - "dashboard": "7.14.0" - }, - "references": [ - ], - "type": "dashboard", - "updated_at": "2018-04-11T22:05:49.547Z" - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "dashboard:846988b0-3dd4-11e8-b2b9-5d5dc1715159", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "dashboard": { - "description": "", - "hits": 0, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" - }, - "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", - "panelsJSON": "[]", - "timeRestore": false, - "title": "last", - "version": 1 - }, - "migrationVersion": { - "dashboard": "7.14.0" - }, - "references": [ - ], - "type": "dashboard", - "updated_at": "2018-04-11T22:05:59.867Z" - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "dashboard:cbd3bc30-3e5a-11e8-9fc3-39e49624228e", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "dashboard": { - "description": "", - "hits": 0, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"query\":{\"query\":\"weightLbs:<50\",\"language\":\"lucene\"},\"filter\":[{\"meta\":{\"negate\":true,\"disabled\":false,\"alias\":null,\"type\":\"phrase\",\"key\":\"name.keyword\",\"value\":\"Fee Fee\",\"params\":{\"query\":\"Fee Fee\",\"type\":\"phrase\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"query\":{\"match\":{\"name.keyword\":{\"query\":\"Fee Fee\",\"type\":\"phrase\"}}},\"$state\":{\"store\":\"appState\"}}],\"highlightAll\":true,\"version\":true}" - }, - "optionsJSON": "{\"darkTheme\":true,\"useMargins\":true,\"hidePanelTitles\":true}", - "panelsJSON": "[{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":0,\"w\":24,\"h\":15,\"i\":\"1\"},\"panelIndex\":\"1\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_1\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":0,\"w\":24,\"h\":15,\"i\":\"2\"},\"panelIndex\":\"2\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_2\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":15,\"w\":24,\"h\":15,\"i\":\"3\"},\"panelIndex\":\"3\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_3\"}]", - "timeRestore": false, - "title": "bug", - "version": 1 - }, - "migrationVersion": { - "dashboard": "7.14.0" - }, - "references": [ - { - "id": "a0f483a0-3dc9-11e8-8660-4d65aa086b3c", - "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", - "type": "index-pattern" - }, - { - "id": "771b4f10-3e59-11e8-9fc3-39e49624228e", - "name": "1:panel_1", - "type": "visualization" - }, - { - "id": "befdb6b0-3e59-11e8-9fc3-39e49624228e", - "name": "2:panel_2", - "type": "visualization" - }, - { - "id": "4c0c3f90-3e5a-11e8-9fc3-39e49624228e", - "name": "3:panel_3", - "type": "visualization" - } - ], - "type": "dashboard", - "updated_at": "2018-04-12T14:07:12.243Z" - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "dashboard:5bac3a80-3e5b-11e8-9fc3-39e49624228e", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "dashboard": { - "description": "dashboard with scripted filter, negated filter and query", - "hits": 0, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"query\":{\"language\":\"lucene\",\"query\":\"weightLbs:<50\"},\"filter\":[{\"$state\":{\"store\":\"appState\"},\"meta\":{\"alias\":null,\"disabled\":false,\"key\":\"name.keyword\",\"negate\":true,\"params\":{\"query\":\"Fee Fee\",\"type\":\"phrase\"},\"type\":\"phrase\",\"value\":\"Fee Fee\",\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"query\":{\"match\":{\"name.keyword\":{\"query\":\"Fee Fee\",\"type\":\"phrase\"}}}},{\"$state\":{\"store\":\"appState\"},\"meta\":{\"alias\":\"is dog\",\"disabled\":false,\"field\":\"isDog\",\"key\":\"isDog\",\"negate\":false,\"params\":{\"value\":true},\"type\":\"phrase\",\"value\":\"true\",\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[1].meta.index\"},\"script\":{\"script\":{\"inline\":\"boolean compare(Supplier s, def v) {return s.get() == v;}compare(() -> { return doc['animal.keyword'].value == 'dog' }, params.value);\",\"lang\":\"painless\",\"params\":{\"value\":true}}}}],\"highlightAll\":true,\"version\":true}" - }, - "optionsJSON": "{\"darkTheme\":true,\"hidePanelTitles\":false,\"useMargins\":true}", - "panelsJSON": "[{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":0,\"w\":24,\"h\":15,\"i\":\"1\"},\"panelIndex\":\"1\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_1\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":0,\"w\":24,\"h\":15,\"i\":\"3\"},\"panelIndex\":\"3\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_3\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":15,\"w\":24,\"h\":15,\"i\":\"4\"},\"panelIndex\":\"4\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_4\"}]", - "refreshInterval": { - "display": "Off", - "pause": false, - "section": 0, - "value": 0 - }, - "timeFrom": "Wed Apr 12 2017 10:06:21 GMT-0400", - "timeRestore": true, - "timeTo": "Thu Apr 12 2018 10:06:21 GMT-0400", - "title": "filters", - "version": 1 - }, - "migrationVersion": { - "dashboard": "7.14.0" - }, - "references": [ - { - "id": "a0f483a0-3dc9-11e8-8660-4d65aa086b3c", - "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", - "type": "index-pattern" - }, - { - "id": "a0f483a0-3dc9-11e8-8660-4d65aa086b3c", - "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[1].meta.index", - "type": "index-pattern" - }, - { - "id": "771b4f10-3e59-11e8-9fc3-39e49624228e", - "name": "1:panel_1", - "type": "visualization" - }, - { - "id": "4c0c3f90-3e5a-11e8-9fc3-39e49624228e", - "name": "3:panel_3", - "type": "visualization" - }, - { - "id": "50643b60-3dd3-11e8-b2b9-5d5dc1715159", - "name": "4:panel_4", - "type": "visualization" - } - ], - "type": "dashboard", - "updated_at": "2018-04-12T14:11:13.576Z" - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "index-pattern:f908c8e0-3e6d-11e8-bbb9-e15942d5d48c", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "index-pattern": { - "fields": "[{\"name\":\"_id\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_score\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_source\",\"type\":\"_source\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"activity level\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"barking level\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"breed\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"breed.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"size\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"size.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"trainability\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true}]", - "title": "dogbreeds" - }, - "migrationVersion": { - "index-pattern": "7.11.0" - }, - "references": [ - ], - "type": "index-pattern", - "updated_at": "2018-04-12T16:24:29.357Z" - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "visualization:5e085850-3e6e-11e8-bbb9-e15942d5d48c", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "migrationVersion": { - "visualization": "7.14.0" - }, - "references": [ - { - "id": "f908c8e0-3e6d-11e8-bbb9-e15942d5d48c", - "name": "kibanaSavedObjectMeta.searchSourceJSON.index", - "type": "index-pattern" - } - ], - "type": "visualization", - "updated_at": "2018-04-12T16:27:17.973Z", - "visualization": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"filter\":[],\"query\":{\"language\":\"lucene\",\"query\":\"\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" - }, - "title": "non timebased line chart - dog data", - "uiStateJSON": "{}", - "version": 1, - "visState": "{\"title\":\"non timebased line chart - dog data\",\"type\":\"line\",\"params\":{\"type\":\"line\",\"grid\":{\"categoryLines\":false,\"style\":{\"color\":\"#eee\"}},\"categoryAxes\":[{\"id\":\"CategoryAxis-1\",\"type\":\"category\",\"position\":\"bottom\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\"},\"labels\":{\"show\":true,\"truncate\":100,\"filter\":true},\"title\":{}}],\"valueAxes\":[{\"id\":\"ValueAxis-1\",\"name\":\"LeftAxis-1\",\"type\":\"value\",\"position\":\"left\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\",\"mode\":\"normal\"},\"labels\":{\"show\":true,\"rotate\":0,\"filter\":false,\"truncate\":100},\"title\":{\"text\":\"Max trainability\"}}],\"seriesParams\":[{\"show\":\"true\",\"type\":\"line\",\"mode\":\"normal\",\"data\":{\"label\":\"Max trainability\",\"id\":\"1\"},\"valueAxis\":\"ValueAxis-1\",\"drawLinesBetweenPoints\":true,\"showCircles\":true},{\"show\":true,\"mode\":\"normal\",\"type\":\"line\",\"drawLinesBetweenPoints\":true,\"showCircles\":true,\"data\":{\"id\":\"3\",\"label\":\"Max barking level\"},\"valueAxis\":\"ValueAxis-1\"},{\"show\":true,\"mode\":\"normal\",\"type\":\"line\",\"drawLinesBetweenPoints\":true,\"showCircles\":true,\"data\":{\"id\":\"4\",\"label\":\"Max activity level\"},\"valueAxis\":\"ValueAxis-1\"}],\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"times\":[],\"addTimeMarker\":false,\"palette\":{\"type\":\"palette\",\"name\":\"kibana_palette\"},\"isVislibVis\":true,\"detailedTooltip\":true,\"fittingFunction\":\"zero\"},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"max\",\"schema\":\"metric\",\"params\":{\"field\":\"trainability\"}},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"segment\",\"params\":{\"field\":\"breed.keyword\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\"}},{\"id\":\"3\",\"enabled\":true,\"type\":\"max\",\"schema\":\"metric\",\"params\":{\"field\":\"barking level\"}},{\"id\":\"4\",\"enabled\":true,\"type\":\"max\",\"schema\":\"metric\",\"params\":{\"field\":\"activity level\"}}]}" - } - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "dashboard:a5d56330-3e6e-11e8-bbb9-e15942d5d48c", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "dashboard": { - "description": "I have two visualizations that are created off a non time based index", - "hits": 0, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" - }, - "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", - "panelsJSON": "[{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"w\":24,\"h\":15,\"x\":0,\"y\":0,\"i\":\"1\"},\"panelIndex\":\"1\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_1\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"w\":24,\"h\":15,\"x\":24,\"y\":0,\"i\":\"2\"},\"panelIndex\":\"2\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_2\"}]", - "timeRestore": false, - "title": "Non time based", - "version": 1 - }, - "migrationVersion": { - "dashboard": "7.14.0" - }, - "references": [ - { - "id": "5e085850-3e6e-11e8-bbb9-e15942d5d48c", - "name": "1:panel_1", - "type": "visualization" - }, - { - "id": "8bc8d6c0-3e6e-11e8-bbb9-e15942d5d48c", - "name": "2:panel_2", - "type": "visualization" - } - ], - "type": "dashboard", - "updated_at": "2018-04-12T16:29:18.435Z" - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "dashboard:d2525040-3dcd-11e8-8660-4d65aa086b3c", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "dashboard": { - "description": "I have one of every visualization type since the last time I was created!", - "hits": 0, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"query\":{\"language\":\"lucene\",\"query\":\"\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" - }, - "optionsJSON": "{\"darkTheme\":false,\"hidePanelTitles\":false,\"useMargins\":true}", - "panelsJSON": "[{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":0,\"w\":24,\"h\":15,\"i\":\"1\"},\"panelIndex\":\"1\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_1\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":0,\"w\":24,\"h\":15,\"i\":\"2\"},\"panelIndex\":\"2\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_2\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":15,\"w\":24,\"h\":15,\"i\":\"3\"},\"panelIndex\":\"3\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_3\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":30,\"w\":24,\"h\":15,\"i\":\"5\"},\"panelIndex\":\"5\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_5\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":30,\"w\":24,\"h\":15,\"i\":\"6\"},\"panelIndex\":\"6\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_6\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":45,\"w\":24,\"h\":15,\"i\":\"7\"},\"panelIndex\":\"7\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_7\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":45,\"w\":24,\"h\":15,\"i\":\"8\"},\"panelIndex\":\"8\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_8\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":60,\"w\":24,\"h\":15,\"i\":\"9\"},\"panelIndex\":\"9\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_9\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":60,\"w\":24,\"h\":15,\"i\":\"10\"},\"panelIndex\":\"10\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_10\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":75,\"w\":24,\"h\":15,\"i\":\"11\"},\"panelIndex\":\"11\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_11\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":75,\"w\":24,\"h\":15,\"i\":\"12\"},\"panelIndex\":\"12\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_12\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":90,\"w\":24,\"h\":15,\"i\":\"13\"},\"panelIndex\":\"13\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_13\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":105,\"w\":24,\"h\":15,\"i\":\"15\"},\"panelIndex\":\"15\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_15\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":105,\"w\":24,\"h\":15,\"i\":\"16\"},\"panelIndex\":\"16\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_16\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":120,\"w\":24,\"h\":15,\"i\":\"17\"},\"panelIndex\":\"17\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_17\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":120,\"w\":24,\"h\":15,\"i\":\"18\"},\"panelIndex\":\"18\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_18\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":135,\"w\":24,\"h\":15,\"i\":\"19\"},\"panelIndex\":\"19\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_19\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":135,\"w\":24,\"h\":15,\"i\":\"20\"},\"panelIndex\":\"20\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_20\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":150,\"w\":24,\"h\":15,\"i\":\"21\"},\"panelIndex\":\"21\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_21\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":150,\"w\":24,\"h\":15,\"i\":\"22\"},\"panelIndex\":\"22\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_22\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":165,\"w\":24,\"h\":15,\"i\":\"23\"},\"panelIndex\":\"23\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_23\"},{\"version\":\"7.3.0\",\"type\":\"search\",\"gridData\":{\"x\":24,\"y\":165,\"w\":24,\"h\":15,\"i\":\"24\"},\"panelIndex\":\"24\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_24\"},{\"version\":\"7.3.0\",\"type\":\"search\",\"gridData\":{\"x\":0,\"y\":180,\"w\":24,\"h\":15,\"i\":\"25\"},\"panelIndex\":\"25\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_25\"},{\"version\":\"7.3.0\",\"type\":\"search\",\"gridData\":{\"x\":24,\"y\":180,\"w\":24,\"h\":15,\"i\":\"26\"},\"panelIndex\":\"26\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_26\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":195,\"w\":24,\"h\":15,\"i\":\"27\"},\"panelIndex\":\"27\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_27\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":195,\"w\":24,\"h\":15,\"i\":\"28\"},\"panelIndex\":\"28\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_28\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":210,\"w\":24,\"h\":15,\"i\":\"29\"},\"panelIndex\":\"29\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_29\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"w\":24,\"h\":15,\"x\":24,\"y\":210,\"i\":\"30\"},\"panelIndex\":\"30\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_30\"}]", - "refreshInterval": { - "display": "Off", - "pause": false, - "value": 0 - }, - "timeFrom": "Mon Apr 09 2018 17:56:08 GMT-0400", - "timeRestore": true, - "timeTo": "Wed Apr 11 2018 17:56:08 GMT-0400", - "title": "dashboard with everything", - "version": 1 - }, - "migrationVersion": { - "dashboard": "7.14.0" - }, - "references": [ - { - "id": "e6140540-3dca-11e8-8660-4d65aa086b3c", - "name": "1:panel_1", - "type": "visualization" - }, - { - "id": "3525b840-3dcb-11e8-8660-4d65aa086b3c", - "name": "2:panel_2", - "type": "visualization" - }, - { - "id": "4b5d6ef0-3dcb-11e8-8660-4d65aa086b3c", - "name": "3:panel_3", - "type": "visualization" - }, - { - "id": "ffa2e0c0-3dcb-11e8-8660-4d65aa086b3c", - "name": "5:panel_5", - "type": "visualization" - }, - { - "id": "e2023110-3dcb-11e8-8660-4d65aa086b3c", - "name": "6:panel_6", - "type": "visualization" - }, - { - "id": "145ced90-3dcb-11e8-8660-4d65aa086b3c", - "name": "7:panel_7", - "type": "visualization" - }, - { - "id": "2d1b1620-3dcd-11e8-8660-4d65aa086b3c", - "name": "8:panel_8", - "type": "visualization" - }, - { - "id": "42535e30-3dcd-11e8-8660-4d65aa086b3c", - "name": "9:panel_9", - "type": "visualization" - }, - { - "id": "42535e30-3dcd-11e8-8660-4d65aa086b3c", - "name": "10:panel_10", - "type": "visualization" - }, - { - "id": "4c0f47e0-3dcd-11e8-8660-4d65aa086b3c", - "name": "11:panel_11", - "type": "visualization" - }, - { - "id": "11ae2bd0-3dcc-11e8-8660-4d65aa086b3c", - "name": "12:panel_12", - "type": "visualization" - }, - { - "id": "3fe22200-3dcb-11e8-8660-4d65aa086b3c", - "name": "13:panel_13", - "type": "visualization" - }, - { - "id": "78803be0-3dcd-11e8-8660-4d65aa086b3c", - "name": "15:panel_15", - "type": "visualization" - }, - { - "id": "b92ae920-3dcc-11e8-8660-4d65aa086b3c", - "name": "16:panel_16", - "type": "visualization" - }, - { - "id": "e4d8b430-3dcc-11e8-8660-4d65aa086b3c", - "name": "17:panel_17", - "type": "visualization" - }, - { - "id": "f81134a0-3dcc-11e8-8660-4d65aa086b3c", - "name": "18:panel_18", - "type": "visualization" - }, - { - "id": "cc43fab0-3dcc-11e8-8660-4d65aa086b3c", - "name": "19:panel_19", - "type": "visualization" - }, - { - "id": "02a2e4e0-3dcd-11e8-8660-4d65aa086b3c", - "name": "20:panel_20", - "type": "visualization" - }, - { - "id": "df815d20-3dcc-11e8-8660-4d65aa086b3c", - "name": "21:panel_21", - "type": "visualization" - }, - { - "id": "c40f4d40-3dcc-11e8-8660-4d65aa086b3c", - "name": "22:panel_22", - "type": "visualization" - }, - { - "id": "7fda8ee0-3dcd-11e8-8660-4d65aa086b3c", - "name": "23:panel_23", - "type": "visualization" - }, - { - "id": "a16d1990-3dca-11e8-8660-4d65aa086b3c", - "name": "24:panel_24", - "type": "search" - }, - { - "id": "be5accf0-3dca-11e8-8660-4d65aa086b3c", - "name": "25:panel_25", - "type": "search" - }, - { - "id": "ca5ada40-3dca-11e8-8660-4d65aa086b3c", - "name": "26:panel_26", - "type": "search" - }, - { - "id": "771b4f10-3e59-11e8-9fc3-39e49624228e", - "name": "27:panel_27", - "type": "visualization" - }, - { - "id": "5e085850-3e6e-11e8-bbb9-e15942d5d48c", - "name": "28:panel_28", - "type": "visualization" - }, - { - "id": "8bc8d6c0-3e6e-11e8-bbb9-e15942d5d48c", - "name": "29:panel_29", - "type": "visualization" - }, - { - "id": "befdb6b0-3e59-11e8-9fc3-39e49624228e", - "name": "30:panel_30", - "type": "visualization" - } - ], - "type": "dashboard", - "updated_at": "2018-04-16T16:05:02.915Z" - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "dashboard:d2525040-3dcd-11e8-8660-4d65aa086b3b", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "dashboard": { - "description": "I have one of every visualization type since the last time I was created!", - "hits": 0, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"query\":{\"language\":\"lucene\",\"query\":\"\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" - }, - "optionsJSON": "{\"darkTheme\":false,\"hidePanelTitles\":false,\"useMargins\":true}", - "panelsJSON": "[{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":15,\"w\":24,\"h\":15,\"i\":\"3\"},\"panelIndex\":\"3\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_3\"}]", - "refreshInterval": { - "display": "Off", - "pause": false, - "value": 0 - }, - "timeFrom": "Mon Apr 09 2018 17:56:08 GMT-0400", - "timeRestore": true, - "timeTo": "Wed Apr 11 2018 17:56:08 GMT-0400", - "title": "dashboard with table", - "version": 1 - }, - "migrationVersion": { - "dashboard": "7.14.0" - }, - "references": [ - { - "id": "4b5d6ef0-3dcb-11e8-8660-4d65aa086b3c", - "name": "3:panel_3", - "type": "visualization" - } - ], - "type": "dashboard", - "updated_at": "2018-04-16T16:05:02.915Z" - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "visualization:29bd0240-4197-11e8-bb13-d53698fb349a", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "migrationVersion": { - "visualization": "7.14.0" - }, - "references": [ - { - "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", - "name": "kibanaSavedObjectMeta.searchSourceJSON.index", - "type": "index-pattern" - }, - { - "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", - "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", - "type": "index-pattern" - } - ], - "type": "visualization", - "updated_at": "2018-04-16T16:56:53.092Z", - "visualization": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"filter\":[{\"meta\":{\"negate\":false,\"disabled\":false,\"alias\":null,\"type\":\"phrase\",\"key\":\"geo.src\",\"value\":\"CN\",\"params\":{\"query\":\"CN\",\"type\":\"phrase\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"query\":{\"match\":{\"geo.src\":{\"query\":\"CN\",\"type\":\"phrase\"}}},\"$state\":{\"store\":\"appState\"}}],\"query\":{\"query\":\"bytes >= 10000\",\"language\":\"kuery\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" - }, - "title": "Kuery: pie bytes with kuery and filter", - "uiStateJSON": "{}", - "version": 1, - "visState": "{\"title\":\"Kuery: pie bytes with kuery and filter\",\"type\":\"pie\",\"params\":{\"type\":\"pie\",\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"isDonut\":true,\"labels\":{\"show\":false,\"values\":true,\"last_level\":true,\"truncate\":100},\"palette\":{\"type\":\"palette\",\"name\":\"kibana_palette\"},\"distinctColors\":true},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"segment\",\"params\":{\"field\":\"bytes\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"size\":10,\"order\":\"desc\",\"orderBy\":\"1\"}}]}" - } - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "index-pattern:0bf35f60-3dc9-11e8-8660-4d65aa086b3c", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "index-pattern": { - "fieldFormatMap": "{\"machine.ram\":{\"id\":\"number\",\"params\":{\"pattern\":\"0,0.[000] b\"}}}", - "fields": "[{\"name\":\"@message\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"@message.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"@tags\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"@tags.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"@timestamp\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"_id\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_score\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_source\",\"type\":\"_source\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"agent\",\"type\":\"string\",\"count\":2,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"agent.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"bytes\",\"type\":\"number\",\"count\":3,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"clientip\",\"type\":\"ip\",\"count\":3,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"extension\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"extension.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.coordinates\",\"type\":\"geo_point\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.dest\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.src\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.srcdest\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"headings\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"headings.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"host.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"id\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"index.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ip\",\"type\":\"ip\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"links\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"links.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"machine.os\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"machine.os.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"machine.ram\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"memory\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"meta.char\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"meta.related\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"meta.user.firstname\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"meta.user.lastname\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"phpmemory\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"referer\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:modified_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:published_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:section\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.article:section.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:tag\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.article:tag.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:description\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:description.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:image\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:image.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:image:height\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:image:height.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:image:width\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:image:width.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:site_name\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:site_name.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:title\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:title.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:type.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:url.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:card\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:card.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:description\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:description.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:image\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:image.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:site\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:site.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:title\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:title.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.url.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"request\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"request.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"response\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"response.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"spaces\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"spaces.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"url.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"utc_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"xss\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"xss.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true}]", - "timeFieldName": "@timestamp", - "title": "logstash-*" - }, - "migrationVersion": { - "index-pattern": "7.11.0" - }, - "references": [ - ], - "type": "index-pattern", - "updated_at": "2018-04-16T16:57:12.263Z" - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "search:55d37a30-4197-11e8-bb13-d53698fb349a", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "migrationVersion": { - "search": "7.9.3" - }, - "references": [ - { - "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", - "name": "kibanaSavedObjectMeta.searchSourceJSON.index", - "type": "index-pattern" - }, - { - "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", - "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", - "type": "index-pattern" - } - ], - "search": { - "columns": [ - "agent", - "bytes", - "clientip" - ], - "description": "", - "hits": 0, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"highlightAll\":true,\"version\":true,\"query\":{\"query\":\"clientip : 73.14.212.83\",\"language\":\"kuery\"},\"filter\":[{\"meta\":{\"negate\":false,\"disabled\":false,\"alias\":null,\"type\":\"range\",\"key\":\"bytes\",\"value\":\"100 to 1,000\",\"params\":{\"gte\":100,\"lt\":1000},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"range\":{\"bytes\":{\"gte\":100,\"lt\":1000}},\"$state\":{\"store\":\"appState\"}}],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" - }, - "sort": [ - [ - "@timestamp", - "desc" - ] - ], - "title": "Bytes and kuery in saved search with filter", - "version": 1 - }, - "type": "search", - "updated_at": "2018-04-16T16:58:07.059Z" - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "dashboard:b60de070-4197-11e8-bb13-d53698fb349a", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "dashboard": { - "description": "Bytes bytes and more bytes", - "hits": 0, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"query\":{\"language\":\"lucene\",\"query\":\"\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" - }, - "optionsJSON": "{\"darkTheme\":false,\"hidePanelTitles\":false,\"useMargins\":true}", - "panelsJSON": "[{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":0,\"w\":24,\"h\":15,\"i\":\"1\"},\"panelIndex\":\"1\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_1\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":0,\"w\":24,\"h\":15,\"i\":\"2\"},\"panelIndex\":\"2\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_2\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":15,\"w\":24,\"h\":15,\"i\":\"3\"},\"panelIndex\":\"3\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_3\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":15,\"w\":17,\"h\":8,\"i\":\"4\"},\"panelIndex\":\"4\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_4\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":30,\"w\":18,\"h\":13,\"i\":\"5\"},\"panelIndex\":\"5\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_5\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":37,\"w\":24,\"h\":12,\"i\":\"6\"},\"panelIndex\":\"6\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_6\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":18,\"y\":30,\"w\":9,\"h\":7,\"i\":\"7\"},\"panelIndex\":\"7\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_7\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":28,\"y\":23,\"w\":15,\"h\":13,\"i\":\"8\"},\"panelIndex\":\"8\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_8\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":43,\"w\":24,\"h\":15,\"i\":\"9\"},\"panelIndex\":\"9\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_9\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":49,\"w\":18,\"h\":12,\"i\":\"10\"},\"panelIndex\":\"10\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_10\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":58,\"w\":24,\"h\":15,\"i\":\"11\"},\"panelIndex\":\"11\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_11\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":61,\"w\":5,\"h\":4,\"i\":\"12\"},\"panelIndex\":\"12\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_12\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":73,\"w\":17,\"h\":6,\"i\":\"13\"},\"panelIndex\":\"13\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_13\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":65,\"w\":24,\"h\":15,\"i\":\"14\"},\"panelIndex\":\"14\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_14\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":79,\"w\":24,\"h\":6,\"i\":\"15\"},\"panelIndex\":\"15\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_15\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":80,\"w\":24,\"h\":15,\"i\":\"16\"},\"panelIndex\":\"16\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_16\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":85,\"w\":13,\"h\":11,\"i\":\"17\"},\"panelIndex\":\"17\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_17\"},{\"version\":\"7.3.0\",\"type\":\"search\",\"gridData\":{\"x\":24,\"y\":95,\"w\":23,\"h\":11,\"i\":\"18\"},\"panelIndex\":\"18\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_18\"}]", - "refreshInterval": { - "display": "Off", - "pause": false, - "value": 0 - }, - "timeFrom": "Mon Apr 09 2018 17:56:08 GMT-0400", - "timeRestore": true, - "timeTo": "Wed Apr 11 2018 17:56:08 GMT-0400", - "title": "All about those bytes", - "version": 1 - }, - "migrationVersion": { - "dashboard": "7.14.0" - }, - "references": [ - { - "id": "7ff2c4c0-4191-11e8-bb13-d53698fb349a", - "name": "1:panel_1", - "type": "visualization" - }, - { - "id": "03d2afd0-4192-11e8-bb13-d53698fb349a", - "name": "2:panel_2", - "type": "visualization" - }, - { - "id": "63983430-4192-11e8-bb13-d53698fb349a", - "name": "3:panel_3", - "type": "visualization" - }, - { - "id": "0ca8c600-4195-11e8-bb13-d53698fb349a", - "name": "4:panel_4", - "type": "visualization" - }, - { - "id": "c10c6b00-4191-11e8-bb13-d53698fb349a", - "name": "5:panel_5", - "type": "visualization" - }, - { - "id": "760a9060-4190-11e8-bb13-d53698fb349a", - "name": "6:panel_6", - "type": "visualization" - }, - { - "id": "1dcdfe30-4192-11e8-bb13-d53698fb349a", - "name": "7:panel_7", - "type": "visualization" - }, - { - "id": "584c0300-4191-11e8-bb13-d53698fb349a", - "name": "8:panel_8", - "type": "visualization" - }, - { - "id": "b3e70d00-4190-11e8-bb13-d53698fb349a", - "name": "9:panel_9", - "type": "visualization" - }, - { - "id": "df72ad40-4194-11e8-bb13-d53698fb349a", - "name": "10:panel_10", - "type": "visualization" - }, - { - "id": "9bebe980-4192-11e8-bb13-d53698fb349a", - "name": "11:panel_11", - "type": "visualization" - }, - { - "id": "9fb4c670-4194-11e8-bb13-d53698fb349a", - "name": "12:panel_12", - "type": "visualization" - }, - { - "id": "35417e50-4194-11e8-bb13-d53698fb349a", - "name": "13:panel_13", - "type": "visualization" - }, - { - "id": "039e4770-4194-11e8-bb13-d53698fb349a", - "name": "14:panel_14", - "type": "visualization" - }, - { - "id": "76c7f020-4194-11e8-bb13-d53698fb349a", - "name": "15:panel_15", - "type": "visualization" - }, - { - "id": "8090dcb0-4195-11e8-bb13-d53698fb349a", - "name": "16:panel_16", - "type": "visualization" - }, - { - "id": "29bd0240-4197-11e8-bb13-d53698fb349a", - "name": "17:panel_17", - "type": "visualization" - }, - { - "id": "55d37a30-4197-11e8-bb13-d53698fb349a", - "name": "18:panel_18", - "type": "search" - } - ], - "type": "dashboard", - "updated_at": "2018-04-16T17:00:48.503Z" - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "visualization:78803be0-3dcd-11e8-8660-4d65aa086b3c", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "migrationVersion": { - "visualization": "7.14.0" - }, - "references": [ - { - "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", - "name": "kibanaSavedObjectMeta.searchSourceJSON.index", - "type": "index-pattern" - } - ], - "type": "visualization", - "updated_at": "2018-04-17T15:06:32.127Z", - "visualization": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" - }, - "title": "Rendering Test: tag cloud", - "uiStateJSON": "{}", - "version": 1, - "visState": "{\"title\":\"Rendering Test: tag cloud\",\"type\":\"tagcloud\",\"params\":{\"scale\":\"linear\",\"orientation\":\"single\",\"minFontSize\":18,\"maxFontSize\":72,\"showLabel\":true},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"segment\",\"params\":{\"field\":\"geo.src\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\"}}]}" - } - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "visualization:3fe22200-3dcb-11e8-8660-4d65aa086b3c", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "migrationVersion": { - "visualization": "7.14.0" - }, - "references": [ - { - "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", - "name": "kibanaSavedObjectMeta.searchSourceJSON.index", - "type": "index-pattern" - } - ], - "type": "visualization", - "updated_at": "2018-04-17T15:06:32.130Z", - "visualization": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" - }, - "title": "Rendering Test: pie", - "uiStateJSON": "{}", - "version": 1, - "visState": "{\"title\":\"Rendering Test: pie\",\"type\":\"pie\",\"params\":{\"type\":\"pie\",\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"isDonut\":true,\"labels\":{\"show\":false,\"values\":true,\"last_level\":true,\"truncate\":100},\"palette\":{\"type\":\"palette\",\"name\":\"kibana_palette\"},\"distinctColors\":true},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"segment\",\"params\":{\"field\":\"bytes\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\"}}]}" - } - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "visualization:11ae2bd0-3dcc-11e8-8660-4d65aa086b3c", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "migrationVersion": { - "visualization": "7.14.0" - }, - "references": [ - { - "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", - "name": "kibanaSavedObjectMeta.searchSourceJSON.index", - "type": "index-pattern" - } - ], - "type": "visualization", - "updated_at": "2018-04-17T15:06:32.133Z", - "visualization": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" - }, - "title": "Rendering Test: metric", - "uiStateJSON": "{}", - "version": 1, - "visState": "{\"title\":\"Rendering Test: metric\",\"type\":\"metric\",\"params\":{\"addTooltip\":true,\"addLegend\":false,\"type\":\"metric\",\"metric\":{\"percentageMode\":false,\"useRanges\":false,\"colorSchema\":\"Green to Red\",\"metricColorMode\":\"None\",\"colorsRange\":[{\"from\":0,\"to\":10000}],\"labels\":{\"show\":true},\"invertColors\":false,\"style\":{\"bgFill\":\"#000\",\"bgColor\":false,\"labelColor\":false,\"subText\":\"\",\"fontSize\":60}}},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"cardinality\",\"schema\":\"metric\",\"params\":{\"field\":\"bytes\"}}]}" - } - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "visualization:145ced90-3dcb-11e8-8660-4d65aa086b3c", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "migrationVersion": { - "visualization": "7.14.0" - }, - "references": [ - { - "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", - "name": "kibanaSavedObjectMeta.searchSourceJSON.index", - "type": "index-pattern" - } - ], - "type": "visualization", - "updated_at": "2018-04-17T15:06:32.134Z", - "visualization": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" - }, - "title": "Rendering Test: heatmap", - "uiStateJSON": "{\"vis\":{\"defaultColors\":{\"0 - 15\":\"rgb(247,252,245)\",\"15 - 30\":\"rgb(199,233,192)\",\"30 - 45\":\"rgb(116,196,118)\",\"45 - 60\":\"rgb(35,139,69)\"}}}", - "version": 1, - "visState": "{\"title\":\"Rendering Test: heatmap\",\"type\":\"heatmap\",\"params\":{\"type\":\"heatmap\",\"addTooltip\":true,\"addLegend\":true,\"enableHover\":false,\"legendPosition\":\"right\",\"times\":[],\"colorsNumber\":4,\"colorSchema\":\"Greens\",\"setColorRange\":false,\"colorsRange\":[],\"invertColors\":false,\"percentageMode\":false,\"valueAxes\":[{\"show\":false,\"id\":\"ValueAxis-1\",\"type\":\"value\",\"scale\":{\"type\":\"linear\",\"defaultYExtents\":false},\"labels\":{\"show\":false,\"rotate\":0,\"overwriteColor\":false,\"color\":\"#555\"}}]},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"segment\",\"params\":{\"field\":\"bytes\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\"}},{\"id\":\"3\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"group\",\"params\":{\"field\":\"geo.src\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\"}}]}" - } - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "visualization:e2023110-3dcb-11e8-8660-4d65aa086b3c", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "migrationVersion": { - "visualization": "7.14.0" - }, - "references": [ - { - "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", - "name": "kibanaSavedObjectMeta.searchSourceJSON.index", - "type": "index-pattern" - } - ], - "type": "visualization", - "updated_at": "2018-04-17T15:06:32.135Z", - "visualization": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"filter\":[],\"query\":{\"language\":\"lucene\",\"query\":\"\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" - }, - "title": "Rendering Test: guage", - "uiStateJSON": "{\"vis\":{\"colors\":{\"0 - 50000\":\"#EF843C\",\"75000 - 10000000\":\"#3F6833\"},\"defaultColors\":{\"0 - 5000000\":\"rgb(0,104,55)\",\"50000000 - 74998990099\":\"rgb(165,0,38)\"}}}", - "version": 1, - "visState": "{\"title\":\"Rendering Test: guage\",\"type\":\"gauge\",\"params\":{\"addLegend\":true,\"addTooltip\":true,\"gauge\":{\"backStyle\":\"Full\",\"colorSchema\":\"Green to Red\",\"colorsRange\":[{\"from\":0,\"to\":5000000},{\"from\":50000000,\"to\":74998990099}],\"extendRange\":true,\"gaugeColorMode\":\"Labels\",\"gaugeStyle\":\"Full\",\"gaugeType\":\"Arc\",\"invertColors\":false,\"labels\":{\"color\":\"black\",\"show\":true},\"orientation\":\"vertical\",\"percentageMode\":false,\"scale\":{\"color\":\"#333\",\"labels\":false,\"show\":true},\"style\":{\"bgColor\":false,\"bgFill\":\"#eee\",\"bgMask\":false,\"bgWidth\":0.9,\"fontSize\":60,\"labelColor\":true,\"mask\":false,\"maskBars\":50,\"subText\":\"\",\"width\":0.9},\"type\":\"meter\",\"alignment\":\"horizontal\"},\"isDisplayWarning\":false,\"type\":\"gauge\"},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"avg\",\"schema\":\"metric\",\"params\":{\"field\":\"machine.ram\"}}]}" - } - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "visualization:b92ae920-3dcc-11e8-8660-4d65aa086b3c", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "migrationVersion": { - "visualization": "7.14.0" - }, - "references": [ - ], - "type": "visualization", - "updated_at": "2018-04-17T15:06:31.110Z", - "visualization": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{}" - }, - "title": "Rendering Test: timelion", - "uiStateJSON": "{}", - "version": 1, - "visState": "{\"title\":\"Rendering Test: timelion\",\"type\":\"timelion\",\"params\":{\"expression\":\".es(*, metric=avg:bytes, split=ip:5)\",\"interval\":\"auto\"},\"aggs\":[]}" - } - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "visualization:e4d8b430-3dcc-11e8-8660-4d65aa086b3c", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "migrationVersion": { - "visualization": "7.14.0" - }, - "references": [ - ], - "type": "visualization", - "updated_at": "2018-04-17T15:06:31.106Z", - "visualization": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{}" - }, - "title": "Rendering Test: tsvb-guage", - "uiStateJSON": "{}", - "version": 1, - "visState": "{\"title\":\"Rendering Test: tsvb-guage\",\"type\":\"metrics\",\"aggs\":[],\"params\":{\"time_range_mode\":\"last_value\",\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\",\"type\":\"gauge\",\"series\":[{\"time_range_mode\":\"entire_time_range\",\"id\":\"61ca57f1-469d-11e7-af02-69e470af7417\",\"color\":\"#68BC00\",\"split_mode\":\"everything\",\"metrics\":[{\"id\":\"61ca57f2-469d-11e7-af02-69e470af7417\",\"type\":\"avg\",\"field\":\"bytes\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"split_color_mode\":\"gradient\"},{\"time_range_mode\":\"entire_time_range\",\"id\":\"d18e5970-3dcc-11e8-a2f6-c162ca6cf6ea\",\"color\":\"rgba(160,70,216,1)\",\"split_mode\":\"filter\",\"metrics\":[{\"id\":\"d18e5971-3dcc-11e8-a2f6-c162ca6cf6ea\",\"type\":\"avg\",\"field\":\"bytes\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"filter\":{\"query\":\"bytes:>1000\",\"language\":\"lucene\"},\"split_color_mode\":\"gradient\"}],\"time_field\":\"@timestamp\",\"index_pattern\":\"logstash-*\",\"interval\":\"auto\",\"axis_position\":\"left\",\"axis_formatter\":\"number\",\"show_legend\":1,\"show_grid\":1,\"background_color_rules\":[{\"id\":\"c50bd5b0-3dcc-11e8-a2f6-c162ca6cf6ea\"}],\"bar_color_rules\":[{\"id\":\"cd25a820-3dcc-11e8-a2f6-c162ca6cf6ea\"}],\"gauge_color_rules\":[{\"id\":\"e0be22e0-3dcc-11e8-a2f6-c162ca6cf6ea\"}],\"gauge_width\":10,\"gauge_inner_width\":10,\"gauge_style\":\"half\",\"use_kibana_indexes\":false,\"hide_last_value_indicator\":true,\"axis_scale\":\"normal\",\"truncate_legend\":1,\"max_lines_legend\":1,\"tooltip_mode\":\"show_all\",\"drop_last_bucket\":1,\"isModelInvalid\":false}}" - } - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "visualization:4c0f47e0-3dcd-11e8-8660-4d65aa086b3c", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "migrationVersion": { - "visualization": "7.14.0" - }, - "references": [ - ], - "type": "visualization", - "updated_at": "2018-04-17T15:06:31.111Z", - "visualization": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{}" - }, - "title": "Rendering Test: markdown", - "uiStateJSON": "{}", - "version": 1, - "visState": "{\"title\":\"Rendering Test: markdown\",\"type\":\"markdown\",\"params\":{\"fontSize\":20,\"openLinksInNewTab\":false,\"markdown\":\"I'm a markdown!\"},\"aggs\":[]}" - } - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "visualization:2d1b1620-3dcd-11e8-8660-4d65aa086b3c", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "migrationVersion": { - "visualization": "7.14.0" - }, - "references": [ - { - "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", - "name": "control_0_index_pattern", - "type": "index-pattern" - }, - { - "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", - "name": "control_1_index_pattern", - "type": "index-pattern" - }, - { - "id": "a0f483a0-3dc9-11e8-8660-4d65aa086b3c", - "name": "control_2_index_pattern", - "type": "index-pattern" - } - ], - "type": "visualization", - "updated_at": "2018-04-17T15:06:31.123Z", - "visualization": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{}" - }, - "title": "Rendering Test: input control", - "uiStateJSON": "{}", - "version": 1, - "visState": "{\"title\":\"Rendering Test: input control\",\"type\":\"input_control_vis\",\"params\":{\"controls\":[{\"id\":\"1523481142694\",\"fieldName\":\"bytes\",\"parent\":\"\",\"label\":\"Bytes Input List\",\"type\":\"list\",\"options\":{\"type\":\"terms\",\"multiselect\":true,\"size\":5,\"order\":\"desc\"},\"indexPatternRefName\":\"control_0_index_pattern\"},{\"id\":\"1523481163654\",\"fieldName\":\"bytes\",\"parent\":\"\",\"label\":\"Bytes range\",\"type\":\"range\",\"options\":{\"decimalPlaces\":0,\"step\":1},\"indexPatternRefName\":\"control_1_index_pattern\"},{\"id\":\"1523481176519\",\"fieldName\":\"sound.keyword\",\"parent\":\"\",\"label\":\"Animal sounds\",\"type\":\"list\",\"options\":{\"type\":\"terms\",\"multiselect\":true,\"size\":5,\"order\":\"desc\"},\"indexPatternRefName\":\"control_2_index_pattern\"}],\"updateFiltersOnChange\":false,\"useTimeFilter\":false,\"pinFilters\":false},\"aggs\":[]}" - } - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "visualization:8bc8d6c0-3e6e-11e8-bbb9-e15942d5d48c", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "migrationVersion": { - "visualization": "7.14.0" - }, - "references": [ - { - "id": "f908c8e0-3e6d-11e8-bbb9-e15942d5d48c", - "name": "kibanaSavedObjectMeta.searchSourceJSON.index", - "type": "index-pattern" - }, - { - "id": "f908c8e0-3e6d-11e8-bbb9-e15942d5d48c", - "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", - "type": "index-pattern" - } - ], - "type": "visualization", - "updated_at": "2018-04-17T15:06:31.173Z", - "visualization": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"filter\":[{\"meta\":{\"negate\":false,\"disabled\":false,\"alias\":null,\"type\":\"phrase\",\"key\":\"size.keyword\",\"value\":\"extra large\",\"params\":{\"query\":\"extra large\",\"type\":\"phrase\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"query\":{\"match\":{\"size.keyword\":{\"query\":\"extra large\",\"type\":\"phrase\"}}},\"$state\":{\"store\":\"appState\"}}],\"query\":{\"language\":\"lucene\",\"query\":\"\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" - }, - "title": "Rendering Test: non timebased line chart - dog data - with filter", - "uiStateJSON": "{}", - "version": 1, - "visState": "{\"aggs\":[{\"enabled\":true,\"id\":\"1\",\"params\":{\"field\":\"trainability\"},\"schema\":\"metric\",\"type\":\"max\"},{\"enabled\":true,\"id\":\"2\",\"params\":{\"field\":\"breed.keyword\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"order\":\"desc\",\"orderBy\":\"1\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"size\":5},\"schema\":\"segment\",\"type\":\"terms\"},{\"enabled\":true,\"id\":\"3\",\"params\":{\"field\":\"barking level\"},\"schema\":\"metric\",\"type\":\"max\"},{\"enabled\":true,\"id\":\"4\",\"params\":{\"field\":\"activity level\"},\"schema\":\"metric\",\"type\":\"max\"}],\"params\":{\"addLegend\":true,\"addTimeMarker\":false,\"addTooltip\":true,\"categoryAxes\":[{\"id\":\"CategoryAxis-1\",\"labels\":{\"show\":true,\"truncate\":100,\"filter\":true},\"position\":\"bottom\",\"scale\":{\"type\":\"linear\"},\"show\":true,\"style\":{},\"title\":{},\"type\":\"category\"}],\"grid\":{\"categoryLines\":false,\"style\":{\"color\":\"#eee\"}},\"legendPosition\":\"right\",\"seriesParams\":[{\"data\":{\"id\":\"1\",\"label\":\"Max trainability\"},\"drawLinesBetweenPoints\":true,\"mode\":\"normal\",\"show\":\"true\",\"showCircles\":true,\"type\":\"line\",\"valueAxis\":\"ValueAxis-1\"},{\"data\":{\"id\":\"3\",\"label\":\"Max barking level\"},\"drawLinesBetweenPoints\":true,\"mode\":\"normal\",\"show\":true,\"showCircles\":true,\"type\":\"line\",\"valueAxis\":\"ValueAxis-1\"},{\"data\":{\"id\":\"4\",\"label\":\"Max activity level\"},\"drawLinesBetweenPoints\":true,\"mode\":\"normal\",\"show\":true,\"showCircles\":true,\"type\":\"line\",\"valueAxis\":\"ValueAxis-1\"}],\"times\":[],\"type\":\"line\",\"valueAxes\":[{\"id\":\"ValueAxis-1\",\"labels\":{\"filter\":false,\"rotate\":0,\"show\":true,\"truncate\":100},\"name\":\"LeftAxis-1\",\"position\":\"left\",\"scale\":{\"mode\":\"normal\",\"type\":\"linear\"},\"show\":true,\"style\":{},\"title\":{\"text\":\"Max trainability\"},\"type\":\"value\"}],\"palette\":{\"type\":\"palette\",\"name\":\"kibana_palette\"},\"isVislibVis\":true,\"detailedTooltip\":true,\"fittingFunction\":\"zero\"},\"title\":\"Rendering Test: non timebased line chart - dog data - with filter\",\"type\":\"line\"}" - } - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "visualization:42535e30-3dcd-11e8-8660-4d65aa086b3c", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "migrationVersion": { - "visualization": "7.14.0" - }, - "references": [ - { - "id": "a0f483a0-3dc9-11e8-8660-4d65aa086b3c", - "name": "control_0_index_pattern", - "type": "index-pattern" - }, - { - "id": "a0f483a0-3dc9-11e8-8660-4d65aa086b3c", - "name": "control_1_index_pattern", - "type": "index-pattern" - } - ], - "type": "visualization", - "updated_at": "2018-04-17T15:06:31.124Z", - "visualization": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{}" - }, - "title": "Rendering Test: input control parent", - "uiStateJSON": "{}", - "version": 1, - "visState": "{\"title\":\"Rendering Test: input control parent\",\"type\":\"input_control_vis\",\"params\":{\"controls\":[{\"id\":\"1523481216736\",\"fieldName\":\"animal.keyword\",\"parent\":\"\",\"label\":\"Animal type\",\"type\":\"list\",\"options\":{\"type\":\"terms\",\"multiselect\":true,\"size\":5,\"order\":\"desc\"},\"indexPatternRefName\":\"control_0_index_pattern\"},{\"id\":\"1523481176519\",\"fieldName\":\"sound.keyword\",\"parent\":\"1523481216736\",\"label\":\"Animal sounds\",\"type\":\"list\",\"options\":{\"type\":\"terms\",\"multiselect\":true,\"size\":5,\"order\":\"desc\"},\"indexPatternRefName\":\"control_1_index_pattern\"}],\"updateFiltersOnChange\":false,\"useTimeFilter\":false,\"pinFilters\":false},\"aggs\":[]}" - } - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "visualization:7fda8ee0-3dcd-11e8-8660-4d65aa086b3c", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "migrationVersion": { - "visualization": "7.14.0" - }, - "references": [ - ], - "type": "visualization", - "updated_at": "2018-04-17T15:06:30.344Z", - "visualization": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{}" - }, - "title": "Rendering Test: vega", - "uiStateJSON": "{}", - "version": 1, - "visState": "{\"title\":\"Rendering Test: vega\",\"type\":\"vega\",\"params\":{\"spec\":\"{\\n/*\\n\\nWelcome to Vega visualizations. Here you can design your own dataviz from scratch using a declarative language called Vega, or its simpler form Vega-Lite. In Vega, you have the full control of what data is loaded, even from multiple sources, how that data is transformed, and what visual elements are used to show it. Use help icon to view Vega examples, tutorials, and other docs. Use the wrench icon to reformat this text, or to remove comments.\\n\\nThis example graph shows the document count in all indexes in the current time range. You might need to adjust the time filter in the upper right corner.\\n*/\\n\\n $schema: https://vega.github.io/schema/vega-lite/v2.json\\n title: Event counts from all indexes\\n\\n // Define the data source\\n data: {\\n url: {\\n/*\\nAn object instead of a string for the \\\"url\\\" param is treated as an Elasticsearch query. Anything inside this object is not part of the Vega language, but only understood by Kibana and Elasticsearch server. This query counts the number of documents per time interval, assuming you have a @timestamp field in your data.\\n\\nKibana has a special handling for the fields surrounded by \\\"%\\\". They are processed before the the query is sent to Elasticsearch. This way the query becomes context aware, and can use the time range and the dashboard filters.\\n*/\\n\\n // Apply dashboard context filters when set\\n %context%: true\\n // Filter the time picker (upper right corner) with this field\\n %timefield%: @timestamp\\n\\n/*\\nSee .search() documentation for : https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-search\\n*/\\n\\n // Which index to search\\n index: _all\\n // Aggregate data by the time field into time buckets, counting the number of documents in each bucket.\\n body: {\\n aggs: {\\n time_buckets: {\\n date_histogram: {\\n // Use date histogram aggregation on @timestamp field\\n field: @timestamp\\n // The interval value will depend on the daterange picker (true), or use an integer to set an approximate bucket count\\n interval: {%autointerval%: true}\\n // Make sure we get an entire range, even if it has no data\\n extended_bounds: {\\n // Use the current time range's start and end\\n min: {%timefilter%: \\\"min\\\"}\\n max: {%timefilter%: \\\"max\\\"}\\n }\\n // Use this for linear (e.g. line, area) graphs. Without it, empty buckets will not show up\\n min_doc_count: 0\\n }\\n }\\n }\\n // Speed up the response by only including aggregation results\\n size: 0\\n }\\n }\\n/*\\nElasticsearch will return results in this format:\\n\\naggregations: {\\n time_buckets: {\\n buckets: [\\n {\\n key_as_string: 2015-11-30T22:00:00.000Z\\n key: 1448920800000\\n doc_count: 0\\n },\\n {\\n key_as_string: 2015-11-30T23:00:00.000Z\\n key: 1448924400000\\n doc_count: 0\\n }\\n ...\\n ]\\n }\\n}\\n\\nFor our graph, we only need the list of bucket values. Use the format.property to discard everything else.\\n*/\\n format: {property: \\\"aggregations.time_buckets.buckets\\\"}\\n }\\n\\n // \\\"mark\\\" is the graphics element used to show our data. Other mark values are: area, bar, circle, line, point, rect, rule, square, text, and tick. See https://vega.github.io/vega-lite/docs/mark.html\\n mark: line\\n\\n // \\\"encoding\\\" tells the \\\"mark\\\" what data to use and in what way. See https://vega.github.io/vega-lite/docs/encoding.html\\n encoding: {\\n x: {\\n // The \\\"key\\\" value is the timestamp in milliseconds. Use it for X axis.\\n field: key\\n type: temporal\\n axis: {title: false} // Customize X axis format\\n }\\n y: {\\n // The \\\"doc_count\\\" is the count per bucket. Use it for Y axis.\\n field: doc_count\\n type: quantitative\\n axis: {title: \\\"Document count\\\"}\\n }\\n }\\n}\\n\"},\"aggs\":[]}" - } - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "visualization:02a2e4e0-3dcd-11e8-8660-4d65aa086b3c", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "migrationVersion": { - "visualization": "7.14.0" - }, - "references": [ - ], - "type": "visualization", - "updated_at": "2018-04-17T15:06:30.351Z", - "visualization": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{}" - }, - "title": "Rendering Test: tsvb-table", - "uiStateJSON": "{}", - "version": 1, - "visState": "{\"title\":\"Rendering Test: tsvb-table\",\"type\":\"metrics\",\"aggs\":[],\"params\":{\"time_range_mode\":\"last_value\",\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\",\"type\":\"table\",\"series\":[{\"time_range_mode\":\"entire_time_range\",\"id\":\"61ca57f1-469d-11e7-af02-69e470af7417\",\"color\":\"#68BC00\",\"split_mode\":\"everything\",\"metrics\":[{\"id\":\"61ca57f2-469d-11e7-af02-69e470af7417\",\"type\":\"avg\",\"field\":\"bytes\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"split_color_mode\":\"gradient\"},{\"time_range_mode\":\"entire_time_range\",\"id\":\"d18e5970-3dcc-11e8-a2f6-c162ca6cf6ea\",\"color\":\"rgba(160,70,216,1)\",\"split_mode\":\"filter\",\"metrics\":[{\"id\":\"d18e5971-3dcc-11e8-a2f6-c162ca6cf6ea\",\"type\":\"avg\",\"field\":\"bytes\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"filter\":{\"query\":\"bytes:>1000\",\"language\":\"lucene\"},\"split_color_mode\":\"gradient\"}],\"time_field\":\"@timestamp\",\"index_pattern\":\"logstash-*\",\"interval\":\"auto\",\"axis_position\":\"left\",\"axis_formatter\":\"number\",\"show_legend\":1,\"show_grid\":1,\"background_color_rules\":[{\"id\":\"c50bd5b0-3dcc-11e8-a2f6-c162ca6cf6ea\"}],\"bar_color_rules\":[{\"id\":\"cd25a820-3dcc-11e8-a2f6-c162ca6cf6ea\"}],\"gauge_color_rules\":[{\"id\":\"e0be22e0-3dcc-11e8-a2f6-c162ca6cf6ea\"}],\"gauge_width\":10,\"gauge_inner_width\":10,\"gauge_style\":\"half\",\"markdown\":\"\\nHi Avg last bytes: {{ average_of_bytes.last.raw }}\",\"pivot_id\":\"bytes\",\"pivot_label\":\"Hello\",\"use_kibana_indexes\":false,\"hide_last_value_indicator\":true,\"axis_scale\":\"normal\",\"truncate_legend\":1,\"max_lines_legend\":1,\"tooltip_mode\":\"show_all\",\"drop_last_bucket\":1,\"isModelInvalid\":false}}" - } - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "visualization:f81134a0-3dcc-11e8-8660-4d65aa086b3c", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "migrationVersion": { - "visualization": "7.14.0" - }, - "references": [ - ], - "type": "visualization", - "updated_at": "2018-04-17T15:06:30.355Z", - "visualization": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{}" - }, - "title": "Rendering Test: tsvb-markdown", - "uiStateJSON": "{}", - "version": 1, - "visState": "{\"title\":\"Rendering Test: tsvb-markdown\",\"type\":\"metrics\",\"aggs\":[],\"params\":{\"time_range_mode\":\"last_value\",\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\",\"type\":\"markdown\",\"series\":[{\"time_range_mode\":\"entire_time_range\",\"id\":\"61ca57f1-469d-11e7-af02-69e470af7417\",\"color\":\"#68BC00\",\"split_mode\":\"everything\",\"metrics\":[{\"id\":\"61ca57f2-469d-11e7-af02-69e470af7417\",\"type\":\"avg\",\"field\":\"bytes\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"split_color_mode\":\"gradient\"},{\"time_range_mode\":\"entire_time_range\",\"id\":\"d18e5970-3dcc-11e8-a2f6-c162ca6cf6ea\",\"color\":\"rgba(160,70,216,1)\",\"split_mode\":\"filter\",\"metrics\":[{\"id\":\"d18e5971-3dcc-11e8-a2f6-c162ca6cf6ea\",\"type\":\"avg\",\"field\":\"bytes\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"filter\":{\"query\":\"bytes:>1000\",\"language\":\"lucene\"},\"split_color_mode\":\"gradient\"}],\"time_field\":\"@timestamp\",\"index_pattern\":\"logstash-*\",\"interval\":\"auto\",\"axis_position\":\"left\",\"axis_formatter\":\"number\",\"show_legend\":1,\"show_grid\":1,\"background_color_rules\":[{\"id\":\"c50bd5b0-3dcc-11e8-a2f6-c162ca6cf6ea\"}],\"bar_color_rules\":[{\"id\":\"cd25a820-3dcc-11e8-a2f6-c162ca6cf6ea\"}],\"gauge_color_rules\":[{\"id\":\"e0be22e0-3dcc-11e8-a2f6-c162ca6cf6ea\"}],\"gauge_width\":10,\"gauge_inner_width\":10,\"gauge_style\":\"half\",\"markdown\":\"\\nHi Avg last bytes: {{ average_of_bytes.last.raw }}\",\"use_kibana_indexes\":false,\"hide_last_value_indicator\":true,\"axis_scale\":\"normal\",\"truncate_legend\":1,\"max_lines_legend\":1,\"tooltip_mode\":\"show_all\",\"drop_last_bucket\":1,\"isModelInvalid\":false}}" - } - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "visualization:df815d20-3dcc-11e8-8660-4d65aa086b3c", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "migrationVersion": { - "visualization": "7.14.0" - }, - "references": [ - ], - "type": "visualization", - "updated_at": "2018-04-17T15:06:30.349Z", - "visualization": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{}" - }, - "title": "Rendering Test: tsvb-topn", - "uiStateJSON": "{}", - "version": 1, - "visState": "{\"title\":\"Rendering Test: tsvb-topn\",\"type\":\"metrics\",\"aggs\":[],\"params\":{\"time_range_mode\":\"last_value\",\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\",\"type\":\"top_n\",\"series\":[{\"time_range_mode\":\"entire_time_range\",\"id\":\"61ca57f1-469d-11e7-af02-69e470af7417\",\"color\":\"#68BC00\",\"split_mode\":\"everything\",\"metrics\":[{\"id\":\"61ca57f2-469d-11e7-af02-69e470af7417\",\"type\":\"avg\",\"field\":\"bytes\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"split_color_mode\":\"gradient\"},{\"time_range_mode\":\"entire_time_range\",\"id\":\"d18e5970-3dcc-11e8-a2f6-c162ca6cf6ea\",\"color\":\"rgba(160,70,216,1)\",\"split_mode\":\"filter\",\"metrics\":[{\"id\":\"d18e5971-3dcc-11e8-a2f6-c162ca6cf6ea\",\"type\":\"avg\",\"field\":\"bytes\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"filter\":{\"query\":\"bytes:>1000\",\"language\":\"lucene\"},\"split_color_mode\":\"gradient\"}],\"time_field\":\"@timestamp\",\"index_pattern\":\"logstash-*\",\"interval\":\"auto\",\"axis_position\":\"left\",\"axis_formatter\":\"number\",\"show_legend\":1,\"show_grid\":1,\"background_color_rules\":[{\"id\":\"c50bd5b0-3dcc-11e8-a2f6-c162ca6cf6ea\"}],\"bar_color_rules\":[{\"id\":\"cd25a820-3dcc-11e8-a2f6-c162ca6cf6ea\"}],\"use_kibana_indexes\":false,\"hide_last_value_indicator\":true,\"axis_scale\":\"normal\",\"truncate_legend\":1,\"max_lines_legend\":1,\"tooltip_mode\":\"show_all\",\"drop_last_bucket\":1,\"isModelInvalid\":false}}" - } - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "visualization:cc43fab0-3dcc-11e8-8660-4d65aa086b3c", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "migrationVersion": { - "visualization": "7.14.0" - }, - "references": [ - ], - "type": "visualization", - "updated_at": "2018-04-17T15:06:30.353Z", - "visualization": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{}" - }, - "title": "Rendering Test: tsvb-metric", - "uiStateJSON": "{}", - "version": 1, - "visState": "{\"title\":\"Rendering Test: tsvb-metric\",\"type\":\"metrics\",\"aggs\":[],\"params\":{\"time_range_mode\":\"last_value\",\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\",\"type\":\"metric\",\"series\":[{\"time_range_mode\":\"entire_time_range\",\"id\":\"61ca57f1-469d-11e7-af02-69e470af7417\",\"color\":\"#68BC00\",\"split_mode\":\"everything\",\"metrics\":[{\"id\":\"61ca57f2-469d-11e7-af02-69e470af7417\",\"type\":\"sum_of_squares\",\"field\":\"bytes\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"split_color_mode\":\"gradient\"}],\"time_field\":\"@timestamp\",\"index_pattern\":\"logstash-*\",\"interval\":\"auto\",\"axis_position\":\"left\",\"axis_formatter\":\"number\",\"show_legend\":1,\"show_grid\":1,\"background_color_rules\":[{\"id\":\"c50bd5b0-3dcc-11e8-a2f6-c162ca6cf6ea\"}],\"use_kibana_indexes\":false,\"hide_last_value_indicator\":true,\"axis_scale\":\"normal\",\"truncate_legend\":1,\"max_lines_legend\":1,\"tooltip_mode\":\"show_all\",\"drop_last_bucket\":1,\"isModelInvalid\":false}}" - } - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "visualization:c40f4d40-3dcc-11e8-8660-4d65aa086b3c", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "migrationVersion": { - "visualization": "7.14.0" - }, - "references": [ - ], - "type": "visualization", - "updated_at": "2018-04-17T15:06:30.347Z", - "visualization": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{}" - }, - "title": "Rendering Test: tsvb-ts", - "uiStateJSON": "{}", - "version": 1, - "visState": "{\"title\":\"Rendering Test: tsvb-ts\",\"type\":\"metrics\",\"params\":{\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\",\"type\":\"timeseries\",\"series\":[{\"id\":\"61ca57f1-469d-11e7-af02-69e470af7417\",\"color\":\"#68BC00\",\"split_mode\":\"everything\",\"metrics\":[{\"id\":\"61ca57f2-469d-11e7-af02-69e470af7417\",\"type\":\"count\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"split_color_mode\":\"gradient\"}],\"time_field\":\"@timestamp\",\"index_pattern\":\"\",\"interval\":\"auto\",\"axis_position\":\"left\",\"axis_formatter\":\"number\",\"show_legend\":1,\"show_grid\":1,\"use_kibana_indexes\":false},\"aggs\":[]}" - } - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "visualization:ffa2e0c0-3dcb-11e8-8660-4d65aa086b3c", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "migrationVersion": { - "visualization": "7.14.0" - }, - "references": [ - { - "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", - "name": "kibanaSavedObjectMeta.searchSourceJSON.index", - "type": "index-pattern" - } - ], - "type": "visualization", - "updated_at": "2018-04-17T15:06:33.153Z", - "visualization": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" - }, - "title": "Rendering Test: goal", - "uiStateJSON": "{\"vis\":{\"defaultColors\":{\"0 - 100\":\"rgb(0,104,55)\"}}}", - "version": 1, - "visState": "{\"title\":\"Rendering Test: goal\",\"type\":\"goal\",\"params\":{\"addTooltip\":true,\"addLegend\":false,\"isDisplayWarning\":false,\"type\":\"gauge\",\"gauge\":{\"verticalSplit\":false,\"autoExtend\":false,\"percentageMode\":true,\"gaugeType\":\"Arc\",\"gaugeStyle\":\"Full\",\"backStyle\":\"Full\",\"orientation\":\"vertical\",\"useRanges\":false,\"colorSchema\":\"Green to Red\",\"gaugeColorMode\":\"None\",\"colorsRange\":[{\"from\":0,\"to\":4000}],\"invertColors\":false,\"labels\":{\"show\":true,\"color\":\"black\"},\"scale\":{\"show\":false,\"labels\":false,\"color\":\"#333\",\"width\":2},\"type\":\"meter\",\"style\":{\"bgFill\":\"#000\",\"bgColor\":false,\"labelColor\":false,\"subText\":\"\",\"fontSize\":60}}},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"group\",\"params\":{\"field\":\"geo.src\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"size\":2,\"order\":\"desc\",\"orderBy\":\"1\"}}]}" - } - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "visualization:4b5d6ef0-3dcb-11e8-8660-4d65aa086b3c", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "migrationVersion": { - "visualization": "7.14.0" - }, - "references": [ - { - "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", - "name": "kibanaSavedObjectMeta.searchSourceJSON.index", - "type": "index-pattern" - } - ], - "type": "visualization", - "updated_at": "2018-04-17T15:06:33.162Z", - "visualization": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" - }, - "title": "Rendering Test: datatable", - "uiStateJSON": "{\"vis\":{\"params\":{\"sort\":{\"columnIndex\":null,\"direction\":null}}}}", - "version": 1, - "visState": "{\"title\":\"Rendering Test: datatable\",\"type\":\"table\",\"params\":{\"perPage\":10,\"showPartialRows\":false,\"showMeticsAtAllLevels\":false,\"sort\":{\"columnIndex\":null,\"direction\":null},\"showTotal\":false,\"totalFunc\":\"sum\",\"showToolbar\":true},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"bucket\",\"params\":{\"field\":\"clientip\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\"}}]}" - } - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "visualization:3525b840-3dcb-11e8-8660-4d65aa086b3c", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "migrationVersion": { - "visualization": "7.14.0" - }, - "references": [ - { - "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", - "name": "kibanaSavedObjectMeta.searchSourceJSON.index", - "type": "index-pattern" - } - ], - "type": "visualization", - "updated_at": "2018-04-17T15:06:33.163Z", - "visualization": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" - }, - "title": "Rendering Test: bar", - "uiStateJSON": "{}", - "version": 1, - "visState": "{\"title\":\"Rendering Test: bar\",\"type\":\"horizontal_bar\",\"params\":{\"type\":\"histogram\",\"grid\":{\"categoryLines\":false,\"style\":{\"color\":\"#eee\"}},\"categoryAxes\":[{\"id\":\"CategoryAxis-1\",\"type\":\"category\",\"position\":\"left\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\"},\"labels\":{\"show\":true,\"rotate\":0,\"filter\":false,\"truncate\":200},\"title\":{}}],\"valueAxes\":[{\"id\":\"ValueAxis-1\",\"name\":\"LeftAxis-1\",\"type\":\"value\",\"position\":\"bottom\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\",\"mode\":\"normal\"},\"labels\":{\"show\":true,\"rotate\":75,\"filter\":true,\"truncate\":100},\"title\":{\"text\":\"Count\"}}],\"seriesParams\":[{\"show\":true,\"type\":\"histogram\",\"mode\":\"normal\",\"data\":{\"label\":\"Count\",\"id\":\"1\"},\"valueAxis\":\"ValueAxis-1\",\"drawLinesBetweenPoints\":true,\"showCircles\":true}],\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"times\":[],\"addTimeMarker\":false,\"palette\":{\"type\":\"palette\",\"name\":\"kibana_palette\"},\"isVislibVis\":true,\"detailedTooltip\":true},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"date_histogram\",\"schema\":\"segment\",\"params\":{\"field\":\"@timestamp\",\"interval\":\"auto\",\"min_doc_count\":1,\"extended_bounds\":{}}},{\"id\":\"3\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"group\",\"params\":{\"field\":\"geo.src\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"size\":3,\"order\":\"desc\",\"orderBy\":\"1\"}}]}" - } - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "visualization:e6140540-3dca-11e8-8660-4d65aa086b3c", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "migrationVersion": { - "visualization": "7.14.0" - }, - "references": [ - { - "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", - "name": "kibanaSavedObjectMeta.searchSourceJSON.index", - "type": "index-pattern" - }, - { - "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", - "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", - "type": "index-pattern" - } - ], - "type": "visualization", - "updated_at": "2018-04-17T15:06:33.165Z", - "visualization": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"filter\":[{\"meta\":{\"negate\":true,\"disabled\":false,\"alias\":null,\"type\":\"phrase\",\"key\":\"geo.src\",\"value\":\"CN\",\"params\":{\"query\":\"CN\",\"type\":\"phrase\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"query\":{\"match\":{\"geo.src\":{\"query\":\"CN\",\"type\":\"phrase\"}}},\"$state\":{\"store\":\"appState\"}}],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" - }, - "title": "Rendering Test: area with not filter", - "uiStateJSON": "{}", - "version": 1, - "visState": "{\"title\":\"Rendering Test: area with not filter\",\"type\":\"area\",\"params\":{\"type\":\"area\",\"grid\":{\"categoryLines\":false,\"style\":{\"color\":\"#eee\"}},\"categoryAxes\":[{\"id\":\"CategoryAxis-1\",\"type\":\"category\",\"position\":\"bottom\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\"},\"labels\":{\"show\":true,\"truncate\":100,\"filter\":true},\"title\":{}}],\"valueAxes\":[{\"id\":\"ValueAxis-1\",\"name\":\"LeftAxis-1\",\"type\":\"value\",\"position\":\"left\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\",\"mode\":\"normal\"},\"labels\":{\"show\":true,\"rotate\":0,\"filter\":false,\"truncate\":100},\"title\":{\"text\":\"Count\"}}],\"seriesParams\":[{\"show\":\"true\",\"type\":\"area\",\"mode\":\"stacked\",\"data\":{\"label\":\"Count\",\"id\":\"1\"},\"drawLinesBetweenPoints\":true,\"showCircles\":true,\"interpolate\":\"linear\",\"valueAxis\":\"ValueAxis-1\"}],\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"times\":[],\"addTimeMarker\":false,\"palette\":{\"type\":\"palette\",\"name\":\"kibana_palette\"},\"isVislibVis\":true,\"detailedTooltip\":true,\"fittingFunction\":\"zero\"},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"date_histogram\",\"schema\":\"segment\",\"params\":{\"field\":\"@timestamp\",\"interval\":\"auto\",\"min_doc_count\":1,\"extended_bounds\":{}}},{\"id\":\"3\",\"enabled\":true,\"type\":\"filters\",\"schema\":\"group\",\"params\":{\"filters\":[{\"input\":{\"query\":\"bytes:>1000\",\"language\":\"lucene\"},\"label\":\"\"},{\"input\":{\"query\":\"bytes:>10\",\"language\":\"lucene\"}}]}}]}" - } - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "visualization:4c0c3f90-3e5a-11e8-9fc3-39e49624228e", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "migrationVersion": { - "visualization": "7.14.0" - }, - "references": [ - { - "id": "a0f483a0-3dc9-11e8-8660-4d65aa086b3c", - "name": "kibanaSavedObjectMeta.searchSourceJSON.index", - "type": "index-pattern" - }, - { - "id": "a0f483a0-3dc9-11e8-8660-4d65aa086b3c", - "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", - "type": "index-pattern" - } - ], - "type": "visualization", - "updated_at": "2018-04-17T15:06:33.166Z", - "visualization": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"filter\":[{\"meta\":{\"field\":\"isDog\",\"negate\":false,\"disabled\":false,\"alias\":null,\"type\":\"phrase\",\"key\":\"isDog\",\"value\":\"true\",\"params\":{\"value\":true},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"script\":{\"script\":{\"inline\":\"boolean compare(Supplier s, def v) {return s.get() == v;}compare(() -> { return doc['animal.keyword'].value == 'dog' }, params.value);\",\"lang\":\"painless\",\"params\":{\"value\":true}}},\"$state\":{\"store\":\"appState\"}}],\"query\":{\"query\":\"weightLbs:>40\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" - }, - "title": "Rendering Test: scripted filter and query", - "uiStateJSON": "{}", - "version": 1, - "visState": "{\"title\":\"Rendering Test: scripted filter and query\",\"type\":\"pie\",\"params\":{\"type\":\"pie\",\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"isDonut\":true,\"labels\":{\"show\":false,\"values\":true,\"last_level\":true,\"truncate\":100},\"palette\":{\"type\":\"palette\",\"name\":\"kibana_palette\"},\"distinctColors\":true},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"segment\",\"params\":{\"field\":\"sound.keyword\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\"}}]}" - } - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "visualization:50643b60-3dd3-11e8-b2b9-5d5dc1715159", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "migrationVersion": { - "visualization": "7.14.0" - }, - "references": [ - { - "id": "a0f483a0-3dc9-11e8-8660-4d65aa086b3c", - "name": "kibanaSavedObjectMeta.searchSourceJSON.index", - "type": "index-pattern" - } - ], - "type": "visualization", - "updated_at": "2018-04-17T15:06:34.195Z", - "visualization": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" - }, - "title": "Rendering Test: animal sounds pie", - "uiStateJSON": "{}", - "version": 1, - "visState": "{\"title\":\"Rendering Test: animal sounds pie\",\"type\":\"pie\",\"params\":{\"type\":\"pie\",\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"isDonut\":true,\"labels\":{\"show\":false,\"values\":true,\"last_level\":true,\"truncate\":100},\"palette\":{\"type\":\"palette\",\"name\":\"kibana_palette\"},\"distinctColors\":true},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"segment\",\"params\":{\"field\":\"sound.keyword\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\"}}]}" - } - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "visualization:771b4f10-3e59-11e8-9fc3-39e49624228e", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "migrationVersion": { - "visualization": "7.14.0" - }, - "references": [ - { - "id": "a16d1990-3dca-11e8-8660-4d65aa086b3c", - "name": "search_0", - "type": "search" - } - ], - "type": "visualization", - "updated_at": "2018-04-17T15:06:34.200Z", - "visualization": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"}}" - }, - "savedSearchRefName": "search_0", - "title": "Rendering Test: animal weights linked to search", - "uiStateJSON": "{}", - "version": 1, - "visState": "{\"title\":\"Rendering Test: animal weights linked to search\",\"type\":\"pie\",\"params\":{\"type\":\"pie\",\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"isDonut\":true,\"labels\":{\"show\":false,\"values\":true,\"last_level\":true,\"truncate\":100},\"palette\":{\"type\":\"palette\",\"name\":\"kibana_palette\"},\"distinctColors\":true},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"segment\",\"params\":{\"field\":\"name.keyword\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\"}}]}" - } - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "visualization:76c7f020-4194-11e8-bb13-d53698fb349a", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "migrationVersion": { - "visualization": "7.14.0" - }, - "references": [ - ], - "type": "visualization", - "updated_at": "2018-04-17T15:06:34.583Z", - "visualization": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{}" - }, - "title": "Filter Bytes Test: tsvb top n with bytes filter", - "uiStateJSON": "{}", - "version": 1, - "visState":"{\"title\":\"Filter Bytes Test: tsvb top n with bytes filter\",\"type\":\"metrics\",\"aggs\":[],\"params\":{\"time_range_mode\":\"last_value\",\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\",\"type\":\"top_n\",\"series\":[{\"time_range_mode\":\"entire_time_range\",\"id\":\"61ca57f1-469d-11e7-af02-69e470af7417\",\"color\":\"#68BC00\",\"split_mode\":\"filters\",\"metrics\":[{\"id\":\"482d6560-4194-11e8-a461-7d278185cba4\",\"type\":\"avg\",\"field\":\"bytes\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"terms_field\":\"clientip\",\"filter\":{\"query\":\"Filter Bytes Test:>1000\",\"language\":\"lucene\"},\"override_index_pattern\":0,\"series_index_pattern\":\"logstash-*\",\"series_time_field\":\"utc_time\",\"series_interval\":\"1m\",\"value_template\":\"\",\"split_filters\":[{\"filter\":{\"query\":\"Filter Bytes Test:>100\",\"language\":\"lucene\"},\"label\":\"\",\"color\":\"#68BC00\",\"id\":\"39a107e0-4194-11e8-a461-7d278185cba4\"}],\"split_color_mode\":\"gradient\"},{\"time_range_mode\":\"entire_time_range\",\"id\":\"4fd5b150-4194-11e8-a461-7d278185cba4\",\"color\":\"#68BC00\",\"split_mode\":\"everything\",\"metrics\":[{\"id\":\"4fd5b151-4194-11e8-a461-7d278185cba4\",\"type\":\"avg\",\"field\":\"bytes\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"filter\":{\"query\":\"Filter Bytes Test:>3000\",\"language\":\"lucene\"},\"split_color_mode\":\"gradient\"}],\"time_field\":\"@timestamp\",\"index_pattern\":\"logstash-*\",\"interval\":\"auto\",\"axis_position\":\"left\",\"axis_formatter\":\"number\",\"show_legend\":1,\"show_grid\":1,\"background_color_rules\":[{\"id\":\"06893260-4194-11e8-a461-7d278185cba4\"}],\"bar_color_rules\":[{\"id\":\"36a0e740-4194-11e8-a461-7d278185cba4\"}],\"use_kibana_indexes\":false,\"hide_last_value_indicator\":true,\"axis_scale\":\"normal\",\"truncate_legend\":1,\"max_lines_legend\":1,\"tooltip_mode\":\"show_all\",\"drop_last_bucket\":1,\"isModelInvalid\":false}}" - } - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "visualization:0ca8c600-4195-11e8-bb13-d53698fb349a", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "migrationVersion": { - "visualization": "7.14.0" - }, - "references": [ - { - "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", - "name": "control_0_index_pattern", - "type": "index-pattern" - } - ], - "type": "visualization", - "updated_at": "2018-04-17T15:06:35.229Z", - "visualization": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{}" - }, - "title": "Filter Bytes Test: input control with filter", - "uiStateJSON": "{}", - "version": 1, - "visState": "{\"title\":\"Filter Bytes Test: input control with filter\",\"type\":\"input_control_vis\",\"params\":{\"controls\":[{\"id\":\"1523896850250\",\"fieldName\":\"bytes\",\"parent\":\"\",\"label\":\"Byte Options\",\"type\":\"list\",\"options\":{\"type\":\"terms\",\"multiselect\":true,\"size\":10,\"order\":\"desc\"},\"indexPatternRefName\":\"control_0_index_pattern\"}],\"updateFiltersOnChange\":false,\"useTimeFilter\":false,\"pinFilters\":false},\"aggs\":[]}" - } - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "visualization:039e4770-4194-11e8-bb13-d53698fb349a", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "migrationVersion": { - "visualization": "7.14.0" - }, - "references": [ - ], - "type": "visualization", - "updated_at": "2018-04-17T15:06:35.220Z", - "visualization": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{}" - }, - "title": "Filter Bytes Test: tsvb time series with bytes filter split by clientip", - "uiStateJSON": "{}", - "version": 1, - "visState":"{\"title\":\"Filter Bytes Test: tsvb time series with bytes filter split by clientip\",\"type\":\"metrics\",\"aggs\":[],\"params\":{\"time_range_mode\":\"entire_time_range\",\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\",\"type\":\"timeseries\",\"series\":[{\"time_range_mode\":\"entire_time_range\",\"id\":\"61ca57f1-469d-11e7-af02-69e470af7417\",\"color\":\"#68BC00\",\"split_mode\":\"terms\",\"metrics\":[{\"value\":\"\",\"id\":\"61ca57f2-469d-11e7-af02-69e470af7417\",\"type\":\"sum\",\"field\":\"bytes\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"terms_field\":\"clientip\",\"filter\":{\"query\":\"Filter Bytes Test:>1000\",\"language\":\"lucene\"},\"split_color_mode\":\"gradient\"}],\"time_field\":\"@timestamp\",\"index_pattern\":\"logstash-*\",\"interval\":\"auto\",\"axis_position\":\"left\",\"axis_formatter\":\"number\",\"show_legend\":1,\"show_grid\":1,\"use_kibana_indexes\":false,\"axis_scale\":\"normal\",\"truncate_legend\":1,\"max_lines_legend\":1,\"tooltip_mode\":\"show_all\",\"drop_last_bucket\":1,\"isModelInvalid\":false}}" - } - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "visualization:760a9060-4190-11e8-bb13-d53698fb349a", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "migrationVersion": { - "visualization": "7.14.0" - }, - "references": [ - { - "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", - "name": "kibanaSavedObjectMeta.searchSourceJSON.index", - "type": "index-pattern" - }, - { - "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", - "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", - "type": "index-pattern" - } - ], - "type": "visualization", - "updated_at": "2018-04-17T15:06:35.235Z", - "visualization": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"filter\":[{\"meta\":{\"negate\":false,\"disabled\":false,\"alias\":null,\"type\":\"phrase\",\"key\":\"geo.src\",\"value\":\"US\",\"params\":{\"query\":\"US\",\"type\":\"phrase\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"query\":{\"match\":{\"geo.src\":{\"query\":\"US\",\"type\":\"phrase\"}}},\"$state\":{\"store\":\"appState\"}}],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" - }, - "title": "Filter Bytes Test: max bytes in US - area chart with filter", - "uiStateJSON": "{}", - "version": 1, - "visState": "{\"title\":\"Filter Bytes Test: max bytes in US - area chart with filter\",\"type\":\"area\",\"params\":{\"type\":\"area\",\"grid\":{\"categoryLines\":false,\"style\":{\"color\":\"#eee\"}},\"categoryAxes\":[{\"id\":\"CategoryAxis-1\",\"type\":\"category\",\"position\":\"bottom\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\"},\"labels\":{\"show\":true,\"truncate\":100,\"filter\":true},\"title\":{}}],\"valueAxes\":[{\"id\":\"ValueAxis-1\",\"name\":\"LeftAxis-1\",\"type\":\"value\",\"position\":\"left\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\",\"mode\":\"normal\"},\"labels\":{\"show\":true,\"rotate\":0,\"filter\":false,\"truncate\":100},\"title\":{\"text\":\"Max bytes\"}}],\"seriesParams\":[{\"show\":\"true\",\"type\":\"area\",\"mode\":\"stacked\",\"data\":{\"label\":\"Max bytes\",\"id\":\"1\"},\"drawLinesBetweenPoints\":true,\"showCircles\":true,\"interpolate\":\"linear\",\"valueAxis\":\"ValueAxis-1\"}],\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"times\":[],\"addTimeMarker\":false,\"palette\":{\"type\":\"palette\",\"name\":\"kibana_palette\"},\"isVislibVis\":true,\"detailedTooltip\":true,\"fittingFunction\":\"zero\"},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"max\",\"schema\":\"metric\",\"params\":{\"field\":\"bytes\"}},{\"id\":\"2\",\"enabled\":true,\"type\":\"date_histogram\",\"schema\":\"segment\",\"params\":{\"field\":\"@timestamp\",\"interval\":\"auto\",\"min_doc_count\":1,\"extended_bounds\":{}}}]}" - } - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "visualization:b3e70d00-4190-11e8-bb13-d53698fb349a", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "migrationVersion": { - "visualization": "7.14.0" - }, - "references": [ - { - "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", - "name": "kibanaSavedObjectMeta.searchSourceJSON.index", - "type": "index-pattern" - } - ], - "type": "visualization", - "updated_at": "2018-04-17T15:06:35.236Z", - "visualization": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" - }, - "title": "Filter Bytes Test: standard deviation heatmap with other bucket", - "uiStateJSON": "{\"vis\":{\"defaultColors\":{\"-4,000 - 1,000\":\"rgb(247,252,245)\",\"1,000 - 6,000\":\"rgb(199,233,192)\",\"6,000 - 11,000\":\"rgb(116,196,118)\",\"11,000 - 16,000\":\"rgb(35,139,69)\"}}}", - "version": 1, - "visState": "{\"title\":\"Filter Bytes Test: standard deviation heatmap with other bucket\",\"type\":\"heatmap\",\"params\":{\"type\":\"heatmap\",\"addTooltip\":true,\"addLegend\":true,\"enableHover\":false,\"legendPosition\":\"right\",\"times\":[],\"colorsNumber\":4,\"colorSchema\":\"Greens\",\"setColorRange\":false,\"colorsRange\":[],\"invertColors\":false,\"percentageMode\":false,\"valueAxes\":[{\"show\":false,\"id\":\"ValueAxis-1\",\"type\":\"value\",\"scale\":{\"type\":\"linear\",\"defaultYExtents\":false},\"labels\":{\"show\":false,\"rotate\":0,\"overwriteColor\":false,\"color\":\"#555\"}}]},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"std_dev\",\"schema\":\"metric\",\"params\":{\"field\":\"bytes\"}},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"segment\",\"params\":{\"field\":\"geo.src\",\"otherBucket\":true,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"size\":10,\"order\":\"desc\",\"orderBy\":\"_term\"}}]}" - } - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "visualization:c10c6b00-4191-11e8-bb13-d53698fb349a", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "migrationVersion": { - "visualization": "7.14.0" - }, - "references": [ - { - "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", - "name": "kibanaSavedObjectMeta.searchSourceJSON.index", - "type": "index-pattern" - } - ], - "type": "visualization", - "updated_at": "2018-04-17T15:06:36.267Z", - "visualization": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" - }, - "title": "Filter Bytes Test: max bytes guage percent mode", - "uiStateJSON": "{\"vis\":{\"defaultColors\":{\"0 - 1\":\"rgb(0,104,55)\",\"1 - 15\":\"rgb(255,255,190)\",\"15 - 100\":\"rgb(165,0,38)\"}}}", - "version": 1, - "visState": "{\"title\":\"Filter Bytes Test: max bytes guage percent mode\",\"type\":\"gauge\",\"params\":{\"type\":\"gauge\",\"addTooltip\":true,\"addLegend\":true,\"isDisplayWarning\":false,\"gauge\":{\"extendRange\":true,\"percentageMode\":true,\"gaugeType\":\"Arc\",\"gaugeStyle\":\"Full\",\"backStyle\":\"Full\",\"orientation\":\"vertical\",\"colorSchema\":\"Green to Red\",\"gaugeColorMode\":\"Labels\",\"colorsRange\":[{\"from\":0,\"to\":500},{\"from\":500,\"to\":7500},{\"from\":7500,\"to\":50000}],\"invertColors\":false,\"labels\":{\"show\":true,\"color\":\"black\"},\"scale\":{\"show\":true,\"labels\":false,\"color\":\"#333\"},\"type\":\"meter\",\"style\":{\"bgWidth\":0.9,\"width\":0.9,\"mask\":false,\"bgMask\":false,\"maskBars\":50,\"bgFill\":\"#eee\",\"bgColor\":false,\"subText\":\"Im subtext\",\"fontSize\":60,\"labelColor\":true},\"alignment\":\"horizontal\"}},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"max\",\"schema\":\"metric\",\"params\":{\"field\":\"bytes\"}}]}" - } - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "visualization:03d2afd0-4192-11e8-bb13-d53698fb349a", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "migrationVersion": { - "visualization": "7.14.0" - }, - "references": [ - { - "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", - "name": "kibanaSavedObjectMeta.searchSourceJSON.index", - "type": "index-pattern" - } - ], - "type": "visualization", - "updated_at": "2018-04-17T15:06:36.269Z", - "visualization": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" - }, - "title": "Filter Bytes Test: Goal unique count", - "uiStateJSON": "{\"vis\":{\"defaultColors\":{\"0 - 10000\":\"rgb(0,104,55)\"}}}", - "version": 1, - "visState": "{\"title\":\"Filter Bytes Test: Goal unique count\",\"type\":\"goal\",\"params\":{\"addTooltip\":true,\"addLegend\":false,\"isDisplayWarning\":false,\"type\":\"gauge\",\"gauge\":{\"verticalSplit\":false,\"autoExtend\":false,\"percentageMode\":false,\"gaugeType\":\"Arc\",\"gaugeStyle\":\"Full\",\"backStyle\":\"Full\",\"orientation\":\"vertical\",\"useRanges\":false,\"colorSchema\":\"Green to Red\",\"gaugeColorMode\":\"None\",\"colorsRange\":[{\"from\":0,\"to\":10000}],\"invertColors\":false,\"labels\":{\"show\":true,\"color\":\"black\"},\"scale\":{\"show\":false,\"labels\":false,\"color\":\"#333\",\"width\":2},\"type\":\"meter\",\"style\":{\"bgFill\":\"#000\",\"bgColor\":false,\"labelColor\":false,\"subText\":\"\",\"fontSize\":60}}},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"cardinality\",\"schema\":\"metric\",\"params\":{\"field\":\"bytes\"}}]}" - } - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "visualization:7ff2c4c0-4191-11e8-bb13-d53698fb349a", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "migrationVersion": { - "visualization": "7.14.0" - }, - "references": [ - { - "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", - "name": "kibanaSavedObjectMeta.searchSourceJSON.index", - "type": "index-pattern" - } - ], - "type": "visualization", - "updated_at": "2018-04-17T15:06:36.270Z", - "visualization": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" - }, - "title": "Filter Bytes Test: Data table top hit with significant terms geo.src", - "uiStateJSON": "{\"vis\":{\"params\":{\"sort\":{\"columnIndex\":null,\"direction\":null}}}}", - "version": 1, - "visState": "{\"title\":\"Filter Bytes Test: Data table top hit with significant terms geo.src\",\"type\":\"table\",\"params\":{\"perPage\":10,\"showPartialRows\":false,\"showMeticsAtAllLevels\":false,\"sort\":{\"columnIndex\":null,\"direction\":null},\"showTotal\":false,\"totalFunc\":\"sum\",\"showToolbar\":true},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"top_hits\",\"schema\":\"metric\",\"params\":{\"field\":\"bytes\",\"aggregate\":\"average\",\"size\":1,\"sortField\":\"@timestamp\",\"sortOrder\":\"desc\"}},{\"id\":\"2\",\"enabled\":true,\"type\":\"significant_terms\",\"schema\":\"bucket\",\"params\":{\"field\":\"geo.src\",\"size\":10}}]}" - } - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "visualization:df72ad40-4194-11e8-bb13-d53698fb349a", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "migrationVersion": { - "visualization": "7.14.0" - }, - "references": [ - { - "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", - "name": "kibanaSavedObjectMeta.searchSourceJSON.index", - "type": "index-pattern" - }, - { - "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", - "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", - "type": "index-pattern" - } - ], - "type": "visualization", - "updated_at": "2018-04-17T15:06:36.276Z", - "visualization": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"filter\":[{\"meta\":{\"negate\":true,\"disabled\":false,\"alias\":null,\"type\":\"phrase\",\"key\":\"bytes\",\"value\":\"0\",\"params\":{\"query\":0,\"type\":\"phrase\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"query\":{\"match\":{\"bytes\":{\"query\":0,\"type\":\"phrase\"}}},\"$state\":{\"store\":\"appState\"}}],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" - }, - "title": "Filter Bytes Test: tag cloud with not 0 bytes filter", - "uiStateJSON": "{}", - "version": 1, - "visState": "{\"title\":\"Filter Bytes Test: tag cloud with not 0 bytes filter\",\"type\":\"tagcloud\",\"params\":{\"scale\":\"linear\",\"orientation\":\"single\",\"minFontSize\":18,\"maxFontSize\":72,\"showLabel\":true},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"segment\",\"params\":{\"field\":\"bytes\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\"}}]}" - } - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "search:be5accf0-3dca-11e8-8660-4d65aa086b3c", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "migrationVersion": { - "search": "7.9.3" - }, - "references": [ - { - "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", - "name": "kibanaSavedObjectMeta.searchSourceJSON.index", - "type": "index-pattern" - } - ], - "search": { - "columns": [ - "agent", - "bytes", - "clientip" - ], - "description": "", - "hits": 0, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"highlightAll\":true,\"version\":true,\"query\":{\"language\":\"lucene\",\"query\":\"\"},\"filter\":[],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" - }, - "sort": [ - [ - "@timestamp", - "desc" - ] - ], - "title": "Rendering Test: saved search", - "version": 1 - }, - "type": "search", - "updated_at": "2018-04-17T15:09:39.805Z" - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "search:ca5ada40-3dca-11e8-8660-4d65aa086b3c", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "migrationVersion": { - "search": "7.9.3" - }, - "references": [ - { - "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", - "name": "kibanaSavedObjectMeta.searchSourceJSON.index", - "type": "index-pattern" - }, - { - "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", - "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", - "type": "index-pattern" - } - ], - "search": { - "columns": [ - "agent", - "bytes", - "clientip" - ], - "description": "", - "hits": 0, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"highlightAll\":true,\"version\":true,\"query\":{\"language\":\"lucene\",\"query\":\"\"},\"filter\":[{\"meta\":{\"negate\":false,\"type\":\"phrase\",\"key\":\"bytes\",\"value\":\"1,607\",\"params\":{\"query\":1607,\"type\":\"phrase\"},\"disabled\":false,\"alias\":null,\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"query\":{\"match\":{\"bytes\":{\"query\":1607,\"type\":\"phrase\"}}},\"$state\":{\"store\":\"appState\"}}],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" - }, - "sort": [ - [ - "@timestamp", - "desc" - ] - ], - "title": "Filter Bytes Test: search with filter", - "version": 1 - }, - "type": "search", - "updated_at": "2018-04-17T15:09:55.976Z" - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "visualization:9bebe980-4192-11e8-bb13-d53698fb349a", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "migrationVersion": { - "visualization": "7.14.0" - }, - "references": [ - ], - "type": "visualization", - "updated_at": "2018-04-17T15:59:42.648Z", - "visualization": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{}" - }, - "title": "Filter Bytes Test: timelion split 5 on bytes", - "uiStateJSON": "{}", - "version": 1, - "visState": "{\"title\":\"Filter Bytes Test: timelion split 5 on bytes\",\"type\":\"timelion\",\"params\":{\"expression\":\".es(*, split=bytes:5)\",\"interval\":\"auto\"},\"aggs\":[]}" - } - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "visualization:1dcdfe30-4192-11e8-bb13-d53698fb349a", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "migrationVersion": { - "visualization": "7.14.0" - }, - "references": [ - { - "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", - "name": "kibanaSavedObjectMeta.searchSourceJSON.index", - "type": "index-pattern" - } - ], - "type": "visualization", - "updated_at": "2018-04-17T15:59:56.976Z", - "visualization": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"bytes:>100\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" - }, - "title": "Filter Bytes Test: min bytes metric with query", - "uiStateJSON": "{}", - "version": 1, - "visState": "{\"title\":\"Filter Bytes Test: min bytes metric with query\",\"type\":\"metric\",\"params\":{\"addTooltip\":true,\"addLegend\":false,\"type\":\"metric\",\"metric\":{\"percentageMode\":false,\"useRanges\":false,\"colorSchema\":\"Green to Red\",\"metricColorMode\":\"None\",\"colorsRange\":[{\"from\":0,\"to\":10000}],\"labels\":{\"show\":true},\"invertColors\":false,\"style\":{\"bgFill\":\"#000\",\"bgColor\":false,\"labelColor\":false,\"subText\":\"\",\"fontSize\":60}}},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"min\",\"schema\":\"metric\",\"params\":{\"field\":\"bytes\"}}]}" - } - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "visualization:35417e50-4194-11e8-bb13-d53698fb349a", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "migrationVersion": { - "visualization": "7.14.0" - }, - "references": [ - ], - "type": "visualization", - "updated_at": "2018-04-17T16:06:03.785Z", - "visualization": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{}" - }, - "title": "Filter Bytes Test: tsvb metric with custom interval and bytes filter", - "uiStateJSON": "{}", - "version": 1, - "visState":"{\"title\":\"Filter Bytes Test: tsvb metric with custom interval and bytes filter\",\"type\":\"metrics\",\"aggs\":[],\"params\":{\"time_range_mode\":\"last_value\",\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\",\"type\":\"metric\",\"series\":[{\"time_range_mode\":\"last_value\",\"id\":\"61ca57f1-469d-11e7-af02-69e470af7417\",\"color\":\"#68BC00\",\"split_mode\":\"everything\",\"metrics\":[{\"value\":\"\",\"id\":\"61ca57f2-469d-11e7-af02-69e470af7417\",\"type\":\"sum\",\"field\":\"bytes\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"terms_field\":\"clientip\",\"filter\":{\"query\":\"Filter Bytes Test:>1000\",\"language\":\"lucene\"},\"override_index_pattern\":1,\"series_index_pattern\":\"logstash-*\",\"series_time_field\":\"utc_time\",\"series_interval\":\"1d\",\"value_template\":\"{{value}} custom template\",\"split_color_mode\":\"gradient\",\"series_drop_last_bucket\":1}],\"time_field\":\"@timestamp\",\"index_pattern\":\"logstash-*\",\"interval\":\"auto\",\"axis_position\":\"left\",\"axis_formatter\":\"number\",\"show_legend\":1,\"show_grid\":1,\"background_color_rules\":[{\"id\":\"06893260-4194-11e8-a461-7d278185cba4\"}],\"use_kibana_indexes\":false,\"hide_last_value_indicator\":true,\"axis_scale\":\"normal\",\"truncate_legend\":1,\"max_lines_legend\":1,\"tooltip_mode\":\"show_all\",\"drop_last_bucket\":0,\"isModelInvalid\":false,\"bar_color_rules\":[{\"id\":\"71f4e260-4186-11ec-8262-619fbabeae59\"}]}}" - } - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "visualization:9fb4c670-4194-11e8-bb13-d53698fb349a", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "migrationVersion": { - "visualization": "7.14.0" - }, - "references": [ - ], - "type": "visualization", - "updated_at": "2018-04-17T16:32:59.086Z", - "visualization": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{}" - }, - "title": "Filter Bytes Test: tsvb markdown", - "uiStateJSON": "{}", - "version": 1, - "visState":"{\"title\":\"Filter Bytes Test: tsvb markdown\",\"type\":\"metrics\",\"aggs\":[],\"params\":{\"time_range_mode\":\"last_value\",\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\",\"type\":\"markdown\",\"series\":[{\"time_range_mode\":\"last_value\",\"id\":\"61ca57f1-469d-11e7-af02-69e470af7417\",\"color\":\"#68BC00\",\"split_mode\":\"filters\",\"metrics\":[{\"id\":\"482d6560-4194-11e8-a461-7d278185cba4\",\"type\":\"avg\",\"field\":\"bytes\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"terms_field\":\"clientip\",\"filter\":{\"query\":\"Filter Bytes Test:>1000\",\"language\":\"lucene\"},\"override_index_pattern\":0,\"series_index_pattern\":\"logstash-*\",\"series_time_field\":\"utc_time\",\"series_interval\":\"1m\",\"value_template\":\"\",\"split_filters\":[{\"filter\":{\"query\":\"bytes:>1000\",\"language\":\"lucene\"},\"label\":\"\",\"color\":\"#68BC00\",\"id\":\"39a107e0-4194-11e8-a461-7d278185cba4\"}],\"label\":\"\",\"var_name\":\"\",\"split_color_mode\":\"gradient\",\"series_drop_last_bucket\":1}],\"time_field\":\"@timestamp\",\"index_pattern\":\"logstash-*\",\"interval\":\"auto\",\"axis_position\":\"left\",\"axis_formatter\":\"number\",\"show_legend\":1,\"show_grid\":1,\"background_color_rules\":[{\"id\":\"06893260-4194-11e8-a461-7d278185cba4\"}],\"bar_color_rules\":[{\"id\":\"36a0e740-4194-11e8-a461-7d278185cba4\"}],\"markdown\":\"{{bytes_1000.last.formatted}}\",\"use_kibana_indexes\":false,\"hide_last_value_indicator\":true,\"axis_scale\":\"normal\",\"truncate_legend\":1,\"max_lines_legend\":1,\"tooltip_mode\":\"show_all\",\"drop_last_bucket\":1,\"isModelInvalid\":false}}" - } - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "visualization:befdb6b0-3e59-11e8-9fc3-39e49624228e", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "migrationVersion": { - "visualization": "7.14.0" - }, - "references": [ - { - "id": "a0f483a0-3dc9-11e8-8660-4d65aa086b3c", - "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", - "type": "index-pattern" - }, - { - "id": "a16d1990-3dca-11e8-8660-4d65aa086b3c", - "name": "search_0", - "type": "search" - } - ], - "type": "visualization", - "updated_at": "2018-04-17T17:16:27.743Z", - "visualization": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"filter\":[{\"meta\":{\"negate\":false,\"disabled\":false,\"alias\":null,\"type\":\"phrase\",\"key\":\"animal.keyword\",\"value\":\"dog\",\"params\":{\"query\":\"dog\",\"type\":\"phrase\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"query\":{\"match\":{\"animal.keyword\":{\"query\":\"dog\",\"type\":\"phrase\"}}},\"$state\":{\"store\":\"appState\"}}],\"query\":{\"language\":\"lucene\",\"query\":\"\"}}" - }, - "savedSearchRefName": "search_0", - "title": "Filter Test: animals: linked to search with filter", - "uiStateJSON": "{}", - "version": 1, - "visState": "{\"title\":\"Filter Test: animals: linked to search with filter\",\"type\":\"pie\",\"params\":{\"addLegend\":true,\"addTooltip\":true,\"isDonut\":true,\"labels\":{\"last_level\":true,\"show\":false,\"truncate\":100,\"values\":true},\"legendPosition\":\"right\",\"type\":\"pie\",\"palette\":{\"type\":\"palette\",\"name\":\"kibana_palette\"},\"distinctColors\":true},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"segment\",\"params\":{\"field\":\"name.keyword\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\"}}]}" - } - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "visualization:584c0300-4191-11e8-bb13-d53698fb349a", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "migrationVersion": { - "visualization": "7.14.0" - }, - "references": [ - { - "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", - "name": "kibanaSavedObjectMeta.searchSourceJSON.index", - "type": "index-pattern" - } - ], - "type": "visualization", - "updated_at": "2018-04-17T18:36:30.315Z", - "visualization": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"bytes:>9000\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" - }, - "title": "Filter Bytes Test: split by geo with query", - "uiStateJSON": "{}", - "version": 1, - "visState": "{\"title\":\"Filter Bytes Test: split by geo with query\",\"type\":\"pie\",\"params\":{\"type\":\"pie\",\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"isDonut\":true,\"labels\":{\"show\":false,\"values\":true,\"last_level\":true,\"truncate\":100},\"palette\":{\"type\":\"palette\",\"name\":\"kibana_palette\"},\"distinctColors\":true},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"sum\",\"schema\":\"metric\",\"params\":{\"field\":\"bytes\"}},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"segment\",\"params\":{\"field\":\"geo.src\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\"}}]}" - } - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "config:7.0.0-alpha1", - "index": ".kibana", - "source": { - "config": { - "buildNum": null, - "dateFormat:tz": "UTC", - "defaultIndex": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", - "notifications:lifetime:banner": 3600000, - "notifications:lifetime:error": 3600000, - "notifications:lifetime:info": 3600000, - "notifications:lifetime:warning": 3600000 - }, - "coreMigrationVersion": "7.14.0", - "migrationVersion": { - "config": "7.13.0" - }, - "references": [ - ], - "type": "config", - "updated_at": "2018-04-17T19:25:03.632Z" - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "visualization:8090dcb0-4195-11e8-bb13-d53698fb349a", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "migrationVersion": { - "visualization": "7.14.0" - }, - "references": [ - ], - "type": "visualization", - "updated_at": "2018-04-17T19:28:21.967Z", - "visualization": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{}" - }, - "title": "Filter Bytes Test: vega", - "uiStateJSON": "{}", - "version": 1, - "visState": "{\"title\":\"Filter Bytes Test: vega\",\"type\":\"vega\",\"params\":{\"spec\":\"{ \\nconfig: { kibana: { renderer: \\\"svg\\\" }},\\n/*\\n\\nWelcome to Vega visualizations. Here you can design your own dataviz from scratch using a declarative language called Vega, or its simpler form Vega-Lite. In Vega, you have the full control of what data is loaded, even from multiple sources, how that data is transformed, and what visual elements are used to show it. Use help icon to view Vega examples, tutorials, and other docs. Use the wrench icon to reformat this text, or to remove comments.\\n\\nThis example graph shows the document count in all indexes in the current time range. You might need to adjust the time filter in the upper right corner.\\n*/\\n\\n $schema: https://vega.github.io/schema/vega-lite/v2.json\\n title: Event counts from all indexes\\n\\n // Define the data source\\n data: {\\n url: {\\n/*\\nAn object instead of a string for the \\\"url\\\" param is treated as an Elasticsearch query. Anything inside this object is not part of the Vega language, but only understood by Kibana and Elasticsearch server. This query counts the number of documents per time interval, assuming you have a @timestamp field in your data.\\n\\nKibana has a special handling for the fields surrounded by \\\"%\\\". They are processed before the the query is sent to Elasticsearch. This way the query becomes context aware, and can use the time range and the dashboard filters.\\n*/\\n\\n // Apply dashboard context filters when set\\n %context%: true\\n // Filter the time picker (upper right corner) with this field\\n %timefield%: @timestamp\\n\\n/*\\nSee .search() documentation for : https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-search\\n*/\\n\\n // Which index to search\\n index: _all\\n // Aggregate data by the time field into time buckets, counting the number of documents in each bucket.\\n body: {\\n aggs: {\\n time_buckets: {\\n date_histogram: {\\n // Use date histogram aggregation on @timestamp field\\n field: @timestamp\\n // The interval value will depend on the daterange picker (true), or use an integer to set an approximate bucket count\\n interval: {%autointerval%: true}\\n // Make sure we get an entire range, even if it has no data\\n extended_bounds: {\\n // Use the current time range's start and end\\n min: {%timefilter%: \\\"min\\\"}\\n max: {%timefilter%: \\\"max\\\"}\\n }\\n // Use this for linear (e.g. line, area) graphs. Without it, empty buckets will not show up\\n min_doc_count: 0\\n }\\n }\\n }\\n // Speed up the response by only including aggregation results\\n size: 0\\n }\\n }\\n/*\\nElasticsearch will return results in this format:\\n\\naggregations: {\\n time_buckets: {\\n buckets: [\\n {\\n key_as_string: 2015-11-30T22:00:00.000Z\\n key: 1448920800000\\n doc_count: 0\\n },\\n {\\n key_as_string: 2015-11-30T23:00:00.000Z\\n key: 1448924400000\\n doc_count: 0\\n }\\n ...\\n ]\\n }\\n}\\n\\nFor our graph, we only need the list of bucket values. Use the format.property to discard everything else.\\n*/\\n format: {property: \\\"aggregations.time_buckets.buckets\\\"}\\n }\\n\\n // \\\"mark\\\" is the graphics element used to show our data. Other mark values are: area, bar, circle, line, point, rect, rule, square, text, and tick. See https://vega.github.io/vega-lite/docs/mark.html\\n mark: line\\n\\n // \\\"encoding\\\" tells the \\\"mark\\\" what data to use and in what way. See https://vega.github.io/vega-lite/docs/encoding.html\\n encoding: {\\n x: {\\n // The \\\"key\\\" value is the timestamp in milliseconds. Use it for X axis.\\n field: key\\n type: temporal\\n axis: {title: false} // Customize X axis format\\n }\\n y: {\\n // The \\\"doc_count\\\" is the count per bucket. Use it for Y axis.\\n field: doc_count\\n type: quantitative\\n axis: {title: \\\"Document count\\\"}\\n }\\n }\\n}\\n\"},\"aggs\":[]}" - } - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "config:6.2.4", - "index": ".kibana", - "source": { - "config": { - "buildNum": 16627, - "defaultIndex": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", - "xPackMonitoring:showBanner": false - }, - "coreMigrationVersion": "7.14.0", - "migrationVersion": { - "config": "7.13.0" - }, - "references": [ - ], - "type": "config", - "updated_at": "2018-05-09T20:50:57.021Z" - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "visualization:edb65990-53ca-11e8-b481-c9426d020fcd", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "migrationVersion": { - "visualization": "7.14.0" - }, - "references": [ - { - "id": "a0f483a0-3dc9-11e8-8660-4d65aa086b3c", - "name": "kibanaSavedObjectMeta.searchSourceJSON.index", - "type": "index-pattern" - } - ], - "type": "visualization", - "updated_at": "2018-05-09T20:52:47.144Z", - "visualization": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" - }, - "title": "table created in 6_2", - "uiStateJSON": "{\"vis\":{\"params\":{\"sort\":{\"columnIndex\":null,\"direction\":null}}}}", - "version": 1, - "visState": "{\"title\":\"table created in 6_2\",\"type\":\"table\",\"params\":{\"perPage\":10,\"showPartialRows\":false,\"showMeticsAtAllLevels\":false,\"sort\":{\"columnIndex\":null,\"direction\":null},\"showTotal\":false,\"totalFunc\":\"sum\",\"showToolbar\":true},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"bucket\",\"params\":{\"field\":\"weightLbs\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\"}},{\"id\":\"3\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"bucket\",\"params\":{\"field\":\"animal.keyword\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\"}}]}" - } - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "visualization:0644f890-53cb-11e8-b481-c9426d020fcd", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "migrationVersion": { - "visualization": "7.14.0" - }, - "references": [ - { - "id": "a0f483a0-3dc9-11e8-8660-4d65aa086b3c", - "name": "kibanaSavedObjectMeta.searchSourceJSON.index", - "type": "index-pattern" - } - ], - "type": "visualization", - "updated_at": "2018-05-09T20:53:28.345Z", - "visualization": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"weightLbs:>10\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" - }, - "title": "Weight in lbs pie created in 6.2", - "uiStateJSON": "{}", - "version": 1, - "visState": "{\"title\":\"Weight in lbs pie created in 6.2\",\"type\":\"pie\",\"params\":{\"type\":\"pie\",\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"isDonut\":true,\"labels\":{\"show\":false,\"values\":true,\"last_level\":true,\"truncate\":100},\"palette\":{\"type\":\"palette\",\"name\":\"kibana_palette\"},\"distinctColors\":true},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"segment\",\"params\":{\"field\":\"weightLbs\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\"}}]}" - } - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "dashboard:1b2f47b0-53cb-11e8-b481-c9426d020fcd", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "dashboard": { - "description": "", - "hits": 0, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"query\":{\"language\":\"lucene\",\"query\":\"weightLbs:>15\"},\"filter\":[{\"meta\":{\"field\":\"isDog\",\"negate\":false,\"disabled\":false,\"alias\":null,\"type\":\"phrase\",\"key\":\"isDog\",\"value\":\"true\",\"params\":{\"value\":true},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"script\":{\"script\":{\"inline\":\"boolean compare(Supplier s, def v) {return s.get() == v;}compare(() -> { return doc['animal.keyword'].value == 'dog' }, params.value);\",\"lang\":\"painless\",\"params\":{\"value\":true}}},\"$state\":{\"store\":\"appState\"}}],\"highlightAll\":true,\"version\":true}" - }, - "optionsJSON": "{\"darkTheme\":false,\"hidePanelTitles\":false,\"useMargins\":true}", - "panelsJSON": "[{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"w\":24,\"h\":12,\"x\":24,\"y\":0,\"i\":\"4\"},\"panelIndex\":\"4\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_4\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"w\":24,\"h\":12,\"x\":0,\"y\":0,\"i\":\"5\"},\"panelIndex\":\"5\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_5\"}]", - "refreshInterval": { - "display": "Off", - "pause": false, - "value": 0 - }, - "timeFrom": "Mon Apr 09 2018 17:56:08 GMT-0400", - "timeRestore": true, - "timeTo": "Wed Apr 11 2018 17:56:08 GMT-0400", - "title": "Animal Weights (created in 6.2)", - "version": 1 - }, - "migrationVersion": { - "dashboard": "7.14.0" - }, - "references": [ - { - "id": "a0f483a0-3dc9-11e8-8660-4d65aa086b3c", - "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", - "type": "index-pattern" - }, - { - "id": "edb65990-53ca-11e8-b481-c9426d020fcd", - "name": "4:panel_4", - "type": "visualization" - }, - { - "id": "0644f890-53cb-11e8-b481-c9426d020fcd", - "name": "5:panel_5", - "type": "visualization" - } - ], - "type": "dashboard", - "updated_at": "2018-05-09T20:54:03.435Z" - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "index-pattern:a0f483a0-3dc9-11e8-8660-4d65aa086b3c", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "index-pattern": { - "fieldFormatMap": "{\"weightLbs\":{\"id\":\"number\",\"params\":{\"pattern\":\"0,0.0\"}},\"is_dog\":{\"id\":\"boolean\"},\"isDog\":{\"id\":\"boolean\"}}", - "fields": "[{\"name\":\"@timestamp\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"_id\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_score\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_source\",\"type\":\"_source\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"animal\",\"type\":\"string\",\"count\":3,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"animal.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"name\",\"type\":\"string\",\"count\":1,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"name.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"sound\",\"type\":\"string\",\"count\":2,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"sound.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"weightLbs\",\"type\":\"number\",\"count\":2,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"isDog\",\"type\":\"boolean\",\"count\":0,\"scripted\":true,\"script\":\"return doc['animal.keyword'].value == 'dog'\",\"lang\":\"painless\",\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false}]", - "timeFieldName": "@timestamp", - "title": "animals-*" - }, - "migrationVersion": { - "index-pattern": "7.11.0" - }, - "references": [ - ], - "type": "index-pattern", - "updated_at": "2018-05-09T20:55:44.314Z" - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "search:6351c590-53cb-11e8-b481-c9426d020fcd", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "migrationVersion": { - "search": "7.9.3" - }, - "references": [ - { - "id": "a0f483a0-3dc9-11e8-8660-4d65aa086b3c", - "name": "kibanaSavedObjectMeta.searchSourceJSON.index", - "type": "index-pattern" - }, - { - "id": "a0f483a0-3dc9-11e8-8660-4d65aa086b3c", - "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", - "type": "index-pattern" - } - ], - "search": { - "columns": [ - "animal", - "sound", - "weightLbs" - ], - "description": "", - "hits": 0, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"highlightAll\":true,\"version\":true,\"query\":{\"language\":\"lucene\",\"query\":\"weightLbs:>10\"},\"filter\":[{\"meta\":{\"negate\":false,\"disabled\":false,\"alias\":null,\"type\":\"phrase\",\"key\":\"sound.keyword\",\"value\":\"growl\",\"params\":{\"query\":\"growl\",\"type\":\"phrase\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"query\":{\"match\":{\"sound.keyword\":{\"query\":\"growl\",\"type\":\"phrase\"}}},\"$state\":{\"store\":\"appState\"}}],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" - }, - "sort": [ - [ - "@timestamp", - "desc" - ] - ], - "title": "Search created in 6.2", - "version": 1 - }, - "type": "search", - "updated_at": "2018-05-09T20:56:04.457Z" - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "visualization:47b5cf60-9e93-11ea-853e-adc0effaf76d", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "migrationVersion": { - "visualization": "7.14.0" - }, - "references": [ - { - "id": "1b1789d0-9e93-11ea-853e-adc0effaf76d", - "name": "kibanaSavedObjectMeta.searchSourceJSON.index", - "type": "index-pattern" - } - ], - "type": "visualization", - "updated_at": "2020-05-25T15:16:27.743Z", - "visualization": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" - }, - "title": "vis with missing index pattern", - "uiStateJSON": "{}", - "version": 1, - "visState": "{\"type\":\"pie\",\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}}],\"params\":{\"type\":\"pie\",\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"isDonut\":true,\"labels\":{\"show\":false,\"values\":true,\"last_level\":true,\"truncate\":100},\"palette\":{\"type\":\"palette\",\"name\":\"kibana_palette\"},\"distinctColors\":true},\"title\":\"vis with missing index pattern\"}" - } - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "dashboard:502e63a0-9e93-11ea-853e-adc0effaf76d", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "dashboard": { - "description": "", - "hits": 0, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"query\":{\"language\":\"kuery\",\"query\":\"\"},\"filter\":[]}" - }, - "optionsJSON": "{\"hidePanelTitles\":false,\"useMargins\":true}", - "panelsJSON": "[{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":0,\"w\":24,\"h\":15,\"i\":\"6cfbe6cc-1872-4cb4-9455-a02eeb75127e\"},\"panelIndex\":\"6cfbe6cc-1872-4cb4-9455-a02eeb75127e\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_6cfbe6cc-1872-4cb4-9455-a02eeb75127e\"}]", - "timeRestore": false, - "title": "dashboard with missing index pattern", - "version": 1 - }, - "migrationVersion": { - "dashboard": "7.14.0" - }, - "references": [ - { - "id": "47b5cf60-9e93-11ea-853e-adc0effaf76d", - "name": "6cfbe6cc-1872-4cb4-9455-a02eeb75127e:panel_6cfbe6cc-1872-4cb4-9455-a02eeb75127e", - "type": "visualization" - } - ], - "type": "dashboard", - "updated_at": "2020-05-25T15:16:27.743Z" - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "dashboard:6eb8a840-a32e-11ea-88c2-d56dd2b14bd7", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "dashboard": { - "description": "", - "hits": 0, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\n \"query\": {\n \"language\": \"kuery\",\n \"query\": \"\"\n },\n \"filter\": [\n {\n \"meta\": {\n \"alias\": null,\n \"negate\": false,\n \"disabled\": true,\n \"type\": \"phrase\",\n \"key\": \"name\",\n \"params\": {\n \"query\": \"moo\"\n },\n \"indexRefName\": \"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"\n },\n \"query\": {\n \"match_phrase\": {\n \"name\": \"moo\"\n }\n },\n \"$state\": {\n \"store\": \"appState\"\n }\n },\n {\n \"meta\": {\n \"alias\": null,\n \"negate\": false,\n \"disabled\": true,\n \"type\": \"phrase\",\n \"key\": \"baad-field\",\n \"params\": {\n \"query\": \"moo\"\n },\n \"indexRefName\": \"kibanaSavedObjectMeta.searchSourceJSON.filter[1].meta.index\"\n },\n \"query\": {\n \"match_phrase\": {\n \"baad-field\": \"moo\"\n }\n },\n \"$state\": {\n \"store\": \"appState\"\n }\n },\n {\n \"meta\": {\n \"alias\": null,\n \"negate\": false,\n \"disabled\": false,\n \"type\": \"phrase\",\n \"key\": \"@timestamp\",\n \"params\": {\n \"query\": \"123\"\n },\n \"indexRefName\": \"kibanaSavedObjectMeta.searchSourceJSON.filter[2].meta.index\"\n },\n \"query\": {\n \"match_phrase\": {\n \"@timestamp\": \"123\"\n }\n },\n \"$state\": {\n \"store\": \"appState\"\n }\n },\n {\n \"meta\": {\n \"alias\": null,\n \"negate\": false,\n \"disabled\": false,\n \"type\": \"exists\",\n \"key\": \"extension\",\n \"value\": \"exists\",\n \"indexRefName\": \"kibanaSavedObjectMeta.searchSourceJSON.filter[3].meta.index\"\n },\n \"exists\": {\n \"field\": \"extension\"\n },\n \"$state\": {\n \"store\": \"appState\"\n }\n },\n {\n \"meta\": {\n \"alias\": null,\n \"negate\": false,\n \"disabled\": false,\n \"type\": \"phrase\",\n \"key\": \"banana\",\n \"params\": {\n \"query\": \"yellow\"\n }\n },\n \"query\": {\n \"match_phrase\": {\n \"banana\": \"yellow\"\n }\n },\n \"$state\": {\n \"store\": \"appState\"\n }\n }\n ]\n}" - }, - "optionsJSON": "{\n \"hidePanelTitles\": false,\n \"useMargins\": true\n}", - "panelsJSON": "[{\"version\":\"8.0.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":0,\"w\":24,\"h\":15,\"i\":\"94a3dc1d-508a-4d42-a480-65b158925ba0\"},\"panelIndex\":\"94a3dc1d-508a-4d42-a480-65b158925ba0\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_94a3dc1d-508a-4d42-a480-65b158925ba0\"}]", - "refreshInterval": { - "pause": true, - "value": 0 - }, - "timeFrom": "now-10y", - "timeRestore": true, - "timeTo": "now", - "title": "dashboard with bad filters", - "version": 1 - }, - "migrationVersion": { - "dashboard": "7.14.0" - }, - "references": [ - { - "id": "a0f483a0-3dc9-11e8-8660-bad-index", - "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", - "type": "index-pattern" - }, - { - "id": "a0f483a0-3dc9-11e8-8660-4d65aa086b3c", - "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[1].meta.index", - "type": "index-pattern" - }, - { - "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", - "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[2].meta.index", - "type": "index-pattern" - }, - { - "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", - "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[3].meta.index", - "type": "index-pattern" - }, - { - "id": "a0f483a0-3dc9-11e8-8660-4d65aa086b3c", - "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[4].meta.index", - "type": "index-pattern" - }, - { - "id": "50643b60-3dd3-11e8-b2b9-5d5dc1715159", - "name": "94a3dc1d-508a-4d42-a480-65b158925ba0:panel_94a3dc1d-508a-4d42-a480-65b158925ba0", - "type": "visualization" - } - ], - "type": "dashboard", - "updated_at": "2020-06-04T09:26:04.272Z" - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "config:8.0.0", - "index": ".kibana", - "source": { - "config": { - "accessibility:disableAnimations": true, - "buildNum": null, - "dateFormat:tz": "UTC", - "defaultIndex": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c" - }, - "coreMigrationVersion": "7.14.0", - "migrationVersion": { - "config": "7.13.0" - }, - "references": [ - ], - "type": "config", - "updated_at": "2020-06-04T09:22:54.572Z" - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "ui-metric:DashboardPanelVersionInUrl:8.0.0", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "references": [ - ], - "type": "ui-metric", - "ui-metric": { - "count": 15 - }, - "updated_at": "2020-06-04T09:28:06.848Z" - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "ui-metric:kibana-user_agent:Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36", - "index": ".kibana", - "source": { - "coreMigrationVersion": "7.14.0", - "references": [ - ], - "type": "ui-metric", - "ui-metric": { - "count": 1 - }, - "updated_at": "2020-06-04T09:28:06.848Z" - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "application_usage_daily:dashboards:2020-05-31", - "index": ".kibana", - "source": { - "application_usage_daily": { - "appId": "dashboards", - "minutesOnScreen": 13.956333333333333, - "numberOfClicks": 134, - "timestamp": "2020-05-31T00:00:00.000Z" - }, - "coreMigrationVersion": "7.14.0", - "references": [ - ], - "type": "application_usage_daily", - "updated_at": "2021-06-10T22:39:09.215Z" - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "application_usage_daily:home:2020-05-31", - "index": ".kibana", - "source": { - "application_usage_daily": { - "appId": "home", - "minutesOnScreen": 0.5708666666666666, - "numberOfClicks": 1, - "timestamp": "2020-05-31T00:00:00.000Z" - }, - "coreMigrationVersion": "7.14.0", - "references": [ - ], - "type": "application_usage_daily", - "updated_at": "2021-06-10T22:39:09.215Z" - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "application_usage_daily:management:2020-05-31", - "index": ".kibana", - "source": { - "application_usage_daily": { - "appId": "management", - "minutesOnScreen": 5.842616666666666, - "numberOfClicks": 107, - "timestamp": "2020-05-31T00:00:00.000Z" - }, - "coreMigrationVersion": "7.14.0", - "references": [ - ], - "type": "application_usage_daily", - "updated_at": "2021-06-10T22:39:09.215Z" - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "application_usage_daily:management:2020-06-04", - "index": ".kibana", - "source": { - "application_usage_daily": { - "appId": "management", - "minutesOnScreen": 2.5120666666666667, - "numberOfClicks": 38, - "timestamp": "2020-06-04T00:00:00.000Z" - }, - "coreMigrationVersion": "7.14.0", - "references": [ - ], - "type": "application_usage_daily", - "updated_at": "2021-06-10T22:39:09.215Z" - }, - "type": "_doc" - } -} - -{ - "type": "doc", - "value": { - "id": "application_usage_daily:dashboards:2020-06-04", - "index": ".kibana", - "source": { - "application_usage_daily": { - "appId": "dashboards", - "minutesOnScreen": 9.065083333333334, - "numberOfClicks": 21, - "timestamp": "2020-06-04T00:00:00.000Z" - }, - "coreMigrationVersion": "7.14.0", - "references": [ - ], - "type": "application_usage_daily", - "updated_at": "2021-06-10T22:39:09.215Z" - }, - "type": "_doc" - } -} diff --git a/test/functional/fixtures/es_archiver/dashboard/current/kibana/mappings.json b/test/functional/fixtures/es_archiver/dashboard/current/kibana/mappings.json deleted file mode 100644 index 161d733e868a8..0000000000000 --- a/test/functional/fixtures/es_archiver/dashboard/current/kibana/mappings.json +++ /dev/null @@ -1,476 +0,0 @@ -{ - "type": "index", - "value": { - "aliases": { - ".kibana_$KIBANA_PACKAGE_VERSION": {}, - ".kibana": {} - }, - "index": ".kibana_$KIBANA_PACKAGE_VERSION_001", - "mappings": { - "_meta": { - "migrationMappingPropertyHashes": { - "application_usage_daily": "43b8830d5d0df85a6823d290885fc9fd", - "application_usage_totals": "3d1b76c39bfb2cc8296b024d73854724", - "application_usage_transactional": "3d1b76c39bfb2cc8296b024d73854724", - "config": "c63748b75f39d0c54de12d12c1ccbc20", - "core-usage-stats": "3d1b76c39bfb2cc8296b024d73854724", - "coreMigrationVersion": "2f4316de49999235636386fe51dc06c1", - "dashboard": "40554caf09725935e2c02e02563a2d07", - "index-pattern": "45915a1ad866812242df474eb0479052", - "kql-telemetry": "d12a98a6f19a2d273696597547e064ee", - "legacy-url-alias": "6155300fd11a00e23d5cbaa39f0fce0a", - "migrationVersion": "4a1746014a75ade3a714e1db5763276f", - "namespace": "2f4316de49999235636386fe51dc06c1", - "namespaces": "2f4316de49999235636386fe51dc06c1", - "originId": "2f4316de49999235636386fe51dc06c1", - "query": "11aaeb7f5f7fa5bb43f25e18ce26e7d9", - "references": "7997cf5a56cc02bdc9c93361bde732b0", - "sample-data-telemetry": "7d3cfeb915303c9641c59681967ffeb4", - "search": "db2c00e39b36f40930a3b9fc71c823e1", - "search-telemetry": "3d1b76c39bfb2cc8296b024d73854724", - "telemetry": "36a616f7026dfa617d6655df850fe16d", - "type": "2f4316de49999235636386fe51dc06c1", - "ui-counter": "0d409297dc5ebe1e3a1da691c6ee32e3", - "ui-metric": "0d409297dc5ebe1e3a1da691c6ee32e3", - "updated_at": "00da57df13e94e9d98437d13ace4bfe0", - "url": "c7f66a0df8b1b52f17c28c4adb111105", - "usage-counters": "8cc260bdceffec4ffc3ad165c97dc1b4", - "visualization": "f819cf6636b75c9e76ba733a0c6ef355" - } - }, - "dynamic": "strict", - "properties": { - "application_usage_daily": { - "dynamic": "false", - "properties": { - "timestamp": { - "type": "date" - } - } - }, - "application_usage_totals": { - "dynamic": "false", - "type": "object" - }, - "application_usage_transactional": { - "dynamic": "false", - "type": "object" - }, - "config": { - "dynamic": "false", - "properties": { - "buildNum": { - "type": "keyword" - } - } - }, - "core-usage-stats": { - "dynamic": "false", - "type": "object" - }, - "coreMigrationVersion": { - "type": "keyword" - }, - "dashboard": { - "properties": { - "description": { - "type": "text" - }, - "hits": { - "doc_values": false, - "index": false, - "type": "integer" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "index": false, - "type": "text" - } - } - }, - "optionsJSON": { - "index": false, - "type": "text" - }, - "panelsJSON": { - "index": false, - "type": "text" - }, - "refreshInterval": { - "properties": { - "display": { - "doc_values": false, - "index": false, - "type": "keyword" - }, - "pause": { - "doc_values": false, - "index": false, - "type": "boolean" - }, - "section": { - "doc_values": false, - "index": false, - "type": "integer" - }, - "value": { - "doc_values": false, - "index": false, - "type": "integer" - } - } - }, - "timeFrom": { - "doc_values": false, - "index": false, - "type": "keyword" - }, - "timeRestore": { - "doc_values": false, - "index": false, - "type": "boolean" - }, - "timeTo": { - "doc_values": false, - "index": false, - "type": "keyword" - }, - "title": { - "type": "text" - }, - "version": { - "type": "integer" - } - } - }, - "index-pattern": { - "dynamic": "false", - "properties": { - "title": { - "type": "text" - }, - "type": { - "type": "keyword" - } - } - }, - "kql-telemetry": { - "properties": { - "optInCount": { - "type": "long" - }, - "optOutCount": { - "type": "long" - } - } - }, - "legacy-url-alias": { - "dynamic": "false", - "properties": { - "disabled": { - "type": "boolean" - }, - "sourceId": { - "type": "keyword" - }, - "targetType": { - "type": "keyword" - } - } - }, - "migrationVersion": { - "dynamic": "true", - "properties": { - "config": { - "fields": { - "keyword": { - "ignore_above": 256, - "type": "keyword" - } - }, - "type": "text" - }, - "dashboard": { - "fields": { - "keyword": { - "ignore_above": 256, - "type": "keyword" - } - }, - "type": "text" - }, - "index-pattern": { - "fields": { - "keyword": { - "ignore_above": 256, - "type": "keyword" - } - }, - "type": "text" - }, - "search": { - "fields": { - "keyword": { - "ignore_above": 256, - "type": "keyword" - } - }, - "type": "text" - }, - "visualization": { - "fields": { - "keyword": { - "ignore_above": 256, - "type": "keyword" - } - }, - "type": "text" - } - } - }, - "namespace": { - "type": "keyword" - }, - "namespaces": { - "type": "keyword" - }, - "originId": { - "type": "keyword" - }, - "query": { - "properties": { - "description": { - "type": "text" - }, - "filters": { - "enabled": false, - "type": "object" - }, - "query": { - "properties": { - "language": { - "type": "keyword" - }, - "query": { - "index": false, - "type": "keyword" - } - } - }, - "timefilter": { - "enabled": false, - "type": "object" - }, - "title": { - "type": "text" - } - } - }, - "references": { - "properties": { - "id": { - "type": "keyword" - }, - "name": { - "type": "keyword" - }, - "type": { - "type": "keyword" - } - }, - "type": "nested" - }, - "sample-data-telemetry": { - "properties": { - "installCount": { - "type": "long" - }, - "unInstallCount": { - "type": "long" - } - } - }, - "search": { - "properties": { - "columns": { - "doc_values": false, - "index": false, - "type": "keyword" - }, - "description": { - "type": "text" - }, - "grid": { - "enabled": false, - "type": "object" - }, - "hideChart": { - "doc_values": false, - "index": false, - "type": "boolean" - }, - "hits": { - "doc_values": false, - "index": false, - "type": "integer" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "index": false, - "type": "text" - } - } - }, - "sort": { - "doc_values": false, - "index": false, - "type": "keyword" - }, - "title": { - "type": "text" - }, - "version": { - "type": "integer" - } - } - }, - "search-telemetry": { - "dynamic": "false", - "type": "object" - }, - "server": { - "dynamic": "false", - "type": "object" - }, - "telemetry": { - "properties": { - "allowChangingOptInStatus": { - "type": "boolean" - }, - "enabled": { - "type": "boolean" - }, - "lastReported": { - "type": "date" - }, - "lastVersionChecked": { - "type": "keyword" - }, - "reportFailureCount": { - "type": "integer" - }, - "reportFailureVersion": { - "type": "keyword" - }, - "sendUsageFrom": { - "type": "keyword" - }, - "userHasSeenNotice": { - "type": "boolean" - } - } - }, - "tsvb-validation-telemetry": { - "dynamic": "false", - "type": "object" - }, - "type": { - "type": "keyword" - }, - "ui-counter": { - "properties": { - "count": { - "type": "integer" - } - } - }, - "ui-metric": { - "properties": { - "count": { - "type": "integer" - } - } - }, - "updated_at": { - "type": "date" - }, - "url": { - "properties": { - "accessCount": { - "type": "long" - }, - "accessDate": { - "type": "date" - }, - "createDate": { - "type": "date" - }, - "url": { - "fields": { - "keyword": { - "ignore_above": 2048, - "type": "keyword" - } - }, - "type": "text" - } - } - }, - "usage-counters": { - "dynamic": "false", - "properties": { - "domainId": { - "type": "keyword" - } - } - }, - "visualization": { - "properties": { - "description": { - "type": "text" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "index": false, - "type": "text" - } - } - }, - "savedSearchRefName": { - "doc_values": false, - "index": false, - "type": "keyword" - }, - "title": { - "type": "text" - }, - "uiStateJSON": { - "index": false, - "type": "text" - }, - "version": { - "type": "integer" - }, - "visState": { - "index": false, - "type": "text" - } - } - } - } - }, - "settings": { - "index": { - "auto_expand_replicas": "0-1", - "number_of_replicas": "0", - "number_of_shards": "1", - "priority": "10", - "refresh_interval": "1s", - "routing_partition_size": "1" - } - } - } -} \ No newline at end of file diff --git a/test/functional/fixtures/kbn_archiver/dashboard/current/kibana.json b/test/functional/fixtures/kbn_archiver/dashboard/current/kibana.json new file mode 100644 index 0000000000000..711f242d16ac8 --- /dev/null +++ b/test/functional/fixtures/kbn_archiver/dashboard/current/kibana.json @@ -0,0 +1,2653 @@ +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{}" + }, + "title": "Rendering Test: tsvb-table", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Rendering Test: tsvb-table\",\"type\":\"metrics\",\"aggs\":[],\"params\":{\"time_range_mode\":\"last_value\",\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\",\"type\":\"table\",\"series\":[{\"time_range_mode\":\"entire_time_range\",\"id\":\"61ca57f1-469d-11e7-af02-69e470af7417\",\"color\":\"#68BC00\",\"split_mode\":\"everything\",\"metrics\":[{\"id\":\"61ca57f2-469d-11e7-af02-69e470af7417\",\"type\":\"avg\",\"field\":\"bytes\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"split_color_mode\":\"gradient\"},{\"time_range_mode\":\"entire_time_range\",\"id\":\"d18e5970-3dcc-11e8-a2f6-c162ca6cf6ea\",\"color\":\"rgba(160,70,216,1)\",\"split_mode\":\"filter\",\"metrics\":[{\"id\":\"d18e5971-3dcc-11e8-a2f6-c162ca6cf6ea\",\"type\":\"avg\",\"field\":\"bytes\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"filter\":{\"query\":\"bytes:>1000\",\"language\":\"lucene\"},\"split_color_mode\":\"gradient\"}],\"time_field\":\"@timestamp\",\"index_pattern\":\"logstash-*\",\"interval\":\"auto\",\"axis_position\":\"left\",\"axis_formatter\":\"number\",\"show_legend\":1,\"show_grid\":1,\"background_color_rules\":[{\"id\":\"c50bd5b0-3dcc-11e8-a2f6-c162ca6cf6ea\"}],\"bar_color_rules\":[{\"id\":\"cd25a820-3dcc-11e8-a2f6-c162ca6cf6ea\"}],\"gauge_color_rules\":[{\"id\":\"e0be22e0-3dcc-11e8-a2f6-c162ca6cf6ea\"}],\"gauge_width\":10,\"gauge_inner_width\":10,\"gauge_style\":\"half\",\"markdown\":\"\\nHi Avg last bytes: {{ average_of_bytes.last.raw }}\",\"pivot_id\":\"bytes\",\"pivot_label\":\"Hello\",\"use_kibana_indexes\":false,\"hide_last_value_indicator\":true,\"axis_scale\":\"normal\",\"truncate_legend\":1,\"max_lines_legend\":1,\"tooltip_mode\":\"show_all\",\"drop_last_bucket\":1,\"isModelInvalid\":false}}" + }, + "coreMigrationVersion": "8.0.1", + "id": "02a2e4e0-3dcd-11e8-8660-4d65aa086b3c", + "migrationVersion": { + "visualization": "8.0.0" + }, + "references": [], + "type": "visualization", + "updated_at": "2018-04-17T15:06:30.351Z", + "version": "WzIzMSwxXQ==" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{}" + }, + "title": "Filter Bytes Test: tsvb time series with bytes filter split by clientip", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Filter Bytes Test: tsvb time series with bytes filter split by clientip\",\"type\":\"metrics\",\"aggs\":[],\"params\":{\"time_range_mode\":\"entire_time_range\",\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\",\"type\":\"timeseries\",\"series\":[{\"time_range_mode\":\"entire_time_range\",\"id\":\"61ca57f1-469d-11e7-af02-69e470af7417\",\"color\":\"#68BC00\",\"split_mode\":\"terms\",\"metrics\":[{\"value\":\"\",\"id\":\"61ca57f2-469d-11e7-af02-69e470af7417\",\"type\":\"sum\",\"field\":\"bytes\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"terms_field\":\"clientip\",\"filter\":{\"query\":\"Filter Bytes Test:>1000\",\"language\":\"lucene\"},\"split_color_mode\":\"gradient\"}],\"time_field\":\"@timestamp\",\"index_pattern\":\"logstash-*\",\"interval\":\"auto\",\"axis_position\":\"left\",\"axis_formatter\":\"number\",\"show_legend\":1,\"show_grid\":1,\"use_kibana_indexes\":false,\"axis_scale\":\"normal\",\"truncate_legend\":1,\"max_lines_legend\":1,\"tooltip_mode\":\"show_all\",\"drop_last_bucket\":1,\"isModelInvalid\":false}}" + }, + "coreMigrationVersion": "8.0.1", + "id": "039e4770-4194-11e8-bb13-d53698fb349a", + "migrationVersion": { + "visualization": "8.0.0" + }, + "references": [], + "type": "visualization", + "updated_at": "2018-04-17T15:06:35.220Z", + "version": "WzI0NSwxXQ==" +} + +{ + "attributes": { + "fieldFormatMap": "{\"machine.ram\":{\"id\":\"number\",\"params\":{\"pattern\":\"0,0.[000] b\"}}}", + "fields": "[{\"name\":\"@message\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"@message.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"@tags\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"@tags.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"@timestamp\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"_id\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_score\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_source\",\"type\":\"_source\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"agent\",\"type\":\"string\",\"count\":2,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"agent.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"bytes\",\"type\":\"number\",\"count\":3,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"clientip\",\"type\":\"ip\",\"count\":3,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"extension\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"extension.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.coordinates\",\"type\":\"geo_point\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.dest\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.src\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.srcdest\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"headings\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"headings.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"host.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"id\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"index.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ip\",\"type\":\"ip\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"links\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"links.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"machine.os\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"machine.os.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"machine.ram\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"memory\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"meta.char\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"meta.related\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"meta.user.firstname\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"meta.user.lastname\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"phpmemory\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"referer\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:modified_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:published_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:section\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.article:section.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:tag\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.article:tag.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:description\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:description.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:image\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:image.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:image:height\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:image:height.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:image:width\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:image:width.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:site_name\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:site_name.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:title\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:title.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:type.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:url.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:card\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:card.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:description\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:description.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:image\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:image.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:site\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:site.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:title\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:title.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.url.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"request\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"request.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"response\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"response.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"spaces\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"spaces.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"url.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"utc_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"xss\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"xss.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true}]", + "timeFieldName": "@timestamp", + "title": "logstash-*" + }, + "coreMigrationVersion": "8.0.1", + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "migrationVersion": { + "index-pattern": "8.0.0" + }, + "references": [], + "type": "index-pattern", + "updated_at": "2018-04-16T16:57:12.263Z", + "version": "WzIxNiwxXQ==" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Filter Bytes Test: Goal unique count", + "uiStateJSON": "{\"vis\":{\"defaultColors\":{\"0 - 10000\":\"rgb(0,104,55)\"}}}", + "version": 1, + "visState": "{\"title\":\"Filter Bytes Test: Goal unique count\",\"type\":\"goal\",\"params\":{\"addTooltip\":true,\"addLegend\":false,\"isDisplayWarning\":false,\"type\":\"gauge\",\"gauge\":{\"verticalSplit\":false,\"autoExtend\":false,\"percentageMode\":false,\"gaugeType\":\"Arc\",\"gaugeStyle\":\"Full\",\"backStyle\":\"Full\",\"orientation\":\"vertical\",\"useRanges\":false,\"colorSchema\":\"Green to Red\",\"gaugeColorMode\":\"None\",\"colorsRange\":[{\"from\":0,\"to\":10000}],\"invertColors\":false,\"labels\":{\"show\":true,\"color\":\"black\"},\"scale\":{\"show\":false,\"labels\":false,\"color\":\"#333\",\"width\":2},\"type\":\"meter\",\"style\":{\"bgFill\":\"#000\",\"bgColor\":false,\"labelColor\":false,\"subText\":\"\",\"fontSize\":60}}},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"cardinality\",\"schema\":\"metric\",\"params\":{\"field\":\"bytes\"}}]}" + }, + "coreMigrationVersion": "8.0.1", + "id": "03d2afd0-4192-11e8-bb13-d53698fb349a", + "migrationVersion": { + "visualization": "8.0.0" + }, + "references": [ + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2018-04-17T15:06:36.269Z", + "version": "WzI0OSwxXQ==" +} + +{ + "attributes": { + "fieldFormatMap": "{\"weightLbs\":{\"id\":\"number\",\"params\":{\"pattern\":\"0,0.0\"}},\"is_dog\":{\"id\":\"boolean\"},\"isDog\":{\"id\":\"boolean\"}}", + "fields": "[{\"name\":\"@timestamp\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"_id\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_score\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_source\",\"type\":\"_source\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"animal\",\"type\":\"string\",\"count\":3,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"animal.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"name\",\"type\":\"string\",\"count\":1,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"name.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"sound\",\"type\":\"string\",\"count\":2,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"sound.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"weightLbs\",\"type\":\"number\",\"count\":2,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"isDog\",\"type\":\"boolean\",\"count\":0,\"scripted\":true,\"script\":\"return doc['animal.keyword'].value == 'dog'\",\"lang\":\"painless\",\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false}]", + "timeFieldName": "@timestamp", + "title": "animals-*" + }, + "coreMigrationVersion": "8.0.1", + "id": "a0f483a0-3dc9-11e8-8660-4d65aa086b3c", + "migrationVersion": { + "index-pattern": "8.0.0" + }, + "references": [], + "type": "index-pattern", + "updated_at": "2018-05-09T20:55:44.314Z", + "version": "WzI2NiwxXQ==" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"weightLbs:>10\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Weight in lbs pie created in 6.2", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Weight in lbs pie created in 6.2\",\"type\":\"pie\",\"params\":{\"type\":\"pie\",\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"isDonut\":true,\"labels\":{\"show\":false,\"values\":true,\"last_level\":true,\"truncate\":100},\"palette\":{\"type\":\"palette\",\"name\":\"kibana_palette\"},\"distinctColors\":true},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"segment\",\"params\":{\"field\":\"weightLbs\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\"}}]}" + }, + "coreMigrationVersion": "8.0.1", + "id": "0644f890-53cb-11e8-b481-c9426d020fcd", + "migrationVersion": { + "visualization": "8.0.0" + }, + "references": [ + { + "id": "a0f483a0-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2018-05-09T20:53:28.345Z", + "version": "WzI2NCwxXQ==" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{}" + }, + "title": "Filter Bytes Test: input control with filter", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Filter Bytes Test: input control with filter\",\"type\":\"input_control_vis\",\"params\":{\"controls\":[{\"id\":\"1523896850250\",\"fieldName\":\"bytes\",\"parent\":\"\",\"label\":\"Byte Options\",\"type\":\"list\",\"options\":{\"type\":\"terms\",\"multiselect\":true,\"size\":10,\"order\":\"desc\"},\"indexPatternRefName\":\"control_0_index_pattern\"}],\"updateFiltersOnChange\":false,\"useTimeFilter\":false,\"pinFilters\":false},\"aggs\":[]}" + }, + "coreMigrationVersion": "8.0.1", + "id": "0ca8c600-4195-11e8-bb13-d53698fb349a", + "migrationVersion": { + "visualization": "8.0.0" + }, + "references": [ + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "control_0_index_pattern", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2018-04-17T15:06:35.229Z", + "version": "WzI0NCwxXQ==" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Rendering Test: metric", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Rendering Test: metric\",\"type\":\"metric\",\"params\":{\"addTooltip\":true,\"addLegend\":false,\"type\":\"metric\",\"metric\":{\"percentageMode\":false,\"useRanges\":false,\"colorSchema\":\"Green to Red\",\"metricColorMode\":\"None\",\"colorsRange\":[{\"from\":0,\"to\":10000}],\"labels\":{\"show\":true},\"invertColors\":false,\"style\":{\"bgFill\":\"#000\",\"bgColor\":false,\"labelColor\":false,\"subText\":\"\",\"fontSize\":60}}},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"cardinality\",\"schema\":\"metric\",\"params\":{\"field\":\"bytes\"}}]}" + }, + "coreMigrationVersion": "8.0.1", + "id": "11ae2bd0-3dcc-11e8-8660-4d65aa086b3c", + "migrationVersion": { + "visualization": "8.0.0" + }, + "references": [ + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2018-04-17T15:06:32.133Z", + "version": "WzIyMSwxXQ==" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Rendering Test: heatmap", + "uiStateJSON": "{\"vis\":{\"defaultColors\":{\"0 - 15\":\"rgb(247,252,245)\",\"15 - 30\":\"rgb(199,233,192)\",\"30 - 45\":\"rgb(116,196,118)\",\"45 - 60\":\"rgb(35,139,69)\"}}}", + "version": 1, + "visState": "{\"title\":\"Rendering Test: heatmap\",\"type\":\"heatmap\",\"params\":{\"type\":\"heatmap\",\"addTooltip\":true,\"addLegend\":true,\"enableHover\":false,\"legendPosition\":\"right\",\"times\":[],\"colorsNumber\":4,\"colorSchema\":\"Greens\",\"setColorRange\":false,\"colorsRange\":[],\"invertColors\":false,\"percentageMode\":false,\"valueAxes\":[{\"show\":false,\"id\":\"ValueAxis-1\",\"type\":\"value\",\"scale\":{\"type\":\"linear\",\"defaultYExtents\":false},\"labels\":{\"show\":false,\"rotate\":0,\"overwriteColor\":false,\"color\":\"#555\"}}]},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"segment\",\"params\":{\"field\":\"bytes\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\"}},{\"id\":\"3\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"group\",\"params\":{\"field\":\"geo.src\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\"}}]}" + }, + "coreMigrationVersion": "8.0.1", + "id": "145ced90-3dcb-11e8-8660-4d65aa086b3c", + "migrationVersion": { + "visualization": "8.0.0" + }, + "references": [ + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2018-04-17T15:06:32.134Z", + "version": "WzIyMiwxXQ==" +} + +{ + "attributes": { + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" + }, + "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", + "panelsJSON": "[]", + "timeRestore": false, + "title": "im empty", + "version": 1 + }, + "coreMigrationVersion": "8.0.1", + "id": "14616b50-3dd4-11e8-b2b9-5d5dc1715159", + "migrationVersion": { + "dashboard": "8.0.1" + }, + "references": [], + "type": "dashboard", + "updated_at": "2018-04-11T22:02:51.909Z", + "version": "WzE5NCwxXQ==" +} + +{ + "attributes": { + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" + }, + "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", + "panelsJSON": "[]", + "timeRestore": false, + "title": "im empty too", + "version": 1 + }, + "coreMigrationVersion": "8.0.1", + "id": "19523860-3dd4-11e8-b2b9-5d5dc1715159", + "migrationVersion": { + "dashboard": "8.0.1" + }, + "references": [], + "type": "dashboard", + "updated_at": "2018-04-11T22:03:00.198Z", + "version": "WzE5MywxXQ==" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "table created in 6_2", + "uiStateJSON": "{\"vis\":{\"params\":{\"sort\":{\"columnIndex\":null,\"direction\":null}}}}", + "version": 1, + "visState": "{\"title\":\"table created in 6_2\",\"type\":\"table\",\"params\":{\"perPage\":10,\"showPartialRows\":false,\"showMeticsAtAllLevels\":false,\"sort\":{\"columnIndex\":null,\"direction\":null},\"showTotal\":false,\"totalFunc\":\"sum\",\"showToolbar\":true},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"bucket\",\"params\":{\"field\":\"weightLbs\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\"}},{\"id\":\"3\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"bucket\",\"params\":{\"field\":\"animal.keyword\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\"}}]}" + }, + "coreMigrationVersion": "8.0.1", + "id": "edb65990-53ca-11e8-b481-c9426d020fcd", + "migrationVersion": { + "visualization": "8.0.0" + }, + "references": [ + { + "id": "a0f483a0-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2018-05-09T20:52:47.144Z", + "version": "WzI2MywxXQ==" +} + +{ + "attributes": { + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"language\":\"lucene\",\"query\":\"weightLbs:>15\"},\"filter\":[{\"meta\":{\"field\":\"isDog\",\"negate\":false,\"disabled\":false,\"alias\":null,\"type\":\"phrase\",\"key\":\"isDog\",\"value\":\"true\",\"params\":{\"value\":true},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"script\":{\"script\":{\"inline\":\"boolean compare(Supplier s, def v) {return s.get() == v;}compare(() -> { return doc['animal.keyword'].value == 'dog' }, params.value);\",\"lang\":\"painless\",\"params\":{\"value\":true}}},\"$state\":{\"store\":\"appState\"}}],\"highlightAll\":true,\"version\":true}" + }, + "optionsJSON": "{\"darkTheme\":false,\"hidePanelTitles\":false,\"useMargins\":true}", + "panelsJSON": "[{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"w\":24,\"h\":12,\"x\":24,\"y\":0,\"i\":\"4\"},\"panelIndex\":\"4\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_4\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"w\":24,\"h\":12,\"x\":0,\"y\":0,\"i\":\"5\"},\"panelIndex\":\"5\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_5\"}]", + "refreshInterval": { + "display": "Off", + "pause": false, + "value": 0 + }, + "timeFrom": "Mon Apr 09 2018 17:56:08 GMT-0400", + "timeRestore": true, + "timeTo": "Wed Apr 11 2018 17:56:08 GMT-0400", + "title": "Animal Weights (created in 6.2)", + "version": 1 + }, + "coreMigrationVersion": "8.0.1", + "id": "1b2f47b0-53cb-11e8-b481-c9426d020fcd", + "migrationVersion": { + "dashboard": "8.0.1" + }, + "references": [ + { + "id": "a0f483a0-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "type": "index-pattern" + }, + { + "id": "edb65990-53ca-11e8-b481-c9426d020fcd", + "name": "4:panel_4", + "type": "visualization" + }, + { + "id": "0644f890-53cb-11e8-b481-c9426d020fcd", + "name": "5:panel_5", + "type": "visualization" + } + ], + "type": "dashboard", + "updated_at": "2018-05-09T20:54:03.435Z", + "version": "WzI2NSwxXQ==" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"bytes:>100\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Filter Bytes Test: min bytes metric with query", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Filter Bytes Test: min bytes metric with query\",\"type\":\"metric\",\"params\":{\"addTooltip\":true,\"addLegend\":false,\"type\":\"metric\",\"metric\":{\"percentageMode\":false,\"useRanges\":false,\"colorSchema\":\"Green to Red\",\"metricColorMode\":\"None\",\"colorsRange\":[{\"from\":0,\"to\":10000}],\"labels\":{\"show\":true},\"invertColors\":false,\"style\":{\"bgFill\":\"#000\",\"bgColor\":false,\"labelColor\":false,\"subText\":\"\",\"fontSize\":60}}},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"min\",\"schema\":\"metric\",\"params\":{\"field\":\"bytes\"}}]}" + }, + "coreMigrationVersion": "8.0.1", + "id": "1dcdfe30-4192-11e8-bb13-d53698fb349a", + "migrationVersion": { + "visualization": "8.0.0" + }, + "references": [ + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2018-04-17T15:59:56.976Z", + "version": "WzI1NSwxXQ==" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[{\"meta\":{\"negate\":false,\"disabled\":false,\"alias\":null,\"type\":\"phrase\",\"key\":\"geo.src\",\"value\":\"CN\",\"params\":{\"query\":\"CN\",\"type\":\"phrase\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"query\":{\"match\":{\"geo.src\":{\"query\":\"CN\",\"type\":\"phrase\"}}},\"$state\":{\"store\":\"appState\"}}],\"query\":{\"query\":\"bytes >= 10000\",\"language\":\"kuery\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Kuery: pie bytes with kuery and filter", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Kuery: pie bytes with kuery and filter\",\"type\":\"pie\",\"params\":{\"type\":\"pie\",\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"isDonut\":true,\"labels\":{\"show\":false,\"values\":true,\"last_level\":true,\"truncate\":100},\"palette\":{\"type\":\"palette\",\"name\":\"kibana_palette\"},\"distinctColors\":true},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"segment\",\"params\":{\"field\":\"bytes\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"size\":10,\"order\":\"desc\",\"orderBy\":\"1\"}}]}" + }, + "coreMigrationVersion": "8.0.1", + "id": "29bd0240-4197-11e8-bb13-d53698fb349a", + "migrationVersion": { + "visualization": "8.0.0" + }, + "references": [ + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + }, + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2018-04-16T16:56:53.092Z", + "version": "WzIxNSwxXQ==" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"query\":{\"language\":\"lucene\",\"query\":\"\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Rendering Test: guage", + "uiStateJSON": "{\"vis\":{\"colors\":{\"0 - 50000\":\"#EF843C\",\"75000 - 10000000\":\"#3F6833\"},\"defaultColors\":{\"0 - 5000000\":\"rgb(0,104,55)\",\"50000000 - 74998990099\":\"rgb(165,0,38)\"}}}", + "version": 1, + "visState": "{\"title\":\"Rendering Test: guage\",\"type\":\"gauge\",\"params\":{\"addLegend\":true,\"addTooltip\":true,\"gauge\":{\"backStyle\":\"Full\",\"colorSchema\":\"Green to Red\",\"colorsRange\":[{\"from\":0,\"to\":5000000},{\"from\":50000000,\"to\":74998990099}],\"extendRange\":true,\"gaugeColorMode\":\"Labels\",\"gaugeStyle\":\"Full\",\"gaugeType\":\"Arc\",\"invertColors\":false,\"labels\":{\"color\":\"black\",\"show\":true},\"orientation\":\"vertical\",\"percentageMode\":false,\"scale\":{\"color\":\"#333\",\"labels\":false,\"show\":true},\"style\":{\"bgColor\":false,\"bgFill\":\"#eee\",\"bgMask\":false,\"bgWidth\":0.9,\"fontSize\":60,\"labelColor\":true,\"mask\":false,\"maskBars\":50,\"subText\":\"\",\"width\":0.9},\"type\":\"meter\",\"alignment\":\"horizontal\"},\"isDisplayWarning\":false,\"type\":\"gauge\"},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"avg\",\"schema\":\"metric\",\"params\":{\"field\":\"machine.ram\"}}]}" + }, + "coreMigrationVersion": "8.0.1", + "id": "e2023110-3dcb-11e8-8660-4d65aa086b3c", + "migrationVersion": { + "visualization": "8.0.0" + }, + "references": [ + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2018-04-17T15:06:32.135Z", + "version": "WzIyMywxXQ==" +} + +{ + "attributes": { + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" + }, + "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", + "panelsJSON": "[{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"w\":24,\"h\":15,\"x\":0,\"y\":0,\"i\":\"1\"},\"panelIndex\":\"1\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_1\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"w\":24,\"h\":15,\"x\":24,\"y\":0,\"i\":\"2\"},\"panelIndex\":\"2\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_2\"}]", + "timeRestore": false, + "title": "couple panels", + "version": 1 + }, + "coreMigrationVersion": "8.0.1", + "id": "2ae34a60-3dd4-11e8-b2b9-5d5dc1715159", + "migrationVersion": { + "dashboard": "8.0.1" + }, + "references": [ + { + "id": "145ced90-3dcb-11e8-8660-4d65aa086b3c", + "name": "1:panel_1", + "type": "visualization" + }, + { + "id": "e2023110-3dcb-11e8-8660-4d65aa086b3c", + "name": "2:panel_2", + "type": "visualization" + } + ], + "type": "dashboard", + "updated_at": "2018-04-11T22:03:29.670Z", + "version": "WzE4OSwxXQ==" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{}" + }, + "title": "Rendering Test: input control", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Rendering Test: input control\",\"type\":\"input_control_vis\",\"params\":{\"controls\":[{\"id\":\"1523481142694\",\"fieldName\":\"bytes\",\"parent\":\"\",\"label\":\"Bytes Input List\",\"type\":\"list\",\"options\":{\"type\":\"terms\",\"multiselect\":true,\"size\":5,\"order\":\"desc\"},\"indexPatternRefName\":\"control_0_index_pattern\"},{\"id\":\"1523481163654\",\"fieldName\":\"bytes\",\"parent\":\"\",\"label\":\"Bytes range\",\"type\":\"range\",\"options\":{\"decimalPlaces\":0,\"step\":1},\"indexPatternRefName\":\"control_1_index_pattern\"},{\"id\":\"1523481176519\",\"fieldName\":\"sound.keyword\",\"parent\":\"\",\"label\":\"Animal sounds\",\"type\":\"list\",\"options\":{\"type\":\"terms\",\"multiselect\":true,\"size\":5,\"order\":\"desc\"},\"indexPatternRefName\":\"control_2_index_pattern\"}],\"updateFiltersOnChange\":false,\"useTimeFilter\":false,\"pinFilters\":false},\"aggs\":[]}" + }, + "coreMigrationVersion": "8.0.1", + "id": "2d1b1620-3dcd-11e8-8660-4d65aa086b3c", + "migrationVersion": { + "visualization": "8.0.0" + }, + "references": [ + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "control_0_index_pattern", + "type": "index-pattern" + }, + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "control_1_index_pattern", + "type": "index-pattern" + }, + { + "id": "a0f483a0-3dc9-11e8-8660-4d65aa086b3c", + "name": "control_2_index_pattern", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2018-04-17T15:06:31.123Z", + "version": "WzIyNywxXQ==" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Rendering Test: datatable", + "uiStateJSON": "{\"vis\":{\"params\":{\"sort\":{\"columnIndex\":null,\"direction\":null}}}}", + "version": 1, + "visState": "{\"title\":\"Rendering Test: datatable\",\"type\":\"table\",\"params\":{\"perPage\":10,\"showPartialRows\":false,\"showMeticsAtAllLevels\":false,\"sort\":{\"columnIndex\":null,\"direction\":null},\"showTotal\":false,\"totalFunc\":\"sum\",\"showToolbar\":true},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"bucket\",\"params\":{\"field\":\"clientip\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\"}}]}" + }, + "coreMigrationVersion": "8.0.1", + "id": "4b5d6ef0-3dcb-11e8-8660-4d65aa086b3c", + "migrationVersion": { + "visualization": "8.0.0" + }, + "references": [ + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2018-04-17T15:06:33.162Z", + "version": "WzIzNywxXQ==" +} + +{ + "attributes": { + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" + }, + "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", + "panelsJSON": "[{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":0,\"w\":24,\"h\":15,\"i\":\"1\"},\"panelIndex\":\"1\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_1\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":0,\"w\":24,\"h\":15,\"i\":\"2\"},\"panelIndex\":\"2\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_2\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":15,\"w\":24,\"h\":15,\"i\":\"3\"},\"panelIndex\":\"3\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_3\"}]", + "timeRestore": false, + "title": "few panels", + "version": 1 + }, + "coreMigrationVersion": "8.0.1", + "id": "33bb8ad0-3dd4-11e8-b2b9-5d5dc1715159", + "migrationVersion": { + "dashboard": "8.0.1" + }, + "references": [ + { + "id": "145ced90-3dcb-11e8-8660-4d65aa086b3c", + "name": "1:panel_1", + "type": "visualization" + }, + { + "id": "e2023110-3dcb-11e8-8660-4d65aa086b3c", + "name": "2:panel_2", + "type": "visualization" + }, + { + "id": "4b5d6ef0-3dcb-11e8-8660-4d65aa086b3c", + "name": "3:panel_3", + "type": "visualization" + } + ], + "type": "dashboard", + "updated_at": "2018-04-11T22:03:44.509Z", + "version": "WzE5NSwxXQ==" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Rendering Test: bar", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Rendering Test: bar\",\"type\":\"horizontal_bar\",\"params\":{\"type\":\"histogram\",\"grid\":{\"categoryLines\":false,\"style\":{\"color\":\"#eee\"}},\"categoryAxes\":[{\"id\":\"CategoryAxis-1\",\"type\":\"category\",\"position\":\"left\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\"},\"labels\":{\"show\":true,\"rotate\":0,\"filter\":false,\"truncate\":200},\"title\":{}}],\"valueAxes\":[{\"id\":\"ValueAxis-1\",\"name\":\"LeftAxis-1\",\"type\":\"value\",\"position\":\"bottom\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\",\"mode\":\"normal\"},\"labels\":{\"show\":true,\"rotate\":75,\"filter\":true,\"truncate\":100},\"title\":{\"text\":\"Count\"}}],\"seriesParams\":[{\"show\":true,\"type\":\"histogram\",\"mode\":\"normal\",\"data\":{\"label\":\"Count\",\"id\":\"1\"},\"valueAxis\":\"ValueAxis-1\",\"drawLinesBetweenPoints\":true,\"showCircles\":true}],\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"times\":[],\"addTimeMarker\":false,\"palette\":{\"type\":\"palette\",\"name\":\"kibana_palette\"},\"isVislibVis\":true,\"detailedTooltip\":true},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"date_histogram\",\"schema\":\"segment\",\"params\":{\"field\":\"@timestamp\",\"interval\":\"auto\",\"min_doc_count\":1,\"extended_bounds\":{}}},{\"id\":\"3\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"group\",\"params\":{\"field\":\"geo.src\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"size\":3,\"order\":\"desc\",\"orderBy\":\"1\"}}]}" + }, + "coreMigrationVersion": "8.0.1", + "id": "3525b840-3dcb-11e8-8660-4d65aa086b3c", + "migrationVersion": { + "visualization": "8.0.0" + }, + "references": [ + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2018-04-17T15:06:33.163Z", + "version": "WzIzOCwxXQ==" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{}" + }, + "title": "Filter Bytes Test: tsvb metric with custom interval and bytes filter", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Filter Bytes Test: tsvb metric with custom interval and bytes filter\",\"type\":\"metrics\",\"aggs\":[],\"params\":{\"time_range_mode\":\"last_value\",\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\",\"type\":\"metric\",\"series\":[{\"time_range_mode\":\"last_value\",\"id\":\"61ca57f1-469d-11e7-af02-69e470af7417\",\"color\":\"#68BC00\",\"split_mode\":\"everything\",\"metrics\":[{\"value\":\"\",\"id\":\"61ca57f2-469d-11e7-af02-69e470af7417\",\"type\":\"sum\",\"field\":\"bytes\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"terms_field\":\"clientip\",\"filter\":{\"query\":\"Filter Bytes Test:>1000\",\"language\":\"lucene\"},\"override_index_pattern\":1,\"series_index_pattern\":\"logstash-*\",\"series_time_field\":\"utc_time\",\"series_interval\":\"1d\",\"value_template\":\"{{value}} custom template\",\"split_color_mode\":\"gradient\",\"series_drop_last_bucket\":1}],\"time_field\":\"@timestamp\",\"index_pattern\":\"logstash-*\",\"interval\":\"auto\",\"axis_position\":\"left\",\"axis_formatter\":\"number\",\"show_legend\":1,\"show_grid\":1,\"background_color_rules\":[{\"id\":\"06893260-4194-11e8-a461-7d278185cba4\"}],\"use_kibana_indexes\":false,\"hide_last_value_indicator\":true,\"axis_scale\":\"normal\",\"truncate_legend\":1,\"max_lines_legend\":1,\"tooltip_mode\":\"show_all\",\"drop_last_bucket\":0,\"isModelInvalid\":false,\"bar_color_rules\":[{\"id\":\"71f4e260-4186-11ec-8262-619fbabeae59\"}]}}" + }, + "coreMigrationVersion": "8.0.1", + "id": "35417e50-4194-11e8-bb13-d53698fb349a", + "migrationVersion": { + "visualization": "8.0.0" + }, + "references": [], + "type": "visualization", + "updated_at": "2018-04-17T16:06:03.785Z", + "version": "WzI1NiwxXQ==" +} + +{ + "attributes": { + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" + }, + "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", + "panelsJSON": "[]", + "timeRestore": false, + "title": "1", + "version": 1 + }, + "coreMigrationVersion": "8.0.1", + "id": "3de0bda0-3dd4-11e8-b2b9-5d5dc1715159", + "migrationVersion": { + "dashboard": "8.0.1" + }, + "references": [], + "type": "dashboard", + "updated_at": "2018-04-11T22:04:01.530Z", + "version": "WzIwMiwxXQ==" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Rendering Test: pie", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Rendering Test: pie\",\"type\":\"pie\",\"params\":{\"type\":\"pie\",\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"isDonut\":true,\"labels\":{\"show\":false,\"values\":true,\"last_level\":true,\"truncate\":100},\"palette\":{\"type\":\"palette\",\"name\":\"kibana_palette\"},\"distinctColors\":true},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"segment\",\"params\":{\"field\":\"bytes\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\"}}]}" + }, + "coreMigrationVersion": "8.0.1", + "id": "3fe22200-3dcb-11e8-8660-4d65aa086b3c", + "migrationVersion": { + "visualization": "8.0.0" + }, + "references": [ + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2018-04-17T15:06:32.130Z", + "version": "WzIyMCwxXQ==" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{}" + }, + "title": "Rendering Test: input control parent", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Rendering Test: input control parent\",\"type\":\"input_control_vis\",\"params\":{\"controls\":[{\"id\":\"1523481216736\",\"fieldName\":\"animal.keyword\",\"parent\":\"\",\"label\":\"Animal type\",\"type\":\"list\",\"options\":{\"type\":\"terms\",\"multiselect\":true,\"size\":5,\"order\":\"desc\"},\"indexPatternRefName\":\"control_0_index_pattern\"},{\"id\":\"1523481176519\",\"fieldName\":\"sound.keyword\",\"parent\":\"1523481216736\",\"label\":\"Animal sounds\",\"type\":\"list\",\"options\":{\"type\":\"terms\",\"multiselect\":true,\"size\":5,\"order\":\"desc\"},\"indexPatternRefName\":\"control_1_index_pattern\"}],\"updateFiltersOnChange\":false,\"useTimeFilter\":false,\"pinFilters\":false},\"aggs\":[]}" + }, + "coreMigrationVersion": "8.0.1", + "id": "42535e30-3dcd-11e8-8660-4d65aa086b3c", + "migrationVersion": { + "visualization": "8.0.0" + }, + "references": [ + { + "id": "a0f483a0-3dc9-11e8-8660-4d65aa086b3c", + "name": "control_0_index_pattern", + "type": "index-pattern" + }, + { + "id": "a0f483a0-3dc9-11e8-8660-4d65aa086b3c", + "name": "control_1_index_pattern", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2018-04-17T15:06:31.124Z", + "version": "WzIyOSwxXQ==" +} + +{ + "attributes": { + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" + }, + "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", + "panelsJSON": "[]", + "timeRestore": false, + "title": "2", + "version": 1 + }, + "coreMigrationVersion": "8.0.1", + "id": "46c8b580-3dd4-11e8-b2b9-5d5dc1715159", + "migrationVersion": { + "dashboard": "8.0.1" + }, + "references": [], + "type": "dashboard", + "updated_at": "2018-04-11T22:04:16.472Z", + "version": "WzIwMywxXQ==" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "vis with missing index pattern", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"type\":\"pie\",\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}}],\"params\":{\"type\":\"pie\",\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"isDonut\":true,\"labels\":{\"show\":false,\"values\":true,\"last_level\":true,\"truncate\":100},\"palette\":{\"type\":\"palette\",\"name\":\"kibana_palette\"},\"distinctColors\":true},\"title\":\"vis with missing index pattern\"}" + }, + "coreMigrationVersion": "8.0.1", + "id": "47b5cf60-9e93-11ea-853e-adc0effaf76d", + "migrationVersion": { + "visualization": "8.0.0" + }, + "references": [ + { + "id": "1b1789d0-9e93-11ea-853e-adc0effaf76d", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2020-05-25T15:16:27.743Z", + "version": "WzI2OCwxXQ==" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[{\"meta\":{\"field\":\"isDog\",\"negate\":false,\"disabled\":false,\"alias\":null,\"type\":\"phrase\",\"key\":\"isDog\",\"value\":\"true\",\"params\":{\"value\":true},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"script\":{\"script\":{\"inline\":\"boolean compare(Supplier s, def v) {return s.get() == v;}compare(() -> { return doc['animal.keyword'].value == 'dog' }, params.value);\",\"lang\":\"painless\",\"params\":{\"value\":true}}},\"$state\":{\"store\":\"appState\"}}],\"query\":{\"query\":\"weightLbs:>40\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Rendering Test: scripted filter and query", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Rendering Test: scripted filter and query\",\"type\":\"pie\",\"params\":{\"type\":\"pie\",\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"isDonut\":true,\"labels\":{\"show\":false,\"values\":true,\"last_level\":true,\"truncate\":100},\"palette\":{\"type\":\"palette\",\"name\":\"kibana_palette\"},\"distinctColors\":true},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"segment\",\"params\":{\"field\":\"sound.keyword\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\"}}]}" + }, + "coreMigrationVersion": "8.0.1", + "id": "4c0c3f90-3e5a-11e8-9fc3-39e49624228e", + "migrationVersion": { + "visualization": "8.0.0" + }, + "references": [ + { + "id": "a0f483a0-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + }, + { + "id": "a0f483a0-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2018-04-17T15:06:33.166Z", + "version": "WzI0MCwxXQ==" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{}" + }, + "title": "Rendering Test: markdown", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Rendering Test: markdown\",\"type\":\"markdown\",\"params\":{\"fontSize\":20,\"openLinksInNewTab\":false,\"markdown\":\"I'm a markdown!\"},\"aggs\":[]}" + }, + "coreMigrationVersion": "8.0.1", + "id": "4c0f47e0-3dcd-11e8-8660-4d65aa086b3c", + "migrationVersion": { + "visualization": "8.0.0" + }, + "references": [], + "type": "visualization", + "updated_at": "2018-04-17T15:06:31.111Z", + "version": "WzIyNiwxXQ==" +} + +{ + "attributes": { + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" + }, + "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", + "panelsJSON": "[]", + "timeRestore": false, + "title": "zz", + "version": 1 + }, + "coreMigrationVersion": "8.0.1", + "id": "4f0fd980-3dd4-11e8-b2b9-5d5dc1715159", + "migrationVersion": { + "dashboard": "8.0.1" + }, + "references": [], + "type": "dashboard", + "updated_at": "2018-04-11T22:04:30.360Z", + "version": "WzIwMSwxXQ==" +} + +{ + "attributes": { + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"language\":\"kuery\",\"query\":\"\"},\"filter\":[]}" + }, + "optionsJSON": "{\"hidePanelTitles\":false,\"useMargins\":true}", + "panelsJSON": "[{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":0,\"w\":24,\"h\":15,\"i\":\"6cfbe6cc-1872-4cb4-9455-a02eeb75127e\"},\"panelIndex\":\"6cfbe6cc-1872-4cb4-9455-a02eeb75127e\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_6cfbe6cc-1872-4cb4-9455-a02eeb75127e\"}]", + "timeRestore": false, + "title": "dashboard with missing index pattern", + "version": 1 + }, + "coreMigrationVersion": "8.0.1", + "id": "502e63a0-9e93-11ea-853e-adc0effaf76d", + "migrationVersion": { + "dashboard": "8.0.1" + }, + "references": [ + { + "id": "47b5cf60-9e93-11ea-853e-adc0effaf76d", + "name": "6cfbe6cc-1872-4cb4-9455-a02eeb75127e:panel_6cfbe6cc-1872-4cb4-9455-a02eeb75127e", + "type": "visualization" + } + ], + "type": "dashboard", + "updated_at": "2020-05-25T15:16:27.743Z", + "version": "WzI2OSwxXQ==" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Rendering Test: animal sounds pie", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Rendering Test: animal sounds pie\",\"type\":\"pie\",\"params\":{\"type\":\"pie\",\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"isDonut\":true,\"labels\":{\"show\":false,\"values\":true,\"last_level\":true,\"truncate\":100},\"palette\":{\"type\":\"palette\",\"name\":\"kibana_palette\"},\"distinctColors\":true},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"segment\",\"params\":{\"field\":\"sound.keyword\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\"}}]}" + }, + "coreMigrationVersion": "8.0.1", + "id": "50643b60-3dd3-11e8-b2b9-5d5dc1715159", + "migrationVersion": { + "visualization": "8.0.0" + }, + "references": [ + { + "id": "a0f483a0-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2018-04-17T15:06:34.195Z", + "version": "WzI0MSwxXQ==" +} + +{ + "attributes": { + "columns": [ + "agent", + "bytes", + "clientip" + ], + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"highlightAll\":true,\"version\":true,\"query\":{\"query\":\"clientip : 73.14.212.83\",\"language\":\"kuery\"},\"filter\":[{\"meta\":{\"negate\":false,\"disabled\":false,\"alias\":null,\"type\":\"range\",\"key\":\"bytes\",\"value\":\"100 to 1,000\",\"params\":{\"gte\":100,\"lt\":1000},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"range\":{\"bytes\":{\"gte\":100,\"lt\":1000}},\"$state\":{\"store\":\"appState\"}}],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "sort": [ + [ + "@timestamp", + "desc" + ] + ], + "title": "Bytes and kuery in saved search with filter", + "version": 1 + }, + "coreMigrationVersion": "8.0.1", + "id": "55d37a30-4197-11e8-bb13-d53698fb349a", + "migrationVersion": { + "search": "8.0.0" + }, + "references": [ + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + }, + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "type": "index-pattern" + } + ], + "type": "search", + "updated_at": "2018-04-16T16:58:07.059Z", + "version": "WzIxNywxXQ==" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"bytes:>9000\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Filter Bytes Test: split by geo with query", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Filter Bytes Test: split by geo with query\",\"type\":\"pie\",\"params\":{\"type\":\"pie\",\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"isDonut\":true,\"labels\":{\"show\":false,\"values\":true,\"last_level\":true,\"truncate\":100},\"palette\":{\"type\":\"palette\",\"name\":\"kibana_palette\"},\"distinctColors\":true},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"sum\",\"schema\":\"metric\",\"params\":{\"field\":\"bytes\"}},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"segment\",\"params\":{\"field\":\"geo.src\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\"}}]}" + }, + "coreMigrationVersion": "8.0.1", + "id": "584c0300-4191-11e8-bb13-d53698fb349a", + "migrationVersion": { + "visualization": "8.0.0" + }, + "references": [ + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2018-04-17T18:36:30.315Z", + "version": "WzI1OSwxXQ==" +} + +{ + "attributes": { + "columns": [ + "animal", + "isDog", + "name", + "sound", + "weightLbs" + ], + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"highlightAll\":true,\"version\":true,\"query\":{\"language\":\"lucene\",\"query\":\"weightLbs:>40\"},\"filter\":[],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "sort": [ + [ + "weightLbs", + "desc" + ] + ], + "title": "animal weights", + "version": 1 + }, + "coreMigrationVersion": "8.0.1", + "id": "a16d1990-3dca-11e8-8660-4d65aa086b3c", + "migrationVersion": { + "search": "8.0.0" + }, + "references": [ + { + "id": "a0f483a0-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "search", + "updated_at": "2018-04-11T20:55:26.317Z", + "version": "WzE4NiwxXQ==" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"}}" + }, + "savedSearchRefName": "search_0", + "title": "Rendering Test: animal weights linked to search", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Rendering Test: animal weights linked to search\",\"type\":\"pie\",\"params\":{\"type\":\"pie\",\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"isDonut\":true,\"labels\":{\"show\":false,\"values\":true,\"last_level\":true,\"truncate\":100},\"palette\":{\"type\":\"palette\",\"name\":\"kibana_palette\"},\"distinctColors\":true},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"segment\",\"params\":{\"field\":\"name.keyword\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\"}}]}" + }, + "coreMigrationVersion": "8.0.1", + "id": "771b4f10-3e59-11e8-9fc3-39e49624228e", + "migrationVersion": { + "visualization": "8.0.0" + }, + "references": [ + { + "id": "a16d1990-3dca-11e8-8660-4d65aa086b3c", + "name": "search_0", + "type": "search" + } + ], + "type": "visualization", + "updated_at": "2018-04-17T15:06:34.200Z", + "version": "WzI0MiwxXQ==" +} + +{ + "attributes": { + "description": "dashboard with scripted filter, negated filter and query", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"language\":\"lucene\",\"query\":\"weightLbs:<50\"},\"filter\":[{\"$state\":{\"store\":\"appState\"},\"meta\":{\"alias\":null,\"disabled\":false,\"key\":\"name.keyword\",\"negate\":true,\"params\":{\"query\":\"Fee Fee\",\"type\":\"phrase\"},\"type\":\"phrase\",\"value\":\"Fee Fee\",\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"query\":{\"match\":{\"name.keyword\":{\"query\":\"Fee Fee\",\"type\":\"phrase\"}}}},{\"$state\":{\"store\":\"appState\"},\"meta\":{\"alias\":\"is dog\",\"disabled\":false,\"field\":\"isDog\",\"key\":\"isDog\",\"negate\":false,\"params\":{\"value\":true},\"type\":\"phrase\",\"value\":\"true\",\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[1].meta.index\"},\"script\":{\"script\":{\"inline\":\"boolean compare(Supplier s, def v) {return s.get() == v;}compare(() -> { return doc['animal.keyword'].value == 'dog' }, params.value);\",\"lang\":\"painless\",\"params\":{\"value\":true}}}}],\"highlightAll\":true,\"version\":true}" + }, + "optionsJSON": "{\"darkTheme\":true,\"hidePanelTitles\":false,\"useMargins\":true}", + "panelsJSON": "[{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":0,\"w\":24,\"h\":15,\"i\":\"1\"},\"panelIndex\":\"1\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_1\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":0,\"w\":24,\"h\":15,\"i\":\"3\"},\"panelIndex\":\"3\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_3\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":15,\"w\":24,\"h\":15,\"i\":\"4\"},\"panelIndex\":\"4\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_4\"}]", + "refreshInterval": { + "display": "Off", + "pause": false, + "section": 0, + "value": 0 + }, + "timeFrom": "Wed Apr 12 2017 10:06:21 GMT-0400", + "timeRestore": true, + "timeTo": "Thu Apr 12 2018 10:06:21 GMT-0400", + "title": "filters", + "version": 1 + }, + "coreMigrationVersion": "8.0.1", + "id": "5bac3a80-3e5b-11e8-9fc3-39e49624228e", + "migrationVersion": { + "dashboard": "8.0.1" + }, + "references": [ + { + "id": "a0f483a0-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "type": "index-pattern" + }, + { + "id": "a0f483a0-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[1].meta.index", + "type": "index-pattern" + }, + { + "id": "771b4f10-3e59-11e8-9fc3-39e49624228e", + "name": "1:panel_1", + "type": "visualization" + }, + { + "id": "4c0c3f90-3e5a-11e8-9fc3-39e49624228e", + "name": "3:panel_3", + "type": "visualization" + }, + { + "id": "50643b60-3dd3-11e8-b2b9-5d5dc1715159", + "name": "4:panel_4", + "type": "visualization" + } + ], + "type": "dashboard", + "updated_at": "2018-04-12T14:11:13.576Z", + "version": "WzIwOSwxXQ==" +} + +{ + "attributes": { + "fields": "[{\"name\":\"_id\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_score\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_source\",\"type\":\"_source\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"activity level\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"barking level\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"breed\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"breed.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"size\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"size.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"trainability\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true}]", + "title": "dogbreeds" + }, + "coreMigrationVersion": "8.0.1", + "id": "f908c8e0-3e6d-11e8-bbb9-e15942d5d48c", + "migrationVersion": { + "index-pattern": "8.0.0" + }, + "references": [], + "type": "index-pattern", + "updated_at": "2018-04-12T16:24:29.357Z", + "version": "WzIxMCwxXQ==" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"query\":{\"language\":\"lucene\",\"query\":\"\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "non timebased line chart - dog data", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"non timebased line chart - dog data\",\"type\":\"line\",\"params\":{\"type\":\"line\",\"grid\":{\"categoryLines\":false,\"style\":{\"color\":\"#eee\"}},\"categoryAxes\":[{\"id\":\"CategoryAxis-1\",\"type\":\"category\",\"position\":\"bottom\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\"},\"labels\":{\"show\":true,\"truncate\":100,\"filter\":true},\"title\":{}}],\"valueAxes\":[{\"id\":\"ValueAxis-1\",\"name\":\"LeftAxis-1\",\"type\":\"value\",\"position\":\"left\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\",\"mode\":\"normal\"},\"labels\":{\"show\":true,\"rotate\":0,\"filter\":false,\"truncate\":100},\"title\":{\"text\":\"Max trainability\"}}],\"seriesParams\":[{\"show\":\"true\",\"type\":\"line\",\"mode\":\"normal\",\"data\":{\"label\":\"Max trainability\",\"id\":\"1\"},\"valueAxis\":\"ValueAxis-1\",\"drawLinesBetweenPoints\":true,\"showCircles\":true},{\"show\":true,\"mode\":\"normal\",\"type\":\"line\",\"drawLinesBetweenPoints\":true,\"showCircles\":true,\"data\":{\"id\":\"3\",\"label\":\"Max barking level\"},\"valueAxis\":\"ValueAxis-1\"},{\"show\":true,\"mode\":\"normal\",\"type\":\"line\",\"drawLinesBetweenPoints\":true,\"showCircles\":true,\"data\":{\"id\":\"4\",\"label\":\"Max activity level\"},\"valueAxis\":\"ValueAxis-1\"}],\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"times\":[],\"addTimeMarker\":false,\"palette\":{\"type\":\"palette\",\"name\":\"kibana_palette\"},\"isVislibVis\":true,\"detailedTooltip\":true,\"fittingFunction\":\"zero\"},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"max\",\"schema\":\"metric\",\"params\":{\"field\":\"trainability\"}},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"segment\",\"params\":{\"field\":\"breed.keyword\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\"}},{\"id\":\"3\",\"enabled\":true,\"type\":\"max\",\"schema\":\"metric\",\"params\":{\"field\":\"barking level\"}},{\"id\":\"4\",\"enabled\":true,\"type\":\"max\",\"schema\":\"metric\",\"params\":{\"field\":\"activity level\"}}]}" + }, + "coreMigrationVersion": "8.0.1", + "id": "5e085850-3e6e-11e8-bbb9-e15942d5d48c", + "migrationVersion": { + "visualization": "8.0.0" + }, + "references": [ + { + "id": "f908c8e0-3e6d-11e8-bbb9-e15942d5d48c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2018-04-12T16:27:17.973Z", + "version": "WzIxMSwxXQ==" +} + +{ + "attributes": { + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" + }, + "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", + "panelsJSON": "[]", + "timeRestore": false, + "title": "zz 2", + "version": 1 + }, + "coreMigrationVersion": "8.0.1", + "id": "60659030-3dd4-11e8-b2b9-5d5dc1715159", + "migrationVersion": { + "dashboard": "8.0.1" + }, + "references": [], + "type": "dashboard", + "updated_at": "2018-04-11T22:04:59.443Z", + "version": "WzE5NiwxXQ==" +} + +{ + "attributes": { + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[{\"meta\":{\"negate\":false,\"disabled\":false,\"alias\":null,\"type\":\"phrase\",\"key\":\"animal\",\"value\":\"dog\",\"params\":{\"query\":\"dog\",\"type\":\"phrase\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"query\":{\"match\":{\"animal\":{\"query\":\"dog\",\"type\":\"phrase\"}}},\"$state\":{\"store\":\"appState\"}}],\"highlightAll\":true,\"version\":true}" + }, + "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", + "panelsJSON": "[{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"w\":24,\"h\":15,\"x\":0,\"y\":0,\"i\":\"1\"},\"panelIndex\":\"1\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_1\"},{\"version\":\"7.3.0\",\"type\":\"search\",\"gridData\":{\"w\":24,\"h\":15,\"x\":24,\"y\":0,\"i\":\"2\"},\"panelIndex\":\"2\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_2\"}]", + "refreshInterval": { + "display": "Off", + "pause": false, + "value": 0 + }, + "timeFrom": "Mon Apr 09 2018 17:56:08 GMT-0400", + "timeRestore": true, + "timeTo": "Wed Apr 11 2018 17:56:08 GMT-0400", + "title": "dashboard with filter", + "version": 1 + }, + "coreMigrationVersion": "8.0.1", + "id": "61c58ad0-3dd3-11e8-b2b9-5d5dc1715159", + "migrationVersion": { + "dashboard": "8.0.1" + }, + "references": [ + { + "id": "a0f483a0-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "type": "index-pattern" + }, + { + "id": "50643b60-3dd3-11e8-b2b9-5d5dc1715159", + "name": "1:panel_1", + "type": "visualization" + }, + { + "id": "a16d1990-3dca-11e8-8660-4d65aa086b3c", + "name": "2:panel_2", + "type": "search" + } + ], + "type": "dashboard", + "updated_at": "2018-04-11T21:57:52.253Z", + "version": "WzE4OCwxXQ==" +} + +{ + "attributes": { + "columns": [ + "animal", + "sound", + "weightLbs" + ], + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"highlightAll\":true,\"version\":true,\"query\":{\"language\":\"lucene\",\"query\":\"weightLbs:>10\"},\"filter\":[{\"meta\":{\"negate\":false,\"disabled\":false,\"alias\":null,\"type\":\"phrase\",\"key\":\"sound.keyword\",\"value\":\"growl\",\"params\":{\"query\":\"growl\",\"type\":\"phrase\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"query\":{\"match\":{\"sound.keyword\":{\"query\":\"growl\",\"type\":\"phrase\"}}},\"$state\":{\"store\":\"appState\"}}],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "sort": [ + [ + "@timestamp", + "desc" + ] + ], + "title": "Search created in 6.2", + "version": 1 + }, + "coreMigrationVersion": "8.0.1", + "id": "6351c590-53cb-11e8-b481-c9426d020fcd", + "migrationVersion": { + "search": "8.0.0" + }, + "references": [ + { + "id": "a0f483a0-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + }, + { + "id": "a0f483a0-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "type": "index-pattern" + } + ], + "type": "search", + "updated_at": "2018-05-09T20:56:04.457Z", + "version": "WzI2NywxXQ==" +} + +{ + "attributes": { + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" + }, + "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", + "panelsJSON": "[]", + "timeRestore": false, + "title": "zz 3", + "version": 1 + }, + "coreMigrationVersion": "8.0.1", + "id": "65227c00-3dd4-11e8-b2b9-5d5dc1715159", + "migrationVersion": { + "dashboard": "8.0.1" + }, + "references": [], + "type": "dashboard", + "updated_at": "2018-04-11T22:05:07.392Z", + "version": "WzE5NywxXQ==" +} + +{ + "attributes": { + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" + }, + "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", + "panelsJSON": "[]", + "timeRestore": false, + "title": "zz 4", + "version": 1 + }, + "coreMigrationVersion": "8.0.1", + "id": "6803a2f0-3dd4-11e8-b2b9-5d5dc1715159", + "migrationVersion": { + "dashboard": "8.0.1" + }, + "references": [], + "type": "dashboard", + "updated_at": "2018-04-11T22:05:12.223Z", + "version": "WzE5OCwxXQ==" +} + +{ + "attributes": { + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" + }, + "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", + "panelsJSON": "[]", + "timeRestore": false, + "title": "zz 5", + "version": 1 + }, + "coreMigrationVersion": "8.0.1", + "id": "6b18f940-3dd4-11e8-b2b9-5d5dc1715159", + "migrationVersion": { + "dashboard": "8.0.1" + }, + "references": [], + "type": "dashboard", + "updated_at": "2018-04-11T22:05:17.396Z", + "version": "WzE5OSwxXQ==" +} + +{ + "attributes": { + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" + }, + "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", + "panelsJSON": "[]", + "timeRestore": false, + "title": "dashboard-name-has-dashes", + "version": 1 + }, + "coreMigrationVersion": "8.0.1", + "id": "6c0b16e0-3dd3-11e8-b2b9-5d5dc1715159", + "migrationVersion": { + "dashboard": "8.0.1" + }, + "references": [], + "type": "dashboard", + "updated_at": "2018-04-11T21:58:09.486Z", + "version": "WzE5MiwxXQ==" +} + +{ + "attributes": { + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" + }, + "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", + "panelsJSON": "[]", + "timeRestore": false, + "title": "zz 6", + "version": 1 + }, + "coreMigrationVersion": "8.0.1", + "id": "6e12ff60-3dd4-11e8-b2b9-5d5dc1715159", + "migrationVersion": { + "dashboard": "8.0.1" + }, + "references": [], + "type": "dashboard", + "updated_at": "2018-04-11T22:05:22.390Z", + "version": "WzIwMCwxXQ==" +} + +{ + "attributes": { + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\n \"query\": {\n \"language\": \"kuery\",\n \"query\": \"\"\n },\n \"filter\": [\n {\n \"meta\": {\n \"alias\": null,\n \"negate\": false,\n \"disabled\": true,\n \"type\": \"phrase\",\n \"key\": \"name\",\n \"params\": {\n \"query\": \"moo\"\n },\n \"indexRefName\": \"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"\n },\n \"query\": {\n \"match_phrase\": {\n \"name\": \"moo\"\n }\n },\n \"$state\": {\n \"store\": \"appState\"\n }\n },\n {\n \"meta\": {\n \"alias\": null,\n \"negate\": false,\n \"disabled\": true,\n \"type\": \"phrase\",\n \"key\": \"baad-field\",\n \"params\": {\n \"query\": \"moo\"\n },\n \"indexRefName\": \"kibanaSavedObjectMeta.searchSourceJSON.filter[1].meta.index\"\n },\n \"query\": {\n \"match_phrase\": {\n \"baad-field\": \"moo\"\n }\n },\n \"$state\": {\n \"store\": \"appState\"\n }\n },\n {\n \"meta\": {\n \"alias\": null,\n \"negate\": false,\n \"disabled\": false,\n \"type\": \"phrase\",\n \"key\": \"@timestamp\",\n \"params\": {\n \"query\": \"123\"\n },\n \"indexRefName\": \"kibanaSavedObjectMeta.searchSourceJSON.filter[2].meta.index\"\n },\n \"query\": {\n \"match_phrase\": {\n \"@timestamp\": \"123\"\n }\n },\n \"$state\": {\n \"store\": \"appState\"\n }\n },\n {\n \"meta\": {\n \"alias\": null,\n \"negate\": false,\n \"disabled\": false,\n \"type\": \"exists\",\n \"key\": \"extension\",\n \"value\": \"exists\",\n \"indexRefName\": \"kibanaSavedObjectMeta.searchSourceJSON.filter[3].meta.index\"\n },\n \"exists\": {\n \"field\": \"extension\"\n },\n \"$state\": {\n \"store\": \"appState\"\n }\n },\n {\n \"meta\": {\n \"alias\": null,\n \"negate\": false,\n \"disabled\": false,\n \"type\": \"phrase\",\n \"key\": \"banana\",\n \"params\": {\n \"query\": \"yellow\"\n }\n },\n \"query\": {\n \"match_phrase\": {\n \"banana\": \"yellow\"\n }\n },\n \"$state\": {\n \"store\": \"appState\"\n }\n }\n ]\n}" + }, + "optionsJSON": "{\n \"hidePanelTitles\": false,\n \"useMargins\": true\n}", + "panelsJSON": "[{\"version\":\"8.0.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":0,\"w\":24,\"h\":15,\"i\":\"94a3dc1d-508a-4d42-a480-65b158925ba0\"},\"panelIndex\":\"94a3dc1d-508a-4d42-a480-65b158925ba0\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_94a3dc1d-508a-4d42-a480-65b158925ba0\"}]", + "refreshInterval": { + "pause": true, + "value": 0 + }, + "timeFrom": "now-10y", + "timeRestore": true, + "timeTo": "now", + "title": "dashboard with bad filters", + "version": 1 + }, + "coreMigrationVersion": "8.0.1", + "id": "6eb8a840-a32e-11ea-88c2-d56dd2b14bd7", + "migrationVersion": { + "dashboard": "8.0.1" + }, + "references": [ + { + "id": "a0f483a0-3dc9-11e8-8660-bad-index", + "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "type": "index-pattern" + }, + { + "id": "a0f483a0-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[1].meta.index", + "type": "index-pattern" + }, + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[2].meta.index", + "type": "index-pattern" + }, + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[3].meta.index", + "type": "index-pattern" + }, + { + "id": "a0f483a0-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[4].meta.index", + "type": "index-pattern" + }, + { + "id": "50643b60-3dd3-11e8-b2b9-5d5dc1715159", + "name": "94a3dc1d-508a-4d42-a480-65b158925ba0:panel_94a3dc1d-508a-4d42-a480-65b158925ba0", + "type": "visualization" + } + ], + "type": "dashboard", + "updated_at": "2020-06-04T09:26:04.272Z", + "version": "WzI3MCwxXQ==" +} + +{ + "attributes": { + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" + }, + "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", + "panelsJSON": "[]", + "timeRestore": false, + "title": "zz 7", + "version": 1 + }, + "coreMigrationVersion": "8.0.1", + "id": "708fe640-3dd4-11e8-b2b9-5d5dc1715159", + "migrationVersion": { + "dashboard": "8.0.1" + }, + "references": [], + "type": "dashboard", + "updated_at": "2018-04-11T22:05:26.564Z", + "version": "WzIwNCwxXQ==" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[{\"meta\":{\"negate\":false,\"disabled\":false,\"alias\":null,\"type\":\"phrase\",\"key\":\"geo.src\",\"value\":\"US\",\"params\":{\"query\":\"US\",\"type\":\"phrase\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"query\":{\"match\":{\"geo.src\":{\"query\":\"US\",\"type\":\"phrase\"}}},\"$state\":{\"store\":\"appState\"}}],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Filter Bytes Test: max bytes in US - area chart with filter", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Filter Bytes Test: max bytes in US - area chart with filter\",\"type\":\"area\",\"params\":{\"type\":\"area\",\"grid\":{\"categoryLines\":false,\"style\":{\"color\":\"#eee\"}},\"categoryAxes\":[{\"id\":\"CategoryAxis-1\",\"type\":\"category\",\"position\":\"bottom\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\"},\"labels\":{\"show\":true,\"truncate\":100,\"filter\":true},\"title\":{}}],\"valueAxes\":[{\"id\":\"ValueAxis-1\",\"name\":\"LeftAxis-1\",\"type\":\"value\",\"position\":\"left\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\",\"mode\":\"normal\"},\"labels\":{\"show\":true,\"rotate\":0,\"filter\":false,\"truncate\":100},\"title\":{\"text\":\"Max bytes\"}}],\"seriesParams\":[{\"show\":\"true\",\"type\":\"area\",\"mode\":\"stacked\",\"data\":{\"label\":\"Max bytes\",\"id\":\"1\"},\"drawLinesBetweenPoints\":true,\"showCircles\":true,\"interpolate\":\"linear\",\"valueAxis\":\"ValueAxis-1\"}],\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"times\":[],\"addTimeMarker\":false,\"palette\":{\"type\":\"palette\",\"name\":\"kibana_palette\"},\"isVislibVis\":true,\"detailedTooltip\":true,\"fittingFunction\":\"zero\"},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"max\",\"schema\":\"metric\",\"params\":{\"field\":\"bytes\"}},{\"id\":\"2\",\"enabled\":true,\"type\":\"date_histogram\",\"schema\":\"segment\",\"params\":{\"field\":\"@timestamp\",\"interval\":\"auto\",\"min_doc_count\":1,\"extended_bounds\":{}}}]}" + }, + "coreMigrationVersion": "8.0.1", + "id": "760a9060-4190-11e8-bb13-d53698fb349a", + "migrationVersion": { + "visualization": "8.0.0" + }, + "references": [ + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + }, + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2018-04-17T15:06:35.235Z", + "version": "WzI0NiwxXQ==" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{}" + }, + "title": "Filter Bytes Test: tsvb top n with bytes filter", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Filter Bytes Test: tsvb top n with bytes filter\",\"type\":\"metrics\",\"aggs\":[],\"params\":{\"time_range_mode\":\"last_value\",\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\",\"type\":\"top_n\",\"series\":[{\"time_range_mode\":\"entire_time_range\",\"id\":\"61ca57f1-469d-11e7-af02-69e470af7417\",\"color\":\"#68BC00\",\"split_mode\":\"filters\",\"metrics\":[{\"id\":\"482d6560-4194-11e8-a461-7d278185cba4\",\"type\":\"avg\",\"field\":\"bytes\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"terms_field\":\"clientip\",\"filter\":{\"query\":\"Filter Bytes Test:>1000\",\"language\":\"lucene\"},\"override_index_pattern\":0,\"series_index_pattern\":\"logstash-*\",\"series_time_field\":\"utc_time\",\"series_interval\":\"1m\",\"value_template\":\"\",\"split_filters\":[{\"filter\":{\"query\":\"Filter Bytes Test:>100\",\"language\":\"lucene\"},\"label\":\"\",\"color\":\"#68BC00\",\"id\":\"39a107e0-4194-11e8-a461-7d278185cba4\"}],\"split_color_mode\":\"gradient\"},{\"time_range_mode\":\"entire_time_range\",\"id\":\"4fd5b150-4194-11e8-a461-7d278185cba4\",\"color\":\"#68BC00\",\"split_mode\":\"everything\",\"metrics\":[{\"id\":\"4fd5b151-4194-11e8-a461-7d278185cba4\",\"type\":\"avg\",\"field\":\"bytes\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"filter\":{\"query\":\"Filter Bytes Test:>3000\",\"language\":\"lucene\"},\"split_color_mode\":\"gradient\"}],\"time_field\":\"@timestamp\",\"index_pattern\":\"logstash-*\",\"interval\":\"auto\",\"axis_position\":\"left\",\"axis_formatter\":\"number\",\"show_legend\":1,\"show_grid\":1,\"background_color_rules\":[{\"id\":\"06893260-4194-11e8-a461-7d278185cba4\"}],\"bar_color_rules\":[{\"id\":\"36a0e740-4194-11e8-a461-7d278185cba4\"}],\"use_kibana_indexes\":false,\"hide_last_value_indicator\":true,\"axis_scale\":\"normal\",\"truncate_legend\":1,\"max_lines_legend\":1,\"tooltip_mode\":\"show_all\",\"drop_last_bucket\":1,\"isModelInvalid\":false}}" + }, + "coreMigrationVersion": "8.0.1", + "id": "76c7f020-4194-11e8-bb13-d53698fb349a", + "migrationVersion": { + "visualization": "8.0.0" + }, + "references": [], + "type": "visualization", + "updated_at": "2018-04-17T15:06:34.583Z", + "version": "WzI0MywxXQ==" +} + +{ + "attributes": { + "description": "and_descriptions_has_underscores", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" + }, + "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", + "panelsJSON": "[]", + "timeRestore": false, + "title": "dashboard_with_underscores", + "version": 1 + }, + "coreMigrationVersion": "8.0.1", + "id": "76d03330-3dd3-11e8-b2b9-5d5dc1715159", + "migrationVersion": { + "dashboard": "8.0.1" + }, + "references": [], + "type": "dashboard", + "updated_at": "2018-04-11T21:58:27.555Z", + "version": "WzE5MCwxXQ==" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Rendering Test: tag cloud", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Rendering Test: tag cloud\",\"type\":\"tagcloud\",\"params\":{\"scale\":\"linear\",\"orientation\":\"single\",\"minFontSize\":18,\"maxFontSize\":72,\"showLabel\":true},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"segment\",\"params\":{\"field\":\"geo.src\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\"}}]}" + }, + "coreMigrationVersion": "8.0.1", + "id": "78803be0-3dcd-11e8-8660-4d65aa086b3c", + "migrationVersion": { + "visualization": "8.0.0" + }, + "references": [ + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2018-04-17T15:06:32.127Z", + "version": "WzIxOSwxXQ==" +} + +{ + "attributes": { + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" + }, + "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", + "panelsJSON": "[]", + "timeRestore": false, + "title": "Hi i have a lot of words in my dashboard name! It's pretty long i wonder what it'll look like", + "version": 1 + }, + "coreMigrationVersion": "8.0.1", + "id": "7b8d50a0-3dd4-11e8-b2b9-5d5dc1715159", + "migrationVersion": { + "dashboard": "8.0.1" + }, + "references": [], + "type": "dashboard", + "updated_at": "2018-04-11T22:05:45.002Z", + "version": "WzIwNSwxXQ==" +} + +{ + "attributes": { + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" + }, + "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", + "panelsJSON": "[]", + "timeRestore": false, + "title": "bye", + "version": 1 + }, + "coreMigrationVersion": "8.0.1", + "id": "7e42d3b0-3dd4-11e8-b2b9-5d5dc1715159", + "migrationVersion": { + "dashboard": "8.0.1" + }, + "references": [], + "type": "dashboard", + "updated_at": "2018-04-11T22:05:49.547Z", + "version": "WzIwNiwxXQ==" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{}" + }, + "title": "Rendering Test: vega", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Rendering Test: vega\",\"type\":\"vega\",\"params\":{\"spec\":\"{\\n/*\\n\\nWelcome to Vega visualizations. Here you can design your own dataviz from scratch using a declarative language called Vega, or its simpler form Vega-Lite. In Vega, you have the full control of what data is loaded, even from multiple sources, how that data is transformed, and what visual elements are used to show it. Use help icon to view Vega examples, tutorials, and other docs. Use the wrench icon to reformat this text, or to remove comments.\\n\\nThis example graph shows the document count in all indexes in the current time range. You might need to adjust the time filter in the upper right corner.\\n*/\\n\\n $schema: https://vega.github.io/schema/vega-lite/v2.json\\n title: Event counts from all indexes\\n\\n // Define the data source\\n data: {\\n url: {\\n/*\\nAn object instead of a string for the \\\"url\\\" param is treated as an Elasticsearch query. Anything inside this object is not part of the Vega language, but only understood by Kibana and Elasticsearch server. This query counts the number of documents per time interval, assuming you have a @timestamp field in your data.\\n\\nKibana has a special handling for the fields surrounded by \\\"%\\\". They are processed before the the query is sent to Elasticsearch. This way the query becomes context aware, and can use the time range and the dashboard filters.\\n*/\\n\\n // Apply dashboard context filters when set\\n %context%: true\\n // Filter the time picker (upper right corner) with this field\\n %timefield%: @timestamp\\n\\n/*\\nSee .search() documentation for : https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-search\\n*/\\n\\n // Which index to search\\n index: _all\\n // Aggregate data by the time field into time buckets, counting the number of documents in each bucket.\\n body: {\\n aggs: {\\n time_buckets: {\\n date_histogram: {\\n // Use date histogram aggregation on @timestamp field\\n field: @timestamp\\n // The interval value will depend on the daterange picker (true), or use an integer to set an approximate bucket count\\n interval: {%autointerval%: true}\\n // Make sure we get an entire range, even if it has no data\\n extended_bounds: {\\n // Use the current time range's start and end\\n min: {%timefilter%: \\\"min\\\"}\\n max: {%timefilter%: \\\"max\\\"}\\n }\\n // Use this for linear (e.g. line, area) graphs. Without it, empty buckets will not show up\\n min_doc_count: 0\\n }\\n }\\n }\\n // Speed up the response by only including aggregation results\\n size: 0\\n }\\n }\\n/*\\nElasticsearch will return results in this format:\\n\\naggregations: {\\n time_buckets: {\\n buckets: [\\n {\\n key_as_string: 2015-11-30T22:00:00.000Z\\n key: 1448920800000\\n doc_count: 0\\n },\\n {\\n key_as_string: 2015-11-30T23:00:00.000Z\\n key: 1448924400000\\n doc_count: 0\\n }\\n ...\\n ]\\n }\\n}\\n\\nFor our graph, we only need the list of bucket values. Use the format.property to discard everything else.\\n*/\\n format: {property: \\\"aggregations.time_buckets.buckets\\\"}\\n }\\n\\n // \\\"mark\\\" is the graphics element used to show our data. Other mark values are: area, bar, circle, line, point, rect, rule, square, text, and tick. See https://vega.github.io/vega-lite/docs/mark.html\\n mark: line\\n\\n // \\\"encoding\\\" tells the \\\"mark\\\" what data to use and in what way. See https://vega.github.io/vega-lite/docs/encoding.html\\n encoding: {\\n x: {\\n // The \\\"key\\\" value is the timestamp in milliseconds. Use it for X axis.\\n field: key\\n type: temporal\\n axis: {title: false} // Customize X axis format\\n }\\n y: {\\n // The \\\"doc_count\\\" is the count per bucket. Use it for Y axis.\\n field: doc_count\\n type: quantitative\\n axis: {title: \\\"Document count\\\"}\\n }\\n }\\n}\\n\"},\"aggs\":[]}" + }, + "coreMigrationVersion": "8.0.1", + "id": "7fda8ee0-3dcd-11e8-8660-4d65aa086b3c", + "migrationVersion": { + "visualization": "8.0.0" + }, + "references": [], + "type": "visualization", + "updated_at": "2018-04-17T15:06:30.344Z", + "version": "WzIzMCwxXQ==" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Filter Bytes Test: Data table top hit with significant terms geo.src", + "uiStateJSON": "{\"vis\":{\"params\":{\"sort\":{\"columnIndex\":null,\"direction\":null}}}}", + "version": 1, + "visState": "{\"title\":\"Filter Bytes Test: Data table top hit with significant terms geo.src\",\"type\":\"table\",\"params\":{\"perPage\":10,\"showPartialRows\":false,\"showMeticsAtAllLevels\":false,\"sort\":{\"columnIndex\":null,\"direction\":null},\"showTotal\":false,\"totalFunc\":\"sum\",\"showToolbar\":true},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"top_hits\",\"schema\":\"metric\",\"params\":{\"field\":\"bytes\",\"aggregate\":\"average\",\"size\":1,\"sortField\":\"@timestamp\",\"sortOrder\":\"desc\"}},{\"id\":\"2\",\"enabled\":true,\"type\":\"significant_terms\",\"schema\":\"bucket\",\"params\":{\"field\":\"geo.src\",\"size\":10}}]}" + }, + "coreMigrationVersion": "8.0.1", + "id": "7ff2c4c0-4191-11e8-bb13-d53698fb349a", + "migrationVersion": { + "visualization": "8.0.0" + }, + "references": [ + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2018-04-17T15:06:36.270Z", + "version": "WzI1MCwxXQ==" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{}" + }, + "title": "Filter Bytes Test: vega", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Filter Bytes Test: vega\",\"type\":\"vega\",\"params\":{\"spec\":\"{ \\nconfig: { kibana: { renderer: \\\"svg\\\" }},\\n/*\\n\\nWelcome to Vega visualizations. Here you can design your own dataviz from scratch using a declarative language called Vega, or its simpler form Vega-Lite. In Vega, you have the full control of what data is loaded, even from multiple sources, how that data is transformed, and what visual elements are used to show it. Use help icon to view Vega examples, tutorials, and other docs. Use the wrench icon to reformat this text, or to remove comments.\\n\\nThis example graph shows the document count in all indexes in the current time range. You might need to adjust the time filter in the upper right corner.\\n*/\\n\\n $schema: https://vega.github.io/schema/vega-lite/v2.json\\n title: Event counts from all indexes\\n\\n // Define the data source\\n data: {\\n url: {\\n/*\\nAn object instead of a string for the \\\"url\\\" param is treated as an Elasticsearch query. Anything inside this object is not part of the Vega language, but only understood by Kibana and Elasticsearch server. This query counts the number of documents per time interval, assuming you have a @timestamp field in your data.\\n\\nKibana has a special handling for the fields surrounded by \\\"%\\\". They are processed before the the query is sent to Elasticsearch. This way the query becomes context aware, and can use the time range and the dashboard filters.\\n*/\\n\\n // Apply dashboard context filters when set\\n %context%: true\\n // Filter the time picker (upper right corner) with this field\\n %timefield%: @timestamp\\n\\n/*\\nSee .search() documentation for : https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-search\\n*/\\n\\n // Which index to search\\n index: _all\\n // Aggregate data by the time field into time buckets, counting the number of documents in each bucket.\\n body: {\\n aggs: {\\n time_buckets: {\\n date_histogram: {\\n // Use date histogram aggregation on @timestamp field\\n field: @timestamp\\n // The interval value will depend on the daterange picker (true), or use an integer to set an approximate bucket count\\n interval: {%autointerval%: true}\\n // Make sure we get an entire range, even if it has no data\\n extended_bounds: {\\n // Use the current time range's start and end\\n min: {%timefilter%: \\\"min\\\"}\\n max: {%timefilter%: \\\"max\\\"}\\n }\\n // Use this for linear (e.g. line, area) graphs. Without it, empty buckets will not show up\\n min_doc_count: 0\\n }\\n }\\n }\\n // Speed up the response by only including aggregation results\\n size: 0\\n }\\n }\\n/*\\nElasticsearch will return results in this format:\\n\\naggregations: {\\n time_buckets: {\\n buckets: [\\n {\\n key_as_string: 2015-11-30T22:00:00.000Z\\n key: 1448920800000\\n doc_count: 0\\n },\\n {\\n key_as_string: 2015-11-30T23:00:00.000Z\\n key: 1448924400000\\n doc_count: 0\\n }\\n ...\\n ]\\n }\\n}\\n\\nFor our graph, we only need the list of bucket values. Use the format.property to discard everything else.\\n*/\\n format: {property: \\\"aggregations.time_buckets.buckets\\\"}\\n }\\n\\n // \\\"mark\\\" is the graphics element used to show our data. Other mark values are: area, bar, circle, line, point, rect, rule, square, text, and tick. See https://vega.github.io/vega-lite/docs/mark.html\\n mark: line\\n\\n // \\\"encoding\\\" tells the \\\"mark\\\" what data to use and in what way. See https://vega.github.io/vega-lite/docs/encoding.html\\n encoding: {\\n x: {\\n // The \\\"key\\\" value is the timestamp in milliseconds. Use it for X axis.\\n field: key\\n type: temporal\\n axis: {title: false} // Customize X axis format\\n }\\n y: {\\n // The \\\"doc_count\\\" is the count per bucket. Use it for Y axis.\\n field: doc_count\\n type: quantitative\\n axis: {title: \\\"Document count\\\"}\\n }\\n }\\n}\\n\"},\"aggs\":[]}" + }, + "coreMigrationVersion": "8.0.1", + "id": "8090dcb0-4195-11e8-bb13-d53698fb349a", + "migrationVersion": { + "visualization": "8.0.0" + }, + "references": [], + "type": "visualization", + "updated_at": "2018-04-17T19:28:21.967Z", + "version": "WzI2MSwxXQ==" +} + +{ + "attributes": { + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" + }, + "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", + "panelsJSON": "[]", + "timeRestore": false, + "title": "last", + "version": 1 + }, + "coreMigrationVersion": "8.0.1", + "id": "846988b0-3dd4-11e8-b2b9-5d5dc1715159", + "migrationVersion": { + "dashboard": "8.0.1" + }, + "references": [], + "type": "dashboard", + "updated_at": "2018-04-11T22:05:59.867Z", + "version": "WzIwNywxXQ==" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[{\"meta\":{\"negate\":false,\"disabled\":false,\"alias\":null,\"type\":\"phrase\",\"key\":\"size.keyword\",\"value\":\"extra large\",\"params\":{\"query\":\"extra large\",\"type\":\"phrase\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"query\":{\"match\":{\"size.keyword\":{\"query\":\"extra large\",\"type\":\"phrase\"}}},\"$state\":{\"store\":\"appState\"}}],\"query\":{\"language\":\"lucene\",\"query\":\"\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Rendering Test: non timebased line chart - dog data - with filter", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"aggs\":[{\"enabled\":true,\"id\":\"1\",\"params\":{\"field\":\"trainability\"},\"schema\":\"metric\",\"type\":\"max\"},{\"enabled\":true,\"id\":\"2\",\"params\":{\"field\":\"breed.keyword\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"order\":\"desc\",\"orderBy\":\"1\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"size\":5},\"schema\":\"segment\",\"type\":\"terms\"},{\"enabled\":true,\"id\":\"3\",\"params\":{\"field\":\"barking level\"},\"schema\":\"metric\",\"type\":\"max\"},{\"enabled\":true,\"id\":\"4\",\"params\":{\"field\":\"activity level\"},\"schema\":\"metric\",\"type\":\"max\"}],\"params\":{\"addLegend\":true,\"addTimeMarker\":false,\"addTooltip\":true,\"categoryAxes\":[{\"id\":\"CategoryAxis-1\",\"labels\":{\"show\":true,\"truncate\":100,\"filter\":true},\"position\":\"bottom\",\"scale\":{\"type\":\"linear\"},\"show\":true,\"style\":{},\"title\":{},\"type\":\"category\"}],\"grid\":{\"categoryLines\":false,\"style\":{\"color\":\"#eee\"}},\"legendPosition\":\"right\",\"seriesParams\":[{\"data\":{\"id\":\"1\",\"label\":\"Max trainability\"},\"drawLinesBetweenPoints\":true,\"mode\":\"normal\",\"show\":\"true\",\"showCircles\":true,\"type\":\"line\",\"valueAxis\":\"ValueAxis-1\"},{\"data\":{\"id\":\"3\",\"label\":\"Max barking level\"},\"drawLinesBetweenPoints\":true,\"mode\":\"normal\",\"show\":true,\"showCircles\":true,\"type\":\"line\",\"valueAxis\":\"ValueAxis-1\"},{\"data\":{\"id\":\"4\",\"label\":\"Max activity level\"},\"drawLinesBetweenPoints\":true,\"mode\":\"normal\",\"show\":true,\"showCircles\":true,\"type\":\"line\",\"valueAxis\":\"ValueAxis-1\"}],\"times\":[],\"type\":\"line\",\"valueAxes\":[{\"id\":\"ValueAxis-1\",\"labels\":{\"filter\":false,\"rotate\":0,\"show\":true,\"truncate\":100},\"name\":\"LeftAxis-1\",\"position\":\"left\",\"scale\":{\"mode\":\"normal\",\"type\":\"linear\"},\"show\":true,\"style\":{},\"title\":{\"text\":\"Max trainability\"},\"type\":\"value\"}],\"palette\":{\"type\":\"palette\",\"name\":\"kibana_palette\"},\"isVislibVis\":true,\"detailedTooltip\":true,\"fittingFunction\":\"zero\"},\"title\":\"Rendering Test: non timebased line chart - dog data - with filter\",\"type\":\"line\"}" + }, + "coreMigrationVersion": "8.0.1", + "id": "8bc8d6c0-3e6e-11e8-bbb9-e15942d5d48c", + "migrationVersion": { + "visualization": "8.0.0" + }, + "references": [ + { + "id": "f908c8e0-3e6d-11e8-bbb9-e15942d5d48c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + }, + { + "id": "f908c8e0-3e6d-11e8-bbb9-e15942d5d48c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2018-04-17T15:06:31.173Z", + "version": "WzIyOCwxXQ==" +} + +{ + "attributes": { + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" + }, + "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", + "panelsJSON": "[]", + "timeRestore": false, + "title": "* hi & $%!!@# 漢字 ^--=++[]{};'~`~<>?,./:\";'\\|\\\\ special chars", + "version": 1 + }, + "coreMigrationVersion": "8.0.1", + "id": "9b780cd0-3dd3-11e8-b2b9-5d5dc1715159", + "migrationVersion": { + "dashboard": "8.0.1" + }, + "references": [], + "type": "dashboard", + "updated_at": "2018-04-11T22:00:07.322Z", + "version": "WzE5MSwxXQ==" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{}" + }, + "title": "Filter Bytes Test: timelion split 5 on bytes", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Filter Bytes Test: timelion split 5 on bytes\",\"type\":\"timelion\",\"params\":{\"expression\":\".es(*, split=bytes:5)\",\"interval\":\"auto\"},\"aggs\":[]}" + }, + "coreMigrationVersion": "8.0.1", + "id": "9bebe980-4192-11e8-bb13-d53698fb349a", + "migrationVersion": { + "visualization": "8.0.0" + }, + "references": [], + "type": "visualization", + "updated_at": "2018-04-17T15:59:42.648Z", + "version": "WzI1NCwxXQ==" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{}" + }, + "title": "Filter Bytes Test: tsvb markdown", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Filter Bytes Test: tsvb markdown\",\"type\":\"metrics\",\"aggs\":[],\"params\":{\"time_range_mode\":\"last_value\",\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\",\"type\":\"markdown\",\"series\":[{\"time_range_mode\":\"last_value\",\"id\":\"61ca57f1-469d-11e7-af02-69e470af7417\",\"color\":\"#68BC00\",\"split_mode\":\"filters\",\"metrics\":[{\"id\":\"482d6560-4194-11e8-a461-7d278185cba4\",\"type\":\"avg\",\"field\":\"bytes\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"terms_field\":\"clientip\",\"filter\":{\"query\":\"Filter Bytes Test:>1000\",\"language\":\"lucene\"},\"override_index_pattern\":0,\"series_index_pattern\":\"logstash-*\",\"series_time_field\":\"utc_time\",\"series_interval\":\"1m\",\"value_template\":\"\",\"split_filters\":[{\"filter\":{\"query\":\"bytes:>1000\",\"language\":\"lucene\"},\"label\":\"\",\"color\":\"#68BC00\",\"id\":\"39a107e0-4194-11e8-a461-7d278185cba4\"}],\"label\":\"\",\"var_name\":\"\",\"split_color_mode\":\"gradient\",\"series_drop_last_bucket\":1}],\"time_field\":\"@timestamp\",\"index_pattern\":\"logstash-*\",\"interval\":\"auto\",\"axis_position\":\"left\",\"axis_formatter\":\"number\",\"show_legend\":1,\"show_grid\":1,\"background_color_rules\":[{\"id\":\"06893260-4194-11e8-a461-7d278185cba4\"}],\"bar_color_rules\":[{\"id\":\"36a0e740-4194-11e8-a461-7d278185cba4\"}],\"markdown\":\"{{bytes_1000.last.formatted}}\",\"use_kibana_indexes\":false,\"hide_last_value_indicator\":true,\"axis_scale\":\"normal\",\"truncate_legend\":1,\"max_lines_legend\":1,\"tooltip_mode\":\"show_all\",\"drop_last_bucket\":1,\"isModelInvalid\":false}}" + }, + "coreMigrationVersion": "8.0.1", + "id": "9fb4c670-4194-11e8-bb13-d53698fb349a", + "migrationVersion": { + "visualization": "8.0.0" + }, + "references": [], + "type": "visualization", + "updated_at": "2018-04-17T16:32:59.086Z", + "version": "WzI1NywxXQ==" +} + +{ + "attributes": { + "description": "I have two visualizations that are created off a non time based index", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" + }, + "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", + "panelsJSON": "[{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"w\":24,\"h\":15,\"x\":0,\"y\":0,\"i\":\"1\"},\"panelIndex\":\"1\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_1\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"w\":24,\"h\":15,\"x\":24,\"y\":0,\"i\":\"2\"},\"panelIndex\":\"2\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_2\"}]", + "timeRestore": false, + "title": "Non time based", + "version": 1 + }, + "coreMigrationVersion": "8.0.1", + "id": "a5d56330-3e6e-11e8-bbb9-e15942d5d48c", + "migrationVersion": { + "dashboard": "8.0.1" + }, + "references": [ + { + "id": "5e085850-3e6e-11e8-bbb9-e15942d5d48c", + "name": "1:panel_1", + "type": "visualization" + }, + { + "id": "8bc8d6c0-3e6e-11e8-bbb9-e15942d5d48c", + "name": "2:panel_2", + "type": "visualization" + } + ], + "type": "dashboard", + "updated_at": "2018-04-12T16:29:18.435Z", + "version": "WzIxMiwxXQ==" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Filter Bytes Test: standard deviation heatmap with other bucket", + "uiStateJSON": "{\"vis\":{\"defaultColors\":{\"-4,000 - 1,000\":\"rgb(247,252,245)\",\"1,000 - 6,000\":\"rgb(199,233,192)\",\"6,000 - 11,000\":\"rgb(116,196,118)\",\"11,000 - 16,000\":\"rgb(35,139,69)\"}}}", + "version": 1, + "visState": "{\"title\":\"Filter Bytes Test: standard deviation heatmap with other bucket\",\"type\":\"heatmap\",\"params\":{\"type\":\"heatmap\",\"addTooltip\":true,\"addLegend\":true,\"enableHover\":false,\"legendPosition\":\"right\",\"times\":[],\"colorsNumber\":4,\"colorSchema\":\"Greens\",\"setColorRange\":false,\"colorsRange\":[],\"invertColors\":false,\"percentageMode\":false,\"valueAxes\":[{\"show\":false,\"id\":\"ValueAxis-1\",\"type\":\"value\",\"scale\":{\"type\":\"linear\",\"defaultYExtents\":false},\"labels\":{\"show\":false,\"rotate\":0,\"overwriteColor\":false,\"color\":\"#555\"}}]},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"std_dev\",\"schema\":\"metric\",\"params\":{\"field\":\"bytes\"}},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"segment\",\"params\":{\"field\":\"geo.src\",\"otherBucket\":true,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"size\":10,\"order\":\"desc\",\"orderBy\":\"_term\"}}]}" + }, + "coreMigrationVersion": "8.0.1", + "id": "b3e70d00-4190-11e8-bb13-d53698fb349a", + "migrationVersion": { + "visualization": "8.0.0" + }, + "references": [ + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2018-04-17T15:06:35.236Z", + "version": "WzI0NywxXQ==" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Filter Bytes Test: max bytes guage percent mode", + "uiStateJSON": "{\"vis\":{\"defaultColors\":{\"0 - 1\":\"rgb(0,104,55)\",\"1 - 15\":\"rgb(255,255,190)\",\"15 - 100\":\"rgb(165,0,38)\"}}}", + "version": 1, + "visState": "{\"title\":\"Filter Bytes Test: max bytes guage percent mode\",\"type\":\"gauge\",\"params\":{\"type\":\"gauge\",\"addTooltip\":true,\"addLegend\":true,\"isDisplayWarning\":false,\"gauge\":{\"extendRange\":true,\"percentageMode\":true,\"gaugeType\":\"Arc\",\"gaugeStyle\":\"Full\",\"backStyle\":\"Full\",\"orientation\":\"vertical\",\"colorSchema\":\"Green to Red\",\"gaugeColorMode\":\"Labels\",\"colorsRange\":[{\"from\":0,\"to\":500},{\"from\":500,\"to\":7500},{\"from\":7500,\"to\":50000}],\"invertColors\":false,\"labels\":{\"show\":true,\"color\":\"black\"},\"scale\":{\"show\":true,\"labels\":false,\"color\":\"#333\"},\"type\":\"meter\",\"style\":{\"bgWidth\":0.9,\"width\":0.9,\"mask\":false,\"bgMask\":false,\"maskBars\":50,\"bgFill\":\"#eee\",\"bgColor\":false,\"subText\":\"Im subtext\",\"fontSize\":60,\"labelColor\":true},\"alignment\":\"horizontal\"}},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"max\",\"schema\":\"metric\",\"params\":{\"field\":\"bytes\"}}]}" + }, + "coreMigrationVersion": "8.0.1", + "id": "c10c6b00-4191-11e8-bb13-d53698fb349a", + "migrationVersion": { + "visualization": "8.0.0" + }, + "references": [ + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2018-04-17T15:06:36.267Z", + "version": "WzI0OCwxXQ==" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[{\"meta\":{\"negate\":true,\"disabled\":false,\"alias\":null,\"type\":\"phrase\",\"key\":\"bytes\",\"value\":\"0\",\"params\":{\"query\":0,\"type\":\"phrase\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"query\":{\"match\":{\"bytes\":{\"query\":0,\"type\":\"phrase\"}}},\"$state\":{\"store\":\"appState\"}}],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Filter Bytes Test: tag cloud with not 0 bytes filter", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Filter Bytes Test: tag cloud with not 0 bytes filter\",\"type\":\"tagcloud\",\"params\":{\"scale\":\"linear\",\"orientation\":\"single\",\"minFontSize\":18,\"maxFontSize\":72,\"showLabel\":true},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"segment\",\"params\":{\"field\":\"bytes\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\"}}]}" + }, + "coreMigrationVersion": "8.0.1", + "id": "df72ad40-4194-11e8-bb13-d53698fb349a", + "migrationVersion": { + "visualization": "8.0.0" + }, + "references": [ + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + }, + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2018-04-17T15:06:36.276Z", + "version": "WzI1MSwxXQ==" +} + +{ + "attributes": { + "description": "Bytes bytes and more bytes", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"language\":\"lucene\",\"query\":\"\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" + }, + "optionsJSON": "{\"darkTheme\":false,\"hidePanelTitles\":false,\"useMargins\":true}", + "panelsJSON": "[{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":0,\"w\":24,\"h\":15,\"i\":\"1\"},\"panelIndex\":\"1\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_1\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":0,\"w\":24,\"h\":15,\"i\":\"2\"},\"panelIndex\":\"2\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_2\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":15,\"w\":24,\"h\":15,\"i\":\"3\"},\"panelIndex\":\"3\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_3\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":15,\"w\":17,\"h\":8,\"i\":\"4\"},\"panelIndex\":\"4\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_4\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":30,\"w\":18,\"h\":13,\"i\":\"5\"},\"panelIndex\":\"5\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_5\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":37,\"w\":24,\"h\":12,\"i\":\"6\"},\"panelIndex\":\"6\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_6\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":18,\"y\":30,\"w\":9,\"h\":7,\"i\":\"7\"},\"panelIndex\":\"7\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_7\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":28,\"y\":23,\"w\":15,\"h\":13,\"i\":\"8\"},\"panelIndex\":\"8\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_8\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":43,\"w\":24,\"h\":15,\"i\":\"9\"},\"panelIndex\":\"9\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_9\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":49,\"w\":18,\"h\":12,\"i\":\"10\"},\"panelIndex\":\"10\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_10\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":58,\"w\":24,\"h\":15,\"i\":\"11\"},\"panelIndex\":\"11\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_11\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":61,\"w\":5,\"h\":4,\"i\":\"12\"},\"panelIndex\":\"12\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_12\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":73,\"w\":17,\"h\":6,\"i\":\"13\"},\"panelIndex\":\"13\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_13\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":65,\"w\":24,\"h\":15,\"i\":\"14\"},\"panelIndex\":\"14\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_14\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":79,\"w\":24,\"h\":6,\"i\":\"15\"},\"panelIndex\":\"15\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_15\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":80,\"w\":24,\"h\":15,\"i\":\"16\"},\"panelIndex\":\"16\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_16\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":85,\"w\":13,\"h\":11,\"i\":\"17\"},\"panelIndex\":\"17\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_17\"},{\"version\":\"7.3.0\",\"type\":\"search\",\"gridData\":{\"x\":24,\"y\":95,\"w\":23,\"h\":11,\"i\":\"18\"},\"panelIndex\":\"18\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_18\"}]", + "refreshInterval": { + "display": "Off", + "pause": false, + "value": 0 + }, + "timeFrom": "Mon Apr 09 2018 17:56:08 GMT-0400", + "timeRestore": true, + "timeTo": "Wed Apr 11 2018 17:56:08 GMT-0400", + "title": "All about those bytes", + "version": 1 + }, + "coreMigrationVersion": "8.0.1", + "id": "b60de070-4197-11e8-bb13-d53698fb349a", + "migrationVersion": { + "dashboard": "8.0.1" + }, + "references": [ + { + "id": "7ff2c4c0-4191-11e8-bb13-d53698fb349a", + "name": "1:panel_1", + "type": "visualization" + }, + { + "id": "03d2afd0-4192-11e8-bb13-d53698fb349a", + "name": "2:panel_2", + "type": "visualization" + }, + { + "id": "63983430-4192-11e8-bb13-d53698fb349a", + "name": "3:panel_3", + "type": "visualization" + }, + { + "id": "0ca8c600-4195-11e8-bb13-d53698fb349a", + "name": "4:panel_4", + "type": "visualization" + }, + { + "id": "c10c6b00-4191-11e8-bb13-d53698fb349a", + "name": "5:panel_5", + "type": "visualization" + }, + { + "id": "760a9060-4190-11e8-bb13-d53698fb349a", + "name": "6:panel_6", + "type": "visualization" + }, + { + "id": "1dcdfe30-4192-11e8-bb13-d53698fb349a", + "name": "7:panel_7", + "type": "visualization" + }, + { + "id": "584c0300-4191-11e8-bb13-d53698fb349a", + "name": "8:panel_8", + "type": "visualization" + }, + { + "id": "b3e70d00-4190-11e8-bb13-d53698fb349a", + "name": "9:panel_9", + "type": "visualization" + }, + { + "id": "df72ad40-4194-11e8-bb13-d53698fb349a", + "name": "10:panel_10", + "type": "visualization" + }, + { + "id": "9bebe980-4192-11e8-bb13-d53698fb349a", + "name": "11:panel_11", + "type": "visualization" + }, + { + "id": "9fb4c670-4194-11e8-bb13-d53698fb349a", + "name": "12:panel_12", + "type": "visualization" + }, + { + "id": "35417e50-4194-11e8-bb13-d53698fb349a", + "name": "13:panel_13", + "type": "visualization" + }, + { + "id": "039e4770-4194-11e8-bb13-d53698fb349a", + "name": "14:panel_14", + "type": "visualization" + }, + { + "id": "76c7f020-4194-11e8-bb13-d53698fb349a", + "name": "15:panel_15", + "type": "visualization" + }, + { + "id": "8090dcb0-4195-11e8-bb13-d53698fb349a", + "name": "16:panel_16", + "type": "visualization" + }, + { + "id": "29bd0240-4197-11e8-bb13-d53698fb349a", + "name": "17:panel_17", + "type": "visualization" + }, + { + "id": "55d37a30-4197-11e8-bb13-d53698fb349a", + "name": "18:panel_18", + "type": "search" + } + ], + "type": "dashboard", + "updated_at": "2018-04-16T17:00:48.503Z", + "version": "WzIxOCwxXQ==" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{}" + }, + "title": "Rendering Test: timelion", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Rendering Test: timelion\",\"type\":\"timelion\",\"params\":{\"expression\":\".es(*, metric=avg:bytes, split=ip:5)\",\"interval\":\"auto\"},\"aggs\":[]}" + }, + "coreMigrationVersion": "8.0.1", + "id": "b92ae920-3dcc-11e8-8660-4d65aa086b3c", + "migrationVersion": { + "visualization": "8.0.0" + }, + "references": [], + "type": "visualization", + "updated_at": "2018-04-17T15:06:31.110Z", + "version": "WzIyNCwxXQ==" +} + +{ + "attributes": { + "columns": [ + "agent", + "bytes", + "clientip" + ], + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"highlightAll\":true,\"version\":true,\"query\":{\"language\":\"lucene\",\"query\":\"\"},\"filter\":[],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "sort": [ + [ + "@timestamp", + "desc" + ] + ], + "title": "Rendering Test: saved search", + "version": 1 + }, + "coreMigrationVersion": "8.0.1", + "id": "be5accf0-3dca-11e8-8660-4d65aa086b3c", + "migrationVersion": { + "search": "8.0.0" + }, + "references": [ + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "search", + "updated_at": "2018-04-17T15:09:39.805Z", + "version": "WzI1MiwxXQ==" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[{\"meta\":{\"negate\":false,\"disabled\":false,\"alias\":null,\"type\":\"phrase\",\"key\":\"animal.keyword\",\"value\":\"dog\",\"params\":{\"query\":\"dog\",\"type\":\"phrase\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"query\":{\"match\":{\"animal.keyword\":{\"query\":\"dog\",\"type\":\"phrase\"}}},\"$state\":{\"store\":\"appState\"}}],\"query\":{\"language\":\"lucene\",\"query\":\"\"}}" + }, + "savedSearchRefName": "search_0", + "title": "Filter Test: animals: linked to search with filter", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Filter Test: animals: linked to search with filter\",\"type\":\"pie\",\"params\":{\"addLegend\":true,\"addTooltip\":true,\"isDonut\":true,\"labels\":{\"last_level\":true,\"show\":false,\"truncate\":100,\"values\":true},\"legendPosition\":\"right\",\"type\":\"pie\",\"palette\":{\"type\":\"palette\",\"name\":\"kibana_palette\"},\"distinctColors\":true},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"segment\",\"params\":{\"field\":\"name.keyword\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\"}}]}" + }, + "coreMigrationVersion": "8.0.1", + "id": "befdb6b0-3e59-11e8-9fc3-39e49624228e", + "migrationVersion": { + "visualization": "8.0.0" + }, + "references": [ + { + "id": "a0f483a0-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "type": "index-pattern" + }, + { + "id": "a16d1990-3dca-11e8-8660-4d65aa086b3c", + "name": "search_0", + "type": "search" + } + ], + "type": "visualization", + "updated_at": "2018-04-17T17:16:27.743Z", + "version": "WzI1OCwxXQ==" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{}" + }, + "title": "Rendering Test: tsvb-ts", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Rendering Test: tsvb-ts\",\"type\":\"metrics\",\"params\":{\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\",\"type\":\"timeseries\",\"series\":[{\"id\":\"61ca57f1-469d-11e7-af02-69e470af7417\",\"color\":\"#68BC00\",\"split_mode\":\"everything\",\"metrics\":[{\"id\":\"61ca57f2-469d-11e7-af02-69e470af7417\",\"type\":\"count\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"split_color_mode\":\"gradient\"}],\"time_field\":\"@timestamp\",\"index_pattern\":\"\",\"interval\":\"auto\",\"axis_position\":\"left\",\"axis_formatter\":\"number\",\"show_legend\":1,\"show_grid\":1,\"use_kibana_indexes\":false,\"drop_last_bucket\":1},\"aggs\":[]}" + }, + "coreMigrationVersion": "8.0.1", + "id": "c40f4d40-3dcc-11e8-8660-4d65aa086b3c", + "migrationVersion": { + "visualization": "8.0.0" + }, + "references": [], + "type": "visualization", + "updated_at": "2018-04-17T15:06:30.347Z", + "version": "WzIzNSwxXQ==" +} + +{ + "attributes": { + "columns": [ + "agent", + "bytes", + "clientip" + ], + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"highlightAll\":true,\"version\":true,\"query\":{\"language\":\"lucene\",\"query\":\"\"},\"filter\":[{\"meta\":{\"negate\":false,\"type\":\"phrase\",\"key\":\"bytes\",\"value\":\"1,607\",\"params\":{\"query\":1607,\"type\":\"phrase\"},\"disabled\":false,\"alias\":null,\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"query\":{\"match\":{\"bytes\":{\"query\":1607,\"type\":\"phrase\"}}},\"$state\":{\"store\":\"appState\"}}],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "sort": [ + [ + "@timestamp", + "desc" + ] + ], + "title": "Filter Bytes Test: search with filter", + "version": 1 + }, + "coreMigrationVersion": "8.0.1", + "id": "ca5ada40-3dca-11e8-8660-4d65aa086b3c", + "migrationVersion": { + "search": "8.0.0" + }, + "references": [ + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + }, + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "type": "index-pattern" + } + ], + "type": "search", + "updated_at": "2018-04-17T15:09:55.976Z", + "version": "WzI1MywxXQ==" +} + +{ + "attributes": { + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"weightLbs:<50\",\"language\":\"lucene\"},\"filter\":[{\"meta\":{\"negate\":true,\"disabled\":false,\"alias\":null,\"type\":\"phrase\",\"key\":\"name.keyword\",\"value\":\"Fee Fee\",\"params\":{\"query\":\"Fee Fee\",\"type\":\"phrase\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"query\":{\"match\":{\"name.keyword\":{\"query\":\"Fee Fee\",\"type\":\"phrase\"}}},\"$state\":{\"store\":\"appState\"}}],\"highlightAll\":true,\"version\":true}" + }, + "optionsJSON": "{\"darkTheme\":true,\"useMargins\":true,\"hidePanelTitles\":true}", + "panelsJSON": "[{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":0,\"w\":24,\"h\":15,\"i\":\"1\"},\"panelIndex\":\"1\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_1\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":0,\"w\":24,\"h\":15,\"i\":\"2\"},\"panelIndex\":\"2\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_2\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":15,\"w\":24,\"h\":15,\"i\":\"3\"},\"panelIndex\":\"3\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_3\"}]", + "timeRestore": false, + "title": "bug", + "version": 1 + }, + "coreMigrationVersion": "8.0.1", + "id": "cbd3bc30-3e5a-11e8-9fc3-39e49624228e", + "migrationVersion": { + "dashboard": "8.0.1" + }, + "references": [ + { + "id": "a0f483a0-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "type": "index-pattern" + }, + { + "id": "771b4f10-3e59-11e8-9fc3-39e49624228e", + "name": "1:panel_1", + "type": "visualization" + }, + { + "id": "befdb6b0-3e59-11e8-9fc3-39e49624228e", + "name": "2:panel_2", + "type": "visualization" + }, + { + "id": "4c0c3f90-3e5a-11e8-9fc3-39e49624228e", + "name": "3:panel_3", + "type": "visualization" + } + ], + "type": "dashboard", + "updated_at": "2018-04-12T14:07:12.243Z", + "version": "WzIwOCwxXQ==" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{}" + }, + "title": "Rendering Test: tsvb-metric", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Rendering Test: tsvb-metric\",\"type\":\"metrics\",\"aggs\":[],\"params\":{\"time_range_mode\":\"last_value\",\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\",\"type\":\"metric\",\"series\":[{\"time_range_mode\":\"entire_time_range\",\"id\":\"61ca57f1-469d-11e7-af02-69e470af7417\",\"color\":\"#68BC00\",\"split_mode\":\"everything\",\"metrics\":[{\"id\":\"61ca57f2-469d-11e7-af02-69e470af7417\",\"type\":\"sum_of_squares\",\"field\":\"bytes\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"split_color_mode\":\"gradient\"}],\"time_field\":\"@timestamp\",\"index_pattern\":\"logstash-*\",\"interval\":\"auto\",\"axis_position\":\"left\",\"axis_formatter\":\"number\",\"show_legend\":1,\"show_grid\":1,\"background_color_rules\":[{\"id\":\"c50bd5b0-3dcc-11e8-a2f6-c162ca6cf6ea\"}],\"use_kibana_indexes\":false,\"hide_last_value_indicator\":true,\"axis_scale\":\"normal\",\"truncate_legend\":1,\"max_lines_legend\":1,\"tooltip_mode\":\"show_all\",\"drop_last_bucket\":1,\"isModelInvalid\":false}}" + }, + "coreMigrationVersion": "8.0.1", + "id": "cc43fab0-3dcc-11e8-8660-4d65aa086b3c", + "migrationVersion": { + "visualization": "8.0.0" + }, + "references": [], + "type": "visualization", + "updated_at": "2018-04-17T15:06:30.353Z", + "version": "WzIzNCwxXQ==" +} + +{ + "attributes": { + "description": "I have one of every visualization type since the last time I was created!", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"language\":\"lucene\",\"query\":\"\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" + }, + "optionsJSON": "{\"darkTheme\":false,\"hidePanelTitles\":false,\"useMargins\":true}", + "panelsJSON": "[{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":15,\"w\":24,\"h\":15,\"i\":\"3\"},\"panelIndex\":\"3\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_3\"}]", + "refreshInterval": { + "display": "Off", + "pause": false, + "value": 0 + }, + "timeFrom": "Mon Apr 09 2018 17:56:08 GMT-0400", + "timeRestore": true, + "timeTo": "Wed Apr 11 2018 17:56:08 GMT-0400", + "title": "dashboard with table", + "version": 1 + }, + "coreMigrationVersion": "8.0.1", + "id": "d2525040-3dcd-11e8-8660-4d65aa086b3b", + "migrationVersion": { + "dashboard": "8.0.1" + }, + "references": [ + { + "id": "4b5d6ef0-3dcb-11e8-8660-4d65aa086b3c", + "name": "3:panel_3", + "type": "visualization" + } + ], + "type": "dashboard", + "updated_at": "2018-04-16T16:05:02.915Z", + "version": "WzIxNCwxXQ==" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[{\"meta\":{\"negate\":true,\"disabled\":false,\"alias\":null,\"type\":\"phrase\",\"key\":\"geo.src\",\"value\":\"CN\",\"params\":{\"query\":\"CN\",\"type\":\"phrase\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"query\":{\"match\":{\"geo.src\":{\"query\":\"CN\",\"type\":\"phrase\"}}},\"$state\":{\"store\":\"appState\"}}],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Rendering Test: area with not filter", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Rendering Test: area with not filter\",\"type\":\"area\",\"params\":{\"type\":\"area\",\"grid\":{\"categoryLines\":false,\"style\":{\"color\":\"#eee\"}},\"categoryAxes\":[{\"id\":\"CategoryAxis-1\",\"type\":\"category\",\"position\":\"bottom\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\"},\"labels\":{\"show\":true,\"truncate\":100,\"filter\":true},\"title\":{}}],\"valueAxes\":[{\"id\":\"ValueAxis-1\",\"name\":\"LeftAxis-1\",\"type\":\"value\",\"position\":\"left\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\",\"mode\":\"normal\"},\"labels\":{\"show\":true,\"rotate\":0,\"filter\":false,\"truncate\":100},\"title\":{\"text\":\"Count\"}}],\"seriesParams\":[{\"show\":\"true\",\"type\":\"area\",\"mode\":\"stacked\",\"data\":{\"label\":\"Count\",\"id\":\"1\"},\"drawLinesBetweenPoints\":true,\"showCircles\":true,\"interpolate\":\"linear\",\"valueAxis\":\"ValueAxis-1\"}],\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"times\":[],\"addTimeMarker\":false,\"palette\":{\"type\":\"palette\",\"name\":\"kibana_palette\"},\"isVislibVis\":true,\"detailedTooltip\":true,\"fittingFunction\":\"zero\"},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"date_histogram\",\"schema\":\"segment\",\"params\":{\"field\":\"@timestamp\",\"interval\":\"auto\",\"min_doc_count\":1,\"extended_bounds\":{}}},{\"id\":\"3\",\"enabled\":true,\"type\":\"filters\",\"schema\":\"group\",\"params\":{\"filters\":[{\"input\":{\"query\":\"bytes:>1000\",\"language\":\"lucene\"},\"label\":\"\"},{\"input\":{\"query\":\"bytes:>10\",\"language\":\"lucene\"}}]}}]}" + }, + "coreMigrationVersion": "8.0.1", + "id": "e6140540-3dca-11e8-8660-4d65aa086b3c", + "migrationVersion": { + "visualization": "8.0.0" + }, + "references": [ + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + }, + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2018-04-17T15:06:33.165Z", + "version": "WzIzOSwxXQ==" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Rendering Test: goal", + "uiStateJSON": "{\"vis\":{\"defaultColors\":{\"0 - 100\":\"rgb(0,104,55)\"}}}", + "version": 1, + "visState": "{\"title\":\"Rendering Test: goal\",\"type\":\"goal\",\"params\":{\"addTooltip\":true,\"addLegend\":false,\"isDisplayWarning\":false,\"type\":\"gauge\",\"gauge\":{\"verticalSplit\":false,\"autoExtend\":false,\"percentageMode\":true,\"gaugeType\":\"Arc\",\"gaugeStyle\":\"Full\",\"backStyle\":\"Full\",\"orientation\":\"vertical\",\"useRanges\":false,\"colorSchema\":\"Green to Red\",\"gaugeColorMode\":\"None\",\"colorsRange\":[{\"from\":0,\"to\":4000}],\"invertColors\":false,\"labels\":{\"show\":true,\"color\":\"black\"},\"scale\":{\"show\":false,\"labels\":false,\"color\":\"#333\",\"width\":2},\"type\":\"meter\",\"style\":{\"bgFill\":\"#000\",\"bgColor\":false,\"labelColor\":false,\"subText\":\"\",\"fontSize\":60}}},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"group\",\"params\":{\"field\":\"geo.src\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"size\":2,\"order\":\"desc\",\"orderBy\":\"1\"}}]}" + }, + "coreMigrationVersion": "8.0.1", + "id": "ffa2e0c0-3dcb-11e8-8660-4d65aa086b3c", + "migrationVersion": { + "visualization": "8.0.0" + }, + "references": [ + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2018-04-17T15:06:33.153Z", + "version": "WzIzNiwxXQ==" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{}" + }, + "title": "Rendering Test: tsvb-guage", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Rendering Test: tsvb-guage\",\"type\":\"metrics\",\"aggs\":[],\"params\":{\"time_range_mode\":\"last_value\",\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\",\"type\":\"gauge\",\"series\":[{\"time_range_mode\":\"entire_time_range\",\"id\":\"61ca57f1-469d-11e7-af02-69e470af7417\",\"color\":\"#68BC00\",\"split_mode\":\"everything\",\"metrics\":[{\"id\":\"61ca57f2-469d-11e7-af02-69e470af7417\",\"type\":\"avg\",\"field\":\"bytes\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"split_color_mode\":\"gradient\"},{\"time_range_mode\":\"entire_time_range\",\"id\":\"d18e5970-3dcc-11e8-a2f6-c162ca6cf6ea\",\"color\":\"rgba(160,70,216,1)\",\"split_mode\":\"filter\",\"metrics\":[{\"id\":\"d18e5971-3dcc-11e8-a2f6-c162ca6cf6ea\",\"type\":\"avg\",\"field\":\"bytes\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"filter\":{\"query\":\"bytes:>1000\",\"language\":\"lucene\"},\"split_color_mode\":\"gradient\"}],\"time_field\":\"@timestamp\",\"index_pattern\":\"logstash-*\",\"interval\":\"auto\",\"axis_position\":\"left\",\"axis_formatter\":\"number\",\"show_legend\":1,\"show_grid\":1,\"background_color_rules\":[{\"id\":\"c50bd5b0-3dcc-11e8-a2f6-c162ca6cf6ea\"}],\"bar_color_rules\":[{\"id\":\"cd25a820-3dcc-11e8-a2f6-c162ca6cf6ea\"}],\"gauge_color_rules\":[{\"id\":\"e0be22e0-3dcc-11e8-a2f6-c162ca6cf6ea\"}],\"gauge_width\":10,\"gauge_inner_width\":10,\"gauge_style\":\"half\",\"use_kibana_indexes\":false,\"hide_last_value_indicator\":true,\"axis_scale\":\"normal\",\"truncate_legend\":1,\"max_lines_legend\":1,\"tooltip_mode\":\"show_all\",\"drop_last_bucket\":1,\"isModelInvalid\":false}}" + }, + "coreMigrationVersion": "8.0.1", + "id": "e4d8b430-3dcc-11e8-8660-4d65aa086b3c", + "migrationVersion": { + "visualization": "8.0.0" + }, + "references": [], + "type": "visualization", + "updated_at": "2018-04-17T15:06:31.106Z", + "version": "WzIyNSwxXQ==" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{}" + }, + "title": "Rendering Test: tsvb-markdown", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Rendering Test: tsvb-markdown\",\"type\":\"metrics\",\"aggs\":[],\"params\":{\"time_range_mode\":\"last_value\",\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\",\"type\":\"markdown\",\"series\":[{\"time_range_mode\":\"entire_time_range\",\"id\":\"61ca57f1-469d-11e7-af02-69e470af7417\",\"color\":\"#68BC00\",\"split_mode\":\"everything\",\"metrics\":[{\"id\":\"61ca57f2-469d-11e7-af02-69e470af7417\",\"type\":\"avg\",\"field\":\"bytes\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"split_color_mode\":\"gradient\"},{\"time_range_mode\":\"entire_time_range\",\"id\":\"d18e5970-3dcc-11e8-a2f6-c162ca6cf6ea\",\"color\":\"rgba(160,70,216,1)\",\"split_mode\":\"filter\",\"metrics\":[{\"id\":\"d18e5971-3dcc-11e8-a2f6-c162ca6cf6ea\",\"type\":\"avg\",\"field\":\"bytes\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"filter\":{\"query\":\"bytes:>1000\",\"language\":\"lucene\"},\"split_color_mode\":\"gradient\"}],\"time_field\":\"@timestamp\",\"index_pattern\":\"logstash-*\",\"interval\":\"auto\",\"axis_position\":\"left\",\"axis_formatter\":\"number\",\"show_legend\":1,\"show_grid\":1,\"background_color_rules\":[{\"id\":\"c50bd5b0-3dcc-11e8-a2f6-c162ca6cf6ea\"}],\"bar_color_rules\":[{\"id\":\"cd25a820-3dcc-11e8-a2f6-c162ca6cf6ea\"}],\"gauge_color_rules\":[{\"id\":\"e0be22e0-3dcc-11e8-a2f6-c162ca6cf6ea\"}],\"gauge_width\":10,\"gauge_inner_width\":10,\"gauge_style\":\"half\",\"markdown\":\"\\nHi Avg last bytes: {{ average_of_bytes.last.raw }}\",\"use_kibana_indexes\":false,\"hide_last_value_indicator\":true,\"axis_scale\":\"normal\",\"truncate_legend\":1,\"max_lines_legend\":1,\"tooltip_mode\":\"show_all\",\"drop_last_bucket\":1,\"isModelInvalid\":false}}" + }, + "coreMigrationVersion": "8.0.1", + "id": "f81134a0-3dcc-11e8-8660-4d65aa086b3c", + "migrationVersion": { + "visualization": "8.0.0" + }, + "references": [], + "type": "visualization", + "updated_at": "2018-04-17T15:06:30.355Z", + "version": "WzIzMiwxXQ==" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{}" + }, + "title": "Rendering Test: tsvb-topn", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Rendering Test: tsvb-topn\",\"type\":\"metrics\",\"aggs\":[],\"params\":{\"time_range_mode\":\"last_value\",\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\",\"type\":\"top_n\",\"series\":[{\"time_range_mode\":\"entire_time_range\",\"id\":\"61ca57f1-469d-11e7-af02-69e470af7417\",\"color\":\"#68BC00\",\"split_mode\":\"everything\",\"metrics\":[{\"id\":\"61ca57f2-469d-11e7-af02-69e470af7417\",\"type\":\"avg\",\"field\":\"bytes\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"split_color_mode\":\"gradient\"},{\"time_range_mode\":\"entire_time_range\",\"id\":\"d18e5970-3dcc-11e8-a2f6-c162ca6cf6ea\",\"color\":\"rgba(160,70,216,1)\",\"split_mode\":\"filter\",\"metrics\":[{\"id\":\"d18e5971-3dcc-11e8-a2f6-c162ca6cf6ea\",\"type\":\"avg\",\"field\":\"bytes\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"filter\":{\"query\":\"bytes:>1000\",\"language\":\"lucene\"},\"split_color_mode\":\"gradient\"}],\"time_field\":\"@timestamp\",\"index_pattern\":\"logstash-*\",\"interval\":\"auto\",\"axis_position\":\"left\",\"axis_formatter\":\"number\",\"show_legend\":1,\"show_grid\":1,\"background_color_rules\":[{\"id\":\"c50bd5b0-3dcc-11e8-a2f6-c162ca6cf6ea\"}],\"bar_color_rules\":[{\"id\":\"cd25a820-3dcc-11e8-a2f6-c162ca6cf6ea\"}],\"use_kibana_indexes\":false,\"hide_last_value_indicator\":true,\"axis_scale\":\"normal\",\"truncate_legend\":1,\"max_lines_legend\":1,\"tooltip_mode\":\"show_all\",\"drop_last_bucket\":1,\"isModelInvalid\":false}}" + }, + "coreMigrationVersion": "8.0.1", + "id": "df815d20-3dcc-11e8-8660-4d65aa086b3c", + "migrationVersion": { + "visualization": "8.0.0" + }, + "references": [], + "type": "visualization", + "updated_at": "2018-04-17T15:06:30.349Z", + "version": "WzIzMywxXQ==" +} + +{ + "attributes": { + "description": "I have one of every visualization type since the last time I was created!", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"language\":\"lucene\",\"query\":\"\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" + }, + "optionsJSON": "{\"darkTheme\":false,\"hidePanelTitles\":false,\"useMargins\":true}", + "panelsJSON": "[{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":0,\"w\":24,\"h\":15,\"i\":\"1\"},\"panelIndex\":\"1\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_1\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":0,\"w\":24,\"h\":15,\"i\":\"2\"},\"panelIndex\":\"2\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_2\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":15,\"w\":24,\"h\":15,\"i\":\"3\"},\"panelIndex\":\"3\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_3\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":30,\"w\":24,\"h\":15,\"i\":\"5\"},\"panelIndex\":\"5\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_5\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":30,\"w\":24,\"h\":15,\"i\":\"6\"},\"panelIndex\":\"6\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_6\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":45,\"w\":24,\"h\":15,\"i\":\"7\"},\"panelIndex\":\"7\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_7\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":45,\"w\":24,\"h\":15,\"i\":\"8\"},\"panelIndex\":\"8\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_8\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":60,\"w\":24,\"h\":15,\"i\":\"9\"},\"panelIndex\":\"9\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_9\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":60,\"w\":24,\"h\":15,\"i\":\"10\"},\"panelIndex\":\"10\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_10\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":75,\"w\":24,\"h\":15,\"i\":\"11\"},\"panelIndex\":\"11\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_11\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":75,\"w\":24,\"h\":15,\"i\":\"12\"},\"panelIndex\":\"12\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_12\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":90,\"w\":24,\"h\":15,\"i\":\"13\"},\"panelIndex\":\"13\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_13\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":105,\"w\":24,\"h\":15,\"i\":\"15\"},\"panelIndex\":\"15\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_15\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":105,\"w\":24,\"h\":15,\"i\":\"16\"},\"panelIndex\":\"16\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_16\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":120,\"w\":24,\"h\":15,\"i\":\"17\"},\"panelIndex\":\"17\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_17\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":120,\"w\":24,\"h\":15,\"i\":\"18\"},\"panelIndex\":\"18\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_18\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":135,\"w\":24,\"h\":15,\"i\":\"19\"},\"panelIndex\":\"19\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_19\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":135,\"w\":24,\"h\":15,\"i\":\"20\"},\"panelIndex\":\"20\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_20\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":150,\"w\":24,\"h\":15,\"i\":\"21\"},\"panelIndex\":\"21\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_21\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":150,\"w\":24,\"h\":15,\"i\":\"22\"},\"panelIndex\":\"22\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_22\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":165,\"w\":24,\"h\":15,\"i\":\"23\"},\"panelIndex\":\"23\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_23\"},{\"version\":\"7.3.0\",\"type\":\"search\",\"gridData\":{\"x\":24,\"y\":165,\"w\":24,\"h\":15,\"i\":\"24\"},\"panelIndex\":\"24\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_24\"},{\"version\":\"7.3.0\",\"type\":\"search\",\"gridData\":{\"x\":0,\"y\":180,\"w\":24,\"h\":15,\"i\":\"25\"},\"panelIndex\":\"25\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_25\"},{\"version\":\"7.3.0\",\"type\":\"search\",\"gridData\":{\"x\":24,\"y\":180,\"w\":24,\"h\":15,\"i\":\"26\"},\"panelIndex\":\"26\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_26\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":195,\"w\":24,\"h\":15,\"i\":\"27\"},\"panelIndex\":\"27\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_27\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":195,\"w\":24,\"h\":15,\"i\":\"28\"},\"panelIndex\":\"28\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_28\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":210,\"w\":24,\"h\":15,\"i\":\"29\"},\"panelIndex\":\"29\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_29\"},{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"w\":24,\"h\":15,\"x\":24,\"y\":210,\"i\":\"30\"},\"panelIndex\":\"30\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_30\"}]", + "refreshInterval": { + "display": "Off", + "pause": false, + "value": 0 + }, + "timeFrom": "Mon Apr 09 2018 17:56:08 GMT-0400", + "timeRestore": true, + "timeTo": "Wed Apr 11 2018 17:56:08 GMT-0400", + "title": "dashboard with everything", + "version": 1 + }, + "coreMigrationVersion": "8.0.1", + "id": "d2525040-3dcd-11e8-8660-4d65aa086b3c", + "migrationVersion": { + "dashboard": "8.0.1" + }, + "references": [ + { + "id": "e6140540-3dca-11e8-8660-4d65aa086b3c", + "name": "1:panel_1", + "type": "visualization" + }, + { + "id": "3525b840-3dcb-11e8-8660-4d65aa086b3c", + "name": "2:panel_2", + "type": "visualization" + }, + { + "id": "4b5d6ef0-3dcb-11e8-8660-4d65aa086b3c", + "name": "3:panel_3", + "type": "visualization" + }, + { + "id": "ffa2e0c0-3dcb-11e8-8660-4d65aa086b3c", + "name": "5:panel_5", + "type": "visualization" + }, + { + "id": "e2023110-3dcb-11e8-8660-4d65aa086b3c", + "name": "6:panel_6", + "type": "visualization" + }, + { + "id": "145ced90-3dcb-11e8-8660-4d65aa086b3c", + "name": "7:panel_7", + "type": "visualization" + }, + { + "id": "2d1b1620-3dcd-11e8-8660-4d65aa086b3c", + "name": "8:panel_8", + "type": "visualization" + }, + { + "id": "42535e30-3dcd-11e8-8660-4d65aa086b3c", + "name": "9:panel_9", + "type": "visualization" + }, + { + "id": "42535e30-3dcd-11e8-8660-4d65aa086b3c", + "name": "10:panel_10", + "type": "visualization" + }, + { + "id": "4c0f47e0-3dcd-11e8-8660-4d65aa086b3c", + "name": "11:panel_11", + "type": "visualization" + }, + { + "id": "11ae2bd0-3dcc-11e8-8660-4d65aa086b3c", + "name": "12:panel_12", + "type": "visualization" + }, + { + "id": "3fe22200-3dcb-11e8-8660-4d65aa086b3c", + "name": "13:panel_13", + "type": "visualization" + }, + { + "id": "78803be0-3dcd-11e8-8660-4d65aa086b3c", + "name": "15:panel_15", + "type": "visualization" + }, + { + "id": "b92ae920-3dcc-11e8-8660-4d65aa086b3c", + "name": "16:panel_16", + "type": "visualization" + }, + { + "id": "e4d8b430-3dcc-11e8-8660-4d65aa086b3c", + "name": "17:panel_17", + "type": "visualization" + }, + { + "id": "f81134a0-3dcc-11e8-8660-4d65aa086b3c", + "name": "18:panel_18", + "type": "visualization" + }, + { + "id": "cc43fab0-3dcc-11e8-8660-4d65aa086b3c", + "name": "19:panel_19", + "type": "visualization" + }, + { + "id": "02a2e4e0-3dcd-11e8-8660-4d65aa086b3c", + "name": "20:panel_20", + "type": "visualization" + }, + { + "id": "df815d20-3dcc-11e8-8660-4d65aa086b3c", + "name": "21:panel_21", + "type": "visualization" + }, + { + "id": "c40f4d40-3dcc-11e8-8660-4d65aa086b3c", + "name": "22:panel_22", + "type": "visualization" + }, + { + "id": "7fda8ee0-3dcd-11e8-8660-4d65aa086b3c", + "name": "23:panel_23", + "type": "visualization" + }, + { + "id": "a16d1990-3dca-11e8-8660-4d65aa086b3c", + "name": "24:panel_24", + "type": "search" + }, + { + "id": "be5accf0-3dca-11e8-8660-4d65aa086b3c", + "name": "25:panel_25", + "type": "search" + }, + { + "id": "ca5ada40-3dca-11e8-8660-4d65aa086b3c", + "name": "26:panel_26", + "type": "search" + }, + { + "id": "771b4f10-3e59-11e8-9fc3-39e49624228e", + "name": "27:panel_27", + "type": "visualization" + }, + { + "id": "5e085850-3e6e-11e8-bbb9-e15942d5d48c", + "name": "28:panel_28", + "type": "visualization" + }, + { + "id": "8bc8d6c0-3e6e-11e8-bbb9-e15942d5d48c", + "name": "29:panel_29", + "type": "visualization" + }, + { + "id": "befdb6b0-3e59-11e8-9fc3-39e49624228e", + "name": "30:panel_30", + "type": "visualization" + } + ], + "type": "dashboard", + "updated_at": "2018-04-16T16:05:02.915Z", + "version": "WzIxMywxXQ==" +} + +{ + "attributes": { + "fieldFormatMap": "{\"machine.ram\":{\"id\":\"number\",\"params\":{\"pattern\":\"0,0.[000] b\"}}}", + "fields": "[{\"name\":\"@message\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"@message.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"@tags\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"@tags.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"@timestamp\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"_id\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_score\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_source\",\"type\":\"_source\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"agent\",\"type\":\"string\",\"count\":2,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"agent.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"bytes\",\"type\":\"number\",\"count\":3,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"clientip\",\"type\":\"ip\",\"count\":3,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"extension\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"extension.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.coordinates\",\"type\":\"geo_point\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.dest\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.src\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.srcdest\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"headings\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"headings.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"host.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"id\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"index.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ip\",\"type\":\"ip\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"links\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"links.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"machine.os\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"machine.os.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"machine.ram\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"memory\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"meta.char\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"meta.related\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"meta.user.firstname\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"meta.user.lastname\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"phpmemory\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"referer\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:modified_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:published_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:section\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.article:section.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:tag\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.article:tag.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:description\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:description.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:image\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:image.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:image:height\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:image:height.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:image:width\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:image:width.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:site_name\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:site_name.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:title\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:title.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:type.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:url.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:card\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:card.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:description\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:description.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:image\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:image.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:site\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:site.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:title\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:title.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.url.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"request\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"request.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"response\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"response.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"spaces\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"spaces.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"url.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"utc_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"xss\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"xss.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true}]", + "timeFieldName": "@timestamp", + "title": "to-be-deleted" + }, + "coreMigrationVersion": "7.14.0", + "id": "1b1789d0-9e93-11ea-853e-adc0effaf76d", + "migrationVersion": { + "index-pattern": "7.11.0" + }, + "references": [], + "type": "index-pattern", + "updated_at": "2018-04-16T16:57:12.263Z", + "version": "WzE3NiwxXQ==" +} + +{ + "attributes": { + "fieldFormatMap": "{\"machine.ram\":{\"id\":\"number\",\"params\":{\"pattern\":\"0,0.[000] b\"}}}", + "fields": "[{\"name\":\"@message\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"@message.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"@tags\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"@tags.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"@timestamp\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"_id\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_score\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_source\",\"type\":\"_source\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"agent\",\"type\":\"string\",\"count\":2,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"agent.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"bytes\",\"type\":\"number\",\"count\":3,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"clientip\",\"type\":\"ip\",\"count\":3,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"extension\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"extension.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.coordinates\",\"type\":\"geo_point\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.dest\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.src\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.srcdest\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"headings\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"headings.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"host.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"id\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"index.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ip\",\"type\":\"ip\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"links\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"links.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"machine.os\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"machine.os.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"machine.ram\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"memory\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"meta.char\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"meta.related\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"meta.user.firstname\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"meta.user.lastname\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"phpmemory\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"referer\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:modified_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:published_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:section\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.article:section.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:tag\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.article:tag.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:description\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:description.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:image\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:image.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:image:height\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:image:height.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:image:width\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:image:width.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:site_name\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:site_name.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:title\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:title.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:type.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:url.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:card\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:card.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:description\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:description.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:image\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:image.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:site\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:site.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:title\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:title.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.url.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"request\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"request.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"response\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"response.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"spaces\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"spaces.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"url.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"utc_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"xss\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"xss.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true}]", + "timeFieldName": "@timestamp", + "title": "to-be-deleted" + }, + "coreMigrationVersion": "7.14.0", + "id": "a0f483a0-3dc9-11e8-8660-bad-index", + "migrationVersion": { + "index-pattern": "7.11.0" + }, + "references": [], + "type": "index-pattern", + "updated_at": "2018-04-16T16:57:12.263Z", + "version": "WzE3NiwxXQ==" +} \ No newline at end of file diff --git a/test/functional/fixtures/kbn_archiver/dashboard/current/kibana_unload.json b/test/functional/fixtures/kbn_archiver/dashboard/current/kibana_unload.json new file mode 100644 index 0000000000000..d2543cf42a6d2 --- /dev/null +++ b/test/functional/fixtures/kbn_archiver/dashboard/current/kibana_unload.json @@ -0,0 +1,35 @@ +{ + "attributes": { + "fieldFormatMap": "{\"machine.ram\":{\"id\":\"number\",\"params\":{\"pattern\":\"0,0.[000] b\"}}}", + "fields": "[{\"name\":\"@message\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"@message.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"@tags\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"@tags.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"@timestamp\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"_id\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_score\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_source\",\"type\":\"_source\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"agent\",\"type\":\"string\",\"count\":2,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"agent.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"bytes\",\"type\":\"number\",\"count\":3,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"clientip\",\"type\":\"ip\",\"count\":3,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"extension\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"extension.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.coordinates\",\"type\":\"geo_point\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.dest\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.src\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.srcdest\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"headings\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"headings.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"host.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"id\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"index.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ip\",\"type\":\"ip\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"links\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"links.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"machine.os\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"machine.os.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"machine.ram\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"memory\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"meta.char\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"meta.related\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"meta.user.firstname\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"meta.user.lastname\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"phpmemory\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"referer\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:modified_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:published_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:section\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.article:section.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:tag\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.article:tag.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:description\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:description.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:image\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:image.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:image:height\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:image:height.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:image:width\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:image:width.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:site_name\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:site_name.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:title\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:title.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:type.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:url.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:card\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:card.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:description\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:description.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:image\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:image.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:site\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:site.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:title\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:title.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.url.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"request\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"request.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"response\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"response.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"spaces\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"spaces.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"url.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"utc_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"xss\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"xss.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true}]", + "timeFieldName": "@timestamp", + "title": "to-be-deleted" + }, + "coreMigrationVersion": "7.14.0", + "id": "1b1789d0-9e93-11ea-853e-adc0effaf76d", + "migrationVersion": { + "index-pattern": "7.11.0" + }, + "references": [], + "type": "index-pattern", + "updated_at": "2018-04-16T16:57:12.263Z", + "version": "WzE3NiwxXQ==" +} + +{ + "attributes": { + "fieldFormatMap": "{\"machine.ram\":{\"id\":\"number\",\"params\":{\"pattern\":\"0,0.[000] b\"}}}", + "fields": "[{\"name\":\"@message\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"@message.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"@tags\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"@tags.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"@timestamp\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"_id\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_score\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_source\",\"type\":\"_source\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"agent\",\"type\":\"string\",\"count\":2,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"agent.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"bytes\",\"type\":\"number\",\"count\":3,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"clientip\",\"type\":\"ip\",\"count\":3,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"extension\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"extension.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.coordinates\",\"type\":\"geo_point\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.dest\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.src\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.srcdest\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"headings\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"headings.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"host.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"id\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"index.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ip\",\"type\":\"ip\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"links\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"links.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"machine.os\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"machine.os.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"machine.ram\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"memory\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"meta.char\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"meta.related\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"meta.user.firstname\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"meta.user.lastname\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"phpmemory\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"referer\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:modified_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:published_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:section\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.article:section.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.article:tag\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.article:tag.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:description\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:description.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:image\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:image.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:image:height\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:image:height.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:image:width\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:image:width.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:site_name\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:site_name.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:title\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:title.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:type.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.og:url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.og:url.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:card\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:card.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:description\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:description.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:image\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:image.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:site\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:site.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.twitter:title\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.twitter:title.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"relatedContent.url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"relatedContent.url.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"request\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"request.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"response\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"response.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"spaces\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"spaces.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"url.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"utc_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"xss\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"xss.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true}]", + "timeFieldName": "@timestamp", + "title": "to-be-deleted" + }, + "coreMigrationVersion": "7.14.0", + "id": "a0f483a0-3dc9-11e8-8660-bad-index", + "migrationVersion": { + "index-pattern": "7.11.0" + }, + "references": [], + "type": "index-pattern", + "updated_at": "2018-04-16T16:57:12.263Z", + "version": "WzE3NiwxXQ==" +} \ No newline at end of file diff --git a/test/functional/fixtures/kbn_archiver/dashboard/legacy.json b/test/functional/fixtures/kbn_archiver/dashboard/legacy.json new file mode 100644 index 0000000000000..0a05af3b40bb0 --- /dev/null +++ b/test/functional/fixtures/kbn_archiver/dashboard/legacy.json @@ -0,0 +1,241 @@ +{ + "attributes": { + "fields": "[{\"name\":\"referer\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"agent\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.og:image:width\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.og:type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"xss.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"headings.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:description\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"meta.user.lastname\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.article:tag.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"geo.dest\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.twitter:image\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.article:section.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"utc_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.twitter:card\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"meta.char\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"clientip\",\"type\":\"ip\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:image:height\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"host\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"machine.ram\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"links\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"id\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"@tags.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"phpmemory\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.twitter:card.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"ip\",\"type\":\"ip\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:image\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.article:modified_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.og:site_name.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"request.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.article:tag\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"agent.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"spaces\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.twitter:site.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"headings\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"_source\",\"type\":\"_source\",\"count\":0,\"scripted\":false,\"indexed\":false,\"analyzed\":false,\"doc_values\":false},{\"name\":\"relatedContent.og:image.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"request\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"index.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"extension\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"memory\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"_index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":false,\"analyzed\":false,\"doc_values\":false},{\"name\":\"relatedContent.twitter:site\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.twitter:description\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.og:url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"geo.coordinates\",\"type\":\"geo_point\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.url.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"meta.related\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.twitter:title.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:title.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"response.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"@message.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"machine.os\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.article:section\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.og:url.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"xss\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"links.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:title\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"geo.srcdest\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"url.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"extension.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"machine.os.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"@tags\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"host.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:type.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"geo.src\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"spaces.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:image:height.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.twitter:description.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:site_name\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.twitter:title\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"@message\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.twitter:image.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"@timestamp\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"bytes\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"response\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"meta.user.firstname\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":true,\"doc_values\":false},{\"name\":\"relatedContent.og:image:width.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.og:description.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"relatedContent.article:published_time\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"indexed\":true,\"analyzed\":false,\"doc_values\":true},{\"name\":\"_id\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":false,\"analyzed\":false,\"doc_values\":false},{\"name\":\"_type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"indexed\":false,\"analyzed\":false,\"doc_values\":false},{\"name\":\"_score\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"indexed\":false,\"analyzed\":false,\"doc_values\":false}]", + "timeFieldName": "@timestamp", + "title": "logstash-*" + }, + "coreMigrationVersion": "7.17.1", + "id": "logstash-*", + "migrationVersion": { + "index-pattern": "7.11.0" + }, + "references": [], + "type": "index-pattern", + "version": "WzksMl0=" +} + +{ + "attributes": { + "description": "InputControl", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{}" + }, + "title": "Visualization InputControl", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"logstash control panel\",\"type\":\"input_control_vis\",\"params\":{\"controls\":[{\"id\":\"1508761640807\",\"fieldName\":\"machine.os.raw\",\"label\":\"\",\"type\":\"list\",\"options\":{\"type\":\"terms\",\"multiselect\":true,\"size\":5,\"order\":\"desc\"},\"indexPatternRefName\":\"control_0_index_pattern\"},{\"id\":\"1508761655907\",\"fieldName\":\"bytes\",\"label\":\"\",\"type\":\"range\",\"options\":{\"decimalPlaces\":0,\"step\":512},\"indexPatternRefName\":\"control_1_index_pattern\"},{\"id\":\"1510594169532\",\"fieldName\":\"geo.dest\",\"label\":\"\",\"type\":\"list\",\"options\":{\"type\":\"terms\",\"multiselect\":true,\"size\":5,\"order\":\"desc\"},\"indexPatternRefName\":\"control_2_index_pattern\"}],\"updateFiltersOnChange\":false},\"aggs\":[]}" + }, + "coreMigrationVersion": "7.17.1", + "id": "Visualization-InputControl", + "migrationVersion": { + "visualization": "7.17.0" + }, + "references": [ + { + "id": "logstash-*", + "name": "control_0_index_pattern", + "type": "index-pattern" + }, + { + "id": "logstash-*", + "name": "control_1_index_pattern", + "type": "index-pattern" + }, + { + "id": "logstash-*", + "name": "control_2_index_pattern", + "type": "index-pattern" + } + ], + "type": "visualization", + "version": "WzEwLDJd" +} + +{ + "attributes": { + "description": "MetricChart", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query_string\":{\"query\":\"*\",\"analyze_wildcard\":true}},\"filter\":[],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Visualization MetricChart", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"New Visualization\",\"type\":\"metric\",\"params\":{\"handleNoResults\":true,\"fontSize\":60},\"aggs\":[{\"id\":\"1\",\"type\":\"percentile_ranks\",\"schema\":\"metric\",\"params\":{\"field\":\"memory\",\"values\":[99]}}],\"listeners\":{}}" + }, + "coreMigrationVersion": "7.17.1", + "id": "Visualization-MetricChart", + "migrationVersion": { + "visualization": "7.17.0" + }, + "references": [ + { + "id": "logstash-*", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "version": "WzE2LDJd" +} + +{ + "attributes": { + "description": "PieChart", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query_string\":{\"query\":\"*\",\"analyze_wildcard\":true}},\"filter\":[],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Visualization PieChart", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"New Visualization\",\"type\":\"pie\",\"params\":{\"shareYAxis\":true,\"addTooltip\":true,\"addLegend\":true,\"isDonut\":false,\"palette\":{\"type\":\"palette\",\"name\":\"kibana_palette\"},\"distinctColors\":true},\"aggs\":[{\"id\":\"1\",\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"type\":\"histogram\",\"schema\":\"segment\",\"params\":{\"field\":\"memory\",\"interval\":40000,\"extended_bounds\":{}}}],\"listeners\":{}}" + }, + "coreMigrationVersion": "7.17.1", + "id": "Visualization-PieChart", + "migrationVersion": { + "visualization": "7.17.0" + }, + "references": [ + { + "id": "logstash-*", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "version": "WzE0LDJd" +} + +{ + "attributes": { + "description": "TileMap", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query_string\":{\"query\":\"*\",\"analyze_wildcard\":true}},\"filter\":[],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Visualization TileMap", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"New Visualization\",\"type\":\"tile_map\",\"params\":{\"mapType\":\"Scaled Circle Markers\",\"isDesaturated\":true,\"addTooltip\":true,\"heatMaxZoom\":16,\"heatMinOpacity\":0.1,\"heatRadius\":25,\"heatBlur\":15,\"heatNormalizeData\":true,\"wms\":{\"enabled\":false,\"url\":\"https://basemap.nationalmap.gov/arcgis/services/USGSTopo/MapServer/WMSServer\",\"options\":{\"version\":\"1.3.0\",\"layers\":\"0\",\"format\":\"image/png\",\"transparent\":true,\"attribution\":\"Maps provided by USGS\",\"styles\":\"\"}}},\"aggs\":[{\"id\":\"1\",\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"type\":\"geohash_grid\",\"schema\":\"segment\",\"params\":{\"field\":\"geo.coordinates\",\"autoPrecision\":true,\"precision\":2}}],\"listeners\":{}}" + }, + "coreMigrationVersion": "7.17.1", + "id": "Visualization-TileMap", + "migrationVersion": { + "visualization": "7.17.0" + }, + "references": [ + { + "id": "logstash-*", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "version": "WzEzLDJd" +} + +{ + "attributes": { + "description": "VerticalBarChart", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query_string\":{\"query\":\"*\",\"analyze_wildcard\":true}},\"filter\":[],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Visualization☺ VerticalBarChart", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"New Visualization\",\"type\":\"histogram\",\"params\":{\"shareYAxis\":true,\"addTooltip\":true,\"addLegend\":true,\"scale\":\"linear\",\"mode\":\"stacked\",\"times\":[],\"addTimeMarker\":false,\"defaultYExtents\":false,\"setYExtents\":false,\"yAxis\":{}},\"aggs\":[{\"id\":\"1\",\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"type\":\"date_histogram\",\"schema\":\"segment\",\"params\":{\"field\":\"@timestamp\",\"interval\":\"auto\",\"min_doc_count\":1,\"extended_bounds\":{}}}],\"listeners\":{}}" + }, + "coreMigrationVersion": "7.17.1", + "id": "Visualization☺-VerticalBarChart", + "migrationVersion": { + "visualization": "7.17.0" + }, + "references": [ + { + "id": "logstash-*", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "version": "WzEyLDJd" +} + +{ + "attributes": { + "description": "DataTable", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query_string\":{\"query\":\"*\",\"analyze_wildcard\":true}},\"filter\":[],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Visualization☺漢字 DataTable", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"New Visualization\",\"type\":\"table\",\"params\":{\"perPage\":10,\"showPartialRows\":false,\"showMeticsAtAllLevels\":false,\"showToolbar\":true},\"aggs\":[{\"id\":\"1\",\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"type\":\"histogram\",\"schema\":\"bucket\",\"params\":{\"field\":\"bytes\",\"interval\":2000,\"extended_bounds\":{}}}],\"listeners\":{}}" + }, + "coreMigrationVersion": "7.17.1", + "id": "Visualization☺漢字-DataTable", + "migrationVersion": { + "visualization": "7.17.0" + }, + "references": [ + { + "id": "logstash-*", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "version": "WzExLDJd" +} + +{ + "attributes": { + "description": "AreaChart", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query_string\":{\"query\":\"*\",\"analyze_wildcard\":true}},\"filter\":[],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Visualization漢字 AreaChart", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"New Visualization\",\"type\":\"area\",\"params\":{\"shareYAxis\":true,\"addTooltip\":true,\"addLegend\":true,\"smoothLines\":false,\"scale\":\"linear\",\"interpolate\":\"linear\",\"mode\":\"stacked\",\"times\":[],\"addTimeMarker\":false,\"defaultYExtents\":false,\"setYExtents\":false,\"yAxis\":{}},\"aggs\":[{\"id\":\"1\",\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"type\":\"date_histogram\",\"schema\":\"segment\",\"params\":{\"field\":\"@timestamp\",\"interval\":\"auto\",\"min_doc_count\":1,\"extended_bounds\":{}}}],\"listeners\":{}}" + }, + "coreMigrationVersion": "7.17.1", + "id": "Visualization漢字-AreaChart", + "migrationVersion": { + "visualization": "7.17.0" + }, + "references": [ + { + "id": "logstash-*", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "version": "WzE3LDJd" +} + +{ + "attributes": { + "description": "LineChart", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query_string\":{\"query\":\"*\",\"analyze_wildcard\":true}},\"filter\":[],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Visualization漢字 LineChart", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"New Visualization\",\"type\":\"line\",\"params\":{\"shareYAxis\":true,\"addTooltip\":true,\"addLegend\":true,\"showCircles\":true,\"smoothLines\":false,\"interpolate\":\"linear\",\"scale\":\"linear\",\"drawLinesBetweenPoints\":true,\"radiusRatio\":9,\"times\":[],\"addTimeMarker\":false,\"defaultYExtents\":false,\"setYExtents\":false,\"yAxis\":{},\"row\":false},\"aggs\":[{\"id\":\"1\",\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"type\":\"terms\",\"schema\":\"split\",\"params\":{\"field\":\"extension.raw\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\"}}],\"listeners\":{}}" + }, + "coreMigrationVersion": "7.17.1", + "id": "Visualization漢字-LineChart", + "migrationVersion": { + "visualization": "7.17.0" + }, + "references": [ + { + "id": "logstash-*", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "version": "WzE1LDJd" +} \ No newline at end of file diff --git a/test/plugin_functional/test_suites/data_plugin/session.ts b/test/plugin_functional/test_suites/data_plugin/session.ts index 54b86f0c8060b..e119d60a90244 100644 --- a/test/plugin_functional/test_suites/data_plugin/session.ts +++ b/test/plugin_functional/test_suites/data_plugin/session.ts @@ -15,6 +15,7 @@ export default function ({ getService, getPageObjects }: PluginFunctionalProvide const testSubjects = getService('testSubjects'); const toasts = getService('toasts'); const esArchiver = getService('esArchiver'); + const kibanaServer = getService('kibanaServer'); const getSessionIds = async () => { const sessionsBtn = await testSubjects.find('showSessionsButton'); @@ -73,8 +74,9 @@ export default function ({ getService, getPageObjects }: PluginFunctionalProvide await esArchiver.loadIfNeeded( 'test/functional/fixtures/es_archiver/dashboard/current/data' ); - await esArchiver.loadIfNeeded( - 'test/functional/fixtures/es_archiver/dashboard/current/kibana' + await kibanaServer.savedObjects.cleanStandardList(); + await kibanaServer.importExport.load( + 'test/functional/fixtures/kbn_archiver/dashboard/current/kibana' ); await PageObjects.common.navigateToApp('dashboard'); await PageObjects.dashboard.loadSavedDashboard('dashboard with filter'); @@ -88,7 +90,7 @@ export default function ({ getService, getPageObjects }: PluginFunctionalProvide after(async () => { await esArchiver.unload('test/functional/fixtures/es_archiver/dashboard/current/data'); - await esArchiver.unload('test/functional/fixtures/es_archiver/dashboard/current/kibana'); + await kibanaServer.savedObjects.cleanStandardList(); }); it('on load there is a single session', async () => { diff --git a/test/plugin_functional/test_suites/panel_actions/index.js b/test/plugin_functional/test_suites/panel_actions/index.js index 70e6ed67b218c..13958f758e1a9 100644 --- a/test/plugin_functional/test_suites/panel_actions/index.js +++ b/test/plugin_functional/test_suites/panel_actions/index.js @@ -15,7 +15,10 @@ export default function ({ getService, getPageObjects, loadTestFile }) { describe('pluggable panel actions', function () { before(async () => { await browser.setWindowSize(1300, 900); - await esArchiver.load('test/functional/fixtures/es_archiver/dashboard/current/kibana'); + await kibanaServer.savedObjects.cleanStandardList(); + await kibanaServer.importExport.load( + 'test/functional/fixtures/kbn_archiver/dashboard/current/kibana' + ); await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/dashboard/current/data'); await kibanaServer.uiSettings.replace({ defaultIndex: 'logstash-*', @@ -26,7 +29,7 @@ export default function ({ getService, getPageObjects, loadTestFile }) { after(async function () { await PageObjects.dashboard.clearSavedObjectsFromAppLinks(); - await esArchiver.unload('test/functional/fixtures/es_archiver/dashboard/current/kibana'); + await kibanaServer.savedObjects.cleanStandardList(); await esArchiver.unload('test/functional/fixtures/es_archiver/dashboard/current/data'); }); diff --git a/x-pack/plugins/apm/common/service_inventory.ts b/x-pack/plugins/apm/common/service_inventory.ts new file mode 100644 index 0000000000000..b7c8c0ea90a58 --- /dev/null +++ b/x-pack/plugins/apm/common/service_inventory.ts @@ -0,0 +1,20 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { AgentName } from '../typings/es_schemas/ui/fields/agent'; +import { ServiceHealthStatus } from './service_health_status'; + +export interface ServiceListItem { + serviceName: string; + healthStatus?: ServiceHealthStatus; + transactionType?: string; + agentName?: AgentName; + throughput?: number; + latency?: number | null; + transactionErrorRate?: number | null; + environments?: string[]; +} diff --git a/x-pack/plugins/apm/dev_docs/local_setup.md b/x-pack/plugins/apm/dev_docs/local_setup.md index b3c9d0acbaebc..f021f41b17c80 100644 --- a/x-pack/plugins/apm/dev_docs/local_setup.md +++ b/x-pack/plugins/apm/dev_docs/local_setup.md @@ -32,6 +32,15 @@ node ./scripts/es_archiver load "x-pack/plugins/apm/ftr_e2e/cypress/fixtures/es_ node packages/elastic-apm-synthtrace/src/scripts/run packages/elastic-apm-synthtrace/src/scripts/examples/01_simple_trace.ts --target=http://elastic:changeme@localhost:9200 ``` +**Connect Kibana to ES** +Update `config/kibana.dev.yml` with: + +```yml +elasticsearch.hosts: http://localhost:9200 +elasticsearch.username: kibana_system +elasticsearch.password: changeme +``` + Documentation for [Synthtrace](https://github.com/elastic/kibana/blob/main/packages/elastic-apm-synthtrace/README.md) ## 2. Cloud-based ES Cluster (internal devs only) diff --git a/x-pack/plugins/apm/public/components/app/service_inventory/index.tsx b/x-pack/plugins/apm/public/components/app/service_inventory/index.tsx index 1e736409a9604..cc4cbd975f5cd 100644 --- a/x-pack/plugins/apm/public/components/app/service_inventory/index.tsx +++ b/x-pack/plugins/apm/public/components/app/service_inventory/index.tsx @@ -12,21 +12,20 @@ import uuid from 'uuid'; import { useAnomalyDetectionJobsContext } from '../../../context/anomaly_detection_jobs/use_anomaly_detection_jobs_context'; import { useLegacyUrlParams } from '../../../context/url_params_context/use_url_params'; import { useLocalStorage } from '../../../hooks/use_local_storage'; -import { useAnyOfApmParams } from '../../../hooks/use_apm_params'; +import { useApmParams } from '../../../hooks/use_apm_params'; import { FETCH_STATUS, useFetcher } from '../../../hooks/use_fetcher'; import { useTimeRange } from '../../../hooks/use_time_range'; import { SearchBar } from '../../shared/search_bar'; import { getTimeRangeComparison } from '../../shared/time_comparison/get_time_range_comparison'; import { ServiceList } from './service_list'; import { MLCallout, shouldDisplayMlCallout } from '../../shared/ml_callout'; +import { joinByKey } from '../../../../common/utils/join_by_key'; const initialData = { requestId: '', - mainStatisticsData: { - items: [], - hasHistoricalData: true, - hasLegacyData: false, - }, + items: [], + hasHistoricalData: true, + hasLegacyData: false, }; function useServicesFetcher() { @@ -36,7 +35,7 @@ function useServicesFetcher() { const { query: { rangeFrom, rangeTo, environment, kuery }, - } = useAnyOfApmParams('/services/{serviceName}', '/services'); + } = useApmParams('/services'); const { start, end } = useTimeRange({ rangeFrom, rangeTo }); @@ -47,7 +46,23 @@ function useServicesFetcher() { comparisonType, }); - const { data = initialData, status: mainStatisticsStatus } = useFetcher( + const sortedAndFilteredServicesFetch = useFetcher( + (callApmApi) => { + return callApmApi('GET /internal/apm/sorted_and_filtered_services', { + params: { + query: { + start, + end, + environment, + kuery, + }, + }, + }); + }, + [start, end, environment, kuery] + ); + + const mainStatisticsFetch = useFetcher( (callApmApi) => { if (start && end) { return callApmApi('GET /internal/apm/services', { @@ -62,7 +77,7 @@ function useServicesFetcher() { }).then((mainStatisticsData) => { return { requestId: uuid(), - mainStatisticsData, + ...mainStatisticsData, }; }); } @@ -70,9 +85,9 @@ function useServicesFetcher() { [environment, kuery, start, end] ); - const { mainStatisticsData, requestId } = data; + const { data: mainStatisticsData = initialData } = mainStatisticsFetch; - const { data: comparisonData } = useFetcher( + const comparisonFetch = useFetcher( (callApmApi) => { if (start && end && mainStatisticsData.items.length) { return callApmApi('GET /internal/apm/services/detailed_statistics', { @@ -96,20 +111,23 @@ function useServicesFetcher() { }, // only fetches detailed statistics when requestId is invalidated by main statistics api call or offset is changed // eslint-disable-next-line react-hooks/exhaustive-deps - [requestId, offset], + [mainStatisticsData.requestId, offset], { preservePreviousData: false } ); return { - mainStatisticsData, - mainStatisticsStatus, - comparisonData, + sortedAndFilteredServicesFetch, + mainStatisticsFetch, + comparisonFetch, }; } export function ServiceInventory() { - const { mainStatisticsData, mainStatisticsStatus, comparisonData } = - useServicesFetcher(); + const { + sortedAndFilteredServicesFetch, + mainStatisticsFetch, + comparisonFetch, + } = useServicesFetcher(); const { anomalyDetectionSetupState } = useAnomalyDetectionJobsContext(); @@ -122,8 +140,13 @@ export function ServiceInventory() { !userHasDismissedCallout && shouldDisplayMlCallout(anomalyDetectionSetupState); - const isLoading = mainStatisticsStatus === FETCH_STATUS.LOADING; - const isFailure = mainStatisticsStatus === FETCH_STATUS.FAILURE; + const isLoading = + sortedAndFilteredServicesFetch.status === FETCH_STATUS.LOADING || + (sortedAndFilteredServicesFetch.status === FETCH_STATUS.SUCCESS && + sortedAndFilteredServicesFetch.data?.services.length === 0 && + mainStatisticsFetch.status === FETCH_STATUS.LOADING); + + const isFailure = mainStatisticsFetch.status === FETCH_STATUS.FAILURE; const noItemsMessage = ( ); + const items = joinByKey( + [ + ...(sortedAndFilteredServicesFetch.data?.services ?? []), + ...(mainStatisticsFetch.data?.items ?? []), + ], + 'serviceName' + ); + return ( <> @@ -154,8 +185,8 @@ export function ServiceInventory() { diff --git a/x-pack/plugins/apm/public/components/app/service_inventory/service_inventory.stories.tsx b/x-pack/plugins/apm/public/components/app/service_inventory/service_inventory.stories.tsx index bececfb545ba9..01430c93b4b5a 100644 --- a/x-pack/plugins/apm/public/components/app/service_inventory/service_inventory.stories.tsx +++ b/x-pack/plugins/apm/public/components/app/service_inventory/service_inventory.stories.tsx @@ -30,6 +30,10 @@ const stories: Meta<{}> = { switch (endpoint) { case '/internal/apm/services': return { items: [] }; + + case '/internal/apm/sorted_and_filtered_services': + return { services: [] }; + default: return {}; } diff --git a/x-pack/plugins/apm/public/components/app/service_inventory/service_list/index.tsx b/x-pack/plugins/apm/public/components/app/service_inventory/service_list/index.tsx index 760b849775429..2d01a11d92186 100644 --- a/x-pack/plugins/apm/public/components/app/service_inventory/service_list/index.tsx +++ b/x-pack/plugins/apm/public/components/app/service_inventory/service_list/index.tsx @@ -17,7 +17,6 @@ import { i18n } from '@kbn/i18n'; import { TypeOf } from '@kbn/typed-react-router-config'; import { orderBy } from 'lodash'; import React, { useMemo } from 'react'; -import { ValuesType } from 'utility-types'; import { NOT_AVAILABLE_LABEL } from '../../../../../common/i18n'; import { ServiceHealthStatus } from '../../../../../common/service_health_status'; import { @@ -46,14 +45,11 @@ import { getTimeSeriesColor, } from '../../../shared/charts/helper/get_timeseries_color'; import { HealthBadge } from './health_badge'; +import { ServiceListItem } from '../../../../../common/service_inventory'; -type ServiceListAPIResponse = APIReturnType<'GET /internal/apm/services'>; -type Items = ServiceListAPIResponse['items']; type ServicesDetailedStatisticsAPIResponse = APIReturnType<'GET /internal/apm/services/detailed_statistics'>; -type ServiceListItem = ValuesType; - function formatString(value?: string | null) { return value || NOT_AVAILABLE_LABEL; } @@ -239,7 +235,7 @@ export function getServiceColumns({ } interface Props { - items: Items; + items: ServiceListItem[]; comparisonData?: ServicesDetailedStatisticsAPIResponse; noItemsMessage?: React.ReactNode; isLoading: boolean; @@ -287,9 +283,8 @@ export function ServiceList({ ] ); - const initialSortField = displayHealthStatus - ? 'healthStatus' - : 'transactionsPerMinute'; + const initialSortField = displayHealthStatus ? 'healthStatus' : 'serviceName'; + const initialSortDirection = displayHealthStatus ? 'desc' : 'asc'; return ( @@ -336,9 +331,9 @@ export function ServiceList({ items={items} noItemsMessage={noItemsMessage} initialSortField={initialSortField} - initialSortDirection="desc" + initialSortDirection={initialSortDirection} sortFn={(itemsToSort, sortField, sortDirection) => { - // For healthStatus, sort items by healthStatus first, then by TPM + // For healthStatus, sort items by healthStatus first, then by name return sortField === 'healthStatus' ? orderBy( itemsToSort, @@ -348,9 +343,9 @@ export function ServiceList({ ? SERVICE_HEALTH_STATUS_ORDER.indexOf(item.healthStatus) : -1; }, - (item) => item.throughput ?? 0, + (item) => item.serviceName.toLowerCase(), ], - [sortDirection, sortDirection] + [sortDirection, sortDirection === 'asc' ? 'desc' : 'asc'] ) : orderBy( itemsToSort, diff --git a/x-pack/plugins/apm/server/routes/agent_keys/invalidate_agent_key.ts b/x-pack/plugins/apm/server/routes/agent_keys/invalidate_agent_key.ts index 99c5008718403..ec244f8e9bee3 100644 --- a/x-pack/plugins/apm/server/routes/agent_keys/invalidate_agent_key.ts +++ b/x-pack/plugins/apm/server/routes/agent_keys/invalidate_agent_key.ts @@ -9,17 +9,16 @@ import { ApmPluginRequestHandlerContext } from '../typings'; export async function invalidateAgentKey({ context, id, + isAdmin, }: { context: ApmPluginRequestHandlerContext; id: string; + isAdmin: boolean; }) { const { invalidated_api_keys: invalidatedAgentKeys } = await context.core.elasticsearch.client.asCurrentUser.security.invalidateApiKey( { - body: { - ids: [id], - owner: true, - }, + body: { ids: [id], owner: !isAdmin }, } ); diff --git a/x-pack/plugins/apm/server/routes/agent_keys/route.ts b/x-pack/plugins/apm/server/routes/agent_keys/route.ts index 90ffbbf8a656e..9b01153f73910 100644 --- a/x-pack/plugins/apm/server/routes/agent_keys/route.ts +++ b/x-pack/plugins/apm/server/routes/agent_keys/route.ts @@ -70,15 +70,29 @@ const invalidateAgentKeyRoute = createApmServerRoute({ body: t.type({ id: t.string }), }), handler: async (resources): Promise<{ invalidatedAgentKeys: string[] }> => { - const { context, params } = resources; - + const { + context, + params, + plugins: { security }, + } = resources; const { body: { id }, } = params; + if (!security) { + throw Boom.internal(SECURITY_REQUIRED_MESSAGE); + } + + const securityPluginStart = await security.start(); + const { isAdmin } = await getAgentKeysPrivileges({ + context, + securityPluginStart, + }); + const invalidatedKeys = await invalidateAgentKey({ context, id, + isAdmin, }); return invalidatedKeys; diff --git a/x-pack/plugins/apm/server/routes/services/get_services/get_health_statuses.ts b/x-pack/plugins/apm/server/routes/services/get_services/get_health_statuses.ts index 65fb04b821ffa..4e8795aacc228 100644 --- a/x-pack/plugins/apm/server/routes/services/get_services/get_health_statuses.ts +++ b/x-pack/plugins/apm/server/routes/services/get_services/get_health_statuses.ts @@ -6,14 +6,16 @@ */ import { getSeverity } from '../../../../common/anomaly_detection'; -import { getServiceHealthStatus } from '../../../../common/service_health_status'; +import { + getServiceHealthStatus, + ServiceHealthStatus, +} from '../../../../common/service_health_status'; import { getServiceAnomalies } from '../../../routes/service_map/get_service_anomalies'; import { ServicesItemsSetup } from './get_services_items'; interface AggregationParams { environment: string; setup: ServicesItemsSetup; - searchAggregatedTransactions: boolean; start: number; end: number; } @@ -23,7 +25,9 @@ export const getHealthStatuses = async ({ setup, start, end, -}: AggregationParams) => { +}: AggregationParams): Promise< + Array<{ serviceName: string; healthStatus: ServiceHealthStatus }> +> => { if (!setup.ml) { return []; } diff --git a/x-pack/plugins/apm/server/routes/services/get_services/get_sorted_and_filtered_services.ts b/x-pack/plugins/apm/server/routes/services/get_services/get_sorted_and_filtered_services.ts new file mode 100644 index 0000000000000..5a7df14fa3186 --- /dev/null +++ b/x-pack/plugins/apm/server/routes/services/get_services/get_sorted_and_filtered_services.ts @@ -0,0 +1,80 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { Logger } from '@kbn/logging'; +import { SERVICE_NAME } from '../../../../common/elasticsearch_fieldnames'; +import { ENVIRONMENT_ALL } from '../../../../common/environment_filter_values'; +import { Environment } from '../../../../common/environment_rt'; +import { ProcessorEvent } from '../../../../common/processor_event'; +import { joinByKey } from '../../../../common/utils/join_by_key'; +import { Setup } from '../../../lib/helpers/setup_request'; +import { getHealthStatuses } from './get_health_statuses'; + +export async function getSortedAndFilteredServices({ + setup, + start, + end, + environment, + logger, +}: { + setup: Setup; + start: number; + end: number; + environment: Environment; + logger: Logger; +}) { + const { apmEventClient } = setup; + + async function getServicesFromTermsEnum() { + if (environment !== ENVIRONMENT_ALL.value) { + return []; + } + const response = await apmEventClient.termsEnum( + 'get_services_from_terms_enum', + { + apm: { + events: [ + ProcessorEvent.transaction, + ProcessorEvent.span, + ProcessorEvent.metric, + ProcessorEvent.error, + ], + }, + body: { + size: 500, + field: SERVICE_NAME, + }, + } + ); + + return response.terms; + } + + const [servicesWithHealthStatuses, serviceNamesFromTermsEnum] = + await Promise.all([ + getHealthStatuses({ + setup, + start, + end, + environment, + }).catch((error) => { + logger.error(error); + return []; + }), + getServicesFromTermsEnum(), + ]); + + const services = joinByKey( + [ + ...servicesWithHealthStatuses, + ...serviceNamesFromTermsEnum.map((serviceName) => ({ serviceName })), + ], + 'serviceName' + ); + + return services; +} diff --git a/x-pack/plugins/apm/server/routes/services/route.ts b/x-pack/plugins/apm/server/routes/services/route.ts index 55f7b4f14b7b6..7c69f3b1df802 100644 --- a/x-pack/plugins/apm/server/routes/services/route.ts +++ b/x-pack/plugins/apm/server/routes/services/route.ts @@ -52,6 +52,8 @@ import { ML_ERRORS } from '../../../common/anomaly_detection'; import { ScopedAnnotationsClient } from '../../../../observability/server'; import { Annotation } from './../../../../observability/common/annotations'; import { ConnectionStatsItemWithImpact } from './../../../common/connections'; +import { getSortedAndFilteredServices } from './get_services/get_sorted_and_filtered_services'; +import { ServiceHealthStatus } from './../../../common/service_health_status'; const servicesRoute = createApmServerRoute({ endpoint: 'GET /internal/apm/services', @@ -1224,6 +1226,45 @@ const serviceAnomalyChartsRoute = createApmServerRoute({ }, }); +const sortedAndFilteredServicesRoute = createApmServerRoute({ + endpoint: 'GET /internal/apm/sorted_and_filtered_services', + options: { + tags: ['access:apm'], + }, + params: t.type({ + query: t.intersection([rangeRt, environmentRt, kueryRt]), + }), + handler: async ( + resources + ): Promise<{ + services: Array<{ + serviceName: string; + healthStatus?: ServiceHealthStatus; + }>; + }> => { + const { + query: { start, end, environment, kuery }, + } = resources.params; + + if (kuery) { + return { + services: [], + }; + } + + const setup = await setupRequest(resources); + return { + services: await getSortedAndFilteredServices({ + setup, + start, + end, + environment, + logger: resources.logger, + }), + }; + }, +}); + export const serviceRouteRepository = { ...servicesRoute, ...servicesDetailedStatisticsRoute, @@ -1245,4 +1286,5 @@ export const serviceRouteRepository = { ...serviceAlertsRoute, ...serviceInfrastructureRoute, ...serviceAnomalyChartsRoute, + ...sortedAndFilteredServicesRoute, }; diff --git a/x-pack/plugins/cases/public/components/header_page/editable_title.test.tsx b/x-pack/plugins/cases/public/components/header_page/editable_title.test.tsx index 9cf956c78fe72..111cc4940ac59 100644 --- a/x-pack/plugins/cases/public/components/header_page/editable_title.test.tsx +++ b/x-pack/plugins/cases/public/components/header_page/editable_title.test.tsx @@ -221,6 +221,49 @@ describe('EditableTitle', () => { ); }); + it('does not show an error after a previous edit error was displayed', () => { + const longTitle = + 'This is a title that should not be saved as it is longer than 64 characters.'; + + const shortTitle = 'My title'; + const wrapper = mount( + + + + ); + + wrapper.find('button[data-test-subj="editable-title-edit-icon"]').simulate('click'); + wrapper.update(); + + // simualte a long title + wrapper + .find('input[data-test-subj="editable-title-input-field"]') + .simulate('change', { target: { value: longTitle } }); + + wrapper.find('button[data-test-subj="editable-title-submit-btn"]').simulate('click'); + wrapper.update(); + expect(wrapper.find('.euiFormErrorText').text()).toBe( + 'The length of the title is too long. The maximum length is 64.' + ); + + // write a shorter one + wrapper + .find('input[data-test-subj="editable-title-input-field"]') + .simulate('change', { target: { value: shortTitle } }); + wrapper.update(); + + // submit the form + wrapper.find('button[data-test-subj="editable-title-submit-btn"]').simulate('click'); + wrapper.update(); + + // edit again + wrapper.find('button[data-test-subj="editable-title-edit-icon"]').simulate('click'); + wrapper.update(); + + // no error should appear + expect(wrapper.find('.euiFormErrorText').length).toBe(0); + }); + describe('Badges', () => { let appMock: AppMockRenderer; diff --git a/x-pack/plugins/cases/public/components/header_page/editable_title.tsx b/x-pack/plugins/cases/public/components/header_page/editable_title.tsx index 95e3f6f4a4bcb..0b142ca40a548 100644 --- a/x-pack/plugins/cases/public/components/header_page/editable_title.tsx +++ b/x-pack/plugins/cases/public/components/header_page/editable_title.tsx @@ -71,6 +71,7 @@ const EditableTitleComponent: React.FC = ({ onSubmit(newTitle); } setEditMode(false); + setErrors([]); }, [newTitle, onSubmit, title]); const handleOnChange = useCallback( @@ -82,39 +83,42 @@ const EditableTitleComponent: React.FC = ({ return editMode ? ( - - + + - - - - {i18n.SAVE} - - - - - {i18n.CANCEL} - - - - + + + {i18n.SAVE} + + + + + {i18n.CANCEL} + + ) : ( diff --git a/x-pack/plugins/cases/public/mocks.ts b/x-pack/plugins/cases/public/mocks.ts index a3876e9e19322..f3734be220da0 100644 --- a/x-pack/plugins/cases/public/mocks.ts +++ b/x-pack/plugins/cases/public/mocks.ts @@ -13,10 +13,8 @@ export const mockCasesContract = (): jest.Mocked => ({ getCases: jest.fn(), getCasesContext: jest.fn().mockImplementation(() => mockCasesContext), getAllCasesSelectorModal: jest.fn(), - getAllCasesSelectorModalNoProvider: jest.fn(), getCreateCaseFlyout: jest.fn(), getRecentCases: jest.fn(), - getCreateCaseFlyoutNoProvider: jest.fn(), hooks: { getUseCasesAddToNewCaseFlyout: jest.fn(), getUseCasesAddToExistingCaseModal: jest.fn(), diff --git a/x-pack/plugins/cases/public/plugin.ts b/x-pack/plugins/cases/public/plugin.ts index ae1d87d9966a2..6b1e7b784b630 100644 --- a/x-pack/plugins/cases/public/plugin.ts +++ b/x-pack/plugins/cases/public/plugin.ts @@ -14,8 +14,6 @@ import { getAllCasesSelectorModalLazy, getCreateCaseFlyoutLazy, canUseCases, - getCreateCaseFlyoutLazyNoProvider, - getAllCasesSelectorModalNoProviderLazy, } from './methods'; import { CasesUiConfigType } from '../common/ui/types'; import { APP_ID, APP_PATH } from '../common/constants'; @@ -93,12 +91,10 @@ export class CasesUiPlugin getCases: getCasesLazy, getCasesContext: getCasesContextLazy, getRecentCases: getRecentCasesLazy, + // @deprecated Please use the hook getUseCasesAddToNewCaseFlyout getCreateCaseFlyout: getCreateCaseFlyoutLazy, + // @deprecated Please use the hook getUseCasesAddToExistingCaseModal getAllCasesSelectorModal: getAllCasesSelectorModalLazy, - // Temporal methods to remove timelines and cases deep integration - // https://github.com/elastic/kibana/issues/123183 - getCreateCaseFlyoutNoProvider: getCreateCaseFlyoutLazyNoProvider, - getAllCasesSelectorModalNoProvider: getAllCasesSelectorModalNoProviderLazy, hooks: { getUseCasesAddToNewCaseFlyout: useCasesAddToNewCaseFlyout, getUseCasesAddToExistingCaseModal: useCasesAddToExistingCaseModal, diff --git a/x-pack/plugins/cases/public/types.ts b/x-pack/plugins/cases/public/types.ts index c756a5f73a0a7..b136892717135 100644 --- a/x-pack/plugins/cases/public/types.ts +++ b/x-pack/plugins/cases/public/types.ts @@ -22,7 +22,6 @@ import type { SpacesPluginStart } from '../../spaces/public'; import type { TriggersAndActionsUIPublicPluginStart as TriggersActionsStart } from '../../triggers_actions_ui/public'; import { CommentRequestAlertType, CommentRequestUserType } from '../common/api'; import { UseCasesAddToExistingCaseModal } from './components/all_cases/selector_modal/use_cases_add_to_existing_case_modal'; -import { CreateCaseFlyoutProps } from './components/create/flyout'; import { UseCasesAddToNewCaseFlyout } from './components/create/flyout/use_cases_add_to_new_case_flyout'; import type { @@ -97,18 +96,12 @@ export interface CasesUiStart { getAllCasesSelectorModal: ( props: GetAllCasesSelectorModalProps ) => ReactElement; - getAllCasesSelectorModalNoProvider: ( - props: GetAllCasesSelectorModalProps - ) => ReactElement; /** * Flyout with the form to create a case for the owner * @param props GetCreateCaseFlyoutProps * @returns A react component that is a flyout for creating a case */ getCreateCaseFlyout: (props: GetCreateCaseFlyoutProps) => ReactElement; - getCreateCaseFlyoutNoProvider: ( - props: CreateCaseFlyoutProps - ) => ReactElement; /** * Get the recent cases component * @param props GetRecentCasesProps diff --git a/x-pack/plugins/cloud_security_posture/common/utils/helpers.ts b/x-pack/plugins/cloud_security_posture/common/utils/helpers.ts index 1df0c18ebdd02..745b59724dcb2 100644 --- a/x-pack/plugins/cloud_security_posture/common/utils/helpers.ts +++ b/x-pack/plugins/cloud_security_posture/common/utils/helpers.ts @@ -4,7 +4,6 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import * as t from 'io-ts'; /** * @example @@ -16,7 +15,7 @@ export const isNonNullable = (v: T): v is NonNullable => export const extractErrorMessage = (e: unknown, defaultMessage = 'Unknown Error'): string => { if (e instanceof Error) return e.message; - if (t.record(t.literal('message'), t.string).is(e)) return e.message; + if (typeof e === 'string') return e; return defaultMessage; // TODO: i18n }; diff --git a/x-pack/plugins/cloud_security_posture/public/common/navigation/constants.ts b/x-pack/plugins/cloud_security_posture/public/common/navigation/constants.ts index 4e07a4c800f53..8603e13159f5b 100644 --- a/x-pack/plugins/cloud_security_posture/public/common/navigation/constants.ts +++ b/x-pack/plugins/cloud_security_posture/public/common/navigation/constants.ts @@ -12,7 +12,7 @@ import type { CspPage, CspNavigationItem } from './types'; export const allNavigationItems: Record = { dashboard: { name: TEXT.DASHBOARD, path: '/dashboard' }, findings: { name: TEXT.FINDINGS, path: '/findings' }, - rules: { name: 'Rules', path: '/rules', disabled: true }, + rules: { name: 'Rules', path: '/rules', disabled: !INTERNAL_FEATURE_FLAGS.showBenchmarks }, benchmarks: { name: TEXT.MY_BENCHMARKS, path: '/benchmarks', diff --git a/x-pack/plugins/cloud_security_posture/public/pages/rules/index.tsx b/x-pack/plugins/cloud_security_posture/public/pages/rules/index.tsx index 130f03fd5784d..0b511c9fb9031 100644 --- a/x-pack/plugins/cloud_security_posture/public/pages/rules/index.tsx +++ b/x-pack/plugins/cloud_security_posture/public/pages/rules/index.tsx @@ -7,6 +7,9 @@ import React from 'react'; import type { EuiPageHeaderProps } from '@elastic/eui'; import { CspPageTemplate } from '../../components/page_template'; +import { RulesContainer } from './rules_container'; +import { allNavigationItems } from '../../common/navigation/constants'; +import { useCspBreadcrumbs } from '../../common/navigation/use_csp_breadcrumbs'; // TODO: // - get selected integration @@ -15,6 +18,14 @@ const pageHeader: EuiPageHeaderProps = { pageTitle: 'Rules', }; +const breadcrumbs = [allNavigationItems.rules]; + export const Rules = () => { - return ; + useCspBreadcrumbs(breadcrumbs); + + return ( + + + + ); }; diff --git a/x-pack/plugins/cloud_security_posture/public/pages/rules/rules_bottom_bar.tsx b/x-pack/plugins/cloud_security_posture/public/pages/rules/rules_bottom_bar.tsx new file mode 100644 index 0000000000000..ebf4913f895c3 --- /dev/null +++ b/x-pack/plugins/cloud_security_posture/public/pages/rules/rules_bottom_bar.tsx @@ -0,0 +1,40 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import React from 'react'; +import { EuiFlexGroup, EuiFlexItem, EuiBottomBar, EuiButton } from '@elastic/eui'; +import * as TEST_SUBJECTS from './test_subjects'; +import * as TEXT from './translations'; + +interface RulesBottomBarProps { + onSave(): void; + onCancel(): void; + isLoading: boolean; +} + +export const RulesBottomBar = ({ onSave, onCancel, isLoading }: RulesBottomBarProps) => ( + + + + + {TEXT.CANCEL} + + + + + {TEXT.SAVE} + + + + +); diff --git a/x-pack/plugins/cloud_security_posture/public/pages/rules/rules_bulk_actions_menu.tsx b/x-pack/plugins/cloud_security_posture/public/pages/rules/rules_bulk_actions_menu.tsx new file mode 100644 index 0000000000000..1f264fd33e1c0 --- /dev/null +++ b/x-pack/plugins/cloud_security_posture/public/pages/rules/rules_bulk_actions_menu.tsx @@ -0,0 +1,53 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import React, { useState } from 'react'; +import { EuiContextMenuPanel, EuiContextMenuItem, EuiPopover, EuiButtonEmpty } from '@elastic/eui'; +import * as TEST_SUBJECTS from './test_subjects'; +import * as TEXT from './translations'; + +interface RulesBulkActionsMenuProps { + items: ReadonlyArray>; +} + +export const RulesBulkActionsMenu = ({ items }: RulesBulkActionsMenuProps) => { + const [isPopoverOpen, setPopover] = useState(false); + const onButtonClick = () => setPopover(!isPopoverOpen); + const closePopover = () => setPopover(false); + + const panelItems = items.map((item, i) => ( + { + closePopover(); + item.onClick?.(e); + }} + /> + )); + + const button = ( + + {TEXT.BULK_ACTIONS} + + ); + + return ( + + + + ); +}; diff --git a/x-pack/plugins/cloud_security_posture/public/pages/rules/rules_container.test.tsx b/x-pack/plugins/cloud_security_posture/public/pages/rules/rules_container.test.tsx new file mode 100644 index 0000000000000..bcbc4d5c4bd44 --- /dev/null +++ b/x-pack/plugins/cloud_security_posture/public/pages/rules/rules_container.test.tsx @@ -0,0 +1,339 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; +import { RulesContainer } from './rules_container'; +import { render, screen, fireEvent } from '@testing-library/react'; +import { QueryClient } from 'react-query'; +import { useFindCspRules, useBulkUpdateCspRules, type RuleSavedObject } from './use_csp_rules'; +import * as TEST_SUBJECTS from './test_subjects'; +import { Chance } from 'chance'; +import { TestProvider } from '../../test/test_provider'; + +const chance = new Chance(); + +jest.mock('./use_csp_rules', () => ({ + useFindCspRules: jest.fn(), + useBulkUpdateCspRules: jest.fn(), +})); + +const queryClient = new QueryClient({ + defaultOptions: { + queries: { retry: false }, + }, +}); + +const getWrapper = + (): React.FC => + ({ children }) => + {children}; + +const getRuleMock = ({ id = chance.guid(), enabled }: { id?: string; enabled: boolean }) => + ({ + id, + updatedAt: chance.date().toISOString(), + attributes: { + id, + name: chance.word(), + enabled, + }, + } as RuleSavedObject); + +describe('', () => { + beforeEach(() => { + queryClient.clear(); + jest.clearAllMocks(); + (useBulkUpdateCspRules as jest.Mock).mockReturnValue({ + status: 'idle', + mutate: jest.fn(), + }); + }); + + it('displays rules with their initial state', async () => { + const Wrapper = getWrapper(); + const rule1 = getRuleMock({ enabled: true }); + + (useFindCspRules as jest.Mock).mockReturnValue({ + status: 'success', + data: { + total: 1, + savedObjects: [rule1], + }, + }); + + render( + + + + ); + + expect(await screen.findByTestId(TEST_SUBJECTS.CSP_RULES_CONTAINER)).toBeInTheDocument(); + expect(await screen.findByText(rule1.attributes.name)).toBeInTheDocument(); + expect( + screen + .getByTestId(TEST_SUBJECTS.getCspRulesTableItemSwitchTestId(rule1.id)) + .getAttribute('aria-checked') + ).toEqual('true'); + }); + + it('toggles rules locally', () => { + const Wrapper = getWrapper(); + const rule1 = getRuleMock({ enabled: false }); + const rule2 = getRuleMock({ enabled: true }); + + (useFindCspRules as jest.Mock).mockReturnValue({ + status: 'success', + data: { + total: 2, + savedObjects: [rule1, rule2], + }, + }); + + render( + + + + ); + + const switchId1 = TEST_SUBJECTS.getCspRulesTableItemSwitchTestId(rule1.id); + const switchId2 = TEST_SUBJECTS.getCspRulesTableItemSwitchTestId(rule2.id); + + fireEvent.click(screen.getByTestId(switchId1)); + fireEvent.click(screen.getByTestId(switchId2)); + + expect(screen.getByTestId(switchId1).getAttribute('aria-checked')).toEqual( + (!rule1.attributes.enabled).toString() + ); + expect(screen.getByTestId(switchId2).getAttribute('aria-checked')).toEqual( + (!rule2.attributes.enabled).toString() + ); + }); + + it('bulk toggles rules locally', () => { + const Wrapper = getWrapper(); + const rule1 = getRuleMock({ enabled: true }); + const rule2 = getRuleMock({ enabled: true }); + const rule3 = getRuleMock({ enabled: false }); + + (useFindCspRules as jest.Mock).mockReturnValue({ + status: 'success', + data: { + total: 3, + savedObjects: [rule1, rule2, rule3], + }, + }); + + render( + + + + ); + + const switchId1 = TEST_SUBJECTS.getCspRulesTableItemSwitchTestId(rule1.id); + const switchId2 = TEST_SUBJECTS.getCspRulesTableItemSwitchTestId(rule2.id); + const switchId3 = TEST_SUBJECTS.getCspRulesTableItemSwitchTestId(rule3.id); + + fireEvent.click(screen.getByTestId('checkboxSelectAll')); + fireEvent.click(screen.getByTestId(TEST_SUBJECTS.CSP_RULES_TABLE_BULK_MENU_BUTTON)); + fireEvent.click(screen.getByTestId(TEST_SUBJECTS.CSP_RULES_TABLE_BULK_DISABLE_BUTTON)); + + expect(screen.getByTestId(switchId1).getAttribute('aria-checked')).toEqual( + (!rule1.attributes.enabled).toString() + ); + expect(screen.getByTestId(switchId2).getAttribute('aria-checked')).toEqual( + (!rule2.attributes.enabled).toString() + ); + expect(screen.getByTestId(switchId3).getAttribute('aria-checked')).toEqual( + rule3.attributes.enabled.toString() + ); + }); + + it('updates rules with local changes done by non-bulk toggles', () => { + const Wrapper = getWrapper(); + const rule1 = getRuleMock({ enabled: false }); + const rule2 = getRuleMock({ enabled: true }); + const rule3 = getRuleMock({ enabled: true }); + + (useFindCspRules as jest.Mock).mockReturnValue({ + status: 'success', + data: { + total: 3, + savedObjects: [rule1, rule2, rule3], + }, + }); + + render( + + + + ); + const { mutate } = useBulkUpdateCspRules(); + + const switchId1 = TEST_SUBJECTS.getCspRulesTableItemSwitchTestId(rule1.id); + const switchId2 = TEST_SUBJECTS.getCspRulesTableItemSwitchTestId(rule2.id); + const switchId3 = TEST_SUBJECTS.getCspRulesTableItemSwitchTestId(rule3.id); + + fireEvent.click(screen.getByTestId(switchId1)); + fireEvent.click(screen.getByTestId(switchId2)); + fireEvent.click(screen.getByTestId(switchId3)); // adds + fireEvent.click(screen.getByTestId(switchId3)); // removes + fireEvent.click(screen.getByTestId(TEST_SUBJECTS.CSP_RULES_SAVE_BUTTON)); + + expect(mutate).toHaveBeenCalledTimes(1); + expect(mutate).toHaveBeenCalledWith([ + { ...rule1.attributes, enabled: !rule1.attributes.enabled }, + { ...rule2.attributes, enabled: !rule2.attributes.enabled }, + ]); + }); + + it('updates rules with local changes done by bulk toggles', () => { + const Wrapper = getWrapper(); + const rule1 = getRuleMock({ enabled: false }); + const rule2 = getRuleMock({ enabled: true }); + const rule3 = getRuleMock({ enabled: true }); + + (useFindCspRules as jest.Mock).mockReturnValue({ + status: 'success', + data: { + total: 3, + savedObjects: [rule1, rule2, rule3], + }, + }); + + render( + + + + ); + const { mutate } = useBulkUpdateCspRules(); + + fireEvent.click(screen.getByTestId('checkboxSelectAll')); + fireEvent.click(screen.getByTestId(TEST_SUBJECTS.CSP_RULES_TABLE_BULK_MENU_BUTTON)); + fireEvent.click(screen.getByTestId(TEST_SUBJECTS.CSP_RULES_TABLE_BULK_ENABLE_BUTTON)); // This should only change rule1 + fireEvent.click(screen.getByTestId(TEST_SUBJECTS.CSP_RULES_SAVE_BUTTON)); + + expect(mutate).toHaveBeenCalledTimes(1); + expect(mutate).toHaveBeenCalledWith([ + { ...rule1.attributes, enabled: !rule1.attributes.enabled }, + ]); + }); + + it('only changes selected rules in bulk operations', () => { + const Wrapper = getWrapper(); + const rule1 = getRuleMock({ enabled: false }); + const rule2 = getRuleMock({ enabled: true }); + const rule3 = getRuleMock({ enabled: false }); + const rule4 = getRuleMock({ enabled: false }); + const rule5 = getRuleMock({ enabled: true }); + + (useFindCspRules as jest.Mock).mockReturnValue({ + status: 'success', + data: { + total: 4, + savedObjects: [rule1, rule2, rule3, rule4, rule5], + }, + }); + + render( + + + + ); + const { mutate } = useBulkUpdateCspRules(); + + fireEvent.click(screen.getByTestId(`checkboxSelectRow-${rule1.id}`)); // changes + fireEvent.click(screen.getByTestId(`checkboxSelectRow-${rule2.id}`)); // doesn't change + fireEvent.click(screen.getByTestId(`checkboxSelectRow-${rule4.id}`)); // changes + fireEvent.click(screen.getByTestId(TEST_SUBJECTS.CSP_RULES_TABLE_BULK_MENU_BUTTON)); + fireEvent.click(screen.getByTestId(TEST_SUBJECTS.CSP_RULES_TABLE_BULK_ENABLE_BUTTON)); + fireEvent.click(screen.getByTestId(TEST_SUBJECTS.getCspRulesTableItemSwitchTestId(rule5.id))); // changes + fireEvent.click(screen.getByTestId(TEST_SUBJECTS.CSP_RULES_SAVE_BUTTON)); + + expect(mutate).toHaveBeenCalledTimes(1); + expect(mutate).toHaveBeenCalledWith([ + { ...rule1.attributes, enabled: !rule1.attributes.enabled }, + { ...rule4.attributes, enabled: !rule4.attributes.enabled }, + { ...rule5.attributes, enabled: !rule5.attributes.enabled }, + ]); + }); + + it('updates rules with changes of both bulk/non-bulk toggles', () => { + const Wrapper = getWrapper(); + const rule1 = getRuleMock({ enabled: false }); + const rule2 = getRuleMock({ enabled: true }); + const rule3 = getRuleMock({ enabled: false }); + const rule4 = getRuleMock({ enabled: false }); + const rule5 = getRuleMock({ enabled: true }); + + (useFindCspRules as jest.Mock).mockReturnValue({ + status: 'success', + data: { + total: 4, + savedObjects: [rule1, rule2, rule3, rule4, rule5], + }, + }); + + render( + + + + ); + + const { mutate } = useBulkUpdateCspRules(); + + fireEvent.click(screen.getByTestId(`checkboxSelectRow-${rule1.id}`)); // changes rule1 + fireEvent.click(screen.getByTestId(`checkboxSelectRow-${rule2.id}`)); // doesn't change + fireEvent.click(screen.getByTestId(`checkboxSelectRow-${rule4.id}`)); // changes rule4 + fireEvent.click(screen.getByTestId(TEST_SUBJECTS.CSP_RULES_TABLE_BULK_MENU_BUTTON)); + fireEvent.click(screen.getByTestId(TEST_SUBJECTS.CSP_RULES_TABLE_BULK_DISABLE_BUTTON)); // changes rule2 + fireEvent.click(screen.getByTestId(TEST_SUBJECTS.CSP_RULES_TABLE_BULK_ENABLE_BUTTON)); // reverts rule2 + fireEvent.click(screen.getByTestId(TEST_SUBJECTS.getCspRulesTableItemSwitchTestId(rule5.id))); // changes rule5 + fireEvent.click(screen.getByTestId(TEST_SUBJECTS.CSP_RULES_SAVE_BUTTON)); + + expect(mutate).toHaveBeenCalledTimes(1); + expect(mutate).toHaveBeenCalledWith([ + { ...rule1.attributes, enabled: !rule1.attributes.enabled }, + { ...rule4.attributes, enabled: !rule4.attributes.enabled }, + { ...rule5.attributes, enabled: !rule5.attributes.enabled }, + ]); + }); + + it('selects and updates all rules', async () => { + const Wrapper = getWrapper(); + const enabled = true; + const rules = Array.from({ length: 20 }, () => getRuleMock({ enabled })); + + (useFindCspRules as jest.Mock).mockReturnValue({ + status: 'success', + data: { + total: rules.length, + savedObjects: rules, + }, + }); + + render( + + + + ); + + const { mutate } = useBulkUpdateCspRules(); + + fireEvent.click(screen.getByTestId(TEST_SUBJECTS.CSP_RULES_TABLE_SELECT_ALL_BUTTON)); + fireEvent.click(screen.getByTestId(TEST_SUBJECTS.CSP_RULES_TABLE_BULK_MENU_BUTTON)); + fireEvent.click(screen.getByTestId(TEST_SUBJECTS.CSP_RULES_TABLE_BULK_DISABLE_BUTTON)); + fireEvent.click(screen.getByTestId(TEST_SUBJECTS.CSP_RULES_SAVE_BUTTON)); + + expect(mutate).toHaveBeenCalledTimes(1); + expect(mutate).toHaveBeenCalledWith( + rules.map((rule) => ({ + ...rule.attributes, + enabled: !enabled, + })) + ); + }); +}); diff --git a/x-pack/plugins/cloud_security_posture/public/pages/rules/rules_container.tsx b/x-pack/plugins/cloud_security_posture/public/pages/rules/rules_container.tsx new file mode 100644 index 0000000000000..108d33cad3ebe --- /dev/null +++ b/x-pack/plugins/cloud_security_posture/public/pages/rules/rules_container.tsx @@ -0,0 +1,188 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import React, { useEffect, useState, useMemo, useCallback, useRef } from 'react'; +import { type EuiBasicTable, EuiPanel, EuiSpacer } from '@elastic/eui'; +import { extractErrorMessage } from '../../../common/utils/helpers'; +import { RulesTable } from './rules_table'; +import { RulesBottomBar } from './rules_bottom_bar'; +import { RulesTableHeader } from './rules_table_header'; +import { + useFindCspRules, + useBulkUpdateCspRules, + type RuleSavedObject, + type RulesQuery, + type RulesQueryResult, +} from './use_csp_rules'; +import * as TEST_SUBJECTS from './test_subjects'; + +interface RulesPageData { + rules_page: RuleSavedObject[]; + all_rules: RuleSavedObject[]; + rules_map: Map; + total: number; + error?: string; + loading: boolean; +} + +export type RulesState = RulesPageData & RulesQuery; + +const getSimpleQueryString = (searchValue?: string): string => + searchValue ? `${searchValue}*` : ''; + +const getChangedRules = ( + baseRules: ReadonlyMap, + currentChangedRules: ReadonlyMap, + rulesToChange: readonly RuleSavedObject[] +): Map => { + const changedRules = new Map(currentChangedRules); + + rulesToChange.forEach((ruleToChange) => { + const baseRule = baseRules.get(ruleToChange.id); + const changedRule = changedRules.get(ruleToChange.id); + + if (!baseRule) throw new Error('expected base rule to exists'); + + const baseRuleChanged = baseRule.attributes.enabled !== ruleToChange.attributes.enabled; + + if (!changedRule && baseRuleChanged) changedRules.set(ruleToChange.id, ruleToChange); + + if (changedRule && !baseRuleChanged) changedRules.delete(ruleToChange.id); + }); + + return changedRules; +}; + +const getRulesPageData = ( + { status, data, error }: Pick, + changedRules: Map, + query: RulesQuery +): RulesPageData => { + const rules = data?.savedObjects || []; + const page = getPage(rules, query); + return { + loading: status === 'loading', + error: error ? extractErrorMessage(error) : undefined, + all_rules: rules, + rules_map: new Map(rules.map((rule) => [rule.id, rule])), + rules_page: page.map((rule) => changedRules.get(rule.attributes.id) || rule), + total: data?.total || 0, + }; +}; + +const getPage = (data: readonly RuleSavedObject[], { page, perPage }: RulesQuery) => + data.slice(page * perPage, (page + 1) * perPage); + +const MAX_ITEMS_PER_PAGE = 10000; + +export const RulesContainer = () => { + const tableRef = useRef(null); + const [changedRules, setChangedRules] = useState>(new Map()); + const [isAllSelected, setIsAllSelected] = useState(false); + const [visibleSelectedRulesIds, setVisibleSelectedRulesIds] = useState([]); + const [rulesQuery, setRulesQuery] = useState({ page: 0, perPage: 5, search: '' }); + + const { data, status, error, refetch } = useFindCspRules({ + search: getSimpleQueryString(rulesQuery.search), + page: 1, + perPage: MAX_ITEMS_PER_PAGE, + }); + + const { mutate: bulkUpdate, isLoading: isUpdating } = useBulkUpdateCspRules(); + + const rulesPageData = useMemo( + () => getRulesPageData({ data, error, status }, changedRules, rulesQuery), + [data, error, status, changedRules, rulesQuery] + ); + + const hasChanges = !!changedRules.size; + + const selectAll = () => { + if (!tableRef.current) return; + tableRef.current.setSelection(rulesPageData.rules_page); + setIsAllSelected(true); + }; + + const toggleRules = (rules: RuleSavedObject[], enabled: boolean) => + setChangedRules( + getChangedRules( + rulesPageData.rules_map, + changedRules, + rules.map((rule) => ({ + ...rule, + attributes: { ...rule.attributes, enabled }, + })) + ) + ); + + const bulkToggleRules = (enabled: boolean) => + toggleRules( + isAllSelected + ? rulesPageData.all_rules + : visibleSelectedRulesIds.map((ruleId) => rulesPageData.rules_map.get(ruleId)!), + enabled + ); + + const toggleRule = (rule: RuleSavedObject) => toggleRules([rule], !rule.attributes.enabled); + + const bulkUpdateRules = () => bulkUpdate([...changedRules].map(([, rule]) => rule.attributes)); + + const discardChanges = useCallback(() => setChangedRules(new Map()), []); + + const clearSelection = useCallback(() => { + if (!tableRef.current) return; + tableRef.current.setSelection([]); + setIsAllSelected(false); + }, []); + + useEffect(discardChanges, [data, discardChanges]); + useEffect(clearSelection, [rulesQuery, clearSelection]); + + return ( +
+ + setRulesQuery((currentQuery) => ({ ...currentQuery, search: value }))} + refresh={() => { + clearSelection(); + refetch(); + }} + bulkEnable={() => bulkToggleRules(true)} + bulkDisable={() => bulkToggleRules(false)} + selectAll={selectAll} + clearSelection={clearSelection} + selectedRulesCount={ + isAllSelected ? rulesPageData.all_rules.length : visibleSelectedRulesIds.length + } + searchValue={rulesQuery.search} + totalRulesCount={rulesPageData.all_rules.length} + isSearching={status === 'loading'} + /> + + { + setIsAllSelected(false); + setVisibleSelectedRulesIds(rules.map((rule) => rule.id)); + }} + setPagination={(paginationQuery) => + setRulesQuery((currentQuery) => ({ ...currentQuery, ...paginationQuery })) + } + /> + + {hasChanges && ( + + )} +
+ ); +}; diff --git a/x-pack/plugins/cloud_security_posture/public/pages/rules/rules_table.tsx b/x-pack/plugins/cloud_security_posture/public/pages/rules/rules_table.tsx new file mode 100644 index 0000000000000..cc537ff19ed64 --- /dev/null +++ b/x-pack/plugins/cloud_security_posture/public/pages/rules/rules_table.tsx @@ -0,0 +1,135 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import React, { useMemo } from 'react'; +import { + Criteria, + EuiLink, + EuiSwitch, + EuiTableFieldDataColumnType, + EuiBasicTable, + EuiBasicTableProps, +} from '@elastic/eui'; +import moment from 'moment'; +import type { RulesState } from './rules_container'; +import * as TEST_SUBJECTS from './test_subjects'; +import * as TEXT from './translations'; +import type { RuleSavedObject } from './use_csp_rules'; + +type RulesTableProps = Pick< + RulesState, + 'loading' | 'error' | 'rules_page' | 'total' | 'perPage' | 'page' +> & { + toggleRule(rule: RuleSavedObject): void; + setSelectedRules(rules: RuleSavedObject[]): void; + setPagination(pagination: Pick): void; + // ForwardRef makes this ref not available in parent callbacks + tableRef: React.RefObject>; +}; + +export const RulesTable = ({ + toggleRule, + setSelectedRules, + setPagination, + perPage: pageSize, + rules_page: items, + page, + tableRef, + total, + loading, + error, +}: RulesTableProps) => { + const columns = useMemo(() => getColumns({ toggleRule }), [toggleRule]); + + const euiPagination: EuiBasicTableProps['pagination'] = { + pageIndex: page, + pageSize, + totalItemCount: total, + pageSizeOptions: [1, 5, 10, 25], + hidePerPageOptions: false, + }; + + const selection: EuiBasicTableProps['selection'] = { + selectable: () => true, + onSelectionChange: setSelectedRules, + }; + + const onTableChange = ({ page: pagination }: Criteria) => { + if (!pagination) return; + setPagination({ page: pagination.index, perPage: pagination.size }); + }; + + return ( + v.id} + /> + ); +}; + +const ruleNameRenderer = (name: string) => ( + + {name} + +); + +const timestampRenderer = (timestamp: string) => + moment.duration(moment().diff(timestamp)).humanize(); + +interface GetColumnProps { + toggleRule: (rule: RuleSavedObject) => void; +} + +const createRuleEnabledSwitchRenderer = + ({ toggleRule }: GetColumnProps) => + (value: boolean, rule: RuleSavedObject) => + ( + toggleRule(rule)} + data-test-subj={TEST_SUBJECTS.getCspRulesTableItemSwitchTestId(rule.attributes.id)} + /> + ); + +const getColumns = ({ + toggleRule, +}: GetColumnProps): Array> => [ + { + field: 'attributes.name', + name: TEXT.RULE_NAME, + width: '60%', + truncateText: true, + render: ruleNameRenderer, + }, + { + field: 'section', // TODO: what field is this? + name: TEXT.SECTION, + width: '15%', + }, + { + field: 'updatedAt', + name: TEXT.UPDATED_AT, + width: '15%', + render: timestampRenderer, + }, + { + field: 'attributes.enabled', + name: TEXT.ENABLED, + render: createRuleEnabledSwitchRenderer({ toggleRule }), + width: '10%', + }, +]; diff --git a/x-pack/plugins/cloud_security_posture/public/pages/rules/rules_table_header.tsx b/x-pack/plugins/cloud_security_posture/public/pages/rules/rules_table_header.tsx new file mode 100644 index 0000000000000..011cb5d8f7bc2 --- /dev/null +++ b/x-pack/plugins/cloud_security_posture/public/pages/rules/rules_table_header.tsx @@ -0,0 +1,224 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import React, { useState } from 'react'; +import { EuiFieldSearch, EuiButtonEmpty, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; +import { FormattedMessage } from '@kbn/i18n-react'; +import { css } from '@emotion/react'; +import useDebounce from 'react-use/lib/useDebounce'; +import * as TEST_SUBJECTS from './test_subjects'; +import * as TEXT from './translations'; +import { RulesBulkActionsMenu } from './rules_bulk_actions_menu'; + +interface RulesTableToolbarProps { + search(value: string): void; + refresh(): void; + bulkEnable(): void; + bulkDisable(): void; + selectAll(): void; + clearSelection(): void; + totalRulesCount: number; + selectedRulesCount: number; + searchValue: string; + isSearching: boolean; +} + +interface CounterProps { + count: number; +} + +interface ButtonProps { + onClick(): void; +} + +export const RulesTableHeader = ({ + search, + refresh, + bulkEnable, + bulkDisable, + selectAll, + clearSelection, + totalRulesCount, + selectedRulesCount, + searchValue, + isSearching, +}: RulesTableToolbarProps) => ( + + + + + + + +); + +const Counters = ({ total, selected }: { total: number; selected: number }) => ( + + + {Spacer} + + +); + +const SelectAllToggle = ({ + isSelectAll, + select, + clear, +}: { + select(): void; + clear(): void; + isSelectAll: boolean; +}) => ( + + {isSelectAll ? : } + +); + +const BulkMenu = ({ + bulkEnable, + bulkDisable, + selectedRulesCount, +}: Pick) => ( + + , + 'data-test-subj': TEST_SUBJECTS.CSP_RULES_TABLE_BULK_ENABLE_BUTTON, + onClick: bulkEnable, + }, + { + icon: 'eyeClosed', + disabled: !selectedRulesCount, + children: , + 'data-test-subj': TEST_SUBJECTS.CSP_RULES_TABLE_BULK_DISABLE_BUTTON, + onClick: bulkDisable, + }, + ]} + /> + +); + +const SEARCH_DEBOUNCE_MS = 300; + +const SearchField = ({ + search, + isSearching, + searchValue, +}: Pick) => { + const [localValue, setLocalValue] = useState(searchValue); + + useDebounce(() => search(localValue), SEARCH_DEBOUNCE_MS, [localValue]); + + return ( + + setLocalValue(e.target.value)} + style={{ minWidth: 150 }} + /> + + ); +}; + +const TotalRulesCount = ({ count }: CounterProps) => ( + }} + /> +); + +const SelectedRulesCount = ({ count }: CounterProps) => ( + }} + /> +); + +const ActivateRulesMenuItemText = ({ count }: CounterProps) => ( + +); + +const DeactivateRulesMenuItemText = ({ count }: CounterProps) => ( + +); + +const RulesCountBold = ({ count }: CounterProps) => ( + <> + {count} + + +); + +const ClearSelectionButton = ({ onClick }: ButtonProps) => ( + + + +); + +const SelectAllButton = ({ onClick }: ButtonProps) => ( + + + +); + +const RefreshButton = ({ onClick }: ButtonProps) => ( + + + {TEXT.REFRESH} + + +); + +const Spacer = ( + +); diff --git a/x-pack/plugins/cloud_security_posture/public/pages/rules/test_subjects.ts b/x-pack/plugins/cloud_security_posture/public/pages/rules/test_subjects.ts new file mode 100644 index 0000000000000..6ba10ef937b66 --- /dev/null +++ b/x-pack/plugins/cloud_security_posture/public/pages/rules/test_subjects.ts @@ -0,0 +1,20 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +export const CSP_RULES_CONTAINER = 'csp_rules_container'; +export const CSP_RULES_TABLE_ITEM_SWITCH = 'csp_rules_table_item_switch'; +export const CSP_RULES_SAVE_BUTTON = 'csp_rules_table_save_button'; +export const CSP_RULES_TABLE = 'csp_rules_table'; +export const CSP_RULES_TABLE_BULK_MENU_BUTTON = 'csp_rules_table_bulk_menu_button'; +export const CSP_RULES_TABLE_BULK_ENABLE_BUTTON = 'csp_rules_table_bulk_enable_button'; +export const CSP_RULES_TABLE_BULK_DISABLE_BUTTON = 'csp_rules_table_bulk_disable_button'; +export const CSP_RULES_TABLE_REFRESH_BUTTON = 'csp_rules_table_refresh_button'; +export const CSP_RULES_TABLE_SELECT_ALL_BUTTON = 'rules_select_all'; +export const CSP_RULES_TABLE_CLEAR_SELECTION_BUTTON = 'rules_clear_selection'; + +export const getCspRulesTableItemSwitchTestId = (id: string) => + `${CSP_RULES_TABLE_ITEM_SWITCH}_${id}`; diff --git a/x-pack/plugins/cloud_security_posture/public/pages/rules/translations.ts b/x-pack/plugins/cloud_security_posture/public/pages/rules/translations.ts new file mode 100644 index 0000000000000..0f9c279ae4ba5 --- /dev/null +++ b/x-pack/plugins/cloud_security_posture/public/pages/rules/translations.ts @@ -0,0 +1,64 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { i18n } from '@kbn/i18n'; + +export const SAVE = i18n.translate('xpack.csp.rules.saveButtonLabel', { + defaultMessage: 'Save', +}); + +export const CANCEL = i18n.translate('xpack.csp.rules.cancelButtonLabel', { + defaultMessage: 'Cancel', +}); + +export const UNKNOWN_ERROR = i18n.translate('xpack.csp.rules.unknownErrorMessage', { + defaultMessage: 'Unknown Error', +}); + +export const REFRESH = i18n.translate('xpack.csp.rules.refreshButtonLabel', { + defaultMessage: 'Refresh', +}); + +export const SEARCH = i18n.translate('xpack.csp.rules.searchPlaceholder', { + defaultMessage: 'Search', +}); + +export const BULK_ACTIONS = i18n.translate('xpack.csp.rules.bulkActionsButtonLabel', { + defaultMessage: 'Bulk Actions', +}); + +export const RULE_NAME = i18n.translate('xpack.csp.rules.ruleNameColumnHeaderLabel', { + defaultMessage: 'Rule Name', +}); + +export const SECTION = i18n.translate('xpack.csp.rules.sectionColumnHeaderLabel', { + defaultMessage: 'Section', +}); + +export const UPDATED_AT = i18n.translate('xpack.csp.rules.updatedAtColumnHeaderLabel', { + defaultMessage: 'Updated at', +}); + +export const ENABLED = i18n.translate('xpack.csp.rules.enabledColumnHeaderLabel', { + defaultMessage: 'Enabled', +}); + +export const DISABLE = i18n.translate('xpack.csp.rules.disableLabel', { + defaultMessage: 'Disable', +}); + +export const ENABLE = i18n.translate('xpack.csp.rules.enableLabel', { + defaultMessage: 'Enable', +}); + +export const MISSING_RULES = i18n.translate('xpack.csp.rules.missingRulesMessage', { + defaultMessage: 'Rules are missing', +}); + +export const UPDATE_FAILED = i18n.translate('xpack.csp.rules.updateFailedMessage', { + defaultMessage: 'Update failed', +}); diff --git a/x-pack/plugins/cloud_security_posture/public/pages/rules/use_csp_rules.ts b/x-pack/plugins/cloud_security_posture/public/pages/rules/use_csp_rules.ts index a11256edaa40e..32e1a2635a857 100644 --- a/x-pack/plugins/cloud_security_posture/public/pages/rules/use_csp_rules.ts +++ b/x-pack/plugins/cloud_security_posture/public/pages/rules/use_csp_rules.ts @@ -5,35 +5,31 @@ * 2.0. */ import { useQuery, useMutation, useQueryClient } from 'react-query'; +import { FunctionKeys } from 'utility-types'; import { cspRuleAssetSavedObjectType, type CspRuleSchema } from '../../../common/schemas/csp_rule'; -import type { - SavedObjectsBatchResponse, - SavedObjectsFindOptions, -} from '../../../../../../src/core/public'; +import type { SavedObjectsFindOptions, SimpleSavedObject } from '../../../../../../src/core/public'; import { useKibana } from '../../common/hooks/use_kibana'; +import { UPDATE_FAILED } from './translations'; -export type UseCspRulesOptions = Pick< - SavedObjectsFindOptions, - 'search' | 'searchFields' | 'page' | 'perPage' +export type RuleSavedObject = Omit< + SimpleSavedObject, + FunctionKeys >; -export const useFindCspRules = ({ - search, - searchFields, - page = 1, - perPage = 10, -}: UseCspRulesOptions) => { +export type RulesQuery = Required>; +export type RulesQueryResult = ReturnType; + +export const useFindCspRules = ({ search, page, perPage }: RulesQuery) => { const { savedObjects } = useKibana().services; return useQuery( - [cspRuleAssetSavedObjectType, { search, searchFields, page, perPage }], + [cspRuleAssetSavedObjectType, { search, page, perPage }], () => savedObjects.client.find({ type: cspRuleAssetSavedObjectType, search, - searchFields, - page, - // NOTE: 'name.raw' is a field maping we defined on 'name' so it'd also be sortable - // TODO: this needs to be shared or removed + searchFields: ['name'], + page: 1, + // NOTE: 'name.raw' is a field mapping we defined on 'name' sortField: 'name.raw', perPage, }), @@ -42,21 +38,25 @@ export const useFindCspRules = ({ }; export const useBulkUpdateCspRules = () => { - const { savedObjects } = useKibana().services; + const { savedObjects, notifications } = useKibana().services; const queryClient = useQueryClient(); return useMutation( (rules: CspRuleSchema[]) => - savedObjects.client.bulkUpdate( + savedObjects.client.bulkUpdate( rules.map((rule) => ({ type: cspRuleAssetSavedObjectType, id: rule.id, attributes: rule, })) - // TODO: fix bulkUpdate types in core - ) as Promise>, + ), { + onError: (err) => { + if (err instanceof Error) notifications.toasts.addError(err, { title: UPDATE_FAILED }); + else notifications.toasts.addDanger(UPDATE_FAILED); + }, onSettled: () => + // Invalidate all queries for simplicity queryClient.invalidateQueries({ queryKey: cspRuleAssetSavedObjectType, exact: false, diff --git a/x-pack/plugins/cloud_security_posture/server/routes/compliance_dashboard/get_resources_types.ts b/x-pack/plugins/cloud_security_posture/server/routes/compliance_dashboard/get_resources_types.ts index 459dce56042da..0fc6e4b00944a 100644 --- a/x-pack/plugins/cloud_security_posture/server/routes/compliance_dashboard/get_resources_types.ts +++ b/x-pack/plugins/cloud_security_posture/server/routes/compliance_dashboard/get_resources_types.ts @@ -31,7 +31,7 @@ export interface ResourceTypeBucket extends KeyDocCount { export const resourceTypeAggQuery = { aggs_by_resource_type: { terms: { - field: 'resource.type.keyword', + field: 'type.keyword', }, aggs: { failed_findings: { diff --git a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/index.tsx b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/index.tsx index 2ba625ea420e3..d002a743e77bc 100644 --- a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/index.tsx +++ b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/index.tsx @@ -138,9 +138,20 @@ export function Detail() { data: packageInfoData, error: packageInfoError, isLoading: packageInfoLoading, + isInitialRequest: packageIsInitialRequest, + resendRequest: refreshPackageInfo, } = useGetPackageInfoByKey(pkgName, pkgVersion); - const isLoading = packageInfoLoading || permissionCheck.isLoading; + // Refresh package info when status change + const [oldPackageInstallStatus, setOldPackageStatus] = useState(packageInstallStatus); + useEffect(() => { + if (oldPackageInstallStatus === 'not_installed' && packageInstallStatus === 'installed') { + setOldPackageStatus(oldPackageInstallStatus); + refreshPackageInfo(); + } + }, [packageInstallStatus, oldPackageInstallStatus, refreshPackageInfo]); + + const isLoading = (packageInfoLoading && !packageIsInitialRequest) || permissionCheck.isLoading; const showCustomTab = useUIExtension(packageInfoData?.item.name ?? '', 'package-detail-custom') !== undefined; diff --git a/x-pack/plugins/fleet/server/integration_tests/cloud_preconfiguration.test.ts b/x-pack/plugins/fleet/server/integration_tests/cloud_preconfiguration.test.ts index 2dbdb58497506..02815347b712b 100644 --- a/x-pack/plugins/fleet/server/integration_tests/cloud_preconfiguration.test.ts +++ b/x-pack/plugins/fleet/server/integration_tests/cloud_preconfiguration.test.ts @@ -18,7 +18,8 @@ import { CLOUD_KIBANA_CONFIG } from './fixtures/cloud_kibana_config'; const logFilePath = Path.join(__dirname, 'logs.log'); -describe('Fleet preconfiguration reset', () => { +// FAILING: https://github.com/elastic/kibana/issues/127076 +describe.skip('Fleet preconfiguration reset', () => { let esServer: kbnTestServer.TestElasticsearchUtils; let kbnServer: kbnTestServer.TestKibanaUtils; diff --git a/x-pack/plugins/lens/common/expressions/datatable/datatable.ts b/x-pack/plugins/lens/common/expressions/datatable/datatable.ts index 1eab399055480..af98485a1bcaf 100644 --- a/x-pack/plugins/lens/common/expressions/datatable/datatable.ts +++ b/x-pack/plugins/lens/common/expressions/datatable/datatable.ts @@ -28,6 +28,7 @@ export interface DatatableArgs { sortingColumnId: SortingState['columnId']; sortingDirection: SortingState['direction']; fitRowToContent?: boolean; + rowHeightLines?: number; pageSize?: PagingState['size']; } @@ -68,6 +69,10 @@ export const getDatatable = ( types: ['boolean'], help: '', }, + rowHeightLines: { + types: ['number'], + help: '', + }, pageSize: { types: ['number'], help: '', diff --git a/x-pack/plugins/lens/common/expressions/index.ts b/x-pack/plugins/lens/common/expressions/index.ts index d7c27c4436b42..526bee92ec7e5 100644 --- a/x-pack/plugins/lens/common/expressions/index.ts +++ b/x-pack/plugins/lens/common/expressions/index.ts @@ -11,7 +11,6 @@ export * from './rename_columns'; export * from './merge_tables'; export * from './time_scale'; export * from './datatable'; -export * from './metric_chart'; export * from './xy_chart'; export * from './expression_types'; diff --git a/x-pack/plugins/lens/common/expressions/metric_chart/index.ts b/x-pack/plugins/lens/common/expressions/metric_chart/index.ts deleted file mode 100644 index 40bd4f3886455..0000000000000 --- a/x-pack/plugins/lens/common/expressions/metric_chart/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -export * from './types'; -export * from './metric_chart'; diff --git a/x-pack/plugins/lens/common/expressions/metric_chart/metric_chart.ts b/x-pack/plugins/lens/common/expressions/metric_chart/metric_chart.ts deleted file mode 100644 index f5808cee9d000..0000000000000 --- a/x-pack/plugins/lens/common/expressions/metric_chart/metric_chart.ts +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { i18n } from '@kbn/i18n'; -import { ColorMode } from '../../../../../../src/plugins/charts/common'; -import type { ExpressionFunctionDefinition } from '../../../../../../src/plugins/expressions/common'; -import type { LensMultiTable } from '../../types'; -import type { MetricConfig } from './types'; - -interface MetricRender { - type: 'render'; - as: 'lens_metric_chart_renderer'; - value: MetricChartProps; -} - -export interface MetricChartProps { - data: LensMultiTable; - args: MetricConfig; -} - -export const metricChart: ExpressionFunctionDefinition< - 'lens_metric_chart', - LensMultiTable, - Omit, - MetricRender -> = { - name: 'lens_metric_chart', - type: 'render', - help: 'A metric chart', - args: { - title: { - types: ['string'], - help: i18n.translate('xpack.lens.metric.title.help', { - defaultMessage: 'The visualization title.', - }), - }, - size: { - types: ['string'], - help: i18n.translate('xpack.lens.metric.size.help', { - defaultMessage: 'The visualization text size.', - }), - default: 'xl', - }, - titlePosition: { - types: ['string'], - help: i18n.translate('xpack.lens.metric.titlePosition.help', { - defaultMessage: 'The visualization title position.', - }), - default: 'bottom', - }, - textAlign: { - types: ['string'], - help: i18n.translate('xpack.lens.metric.textAlignPosition.help', { - defaultMessage: 'The visualization text alignment position.', - }), - default: 'center', - }, - description: { - types: ['string'], - help: '', - }, - metricTitle: { - types: ['string'], - help: i18n.translate('xpack.lens.metric.metricTitle.help', { - defaultMessage: 'The title of the metric shown.', - }), - }, - accessor: { - types: ['string'], - help: i18n.translate('xpack.lens.metric.accessor.help', { - defaultMessage: 'The column whose value is being displayed', - }), - }, - mode: { - types: ['string'], - options: ['reduced', 'full'], - default: 'full', - help: i18n.translate('xpack.lens.metric.mode.help', { - defaultMessage: - 'The display mode of the chart - reduced will only show the metric itself without min size', - }), - }, - colorMode: { - types: ['string'], - default: `"${ColorMode.None}"`, - options: [ColorMode.None, ColorMode.Labels, ColorMode.Background], - help: i18n.translate('xpack.lens.metric.colorMode.help', { - defaultMessage: 'Which part of metric to color', - }), - }, - palette: { - types: ['palette'], - help: i18n.translate('xpack.lens.metric.palette.help', { - defaultMessage: 'Provides colors for the values', - }), - }, - }, - inputTypes: ['lens_multitable'], - fn(data, args) { - return { - type: 'render', - as: 'lens_metric_chart_renderer', - value: { - data, - args, - }, - } as MetricRender; - }, -}; diff --git a/x-pack/plugins/lens/common/expressions/metric_chart/types.ts b/x-pack/plugins/lens/common/expressions/metric_chart/types.ts deleted file mode 100644 index 00f7d7454061f..0000000000000 --- a/x-pack/plugins/lens/common/expressions/metric_chart/types.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { - ColorMode, - CustomPaletteState, - PaletteOutput, -} from '../../../../../../src/plugins/charts/common'; -import { CustomPaletteParams, LayerType } from '../../types'; - -export interface MetricState { - layerId: string; - accessor?: string; - layerType: LayerType; - colorMode?: ColorMode; - palette?: PaletteOutput; - titlePosition?: 'top' | 'bottom'; - size?: string; - textAlign?: 'left' | 'right' | 'center'; -} - -export interface MetricConfig extends Omit { - title: string; - description: string; - metricTitle: string; - mode: 'reduced' | 'full'; - colorMode: ColorMode; - palette: PaletteOutput; -} diff --git a/x-pack/plugins/lens/common/types.ts b/x-pack/plugins/lens/common/types.ts index 8c333fd0daa6a..ae34331fdfb67 100644 --- a/x-pack/plugins/lens/common/types.ts +++ b/x-pack/plugins/lens/common/types.ts @@ -13,8 +13,11 @@ import type { SerializedFieldFormat, } from '../../../../src/plugins/field_formats/common'; import type { Datatable } from '../../../../src/plugins/expressions/common'; -import type { PaletteContinuity } from '../../../../src/plugins/charts/common'; -import type { PaletteOutput } from '../../../../src/plugins/charts/common'; +import type { + PaletteContinuity, + PaletteOutput, + ColorMode, +} from '../../../../src/plugins/charts/common'; import { CategoryDisplay, layerTypes, @@ -121,3 +124,13 @@ export interface PieVisualizationState { layers: PieLayerState[]; palette?: PaletteOutput; } +export interface MetricState { + layerId: string; + accessor?: string; + layerType: LayerType; + colorMode?: ColorMode; + palette?: PaletteOutput; + titlePosition?: 'top' | 'bottom'; + size?: string; + textAlign?: 'left' | 'right' | 'center'; +} diff --git a/x-pack/plugins/lens/public/datatable_visualization/components/__snapshots__/table_basic.test.tsx.snap b/x-pack/plugins/lens/public/datatable_visualization/components/__snapshots__/table_basic.test.tsx.snap index 40eb546dfc208..6100bc204d45b 100644 --- a/x-pack/plugins/lens/public/datatable_visualization/components/__snapshots__/table_basic.test.tsx.snap +++ b/x-pack/plugins/lens/public/datatable_visualization/components/__snapshots__/table_basic.test.tsx.snap @@ -227,6 +227,13 @@ exports[`DatatableComponent it renders actions column when there are row actions onColumnResize={[Function]} renderCellValue={[Function]} rowCount={1} + rowHeightsOptions={ + Object { + "defaultHeight": Object { + "lineCount": 1, + }, + } + } sorting={ Object { "columns": Array [], @@ -472,6 +479,13 @@ exports[`DatatableComponent it renders the title and value 1`] = ` onColumnResize={[Function]} renderCellValue={[Function]} rowCount={1} + rowHeightsOptions={ + Object { + "defaultHeight": Object { + "lineCount": 1, + }, + } + } sorting={ Object { "columns": Array [], @@ -712,6 +726,13 @@ exports[`DatatableComponent it should render hide, reset, and sort actions on he onColumnResize={[Function]} renderCellValue={[Function]} rowCount={1} + rowHeightsOptions={ + Object { + "defaultHeight": Object { + "lineCount": 1, + }, + } + } sorting={ Object { "columns": Array [], diff --git a/x-pack/plugins/lens/public/datatable_visualization/components/cell_value.test.tsx b/x-pack/plugins/lens/public/datatable_visualization/components/cell_value.test.tsx index bd35874bc352b..f383c13e275aa 100644 --- a/x-pack/plugins/lens/public/datatable_visualization/components/cell_value.test.tsx +++ b/x-pack/plugins/lens/public/datatable_visualization/components/cell_value.test.tsx @@ -86,7 +86,7 @@ describe('datatable cell renderer', () => { /> ); - expect(cell.find('.lnsTableCell').prop('className')).toContain('--right'); + expect(cell.find('.lnsTableCell--right').exists()).toBeTruthy(); }); describe('dynamic coloring', () => { @@ -127,6 +127,7 @@ describe('datatable cell renderer', () => { ], sortingColumnId: '', sortingDirection: 'none', + rowHeightLines: 1, }; } diff --git a/x-pack/plugins/lens/public/datatable_visualization/components/cell_value.tsx b/x-pack/plugins/lens/public/datatable_visualization/components/cell_value.tsx index a493ed2eb1693..9ecd7579aa17f 100644 --- a/x-pack/plugins/lens/public/datatable_visualization/components/cell_value.tsx +++ b/x-pack/plugins/lens/public/datatable_visualization/components/cell_value.tsx @@ -20,7 +20,8 @@ export const createGridCell = ( columnConfig: ColumnConfig, DataContext: React.Context, uiSettings: IUiSettingsClient, - fitRowToContent?: boolean + fitRowToContent?: boolean, + rowHeight?: number ) => { // Changing theme requires a full reload of the page, so we can cache here const IS_DARK_THEME = uiSettings.get('theme:darkMode'); @@ -31,7 +32,7 @@ export const createGridCell = ( const currentAlignment = alignments && alignments[columnId]; const alignmentClassName = `lnsTableCell--${currentAlignment}`; const className = classNames(alignmentClassName, { - lnsTableCell: !fitRowToContent, + lnsTableCell: !fitRowToContent && rowHeight === 1, }); const { colorMode, palette } = diff --git a/x-pack/plugins/lens/public/datatable_visualization/components/table_basic.test.tsx b/x-pack/plugins/lens/public/datatable_visualization/components/table_basic.test.tsx index 6cab22cd08ccd..36fd1581cb9b6 100644 --- a/x-pack/plugins/lens/public/datatable_visualization/components/table_basic.test.tsx +++ b/x-pack/plugins/lens/public/datatable_visualization/components/table_basic.test.tsx @@ -84,6 +84,7 @@ function sampleArgs() { ], sortingColumnId: '', sortingDirection: 'none', + rowHeightLines: 1, }; return { data, args }; @@ -299,6 +300,7 @@ describe('DatatableComponent', () => { ], sortingColumnId: '', sortingDirection: 'none', + rowHeightLines: 1, }; const wrapper = mountWithIntl( diff --git a/x-pack/plugins/lens/public/datatable_visualization/components/table_basic.tsx b/x-pack/plugins/lens/public/datatable_visualization/components/table_basic.tsx index 403858f4ba48c..45ceb5854152e 100644 --- a/x-pack/plugins/lens/public/datatable_visualization/components/table_basic.tsx +++ b/x-pack/plugins/lens/public/datatable_visualization/components/table_basic.tsx @@ -334,9 +334,16 @@ export const DatatableComponent = (props: DatatableRenderProps) => { columnConfig, DataContext, props.uiSettings, - props.args.fitRowToContent + props.args.fitRowToContent, + props.args.rowHeightLines ), - [formatters, columnConfig, props.uiSettings, props.args.fitRowToContent] + [ + formatters, + columnConfig, + props.uiSettings, + props.args.fitRowToContent, + props.args.rowHeightLines, + ] ); const columnVisibility = useMemo( @@ -414,13 +421,15 @@ export const DatatableComponent = (props: DatatableRenderProps) => { { + const original = jest.requireActual('@elastic/eui'); + + return { + ...original, + htmlIdGenerator: (fn: unknown) => { + return () => ''; + }, + }; +}); class Harness { wrapper: ReactWrapper; @@ -25,12 +38,25 @@ class Harness { this.wrapper.find(ToolbarButton).simulate('click'); } - public get fitRowToContentSwitch() { - return this.wrapper.find('EuiSwitch[data-test-subj="lens-legend-auto-height-switch"]'); + public get rowHeight() { + return this.wrapper.find(EuiButtonGroup); } - toggleFitRowToContent() { - this.fitRowToContentSwitch.prop('onChange')!({} as FormEvent); + changeRowHeight(newMode: 'single' | 'auto' | 'custom') { + this.rowHeight.prop('onChange')!(newMode); + } + + public get rowHeightLines() { + return this.wrapper.find(EuiRange); + } + + changeRowHeightLines(lineCount: number) { + this.rowHeightLines.prop('onChange')!( + { + currentTarget: { value: lineCount }, + } as unknown as ChangeEvent, + true + ); } public get paginationSwitch() { @@ -56,7 +82,7 @@ describe('datatable toolbar', () => { setState: jest.fn(), frame: {} as FramePublicAPI, state: { - fitRowToContent: false, + rowHeight: 'single', } as DatatableVisualizationState, }; @@ -66,37 +92,55 @@ describe('datatable toolbar', () => { it('should reflect state in the UI', async () => { harness.togglePopover(); - expect(harness.fitRowToContentSwitch.prop('checked')).toBe(false); + expect(harness.rowHeight.prop('idSelected')).toBe('single'); expect(harness.paginationSwitch.prop('checked')).toBe(false); harness.wrapper.setProps({ state: { - fitRowToContent: true, + rowHeight: 'auto', paging: defaultPagingState, }, }); - expect(harness.fitRowToContentSwitch.prop('checked')).toBe(true); + expect(harness.rowHeight.prop('idSelected')).toBe('auto'); expect(harness.paginationSwitch.prop('checked')).toBe(true); }); - it('should toggle fit-row-to-content', async () => { + it('should change row height to "Auto" mode', async () => { harness.togglePopover(); - harness.toggleFitRowToContent(); + harness.changeRowHeight('auto'); expect(defaultProps.setState).toHaveBeenCalledTimes(1); expect(defaultProps.setState).toHaveBeenNthCalledWith(1, { - fitRowToContent: true, + rowHeight: 'auto', + rowHeightLines: undefined, }); - harness.wrapper.setProps({ state: { fitRowToContent: true } }); // update state manually - harness.toggleFitRowToContent(); // turn it off + harness.wrapper.setProps({ state: { rowHeight: 'auto' } }); // update state manually + harness.changeRowHeight('single'); // turn it off expect(defaultProps.setState).toHaveBeenCalledTimes(2); expect(defaultProps.setState).toHaveBeenNthCalledWith(2, { - fitRowToContent: false, + rowHeight: 'single', + rowHeightLines: 1, + }); + }); + + it('should change row height to "Custom" mode', async () => { + harness.togglePopover(); + + harness.changeRowHeight('custom'); + + expect(defaultProps.setState).toHaveBeenCalledTimes(1); + expect(defaultProps.setState).toHaveBeenNthCalledWith(1, { + rowHeight: 'custom', + rowHeightLines: 2, }); + + harness.wrapper.setProps({ state: { rowHeight: 'custom' } }); // update state manually + + expect(harness.rowHeightLines.prop('value')).toBe(2); }); it('should toggle table pagination', async () => { @@ -107,18 +151,18 @@ describe('datatable toolbar', () => { expect(defaultProps.setState).toHaveBeenCalledTimes(1); expect(defaultProps.setState).toHaveBeenNthCalledWith(1, { paging: defaultPagingState, - fitRowToContent: false, + rowHeight: 'single', }); // update state manually harness.wrapper.setProps({ - state: { fitRowToContent: false, paging: defaultPagingState }, + state: { rowHeight: 'single', paging: defaultPagingState }, }); harness.togglePagination(); // turn it off. this should disable pagination but preserve the default page size expect(defaultProps.setState).toHaveBeenCalledTimes(2); expect(defaultProps.setState).toHaveBeenNthCalledWith(2, { - fitRowToContent: false, + rowHeight: 'single', paging: { ...defaultPagingState, enabled: false }, }); }); diff --git a/x-pack/plugins/lens/public/datatable_visualization/components/toolbar.tsx b/x-pack/plugins/lens/public/datatable_visualization/components/toolbar.tsx index e95ae98e37563..548af6917c18d 100644 --- a/x-pack/plugins/lens/public/datatable_visualization/components/toolbar.tsx +++ b/x-pack/plugins/lens/public/datatable_visualization/components/toolbar.tsx @@ -7,22 +7,47 @@ import React, { useCallback } from 'react'; import { i18n } from '@kbn/i18n'; -import { EuiFlexGroup, EuiFormRow, EuiSwitch, EuiToolTip } from '@elastic/eui'; +import { + EuiButtonGroup, + EuiFlexGroup, + EuiFormRow, + EuiRange, + EuiSwitch, + EuiToolTip, + htmlIdGenerator, +} from '@elastic/eui'; import { ToolbarPopover } from '../../shared_components'; import type { VisualizationToolbarProps } from '../../types'; import type { DatatableVisualizationState } from '../visualization'; import { DEFAULT_PAGE_SIZE } from './table_basic'; +const idPrefix = htmlIdGenerator()(); + export function DataTableToolbar(props: VisualizationToolbarProps) { const { state, setState } = props; - const onToggleFitRow = useCallback(() => { - const current = state.fitRowToContent ?? false; - setState({ - ...state, - fitRowToContent: !current, - }); - }, [setState, state]); + const onChangeRowHeight = useCallback( + (newHeightMode) => { + const rowHeightLines = + newHeightMode === 'single' ? 1 : newHeightMode !== 'auto' ? 2 : undefined; + setState({ + ...state, + rowHeight: newHeightMode, + rowHeightLines, + }); + }, + [setState, state] + ); + + const onChangeRowHeightLines = useCallback( + (newRowHeightLines) => { + setState({ + ...state, + rowHeightLines: newRowHeightLines, + }); + }, + [state, setState] + ); const onTogglePagination = useCallback(() => { const current = state.paging ?? { size: DEFAULT_PAGE_SIZE, enabled: false }; @@ -33,6 +58,30 @@ export function DataTableToolbar(props: VisualizationToolbarProps - { + const newMode = optionId.replace( + idPrefix, + '' + ) as DatatableVisualizationState['rowHeight']; + onChangeRowHeight(newMode); + }} /> + {state.rowHeight === 'custom' ? ( + + { + const lineCount = Number(e.currentTarget.value); + onChangeRowHeightLines(lineCount); + }} + data-test-subj="lens-table-row-height-lineCountNumber" + /> + + ) : null} { ).toEqual([20]); }); - it('sets fitRowToContent based on state', () => { + it('sets rowHeight "auto" fit based on state', () => { expect( getDatatableExpressionArgs({ ...defaultExpressionTableState }).fitRowToContent ).toEqual([false]); expect( - getDatatableExpressionArgs({ ...defaultExpressionTableState, fitRowToContent: false }) + getDatatableExpressionArgs({ ...defaultExpressionTableState, rowHeight: 'single' }) .fitRowToContent ).toEqual([false]); expect( - getDatatableExpressionArgs({ ...defaultExpressionTableState, fitRowToContent: true }) + getDatatableExpressionArgs({ ...defaultExpressionTableState, rowHeight: 'custom' }) + .fitRowToContent + ).toEqual([false]); + + expect( + getDatatableExpressionArgs({ ...defaultExpressionTableState, rowHeight: 'auto' }) .fitRowToContent ).toEqual([true]); }); + + it('sets rowHeightLines fit based on state', () => { + expect(getDatatableExpressionArgs({ ...defaultExpressionTableState }).rowHeightLines).toEqual( + [1] + ); + + expect( + getDatatableExpressionArgs({ ...defaultExpressionTableState, rowHeight: 'single' }) + .rowHeightLines + ).toEqual([1]); + + // should ignore lines value based on mode + expect( + getDatatableExpressionArgs({ + ...defaultExpressionTableState, + rowHeight: 'single', + rowHeightLines: 5, + }).rowHeightLines + ).toEqual([1]); + + expect( + getDatatableExpressionArgs({ + ...defaultExpressionTableState, + rowHeight: 'custom', + rowHeightLines: 5, + }).rowHeightLines + ).toEqual([5]); + + // should fallback to 2 for custom in case it's not set + expect( + getDatatableExpressionArgs({ + ...defaultExpressionTableState, + rowHeight: 'custom', + }).rowHeightLines + ).toEqual([2]); + }); }); describe('#getErrorMessages', () => { diff --git a/x-pack/plugins/lens/public/datatable_visualization/visualization.tsx b/x-pack/plugins/lens/public/datatable_visualization/visualization.tsx index 8cc3709cade0b..3e9f35f80b2b8 100644 --- a/x-pack/plugins/lens/public/datatable_visualization/visualization.tsx +++ b/x-pack/plugins/lens/public/datatable_visualization/visualization.tsx @@ -32,7 +32,8 @@ export interface DatatableVisualizationState { layerId: string; layerType: LayerType; sorting?: SortingState; - fitRowToContent?: boolean; + rowHeight?: 'auto' | 'single' | 'custom'; + rowHeightLines?: number; paging?: PagingState; } @@ -400,7 +401,10 @@ export const getDatatableVisualization = ({ }), sortingColumnId: [state.sorting?.columnId || ''], sortingDirection: [state.sorting?.direction || 'none'], - fitRowToContent: [state.fitRowToContent ?? false], + fitRowToContent: [state.rowHeight === 'auto'], + rowHeightLines: [ + !state.rowHeight || state.rowHeight === 'single' ? 1 : state.rowHeightLines ?? 2, + ], pageSize: state.paging?.enabled ? [state.paging.size] : [], }, }, diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/suggestion_helpers.ts b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/suggestion_helpers.ts index c9d237961b475..0dddf982bcbc2 100644 --- a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/suggestion_helpers.ts +++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/suggestion_helpers.ts @@ -148,7 +148,8 @@ export function getSuggestions({ }, currentVisualizationState, subVisualizationId, - palette + palette, + visualizeTriggerFieldContext && 'isVisualizeAction' in visualizeTriggerFieldContext ); }); }) @@ -205,7 +206,8 @@ function getVisualizationSuggestions( datasourceSuggestion: DatasourceSuggestion & { datasourceId: string }, currentVisualizationState: unknown, subVisualizationId?: string, - mainPalette?: PaletteOutput + mainPalette?: PaletteOutput, + isFromContext?: boolean ) { return visualization .getSuggestions({ @@ -214,6 +216,7 @@ function getVisualizationSuggestions( keptLayerIds: datasourceSuggestion.keptLayerIds, subVisualizationId, mainPalette, + isFromContext, }) .map(({ state, ...visualizationSuggestion }) => ({ ...visualizationSuggestion, diff --git a/x-pack/plugins/lens/public/embeddable/embeddable_component.tsx b/x-pack/plugins/lens/public/embeddable/embeddable_component.tsx index f44aef76ab83d..802e1f2b38213 100644 --- a/x-pack/plugins/lens/public/embeddable/embeddable_component.tsx +++ b/x-pack/plugins/lens/public/embeddable/embeddable_component.tsx @@ -24,8 +24,7 @@ import type { LensByReferenceInput, LensByValueInput } from './embeddable'; import type { Document } from '../persistence'; import type { IndexPatternPersistedState } from '../indexpattern_datasource/types'; import type { XYState } from '../xy_visualization/types'; -import type { MetricState } from '../../common/expressions'; -import type { PieVisualizationState } from '../../common'; +import type { PieVisualizationState, MetricState } from '../../common'; import type { DatatableVisualizationState } from '../datatable_visualization/visualization'; import type { HeatmapVisualizationState } from '../heatmap_visualization/types'; import type { GaugeVisualizationState } from '../visualizations/gauge/constants'; diff --git a/x-pack/plugins/lens/public/expressions.ts b/x-pack/plugins/lens/public/expressions.ts index 87445ff6d6882..833fcc15762af 100644 --- a/x-pack/plugins/lens/public/expressions.ts +++ b/x-pack/plugins/lens/public/expressions.ts @@ -30,7 +30,6 @@ import { renameColumns } from '../common/expressions/rename_columns/rename_colum import { formatColumn } from '../common/expressions/format_column'; import { counterRate } from '../common/expressions/counter_rate'; import { getTimeScale } from '../common/expressions/time_scale/time_scale'; -import { metricChart } from '../common/expressions/metric_chart/metric_chart'; import { lensMultitable } from '../common/expressions'; export const setupExpressions = ( @@ -44,7 +43,6 @@ export const setupExpressions = ( xyChart, mergeTables, counterRate, - metricChart, yAxisConfig, dataLayerConfig, referenceLineLayerConfig, diff --git a/x-pack/plugins/lens/public/index.ts b/x-pack/plugins/lens/public/index.ts index f6ccb071075ac..e9a458f6e3a24 100644 --- a/x-pack/plugins/lens/public/index.ts +++ b/x-pack/plugins/lens/public/index.ts @@ -14,7 +14,6 @@ export type { export type { XYState } from './xy_visualization/types'; export type { DataType, OperationMetadata, Visualization } from './types'; export type { - MetricState, AxesSettingsConfig, XYLayerConfig, LegendConfig, diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/droppable/get_drop_props.ts b/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/droppable/get_drop_props.ts index d85cbd438ffe7..f3c48bace4a5f 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/droppable/get_drop_props.ts +++ b/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/droppable/get_drop_props.ts @@ -134,7 +134,7 @@ function getDropPropsForField({ const isTheSameIndexPattern = state.layers[layerId].indexPatternId === dragging.indexPatternId; const newOperation = getNewOperation(dragging.field, filterOperations, targetColumn); - if (!!(isTheSameIndexPattern && newOperation)) { + if (isTheSameIndexPattern && newOperation) { const nextLabel = operationLabels[newOperation].displayName; if (!targetColumn) { diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/indexpattern_suggestions.test.tsx b/x-pack/plugins/lens/public/indexpattern_datasource/indexpattern_suggestions.test.tsx index 8c8136371b189..cca739c949d4f 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/indexpattern_suggestions.test.tsx +++ b/x-pack/plugins/lens/public/indexpattern_datasource/indexpattern_suggestions.test.tsx @@ -1835,6 +1835,61 @@ describe('IndexPattern Data Source suggestions', () => { }) ); }); + + it('should apply a static layer if it is provided', () => { + const updatedContext = [ + { + ...context[0], + metrics: [ + { + agg: 'static_value', + isFullReference: true, + fieldName: 'document', + params: { + value: '10', + }, + color: '#68BC00', + }, + ], + }, + ]; + const suggestions = getDatasourceSuggestionsForVisualizeCharts( + stateWithoutLayer(), + updatedContext + ); + + expect(suggestions).toContainEqual( + expect.objectContaining({ + state: expect.objectContaining({ + layers: { + id1: expect.objectContaining({ + columnOrder: ['id2'], + columns: { + id2: expect.objectContaining({ + operationType: 'static_value', + isStaticValue: true, + params: expect.objectContaining({ + value: '10', + }), + }), + }, + }), + }, + }), + table: { + changeType: 'initial', + label: undefined, + isMultiRow: false, + columns: [ + expect.objectContaining({ + columnId: 'id2', + }), + ], + layerId: 'id1', + }, + }) + ); + }); }); describe('#getDatasourceSuggestionsForVisualizeField', () => { diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/indexpattern_suggestions.ts b/x-pack/plugins/lens/public/indexpattern_datasource/indexpattern_suggestions.ts index 8e4017a583a91..d13aeced2c4af 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/indexpattern_suggestions.ts +++ b/x-pack/plugins/lens/public/indexpattern_datasource/indexpattern_suggestions.ts @@ -203,6 +203,10 @@ function createNewTimeseriesLayerWithMetricAggregationFromVizEditor( layer.format, layer.label ); + // static values layers do not need a date histogram column + if (Object.values(computedLayer.columns)[0].isStaticValue) { + return computedLayer; + } return insertNewColumn({ op: 'date_histogram', diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/helpers.test.ts b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/helpers.test.ts index bf24e31ad4f59..616c1f5719cc6 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/helpers.test.ts +++ b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/helpers.test.ts @@ -7,6 +7,7 @@ import { createMockedIndexPattern } from '../../mocks'; import { getInvalidFieldMessage } from './helpers'; +import type { TermsIndexPatternColumn } from './terms'; describe('helpers', () => { describe('getInvalidFieldMessage', () => { @@ -16,13 +17,13 @@ describe('helpers', () => { dataType: 'number', isBucketed: false, label: 'Foo', - operationType: 'count', // <= invalid - sourceField: 'bytes', + operationType: 'count', + sourceField: 'NoBytes', // <= invalid }, createMockedIndexPattern() ); expect(messages).toHaveLength(1); - expect(messages![0]).toEqual('Field bytes was not found'); + expect(messages![0]).toEqual('Field NoBytes was not found'); }); it('returns an error if a field is the wrong type', () => { @@ -31,8 +32,8 @@ describe('helpers', () => { dataType: 'number', isBucketed: false, label: 'Foo', - operationType: 'average', // <= invalid - sourceField: 'timestamp', + operationType: 'average', + sourceField: 'timestamp', // <= invalid type for average }, createMockedIndexPattern() ); @@ -40,6 +41,78 @@ describe('helpers', () => { expect(messages![0]).toEqual('Field timestamp is of the wrong type'); }); + it('returns an error if one field amongst multiples does not exist', () => { + const messages = getInvalidFieldMessage( + { + dataType: 'number', + isBucketed: false, + label: 'Foo', + operationType: 'terms', + sourceField: 'geo.src', + params: { + secondaryFields: ['NoBytes'], // <= field does not exist + }, + } as TermsIndexPatternColumn, + createMockedIndexPattern() + ); + expect(messages).toHaveLength(1); + expect(messages![0]).toEqual('Field NoBytes was not found'); + }); + + it('returns an error if multiple fields do not exist', () => { + const messages = getInvalidFieldMessage( + { + dataType: 'number', + isBucketed: false, + label: 'Foo', + operationType: 'terms', + sourceField: 'NotExisting', + params: { + secondaryFields: ['NoBytes'], // <= field does not exist + }, + } as TermsIndexPatternColumn, + createMockedIndexPattern() + ); + expect(messages).toHaveLength(1); + expect(messages![0]).toEqual('Fields NotExisting, NoBytes were not found'); + }); + + it('returns an error if one field amongst multiples has the wrong type', () => { + const messages = getInvalidFieldMessage( + { + dataType: 'number', + isBucketed: false, + label: 'Foo', + operationType: 'terms', + sourceField: 'geo.src', + params: { + secondaryFields: ['timestamp'], // <= invalid type + }, + } as TermsIndexPatternColumn, + createMockedIndexPattern() + ); + expect(messages).toHaveLength(1); + expect(messages![0]).toEqual('Field timestamp is of the wrong type'); + }); + + it('returns an error if multiple fields are of the wrong type', () => { + const messages = getInvalidFieldMessage( + { + dataType: 'number', + isBucketed: false, + label: 'Foo', + operationType: 'terms', + sourceField: 'start_date', // <= invalid type + params: { + secondaryFields: ['timestamp'], // <= invalid type + }, + } as TermsIndexPatternColumn, + createMockedIndexPattern() + ); + expect(messages).toHaveLength(1); + expect(messages![0]).toEqual('Fields start_date, timestamp are of the wrong type'); + }); + it('returns no message if all fields are matching', () => { const messages = getInvalidFieldMessage( { diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/helpers.tsx b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/helpers.tsx index 73e0e61a68950..c464ce0da027c 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/helpers.tsx +++ b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/helpers.tsx @@ -12,7 +12,8 @@ import { FormattedIndexPatternColumn, ReferenceBasedIndexPatternColumn, } from './column_types'; -import { IndexPattern } from '../../types'; +import { IndexPattern, IndexPatternField } from '../../types'; +import { hasField } from '../../pure_utils'; export function getInvalidFieldMessage( column: FieldBasedIndexPatternColumn, @@ -21,47 +22,66 @@ export function getInvalidFieldMessage( if (!indexPattern) { return; } - const { sourceField, operationType } = column; - const field = sourceField ? indexPattern.getFieldByName(sourceField) : undefined; - const operationDefinition = operationType && operationDefinitionMap[operationType]; + const { operationType } = column; + const operationDefinition = operationType ? operationDefinitionMap[operationType] : undefined; + const fieldNames = + hasField(column) && operationDefinition + ? operationDefinition?.getCurrentFields?.(column) ?? [column.sourceField] + : []; + const fields = fieldNames.map((fieldName) => indexPattern.getFieldByName(fieldName)); + const filteredFields = fields.filter(Boolean) as IndexPatternField[]; const isInvalid = Boolean( - sourceField && - operationDefinition && + fields.length > filteredFields.length || !( - field && operationDefinition?.input === 'field' && - operationDefinition.getPossibleOperationForField(field) !== undefined + filteredFields.every( + (field) => operationDefinition.getPossibleOperationForField(field) != null + ) ) ); const isWrongType = Boolean( - sourceField && - operationDefinition && - field && - !operationDefinition.isTransferable( + filteredFields.length && + !operationDefinition?.isTransferable( column as GenericIndexPatternColumn, indexPattern, operationDefinitionMap ) ); + if (isInvalid) { + // Missing fields have priority over wrong type + // This has been moved as some transferable checks also perform exist checks internally and fail eventually + // but that would make type mismatch error appear in place of missing fields scenarios + const missingFields = fields.map((field, i) => (field ? null : fieldNames[i])).filter(Boolean); + if (missingFields.length) { + return [ + i18n.translate('xpack.lens.indexPattern.fieldsNotFound', { + defaultMessage: + '{count, plural, one {Field} other {Fields}} {missingFields} {count, plural, one {was} other {were}} not found', + values: { + count: missingFields.length, + missingFields: missingFields.join(', '), + }, + }), + ]; + } if (isWrongType) { + // as fallback show all the fields as invalid? + const wrongTypeFields = + operationDefinition?.getNonTransferableFields?.(column, indexPattern) ?? fieldNames; return [ - i18n.translate('xpack.lens.indexPattern.fieldWrongType', { - defaultMessage: 'Field {invalidField} is of the wrong type', + i18n.translate('xpack.lens.indexPattern.fieldsWrongType', { + defaultMessage: + '{count, plural, one {Field} other {Fields}} {invalidFields} {count, plural, one {is} other {are}} of the wrong type', values: { - invalidField: sourceField, + count: wrongTypeFields.length, + invalidFields: wrongTypeFields.join(', '), }, }), ]; } - return [ - i18n.translate('xpack.lens.indexPattern.fieldNotFound', { - defaultMessage: 'Field {invalidField} was not found', - values: { invalidField: sourceField }, - }), - ]; } return undefined; diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/index.ts b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/index.ts index a048f2b559191..dec70130d1282 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/index.ts +++ b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/index.ts @@ -336,6 +336,12 @@ interface BaseOperationDefinitionProps * Operation can influence some visual default settings. This function is used to collect default values offered */ getDefaultVisualSettings?: (column: C) => { truncateText?: boolean }; + + /** + * Utility function useful for multi fields operation in order to get fields + * are not pass the transferable checks + */ + getNonTransferableFields?: (column: C, indexPattern: IndexPattern) => string[]; } interface BaseBuildColumnArgs { diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/constants.ts b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/constants.ts new file mode 100644 index 0000000000000..64967aab08733 --- /dev/null +++ b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/constants.ts @@ -0,0 +1,14 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +export const DEFAULT_SIZE = 3; +// Elasticsearch limit +export const MAXIMUM_MAX_DOC_COUNT = 100; +export const DEFAULT_MAX_DOC_COUNT = 1; +export const supportedTypes = new Set(['string', 'boolean', 'number', 'ip']); + +export const MULTI_KEY_VISUAL_SEPARATOR = '›'; diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/field_inputs.tsx b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/field_inputs.tsx index e187b12f323c6..b21bfdc67fe23 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/field_inputs.tsx +++ b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/field_inputs.tsx @@ -21,6 +21,7 @@ import { FieldSelect } from '../../../dimension_panel/field_select'; import type { TermsIndexPatternColumn } from './types'; import type { IndexPattern, IndexPatternPrivateState } from '../../../types'; import type { OperationSupportMatrix } from '../../../dimension_panel'; +import { supportedTypes } from './constants'; const generateId = htmlIdGenerator(); export const MAX_MULTI_FIELDS_SIZE = 3; @@ -29,6 +30,7 @@ export interface FieldInputsProps { column: TermsIndexPatternColumn; indexPattern: IndexPattern; existingFields: IndexPatternPrivateState['existingFields']; + invalidFields?: string[]; operationSupportMatrix: Pick; onChange: (newValues: string[]) => void; } @@ -51,6 +53,7 @@ export function FieldInputs({ indexPattern, existingFields, operationSupportMatrix, + invalidFields, }: FieldInputsProps) { const onChangeWrapped = useCallback( (values: WrappedValue[]) => @@ -90,7 +93,7 @@ export function FieldInputs({ return ( <> { // need to filter the available fields for multiple terms // * a scripted field should be removed - // * if a field has been used, should it be removed? Probably yes? - // * if a scripted field was used in a singular term, should it be marked as invalid for multi-terms? Probably yes? + // * a field of unsupported type should be removed + // * a field that has been used + // * a scripted field was used in a singular term, should be marked as invalid for multi-terms const filteredOperationByField = Object.keys(operationSupportMatrix.operationByField) - .filter( - (key) => - (!rawValuesLookup.has(key) && !indexPattern.getFieldByName(key)?.scripted) || - key === value - ) + .filter((key) => { + if (key === value) { + return true; + } + const field = indexPattern.getFieldByName(key); + return ( + !rawValuesLookup.has(key) && + field && + !field.scripted && + supportedTypes.has(field.type) + ); + }) .reduce((memo, key) => { memo[key] = operationSupportMatrix.operationByField[key]; return memo; }, {}); - const shouldShowScriptedFieldError = Boolean( - value && indexPattern.getFieldByName(value)?.scripted && localValuesFilled.length > 1 + const shouldShowError = Boolean( + value && + ((indexPattern.getFieldByName(value)?.scripted && localValuesFilled.length > 1) || + invalidFields?.includes(value)) ); return ( { onFieldSelectChange(choice, index); }} - isInvalid={shouldShowScriptedFieldError} + isInvalid={shouldShowError} data-test-subj={`indexPattern-dimension-field-${index}`} /> @@ -233,3 +246,21 @@ export function FieldInputs({ ); } + +export function getInputFieldErrorMessage(isScriptedField: boolean, invalidFields: string[]) { + if (isScriptedField) { + return i18n.translate('xpack.lens.indexPattern.terms.scriptedFieldErrorShort', { + defaultMessage: 'Scripted fields are not supported when using multiple fields', + }); + } + if (invalidFields.length) { + return i18n.translate('xpack.lens.indexPattern.terms.invalidFieldsErrorShort', { + defaultMessage: + 'Invalid {invalidFieldsCount, plural, one {field} other {fields}}: {invalidFields}. Check your data view or pick another field.', + values: { + invalidFieldsCount: invalidFields.length, + invalidFields: invalidFields.map((fieldName) => `"${fieldName}"`).join(', '), + }, + }); + } +} diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/helpers.test.ts b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/helpers.test.ts index 628a5d6a7740a..cdc0f92121f06 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/helpers.test.ts +++ b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/helpers.test.ts @@ -15,9 +15,9 @@ import { getDisallowedTermsMessage, getMultiTermsScriptedFieldErrorMessage, isSortableByColumn, - MULTI_KEY_VISUAL_SEPARATOR, } from './helpers'; import { ReferenceBasedIndexPatternColumn } from '../column_types'; +import { MULTI_KEY_VISUAL_SEPARATOR } from './constants'; const indexPattern = createMockedIndexPattern(); diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/helpers.ts b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/helpers.ts index 2917abbf848f8..49e612f8bb0d2 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/helpers.ts +++ b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/helpers.ts @@ -10,7 +10,7 @@ import { uniq } from 'lodash'; import type { CoreStart } from 'kibana/public'; import { buildEsQuery } from '@kbn/es-query'; import { getEsQueryConfig } from '../../../../../../../../src/plugins/data/public'; -import { operationDefinitionMap } from '../index'; +import { GenericIndexPatternColumn, operationDefinitionMap } from '../index'; import { defaultLabel } from '../filters'; import { isReferenced } from '../../layer_helpers'; @@ -18,9 +18,9 @@ import type { FieldStatsResponse } from '../../../../../common'; import type { FrameDatasourceAPI } from '../../../../types'; import type { FiltersIndexPatternColumn } from '../index'; import type { TermsIndexPatternColumn } from './types'; -import type { IndexPatternLayer, IndexPattern } from '../../../types'; - -export const MULTI_KEY_VISUAL_SEPARATOR = '›'; +import type { IndexPatternLayer, IndexPattern, IndexPatternField } from '../../../types'; +import { MULTI_KEY_VISUAL_SEPARATOR, supportedTypes } from './constants'; +import { isColumnOfType } from '../helpers'; const fullSeparatorString = ` ${MULTI_KEY_VISUAL_SEPARATOR} `; @@ -213,3 +213,63 @@ export function isSortableByColumn(layer: IndexPatternLayer, columnId: string) { !isReferenced(layer, columnId) ); } + +export function isScriptedField(field: IndexPatternField): boolean; +export function isScriptedField(fieldName: string, indexPattern: IndexPattern): boolean; +export function isScriptedField( + fieldName: string | IndexPatternField, + indexPattern?: IndexPattern +) { + if (typeof fieldName === 'string') { + const field = indexPattern?.getFieldByName(fieldName); + return field && field.scripted; + } + return fieldName.scripted; +} + +export function getFieldsByValidationState( + newIndexPattern: IndexPattern, + column?: GenericIndexPatternColumn, + field?: string | IndexPatternField +): { + allFields: Array; + validFields: string[]; + invalidFields: string[]; +} { + const newFieldNames: string[] = []; + if (column && 'sourceField' in column) { + if (column.sourceField) { + newFieldNames.push(column.sourceField); + } + if (isColumnOfType('terms', column)) { + newFieldNames.push(...(column.params?.secondaryFields ?? [])); + } + } + if (field) { + newFieldNames.push(typeof field === 'string' ? field : field.name || field.displayName); + } + const newFields = newFieldNames.map((fieldName) => newIndexPattern.getFieldByName(fieldName)); + // lodash groupby does not provide the index arg, so had to write it manually :( + const validFields: string[] = []; + const invalidFields: string[] = []; + // mind to check whether a column was passed, in such case single term with scripted field is ok + const canAcceptScripted = Boolean(column && newFields.length === 1); + newFieldNames.forEach((fieldName, i) => { + const newField = newFields[i]; + const isValid = + newField && + supportedTypes.has(newField.type) && + newField.aggregatable && + (!newField.aggregationRestrictions || newField.aggregationRestrictions.terms) && + (canAcceptScripted || !isScriptedField(newField)); + + const arrayToPush = isValid ? validFields : invalidFields; + arrayToPush.push(fieldName); + }); + + return { + allFields: newFields, + validFields, + invalidFields, + }; +} diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/index.tsx b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/index.tsx index e30b3bbe8c0b5..68df9ff444fc5 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/index.tsx +++ b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/index.tsx @@ -26,19 +26,26 @@ import type { DataType } from '../../../../types'; import { OperationDefinition } from '../index'; import { FieldBasedIndexPatternColumn } from '../column_types'; import { ValuesInput } from './values_input'; -import { getInvalidFieldMessage, isColumnOfType } from '../helpers'; -import { FieldInputs, MAX_MULTI_FIELDS_SIZE } from './field_inputs'; +import { getInvalidFieldMessage } from '../helpers'; +import { FieldInputs, getInputFieldErrorMessage, MAX_MULTI_FIELDS_SIZE } from './field_inputs'; import { FieldInput as FieldInputBase, getErrorMessage, } from '../../../dimension_panel/field_input'; import type { TermsIndexPatternColumn } from './types'; -import type { IndexPattern, IndexPatternField } from '../../../types'; +import type { IndexPatternField } from '../../../types'; import { getDisallowedTermsMessage, getMultiTermsScriptedFieldErrorMessage, + getFieldsByValidationState, isSortableByColumn, } from './helpers'; +import { + DEFAULT_MAX_DOC_COUNT, + DEFAULT_SIZE, + MAXIMUM_MAX_DOC_COUNT, + supportedTypes, +} from './constants'; export function supportsRarityRanking(field?: IndexPatternField) { // these es field types can't be sorted by rarity @@ -79,27 +86,12 @@ function ofName(name?: string, count: number = 0, rare: boolean = false) { }); } -function isScriptedField(field: IndexPatternField): boolean; -function isScriptedField(fieldName: string, indexPattern: IndexPattern): boolean; -function isScriptedField(fieldName: string | IndexPatternField, indexPattern?: IndexPattern) { - if (typeof fieldName === 'string') { - const field = indexPattern?.getFieldByName(fieldName); - return field && field.scripted; - } - return fieldName.scripted; -} - // It is not always possible to know if there's a numeric field, so just ignore it for now function getParentFormatter(params: Partial) { return { id: params.secondaryFields?.length ? 'multi_terms' : 'terms' }; } const idPrefix = htmlIdGenerator()(); -const DEFAULT_SIZE = 3; -// Elasticsearch limit -const MAXIMUM_MAX_DOC_COUNT = 100; -export const DEFAULT_MAX_DOC_COUNT = 1; -const supportedTypes = new Set(['string', 'boolean', 'number', 'ip']); export const termsOperation: OperationDefinition = { type: 'terms', @@ -112,30 +104,18 @@ export const termsOperation: OperationDefinition { - const secondaryFields = new Set(); - if (targetColumn.params?.secondaryFields?.length) { - targetColumn.params.secondaryFields.forEach((fieldName) => { - if (!isScriptedField(fieldName, indexPattern)) { - secondaryFields.add(fieldName); - } - }); - } - if (sourceColumn && 'sourceField' in sourceColumn && sourceColumn?.sourceField) { - if (!isScriptedField(sourceColumn.sourceField, indexPattern)) { - secondaryFields.add(sourceColumn.sourceField); - } - } - if (sourceColumn && isColumnOfType('terms', sourceColumn)) { - if (sourceColumn?.params?.secondaryFields?.length) { - sourceColumn.params.secondaryFields.forEach((fieldName) => { - if (!isScriptedField(fieldName, indexPattern)) { - secondaryFields.add(fieldName); - } - }); - } - } - if (field && !isScriptedField(field)) { - secondaryFields.add(field.name); + const secondaryFields = new Set( + getFieldsByValidationState(indexPattern, targetColumn).validFields + ); + + const validFieldsToAdd = getFieldsByValidationState( + indexPattern, + sourceColumn, + field + ).validFields; + + for (const validField of validFieldsToAdd) { + secondaryFields.add(validField); } // remove the sourceField secondaryFields.delete(targetColumn.sourceField); @@ -155,27 +135,12 @@ export const termsOperation: OperationDefinition('terms', sourceColumn)) { - counter += - sourceColumn.params.secondaryFields?.filter((f) => { - return !isScriptedField(f, indexPattern) && !originalTerms.has(f); - }).length ?? 0; - } - } - } + const { validFields } = getFieldsByValidationState(indexPattern, sourceColumn, field); + const counter = validFields.filter((fieldName) => !originalTerms.has(fieldName)).length; // reject when there are no new fields to add if (!counter) { return false; @@ -209,14 +174,15 @@ export const termsOperation: OperationDefinition { + return getFieldsByValidationState(newIndexPattern, column).invalidFields; + }, isTransferable: (column, newIndexPattern) => { - const newField = newIndexPattern.getFieldByName(column.sourceField); + const { allFields, invalidFields } = getFieldsByValidationState(newIndexPattern, column); return Boolean( - newField && - supportedTypes.has(newField.type) && - newField.aggregatable && - (!newField.aggregationRestrictions || newField.aggregationRestrictions.terms) && + allFields.length && + invalidFields.length === 0 && (!column.params.otherBucket || !newIndexPattern.hasRestrictions) ); }, @@ -446,6 +412,7 @@ export const termsOperation: OperationDefinition ); diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/terms.test.tsx b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/terms.test.tsx index 7a42560751273..b2d202763afe1 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/terms.test.tsx +++ b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/terms.test.tsx @@ -59,7 +59,8 @@ const defaultProps = { data: dataPluginMock.createStartContract(), http: {} as HttpSetup, indexPattern: createMockedIndexPattern(), - operationDefinitionMap: {}, + // need to provide the terms operation as some helpers use operation specific features + operationDefinitionMap: { terms: termsOperation as unknown as GenericOperationDefinition }, isFullscreen: false, toggleFullscreen: jest.fn(), setIsCloseable: jest.fn(), @@ -1016,7 +1017,7 @@ describe('terms', () => { ).toBeTruthy(); }); - it('should show an error message when field is invalid', () => { + it('should show an error message when first field is invalid', () => { const updateLayerSpy = jest.fn(); const existingFields = getExistingFields(); const operationSupportMatrix = getDefaultOperationSupportMatrix('col1', existingFields); @@ -1049,7 +1050,7 @@ describe('terms', () => { ).toBe('Invalid field. Check your data view or pick another field.'); }); - it('should show an error message when field is not supported', () => { + it('should show an error message when first field is not supported', () => { const updateLayerSpy = jest.fn(); const existingFields = getExistingFields(); const operationSupportMatrix = getDefaultOperationSupportMatrix('col1', existingFields); @@ -1083,6 +1084,74 @@ describe('terms', () => { ).toBe('This field does not work with the selected function.'); }); + it('should show an error message when any field but the first is invalid', () => { + const updateLayerSpy = jest.fn(); + const existingFields = getExistingFields(); + const operationSupportMatrix = getDefaultOperationSupportMatrix('col1', existingFields); + + layer.columns.col1 = { + label: 'Top value of geo.src + 1 other', + dataType: 'string', + isBucketed: true, + operationType: 'terms', + params: { + orderBy: { type: 'alphabetical' }, + size: 3, + orderDirection: 'asc', + secondaryFields: ['unsupported'], + }, + sourceField: 'geo.src', + } as TermsIndexPatternColumn; + const instance = mount( + + ); + expect( + instance.find('[data-test-subj="indexPattern-field-selection-row"]').first().prop('error') + ).toBe('Invalid field: "unsupported". Check your data view or pick another field.'); + }); + + it('should show an error message when any field but the first is not supported', () => { + const updateLayerSpy = jest.fn(); + const existingFields = getExistingFields(); + const operationSupportMatrix = getDefaultOperationSupportMatrix('col1', existingFields); + + layer.columns.col1 = { + label: 'Top value of geo.src + 1 other', + dataType: 'date', + isBucketed: true, + operationType: 'terms', + params: { + orderBy: { type: 'alphabetical' }, + size: 3, + orderDirection: 'asc', + secondaryFields: ['timestamp'], + }, + sourceField: 'geo.src', + } as TermsIndexPatternColumn; + const instance = mount( + + ); + expect( + instance.find('[data-test-subj="indexPattern-field-selection-row"]').first().prop('error') + ).toBe('Invalid field: "timestamp". Check your data view or pick another field.'); + }); + it('should render the an add button for single layer, but no other hints', () => { const updateLayerSpy = jest.fn(); const existingFields = getExistingFields(); @@ -1370,6 +1439,38 @@ describe('terms', () => { ); }); + it('should filter fields with unsupported types when in multi terms mode', () => { + const updateLayerSpy = jest.fn(); + const existingFields = getExistingFields(); + const operationSupportMatrix = getDefaultOperationSupportMatrix('col1', existingFields); + + (layer.columns.col1 as TermsIndexPatternColumn).params.secondaryFields = ['memory']; + const instance = mount( + + ); + + // get inner instance + expect( + instance.find('[data-test-subj="indexPattern-dimension-field-0"]').at(1).prop('options') + ).toEqual( + expect.arrayContaining([ + expect.objectContaining({ + options: expect.arrayContaining([ + expect.not.objectContaining({ 'data-test-subj': 'lns-fieldOption-timestamp' }), + ]), + }), + ]) + ); + }); + it('should limit the number of multiple fields', () => { const updateLayerSpy = jest.fn(); const existingFields = getExistingFields(); @@ -2350,4 +2451,47 @@ describe('terms', () => { }); }); }); + + describe('getNonTransferableFields', () => { + it('should return empty array if all fields are transferable', () => { + expect( + termsOperation.getNonTransferableFields?.( + createMultiTermsColumn(['source']), + defaultProps.indexPattern + ) + ).toEqual([]); + expect( + termsOperation.getNonTransferableFields?.( + createMultiTermsColumn(['source', 'bytes']), + defaultProps.indexPattern + ) + ).toEqual([]); + expect( + termsOperation.getNonTransferableFields?.( + createMultiTermsColumn([]), + defaultProps.indexPattern + ) + ).toEqual([]); + expect( + termsOperation.getNonTransferableFields?.( + createMultiTermsColumn(['source', 'geo.src']), + defaultProps.indexPattern + ) + ).toEqual([]); + }); + it('should return only non transferable fields (invalid or not existence)', () => { + expect( + termsOperation.getNonTransferableFields?.( + createMultiTermsColumn(['source', 'timestamp']), + defaultProps.indexPattern + ) + ).toEqual(['timestamp']); + expect( + termsOperation.getNonTransferableFields?.( + createMultiTermsColumn(['source', 'unsupported']), + defaultProps.indexPattern + ) + ).toEqual(['unsupported']); + }); + }); }); diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/layer_helpers.ts b/x-pack/plugins/lens/public/indexpattern_datasource/operations/layer_helpers.ts index 2252c5b38a541..0c4428b54b673 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/layer_helpers.ts +++ b/x-pack/plugins/lens/public/indexpattern_datasource/operations/layer_helpers.ts @@ -228,15 +228,12 @@ export function insertNewColumn({ const possibleOperation = operationDefinition.getPossibleOperation(); const isBucketed = Boolean(possibleOperation?.isBucketed); const addOperationFn = isBucketed ? addBucket : addMetric; + const buildColumnFn = columnParams + ? operationDefinition.buildColumn({ ...baseOptions, layer }, columnParams) + : operationDefinition.buildColumn({ ...baseOptions, layer }); return updateDefaultLabels( - addOperationFn( - layer, - operationDefinition.buildColumn({ ...baseOptions, layer }), - columnId, - visualizationGroups, - targetGroup - ), + addOperationFn(layer, buildColumnFn, columnId, visualizationGroups, targetGroup), indexPattern ); } diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/utils.tsx b/x-pack/plugins/lens/public/indexpattern_datasource/utils.tsx index b21df483b342e..4062f2b2613fe 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/utils.tsx +++ b/x-pack/plugins/lens/public/indexpattern_datasource/utils.tsx @@ -33,7 +33,8 @@ import { FiltersIndexPatternColumn, isQueryValid } from './operations/definition import { checkColumnForPrecisionError, Query } from '../../../../../src/plugins/data/common'; import { hasField } from './pure_utils'; import { mergeLayer } from './state_helpers'; -import { DEFAULT_MAX_DOC_COUNT, supportsRarityRanking } from './operations/definitions/terms'; +import { supportsRarityRanking } from './operations/definitions/terms'; +import { DEFAULT_MAX_DOC_COUNT } from './operations/definitions/terms/constants'; import { getOriginalId } from '../../common/expressions'; export function isColumnInvalid( diff --git a/x-pack/plugins/lens/public/metric_visualization/auto_scale.test.tsx b/x-pack/plugins/lens/public/metric_visualization/auto_scale.test.tsx deleted file mode 100644 index b7584ffa9eb7e..0000000000000 --- a/x-pack/plugins/lens/public/metric_visualization/auto_scale.test.tsx +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React from 'react'; -import { computeScale, AutoScale } from './auto_scale'; -import { render } from 'enzyme'; - -const mockElement = (clientWidth = 100, clientHeight = 200) => ({ - clientHeight, - clientWidth, -}); - -describe('AutoScale', () => { - describe('computeScale', () => { - it('is 1 if any element is null', () => { - expect(computeScale(null, null)).toBe(1); - expect(computeScale(mockElement(), null)).toBe(1); - expect(computeScale(null, mockElement())).toBe(1); - }); - - it('is never over 1', () => { - expect(computeScale(mockElement(2000, 2000), mockElement(1000, 1000))).toBe(1); - }); - - it('is never under 0.3 in default case', () => { - expect(computeScale(mockElement(2000, 1000), mockElement(1000, 10000))).toBe(0.3); - }); - - it('is never under specified min scale if specified', () => { - expect(computeScale(mockElement(2000, 1000), mockElement(1000, 10000), 0.1)).toBe(0.1); - }); - - it('is the lesser of the x or y scale', () => { - expect(computeScale(mockElement(2000, 2000), mockElement(3000, 5000))).toBe(0.4); - expect(computeScale(mockElement(2000, 3000), mockElement(4000, 3200))).toBe(0.5); - }); - }); - - describe('AutoScale', () => { - it('renders', () => { - expect( - render( - -

Hoi!

-
- ) - ).toMatchInlineSnapshot(` -
-
-

- Hoi! -

-
-
- `); - }); - }); -}); diff --git a/x-pack/plugins/lens/public/metric_visualization/auto_scale.tsx b/x-pack/plugins/lens/public/metric_visualization/auto_scale.tsx deleted file mode 100644 index 7e47405f9258a..0000000000000 --- a/x-pack/plugins/lens/public/metric_visualization/auto_scale.tsx +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React from 'react'; -import { throttle } from 'lodash'; -import classNames from 'classnames'; -import { EuiResizeObserver } from '@elastic/eui'; -import { MetricState } from '../../common/expressions'; - -interface Props extends React.HTMLAttributes { - children: React.ReactNode | React.ReactNode[]; - minScale?: number; - size?: MetricState['size']; - titlePosition?: MetricState['titlePosition']; - textAlign?: MetricState['textAlign']; -} - -interface State { - scale: number; -} - -export class AutoScale extends React.Component { - private child: Element | null = null; - private parent: Element | null = null; - private scale: () => void; - - constructor(props: Props) { - super(props); - - this.scale = throttle(() => { - const scale = computeScale(this.parent, this.child, this.props.minScale); - - // Prevent an infinite render loop - if (this.state.scale !== scale) { - this.setState({ scale }); - } - }); - - // An initial scale of 0 means we always redraw - // at least once, which is sub-optimal, but it - // prevents an annoying flicker. - this.state = { scale: 0 }; - } - - setParent = (el: Element | null) => { - if (el && this.parent !== el) { - this.parent = el; - setTimeout(() => this.scale()); - } - }; - - setChild = (el: Element | null) => { - if (el && this.child !== el) { - this.child = el; - setTimeout(() => this.scale()); - } - }; - - render() { - const { children, minScale, size, textAlign, titlePosition, ...rest } = this.props; - const { scale } = this.state; - const style = this.props.style || {}; - - return ( - - {(resizeRef) => ( -
{ - this.setParent(el); - resizeRef(el); - }} - style={{ - ...style, - display: 'flex', - justifyContent: 'center', - alignItems: 'center', - maxWidth: '100%', - maxHeight: '100%', - overflow: 'hidden', - lineHeight: 1.5, - }} - > -
- {children} -
-
- )} -
- ); - } -} - -interface ClientDimensionable { - clientWidth: number; - clientHeight: number; -} - -const MAX_SCALE = 1; -const MIN_SCALE = 0.3; - -/** - * computeScale computes the ratio by which the child needs to shrink in order - * to fit into the parent. This function is only exported for testing purposes. - */ -export function computeScale( - parent: ClientDimensionable | null, - child: ClientDimensionable | null, - minScale: number = MIN_SCALE -) { - if (!parent || !child) { - return 1; - } - - const scaleX = parent.clientWidth / child.clientWidth; - const scaleY = parent.clientHeight / child.clientHeight; - - return Math.max(Math.min(MAX_SCALE, Math.min(scaleX, scaleY)), minScale); -} diff --git a/x-pack/plugins/lens/public/metric_visualization/dimension_editor.test.tsx b/x-pack/plugins/lens/public/metric_visualization/dimension_editor.test.tsx index b296313086d7f..478c0fff40208 100644 --- a/x-pack/plugins/lens/public/metric_visualization/dimension_editor.test.tsx +++ b/x-pack/plugins/lens/public/metric_visualization/dimension_editor.test.tsx @@ -16,7 +16,7 @@ import { ColorMode, PaletteOutput, PaletteRegistry } from 'src/plugins/charts/pu import { act } from 'react-dom/test-utils'; import { CustomizablePalette, PalettePanelContainer } from '../shared_components'; import { CustomPaletteParams, layerTypes } from '../../common'; -import { MetricState } from '../../common/expressions'; +import type { MetricState } from '../../common/types'; // mocking random id generator function jest.mock('@elastic/eui', () => { diff --git a/x-pack/plugins/lens/public/metric_visualization/dimension_editor.tsx b/x-pack/plugins/lens/public/metric_visualization/dimension_editor.tsx index 77c6e909bc671..83faac5cc8026 100644 --- a/x-pack/plugins/lens/public/metric_visualization/dimension_editor.tsx +++ b/x-pack/plugins/lens/public/metric_visualization/dimension_editor.tsx @@ -17,7 +17,8 @@ import { i18n } from '@kbn/i18n'; import React, { useCallback, useState } from 'react'; import { ColorMode } from '../../../../../src/plugins/charts/common'; import type { PaletteRegistry } from '../../../../../src/plugins/charts/public'; -import { isNumericFieldForDatatable, MetricState } from '../../common/expressions'; +import type { MetricState } from '../../common/types'; +import { isNumericFieldForDatatable } from '../../common/expressions'; import { applyPaletteParams, CustomizablePalette, diff --git a/x-pack/plugins/lens/public/metric_visualization/expression.scss b/x-pack/plugins/lens/public/metric_visualization/expression.scss deleted file mode 100644 index fdd22690207fa..0000000000000 --- a/x-pack/plugins/lens/public/metric_visualization/expression.scss +++ /dev/null @@ -1,87 +0,0 @@ -.lnsMetricExpression__container { - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; - width: 100%; - height: 100%; - text-align: center; - - .lnsMetricExpression__value { - font-size: $euiFontSizeXXL * 2; - font-weight: $euiFontWeightSemiBold; - border-radius: $euiBorderRadius; - } - - .lnsMetricExpression__title { - font-size: $euiFontSizeXXL; - color: $euiTextColor; - &.reverseOrder { - order: 1; - } - } - - .lnsMetricExpression__containerScale { - display: flex; - align-items: center; - flex-direction: column; - &.alignLeft { - align-items: start; - } - &.alignRight { - align-items: end; - } - &.alignCenter { - align-items: center; - } - &.titleSizeXS { - .lnsMetricExpression__title { - font-size: $euiFontSizeXS; - } - .lnsMetricExpression__value { - font-size: $euiFontSizeXS * 2; - } - } - &.titleSizeS { - .lnsMetricExpression__title { - font-size: $euiFontSizeS; - } - .lnsMetricExpression__value { - font-size: $euiFontSizeM * 2.25; - } - } - &.titleSizeM { - .lnsMetricExpression__title { - font-size: $euiFontSizeM; - } - .lnsMetricExpression__value { - font-size: $euiFontSizeL * 2; - } - } - &.titleSizeL { - .lnsMetricExpression__title { - font-size: $euiFontSizeL; - } - .lnsMetricExpression__value { - font-size: $euiFontSizeXL * 2; - } - } - &.titleSizeXL { - .lnsMetricExpression__title { - font-size: $euiFontSizeXL; - } - .lnsMetricExpression__value { - font-size: $euiFontSizeXXL * 2; - } - } - - &.titleSizeXXL { - .lnsMetricExpression__title { - font-size: $euiFontSizeXXL; - } - .lnsMetricExpression__value { - font-size: $euiFontSizeXXL * 3; - } - } - } -} diff --git a/x-pack/plugins/lens/public/metric_visualization/expression.test.tsx b/x-pack/plugins/lens/public/metric_visualization/expression.test.tsx deleted file mode 100644 index c37e0c6c660c9..0000000000000 --- a/x-pack/plugins/lens/public/metric_visualization/expression.test.tsx +++ /dev/null @@ -1,552 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { MetricChart } from './expression'; -import { MetricConfig, metricChart } from '../../common/expressions'; -import React from 'react'; -import { shallow, mount } from 'enzyme'; -import { createMockExecutionContext } from '../../../../../src/plugins/expressions/common/mocks'; -import type { IFieldFormat } from '../../../../../src/plugins/field_formats/common'; -import { layerTypes } from '../../common'; -import type { LensMultiTable } from '../../common'; -import { IUiSettingsClient } from 'kibana/public'; -import { ColorMode } from 'src/plugins/charts/common'; - -function sampleArgs() { - const data: LensMultiTable = { - type: 'lens_multitable', - tables: { - l1: { - type: 'datatable', - columns: [ - // Simulating a calculated column like a formula - { id: 'a', name: 'a', meta: { type: 'string', params: { id: 'string' } } }, - { id: 'b', name: 'b', meta: { type: 'string' } }, - { - id: 'c', - name: 'c', - meta: { type: 'number', params: { id: 'percent', params: { format: '0.000%' } } }, - }, - ], - rows: [{ a: 'last', b: 'last', c: 3 }], - }, - }, - }; - - const args: MetricConfig = { - accessor: 'c', - layerId: 'l1', - layerType: layerTypes.DATA, - title: 'My fanci metric chart', - description: 'Fancy chart description', - metricTitle: 'My fanci metric chart', - mode: 'full', - colorMode: ColorMode.None, - palette: { type: 'palette', name: 'status' }, - }; - - const noAttributesArgs: MetricConfig = { - accessor: 'c', - layerId: 'l1', - layerType: layerTypes.DATA, - title: '', - description: '', - metricTitle: 'My fanci metric chart', - mode: 'full', - colorMode: ColorMode.None, - palette: { type: 'palette', name: 'status' }, - }; - - return { data, args, noAttributesArgs }; -} - -describe('metric_expression', () => { - describe('metricChart', () => { - test('it renders with the specified data and args', () => { - const { data, args } = sampleArgs(); - const result = metricChart.fn(data, args, createMockExecutionContext()); - - expect(result).toEqual({ - type: 'render', - as: 'lens_metric_chart_renderer', - value: { data, args }, - }); - }); - }); - - describe('MetricChart component', () => { - test('it renders all attributes when passed (title, description, metricTitle, value)', () => { - const { data, args } = sampleArgs(); - - expect( - shallow( - ({ convert: (x) => x } as IFieldFormat)} - uiSettings={{ get: jest.fn() } as unknown as IUiSettingsClient} - /> - ) - ).toMatchInlineSnapshot(` - - -
- My fanci metric chart -
-
- 3 -
-
-
- `); - }); - - test('it renders strings', () => { - const { data, args } = sampleArgs(); - args.accessor = 'a'; - - expect( - shallow( - ({ convert: (x) => x } as IFieldFormat)} - uiSettings={{ get: jest.fn() } as unknown as IUiSettingsClient} - /> - ) - ).toMatchInlineSnapshot(` - - -
- My fanci metric chart -
-
- last -
-
-
- `); - }); - - test('it renders only chart content when title and description are empty strings', () => { - const { data, noAttributesArgs } = sampleArgs(); - - expect( - shallow( - ({ convert: (x) => x } as IFieldFormat)} - uiSettings={{ get: jest.fn() } as unknown as IUiSettingsClient} - /> - ) - ).toMatchInlineSnapshot(` - - -
- My fanci metric chart -
-
- 3 -
-
-
- `); - }); - - test('it does not render metricTitle in reduced mode', () => { - const { data, noAttributesArgs } = sampleArgs(); - - expect( - shallow( - ({ convert: (x) => x } as IFieldFormat)} - uiSettings={{ get: jest.fn() } as unknown as IUiSettingsClient} - /> - ) - ).toMatchInlineSnapshot(` - - -
- 3 -
-
-
- `); - }); - - test('it renders an EmptyPlaceholder when no tables is passed as data', () => { - const { data, noAttributesArgs } = sampleArgs(); - - expect( - shallow( - ({ convert: (x) => x } as IFieldFormat)} - uiSettings={{ get: jest.fn() } as unknown as IUiSettingsClient} - /> - ) - ).toMatchInlineSnapshot(` - - - - `); - }); - - test('it renders an EmptyPlaceholder when null value is passed as data', () => { - const { data, noAttributesArgs } = sampleArgs(); - - data.tables.l1.rows[0].c = null; - - expect( - shallow( - ({ convert: (x) => x } as IFieldFormat)} - uiSettings={{ get: jest.fn() } as unknown as IUiSettingsClient} - /> - ) - ).toMatchInlineSnapshot(` - - - - `); - }); - - test('it renders 0 value', () => { - const { data, noAttributesArgs } = sampleArgs(); - - data.tables.l1.rows[0].c = 0; - - expect( - shallow( - ({ convert: (x) => x } as IFieldFormat)} - uiSettings={{ get: jest.fn() } as unknown as IUiSettingsClient} - /> - ) - ).toMatchInlineSnapshot(` - - -
- My fanci metric chart -
-
- 0 -
-
-
- `); - }); - - test('it finds the right column to format', () => { - const { data, args } = sampleArgs(); - const factory = jest.fn(() => ({ convert: (x) => x } as IFieldFormat)); - - shallow( - - ); - expect(factory).toHaveBeenCalledWith({ id: 'percent', params: { format: '0.000%' } }); - }); - - test('it renders the correct color styling for numeric value if coloring config is passed', () => { - const { data, args } = sampleArgs(); - - args.colorMode = ColorMode.Labels; - args.palette.params = { - rangeMin: 0, - rangeMax: 400, - stops: [100, 200, 400], - gradient: false, - range: 'number', - colors: ['red', 'yellow', 'green'], - }; - - const instance = mount( - ({ convert: (x) => x } as IFieldFormat)} - uiSettings={{ get: jest.fn() } as unknown as IUiSettingsClient} - /> - ); - - expect( - instance.find('[data-test-subj="lnsVisualizationContainer"]').first().prop('style') - ).toEqual( - expect.objectContaining({ - color: 'red', - }) - ); - }); - - test('it renders no color styling for numeric value if value is lower then rangeMin and continuity is "above"', () => { - const { data, args } = sampleArgs(); - - data.tables.l1.rows[0].c = -1; - args.colorMode = ColorMode.Labels; - args.palette.params = { - rangeMin: 0, - rangeMax: 400, - stops: [100, 200, 400], - gradient: false, - range: 'number', - colors: ['red', 'yellow', 'green'], - continuity: 'above', - }; - - const instance = mount( - ({ convert: (x) => x } as IFieldFormat)} - uiSettings={{ get: jest.fn() } as unknown as IUiSettingsClient} - /> - ); - - expect( - instance.find('[data-test-subj="lnsVisualizationContainer"]').first().prop('style') - ).not.toEqual( - expect.objectContaining({ - color: expect.any(String), - }) - ); - }); - test('it renders no color styling for numeric value if value is higher than rangeMax and continuity is "below"', () => { - const { data, args } = sampleArgs(); - - data.tables.l1.rows[0].c = 500; - args.colorMode = ColorMode.Labels; - args.palette.params = { - rangeMin: 0, - rangeMax: 400, - stops: [100, 200, 400], - gradient: false, - range: 'number', - colors: ['red', 'yellow', 'green'], - continuity: 'below', - }; - - const instance = mount( - ({ convert: (x) => x } as IFieldFormat)} - uiSettings={{ get: jest.fn() } as unknown as IUiSettingsClient} - /> - ); - - expect( - instance.find('[data-test-subj="lnsVisualizationContainer"]').first().prop('style') - ).not.toEqual( - expect.objectContaining({ - color: expect.any(String), - }) - ); - }); - - test('it renders no color styling for numeric value if value is higher than rangeMax', () => { - const { data, args } = sampleArgs(); - - data.tables.l1.rows[0].c = 500; - args.colorMode = ColorMode.Labels; - args.palette.params = { - rangeMin: 0, - rangeMax: 400, - stops: [100, 200, 400], - gradient: false, - range: 'number', - colors: ['red', 'yellow', 'green'], - }; - - const instance = mount( - ({ convert: (x) => x } as IFieldFormat)} - uiSettings={{ get: jest.fn() } as unknown as IUiSettingsClient} - /> - ); - - expect( - instance.find('[data-test-subj="lnsVisualizationContainer"]').first().prop('style') - ).not.toEqual( - expect.objectContaining({ - color: expect.any(String), - }) - ); - }); - - test('it renders no color styling for numeric value if value is lower than rangeMin', () => { - const { data, args } = sampleArgs(); - - data.tables.l1.rows[0].c = -1; - args.colorMode = ColorMode.Labels; - args.palette.params = { - rangeMin: 0, - rangeMax: 400, - stops: [100, 200, 400], - gradient: false, - range: 'number', - colors: ['red', 'yellow', 'green'], - }; - - const instance = mount( - ({ convert: (x) => x } as IFieldFormat)} - uiSettings={{ get: jest.fn() } as unknown as IUiSettingsClient} - /> - ); - - expect( - instance.find('[data-test-subj="lnsVisualizationContainer"]').first().prop('style') - ).not.toEqual( - expect.objectContaining({ - color: expect.any(String), - }) - ); - }); - - test('it renders the correct color styling for numeric value if user select auto detect max value', () => { - const { data, args } = sampleArgs(); - - data.tables.l1.rows[0].c = 500; - args.colorMode = ColorMode.Labels; - args.palette.params = { - rangeMin: 20, - rangeMax: Infinity, - stops: [100, 200, 400], - gradient: false, - range: 'number', - colors: ['red', 'yellow', 'green'], - }; - - const instance = mount( - ({ convert: (x) => x } as IFieldFormat)} - uiSettings={{ get: jest.fn() } as unknown as IUiSettingsClient} - /> - ); - - expect( - instance.find('[data-test-subj="lnsVisualizationContainer"]').first().prop('style') - ).toEqual( - expect.objectContaining({ - color: 'green', - }) - ); - }); - - test('it renders the correct color styling for numeric value if user select auto detect min value', () => { - const { data, args } = sampleArgs(); - - data.tables.l1.rows[0].c = -1; - args.colorMode = ColorMode.Labels; - args.palette.params = { - rangeMin: -Infinity, - rangeMax: 400, - stops: [-Infinity, 200, 400], - gradient: false, - range: 'number', - colors: ['red', 'yellow', 'green'], - }; - - const instance = mount( - ({ convert: (x) => x } as IFieldFormat)} - uiSettings={{ get: jest.fn() } as unknown as IUiSettingsClient} - /> - ); - - expect( - instance.find('[data-test-subj="lnsVisualizationContainer"]').first().prop('style') - ).toEqual( - expect.objectContaining({ - color: 'red', - }) - ); - }); - }); -}); diff --git a/x-pack/plugins/lens/public/metric_visualization/expression.tsx b/x-pack/plugins/lens/public/metric_visualization/expression.tsx deleted file mode 100644 index 8a4228f0d502d..0000000000000 --- a/x-pack/plugins/lens/public/metric_visualization/expression.tsx +++ /dev/null @@ -1,172 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import './expression.scss'; -import { I18nProvider } from '@kbn/i18n-react'; -import React from 'react'; -import ReactDOM from 'react-dom'; -import classNames from 'classnames'; -import { IUiSettingsClient, ThemeServiceStart } from 'kibana/public'; -import { KibanaThemeProvider } from '../../../../../src/plugins/kibana_react/public'; -import type { - ExpressionRenderDefinition, - IInterpreterRenderHandlers, -} from '../../../../../src/plugins/expressions/public'; -import { - ColorMode, - CustomPaletteState, - PaletteOutput, -} from '../../../../../src/plugins/charts/public'; -import { AutoScale } from './auto_scale'; -import { VisualizationContainer } from '../visualization_container'; -import { getContrastColor } from '../shared_components'; -import { EmptyPlaceholder } from '../../../../../src/plugins/charts/public'; -import { LensIconChartMetric } from '../assets/chart_metric'; -import type { FormatFactory } from '../../common'; -import type { MetricChartProps } from '../../common/expressions'; -export type { MetricChartProps, MetricState, MetricConfig } from '../../common/expressions'; - -export const getMetricChartRenderer = ( - formatFactory: FormatFactory, - uiSettings: IUiSettingsClient, - theme: ThemeServiceStart -): ExpressionRenderDefinition => ({ - name: 'lens_metric_chart_renderer', - displayName: 'Metric chart', - help: 'Metric chart renderer', - validate: () => undefined, - reuseDomNode: true, - render: (domNode: Element, config: MetricChartProps, handlers: IInterpreterRenderHandlers) => { - ReactDOM.render( - - - - - , - domNode, - () => { - handlers.done(); - } - ); - handlers.onDestroy(() => ReactDOM.unmountComponentAtNode(domNode)); - }, -}); - -function getColorStyling( - value: number, - colorMode: ColorMode, - palette: PaletteOutput | undefined, - isDarkTheme: boolean -) { - if ( - colorMode === ColorMode.None || - !palette?.params || - !palette?.params.colors?.length || - isNaN(value) - ) { - return {}; - } - - const { rangeMin, rangeMax, stops, colors } = palette.params; - - if (value > rangeMax) { - return {}; - } - if (value < rangeMin) { - return {}; - } - const cssProp = colorMode === ColorMode.Background ? 'backgroundColor' : 'color'; - let rawIndex = stops.findIndex((v) => v > value); - - if (!isFinite(rangeMax) && value > stops[stops.length - 1]) { - rawIndex = stops.length - 1; - } - - // in this case first stop is -Infinity - if (!isFinite(rangeMin) && value < (isFinite(stops[0]) ? stops[0] : stops[1])) { - rawIndex = 0; - } - - const colorIndex = rawIndex; - - const color = colors[colorIndex]; - const styling = { - [cssProp]: color, - }; - if (colorMode === ColorMode.Background && color) { - // set to "euiTextColor" for both light and dark color, depending on the theme - styling.color = getContrastColor(color, isDarkTheme, 'euiTextColor', 'euiTextColor'); - } - return styling; -} - -export function MetricChart({ - data, - args, - formatFactory, - uiSettings, -}: MetricChartProps & { formatFactory: FormatFactory; uiSettings: IUiSettingsClient }) { - const { metricTitle, accessor, mode, colorMode, palette, titlePosition, textAlign, size } = args; - const firstTable = Object.values(data.tables)[0]; - - const getEmptyState = () => ( - - - - ); - - if (!accessor || !firstTable) { - return getEmptyState(); - } - - const column = firstTable.columns.find(({ id }) => id === accessor); - const row = firstTable.rows[0]; - if (!column || !row) { - return getEmptyState(); - } - const rawValue = row[accessor]; - - // NOTE: Cardinality and Sum never receives "null" as value, but always 0, even for empty dataset. - // Mind falsy values here as 0! - if (!['number', 'string'].includes(typeof rawValue)) { - return getEmptyState(); - } - - const value = - column && column.meta?.params - ? formatFactory(column.meta?.params).convert(rawValue) - : Number(Number(rawValue).toFixed(3)).toString(); - - const color = getColorStyling(rawValue, colorMode, palette, uiSettings.get('theme:darkMode')); - - return ( - - - {mode === 'full' && ( -
- {metricTitle} -
- )} -
- {value} -
-
-
- ); -} diff --git a/x-pack/plugins/lens/public/metric_visualization/index.ts b/x-pack/plugins/lens/public/metric_visualization/index.ts index 8740a3af5435c..c96bb59151c20 100644 --- a/x-pack/plugins/lens/public/metric_visualization/index.ts +++ b/x-pack/plugins/lens/public/metric_visualization/index.ts @@ -6,30 +6,20 @@ */ import type { CoreSetup } from 'kibana/public'; -import type { ExpressionsSetup } from '../../../../../src/plugins/expressions/public'; import type { ChartsPluginSetup } from '../../../../../src/plugins/charts/public'; import type { EditorFrameSetup } from '../types'; -import type { FormatFactory } from '../../common'; export interface MetricVisualizationPluginSetupPlugins { - expressions: ExpressionsSetup; - formatFactory: FormatFactory; editorFrame: EditorFrameSetup; charts: ChartsPluginSetup; } export class MetricVisualization { - setup( - core: CoreSetup, - { expressions, formatFactory, editorFrame, charts }: MetricVisualizationPluginSetupPlugins - ) { + setup(core: CoreSetup, { editorFrame, charts }: MetricVisualizationPluginSetupPlugins) { editorFrame.registerVisualization(async () => { - const { getMetricVisualization, getMetricChartRenderer } = await import('../async_services'); + const { getMetricVisualization } = await import('../async_services'); const palettes = await charts.palettes.getPalettes(); - expressions.registerRenderer(() => - getMetricChartRenderer(formatFactory, core.uiSettings, core.theme) - ); return getMetricVisualization({ paletteService: palettes, theme: core.theme }); }); } diff --git a/x-pack/plugins/lens/public/metric_visualization/metric_config_panel/align_options.tsx b/x-pack/plugins/lens/public/metric_visualization/metric_config_panel/align_options.tsx index d97aa08661005..f2b97454df9df 100644 --- a/x-pack/plugins/lens/public/metric_visualization/metric_config_panel/align_options.tsx +++ b/x-pack/plugins/lens/public/metric_visualization/metric_config_panel/align_options.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { i18n } from '@kbn/i18n'; import { EuiButtonGroup } from '@elastic/eui'; -import { MetricState } from '../../../common/expressions'; +import { MetricState } from '../../../common/types'; export interface TitlePositionProps { state: MetricState; diff --git a/x-pack/plugins/lens/public/metric_visualization/metric_config_panel/appearance_options_popover.tsx b/x-pack/plugins/lens/public/metric_visualization/metric_config_panel/appearance_options_popover.tsx index 973c1e0eedf39..280a036ab5daf 100644 --- a/x-pack/plugins/lens/public/metric_visualization/metric_config_panel/appearance_options_popover.tsx +++ b/x-pack/plugins/lens/public/metric_visualization/metric_config_panel/appearance_options_popover.tsx @@ -10,7 +10,7 @@ import { i18n } from '@kbn/i18n'; import { ToolbarPopover, TooltipWrapper } from '../../shared_components'; import { TitlePositionOptions } from './title_position_option'; import { FramePublicAPI } from '../../types'; -import { MetricState } from '../../../common/expressions'; +import type { MetricState } from '../../../common/types'; import { TextFormattingOptions } from './text_formatting_options'; export interface VisualOptionsPopoverProps { diff --git a/x-pack/plugins/lens/public/metric_visualization/metric_config_panel/index.tsx b/x-pack/plugins/lens/public/metric_visualization/metric_config_panel/index.tsx index 5a6566a863a3d..947115fcee5db 100644 --- a/x-pack/plugins/lens/public/metric_visualization/metric_config_panel/index.tsx +++ b/x-pack/plugins/lens/public/metric_visualization/metric_config_panel/index.tsx @@ -8,9 +8,9 @@ import React, { memo } from 'react'; import { EuiFlexGroup, EuiFlexItem, htmlIdGenerator } from '@elastic/eui'; import type { VisualizationToolbarProps } from '../../types'; +import type { MetricState } from '../../../common/types'; import { AppearanceOptionsPopover } from './appearance_options_popover'; -import { MetricState } from '../../../common/expressions'; export const MetricToolbar = memo(function MetricToolbar( props: VisualizationToolbarProps diff --git a/x-pack/plugins/lens/public/metric_visualization/metric_config_panel/size_options.tsx b/x-pack/plugins/lens/public/metric_visualization/metric_config_panel/size_options.tsx index d33d72751a203..17142ab77ab35 100644 --- a/x-pack/plugins/lens/public/metric_visualization/metric_config_panel/size_options.tsx +++ b/x-pack/plugins/lens/public/metric_visualization/metric_config_panel/size_options.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { i18n } from '@kbn/i18n'; import { EuiButtonIcon, EuiSuperSelect } from '@elastic/eui'; -import { MetricState } from '../../../common/expressions'; +import type { MetricState } from '../../../common/types'; export interface TitlePositionProps { state: MetricState; diff --git a/x-pack/plugins/lens/public/metric_visualization/metric_config_panel/text_formatting_options.tsx b/x-pack/plugins/lens/public/metric_visualization/metric_config_panel/text_formatting_options.tsx index 9215d27ebb874..13be9e59ec867 100644 --- a/x-pack/plugins/lens/public/metric_visualization/metric_config_panel/text_formatting_options.tsx +++ b/x-pack/plugins/lens/public/metric_visualization/metric_config_panel/text_formatting_options.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { i18n } from '@kbn/i18n'; import { EuiFormRow, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; -import { MetricState } from '../../../common/expressions'; +import type { MetricState } from '../../../common/types'; import { SizeOptions } from './size_options'; import { AlignOptions } from './align_options'; diff --git a/x-pack/plugins/lens/public/metric_visualization/metric_config_panel/title_position_option.tsx b/x-pack/plugins/lens/public/metric_visualization/metric_config_panel/title_position_option.tsx index c35567bb69537..acaa11f477226 100644 --- a/x-pack/plugins/lens/public/metric_visualization/metric_config_panel/title_position_option.tsx +++ b/x-pack/plugins/lens/public/metric_visualization/metric_config_panel/title_position_option.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { i18n } from '@kbn/i18n'; import { EuiButtonGroup, EuiFormRow } from '@elastic/eui'; -import { MetricState } from '../../../common/expressions'; +import type { MetricState } from '../../../common/types'; export interface TitlePositionProps { state: MetricState; diff --git a/x-pack/plugins/lens/public/metric_visualization/metric_suggestions.ts b/x-pack/plugins/lens/public/metric_visualization/metric_suggestions.ts index f4a97b724ae20..49346c48e9b16 100644 --- a/x-pack/plugins/lens/public/metric_visualization/metric_suggestions.ts +++ b/x-pack/plugins/lens/public/metric_visualization/metric_suggestions.ts @@ -6,7 +6,7 @@ */ import { SuggestionRequest, VisualizationSuggestion, TableSuggestion } from '../types'; -import type { MetricState } from '../../common/expressions'; +import type { MetricState } from '../../common/types'; import { layerTypes } from '../../common'; import { LensIconChartMetric } from '../assets/chart_metric'; import { supportedTypes } from './visualization'; diff --git a/x-pack/plugins/lens/public/metric_visualization/metric_visualization.ts b/x-pack/plugins/lens/public/metric_visualization/metric_visualization.ts index 231b6bacbbe20..78f082b8c0e29 100644 --- a/x-pack/plugins/lens/public/metric_visualization/metric_visualization.ts +++ b/x-pack/plugins/lens/public/metric_visualization/metric_visualization.ts @@ -5,5 +5,4 @@ * 2.0. */ -export * from './expression'; export * from './visualization'; diff --git a/x-pack/plugins/lens/public/metric_visualization/visualization.test.ts b/x-pack/plugins/lens/public/metric_visualization/visualization.test.ts index 83a54e4f1a3cd..c7e01b0c6a137 100644 --- a/x-pack/plugins/lens/public/metric_visualization/visualization.test.ts +++ b/x-pack/plugins/lens/public/metric_visualization/visualization.test.ts @@ -6,7 +6,7 @@ */ import { getMetricVisualization } from './visualization'; -import { MetricState } from '../../common/expressions'; +import type { MetricState } from '../../common/types'; import { layerTypes } from '../../common'; import { createMockDatasource, createMockFramePublicAPI } from '../mocks'; import { generateId } from '../id_generator'; @@ -286,36 +286,93 @@ describe('metric_visualization', () => { "chain": Array [ Object { "arguments": Object { - "accessor": Array [ - "a", + "autoScale": Array [ + true, + ], + "colorFullBackground": Array [ + true, ], "colorMode": Array [ "None", ], - "description": Array [ - "", - ], - "metricTitle": Array [ - "shazm", + "font": Array [ + Object { + "chain": Array [ + Object { + "arguments": Object { + "align": Array [ + "center", + ], + "lHeight": Array [ + 127.5, + ], + "size": Array [ + 85, + ], + "sizeUnit": Array [ + "px", + ], + "weight": Array [ + "600", + ], + }, + "function": "font", + "type": "function", + }, + ], + "type": "expression", + }, ], - "mode": Array [ - "full", - ], - "palette": Array [], - "size": Array [ - "xl", + "labelFont": Array [ + Object { + "chain": Array [ + Object { + "arguments": Object { + "align": Array [ + "center", + ], + "lHeight": Array [ + 40.5, + ], + "size": Array [ + 27, + ], + "sizeUnit": Array [ + "px", + ], + }, + "function": "font", + "type": "function", + }, + ], + "type": "expression", + }, ], - "textAlign": Array [ - "center", + "labelPosition": Array [ + "bottom", ], - "title": Array [ - "", + "metric": Array [ + Object { + "chain": Array [ + Object { + "arguments": Object { + "accessor": Array [ + "a", + ], + }, + "function": "visdimension", + "type": "function", + }, + ], + "type": "expression", + }, ], - "titlePosition": Array [ - "bottom", + "palette": Array [], + "showLabels": Array [ + true, ], }, - "function": "lens_metric_chart", + "function": "metricVis", "type": "function", }, ], diff --git a/x-pack/plugins/lens/public/metric_visualization/visualization.tsx b/x-pack/plugins/lens/public/metric_visualization/visualization.tsx index a3933cfa3a12f..f3a5a17818410 100644 --- a/x-pack/plugins/lens/public/metric_visualization/visualization.tsx +++ b/x-pack/plugins/lens/public/metric_visualization/visualization.tsx @@ -8,23 +8,45 @@ import React from 'react'; import { i18n } from '@kbn/i18n'; import { I18nProvider } from '@kbn/i18n-react'; +import { euiThemeVars } from '@kbn/ui-theme'; import { render } from 'react-dom'; import { Ast } from '@kbn/interpreter'; import { ThemeServiceStart } from 'kibana/public'; import { KibanaThemeProvider } from '../../../../../src/plugins/kibana_react/public'; -import { ColorMode } from '../../../../../src/plugins/charts/common'; +import { + ColorMode, + CustomPaletteState, + PaletteOutput, +} from '../../../../../src/plugins/charts/common'; import { PaletteRegistry } from '../../../../../src/plugins/charts/public'; import { getSuggestions } from './metric_suggestions'; import { LensIconChartMetric } from '../assets/chart_metric'; import { Visualization, OperationMetadata, DatasourcePublicAPI } from '../types'; -import type { MetricConfig, MetricState } from '../../common/expressions'; +import type { MetricState } from '../../common/types'; import { layerTypes } from '../../common'; import { CUSTOM_PALETTE, shiftPalette } from '../shared_components'; import { MetricDimensionEditor } from './dimension_editor'; import { MetricToolbar } from './metric_config_panel'; +interface MetricConfig extends Omit { + title: string; + description: string; + metricTitle: string; + mode: 'reduced' | 'full'; + colorMode: ColorMode; + palette: PaletteOutput; +} + export const supportedTypes = new Set(['string', 'boolean', 'number', 'ip', 'date']); +const getFontSizeAndUnit = (fontSize: string) => { + const [size, sizeUnit] = fontSize.split(/(\d+)/).filter(Boolean); + return { + size: Number(size), + sizeUnit, + }; +}; + const toExpression = ( paletteService: PaletteRegistry, state: MetricState, @@ -56,22 +78,87 @@ const toExpression = ( reverse: false, }; + const fontSizes: Record = { + xs: getFontSizeAndUnit(euiThemeVars.euiFontSizeXS), + s: getFontSizeAndUnit(euiThemeVars.euiFontSizeS), + m: getFontSizeAndUnit(euiThemeVars.euiFontSizeM), + l: getFontSizeAndUnit(euiThemeVars.euiFontSizeL), + xl: getFontSizeAndUnit(euiThemeVars.euiFontSizeXL), + xxl: getFontSizeAndUnit(euiThemeVars.euiFontSizeXXL), + }; + + const labelFont = fontSizes[state?.size || 'xl']; + const labelToMetricFontSizeMap: Record = { + xs: fontSizes.xs.size * 2, + s: fontSizes.m.size * 2.5, + m: fontSizes.l.size * 2.5, + l: fontSizes.xl.size * 2.5, + xl: fontSizes.xxl.size * 2.5, + xxl: fontSizes.xxl.size * 3, + }; + const metricFontSize = labelToMetricFontSizeMap[state?.size || 'xl']; + return { type: 'expression', chain: [ { type: 'function', - function: 'lens_metric_chart', + function: 'metricVis', arguments: { - title: [attributes?.title || ''], - size: [state?.size || 'xl'], - titlePosition: [state?.titlePosition || 'bottom'], - textAlign: [state?.textAlign || 'center'], - description: [attributes?.description || ''], - metricTitle: [operation?.label || ''], - accessor: [state.accessor], - mode: [attributes?.mode || 'full'], + labelPosition: [state?.titlePosition || 'bottom'], + font: [ + { + type: 'expression', + chain: [ + { + type: 'function', + function: 'font', + arguments: { + align: [state?.textAlign || 'center'], + size: [metricFontSize], + weight: ['600'], + lHeight: [metricFontSize * 1.5], + sizeUnit: [labelFont.sizeUnit], + }, + }, + ], + }, + ], + labelFont: [ + { + type: 'expression', + chain: [ + { + type: 'function', + function: 'font', + arguments: { + align: [state?.textAlign || 'center'], + size: [labelFont.size], + lHeight: [labelFont.size * 1.5], + sizeUnit: [labelFont.sizeUnit], + }, + }, + ], + }, + ], + metric: [ + { + type: 'expression', + chain: [ + { + type: 'function', + function: 'visdimension', + arguments: { + accessor: [state.accessor], + }, + }, + ], + }, + ], + showLabels: [!attributes?.mode || attributes?.mode === 'full'], colorMode: !canColor ? [ColorMode.None] : [state?.colorMode || ColorMode.None], + autoScale: [true], + colorFullBackground: [true], palette: state?.colorMode && state?.colorMode !== ColorMode.None ? [paletteService.get(CUSTOM_PALETTE).toExpression(paletteParams)] @@ -81,6 +168,7 @@ const toExpression = ( ], }; }; + export const getMetricVisualization = ({ paletteService, theme, diff --git a/x-pack/plugins/lens/public/types.ts b/x-pack/plugins/lens/public/types.ts index c73c91b1d9640..058d850dee09c 100644 --- a/x-pack/plugins/lens/public/types.ts +++ b/x-pack/plugins/lens/public/types.ts @@ -637,6 +637,7 @@ export interface SuggestionRequest { */ state?: T; mainPalette?: PaletteOutput; + isFromContext?: boolean; /** * The visualization needs to know which table is being suggested */ diff --git a/x-pack/plugins/lens/public/xy_visualization/visualization.test.ts b/x-pack/plugins/lens/public/xy_visualization/visualization.test.ts index 89b496a785d9f..5b430fd7fc579 100644 --- a/x-pack/plugins/lens/public/xy_visualization/visualization.test.ts +++ b/x-pack/plugins/lens/public/xy_visualization/visualization.test.ts @@ -435,6 +435,49 @@ describe('xy_visualization', () => { type: 'palette', }); }); + + it('sets the context configuration correctly for reference lines', () => { + const newContext = { + ...context, + metrics: [ + { + agg: 'static_value', + fieldName: 'document', + isFullReference: true, + color: '#68BC00', + params: { + value: '10', + }, + }, + ], + }; + const state = xyVisualization?.updateLayersConfigurationFromContext?.({ + prevState: { + ...exampleState(), + layers: [ + { + layerId: 'first', + layerType: layerTypes.DATA, + seriesType: 'line', + xAccessor: undefined, + accessors: ['a'], + }, + ], + }, + layerId: 'first', + context: newContext, + }); + expect(state?.layers[0]).toHaveProperty('seriesType', 'area'); + expect(state?.layers[0]).toHaveProperty('layerType', 'referenceLine'); + expect(state?.layers[0].yConfig).toStrictEqual([ + { + axisMode: 'right', + color: '#68BC00', + forAccessor: 'a', + fill: 'below', + }, + ]); + }); }); describe('#getVisualizationSuggestionFromContext', () => { diff --git a/x-pack/plugins/lens/public/xy_visualization/visualization.tsx b/x-pack/plugins/lens/public/xy_visualization/visualization.tsx index 33b285bd19ea3..69349b1de3445 100644 --- a/x-pack/plugins/lens/public/xy_visualization/visualization.tsx +++ b/x-pack/plugins/lens/public/xy_visualization/visualization.tsx @@ -15,6 +15,7 @@ import { FieldFormatsStart } from 'src/plugins/field_formats/public'; import { ThemeServiceStart } from 'kibana/public'; import { KibanaThemeProvider } from '../../../../../src/plugins/kibana_react/public'; import { VIS_EVENT_TO_TRIGGER } from '../../../../../src/plugins/visualizations/public'; +import type { FillStyle } from '../../common/expressions/xy_chart'; import { getSuggestions } from './xy_suggestions'; import { XyToolbar } from './xy_config_panel'; import { DimensionEditor } from './xy_config_panel/dimension_editor'; @@ -290,12 +291,14 @@ export const getXyVisualization = ({ if (!foundLayer) { return prevState; } + const isReferenceLine = metrics.some((metric) => metric.agg === 'static_value'); const axisMode = axisPosition as YAxisMode; const yConfig = metrics.map((metric, idx) => { return { color: metric.color, forAccessor: metric.accessor ?? foundLayer.accessors[idx], ...(axisMode && { axisMode }), + ...(isReferenceLine && { fill: chartType === 'area' ? 'below' : ('none' as FillStyle) }), }; }); const newLayer = { @@ -303,7 +306,8 @@ export const getXyVisualization = ({ ...(chartType && { seriesType: chartType as SeriesType }), ...(palette && { palette }), yConfig, - }; + layerType: isReferenceLine ? layerTypes.REFERENCELINE : layerTypes.DATA, + } as XYLayerConfig; const newLayers = prevState.layers.map((l) => (l.layerId === layerId ? newLayer : l)); diff --git a/x-pack/plugins/lens/public/xy_visualization/xy_suggestions.ts b/x-pack/plugins/lens/public/xy_visualization/xy_suggestions.ts index 656c3fa8422e5..1578442b52815 100644 --- a/x-pack/plugins/lens/public/xy_visualization/xy_suggestions.ts +++ b/x-pack/plugins/lens/public/xy_visualization/xy_suggestions.ts @@ -45,6 +45,7 @@ export function getSuggestions({ keptLayerIds, subVisualizationId, mainPalette, + isFromContext, }: SuggestionRequest): Array> { const incompleteTable = !table.isMultiRow || @@ -72,7 +73,7 @@ export function getSuggestions({ if ( (incompleteTable && state && !subVisualizationId) || - table.columns.some((col) => col.operation.isStaticValue) || + table.columns.some((col) => col.operation.isStaticValue && !isFromContext) || // do not use suggestions with non-numeric metrics table.columns.some((col) => !col.operation.isBucketed && col.operation.dataType !== 'number') ) { diff --git a/x-pack/plugins/lens/server/embeddable/make_lens_embeddable_factory.ts b/x-pack/plugins/lens/server/embeddable/make_lens_embeddable_factory.ts index 39d36a9f306a2..506a5e7688f9a 100644 --- a/x-pack/plugins/lens/server/embeddable/make_lens_embeddable_factory.ts +++ b/x-pack/plugins/lens/server/embeddable/make_lens_embeddable_factory.ts @@ -13,6 +13,7 @@ import { } from '../../../../../src/plugins/kibana_utils/common'; import { DOC_TYPE } from '../../common'; import { + commonEnhanceTableRowHeight, commonMakeReversePaletteAsCustom, commonRemoveTimezoneDateHistogramParam, commonRenameFilterReferences, @@ -26,8 +27,10 @@ import { CustomVisualizationMigrations, LensDocShape713, LensDocShape715, + LensDocShape810, LensDocShapePre712, VisState716, + VisState810, VisStatePre715, } from '../migrations/types'; import { extract, inject } from '../../common/embeddable_factory'; @@ -88,6 +91,14 @@ export const makeLensEmbeddableFactory = attributes: migratedLensState, } as unknown as SerializableRecord; }, + '8.2.0': (state) => { + const lensState = state as unknown as { attributes: LensDocShape810 }; + const migratedLensState = commonEnhanceTableRowHeight(lensState.attributes); + return { + ...lensState, + attributes: migratedLensState, + } as unknown as SerializableRecord; + }, }), getLensCustomVisualizationMigrations(customVisualizationMigrations) ), diff --git a/x-pack/plugins/lens/server/expressions/expressions.ts b/x-pack/plugins/lens/server/expressions/expressions.ts index 1af99ac11e5e3..84e238b3eb15e 100644 --- a/x-pack/plugins/lens/server/expressions/expressions.ts +++ b/x-pack/plugins/lens/server/expressions/expressions.ts @@ -9,7 +9,6 @@ import type { CoreSetup } from 'kibana/server'; import { xyChart, counterRate, - metricChart, yAxisConfig, dataLayerConfig, referenceLineLayerConfig, @@ -38,7 +37,6 @@ export const setupExpressions = ( [ xyChart, counterRate, - metricChart, yAxisConfig, dataLayerConfig, referenceLineLayerConfig, diff --git a/x-pack/plugins/lens/server/migrations/common_migrations.ts b/x-pack/plugins/lens/server/migrations/common_migrations.ts index 39eed3cbc2a35..12ceff5b1e846 100644 --- a/x-pack/plugins/lens/server/migrations/common_migrations.ts +++ b/x-pack/plugins/lens/server/migrations/common_migrations.ts @@ -23,6 +23,8 @@ import { VisStatePost715, VisStatePre715, VisState716, + VisState810, + VisState820, CustomVisualizationMigrations, LensDocShape810, } from './types'; @@ -192,6 +194,20 @@ export const commonRenameFilterReferences = (attributes: LensDocShape715): LensD return newAttributes as LensDocShape810; }; +export const commonEnhanceTableRowHeight = ( + attributes: LensDocShape810 +): LensDocShape810 => { + if (attributes.visualizationType !== 'lnsDatatable') { + return attributes; + } + const visState810 = attributes.state.visualization as VisState810; + const newAttributes = cloneDeep(attributes); + const vizState = newAttributes.state.visualization as VisState820; + vizState.rowHeight = visState810.fitRowToContent ? 'auto' : 'single'; + vizState.rowHeightLines = visState810.fitRowToContent ? 2 : 1; + return newAttributes; +}; + const getApplyCustomVisualizationMigrationToLens = (id: string, migration: MigrateFunction) => { return (savedObject: { attributes: LensDocShape }) => { if (savedObject.attributes.visualizationType !== id) return savedObject; diff --git a/x-pack/plugins/lens/server/migrations/saved_object_migrations.test.ts b/x-pack/plugins/lens/server/migrations/saved_object_migrations.test.ts index 5cd63b2786fe4..a051c24742694 100644 --- a/x-pack/plugins/lens/server/migrations/saved_object_migrations.test.ts +++ b/x-pack/plugins/lens/server/migrations/saved_object_migrations.test.ts @@ -18,6 +18,8 @@ import { VisState716, VisStatePost715, VisStatePre715, + VisState810, + VisState820, } from './types'; import { CustomPaletteParams, layerTypes } from '../../common'; import { PaletteOutput } from 'src/plugins/charts/common'; @@ -1779,4 +1781,122 @@ describe('Lens migrations', () => { ); }); }); + + describe('8.2.0 rename fitRowToContent to new detailed rowHeight and rowHeightLines', () => { + const context = { log: { warning: () => {} } } as unknown as SavedObjectMigrationContext; + function getExample(fitToContent: boolean) { + return { + type: 'lens', + id: 'mocked-saved-object-id', + attributes: { + visualizationType: 'lnsDatatable', + title: 'Lens visualization', + references: [ + { + id: 'ff959d40-b880-11e8-a6d9-e546fe2bba5f', + name: 'indexpattern-datasource-current-indexpattern', + type: 'index-pattern', + }, + { + id: 'ff959d40-b880-11e8-a6d9-e546fe2bba5f', + name: 'indexpattern-datasource-layer-cddd8f79-fb20-4191-a3e7-92484780cc62', + type: 'index-pattern', + }, + ], + state: { + datasourceStates: { + indexpattern: { + layers: { + 'cddd8f79-fb20-4191-a3e7-92484780cc62': { + indexPatternId: 'ff959d40-b880-11e8-a6d9-e546fe2bba5f', + columns: { + '221f0abf-6e54-4c61-9316-4107ad6fa500': { + label: 'Top values of category.keyword', + dataType: 'string', + operationType: 'terms', + scale: 'ordinal', + sourceField: 'category.keyword', + isBucketed: true, + params: { + size: 5, + orderBy: { + type: 'column', + columnId: 'c6f07a26-64eb-4871-ad62-c7d937230e33', + }, + orderDirection: 'desc', + otherBucket: true, + missingBucket: false, + parentFormat: { + id: 'terms', + }, + }, + }, + 'c6f07a26-64eb-4871-ad62-c7d937230e33': { + label: 'Count of records', + dataType: 'number', + operationType: 'count', + isBucketed: false, + scale: 'ratio', + sourceField: '___records___', + }, + }, + columnOrder: [ + '221f0abf-6e54-4c61-9316-4107ad6fa500', + 'c6f07a26-64eb-4871-ad62-c7d937230e33', + ], + incompleteColumns: {}, + }, + }, + }, + }, + visualization: { + columns: [ + { + isTransposed: false, + columnId: '221f0abf-6e54-4c61-9316-4107ad6fa500', + }, + { + isTransposed: false, + columnId: 'c6f07a26-64eb-4871-ad62-c7d937230e33', + }, + ], + layerId: 'cddd8f79-fb20-4191-a3e7-92484780cc62', + layerType: 'data', + fitRowToContent: fitToContent, + }, + filters: [], + query: { + query: '', + language: 'kuery', + }, + }, + }, + } as unknown as SavedObjectUnsanitizedDoc; + } + + it('should migrate enabled fitRowToContent to new rowHeight: "auto"', () => { + const result = migrations['8.2.0'](getExample(true), context) as ReturnType< + SavedObjectMigrationFn, LensDocShape810> + >; + + expect(result.attributes.state.visualization as VisState820).toEqual( + expect.objectContaining({ + rowHeight: 'auto', + }) + ); + }); + + it('should migrate disabled fitRowToContent to new rowHeight: "single"', () => { + const result = migrations['8.2.0'](getExample(false), context) as ReturnType< + SavedObjectMigrationFn, LensDocShape810> + >; + + expect(result.attributes.state.visualization as VisState820).toEqual( + expect.objectContaining({ + rowHeight: 'single', + rowHeightLines: 1, + }) + ); + }); + }); }); diff --git a/x-pack/plugins/lens/server/migrations/saved_object_migrations.ts b/x-pack/plugins/lens/server/migrations/saved_object_migrations.ts index 2617fb42bce09..00c490b4509f9 100644 --- a/x-pack/plugins/lens/server/migrations/saved_object_migrations.ts +++ b/x-pack/plugins/lens/server/migrations/saved_object_migrations.ts @@ -40,6 +40,7 @@ import { getLensCustomVisualizationMigrations, commonRenameRecordsField, fixLensTopValuesCustomFormatting, + commonEnhanceTableRowHeight, } from './common_migrations'; interface LensDocShapePre710 { @@ -464,6 +465,11 @@ const addParentFormatter: SavedObjectMigrationFn = (doc) => { + const newDoc = cloneDeep(doc); + return { ...newDoc, attributes: commonEnhanceTableRowHeight(newDoc.attributes) }; +}; + const lensMigrations: SavedObjectMigrationMap = { '7.7.0': removeInvalidAccessors, // The order of these migrations matter, since the timefield migration relies on the aggConfigs @@ -478,6 +484,7 @@ const lensMigrations: SavedObjectMigrationMap = { '7.15.0': addLayerTypeToVisualization, '7.16.0': moveDefaultReversedPaletteToCustom, '8.1.0': flow(renameFilterReferences, renameRecordsField, addParentFormatter), + '8.2.0': enhanceTableRowHeight, }; export const getAllMigrations = ( diff --git a/x-pack/plugins/lens/server/migrations/types.ts b/x-pack/plugins/lens/server/migrations/types.ts index 7cbb2052dbfff..b3f76d05acfdf 100644 --- a/x-pack/plugins/lens/server/migrations/types.ts +++ b/x-pack/plugins/lens/server/migrations/types.ts @@ -246,3 +246,14 @@ export type VisState716 = | { palette?: PaletteOutput; }; + +// Datatable only +export interface VisState810 { + fitRowToContent?: boolean; +} + +// Datatable only +export interface VisState820 { + rowHeight: 'auto' | 'single' | 'custom'; + rowHeightLines: number; +} diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/components/filter_label.test.tsx b/x-pack/plugins/observability/public/components/shared/exploratory_view/components/filter_label.test.tsx index 097ea89826c38..dab2a82e7c7c9 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/components/filter_label.test.tsx +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/components/filter_label.test.tsx @@ -7,14 +7,14 @@ import React from 'react'; import { fireEvent, screen, waitFor } from '@testing-library/react'; -import { mockAppIndexPattern, mockIndexPattern, mockUxSeries, render } from '../rtl_helpers'; +import { mockAppDataView, mockDataView, mockUxSeries, render } from '../rtl_helpers'; import { FilterLabel } from './filter_label'; import * as useSeriesHook from '../hooks/use_series_filters'; import { buildFilterLabel } from '../../filter_value_label/filter_value_label'; // FLAKY: https://github.com/elastic/kibana/issues/115324 describe.skip('FilterLabel', function () { - mockAppIndexPattern(); + mockAppDataView(); const invertFilter = jest.fn(); jest.spyOn(useSeriesHook, 'useSeriesFilters').mockReturnValue({ @@ -30,7 +30,7 @@ describe.skip('FilterLabel', function () { negate={false} seriesId={0} removeFilter={jest.fn()} - indexPattern={mockIndexPattern} + dataView={mockDataView} series={mockUxSeries} /> ); @@ -55,7 +55,7 @@ describe.skip('FilterLabel', function () { negate={false} seriesId={0} removeFilter={removeFilter} - indexPattern={mockIndexPattern} + dataView={mockDataView} series={mockUxSeries} /> ); @@ -79,7 +79,7 @@ describe.skip('FilterLabel', function () { negate={false} seriesId={0} removeFilter={removeFilter} - indexPattern={mockIndexPattern} + dataView={mockDataView} series={mockUxSeries} /> ); @@ -106,7 +106,7 @@ describe.skip('FilterLabel', function () { negate={true} seriesId={0} removeFilter={jest.fn()} - indexPattern={mockIndexPattern} + dataView={mockDataView} series={mockUxSeries} /> ); @@ -126,7 +126,7 @@ describe.skip('FilterLabel', function () { buildFilterLabel({ field: 'user_agent.name', label: 'Browser family', - indexPattern: mockIndexPattern, + dataView: mockDataView, value: 'Firefox', negate: false, }) diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/components/filter_label.tsx b/x-pack/plugins/observability/public/components/shared/exploratory_view/components/filter_label.tsx index c6254a85de9ac..077e9be4d634a 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/components/filter_label.tsx +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/components/filter_label.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; -import { IndexPattern } from '../../../../../../../../src/plugins/data/public'; +import type { DataView } from '../../../../../../../../src/plugins/data_views/common'; import { useSeriesFilters } from '../hooks/use_series_filters'; import { FilterValueLabel } from '../../filter_value_label/filter_value_label'; import { SeriesUrl } from '../types'; @@ -19,7 +19,7 @@ interface Props { series: SeriesUrl; negate: boolean; definitionFilter?: boolean; - indexPattern: IndexPattern; + dataView: DataView; removeFilter: (field: string, value: string | string[], notVal: boolean) => void; } @@ -30,15 +30,15 @@ export function FilterLabel({ field, value, negate, - indexPattern, + dataView, removeFilter, definitionFilter, }: Props) { const { invertFilter } = useSeriesFilters({ seriesId, series }); - return indexPattern ? ( + return dataView ? ( { if (!definitionFilter) invertFilter(val); diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/default_configs.ts b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/default_configs.ts index 93b3203ad6717..3c3a634af010e 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/default_configs.ts +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/default_configs.ts @@ -6,12 +6,12 @@ */ import { AppDataType, ReportViewType, SeriesConfig } from '../types'; -import { IndexPattern } from '../../../../../../../../src/plugins/data/common'; +import type { DataView } from '../../../../../../../../src/plugins/data_views/common'; import { ReportConfigMap } from '../contexts/exploratory_view_config'; interface Props { reportType: ReportViewType; - indexPattern: IndexPattern; + dataView: DataView; dataType: AppDataType; reportConfigMap: ReportConfigMap; } @@ -19,13 +19,13 @@ interface Props { export const getDefaultConfigs = ({ reportType, dataType, - indexPattern, + dataView, reportConfigMap, }: Props): SeriesConfig => { let configResult: SeriesConfig | undefined; reportConfigMap[dataType]?.some((fn) => { - const config = fn({ indexPattern }); + const config = fn({ dataView }); if (config.reportType === reportType) { configResult = config; } diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/infra_metrics/kpi_over_time_config.ts b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/infra_metrics/kpi_over_time_config.ts index 5111be8f9e39f..56538d252fe3c 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/infra_metrics/kpi_over_time_config.ts +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/infra_metrics/kpi_over_time_config.ts @@ -20,7 +20,7 @@ import { SYSTEM_MEMORY_USAGE, } from '../constants/labels'; -export function getMetricsKPIConfig({ indexPattern }: ConfigProps): SeriesConfig { +export function getMetricsKPIConfig({ dataView }: ConfigProps): SeriesConfig { return { reportType: ReportTypes.KPI, defaultSeriesType: 'area', diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/lens_attributes.test.ts b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/lens_attributes.test.ts index 430cf84c077ca..e2b85fdccc537 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/lens_attributes.test.ts +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/lens_attributes.test.ts @@ -6,7 +6,7 @@ */ import { LayerConfig, LensAttributes } from './lens_attributes'; -import { mockAppIndexPattern, mockIndexPattern } from '../rtl_helpers'; +import { mockAppDataView, mockDataView } from '../rtl_helpers'; import { getDefaultConfigs } from './default_configs'; import { sampleAttribute } from './test_data/sample_attribute'; @@ -21,16 +21,16 @@ import { RECORDS_FIELD, REPORT_METRIC_FIELD, PERCENTILE_RANKS, ReportTypes } fro import { obsvReportConfigMap } from '../obsv_exploratory_view'; describe('Lens Attribute', () => { - mockAppIndexPattern(); + mockAppDataView(); const reportViewConfig = getDefaultConfigs({ reportType: 'data-distribution', dataType: 'ux', - indexPattern: mockIndexPattern, + dataView: mockDataView, reportConfigMap: obsvReportConfigMap, }); - reportViewConfig.baseFilters?.push(...buildExistsFilter('transaction.type', mockIndexPattern)); + reportViewConfig.baseFilters?.push(...buildExistsFilter('transaction.type', mockDataView)); let lnsAttr: LensAttributes; @@ -38,7 +38,7 @@ describe('Lens Attribute', () => { seriesConfig: reportViewConfig, seriesType: 'line', operationType: 'count', - indexPattern: mockIndexPattern, + indexPattern: mockDataView, reportDefinitions: {}, time: { from: 'now-15m', to: 'now' }, color: 'green', @@ -58,7 +58,7 @@ describe('Lens Attribute', () => { const seriesConfigKpi = getDefaultConfigs({ reportType: ReportTypes.KPI, dataType: 'ux', - indexPattern: mockIndexPattern, + dataView: mockDataView, reportConfigMap: obsvReportConfigMap, }); @@ -67,7 +67,7 @@ describe('Lens Attribute', () => { seriesConfig: seriesConfigKpi, seriesType: 'line', operationType: 'count', - indexPattern: mockIndexPattern, + indexPattern: mockDataView, reportDefinitions: { 'service.name': ['elastic-co'] }, time: { from: 'now-15m', to: 'now' }, color: 'green', @@ -83,7 +83,7 @@ describe('Lens Attribute', () => { const seriesConfigKpi = getDefaultConfigs({ reportType: ReportTypes.KPI, dataType: 'ux', - indexPattern: mockIndexPattern, + dataView: mockDataView, reportConfigMap: obsvReportConfigMap, }); @@ -95,7 +95,7 @@ describe('Lens Attribute', () => { from: 'now-1h', to: 'now', }, - indexPattern: mockIndexPattern, + indexPattern: mockDataView, name: 'ux-series-1', breakdown: 'percentile', reportDefinitions: {}, @@ -200,7 +200,7 @@ describe('Lens Attribute', () => { seriesConfig: reportViewConfig, seriesType: 'line', operationType: 'count', - indexPattern: mockIndexPattern, + indexPattern: mockDataView, reportDefinitions: { 'performance.metric': [LCP_FIELD] }, time: { from: 'now-15m', to: 'now' }, color: 'green', @@ -493,7 +493,7 @@ describe('Lens Attribute', () => { seriesConfig: reportViewConfig, seriesType: 'line', operationType: 'count', - indexPattern: mockIndexPattern, + indexPattern: mockDataView, reportDefinitions: { 'performance.metric': [LCP_FIELD] }, breakdown: USER_AGENT_NAME, time: { from: 'now-15m', to: 'now' }, @@ -507,7 +507,7 @@ describe('Lens Attribute', () => { lnsAttr.getBreakdownColumn({ sourceField: USER_AGENT_NAME, layerId: 'layer0', - indexPattern: mockIndexPattern, + indexPattern: mockDataView, labels: layerConfig.seriesConfig.labels, }); @@ -676,14 +676,14 @@ describe('Lens Attribute', () => { describe('Layer Filters', function () { it('should return expected filters', function () { reportViewConfig.baseFilters?.push( - ...buildPhrasesFilter('service.name', ['elastic', 'kibana'], mockIndexPattern) + ...buildPhrasesFilter('service.name', ['elastic', 'kibana'], mockDataView) ); const layerConfig1: LayerConfig = { seriesConfig: reportViewConfig, seriesType: 'line', operationType: 'count', - indexPattern: mockIndexPattern, + indexPattern: mockDataView, reportDefinitions: { 'performance.metric': [LCP_FIELD] }, time: { from: 'now-15m', to: 'now' }, color: 'green', diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/lens_attributes.ts b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/lens_attributes.ts index 1058973a4432d..7f4e1543ce29e 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/lens_attributes.ts +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/lens_attributes.ts @@ -30,7 +30,7 @@ import { CardinalityIndexPatternColumn, } from '../../../../../../lens/public'; import { urlFiltersToKueryString } from '../utils/stringify_kueries'; -import { IndexPattern } from '../../../../../../../../src/plugins/data/common'; +import type { DataView } from '../../../../../../../../src/plugins/data_views/common'; import { FILTER_RECORDS, USE_BREAK_DOWN_COLUMN, @@ -91,7 +91,7 @@ export interface LayerConfig { operationType?: OperationType; reportDefinitions: URLReportDefinition; time: { to: string; from: string }; - indexPattern: IndexPattern; + indexPattern: DataView; // TODO: Figure out if this can be renamed or if it's a Lens requirement selectedMetricField: string; color: string; name: string; @@ -150,7 +150,7 @@ export class LensAttributes { sourceField: string; layerId: string; labels: Record; - indexPattern: IndexPattern; + indexPattern: DataView; }): TermsIndexPatternColumn { const fieldMeta = indexPattern.getFieldByName(sourceField); diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/mobile/device_distribution_config.ts b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/mobile/device_distribution_config.ts index b66709d0e2286..ae534704976e3 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/mobile/device_distribution_config.ts +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/mobile/device_distribution_config.ts @@ -18,7 +18,7 @@ import { SERVICE_NAME } from '../constants/elasticsearch_fieldnames'; import { MOBILE_APP, NUMBER_OF_DEVICES } from '../constants/labels'; import { MobileFields } from './mobile_fields'; -export function getMobileDeviceDistributionConfig({ indexPattern }: ConfigProps): SeriesConfig { +export function getMobileDeviceDistributionConfig({ dataView }: ConfigProps): SeriesConfig { return { reportType: ReportTypes.DEVICE_DISTRIBUTION, defaultSeriesType: 'bar', @@ -36,8 +36,8 @@ export function getMobileDeviceDistributionConfig({ indexPattern }: ConfigProps) filterFields: [...Object.keys(MobileFields), LABEL_FIELDS_FILTER], breakdownFields: Object.keys(MobileFields), baseFilters: [ - ...buildPhraseFilter('agent.name', 'iOS/swift', indexPattern), - ...buildPhraseFilter('processor.event', 'transaction', indexPattern), + ...buildPhraseFilter('agent.name', 'iOS/swift', dataView), + ...buildPhraseFilter('processor.event', 'transaction', dataView), ], labels: { ...FieldLabels, diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/mobile/distribution_config.ts b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/mobile/distribution_config.ts index f2f36f7a22abc..cf3fd0f3d2aab 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/mobile/distribution_config.ts +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/mobile/distribution_config.ts @@ -26,7 +26,7 @@ import { import { CPU_USAGE, SYSTEM_MEMORY_USAGE, MOBILE_APP, RESPONSE_LATENCY } from '../constants/labels'; import { MobileFields } from './mobile_fields'; -export function getMobileKPIDistributionConfig({ indexPattern }: ConfigProps): SeriesConfig { +export function getMobileKPIDistributionConfig({ dataView }: ConfigProps): SeriesConfig { return { reportType: ReportTypes.DISTRIBUTION, defaultSeriesType: 'bar', @@ -43,7 +43,7 @@ export function getMobileKPIDistributionConfig({ indexPattern }: ConfigProps): S filterFields: [...Object.keys(MobileFields), LABEL_FIELDS_FILTER], breakdownFields: Object.keys(MobileFields), baseFilters: [ - ...buildPhrasesFilter('agent.name', ['iOS/swift', 'open-telemetry/swift'], indexPattern), + ...buildPhrasesFilter('agent.name', ['iOS/swift', 'open-telemetry/swift'], dataView), ], labels: { ...FieldLabels, diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/mobile/kpi_over_time_config.ts b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/mobile/kpi_over_time_config.ts index 28dbe74c2b700..4d57ca45eae64 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/mobile/kpi_over_time_config.ts +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/mobile/kpi_over_time_config.ts @@ -32,7 +32,7 @@ import { } from '../constants/labels'; import { MobileFields } from './mobile_fields'; -export function getMobileKPIConfig({ indexPattern }: ConfigProps): SeriesConfig { +export function getMobileKPIConfig({ dataView }: ConfigProps): SeriesConfig { return { reportType: ReportTypes.KPI, defaultSeriesType: 'line', @@ -50,7 +50,7 @@ export function getMobileKPIConfig({ indexPattern }: ConfigProps): SeriesConfig filterFields: [...Object.keys(MobileFields), LABEL_FIELDS_FILTER], breakdownFields: Object.keys(MobileFields), baseFilters: [ - ...buildPhrasesFilter('agent.name', ['iOS/swift', 'open-telemetry/swift'], indexPattern), + ...buildPhrasesFilter('agent.name', ['iOS/swift', 'open-telemetry/swift'], dataView), ], labels: { ...FieldLabels, diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/mobile/mobile_kpi_config.test.ts b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/mobile/mobile_kpi_config.test.ts index b6f9a4f311342..2a7af16c1b9ea 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/mobile/mobile_kpi_config.test.ts +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/mobile/mobile_kpi_config.test.ts @@ -5,16 +5,16 @@ * 2.0. */ -import { mockAppIndexPattern, mockIndexPattern } from '../../rtl_helpers'; +import { mockAppDataView, mockDataView } from '../../rtl_helpers'; import { LensAttributes } from '../lens_attributes'; import { METRIC_SYSTEM_MEMORY_USAGE, SERVICE_NAME } from '../constants/elasticsearch_fieldnames'; import { obsvReportConfigMap } from '../../obsv_exploratory_view'; import { testMobileKPIAttr } from '../test_data/mobile_test_attribute'; import { getLayerConfigs } from '../../hooks/use_lens_attributes'; -import { IndexPatternState } from '../../hooks/use_app_index_pattern'; +import { DataViewState } from '../../hooks/use_app_data_view'; describe('Mobile kpi config test', function () { - mockAppIndexPattern(); + mockAppDataView(); let lnsAttr: LensAttributes; @@ -31,7 +31,7 @@ describe('Mobile kpi config test', function () { ], 'kpi-over-time', {} as any, - { mobile: mockIndexPattern } as IndexPatternState, + { mobile: mockDataView } as DataViewState, obsvReportConfigMap ); diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/rum/core_web_vitals_config.test.ts b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/rum/core_web_vitals_config.test.ts index 0602e37f61a20..a72bfeeb0d806 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/rum/core_web_vitals_config.test.ts +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/rum/core_web_vitals_config.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { mockAppIndexPattern, mockIndexPattern } from '../../rtl_helpers'; +import { mockAppDataView, mockDataView } from '../../rtl_helpers'; import { getDefaultConfigs } from '../default_configs'; import { LayerConfig, LensAttributes } from '../lens_attributes'; import { sampleAttributeCoreWebVital } from '../test_data/sample_attribute_cwv'; @@ -13,12 +13,12 @@ import { LCP_FIELD, SERVICE_NAME, USER_AGENT_OS } from '../constants/elasticsear import { obsvReportConfigMap } from '../../obsv_exploratory_view'; describe('Core web vital config test', function () { - mockAppIndexPattern(); + mockAppDataView(); const seriesConfig = getDefaultConfigs({ reportType: 'core-web-vitals', dataType: 'ux', - indexPattern: mockIndexPattern, + dataView: mockDataView, reportConfigMap: obsvReportConfigMap, }); @@ -29,7 +29,7 @@ describe('Core web vital config test', function () { color: 'green', name: 'test-series', breakdown: USER_AGENT_OS, - indexPattern: mockIndexPattern, + indexPattern: mockDataView, time: { from: 'now-15m', to: 'now' }, reportDefinitions: { [SERVICE_NAME]: ['elastic-co'] }, selectedMetricField: LCP_FIELD, diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/rum/core_web_vitals_config.ts b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/rum/core_web_vitals_config.ts index e5113211e0a62..0583ab390a0ef 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/rum/core_web_vitals_config.ts +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/rum/core_web_vitals_config.ts @@ -35,7 +35,7 @@ import { } from '../constants/elasticsearch_fieldnames'; import { CLS_LABEL, FID_LABEL, LCP_LABEL } from '../constants/labels'; -export function getCoreWebVitalsConfig({ indexPattern }: ConfigProps): SeriesConfig { +export function getCoreWebVitalsConfig({ dataView }: ConfigProps): SeriesConfig { const statusPallete = euiPaletteForStatus(3); return { @@ -87,8 +87,8 @@ export function getCoreWebVitalsConfig({ indexPattern }: ConfigProps): SeriesCon URL_FULL, ], baseFilters: [ - ...buildPhraseFilter(TRANSACTION_TYPE, 'page-load', indexPattern), - ...buildPhraseFilter(PROCESSOR_EVENT, 'transaction', indexPattern), + ...buildPhraseFilter(TRANSACTION_TYPE, 'page-load', dataView), + ...buildPhraseFilter(PROCESSOR_EVENT, 'transaction', dataView), ], labels: { ...FieldLabels, [SERVICE_NAME]: 'Web Application' }, definitionFields: [SERVICE_NAME, SERVICE_ENVIRONMENT], diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/rum/data_distribution_config.ts b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/rum/data_distribution_config.ts index 7796b381423bf..97b6d2ddf7199 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/rum/data_distribution_config.ts +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/rum/data_distribution_config.ts @@ -45,7 +45,7 @@ import { WEB_APPLICATION_LABEL, } from '../constants/labels'; -export function getRumDistributionConfig({ indexPattern }: ConfigProps): SeriesConfig { +export function getRumDistributionConfig({ dataView }: ConfigProps): SeriesConfig { return { reportType: ReportTypes.DISTRIBUTION, defaultSeriesType: 'line', @@ -90,8 +90,8 @@ export function getRumDistributionConfig({ indexPattern }: ConfigProps): SeriesC { label: CLS_LABEL, id: CLS_FIELD, field: CLS_FIELD }, ], baseFilters: [ - ...buildPhraseFilter(TRANSACTION_TYPE, 'page-load', indexPattern), - ...buildPhraseFilter(PROCESSOR_EVENT, 'transaction', indexPattern), + ...buildPhraseFilter(TRANSACTION_TYPE, 'page-load', dataView), + ...buildPhraseFilter(PROCESSOR_EVENT, 'transaction', dataView), ], labels: { ...FieldLabels, diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/rum/kpi_over_time_config.ts b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/rum/kpi_over_time_config.ts index e78a15ed66ea4..4981c5c531551 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/rum/kpi_over_time_config.ts +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/rum/kpi_over_time_config.ts @@ -48,7 +48,7 @@ import { WEB_APPLICATION_LABEL, } from '../constants/labels'; -export function getKPITrendsLensConfig({ indexPattern }: ConfigProps): SeriesConfig { +export function getKPITrendsLensConfig({ dataView }: ConfigProps): SeriesConfig { return { defaultSeriesType: 'bar_stacked', seriesTypes: [], @@ -83,8 +83,8 @@ export function getKPITrendsLensConfig({ indexPattern }: ConfigProps): SeriesCon LABEL_FIELDS_BREAKDOWN, ], baseFilters: [ - ...buildPhraseFilter(TRANSACTION_TYPE, 'page-load', indexPattern), - ...buildPhraseFilter(PROCESSOR_EVENT, 'transaction', indexPattern), + ...buildPhraseFilter(TRANSACTION_TYPE, 'page-load', dataView), + ...buildPhraseFilter(PROCESSOR_EVENT, 'transaction', dataView), ], labels: { ...FieldLabels, [SERVICE_NAME]: WEB_APPLICATION_LABEL }, definitionFields: [SERVICE_NAME, SERVICE_ENVIRONMENT], diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/synthetics/data_distribution_config.ts b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/synthetics/data_distribution_config.ts index fb44da8e4327f..ead75d79582cc 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/synthetics/data_distribution_config.ts +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/synthetics/data_distribution_config.ts @@ -31,10 +31,7 @@ import { } from '../constants/field_names/synthetics'; import { buildExistsFilter } from '../utils'; -export function getSyntheticsDistributionConfig({ - series, - indexPattern, -}: ConfigProps): SeriesConfig { +export function getSyntheticsDistributionConfig({ series, dataView }: ConfigProps): SeriesConfig { return { reportType: ReportTypes.DISTRIBUTION, defaultSeriesType: series?.seriesType || 'line', @@ -61,7 +58,7 @@ export function getSyntheticsDistributionConfig({ baseFilters: [], definitionFields: [ { field: 'monitor.name', nested: 'synthetics.step.name.keyword', singleSelection: true }, - { field: 'url.full', filters: buildExistsFilter('summary.up', indexPattern) }, + { field: 'url.full', filters: buildExistsFilter('summary.up', dataView) }, ], metricOptions: [ { diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/synthetics/kpi_over_time_config.ts b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/synthetics/kpi_over_time_config.ts index 63bd7e0cf3e81..217d34facbf0f 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/synthetics/kpi_over_time_config.ts +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/synthetics/kpi_over_time_config.ts @@ -51,7 +51,7 @@ export const isStepLevelMetric = (metric?: string) => { SYNTHETICS_DOCUMENT_ONLOAD, ].includes(metric); }; -export function getSyntheticsKPIConfig({ indexPattern }: ConfigProps): SeriesConfig { +export function getSyntheticsKPIConfig({ dataView }: ConfigProps): SeriesConfig { return { reportType: ReportTypes.KPI, defaultSeriesType: 'bar_stacked', @@ -78,7 +78,7 @@ export function getSyntheticsKPIConfig({ indexPattern }: ConfigProps): SeriesCon palette: { type: 'palette', name: 'status' }, definitionFields: [ { field: 'monitor.name', nested: SYNTHETICS_STEP_NAME, singleSelection: true }, - { field: 'url.full', filters: buildExistsFilter('summary.up', indexPattern) }, + { field: 'url.full', filters: buildExistsFilter('summary.up', dataView) }, ], metricOptions: [ { diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/test_data/test_index_pattern.json b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/test_data/test_data_view.json similarity index 100% rename from x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/test_data/test_index_pattern.json rename to x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/test_data/test_data_view.json diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/utils.ts b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/utils.ts index 29f751258e02d..e2cd05087188f 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/utils.ts +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/utils.ts @@ -15,7 +15,7 @@ import { } from '@kbn/es-query'; import type { ReportViewType, SeriesUrl, UrlFilter } from '../types'; import type { AllSeries, AllShortSeries } from '../hooks/use_series_storage'; -import { IndexPattern } from '../../../../../../../../src/plugins/data/common'; +import type { DataView } from '../../../../../../../../src/plugins/data_views/common'; import { URL_KEYS } from './constants/url_constants'; import { PersistableFilter } from '../../../../../../lens/common'; @@ -78,17 +78,17 @@ export function createExploratoryViewUrl( ); } -export function buildPhraseFilter(field: string, value: string, indexPattern: IndexPattern) { - const fieldMeta = indexPattern?.fields.find((fieldT) => fieldT.name === field); +export function buildPhraseFilter(field: string, value: string, dataView: DataView) { + const fieldMeta = dataView?.fields.find((fieldT) => fieldT.name === field); if (fieldMeta) { - return [esBuildPhraseFilter(fieldMeta, value, indexPattern)]; + return [esBuildPhraseFilter(fieldMeta, value, dataView)]; } return []; } -export function getQueryFilter(field: string, value: string[], indexPattern: IndexPattern) { - const fieldMeta = indexPattern?.fields.find((fieldT) => fieldT.name === field); - if (fieldMeta && indexPattern.id) { +export function getQueryFilter(field: string, value: string[], dataView: DataView) { + const fieldMeta = dataView?.fields.find((fieldT) => fieldT.name === field); + if (fieldMeta && dataView.id) { return value.map((val) => buildQueryFilter( { @@ -97,7 +97,7 @@ export function getQueryFilter(field: string, value: string[], indexPattern: Ind query: `*${val}*`, }, }, - indexPattern.id!, + dataView.id!, '' ) ); @@ -106,21 +106,21 @@ export function getQueryFilter(field: string, value: string[], indexPattern: Ind return []; } -export function buildPhrasesFilter(field: string, value: string[], indexPattern: IndexPattern) { - const fieldMeta = indexPattern?.fields.find((fieldT) => fieldT.name === field); +export function buildPhrasesFilter(field: string, value: string[], dataView: DataView) { + const fieldMeta = dataView?.fields.find((fieldT) => fieldT.name === field); if (fieldMeta) { if (value.length === 1) { - return [esBuildPhraseFilter(fieldMeta, value[0], indexPattern)]; + return [esBuildPhraseFilter(fieldMeta, value[0], dataView)]; } - return [esBuildPhrasesFilter(fieldMeta, value, indexPattern)]; + return [esBuildPhrasesFilter(fieldMeta, value, dataView)]; } return []; } -export function buildExistsFilter(field: string, indexPattern: IndexPattern) { - const fieldMeta = indexPattern?.fields.find((fieldT) => fieldT.name === field); +export function buildExistsFilter(field: string, dataView: DataView) { + const fieldMeta = dataView?.fields.find((fieldT) => fieldT.name === field); if (fieldMeta) { - return [esBuildExistsFilter(fieldMeta, indexPattern)]; + return [esBuildExistsFilter(fieldMeta, dataView)]; } return []; } @@ -130,34 +130,34 @@ type FiltersType = Array; export function urlFilterToPersistedFilter({ urlFilters, initFilters, - indexPattern, + dataView, }: { urlFilters: UrlFilter[]; initFilters?: FiltersType; - indexPattern: IndexPattern; + dataView: DataView; }) { const parsedFilters: FiltersType = initFilters ? [...initFilters] : []; urlFilters.forEach( ({ field, values = [], notValues = [], wildcards = [], notWildcards = ([] = []) }) => { if (values.length > 0) { - const filter = buildPhrasesFilter(field, values, indexPattern); + const filter = buildPhrasesFilter(field, values, dataView); parsedFilters.push(...filter); } if (notValues.length > 0) { - const filter = buildPhrasesFilter(field, notValues, indexPattern)[0]; + const filter = buildPhrasesFilter(field, notValues, dataView)[0]; filter.meta.negate = true; parsedFilters.push(filter); } if (wildcards.length > 0) { - const filter = getQueryFilter(field, wildcards, indexPattern); + const filter = getQueryFilter(field, wildcards, dataView); parsedFilters.push(...filter); } if (notWildcards.length > 0) { - const filter = getQueryFilter(field, notWildcards, indexPattern)[0]; + const filter = getQueryFilter(field, notWildcards, dataView)[0]; filter.meta.negate = true; parsedFilters.push(filter); } diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/contexts/exploratory_view_config.tsx b/x-pack/plugins/observability/public/components/shared/exploratory_view/contexts/exploratory_view_config.tsx index b7734e675f394..c464e4a536851 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/contexts/exploratory_view_config.tsx +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/contexts/exploratory_view_config.tsx @@ -18,21 +18,21 @@ interface ExploratoryViewContextValue { reportType: ReportViewType | typeof SELECT_REPORT_TYPE; label: string; }>; - indexPatterns: Record; + dataViews: Record; reportConfigMap: ReportConfigMap; setHeaderActionMenu: AppMountParameters['setHeaderActionMenu']; theme$: AppMountParameters['theme$']; } export const ExploratoryViewContext = createContext({ - indexPatterns: {}, + dataViews: {}, } as ExploratoryViewContextValue); export function ExploratoryViewContextProvider({ children, reportTypes, dataTypes, - indexPatterns, + dataViews, reportConfigMap, setHeaderActionMenu, theme$, @@ -40,7 +40,7 @@ export function ExploratoryViewContextProvider({ const value = { reportTypes, dataTypes, - indexPatterns, + dataViews, reportConfigMap, setHeaderActionMenu, theme$, diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/embeddable/embeddable.test.tsx b/x-pack/plugins/observability/public/components/shared/exploratory_view/embeddable/embeddable.test.tsx index a21eeca9dcb45..fbaed83c30549 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/embeddable/embeddable.test.tsx +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/embeddable/embeddable.test.tsx @@ -7,7 +7,7 @@ import React from 'react'; import Embeddable from './embeddable'; import { LensPublicStart } from '../../../../../../lens/public'; -import { IndexPatternState } from '../hooks/use_app_index_pattern'; +import { DataViewState } from '../hooks/use_app_data_view'; import { render } from '../rtl_helpers'; import { AddToCaseAction } from '../header/add_to_case_action'; import { ActionTypes } from './use_actions'; @@ -77,7 +77,7 @@ const mockTimeRange = { }; const mockOwner = 'securitySolution'; const mockAppId = 'securitySolutionUI'; -const mockIndexPatterns = {} as IndexPatternState; +const mockDataViews = {} as DataViewState; const mockReportType = 'kpi-over-time'; const mockTitle = 'mockTitle'; const mockLens = { @@ -110,7 +110,7 @@ describe('Embeddable', () => { caseOwner={mockOwner} customLensAttrs={mockLensAttrs} customTimeRange={mockTimeRange} - indexPatterns={mockIndexPatterns} + indexPatterns={mockDataViews} lens={mockLens} reportType={mockReportType} title={mockTitle} @@ -128,7 +128,7 @@ describe('Embeddable', () => { caseOwner={mockOwner} customLensAttrs={mockLensAttrs} customTimeRange={mockTimeRange} - indexPatterns={mockIndexPatterns} + indexPatterns={mockDataViews} lens={mockLens} reportType={mockReportType} withActions={mockActions} @@ -146,7 +146,7 @@ describe('Embeddable', () => { caseOwner={mockOwner} customLensAttrs={mockLensAttrs} customTimeRange={mockTimeRange} - indexPatterns={mockIndexPatterns} + indexPatterns={mockDataViews} lens={mockLens} reportType={mockReportType} withActions={mockActions} @@ -181,7 +181,7 @@ describe('Embeddable', () => { caseOwner={mockOwner} customLensAttrs={mockLensAttrs} customTimeRange={mockTimeRange} - indexPatterns={mockIndexPatterns} + indexPatterns={mockDataViews} isSingleMetric={true} lens={mockLens} reportType={mockReportType} @@ -213,7 +213,7 @@ describe('Embeddable', () => { caseOwner={mockOwner} customLensAttrs={mockLensAttrs} customTimeRange={mockTimeRange} - indexPatterns={mockIndexPatterns} + indexPatterns={mockDataViews} isSingleMetric={true} lens={mockLens} reportType={mockReportType} diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/embeddable/embeddable.tsx b/x-pack/plugins/observability/public/components/shared/exploratory_view/embeddable/embeddable.tsx index 026f7ab04d68b..84ce40f0fe6c4 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/embeddable/embeddable.tsx +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/embeddable/embeddable.tsx @@ -14,7 +14,7 @@ import { AppDataType, ReportViewType } from '../types'; import { getLayerConfigs } from '../hooks/use_lens_attributes'; import { LensEmbeddableInput, LensPublicStart, XYState } from '../../../../../../lens/public'; import { OperationTypeComponent } from '../series_editor/columns/operation_type_select'; -import { IndexPatternState } from '../hooks/use_app_index_pattern'; +import { DataViewState } from '../hooks/use_app_data_view'; import { ReportConfigMap } from '../contexts/exploratory_view_config'; import { obsvReportConfigMap } from '../obsv_exploratory_view'; import { ActionTypes, useActions } from './use_actions'; @@ -46,7 +46,7 @@ export interface ExploratoryEmbeddableProps { export interface ExploratoryEmbeddableComponentProps extends ExploratoryEmbeddableProps { lens: LensPublicStart; - indexPatterns: IndexPatternState; + indexPatterns: DataViewState; } // eslint-disable-next-line import/no-default-export diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/embeddable/index.tsx b/x-pack/plugins/observability/public/components/shared/exploratory_view/embeddable/index.tsx index 521e7f746fdc9..6e9a2c26580de 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/embeddable/index.tsx +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/embeddable/index.tsx @@ -11,7 +11,7 @@ import { CoreStart } from 'kibana/public'; import type { ExploratoryEmbeddableProps, ExploratoryEmbeddableComponentProps } from './embeddable'; import { ObservabilityDataViews } from '../../../../utils/observability_data_views'; import { ObservabilityPublicPluginsStart } from '../../../../plugin'; -import type { IndexPatternState } from '../hooks/use_app_index_pattern'; +import type { DataViewState } from '../hooks/use_app_data_view'; import { EuiThemeProvider } from '../../../../../../../../src/plugins/kibana_react/common'; import type { AppDataType } from '../types'; @@ -30,7 +30,7 @@ export function getExploratoryViewEmbeddable( plugins: ObservabilityPublicPluginsStart ) { return (props: ExploratoryEmbeddableProps) => { - const [indexPatterns, setIndexPatterns] = useState({} as IndexPatternState); + const [indexPatterns, setIndexPatterns] = useState({} as DataViewState); const [loading, setLoading] = useState(false); const series = props.attributes && props.attributes[0]; diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/exploratory_view.test.tsx b/x-pack/plugins/observability/public/components/shared/exploratory_view/exploratory_view.test.tsx index b1a1b55b7ed1e..5273cc3643cba 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/exploratory_view.test.tsx +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/exploratory_view.test.tsx @@ -7,7 +7,7 @@ import React from 'react'; import { screen } from '@testing-library/dom'; -import { render, mockAppIndexPattern } from './rtl_helpers'; +import { render, mockAppDataView } from './rtl_helpers'; import { ExploratoryView } from './exploratory_view'; import * as obsvDataViews from '../../../utils/observability_data_views/observability_data_views'; import * as pluginHook from '../../../hooks/use_plugin_context'; @@ -19,7 +19,7 @@ jest.spyOn(pluginHook, 'usePluginContext').mockReturnValue({ }, } as any); describe('ExploratoryView', () => { - mockAppIndexPattern(); + mockAppDataView(); beforeEach(() => { const indexPattern = createStubIndexPattern({ diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/exploratory_view.tsx b/x-pack/plugins/observability/public/components/shared/exploratory_view/exploratory_view.tsx index a383bc37880ae..4c48ab292b217 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/exploratory_view.tsx +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/exploratory_view.tsx @@ -22,7 +22,7 @@ import { ObservabilityPublicPluginsStart } from '../../../plugin'; import { useSeriesStorage } from './hooks/use_series_storage'; import { useLensAttributes } from './hooks/use_lens_attributes'; import { TypedLensByValueInput } from '../../../../../lens/public'; -import { useAppIndexPatternContext } from './hooks/use_app_index_pattern'; +import { useAppDataViewContext } from './hooks/use_app_data_view'; import { SeriesViews } from './views/series_views'; import { LensEmbeddable } from './lens_embeddable'; import { EmptyView } from './components/empty_view'; @@ -52,7 +52,7 @@ export function ExploratoryView({ null ); - const { loadIndexPattern, loading } = useAppIndexPatternContext(); + const { loadDataView, loading } = useAppDataViewContext(); const { firstSeries, allSeries, lastRefresh, reportType, setLastRefresh } = useSeriesStorage(); @@ -68,11 +68,11 @@ export function ExploratoryView({ useEffect(() => { allSeries.forEach((seriesT) => { - loadIndexPattern({ + loadDataView({ dataType: seriesT.dataType, }); }); - }, [allSeries, loadIndexPattern]); + }, [allSeries, loadDataView]); useEffect(() => { setLensAttributes(lensAttributesT); diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/hooks/use_app_index_pattern.tsx b/x-pack/plugins/observability/public/components/shared/exploratory_view/hooks/use_app_data_view.tsx similarity index 60% rename from x-pack/plugins/observability/public/components/shared/exploratory_view/hooks/use_app_index_pattern.tsx rename to x-pack/plugins/observability/public/components/shared/exploratory_view/hooks/use_app_data_view.tsx index 7a370bc10d865..e92b0878ba3e9 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/hooks/use_app_index_pattern.tsx +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/hooks/use_app_data_view.tsx @@ -7,7 +7,7 @@ import React, { createContext, useContext, Context, useState, useCallback, useMemo } from 'react'; import { HttpFetchError } from 'kibana/public'; -import { IndexPattern } from '../../../../../../../../src/plugins/data/common'; +import type { DataView } from '../../../../../../../../src/plugins/data_views/common'; import { AppDataType } from '../types'; import { useKibana } from '../../../../../../../../src/plugins/kibana_react/public'; import { ObservabilityPublicPluginsStart } from '../../../../plugin'; @@ -17,40 +17,38 @@ import { useExploratoryView } from '../contexts/exploratory_view_config'; import { DataViewInsufficientAccessError } from '../../../../../../../../src/plugins/data_views/common'; import { getApmDataViewTitle } from '../utils/utils'; -export interface IndexPatternContext { +export interface DataViewContext { loading: boolean; - indexPatterns: IndexPatternState; - indexPatternErrors: IndexPatternErrors; + dataViews: DataViewState; + dataViewErrors: DataViewErrors; hasAppData: HasAppDataState; - loadIndexPattern: (params: { dataType: AppDataType }) => void; + loadDataView: (params: { dataType: AppDataType }) => void; } -export const IndexPatternContext = createContext>({}); +export const DataViewContext = createContext>({}); interface ProviderProps { children: JSX.Element; } type HasAppDataState = Record; -export type IndexPatternState = Record; -export type IndexPatternErrors = Record; +export type DataViewState = Record; +export type DataViewErrors = Record; type LoadingState = Record; -export function IndexPatternContextProvider({ children }: ProviderProps) { +export function DataViewContextProvider({ children }: ProviderProps) { const [loading, setLoading] = useState({} as LoadingState); - const [indexPatterns, setIndexPatterns] = useState({} as IndexPatternState); - const [indexPatternErrors, setIndexPatternErrors] = useState( - {} as IndexPatternErrors - ); + const [dataViews, setDataViews] = useState({} as DataViewState); + const [dataViewErrors, setDataViewErrors] = useState({} as DataViewErrors); const [hasAppData, setHasAppData] = useState({} as HasAppDataState); const { - services: { dataViews }, + services: { dataViews: dataViewsService }, } = useKibana(); - const { indexPatterns: indexPatternsList } = useExploratoryView(); + const { dataViews: dataViewsList } = useExploratoryView(); - const loadIndexPattern: IndexPatternContext['loadIndexPattern'] = useCallback( + const loadDataView: DataViewContext['loadDataView'] = useCallback( async ({ dataType }) => { if (typeof hasAppData[dataType] === 'undefined' && !loading[dataType]) { setLoading((prevState) => ({ ...prevState, [dataType]: true })); @@ -58,8 +56,8 @@ export function IndexPatternContextProvider({ children }: ProviderProps) { try { let hasDataT = false; let indices: string | undefined = ''; - if (indexPatternsList[dataType]) { - indices = indexPatternsList[dataType]; + if (dataViewsList[dataType]) { + indices = dataViewsList[dataType]; hasDataT = true; } switch (dataType) { @@ -84,10 +82,10 @@ export function IndexPatternContextProvider({ children }: ProviderProps) { setHasAppData((prevState) => ({ ...prevState, [dataType]: hasDataT })); if (hasDataT && indices) { - const obsvIndexP = new ObservabilityDataViews(dataViews); - const indPattern = await obsvIndexP.getDataView(dataType, indices); + const obsvDataV = new ObservabilityDataViews(dataViewsService); + const dataV = await obsvDataV.getDataView(dataType, indices); - setIndexPatterns((prevState) => ({ ...prevState, [dataType]: indPattern })); + setDataViews((prevState) => ({ ...prevState, [dataType]: dataV })); } setLoading((prevState) => ({ ...prevState, [dataType]: false })); } catch (e) { @@ -95,48 +93,48 @@ export function IndexPatternContextProvider({ children }: ProviderProps) { e instanceof DataViewInsufficientAccessError || (e as HttpFetchError).body === 'Forbidden' ) { - setIndexPatternErrors((prevState) => ({ ...prevState, [dataType]: e })); + setDataViewErrors((prevState) => ({ ...prevState, [dataType]: e })); } setLoading((prevState) => ({ ...prevState, [dataType]: false })); } } }, - [dataViews, hasAppData, indexPatternsList, loading] + [dataViewsService, hasAppData, dataViewsList, loading] ); return ( - loadingT), }} > {children} - + ); } -export const useAppIndexPatternContext = (dataType?: AppDataType) => { - const { loading, hasAppData, loadIndexPattern, indexPatterns, indexPatternErrors } = useContext( - IndexPatternContext as unknown as Context +export const useAppDataViewContext = (dataType?: AppDataType) => { + const { loading, hasAppData, loadDataView, dataViews, dataViewErrors } = useContext( + DataViewContext as unknown as Context ); - if (dataType && !indexPatterns?.[dataType] && !loading) { - loadIndexPattern({ dataType }); + if (dataType && !dataViews?.[dataType] && !loading) { + loadDataView({ dataType }); } return useMemo(() => { return { hasAppData, loading, - indexPatterns, - indexPatternErrors, - indexPattern: dataType ? indexPatterns?.[dataType] : undefined, + dataViews, + dataViewErrors, + dataView: dataType ? dataViews?.[dataType] : undefined, hasData: dataType ? hasAppData?.[dataType] : undefined, - loadIndexPattern, + loadDataView, }; - }, [dataType, hasAppData, indexPatternErrors, indexPatterns, loadIndexPattern, loading]); + }, [dataType, hasAppData, dataViewErrors, dataViews, loadDataView, loading]); }; diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/hooks/use_discover_link.tsx b/x-pack/plugins/observability/public/components/shared/exploratory_view/hooks/use_discover_link.tsx index eac76cc238ad7..d3a9d16be8c0f 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/hooks/use_discover_link.tsx +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/hooks/use_discover_link.tsx @@ -9,7 +9,7 @@ import { useCallback, useEffect, useState } from 'react'; import { Filter } from '@kbn/es-query'; import { useKibana } from '../../../../utils/kibana_react'; import { SeriesConfig, SeriesUrl } from '../types'; -import { useAppIndexPatternContext } from './use_app_index_pattern'; +import { useAppDataViewContext } from './use_app_data_view'; import { buildExistsFilter, urlFilterToPersistedFilter } from '../configurations/utils'; import { getFiltersFromDefs } from './use_lens_attributes'; import { RECORDS_FIELD, RECORDS_PERCENTAGE_FIELD } from '../configurations/constants'; @@ -25,21 +25,21 @@ export const useDiscoverLink = ({ series, seriesConfig }: UseDiscoverLink) => { application: { navigateToUrl }, } = kServices; - const { indexPatterns } = useAppIndexPatternContext(); + const { dataViews } = useAppDataViewContext(); const locator = kServices.discover?.locator; const [discoverUrl, setDiscoverUrl] = useState(''); useEffect(() => { - const indexPattern = indexPatterns?.[series.dataType]; + const dataView = dataViews?.[series.dataType]; - if (indexPattern) { + if (dataView) { const definitions = series.reportDefinitions ?? {}; const urlFilters = (series.filters ?? []).concat(getFiltersFromDefs(definitions)); const filters = urlFilterToPersistedFilter({ - indexPattern, + dataView, urlFilters, initFilters: seriesConfig?.baseFilters, }) as Filter[]; @@ -51,7 +51,7 @@ export const useDiscoverLink = ({ series, seriesConfig }: UseDiscoverLink) => { selectedMetricField !== RECORDS_FIELD && selectedMetricField !== RECORDS_PERCENTAGE_FIELD ) { - filters.push(buildExistsFilter(selectedMetricField, indexPattern)[0]); + filters.push(buildExistsFilter(selectedMetricField, dataView)[0]); } const getDiscoverUrl = async () => { @@ -59,14 +59,14 @@ export const useDiscoverLink = ({ series, seriesConfig }: UseDiscoverLink) => { const newUrl = await locator.getUrl({ filters, - indexPatternId: indexPattern?.id, + indexPatternId: dataView?.id, }); setDiscoverUrl(newUrl); }; getDiscoverUrl(); } }, [ - indexPatterns, + dataViews, series.dataType, series.filters, series.reportDefinitions, diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/hooks/use_lens_attributes.test.tsx b/x-pack/plugins/observability/public/components/shared/exploratory_view/hooks/use_lens_attributes.test.tsx index 05b86277470a9..d50e2134546c4 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/hooks/use_lens_attributes.test.tsx +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/hooks/use_lens_attributes.test.tsx @@ -11,11 +11,11 @@ import { allSeriesKey, reportTypeKey, UrlStorageContextProvider } from './use_se import { renderHook } from '@testing-library/react-hooks'; import { useLensAttributes } from './use_lens_attributes'; import { ReportTypes } from '../configurations/constants'; -import { mockIndexPattern } from '../rtl_helpers'; +import { mockDataView } from '../rtl_helpers'; import { createKbnUrlStateStorage } from '../../../../../../../../src/plugins/kibana_utils/public'; import { TRANSACTION_DURATION } from '../configurations/constants/elasticsearch_fieldnames'; import * as lensAttributes from '../configurations/lens_attributes'; -import * as indexPattern from './use_app_index_pattern'; +import * as useAppDataViewHook from './use_app_data_view'; import * as theme from '../../../../hooks/use_theme'; import { dataTypes, obsvReportConfigMap, reportTypesList } from '../obsv_exploratory_view'; import { ExploratoryViewContextProvider } from '../contexts/exploratory_view_config'; @@ -35,14 +35,14 @@ const mockSingleSeries = [ describe('useExpViewTimeRange', function () { const storage = createKbnUrlStateStorage({ useHash: false }); // @ts-ignore - jest.spyOn(indexPattern, 'useAppIndexPatternContext').mockReturnValue({ - indexPatterns: { - ux: mockIndexPattern, - apm: mockIndexPattern, - mobile: mockIndexPattern, - infra_logs: mockIndexPattern, - infra_metrics: mockIndexPattern, - synthetics: mockIndexPattern, + jest.spyOn(useAppDataViewHook, 'useAppDataViewContext').mockReturnValue({ + dataViews: { + ux: mockDataView, + apm: mockDataView, + mobile: mockDataView, + infra_logs: mockDataView, + infra_metrics: mockDataView, + synthetics: mockDataView, }, }); jest.spyOn(theme, 'useTheme').mockReturnValue({ @@ -58,7 +58,7 @@ describe('useExpViewTimeRange', function () { { - const indexPattern = indexPatterns?.[series?.dataType]; + const dataView = dataViews?.[series?.dataType]; if ( - indexPattern && + dataView && !isEmpty(series.reportDefinitions) && !series.hidden && series.selectedMetricField ) { const seriesConfig = getDefaultConfigs({ reportType, - indexPattern, + dataView, dataType: series.dataType, reportConfigMap, }); @@ -70,7 +70,7 @@ export function getLayerConfigs( layerConfigs.push({ filters, - indexPattern, + indexPattern: dataView, seriesConfig, time: series.time, name: series.name, @@ -90,7 +90,7 @@ export function getLayerConfigs( export const useLensAttributes = (): TypedLensByValueInput['attributes'] | null => { const { storage, allSeries, lastRefresh, reportType } = useSeriesStorage(); - const { indexPatterns } = useAppIndexPatternContext(); + const { dataViews } = useAppDataViewContext(); const { reportConfigMap } = useExploratoryView(); @@ -101,14 +101,14 @@ export const useLensAttributes = (): TypedLensByValueInput['attributes'] | null const allSeriesT: AllSeries = convertAllShortSeries(storage.get(allSeriesKey) ?? []); const reportTypeT: ReportViewType = storage.get(reportTypeKey) as ReportViewType; - if (isEmpty(indexPatterns) || isEmpty(allSeriesT) || !reportTypeT) { + if (isEmpty(dataViews) || isEmpty(allSeriesT) || !reportTypeT) { return null; } const layerConfigs = getLayerConfigs( allSeriesT, reportTypeT, theme, - indexPatterns, + dataViews, reportConfigMap ); @@ -121,5 +121,5 @@ export const useLensAttributes = (): TypedLensByValueInput['attributes'] | null return lensAttributes.getJSON(); // we also want to check the state on allSeries changes // eslint-disable-next-line react-hooks/exhaustive-deps - }, [indexPatterns, reportType, storage, theme, lastRefresh, allSeries]); + }, [dataViews, reportType, storage, theme, lastRefresh, allSeries]); }; diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/index.tsx b/x-pack/plugins/observability/public/components/shared/exploratory_view/index.tsx index 4fc5293e03723..94954ff5522dc 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/index.tsx +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/index.tsx @@ -12,7 +12,7 @@ import { ExploratoryView } from './exploratory_view'; import { useKibana } from '../../../../../../../src/plugins/kibana_react/public'; import { ObservabilityPublicPluginsStart } from '../../../plugin'; import { useBreadcrumbs } from '../../../hooks/use_breadcrumbs'; -import { IndexPatternContextProvider } from './hooks/use_app_index_pattern'; +import { DataViewContextProvider } from './hooks/use_app_data_view'; import { createKbnUrlStateStorage, withNotifyOnErrors, @@ -73,11 +73,11 @@ export function ExploratoryViewPage({ return ( - + - + ); } diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/obsv_exploratory_view.tsx b/x-pack/plugins/observability/public/components/shared/exploratory_view/obsv_exploratory_view.tsx index 79c37d5bb0b72..a8deb76432672 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/obsv_exploratory_view.tsx +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/obsv_exploratory_view.tsx @@ -101,7 +101,7 @@ export function ObservabilityExploratoryView() { >({ core, kibanaProps, }: MockKibanaProviderProps) { - const indexPattern = mockIndexPattern; + const dataView = mockDataView; setIndexPatterns({ - ...[indexPattern], - get: async () => indexPattern, - } as unknown as IndexPatternsContract); + ...[dataView], + get: async () => dataView, + } as unknown as DataViewsContract); return ( - {children} + {children} @@ -211,7 +214,7 @@ export function render( { return { spy, onRefreshTimeRange }; }; -export const mockAppIndexPattern = (props?: Partial) => { - const loadIndexPattern = jest.fn(); - const spy = jest.spyOn(useAppIndexPatternHook, 'useAppIndexPatternContext').mockReturnValue({ - indexPattern: mockIndexPattern, +export const mockAppDataView = (props?: Partial) => { + const loadDataView = jest.fn(); + const spy = jest.spyOn(useAppDataViewHook, 'useAppDataViewContext').mockReturnValue({ + dataView: mockDataView, hasData: true, loading: false, hasAppData: { ux: true } as any, - loadIndexPattern, - indexPatterns: { ux: mockIndexPattern } as unknown as Record, - indexPatternErrors: {} as any, + loadDataView, + dataViews: { ux: mockDataView } as unknown as Record, + dataViewErrors: {} as any, ...(props || {}), }); - return { spy, loadIndexPattern }; + return { spy, loadDataView }; }; export const mockUseValuesList = (values?: ListItem[]) => { @@ -369,12 +372,12 @@ export const mockHistory = { }, }; -export const mockIndexPattern = createStubIndexPattern({ +export const mockDataView = createStubDataView({ spec: { id: 'apm-*', title: 'apm-*', timeFieldName: '@timestamp', - fields: JSON.parse(indexPatternData.attributes.fields), + fields: JSON.parse(dataViewData.attributes.fields), }, }); diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/breakdown/breakdowns.test.tsx b/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/breakdown/breakdowns.test.tsx index e213a41238123..37a554ba334d1 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/breakdown/breakdowns.test.tsx +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/breakdown/breakdowns.test.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { fireEvent, screen } from '@testing-library/react'; import { Breakdowns } from './breakdowns'; -import { mockIndexPattern, mockUxSeries, render } from '../../rtl_helpers'; +import { mockDataView, mockUxSeries, render } from '../../rtl_helpers'; import { getDefaultConfigs } from '../../configurations/default_configs'; import { RECORDS_FIELD } from '../../configurations/constants'; import { USER_AGENT_OS } from '../../configurations/constants/elasticsearch_fieldnames'; @@ -17,7 +17,7 @@ import { obsvReportConfigMap } from '../../obsv_exploratory_view'; describe('Breakdowns', function () { const dataViewSeries = getDefaultConfigs({ reportType: 'data-distribution', - indexPattern: mockIndexPattern, + dataView: mockDataView, dataType: 'ux', reportConfigMap: obsvReportConfigMap, }); @@ -62,7 +62,7 @@ describe('Breakdowns', function () { it('does not show percentile breakdown for records metrics', function () { const kpiConfig = getDefaultConfigs({ reportType: 'kpi-over-time', - indexPattern: mockIndexPattern, + dataView: mockDataView, dataType: 'ux', reportConfigMap: obsvReportConfigMap, }); diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/breakdown/label_breakdown.tsx b/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/breakdown/label_breakdown.tsx index a5723ccb52648..d85c7fcaad721 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/breakdown/label_breakdown.tsx +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/breakdown/label_breakdown.tsx @@ -9,7 +9,7 @@ import { EuiComboBox, EuiFlexItem } from '@elastic/eui'; import React from 'react'; import { i18n } from '@kbn/i18n'; import { SeriesConfig, SeriesUrl } from '../../types'; -import { useAppIndexPatternContext } from '../../hooks/use_app_index_pattern'; +import { useAppDataViewContext } from '../../hooks/use_app_data_view'; import { useSeriesStorage } from '../../hooks/use_series_storage'; import { LABEL_FIELDS_BREAKDOWN } from '../../configurations/constants'; @@ -19,9 +19,9 @@ interface Props { seriesConfig?: SeriesConfig; } export function LabelsBreakdown({ series, seriesId }: Props) { - const { indexPattern } = useAppIndexPatternContext(series.dataType); + const { dataView } = useAppDataViewContext(series.dataType); - const labelFields = indexPattern?.fields.filter((field) => field.name.startsWith('labels.')); + const labelFields = dataView?.fields.filter((field) => field.name.startsWith('labels.')); const { setSeries } = useSeriesStorage(); diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/data_type_select.test.tsx b/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/data_type_select.test.tsx index 1afe1f979b272..9856cdd527232 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/data_type_select.test.tsx +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/data_type_select.test.tsx @@ -7,7 +7,7 @@ import React from 'react'; import { fireEvent, screen } from '@testing-library/react'; -import { mockAppIndexPattern, mockUxSeries, render } from '../../rtl_helpers'; +import { mockAppDataView, mockUxSeries, render } from '../../rtl_helpers'; import { DataTypesSelect } from './data_type_select'; import { DataTypes } from '../../configurations/constants'; import { DataTypesLabels } from '../../obsv_exploratory_view'; @@ -15,7 +15,7 @@ import { DataTypesLabels } from '../../obsv_exploratory_view'; describe('DataTypeSelect', function () { const seriesId = 0; - mockAppIndexPattern(); + mockAppDataView(); it('should render properly', function () { render(); diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/date_picker_col.tsx b/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/date_picker_col.tsx index b01010e4b81f9..51728d628199f 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/date_picker_col.tsx +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/date_picker_col.tsx @@ -14,7 +14,7 @@ import { DateRangePicker } from '../../components/date_range_picker'; import { SeriesDatePicker } from '../../components/series_date_picker'; import { AppDataType, SeriesUrl } from '../../types'; import { ReportTypes } from '../../configurations/constants'; -import { useAppIndexPatternContext } from '../../hooks/use_app_index_pattern'; +import { useAppDataViewContext } from '../../hooks/use_app_data_view'; import { SyntheticsAddData } from '../../../add_data_buttons/synthetics_add_data'; import { MobileAddData } from '../../../add_data_buttons/mobile_add_data'; import { UXAddData } from '../../../add_data_buttons/ux_add_data'; @@ -36,7 +36,7 @@ const AddDataComponents: Record = { export function DatePickerCol({ seriesId, series }: Props) { const { reportType } = useSeriesStorage(); - const { hasAppData } = useAppIndexPatternContext(); + const { hasAppData } = useAppDataViewContext(); if (!series.dataType) { return null; diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/filter_expanded.test.tsx b/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/filter_expanded.test.tsx index 0a5ac137a7870..d821e65afae04 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/filter_expanded.test.tsx +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/filter_expanded.test.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { fireEvent, screen, waitFor } from '@testing-library/react'; import { FilterExpanded } from './filter_expanded'; -import { mockUxSeries, mockAppIndexPattern, mockUseValuesList, render } from '../../rtl_helpers'; +import { mockUxSeries, mockAppDataView, mockUseValuesList, render } from '../../rtl_helpers'; import { USER_AGENT_NAME } from '../../configurations/constants/elasticsearch_fieldnames'; describe('FilterExpanded', function () { @@ -18,7 +18,7 @@ describe('FilterExpanded', function () { it('render', async () => { const initSeries = { filters }; - mockAppIndexPattern(); + mockAppDataView(); render( ) : ( button diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/incomplete_badge.tsx b/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/incomplete_badge.tsx index 8e64f4bcea680..83319dc48d7df 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/incomplete_badge.tsx +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/incomplete_badge.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { isEmpty } from 'lodash'; import { i18n } from '@kbn/i18n'; import { EuiBadge } from '@elastic/eui'; -import { useAppIndexPatternContext } from '../../hooks/use_app_index_pattern'; +import { useAppDataViewContext } from '../../hooks/use_app_data_view'; import { SeriesConfig, SeriesUrl } from '../../types'; interface Props { @@ -18,7 +18,7 @@ interface Props { } export function IncompleteBadge({ seriesConfig, series }: Props) { - const { loading } = useAppIndexPatternContext(); + const { loading } = useAppDataViewContext(); if (!seriesConfig) { return null; diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/report_definition_col.test.tsx b/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/report_definition_col.test.tsx index 3ec2af4a8c9d2..980c02a0ab153 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/report_definition_col.test.tsx +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/report_definition_col.test.tsx @@ -9,8 +9,8 @@ import { fireEvent, screen, waitFor } from '@testing-library/react'; import React from 'react'; import { getDefaultConfigs } from '../../configurations/default_configs'; import { - mockAppIndexPattern, - mockIndexPattern, + mockAppDataView, + mockDataView, mockUseValuesList, mockUxSeries, render, @@ -19,12 +19,12 @@ import { ReportDefinitionCol } from './report_definition_col'; import { obsvReportConfigMap } from '../../obsv_exploratory_view'; describe('Series Builder ReportDefinitionCol', function () { - mockAppIndexPattern(); + mockAppDataView(); const seriesId = 0; const seriesConfig = getDefaultConfigs({ reportType: 'data-distribution', - indexPattern: mockIndexPattern, + dataView: mockDataView, dataType: 'ux', reportConfigMap: obsvReportConfigMap, }); diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/report_definition_field.tsx b/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/report_definition_field.tsx index 2808dfae83527..b518993a51940 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/report_definition_field.tsx +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/report_definition_field.tsx @@ -9,7 +9,7 @@ import React, { useMemo } from 'react'; import { isEmpty } from 'lodash'; import { ExistsFilter, PhraseFilter } from '@kbn/es-query'; import FieldValueSuggestions from '../../../field_value_suggestions'; -import { useAppIndexPatternContext } from '../../hooks/use_app_index_pattern'; +import { useAppDataViewContext } from '../../hooks/use_app_data_view'; import { ESFilter } from '../../../../../../../../../src/core/types/elasticsearch'; import { PersistableFilter } from '../../../../../../../lens/common'; import { buildPhrasesFilter } from '../../configurations/utils'; @@ -36,7 +36,7 @@ export function ReportDefinitionField({ onChange, filters, }: Props) { - const { indexPattern } = useAppIndexPatternContext(series.dataType); + const { dataView } = useAppDataViewContext(series.dataType); const field = typeof fieldProp === 'string' ? fieldProp : fieldProp.field; @@ -62,10 +62,10 @@ export function ReportDefinitionField({ definitionFields.forEach((fieldObj) => { const fieldT = typeof fieldObj === 'string' ? fieldObj : fieldObj.field; - if (indexPattern && selectedReportDefinitions?.[fieldT] && fieldT !== field) { + if (dataView && selectedReportDefinitions?.[fieldT] && fieldT !== field) { const values = selectedReportDefinitions?.[fieldT]; if (!values.includes(ALL_VALUES_SELECTED)) { - const valueFilter = buildPhrasesFilter(fieldT, values, indexPattern)[0]; + const valueFilter = buildPhrasesFilter(fieldT, values, dataView)[0]; if (valueFilter.query) { filtersN.push(valueFilter.query); } @@ -78,7 +78,7 @@ export function ReportDefinitionField({ // eslint-disable-next-line react-hooks/exhaustive-deps }, [JSON.stringify(selectedReportDefinitions), JSON.stringify(baseFilters)]); - if (!indexPattern) { + if (!dataView) { return null; } @@ -86,7 +86,7 @@ export function ReportDefinitionField({ onChange(field, val)} filters={queryFilters} diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/selected_filters.test.tsx b/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/selected_filters.test.tsx index 9fcf4b14353b9..ef0f7c47d3f67 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/selected_filters.test.tsx +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/selected_filters.test.tsx @@ -7,18 +7,18 @@ import React from 'react'; import { screen, waitFor } from '@testing-library/react'; -import { mockAppIndexPattern, mockIndexPattern, mockUxSeries, render } from '../../rtl_helpers'; +import { mockAppDataView, mockDataView, mockUxSeries, render } from '../../rtl_helpers'; import { SelectedFilters } from './selected_filters'; import { getDefaultConfigs } from '../../configurations/default_configs'; import { USER_AGENT_NAME } from '../../configurations/constants/elasticsearch_fieldnames'; import { obsvReportConfigMap } from '../../obsv_exploratory_view'; describe('SelectedFilters', function () { - mockAppIndexPattern(); + mockAppDataView(); const dataViewSeries = getDefaultConfigs({ reportType: 'data-distribution', - indexPattern: mockIndexPattern, + dataView: mockDataView, dataType: 'ux', reportConfigMap: obsvReportConfigMap, }); diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/selected_filters.tsx b/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/selected_filters.tsx index 5bba0b9dfb3cd..241a9ad13f98d 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/selected_filters.tsx +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/selected_filters.tsx @@ -10,7 +10,7 @@ import { EuiButtonEmpty, EuiFlexGroup, EuiFlexItem, EuiSpacer } from '@elastic/e import { i18n } from '@kbn/i18n'; import { FilterLabel } from '../../components/filter_label'; import { SeriesConfig, SeriesUrl, UrlFilter } from '../../types'; -import { useAppIndexPatternContext } from '../../hooks/use_app_index_pattern'; +import { useAppDataViewContext } from '../../hooks/use_app_data_view'; import { useSeriesFilters } from '../../hooks/use_series_filters'; import { useSeriesStorage } from '../../hooks/use_series_storage'; @@ -28,16 +28,16 @@ export function SelectedFilters({ seriesId, series, seriesConfig }: Props) { const { removeFilter, replaceFilter } = useSeriesFilters({ seriesId, series }); - const { indexPattern } = useAppIndexPatternContext(series.dataType); + const { dataView } = useAppDataViewContext(series.dataType); - if (filters.length === 0 || !indexPattern) { + if (filters.length === 0 || !dataView) { return null; } const btnProps = { seriesId, series, - indexPattern, + dataView, }; return ( diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/series_actions.tsx b/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/series_actions.tsx index b3430da2d35e2..129fdf1cf25e3 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/series_actions.tsx +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/series_actions.tsx @@ -19,7 +19,7 @@ import { i18n } from '@kbn/i18n'; import { useSeriesStorage } from '../../hooks/use_series_storage'; import { SeriesConfig, SeriesUrl } from '../../types'; import { useDiscoverLink } from '../../hooks/use_discover_link'; -import { useAppIndexPatternContext } from '../../hooks/use_app_index_pattern'; +import { useAppDataViewContext } from '../../hooks/use_app_data_view'; interface Props { seriesId: number; @@ -34,9 +34,9 @@ export function SeriesActions({ seriesId, series, seriesConfig, onEditClick }: P const { href: discoverHref } = useDiscoverLink({ series, seriesConfig }); - const { indexPatterns } = useAppIndexPatternContext(); + const { dataViews } = useAppDataViewContext(); - const indexPattern = indexPatterns?.[series.dataType]; + const dataView = dataViews?.[series.dataType]; const deleteDisabled = seriesId === 0 && allSeries.length > 1; const copySeries = () => { @@ -109,7 +109,7 @@ export function SeriesActions({ seriesId, series, seriesConfig, onEditClick }: P icon="discoverApp" href={discoverHref} aria-label={VIEW_SAMPLE_DOCUMENTS_LABEL} - disabled={!series.dataType || !series.selectedMetricField || !indexPattern} + disabled={!series.dataType || !series.selectedMetricField || !dataView} target="_blank" > {VIEW_SAMPLE_DOCUMENTS_LABEL} diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/components/labels_filter.tsx b/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/components/labels_filter.tsx index 6abe2e8f2a7d9..2284b06433e6e 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/components/labels_filter.tsx +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/components/labels_filter.tsx @@ -19,7 +19,7 @@ import { EuiSelectable } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FilterProps } from '../columns/filter_expanded'; -import { useAppIndexPatternContext } from '../../hooks/use_app_index_pattern'; +import { useAppDataViewContext } from '../../hooks/use_app_data_view'; import { FilterValuesList } from './filter_values_list'; import { useFilterValues } from '../use_filter_values'; @@ -28,9 +28,9 @@ export function LabelsFieldFilter(props: FilterProps) { const [query, setQuery] = useState(''); - const { indexPattern } = useAppIndexPatternContext(series.dataType); + const { dataView } = useAppDataViewContext(series.dataType); - const labelFields = indexPattern?.fields.filter((field) => field.name.startsWith('labels.')); + const labelFields = dataView?.fields.filter((field) => field.name.startsWith('labels.')); const [isPopoverOpen, setPopover] = useState(false); diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/expanded_series_row.test.tsx b/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/expanded_series_row.test.tsx index afb1043e9caab..5d70e42808ea9 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/expanded_series_row.test.tsx +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/expanded_series_row.test.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { screen } from '@testing-library/react'; import { ExpandedSeriesRow } from './expanded_series_row'; -import { mockIndexPattern, mockUxSeries, render } from '../rtl_helpers'; +import { mockDataView, mockUxSeries, render } from '../rtl_helpers'; import { getDefaultConfigs } from '../configurations/default_configs'; import { PERCENTILE } from '../configurations/constants'; import { obsvReportConfigMap } from '../obsv_exploratory_view'; @@ -17,7 +17,7 @@ describe('ExpandedSeriesRow', function () { const dataViewSeries = getDefaultConfigs({ reportConfigMap: obsvReportConfigMap, reportType: 'kpi-over-time', - indexPattern: mockIndexPattern, + dataView: mockDataView, dataType: 'ux', }); diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/report_metric_options.test.tsx b/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/report_metric_options.test.tsx index 9d83113f2b524..63725346ba18b 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/report_metric_options.test.tsx +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/report_metric_options.test.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import { mockAppIndexPattern, mockIndexPattern, mockUxSeries, render } from '../rtl_helpers'; +import { mockAppDataView, mockDataView, mockUxSeries, render } from '../rtl_helpers'; import { getDefaultConfigs } from '../configurations/default_configs'; import { PERCENTILE } from '../configurations/constants'; import { ReportMetricOptions } from './report_metric_options'; @@ -18,7 +18,7 @@ describe('ReportMetricOptions', function () { const dataViewSeries = getDefaultConfigs({ dataType: 'ux', reportType: 'kpi-over-time', - indexPattern: mockIndexPattern, + dataView: mockDataView, reportConfigMap: obsvReportConfigMap, }); @@ -31,7 +31,7 @@ describe('ReportMetricOptions', function () { }); it('should display loading if index pattern is not available and is loading', async function () { - mockAppIndexPattern({ loading: true, indexPatterns: undefined }); + mockAppDataView({ loading: true, dataViews: undefined }); const { container } = render( { setSeries(seriesId, { @@ -52,14 +52,14 @@ export function ReportMetricOptions({ seriesId, series, seriesConfig }: Props) { return null; } - const indexPattern = indexPatterns?.[series.dataType]; - const indexPatternError = indexPatternErrors?.[series.dataType]; + const dataView = dataViews?.[series.dataType]; + const dataViewError = dataViewErrors?.[series.dataType]; const options = (metricOptions ?? []).map(({ label, field, id }) => { let disabled = false; if (field !== RECORDS_FIELD && field !== RECORDS_PERCENTAGE_FIELD && field) { - disabled = !Boolean(indexPattern?.getFieldByName(field)); + disabled = !Boolean(dataView?.getFieldByName(field)); } return { disabled, @@ -85,19 +85,19 @@ export function ReportMetricOptions({ seriesId, series, seriesConfig }: Props) { }; }); - if (indexPatternError && !indexPattern && !loading) { + if (dataViewError && !dataView && !loading) { // TODO: Add a link to docs to explain how to add index patterns return ( - {indexPatternError.body?.error === 'Forbidden' || - indexPatternError.name === 'DataViewInsufficientAccessError' + {dataViewError.body?.error === 'Forbidden' || + dataViewError.name === 'DataViewInsufficientAccessError' ? NO_PERMISSIONS - : indexPatternError.body.message} + : dataViewError.body.message} ); } - if (!indexPattern && !loading) { + if (!dataView && !loading) { return {NO_DATA_AVAILABLE}; } @@ -111,7 +111,7 @@ export function ReportMetricOptions({ seriesId, series, seriesConfig }: Props) { onClick={() => setShowOptions((prevState) => !prevState)} fill size="s" - isLoading={!indexPattern && loading} + isLoading={!dataView && loading} buttonRef={focusButton} > {SELECT_REPORT_METRIC_LABEL} @@ -133,7 +133,7 @@ export function ReportMetricOptions({ seriesId, series, seriesConfig }: Props) { )} {series.selectedMetricField && - (indexPattern ? ( + (dataView ? ( ; export const getSeriesToEdit = ({ - indexPatterns, + dataViews, allSeries, reportType, reportConfigMap, }: { allSeries: SeriesContextValue['allSeries']; - indexPatterns: IndexPatternState; + dataViews: DataViewState; reportType: ReportViewType; reportConfigMap: ReportConfigMap; }): BuilderItem[] => { const getDataViewSeries = (dataType: AppDataType) => { - if (indexPatterns?.[dataType]) { + if (dataViews?.[dataType]) { return getDefaultConfigs({ dataType, reportType, reportConfigMap, - indexPattern: indexPatterns[dataType], + dataView: dataViews[dataType], }); } }; @@ -61,7 +61,7 @@ export const SeriesEditor = React.memo(function () { const { getSeries, allSeries, reportType } = useSeriesStorage(); - const { loading, indexPatterns } = useAppIndexPatternContext(); + const { loading, dataViews } = useAppDataViewContext(); const { reportConfigMap } = useExploratoryView(); @@ -88,7 +88,7 @@ export const SeriesEditor = React.memo(function () { const newEditorItems = getSeriesToEdit({ reportType, allSeries, - indexPatterns, + dataViews, reportConfigMap, }); @@ -108,7 +108,7 @@ export const SeriesEditor = React.memo(function () { setItemIdToExpandedRowMap((prevState) => { return { ...prevState, ...newExpandRows }; }); - }, [allSeries, getSeries, indexPatterns, loading, reportConfigMap, reportType]); + }, [allSeries, getSeries, dataViews, loading, reportConfigMap, reportType]); const toggleDetails = (item: BuilderItem) => { const itemIdToExpandedRowMapValues = { ...itemIdToExpandedRowMap }; diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/use_filter_values.ts b/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/use_filter_values.ts index 3a273cc6adc96..848bd6b44ea16 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/use_filter_values.ts +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/use_filter_values.ts @@ -8,7 +8,7 @@ import { ExistsFilter, isExistsFilter } from '@kbn/es-query'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { useValuesList } from '../../../../hooks/use_values_list'; import { FilterProps } from './columns/filter_expanded'; -import { useAppIndexPatternContext } from '../hooks/use_app_index_pattern'; +import { useAppDataViewContext } from '../hooks/use_app_data_view'; import { ESFilter } from '../../../../../../../../src/core/types/elasticsearch'; import { PersistableFilter } from '../../../../../../lens/common'; @@ -16,7 +16,7 @@ export function useFilterValues( { field, series, baseFilters, label }: FilterProps, query?: string ) { - const { indexPatterns } = useAppIndexPatternContext(series.dataType); + const { dataViews } = useAppDataViewContext(series.dataType); const queryFilters: ESFilter[] = []; @@ -36,6 +36,6 @@ export function useFilterValues( time: series.time, keepHistory: true, filters: queryFilters, - indexPatternTitle: indexPatterns[series.dataType]?.title, + dataViewTitle: dataViews[series.dataType]?.title, }); } diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts b/x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts index acd49fc25588e..9fa565e4eae34 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts @@ -17,7 +17,7 @@ import { } from '../../../../../lens/public'; import { PersistableFilter } from '../../../../../lens/common'; -import { IndexPattern } from '../../../../../../../src/plugins/data/public'; +import type { DataView } from '../../../../../../../src/plugins/data_views/common'; export const ReportViewTypes = { dist: 'data-distribution', @@ -102,7 +102,7 @@ export interface UrlFilter { } export interface ConfigProps { - indexPattern: IndexPattern; + dataView: DataView; series?: SeriesUrl; } diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/views/add_series_button.tsx b/x-pack/plugins/observability/public/components/shared/exploratory_view/views/add_series_button.tsx index 4c1bc1d7fe3bb..7199a2c47adee 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/views/add_series_button.tsx +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/views/add_series_button.tsx @@ -12,7 +12,7 @@ import { i18n } from '@kbn/i18n'; import { SeriesUrl, BuilderItem } from '../types'; import { getSeriesToEdit } from '../series_editor/series_editor'; import { NEW_SERIES_KEY, useSeriesStorage } from '../hooks/use_series_storage'; -import { useAppIndexPatternContext } from '../hooks/use_app_index_pattern'; +import { useAppDataViewContext } from '../hooks/use_app_data_view'; import { DEFAULT_TIME, ReportTypes } from '../configurations/constants'; import { useExploratoryView } from '../contexts/exploratory_view_config'; @@ -21,13 +21,13 @@ export function AddSeriesButton() { const addSeriesButtonRef = useRef(null); const { getSeries, allSeries, setSeries, reportType } = useSeriesStorage(); - const { loading, indexPatterns } = useAppIndexPatternContext(); + const { loading, dataViews } = useAppDataViewContext(); const { reportConfigMap } = useExploratoryView(); useEffect(() => { - setEditorItems(getSeriesToEdit({ allSeries, indexPatterns, reportType, reportConfigMap })); - }, [allSeries, getSeries, indexPatterns, loading, reportConfigMap, reportType]); + setEditorItems(getSeriesToEdit({ allSeries, dataViews, reportType, reportConfigMap })); + }, [allSeries, getSeries, dataViews, loading, reportConfigMap, reportType]); const addSeries = () => { const prevSeries = allSeries?.[0]; diff --git a/x-pack/plugins/observability/public/components/shared/field_value_suggestions/index.tsx b/x-pack/plugins/observability/public/components/shared/field_value_suggestions/index.tsx index f2a30f8bee351..2cd8487c57048 100644 --- a/x-pack/plugins/observability/public/components/shared/field_value_suggestions/index.tsx +++ b/x-pack/plugins/observability/public/components/shared/field_value_suggestions/index.tsx @@ -15,7 +15,7 @@ export function FieldValueSuggestions({ fullWidth, sourceField, label, - indexPatternTitle, + dataViewTitle, selectedValue, excludedValue, filters, @@ -41,7 +41,7 @@ export function FieldValueSuggestions({ const [query, setQuery] = useState(''); const { values, loading } = useValuesList({ - indexPatternTitle, + dataViewTitle, query, sourceField, filters, diff --git a/x-pack/plugins/observability/public/components/shared/field_value_suggestions/types.ts b/x-pack/plugins/observability/public/components/shared/field_value_suggestions/types.ts index 95b24aa69b1e7..1ee477e05fbc0 100644 --- a/x-pack/plugins/observability/public/components/shared/field_value_suggestions/types.ts +++ b/x-pack/plugins/observability/public/components/shared/field_value_suggestions/types.ts @@ -33,7 +33,7 @@ interface CommonProps { } export type FieldValueSuggestionsProps = CommonProps & { - indexPatternTitle?: string; + dataViewTitle?: string; sourceField: string; asCombobox?: boolean; onChange: (val?: string[], excludedValue?: string[]) => void; diff --git a/x-pack/plugins/observability/public/components/shared/filter_value_label/filter_value_label.tsx b/x-pack/plugins/observability/public/components/shared/filter_value_label/filter_value_label.tsx index bd3e1d6c8f50d..f7cfe7b848fc9 100644 --- a/x-pack/plugins/observability/public/components/shared/filter_value_label/filter_value_label.tsx +++ b/x-pack/plugins/observability/public/components/shared/filter_value_label/filter_value_label.tsx @@ -8,28 +8,29 @@ import React from 'react'; import { injectI18n } from '@kbn/i18n-react'; import { Filter, buildPhrasesFilter, buildPhraseFilter } from '@kbn/es-query'; -import { FilterItem, IndexPattern } from '../../../../../../../src/plugins/data/public'; +import { FilterItem } from '../../../../../../../src/plugins/data/public'; +import type { DataView } from '../../../../../../../src/plugins/data_views/common'; import { useKibana } from '../../../../../../../src/plugins/kibana_react/public'; export function buildFilterLabel({ field, value, label, - indexPattern, + dataView, negate, }: { label: string; value: string | string[]; negate: boolean; field: string; - indexPattern: IndexPattern; + dataView: DataView; }) { - const indexField = indexPattern.getFieldByName(field)!; + const indexField = dataView.getFieldByName(field)!; const filter = value instanceof Array && value.length > 1 - ? buildPhrasesFilter(indexField, value, indexPattern) - : buildPhraseFilter(indexField, value as string, indexPattern); + ? buildPhrasesFilter(indexField, value, dataView) + : buildPhraseFilter(indexField, value as string, dataView); filter.meta.type = value instanceof Array && value.length > 1 ? 'phrases' : 'phrase'; @@ -49,7 +50,7 @@ export interface FilterValueLabelProps { negate: boolean; removeFilter: (field: string, value: string | string[], notVal: boolean) => void; invertFilter: (val: { field: string; value: string | string[]; negate: boolean }) => void; - indexPattern: IndexPattern; + dataView: DataView; allowExclusion?: boolean; } export function FilterValueLabel({ @@ -57,22 +58,22 @@ export function FilterValueLabel({ field, value, negate, - indexPattern, + dataView, invertFilter, removeFilter, allowExclusion = true, }: FilterValueLabelProps) { const FilterItemI18n = injectI18n(FilterItem); - const filter = buildFilterLabel({ field, value, label, indexPattern, negate }); + const filter = buildFilterLabel({ field, value, label, dataView, negate }); const { services: { uiSettings }, } = useKibana(); - return indexPattern ? ( + return dataView ? ( { diff --git a/x-pack/plugins/observability/public/hooks/use_values_list.ts b/x-pack/plugins/observability/public/hooks/use_values_list.ts index e2268f7b85244..5ab9b41ca6f9a 100644 --- a/x-pack/plugins/observability/public/hooks/use_values_list.ts +++ b/x-pack/plugins/observability/public/hooks/use_values_list.ts @@ -17,7 +17,7 @@ export interface Props { sourceField: string; label: string; query?: string; - indexPatternTitle?: string; + dataViewTitle?: string; filters?: ESFilter[]; time?: { from: string; to: string }; keepHistory?: boolean; @@ -59,7 +59,7 @@ const getIncludeClause = (sourceField: string, query?: string) => { export const useValuesList = ({ sourceField, - indexPatternTitle, + dataViewTitle, query = '', filters, time, @@ -91,7 +91,7 @@ export const useValuesList = ({ const { data, loading } = useEsSearch( createEsParams({ - index: indexPatternTitle!, + index: dataViewTitle!, body: { query: { bool: { @@ -135,7 +135,7 @@ export const useValuesList = ({ }, }, }), - [debouncedQuery, from, to, JSON.stringify(filters), indexPatternTitle, sourceField], + [debouncedQuery, from, to, JSON.stringify(filters), dataViewTitle, sourceField], { name: `get${label.replace(/\s/g, '')}ValuesList` } ); diff --git a/x-pack/plugins/observability/public/utils/observability_data_views/observability_data_views.test.ts b/x-pack/plugins/observability/public/utils/observability_data_views/observability_data_views.test.ts index 0a24f35a498cc..eb7df98da599b 100644 --- a/x-pack/plugins/observability/public/utils/observability_data_views/observability_data_views.test.ts +++ b/x-pack/plugins/observability/public/utils/observability_data_views/observability_data_views.test.ts @@ -6,7 +6,7 @@ */ import { dataViewList, ObservabilityDataViews } from './observability_data_views'; -import { mockCore, mockIndexPattern } from '../../components/shared/exploratory_view/rtl_helpers'; +import { mockCore, mockDataView } from '../../components/shared/exploratory_view/rtl_helpers'; import { SavedObjectNotFound } from '../../../../../../src/plugins/kibana_utils/public'; const fieldFormats = { @@ -116,11 +116,11 @@ describe('ObservabilityIndexPatterns', function () { }); it('should validate field formats', async function () { - mockIndexPattern.getFormatterForField = jest.fn().mockReturnValue({ params: () => {} }); + mockDataView.getFormatterForField = jest.fn().mockReturnValue({ params: () => {} }); const obsv = new ObservabilityDataViews(dataViews!); - await obsv.validateFieldFormats('ux', mockIndexPattern); + await obsv.validateFieldFormats('ux', mockDataView); expect(dataViews?.updateSavedObject).toHaveBeenCalledTimes(1); expect(dataViews?.updateSavedObject).toHaveBeenCalledWith( diff --git a/x-pack/plugins/reporting/common/errors/errors.test.ts b/x-pack/plugins/reporting/common/errors/errors.test.ts index e0cc86a40d373..37210373f4d68 100644 --- a/x-pack/plugins/reporting/common/errors/errors.test.ts +++ b/x-pack/plugins/reporting/common/errors/errors.test.ts @@ -5,17 +5,23 @@ * 2.0. */ -import { AuthenticationExpiredError } from '.'; +import * as errors from '.'; describe('ReportingError', () => { it('provides error code when stringified', () => { - expect(new AuthenticationExpiredError() + '').toBe( - `ReportingError(code: authentication_expired)` + expect(new errors.AuthenticationExpiredError() + '').toBe( + `ReportingError(code: authentication_expired_error)` ); }); it('provides details if there are any and error code when stringified', () => { - expect(new AuthenticationExpiredError('some details') + '').toBe( - `ReportingError(code: authentication_expired) "some details"` + expect(new errors.AuthenticationExpiredError('some details') + '').toBe( + `ReportingError(code: authentication_expired_error) "some details"` ); }); + it('has the expected code structure', () => { + const { ReportingError: _, ...nonAbstractErrors } = errors; + Object.values(nonAbstractErrors).forEach((Ctor) => { + expect(new Ctor().code).toMatch(/^[a-z_]+_error$/); + }); + }); }); diff --git a/x-pack/plugins/reporting/common/errors/index.ts b/x-pack/plugins/reporting/common/errors/index.ts index 6064eca33ed7b..0e84fa854f386 100644 --- a/x-pack/plugins/reporting/common/errors/index.ts +++ b/x-pack/plugins/reporting/common/errors/index.ts @@ -9,6 +9,12 @@ import { i18n } from '@kbn/i18n'; export abstract class ReportingError extends Error { + /** + * A string that uniquely brands an error type. This is used to power telemetry + * about reporting failures. + * + * @note Convention for codes: lower-case, snake-case and end in `_error`. + */ public abstract code: string; constructor(public details?: string) { @@ -32,7 +38,7 @@ export abstract class ReportingError extends Error { * access token expired. */ export class AuthenticationExpiredError extends ReportingError { - code = 'authentication_expired'; + code = 'authentication_expired_error'; } export class QueueTimeoutError extends ReportingError { @@ -59,7 +65,9 @@ export class PdfWorkerOutOfMemoryError extends ReportingError { } } -// TODO: Add ReportingError for Kibana stopping unexpectedly -// TODO: Add ReportingError for missing Chromium dependencies +export class KibanaShuttingDownError extends ReportingError { + code = 'kibana_shutting_down_error'; +} + // TODO: Add ReportingError for missing Chromium dependencies // TODO: Add ReportingError for Chromium not starting for an unknown reason diff --git a/x-pack/plugins/reporting/server/config/create_config.test.ts b/x-pack/plugins/reporting/server/config/create_config.test.ts index f839d72e1a45d..498281c56424f 100644 --- a/x-pack/plugins/reporting/server/config/create_config.test.ts +++ b/x-pack/plugins/reporting/server/config/create_config.test.ts @@ -76,6 +76,16 @@ describe('Reporting server createConfig$', () => { expect(result).toMatchInlineSnapshot(` Object { + "capture": Object { + "loadDelay": 1, + "maxAttempts": 1, + "timeouts": Object { + "openUrl": 100, + "renderComplete": 100, + "waitForElements": 100, + }, + "zoom": 1, + }, "csv": Object {}, "encryptionKey": "iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii", "index": ".reporting", diff --git a/x-pack/plugins/reporting/server/core.ts b/x-pack/plugins/reporting/server/core.ts index a4e4f43f90e1e..ee50b99e5b3b7 100644 --- a/x-pack/plugins/reporting/server/core.ts +++ b/x-pack/plugins/reporting/server/core.ts @@ -82,6 +82,8 @@ export class ReportingCore { public getContract: () => ReportingSetup; + private kibanaShuttingDown$ = new Rx.ReplaySubject(1); + constructor(private logger: Logger, context: PluginInitializerContext) { this.packageInfo = context.env.packageInfo; const syncConfig = context.config.get(); @@ -129,6 +131,14 @@ export class ReportingCore { await Promise.all([executeTask.init(taskManager), monitorTask.init(taskManager)]); } + public pluginStop() { + this.kibanaShuttingDown$.next(); + } + + public getKibanaShutdown$(): Rx.Observable { + return this.kibanaShuttingDown$.pipe(take(1)); + } + private async assertKibanaIsAvailable(): Promise { const { status } = this.getPluginSetupDeps(); diff --git a/x-pack/plugins/reporting/server/export_types/csv_searchsource/generate_csv/generate_csv.test.ts b/x-pack/plugins/reporting/server/export_types/csv_searchsource/generate_csv/generate_csv.test.ts index 66ee465ea142f..37ec0d400f473 100644 --- a/x-pack/plugins/reporting/server/export_types/csv_searchsource/generate_csv/generate_csv.test.ts +++ b/x-pack/plugins/reporting/server/export_types/csv_searchsource/generate_csv/generate_csv.test.ts @@ -847,7 +847,7 @@ describe('error codes', () => { ); const { error_code: errorCode, warnings } = await generateCsv.generateData(); - expect(errorCode).toBe('authentication_expired'); + expect(errorCode).toBe('authentication_expired_error'); expect(warnings).toMatchInlineSnapshot(` Array [ "This report contains partial CSV results because the authentication token expired. Export a smaller amount of data or increase the timeout of the authentication token.", diff --git a/x-pack/plugins/reporting/server/lib/tasks/execute_report.test.ts b/x-pack/plugins/reporting/server/lib/tasks/execute_report.test.ts index b47df99b7a0fd..9f016a6a54a10 100644 --- a/x-pack/plugins/reporting/server/lib/tasks/execute_report.test.ts +++ b/x-pack/plugins/reporting/server/lib/tasks/execute_report.test.ts @@ -9,6 +9,8 @@ import { loggingSystemMock } from 'src/core/server/mocks'; import { ReportingCore } from '../..'; import { RunContext } from '../../../../task_manager/server'; import { taskManagerMock } from '../../../../task_manager/server/mocks'; +import { KibanaShuttingDownError } from '../../../common/errors'; +import type { SavedReport } from '../store'; import { ReportingConfigType } from '../../config'; import { createMockConfigSchema, createMockReportingCore } from '../../test_helpers'; import { ExecuteReportTask } from './'; @@ -79,4 +81,45 @@ describe('Execute Report Task', () => { } `); }); + + it('throws during reporting if Kibana starts shutting down', async () => { + mockReporting.getExportTypesRegistry().register({ + id: 'noop', + name: 'Noop', + createJobFnFactory: () => async () => new Promise(() => {}), + runTaskFnFactory: () => async () => new Promise(() => {}), + jobContentExtension: 'none', + jobType: 'noop', + validLicenses: [], + }); + const store = await mockReporting.getStore(); + store.setReportFailed = jest.fn(() => Promise.resolve({} as any)); + const task = new ExecuteReportTask(mockReporting, configType, logger); + task._claimJob = jest.fn(() => + Promise.resolve({ _id: 'test', jobtype: 'noop', status: 'pending' } as SavedReport) + ); + const mockTaskManager = taskManagerMock.createStart(); + await task.init(mockTaskManager); + + const taskDef = task.getTaskDefinition(); + const taskRunner = taskDef.createTaskRunner({ + taskInstance: { + id: 'random-task-id', + params: { index: 'cool-reporting-index', id: 'noop', jobtype: 'noop', payload: {} }, + }, + } as unknown as RunContext); + + const taskPromise = taskRunner.run(); + setImmediate(() => { + mockReporting.pluginStop(); + }); + await taskPromise; + + expect(store.setReportFailed).toHaveBeenCalledWith( + expect.anything(), + expect.objectContaining({ + output: expect.objectContaining({ error_code: new KibanaShuttingDownError().code }), + }) + ); + }); }); diff --git a/x-pack/plugins/reporting/server/lib/tasks/execute_report.ts b/x-pack/plugins/reporting/server/lib/tasks/execute_report.ts index 4d4959eef00c4..9007f5701f6f9 100644 --- a/x-pack/plugins/reporting/server/lib/tasks/execute_report.ts +++ b/x-pack/plugins/reporting/server/lib/tasks/execute_report.ts @@ -20,7 +20,12 @@ import type { TaskRunCreatorFunction, } from '../../../../task_manager/server'; import { CancellationToken } from '../../../common/cancellation_token'; -import { QueueTimeoutError, ReportingError, UnknownError } from '../../../common/errors'; +import { + ReportingError, + UnknownError, + QueueTimeoutError, + KibanaShuttingDownError, +} from '../../../common/errors'; import { durationToNumber, numberToDuration } from '../../../common/schema_utils'; import type { ReportOutput } from '../../../common/types'; import type { ReportingConfigType } from '../../config'; @@ -288,6 +293,12 @@ export class ExecuteReportTask implements ReportingTask { return report; } + // Generic is used to let TS infer the return type at call site. + private async throwIfKibanaShutsDown(): Promise { + await this.reporting.getKibanaShutdown$().toPromise(); + throw new KibanaShuttingDownError(); + } + /* * Provides a TaskRunner for Task Manager */ @@ -361,7 +372,10 @@ export class ExecuteReportTask implements ReportingTask { eventLog.logExecutionStart(); - const output = await this._performJob(task, cancellationToken, stream); + const output = await Promise.race([ + this._performJob(task, cancellationToken, stream), + this.throwIfKibanaShutsDown(), + ]); stream.end(); diff --git a/x-pack/plugins/reporting/server/plugin.ts b/x-pack/plugins/reporting/server/plugin.ts index 37d6494f5e079..52a72e7139020 100644 --- a/x-pack/plugins/reporting/server/plugin.ts +++ b/x-pack/plugins/reporting/server/plugin.ts @@ -113,4 +113,8 @@ export class ReportingPlugin return reportingCore.getContract(); } + + stop() { + this.reportingCore?.pluginStop(); + } } diff --git a/x-pack/plugins/reporting/server/test_helpers/create_mock_reportingplugin.ts b/x-pack/plugins/reporting/server/test_helpers/create_mock_reportingplugin.ts index e00ebd99f0420..414d3dd10f8ff 100644 --- a/x-pack/plugins/reporting/server/test_helpers/create_mock_reportingplugin.ts +++ b/x-pack/plugins/reporting/server/test_helpers/create_mock_reportingplugin.ts @@ -119,6 +119,16 @@ export const createMockConfigSchema = ( enabled: false, ...overrides.roles, }, + capture: { + maxAttempts: 1, + loadDelay: 1, + timeouts: { + openUrl: 100, + renderComplete: 100, + waitForElements: 100, + }, + zoom: 1, + }, } as ReportingConfigType; }; diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index 412b3706f278c..b314e0c88e686 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -468,7 +468,6 @@ "xpack.lens.indexPattern.fieldItem.visualizeGeoFieldLinkText": "Mapsで可視化", "xpack.lens.indexPattern.fieldItemTooltip": "可視化するには、ドラッグアンドドロップします。", "xpack.lens.indexPattern.fieldNoOperation": "フィールド{field}は演算なしで使用できません", - "xpack.lens.indexPattern.fieldNotFound": "フィールド {invalidField} が見つかりませんでした", "xpack.lens.indexPattern.fieldPanelEmptyStringValue": "空の文字列", "xpack.lens.indexPattern.fieldPlaceholder": "フィールド", "xpack.lens.indexPattern.fieldStatsButtonAriaLabel": "プレビュー{fieldName}:{fieldType}", @@ -480,7 +479,6 @@ "xpack.lens.indexPattern.fieldStatsNoData": "このフィールドは空です。500件のサンプリングされたドキュメントに存在しません。このフィールドを構成に追加すると、空白のグラフが作成される場合があります。", "xpack.lens.indexPattern.fieldTimeDistributionLabel": "時間分布", "xpack.lens.indexPattern.fieldTopValuesLabel": "トップの値", - "xpack.lens.indexPattern.fieldWrongType": "フィールド{invalidField}の型が正しくありません", "xpack.lens.indexPattern.filterBy.clickToEdit": "クリックして編集", "xpack.lens.indexPattern.filterBy.emptyFilterQuery": "(空)", "xpack.lens.indexPattern.filterBy.label": "フィルタリング条件", @@ -713,19 +711,13 @@ "xpack.lens.layerPanel.missingDataView": "データビューが見つかりません", "xpack.lens.legacyUrlConflict.objectNoun": "レンズビジュアライゼーション", "xpack.lens.lensSavedObjectLabel": "レンズビジュアライゼーション", - "xpack.lens.metric.accessor.help": "値が表示されている列", "xpack.lens.metric.addLayer": "ビジュアライゼーションレイヤーを追加", - "xpack.lens.metric.colorMode.help": "色を変更するメトリックの部分", "xpack.lens.metric.dynamicColoring.background": "塗りつぶし", "xpack.lens.metric.dynamicColoring.label": "値別の色", "xpack.lens.metric.dynamicColoring.none": "なし", "xpack.lens.metric.dynamicColoring.text": "テキスト", "xpack.lens.metric.groupLabel": "目標値と単一の値", "xpack.lens.metric.label": "メトリック", - "xpack.lens.metric.metricTitle.help": "表示されるメトリックのタイトル。", - "xpack.lens.metric.mode.help": "グラフの表示モード。減らすと、最小サイズ内でメトリックのみが表示されます", - "xpack.lens.metric.palette.help": "値の色を指定します", - "xpack.lens.metric.title.help": "グラフタイトル。", "xpack.lens.pageTitle": "レンズ", "xpack.lens.paletteHeatmapGradient.customize": "編集", "xpack.lens.paletteHeatmapGradient.customizeLong": "パレットを編集", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 0b97869ad0a4a..3797f746d4103 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -473,7 +473,6 @@ "xpack.lens.indexPattern.fieldItem.visualizeGeoFieldLinkText": "在 Maps 中可视化", "xpack.lens.indexPattern.fieldItemTooltip": "拖放以可视化。", "xpack.lens.indexPattern.fieldNoOperation": "没有运算,无法使用字段 {field}", - "xpack.lens.indexPattern.fieldNotFound": "未找到字段 {invalidField}", "xpack.lens.indexPattern.fieldPanelEmptyStringValue": "空字符串", "xpack.lens.indexPattern.fieldPlaceholder": "字段", "xpack.lens.indexPattern.fieldStatsButtonAriaLabel": "预览 {fieldName}:{fieldType}", @@ -485,7 +484,6 @@ "xpack.lens.indexPattern.fieldStatsNoData": "此字段为空,因为它不存在于 500 个采样文档中。将此字段添加到配置可能会导致空图表。", "xpack.lens.indexPattern.fieldTimeDistributionLabel": "时间分布", "xpack.lens.indexPattern.fieldTopValuesLabel": "排名最前值", - "xpack.lens.indexPattern.fieldWrongType": "字段 {invalidField} 的类型不正确", "xpack.lens.indexPattern.filterBy.clickToEdit": "单击以编辑", "xpack.lens.indexPattern.filterBy.emptyFilterQuery": "(空)", "xpack.lens.indexPattern.filterBy.label": "筛选依据", @@ -719,19 +717,13 @@ "xpack.lens.layerPanel.missingDataView": "找不到数据视图", "xpack.lens.legacyUrlConflict.objectNoun": "Lens 可视化", "xpack.lens.lensSavedObjectLabel": "Lens 可视化", - "xpack.lens.metric.accessor.help": "正显示值的列", "xpack.lens.metric.addLayer": "添加可视化图层", - "xpack.lens.metric.colorMode.help": "指标的哪部分要上色", "xpack.lens.metric.dynamicColoring.background": "填充", "xpack.lens.metric.dynamicColoring.label": "按值上色", "xpack.lens.metric.dynamicColoring.none": "无", "xpack.lens.metric.dynamicColoring.text": "文本", "xpack.lens.metric.groupLabel": "目标值和单值", "xpack.lens.metric.label": "指标", - "xpack.lens.metric.metricTitle.help": "显示的指标标题。", - "xpack.lens.metric.mode.help": "图表的显示模式 - 缩减模式将仅显示指标本身,无最小大小", - "xpack.lens.metric.palette.help": "为值提供颜色", - "xpack.lens.metric.title.help": "图标标题。", "xpack.lens.pageTitle": "Lens", "xpack.lens.paletteHeatmapGradient.customize": "编辑", "xpack.lens.paletteHeatmapGradient.customizeLong": "编辑调色板", diff --git a/x-pack/plugins/uptime/e2e/config.ts b/x-pack/plugins/uptime/e2e/config.ts index 48b4e048000f2..08cc1d960d044 100644 --- a/x-pack/plugins/uptime/e2e/config.ts +++ b/x-pack/plugins/uptime/e2e/config.ts @@ -57,7 +57,11 @@ async function config({ readConfigFile }: FtrConfigProviderContext) { `--elasticsearch.password=changeme`, '--xpack.reporting.enabled=false', `--xpack.uptime.service.manifestUrl=${manifestUrl}`, - `--xpack.uptime.service.username=${serviceUsername}`, + `--xpack.uptime.service.username=${ + process.env.SYNTHETICS_REMOTE_ENABLED + ? serviceUsername + : 'localKibanaIntegrationTestsUser' + }`, `--xpack.uptime.service.password=${servicPassword}`, '--xpack.uptime.ui.monitorManagement.enabled=true', ], diff --git a/x-pack/plugins/uptime/e2e/journeys/monitor_management.journey.ts b/x-pack/plugins/uptime/e2e/journeys/monitor_management.journey.ts index d89c9da043e4f..1d6270c00df65 100644 --- a/x-pack/plugins/uptime/e2e/journeys/monitor_management.journey.ts +++ b/x-pack/plugins/uptime/e2e/journeys/monitor_management.journey.ts @@ -5,6 +5,7 @@ * 2.0. */ +import uuid from 'uuid'; import { journey, step, expect, before, after, Page } from '@elastic/synthetics'; import { monitorManagementPageProvider } from '../page_objects/monitor_management'; import { DataStream } from '../../common/runtime_types/monitor_management'; @@ -16,10 +17,10 @@ const basicMonitorDetails = { location: customLocation || 'US Central', schedule: '3', }; -const httpName = 'http monitor'; -const icmpName = 'icmp monitor'; -const tcpName = 'tcp monitor'; -const browserName = 'browser monitor'; +const httpName = `http monitor ${uuid.v4()}`; +const icmpName = `icmp monitor ${uuid.v4()}`; +const tcpName = `tcp monitor ${uuid.v4()}`; +const browserName = `browser monitor ${uuid.v4()}`; const configuration = { [DataStream.HTTP]: { @@ -156,7 +157,7 @@ Object.keys(configuration).forEach((type) => { journey('Monitor Management breadcrumbs', async ({ page, params }: { page: Page; params: any }) => { const uptime = monitorManagementPageProvider({ page, kibanaUrl: params.kibanaUrl }); const defaultMonitorDetails = { - name: 'Sample monitor', + name: `Sample monitor ${uuid.v4()}`, location: 'US Central', schedule: '3', apmServiceName: 'service', diff --git a/x-pack/plugins/uptime/public/components/monitor_management/action_bar/action_bar.tsx b/x-pack/plugins/uptime/public/components/monitor_management/action_bar/action_bar.tsx index f54031766be8e..8a2e669129114 100644 --- a/x-pack/plugins/uptime/public/components/monitor_management/action_bar/action_bar.tsx +++ b/x-pack/plugins/uptime/public/components/monitor_management/action_bar/action_bar.tsx @@ -69,7 +69,7 @@ export const ActionBar = ({ }); }, [monitor, monitorId, isValid, isSaving]); - const hasErrors = data && Object.keys(data).length; + const hasErrors = data && 'attributes' in data && data.attributes.errors?.length > 0; const loading = status === FETCH_STATUS.LOADING; const handleOnSave = useCallback(() => { @@ -103,7 +103,7 @@ export const ActionBar = ({ }); setIsSuccessful(true); } else if (hasErrors && !loading) { - Object.values(data!).forEach((location) => { + Object.values(data.attributes.errors!).forEach((location) => { const { status: responseStatus, reason } = location.error || {}; kibanaService.toasts.addWarning({ title: i18n.translate('xpack.uptime.monitorManagement.service.error.title', { diff --git a/x-pack/plugins/uptime/public/components/monitor_management/action_bar/action_bar_errors.test.tsx b/x-pack/plugins/uptime/public/components/monitor_management/action_bar/action_bar_errors.test.tsx index 1a882e5027313..88520b8761ae7 100644 --- a/x-pack/plugins/uptime/public/components/monitor_management/action_bar/action_bar_errors.test.tsx +++ b/x-pack/plugins/uptime/public/components/monitor_management/action_bar/action_bar_errors.test.tsx @@ -52,10 +52,14 @@ describe(' Service Errors', () => { it('Handles service errors', async () => { jest.spyOn(kibana.kibanaService.toasts, 'addWarning').mockImplementation(toast); useFetcher.mockReturnValue({ - data: [ - { locationId: 'us_central', error: { reason: 'Invalid config', status: 400 } }, - { locationId: 'us_central', error: { reason: 'Cannot schedule', status: 500 } }, - ], + data: { + attributes: { + errors: [ + { locationId: 'us_central', error: { reason: 'Invalid config', status: 400 } }, + { locationId: 'us_central', error: { reason: 'Cannot schedule', status: 500 } }, + ], + }, + }, status: FETCH_STATUS.SUCCESS, refetch: () => {}, }); diff --git a/x-pack/plugins/uptime/public/components/overview/alerts/monitor_expressions/filters_expression_select.tsx b/x-pack/plugins/uptime/public/components/overview/alerts/monitor_expressions/filters_expression_select.tsx index e10e9267df184..0e083d1fcd679 100644 --- a/x-pack/plugins/uptime/public/components/overview/alerts/monitor_expressions/filters_expression_select.tsx +++ b/x-pack/plugins/uptime/public/components/overview/alerts/monitor_expressions/filters_expression_select.tsx @@ -134,7 +134,7 @@ export const FiltersExpressionsSelect: React.FC = { diff --git a/x-pack/plugins/uptime/public/components/overview/filter_group/filter_group.tsx b/x-pack/plugins/uptime/public/components/overview/filter_group/filter_group.tsx index 06c080cc659fc..e25e764390f6b 100644 --- a/x-pack/plugins/uptime/public/components/overview/filter_group/filter_group.tsx +++ b/x-pack/plugins/uptime/public/components/overview/filter_group/filter_group.tsx @@ -57,7 +57,7 @@ export const FilterGroup = () => { { ...selectedItems.map((value) => ( { onChange( field, @@ -51,7 +51,7 @@ export const SelectedFilters = ({ onChange }: Props) => { ...excludedItems.map((value) => ( { onChange( field, diff --git a/x-pack/plugins/uptime/public/state/api/monitor_management.ts b/x-pack/plugins/uptime/public/state/api/monitor_management.ts index 206ba07dc4c23..00a033ec51b7a 100644 --- a/x-pack/plugins/uptime/public/state/api/monitor_management.ts +++ b/x-pack/plugins/uptime/public/state/api/monitor_management.ts @@ -24,7 +24,7 @@ export const setMonitor = async ({ }: { monitor: SyntheticsMonitor; id?: string; -}): Promise => { +}): Promise<{ attributes: { errors: ServiceLocationErrors } } | SyntheticsMonitor> => { if (id) { return await apiService.put(`${API_URLS.SYNTHETICS_MONITORS}/${id}`, monitor); } else { diff --git a/x-pack/plugins/uptime/server/lib/synthetics_service/get_service_locations.ts b/x-pack/plugins/uptime/server/lib/synthetics_service/get_service_locations.ts index e746dafdb55d5..f1af840aac72f 100644 --- a/x-pack/plugins/uptime/server/lib/synthetics_service/get_service_locations.ts +++ b/x-pack/plugins/uptime/server/lib/synthetics_service/get_service_locations.ts @@ -8,13 +8,25 @@ import axios from 'axios'; import { ManifestLocation, + ServiceLocation, Locations, ServiceLocationsApiResponse, } from '../../../common/runtime_types'; import { UptimeServerSetup } from '../adapters/framework'; +export const getDevLocation = (devUrl: string): ServiceLocation => ({ + id: 'localhost', + label: 'Local Synthetics Service', + geo: { lat: 0, lon: 0 }, + url: devUrl, +}); + export async function getServiceLocations(server: UptimeServerSetup) { - const locations: Locations = []; + let locations: Locations = []; + + if (process.env.NODE_ENV !== 'production' && server.config.service?.devUrl) { + locations = [getDevLocation(server.config.service.devUrl)]; + } if (!server.config.service?.manifestUrl) { return { locations }; diff --git a/x-pack/plugins/uptime/server/lib/synthetics_service/service_api_client.ts b/x-pack/plugins/uptime/server/lib/synthetics_service/service_api_client.ts index 1e82ef77e083b..14c5a2ebb5959 100644 --- a/x-pack/plugins/uptime/server/lib/synthetics_service/service_api_client.ts +++ b/x-pack/plugins/uptime/server/lib/synthetics_service/service_api_client.ts @@ -32,7 +32,6 @@ export interface ServiceData { export class ServiceAPIClient { private readonly username?: string; - private readonly devUrl?: string; private readonly authorization: string; public locations: ServiceLocations; private logger: Logger; @@ -41,9 +40,8 @@ export class ServiceAPIClient { constructor(logger: Logger, config: ServiceConfig, kibanaVersion: string) { this.config = config; - const { username, password, devUrl } = config; + const { username, password } = config; this.username = username; - this.devUrl = devUrl; this.kibanaVersion = kibanaVersion; if (username && password) { @@ -61,8 +59,10 @@ export class ServiceAPIClient { if (config.tls && config.tls.certificate && config.tls.key) { const tlsConfig = new SslConfig(config.tls); + const rejectUnauthorized = process.env.NODE_ENV === 'production'; + return new https.Agent({ - rejectUnauthorized: true, // (NOTE: this will disable client verification) + rejectUnauthorized, cert: tlsConfig.certificate, key: tlsConfig.key, }); @@ -102,13 +102,14 @@ export class ServiceAPIClient { return axios({ method, - url: (this.devUrl ?? url) + (runOnce ? '/run' : '/monitors'), + url: url + (runOnce ? '/run' : '/monitors'), data: { monitors: monitorsStreams, output, stack_version: this.kibanaVersion }, - headers: this.authorization - ? { - Authorization: this.authorization, - } - : undefined, + headers: + process.env.NODE_ENV !== 'production' && this.authorization + ? { + Authorization: this.authorization, + } + : undefined, httpsAgent: this.getHttpsAgent(), }); }; diff --git a/x-pack/plugins/uptime/server/lib/synthetics_service/synthetics_service.ts b/x-pack/plugins/uptime/server/lib/synthetics_service/synthetics_service.ts index acf3c0df49164..11dcf1973b41c 100644 --- a/x-pack/plugins/uptime/server/lib/synthetics_service/synthetics_service.ts +++ b/x-pack/plugins/uptime/server/lib/synthetics_service/synthetics_service.ts @@ -64,6 +64,8 @@ export class SyntheticsService { this.esHosts = getEsHosts({ config: this.config, cloud: server.cloud }); this.locations = []; + + this.registerServiceLocations(); } public init() { @@ -103,6 +105,14 @@ export class SyntheticsService { } } + public registerServiceLocations() { + const service = this; + getServiceLocations(service.server).then((result) => { + service.locations = result.locations; + service.apiClient.locations = result.locations; + }); + } + public registerSyncTask(taskManager: TaskManagerSetupContract) { const service = this; @@ -121,11 +131,7 @@ export class SyntheticsService { const { state } = taskInstance; service.setupIndexTemplates(); - - getServiceLocations(service.server).then((result) => { - service.locations = result.locations; - service.apiClient.locations = result.locations; - }); + service.registerServiceLocations(); await service.pushConfigs(); diff --git a/x-pack/plugins/uptime/server/rest_api/synthetics_service/add_monitor.ts b/x-pack/plugins/uptime/server/rest_api/synthetics_service/add_monitor.ts index 29c2210efd20a..ee3ef1fe6380c 100644 --- a/x-pack/plugins/uptime/server/rest_api/synthetics_service/add_monitor.ts +++ b/x-pack/plugins/uptime/server/rest_api/synthetics_service/add_monitor.ts @@ -54,10 +54,12 @@ export const addSyntheticsMonitorRoute: UMRestApiRouteFactory = () => ({ formatTelemetryEvent({ monitor: newMonitor, errors, kibanaVersion: server.kibanaVersion }) ); - if (errors) { - return errors; + if (errors && errors.length > 0) { + return response.ok({ + body: { message: 'error pushing monitor to the service', attributes: { errors } }, + }); } - return newMonitor; + return response.ok({ body: newMonitor }); }, }); diff --git a/x-pack/plugins/uptime/server/rest_api/synthetics_service/delete_monitor.ts b/x-pack/plugins/uptime/server/rest_api/synthetics_service/delete_monitor.ts index bbdb6818b3f6a..6d744a7a1a406 100644 --- a/x-pack/plugins/uptime/server/rest_api/synthetics_service/delete_monitor.ts +++ b/x-pack/plugins/uptime/server/rest_api/synthetics_service/delete_monitor.ts @@ -46,8 +46,10 @@ export const deleteSyntheticsMonitorRoute: UMRestApiRouteFactory = () => ({ formatTelemetryDeleteEvent(monitor, server.kibanaVersion, new Date().toISOString(), errors) ); - if (errors) { - return errors; + if (errors && errors.length > 0) { + return response.ok({ + body: { message: 'error pushing monitor to the service', attributes: { errors } }, + }); } return monitorId; diff --git a/x-pack/plugins/uptime/server/rest_api/synthetics_service/edit_monitor.ts b/x-pack/plugins/uptime/server/rest_api/synthetics_service/edit_monitor.ts index d8a6ec85e770e..6170bdd72ac36 100644 --- a/x-pack/plugins/uptime/server/rest_api/synthetics_service/edit_monitor.ts +++ b/x-pack/plugins/uptime/server/rest_api/synthetics_service/edit_monitor.ts @@ -78,8 +78,10 @@ export const editSyntheticsMonitorRoute: UMRestApiRouteFactory = () => ({ ); // Return service sync errors in OK response - if (errors) { - return errors; + if (errors && errors.length > 0) { + return response.ok({ + body: { message: 'error pushing monitor to the service', attributes: { errors } }, + }); } return editMonitor; diff --git a/x-pack/plugins/ux/public/components/app/rum_dashboard/local_uifilters/index.tsx b/x-pack/plugins/ux/public/components/app/rum_dashboard/local_uifilters/index.tsx index b472258704e5d..766e4d6f5baa5 100644 --- a/x-pack/plugins/ux/public/components/app/rum_dashboard/local_uifilters/index.tsx +++ b/x-pack/plugins/ux/public/components/app/rum_dashboard/local_uifilters/index.tsx @@ -110,7 +110,7 @@ function LocalUIFilters() { ( { onChange( name, diff --git a/x-pack/plugins/ux/public/components/app/rum_dashboard/local_uifilters/selected_wildcards.tsx b/x-pack/plugins/ux/public/components/app/rum_dashboard/local_uifilters/selected_wildcards.tsx index 8a104b1ae9bd0..46257605a22ce 100644 --- a/x-pack/plugins/ux/public/components/app/rum_dashboard/local_uifilters/selected_wildcards.tsx +++ b/x-pack/plugins/ux/public/components/app/rum_dashboard/local_uifilters/selected_wildcards.tsx @@ -47,7 +47,7 @@ export function SelectedWildcards({ indexPattern }: Props) { return searchTerm ? ( { updateSearchTerm(''); }} diff --git a/x-pack/test/api_integration/apis/maps/migrations.js b/x-pack/test/api_integration/apis/maps/migrations.js index a5199ad987ca0..5ea24b5d25fc9 100644 --- a/x-pack/test/api_integration/apis/maps/migrations.js +++ b/x-pack/test/api_integration/apis/maps/migrations.js @@ -77,7 +77,7 @@ export default function ({ getService }) { } expect(panels.length).to.be(1); expect(panels[0].type).to.be('map'); - expect(panels[0].version).to.be('8.1.0'); + expect(panels[0].version).to.be('8.2.0'); }); }); }); diff --git a/x-pack/test/apm_api_integration/common/utils/create_and_run_apm_ml_job.ts b/x-pack/test/apm_api_integration/common/utils/create_and_run_apm_ml_job.ts new file mode 100644 index 0000000000000..bd03493039b49 --- /dev/null +++ b/x-pack/test/apm_api_integration/common/utils/create_and_run_apm_ml_job.ts @@ -0,0 +1,38 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import job from '../../../../plugins/ml/server/models/data_recognizer/modules/apm_transaction/ml/apm_tx_metrics.json'; +import datafeed from '../../../../plugins/ml/server/models/data_recognizer/modules/apm_transaction/ml/datafeed_apm_tx_metrics.json'; +import { MlApi } from '../../../functional/services/ml/api'; + +export function createAndRunApmMlJob({ ml, environment }: { ml: MlApi; environment: string }) { + return ml.createAndRunAnomalyDetectionLookbackJob( + // @ts-expect-error not entire job config + { + ...job, + job_id: `apm-tx-metrics-${environment}`, + allow_lazy_open: false, + custom_settings: { + job_tags: { + apm_ml_version: '3', + environment, + }, + }, + }, + { + ...datafeed, + job_id: `apm-tx-metrics-${environment}`, + indices: ['apm-*'], + datafeed_id: `apm-tx-metrics-${environment}-datafeed`, + query: { + bool: { + filter: [...datafeed.query.bool.filter, { term: { 'service.environment': environment } }], + }, + }, + } + ); +} diff --git a/x-pack/test/apm_api_integration/tests/anomalies/anomaly_charts.spec.ts b/x-pack/test/apm_api_integration/tests/anomalies/anomaly_charts.spec.ts index 00bdc258fb40f..e06c519a978ab 100644 --- a/x-pack/test/apm_api_integration/tests/anomalies/anomaly_charts.spec.ts +++ b/x-pack/test/apm_api_integration/tests/anomalies/anomaly_charts.spec.ts @@ -10,10 +10,9 @@ import { range, omit } from 'lodash'; import { apm, timerange } from '@elastic/apm-synthtrace'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { ApmApiError } from '../../common/apm_api_supertest'; -import job from '../../../../plugins/ml/server/models/data_recognizer/modules/apm_transaction/ml/apm_tx_metrics.json'; -import datafeed from '../../../../plugins/ml/server/models/data_recognizer/modules/apm_transaction/ml/datafeed_apm_tx_metrics.json'; import { ServiceAnomalyTimeseries } from '../../../../plugins/apm/common/anomaly_detection/service_anomaly_timeseries'; import { ApmMlDetectorType } from '../../../../plugins/apm/common/anomaly_detection/apm_ml_detectors'; +import { createAndRunApmMlJob } from '../../common/utils/create_and_run_apm_ml_job'; export default function ApiTest({ getService }: FtrProviderContext) { const registry = getService('registry'); @@ -169,62 +168,8 @@ export default function ApiTest({ getService }: FtrProviderContext) { describe('with ml jobs', () => { before(async () => { await Promise.all([ - ml.createAndRunAnomalyDetectionLookbackJob( - // @ts-expect-error not entire job config - { - ...job, - job_id: 'apm-tx-metrics-prod', - allow_lazy_open: false, - custom_settings: { - job_tags: { - apm_ml_version: '3', - environment: 'production', - }, - }, - }, - { - ...datafeed, - job_id: 'apm-tx-metrics-prod', - indices: ['apm-*'], - datafeed_id: 'apm-tx-metrics-prod-datafeed', - query: { - bool: { - filter: [ - ...datafeed.query.bool.filter, - { term: { 'service.environment': 'production' } }, - ], - }, - }, - } - ), - ml.createAndRunAnomalyDetectionLookbackJob( - // @ts-expect-error not entire job config - { - ...job, - job_id: 'apm-tx-metrics-development', - allow_lazy_open: false, - custom_settings: { - job_tags: { - apm_ml_version: '3', - environment: 'development', - }, - }, - }, - { - ...datafeed, - job_id: 'apm-tx-metrics-development', - indices: ['apm-*'], - datafeed_id: 'apm-tx-metrics-development-datafeed', - query: { - bool: { - filter: [ - ...datafeed.query.bool.filter, - { term: { 'service.environment': 'development' } }, - ], - }, - }, - } - ), + createAndRunApmMlJob({ environment: 'production', ml }), + createAndRunApmMlJob({ environment: 'development', ml }), ]); }); @@ -288,7 +233,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { expect(omitTimeseriesData(latencySeries)).to.eql({ type: ApmMlDetectorType.txLatency, - jobId: 'apm-tx-metrics-prod', + jobId: 'apm-tx-metrics-production', serviceName: 'a', environment: 'production', transactionType: 'request', @@ -297,7 +242,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { expect(omitTimeseriesData(throughputSeries)).to.eql({ type: ApmMlDetectorType.txThroughput, - jobId: 'apm-tx-metrics-prod', + jobId: 'apm-tx-metrics-production', serviceName: 'a', environment: 'production', transactionType: 'request', @@ -306,7 +251,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { expect(omitTimeseriesData(failureRateSeries)).to.eql({ type: ApmMlDetectorType.txFailureRate, - jobId: 'apm-tx-metrics-prod', + jobId: 'apm-tx-metrics-production', serviceName: 'a', environment: 'production', transactionType: 'request', diff --git a/x-pack/test/apm_api_integration/tests/services/sorted_and_filtered_services.spec.ts b/x-pack/test/apm_api_integration/tests/services/sorted_and_filtered_services.spec.ts new file mode 100644 index 0000000000000..b529ab36c5637 --- /dev/null +++ b/x-pack/test/apm_api_integration/tests/services/sorted_and_filtered_services.spec.ts @@ -0,0 +1,157 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import { ValuesType } from 'utility-types'; +import { apm, timerange } from '@elastic/apm-synthtrace'; +import expect from '@kbn/expect'; +import { FtrProviderContext } from '../../common/ftr_provider_context'; +import { createAndRunApmMlJob } from '../../common/utils/create_and_run_apm_ml_job'; + +export default function ApiTest({ getService }: FtrProviderContext) { + const registry = getService('registry'); + const synthtraceClient = getService('synthtraceEsClient'); + const apmApiClient = getService('apmApiClient'); + const ml = getService('ml'); + + const start = '2021-01-01T12:00:00.000Z'; + const end = '2021-08-01T12:00:00.000Z'; + + // the terms enum API will return names for deleted services, + // so we add a prefix to make sure we don't get data from other + // tests + const SERVICE_NAME_PREFIX = 'sorted_and_filtered_'; + + async function getSortedAndFilteredServices({ + environment = 'ENVIRONMENT_ALL', + kuery = '', + }: { environment?: string; kuery?: string } = {}) { + const response = await apmApiClient.readUser({ + endpoint: 'GET /internal/apm/sorted_and_filtered_services', + params: { + query: { + start, + end, + environment, + kuery, + }, + }, + }); + + return response.body.services + .filter((service) => service.serviceName.startsWith(SERVICE_NAME_PREFIX)) + .map((service) => ({ + ...service, + serviceName: service.serviceName.replace(SERVICE_NAME_PREFIX, ''), + })); + } + + type ServiceListItem = ValuesType>>; + + registry.when( + 'Sorted and filtered services', + { config: 'trial', archives: ['apm_mappings_only_8.0.0'] }, + () => { + before(async () => { + const serviceA = apm.service(SERVICE_NAME_PREFIX + 'a', 'production', 'java').instance('a'); + + const serviceB = apm.service(SERVICE_NAME_PREFIX + 'b', 'development', 'go').instance('b'); + + const serviceC = apm.service(SERVICE_NAME_PREFIX + 'c', 'development', 'go').instance('c'); + + const spikeStart = new Date('2021-01-07T12:00:00.000Z').getTime(); + const spikeEnd = new Date('2021-01-07T14:00:00.000Z').getTime(); + + const eventsWithinTimerange = timerange(new Date(start).getTime(), new Date(end).getTime()) + .interval('15m') + .rate(1) + .spans((timestamp) => { + const isInSpike = spikeStart <= timestamp && spikeEnd >= timestamp; + return [ + ...serviceA + .transaction('GET /api') + .duration(isInSpike ? 1000 : 1100) + .timestamp(timestamp) + .serialize(), + ...serviceB + .transaction('GET /api') + .duration(isInSpike ? 1000 : 4000) + .timestamp(timestamp) + .serialize(), + ]; + }); + + const eventsOutsideOfTimerange = timerange( + new Date('2021-01-01T00:00:00.000Z').getTime(), + new Date(start).getTime() - 1 + ) + .interval('15m') + .rate(1) + .spans((timestamp) => { + return serviceC + .transaction('GET /api', 'custom') + .duration(1000) + .timestamp(timestamp) + .serialize(); + }); + + await synthtraceClient.index(eventsWithinTimerange.concat(eventsOutsideOfTimerange)); + + await Promise.all([ + createAndRunApmMlJob({ environment: 'production', ml }), + createAndRunApmMlJob({ environment: 'development', ml }), + ]); + }); + + after(() => { + return Promise.all([synthtraceClient.clean(), ml.cleanMlIndices()]); + }); + + describe('with no kuery or environment are set', () => { + let items: ServiceListItem[]; + + before(async () => { + items = await getSortedAndFilteredServices(); + }); + + it('returns services based on the terms enum API and ML data', () => { + const serviceNames = items.map((item) => item.serviceName); + + expect(serviceNames.sort()).to.eql(['a', 'b', 'c']); + }); + }); + + describe('with kuery set', () => { + let items: ServiceListItem[]; + + before(async () => { + items = await getSortedAndFilteredServices({ + kuery: 'service.name:*', + }); + }); + + it('does not return any services', () => { + expect(items.length).to.be(0); + }); + }); + + describe('with environment set to production', () => { + let items: ServiceListItem[]; + + before(async () => { + items = await getSortedAndFilteredServices({ + environment: 'production', + }); + }); + + it('returns services for production only', () => { + const serviceNames = items.map((item) => item.serviceName); + + expect(serviceNames.sort()).to.eql(['a']); + }); + }); + } + ); +} diff --git a/x-pack/test/functional/apps/apm/correlations/failed_transaction_correlations.ts b/x-pack/test/functional/apps/apm/correlations/failed_transaction_correlations.ts index d9a5ea35e5393..f70bd4736bd7e 100644 --- a/x-pack/test/functional/apps/apm/correlations/failed_transaction_correlations.ts +++ b/x-pack/test/functional/apps/apm/correlations/failed_transaction_correlations.ts @@ -36,6 +36,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); after(async () => { + await esArchiver.unload('x-pack/test/functional/es_archives/infra/8.0.0/metrics_and_apm'); await spacesService.delete('custom_space'); }); @@ -54,10 +55,6 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await testSubjects.existOrFail('apmMainContainer', { timeout: 10000, }); - - const apmMainContainerText = await testSubjects.getVisibleTextAll('apmMainContainer'); - const apmMainContainerTextItems = apmMainContainerText[0].split('\n'); - expect(apmMainContainerTextItems).to.contain('No services found'); }); }); diff --git a/x-pack/test/functional/apps/apm/correlations/latency_correlations.ts b/x-pack/test/functional/apps/apm/correlations/latency_correlations.ts index af3633798133b..200b3367b9723 100644 --- a/x-pack/test/functional/apps/apm/correlations/latency_correlations.ts +++ b/x-pack/test/functional/apps/apm/correlations/latency_correlations.ts @@ -37,6 +37,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); after(async () => { + await esArchiver.unload('x-pack/test/functional/es_archives/infra/8.0.0/metrics_and_apm'); await spacesService.delete('custom_space'); }); @@ -55,10 +56,6 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await testSubjects.existOrFail('apmMainContainer', { timeout: 10000, }); - - const apmMainContainerText = await testSubjects.getVisibleTextAll('apmMainContainer'); - const apmMainContainerTextItems = apmMainContainerText[0].split('\n'); - expect(apmMainContainerTextItems).to.contain('No services found'); }); }); diff --git a/x-pack/test/functional/apps/canvas/embeddables/lens.ts b/x-pack/test/functional/apps/canvas/embeddables/lens.ts index cfb8e4fcd92f6..5ecd3a3156909 100644 --- a/x-pack/test/functional/apps/canvas/embeddables/lens.ts +++ b/x-pack/test/functional/apps/canvas/embeddables/lens.ts @@ -24,6 +24,7 @@ export default function canvasLensTest({ getService, getPageObjects }: FtrProvid describe('lens in canvas', function () { before(async () => { await esArchiver.load(archives.es); + await kibanaServer.savedObjects.cleanStandardList(); await kibanaServer.importExport.load(archives.kbn); await kibanaServer.uiSettings.replace({ defaultIndex: 'logstash-lens' }); // open canvas home @@ -36,7 +37,7 @@ export default function canvasLensTest({ getService, getPageObjects }: FtrProvid after(async () => { await esArchiver.unload(archives.es); - await kibanaServer.importExport.unload(archives.kbn); + await kibanaServer.savedObjects.cleanStandardList(); }); describe('by-reference', () => { diff --git a/x-pack/test/functional/apps/canvas/embeddables/maps.ts b/x-pack/test/functional/apps/canvas/embeddables/maps.ts index 1d325259fb16c..3a2034b7dfecf 100644 --- a/x-pack/test/functional/apps/canvas/embeddables/maps.ts +++ b/x-pack/test/functional/apps/canvas/embeddables/maps.ts @@ -13,9 +13,11 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const dashboardPanelActions = getService('dashboardPanelActions'); const dashboardAddPanel = getService('dashboardAddPanel'); const testSubjects = getService('testSubjects'); + const kibanaServer = getService('kibanaServer'); describe('maps in canvas', function () { before(async () => { + await kibanaServer.savedObjects.cleanStandardList(); // open canvas home await PageObjects.common.navigateToApp('canvas'); // create new workpad diff --git a/x-pack/test/functional/apps/canvas/embeddables/saved_search.ts b/x-pack/test/functional/apps/canvas/embeddables/saved_search.ts index d2e640ef9b9b8..6024b4114199a 100644 --- a/x-pack/test/functional/apps/canvas/embeddables/saved_search.ts +++ b/x-pack/test/functional/apps/canvas/embeddables/saved_search.ts @@ -10,16 +10,16 @@ import { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { const PageObjects = getPageObjects(['canvas', 'common', 'header', 'discover']); const testSubjects = getService('testSubjects'); - const esArchiver = getService('esArchiver'); + const kibanaServer = getService('kibanaServer'); const dashboardAddPanel = getService('dashboardAddPanel'); const dashboardPanelActions = getService('dashboardPanelActions'); - const archives = { - es: 'test/functional/fixtures/es_archiver/dashboard/current/kibana', - }; describe('saved search in canvas', function () { before(async () => { - await esArchiver.load(archives.es); + await kibanaServer.savedObjects.cleanStandardList(); + await kibanaServer.importExport.load( + 'test/functional/fixtures/kbn_archiver/dashboard/current/kibana' + ); // open canvas home await PageObjects.common.navigateToApp('canvas'); // create new workpad @@ -28,7 +28,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); after(async () => { - await esArchiver.unload(archives.es); + await kibanaServer.savedObjects.cleanStandardList(); }); describe('by-reference', () => { diff --git a/x-pack/test/functional/apps/canvas/embeddables/visualization.ts b/x-pack/test/functional/apps/canvas/embeddables/visualization.ts index d8d851e9708e6..09f2fba9810f3 100644 --- a/x-pack/test/functional/apps/canvas/embeddables/visualization.ts +++ b/x-pack/test/functional/apps/canvas/embeddables/visualization.ts @@ -11,17 +11,24 @@ import { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { const retry = getService('retry'); const PageObjects = getPageObjects(['canvas', 'common', 'header', 'visualize']); - const esArchiver = getService('esArchiver'); + const kibanaServer = getService('kibanaServer'); const testSubjects = getService('testSubjects'); const dashboardAddPanel = getService('dashboardAddPanel'); const dashboardPanelActions = getService('dashboardPanelActions'); - const archives = { - es: 'test/functional/fixtures/es_archiver/dashboard/current/kibana', - }; describe('visualization in canvas', function () { before(async () => { - await esArchiver.load(archives.es); + await kibanaServer.savedObjects.cleanStandardList(); + await kibanaServer.importExport.load( + 'test/functional/fixtures/kbn_archiver/dashboard/current/kibana' + ); + await kibanaServer.importExport.load( + 'x-pack/test/functional/fixtures/kbn_archiver/canvas/lens' + ); + await kibanaServer.importExport.unload( + 'test/functional/fixtures/kbn_archiver/dashboard/current/kibana_unload' + ); + // open canvas home await PageObjects.common.navigateToApp('canvas'); // create new workpad @@ -30,7 +37,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); after(async () => { - await esArchiver.unload(archives.es); + await kibanaServer.savedObjects.cleanStandardList(); }); describe('by-reference', () => { diff --git a/x-pack/test/functional/apps/canvas/feature_controls/canvas_spaces.ts b/x-pack/test/functional/apps/canvas/feature_controls/canvas_spaces.ts index a47ebeac3861a..5060ac60eceae 100644 --- a/x-pack/test/functional/apps/canvas/feature_controls/canvas_spaces.ts +++ b/x-pack/test/functional/apps/canvas/feature_controls/canvas_spaces.ts @@ -26,7 +26,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); after(async () => { - await kibanaServer.savedObjects.clean({ types: ['canvas-workpad'] }); + await kibanaServer.savedObjects.cleanStandardList(); await soInfo.logSoTypes(log); }); diff --git a/x-pack/test/functional/apps/canvas/smoke_test.js b/x-pack/test/functional/apps/canvas/smoke_test.js index d2ec930579c92..053c58e88cde1 100644 --- a/x-pack/test/functional/apps/canvas/smoke_test.js +++ b/x-pack/test/functional/apps/canvas/smoke_test.js @@ -26,7 +26,7 @@ export default function canvasSmokeTest({ getService, getPageObjects }) { }); after(async () => { - await kibanaServer.importExport.unload(archive); + await kibanaServer.savedObjects.cleanStandardList(); }); it('loads workpad list', async () => { diff --git a/x-pack/test/functional/apps/dashboard/dashboard_maps_by_value.ts b/x-pack/test/functional/apps/dashboard/dashboard_maps_by_value.ts index f8a90767b54ac..e885d1c0d3f73 100644 --- a/x-pack/test/functional/apps/dashboard/dashboard_maps_by_value.ts +++ b/x-pack/test/functional/apps/dashboard/dashboard_maps_by_value.ts @@ -88,9 +88,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await kibanaServer.importExport.unload( 'x-pack/test/functional/fixtures/kbn_archiver/lens/lens_basic.json' ); - await kibanaServer.savedObjects.clean({ - types: ['search', 'index-pattern', 'visualization', 'dashboard', 'tag', 'map'], - }); + await kibanaServer.savedObjects.cleanStandardList(); }); describe('adding a map by value', () => { diff --git a/x-pack/test/functional/apps/dashboard/dashboard_tagging.ts b/x-pack/test/functional/apps/dashboard/dashboard_tagging.ts index 7a358e24a2b41..784d1f3678415 100644 --- a/x-pack/test/functional/apps/dashboard/dashboard_tagging.ts +++ b/x-pack/test/functional/apps/dashboard/dashboard_tagging.ts @@ -81,9 +81,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await kibanaServer.importExport.unload( 'x-pack/test/functional/fixtures/kbn_archiver/lens/lens_basic.json' ); - await kibanaServer.savedObjects.clean({ - types: ['search', 'index-pattern', 'visualization', 'dashboard', 'tag'], - }); + await kibanaServer.savedObjects.cleanStandardList(); }); it('adds a new tag to a new Dashboard', async () => { diff --git a/x-pack/test/functional/apps/dashboard/panel_titles.ts b/x-pack/test/functional/apps/dashboard/panel_titles.ts index 20c1d745b5548..3db72ba8d0a90 100644 --- a/x-pack/test/functional/apps/dashboard/panel_titles.ts +++ b/x-pack/test/functional/apps/dashboard/panel_titles.ts @@ -30,7 +30,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('panel titles', () => { before(async () => { - await esArchiver.load('test/functional/fixtures/es_archiver/dashboard/current/kibana'); + await kibanaServer.savedObjects.cleanStandardList(); await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/logstash_functional'); await kibanaServer.importExport.load( 'x-pack/test/functional/fixtures/kbn_archiver/lens/lens_basic.json' diff --git a/x-pack/test/functional/apps/lens/add_to_dashboard.ts b/x-pack/test/functional/apps/lens/add_to_dashboard.ts index f035f844f1919..90285cc2333de 100644 --- a/x-pack/test/functional/apps/lens/add_to_dashboard.ts +++ b/x-pack/test/functional/apps/lens/add_to_dashboard.ts @@ -36,7 +36,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.lens.switchToVisualization('lnsMetric'); - await PageObjects.lens.waitForVisualization(); + await PageObjects.lens.waitForVisualization('mtrVis'); await PageObjects.lens.assertMetric('Average of bytes', '5,727.322'); }; @@ -304,10 +304,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.lens.switchToVisualization('lnsMetric'); - await PageObjects.lens.waitForVisualization(); + await PageObjects.lens.waitForVisualization('mtrVis'); await PageObjects.lens.assertMetric('Average of bytes', '5,727.322'); - await PageObjects.lens.waitForVisualization(); + await PageObjects.lens.waitForVisualization('mtrVis'); await testSubjects.click('lnsApp_saveButton'); const hasOptions = await testSubjects.exists('add-to-dashboard-options'); @@ -350,10 +350,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.lens.switchToVisualization('lnsMetric'); - await PageObjects.lens.waitForVisualization(); + await PageObjects.lens.waitForVisualization('mtrVis'); await PageObjects.lens.assertMetric('Average of bytes', '5,727.322'); - await PageObjects.lens.waitForVisualization(); + await PageObjects.lens.waitForVisualization('mtrVis'); await testSubjects.click('lnsApp_saveButton'); const hasOptions = await testSubjects.exists('add-to-dashboard-options'); diff --git a/x-pack/test/functional/apps/lens/gauge.ts b/x-pack/test/functional/apps/lens/gauge.ts index c181a067d86c3..cce05d7b9baba 100644 --- a/x-pack/test/functional/apps/lens/gauge.ts +++ b/x-pack/test/functional/apps/lens/gauge.ts @@ -37,7 +37,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('should switch to gauge and render a gauge with default values', async () => { await PageObjects.lens.switchToVisualization('horizontalBullet', 'gauge'); - await PageObjects.lens.waitForVisualization(); + await PageObjects.lens.waitForVisualization('gaugeChart'); const elementWithInfo = await find.byCssSelector('.echScreenReaderOnly'); const textContent = await elementWithInfo.getAttribute('textContent'); expect(textContent).to.contain('Average of bytes'); // it gets default title @@ -63,25 +63,25 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.lens.retrySetValue('lnsToolbarGaugeLabelMinor-select', 'custom', {}); await PageObjects.lens.retrySetValue('lnsToolbarGaugeLabelMinor', 'custom subtitle'); - await PageObjects.lens.waitForVisualization(); + await PageObjects.lens.waitForVisualization('gaugeChart'); await PageObjects.lens.openDimensionEditor( 'lnsGauge_goalDimensionPanel > lns-empty-dimension' ); - await PageObjects.lens.waitForVisualization(); + await PageObjects.lens.waitForVisualization('gaugeChart'); await PageObjects.lens.closeDimensionEditor(); await PageObjects.lens.openDimensionEditor( 'lnsGauge_minDimensionPanel > lns-empty-dimension-suggested-value' ); await PageObjects.lens.retrySetValue('lns-indexPattern-static_value-input', '1000'); - await PageObjects.lens.waitForVisualization(); + await PageObjects.lens.waitForVisualization('gaugeChart'); await PageObjects.lens.closeDimensionEditor(); await PageObjects.lens.openDimensionEditor( 'lnsGauge_maxDimensionPanel > lns-empty-dimension-suggested-value' ); await PageObjects.lens.retrySetValue('lns-indexPattern-static_value-input', '25000'); - await PageObjects.lens.waitForVisualization(); + await PageObjects.lens.waitForVisualization('gaugeChart'); await PageObjects.lens.closeDimensionEditor(); const elementWithInfo = await find.byCssSelector('.echScreenReaderOnly'); diff --git a/x-pack/test/functional/apps/lens/metrics.ts b/x-pack/test/functional/apps/lens/metrics.ts index 19f463e3569d8..62a8b69141a58 100644 --- a/x-pack/test/functional/apps/lens/metrics.ts +++ b/x-pack/test/functional/apps/lens/metrics.ts @@ -37,21 +37,21 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await testSubjects.setValue('lnsPalettePanel_dynamicColoring_range_value_1', '21000', { clearWithKeyboard: true, }); - await PageObjects.lens.waitForVisualization(); + await PageObjects.lens.waitForVisualization('mtrVis'); const styleObj = await PageObjects.lens.getMetricStyle(); expect(styleObj.color).to.be('rgb(32, 146, 128)'); }); it('should change the color when reverting the palette', async () => { await testSubjects.click('lnsPalettePanel_dynamicColoring_reverseColors'); - await PageObjects.lens.waitForVisualization(); + await PageObjects.lens.waitForVisualization('mtrVis'); const styleObj = await PageObjects.lens.getMetricStyle(); expect(styleObj.color).to.be('rgb(204, 86, 66)'); }); it('should reset the color stops when changing palette to a predefined one', async () => { await PageObjects.lens.changePaletteTo('temperature'); - await PageObjects.lens.waitForVisualization(); + await PageObjects.lens.waitForVisualization('mtrVis'); const styleObj = await PageObjects.lens.getMetricStyle(); expect(styleObj.color).to.be('rgb(235, 239, 245)'); }); diff --git a/x-pack/test/functional/page_objects/lens_page.ts b/x-pack/test/functional/page_objects/lens_page.ts index 1898ef10345e6..ae11939558462 100644 --- a/x-pack/test/functional/page_objects/lens_page.ts +++ b/x-pack/test/functional/page_objects/lens_page.ts @@ -1054,8 +1054,8 @@ export function LensPageProvider({ getService, getPageObjects }: FtrProviderCont * @param count - expected count of metric */ async assertMetric(title: string, count: string) { - await this.assertExactText('[data-test-subj="lns_metric_title"]', title); - await this.assertExactText('[data-test-subj="lns_metric_value"]', count); + await this.assertExactText('[data-test-subj="metric_label"]', title); + await this.assertExactText('[data-test-subj="metric_value"]', count); }, async setMetricDynamicColoring(coloringType: 'none' | 'labels' | 'background') { @@ -1063,7 +1063,7 @@ export function LensPageProvider({ getService, getPageObjects }: FtrProviderCont }, async getMetricStyle() { - const el = await testSubjects.find('lnsVisualizationContainer'); + const el = await testSubjects.find('metric_value'); const styleString = await el.getAttribute('style'); return styleString.split(';').reduce>((memo, cssLine) => { const [prop, value] = cssLine.split(':'); @@ -1152,9 +1152,11 @@ export function LensPageProvider({ getService, getPageObjects }: FtrProviderCont expect(focusedElementText).to.eql(name); }, - async waitForVisualization() { + async waitForVisualization(visDataTestSubj?: string) { async function getRenderingCount() { - const visualizationContainer = await testSubjects.find('lnsVisualizationContainer'); + const visualizationContainer = await testSubjects.find( + visDataTestSubj || 'lnsVisualizationContainer' + ); const renderingCount = await visualizationContainer.getAttribute('data-rendering-count'); return Number(renderingCount); } diff --git a/x-pack/test/performance/config.playwright.ts b/x-pack/test/performance/config.playwright.ts index 1866d97b438bb..72f809b07017c 100644 --- a/x-pack/test/performance/config.playwright.ts +++ b/x-pack/test/performance/config.playwright.ts @@ -11,8 +11,8 @@ import { services } from './services'; import { pageObjects } from './page_objects'; // These "secret" values are intentionally written in the source. We would make the APM server accept anonymous traffic if we could -const APM_SERVER_URL = 'https://2fad4006bf784bb8a54e52f4a5862609.apm.us-west1.gcp.cloud.es.io:443'; -const APM_PUBLIC_TOKEN = 'Q5q5rWQEw6tKeirBpw'; +const APM_SERVER_URL = 'https://kibana-ops-e2e-perf.apm.us-central1.gcp.cloud.es.io:443'; +const APM_PUBLIC_TOKEN = 'CTs9y3cvcfq13bQqsB'; export default async function ({ readConfigFile, log }: FtrConfigProviderContext) { const functionalConfig = await readConfigFile(require.resolve('../functional/config')); diff --git a/x-pack/test/reporting_api_integration/reporting_and_security/usage.ts b/x-pack/test/reporting_api_integration/reporting_and_security/usage.ts index 628dcd7d266bd..b600e089f1a87 100644 --- a/x-pack/test/reporting_api_integration/reporting_and_security/usage.ts +++ b/x-pack/test/reporting_api_integration/reporting_and_security/usage.ts @@ -24,7 +24,7 @@ const JOB_PARAMS_CSV_DEFAULT_SPACE = `,filter:!((meta:(field:order_date,index:aac3e500-f2c7-11ea-8250-fb138aa491e7,params:()),query:(range:(order_date:(format:strict_date_optional_time,gte:'2019-06-02T12:28:40.866Z'` + `,lte:'2019-07-18T20:59:57.136Z'))))),index:aac3e500-f2c7-11ea-8250-fb138aa491e7,parent:(filter:!(),highlightAll:!t,index:aac3e500-f2c7-11ea-8250-fb138aa491e7` + `,query:(language:kuery,query:''),version:!t),sort:!((order_date:desc)),trackTotalHits:!t)`; -const OSS_KIBANA_ARCHIVE_PATH = 'test/functional/fixtures/es_archiver/dashboard/current/kibana'; +const OSS_KIBANA_ARCHIVE_PATH = 'test/functional/fixtures/kbn_archiver/dashboard/current/kibana'; const OSS_DATA_ARCHIVE_PATH = 'test/functional/fixtures/es_archiver/dashboard/current/data'; interface UsageStats { @@ -34,6 +34,7 @@ interface UsageStats { // eslint-disable-next-line import/no-default-export export default function ({ getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); + const kibanaServer = getService('kibanaServer'); const reportingAPI = getService('reportingAPI'); const retry = getService('retry'); const usageAPI = getService('usageAPI'); @@ -117,13 +118,14 @@ export default function ({ getService }: FtrProviderContext) { describe('from new jobs posted', () => { before(async () => { - await esArchiver.load(OSS_KIBANA_ARCHIVE_PATH); + await kibanaServer.savedObjects.cleanStandardList(); + await kibanaServer.importExport.load(OSS_KIBANA_ARCHIVE_PATH); await esArchiver.load(OSS_DATA_ARCHIVE_PATH); await reportingAPI.initEcommerce(); }); after(async () => { - await esArchiver.unload(OSS_KIBANA_ARCHIVE_PATH); + await kibanaServer.savedObjects.cleanStandardList(); await esArchiver.unload(OSS_DATA_ARCHIVE_PATH); await reportingAPI.teardownEcommerce(); });