diff --git a/.ci/Jenkinsfile_flaky b/.ci/Jenkinsfile_flaky index 7eafc66465bc72..8121405e5ae249 100644 --- a/.ci/Jenkinsfile_flaky +++ b/.ci/Jenkinsfile_flaky @@ -73,11 +73,7 @@ def agentProcess(Map params = [:]) { ]) { task { if (config.needBuild) { - if (!config.isXpack) { - kibanaPipeline.buildOss() - } else { - kibanaPipeline.buildXpack() - } + kibanaPipeline.buildKibana() } for(def i = 0; i < config.agentExecutions; i++) { diff --git a/.ci/Jenkinsfile_security_cypress b/.ci/Jenkinsfile_security_cypress index 811af44d1ca56f..d48b9965919dc2 100644 --- a/.ci/Jenkinsfile_security_cypress +++ b/.ci/Jenkinsfile_security_cypress @@ -16,7 +16,7 @@ kibanaPipeline(timeoutMinutes: 180) { def job = 'xpack-securityCypress' workers.ci(name: job, size: 'l', ramDisk: true) { - kibanaPipeline.bash('test/scripts/jenkins_xpack_build_kibana.sh', 'Build Default Distributable') + kibanaPipeline.bash('test/scripts/jenkins_build_kibana.sh', 'Build Distributable') kibanaPipeline.functionalTestProcess(job, 'test/scripts/jenkins_security_solution_cypress_chrome.sh')() // Temporarily disabled to figure out test flake // kibanaPipeline.functionalTestProcess(job, 'test/scripts/jenkins_security_solution_cypress_firefox.sh')() diff --git a/.ci/es-snapshots/Jenkinsfile_verify_es b/.ci/es-snapshots/Jenkinsfile_verify_es index d56ec61314ac76..dc3a3cde7d658a 100644 --- a/.ci/es-snapshots/Jenkinsfile_verify_es +++ b/.ci/es-snapshots/Jenkinsfile_verify_es @@ -37,12 +37,8 @@ kibanaPipeline(timeoutMinutes: 210) { ]) task { - kibanaPipeline.buildOss(6) + kibanaPipeline.buildKibana(16) tasks.ossCiGroups() - } - - task { - kibanaPipeline.buildXpack(10, true) tasks.xpackCiGroups() tasks.xpackCiGroupDocker() } diff --git a/packages/kbn-es-archiver/src/lib/indices/kibana_index.ts b/packages/kbn-es-archiver/src/lib/indices/kibana_index.ts index f95bf956e2e254..e38aec72b6eb16 100644 --- a/packages/kbn-es-archiver/src/lib/indices/kibana_index.ts +++ b/packages/kbn-es-archiver/src/lib/indices/kibana_index.ts @@ -168,6 +168,7 @@ export async function createDefaultSpace({ index, type: '_doc', id: 'space:default', + refresh: 'wait_for', body: { type: 'space', updated_at: new Date().toISOString(), diff --git a/packages/kbn-test/src/kbn_client/kbn_client.ts b/packages/kbn-test/src/kbn_client/kbn_client.ts index 3fa74412c1a8bf..867982b2a29916 100644 --- a/packages/kbn-test/src/kbn_client/kbn_client.ts +++ b/packages/kbn-test/src/kbn_client/kbn_client.ts @@ -8,13 +8,14 @@ import { ToolingLog } from '@kbn/dev-utils'; -import { KbnClientRequester, ReqOptions } from './kbn_client_requester'; -import { KbnClientStatus } from './kbn_client_status'; +import { KbnClientImportExport } from './kbn_client_import_export'; import { KbnClientPlugins } from './kbn_client_plugins'; -import { KbnClientVersion } from './kbn_client_version'; +import { KbnClientRequester, ReqOptions } from './kbn_client_requester'; import { KbnClientSavedObjects } from './kbn_client_saved_objects'; +import { KbnClientSpaces } from './kbn_client_spaces'; +import { KbnClientStatus } from './kbn_client_status'; import { KbnClientUiSettings, UiSettingValues } from './kbn_client_ui_settings'; -import { KbnClientImportExport } from './kbn_client_import_export'; +import { KbnClientVersion } from './kbn_client_version'; export interface KbnClientOptions { url: string; @@ -29,6 +30,7 @@ export class KbnClient { readonly plugins: KbnClientPlugins; readonly version: KbnClientVersion; readonly savedObjects: KbnClientSavedObjects; + readonly spaces: KbnClientSpaces; readonly uiSettings: KbnClientUiSettings; readonly importExport: KbnClientImportExport; @@ -59,11 +61,13 @@ export class KbnClient { this.plugins = new KbnClientPlugins(this.status); this.version = new KbnClientVersion(this.status); this.savedObjects = new KbnClientSavedObjects(this.log, this.requester); + this.spaces = new KbnClientSpaces(this.requester); this.uiSettings = new KbnClientUiSettings(this.log, this.requester, this.uiSettingDefaults); this.importExport = new KbnClientImportExport( this.log, this.requester, this.savedObjects, + this.spaces, options.importExportDir ); } diff --git a/packages/kbn-test/src/kbn_client/kbn_client_import_export.ts b/packages/kbn-test/src/kbn_client/kbn_client_import_export.ts index fe67fbb70fa3ca..5634cd24db5cae 100644 --- a/packages/kbn-test/src/kbn_client/kbn_client_import_export.ts +++ b/packages/kbn-test/src/kbn_client/kbn_client_import_export.ts @@ -15,6 +15,7 @@ import { ToolingLog, isAxiosResponseError, createFailError } from '@kbn/dev-util import { KbnClientRequester, uriencode, ReqOptions } from './kbn_client_requester'; import { KbnClientSavedObjects } from './kbn_client_saved_objects'; +import { KbnClientSpaces } from './kbn_client_spaces'; interface ImportApiResponse { success: boolean; @@ -39,6 +40,7 @@ export class KbnClientImportExport { public readonly log: ToolingLog, public readonly requester: KbnClientRequester, public readonly savedObjects: KbnClientSavedObjects, + private readonly spaces: KbnClientSpaces, public readonly dir?: string ) {} @@ -66,6 +68,19 @@ export class KbnClientImportExport { const formData = new FormData(); formData.append('file', objects.map((obj) => JSON.stringify(obj)).join('\n'), 'import.ndjson'); + if (options?.space) { + this.log.info('creating space', options.space); + + try { + await this.spaces.create({ + id: options.space, + name: options.space, + }); + } catch (e) { + this.log.warning('creating space failed:', e.message); + } + } + // TODO: should we clear out the existing saved objects? const resp = await this.req(options?.space, { method: 'POST', diff --git a/packages/kbn-test/src/kbn_client/kbn_client_requester.ts b/packages/kbn-test/src/kbn_client/kbn_client_requester.ts index af75137d148e97..a194b593b3863a 100644 --- a/packages/kbn-test/src/kbn_client/kbn_client_requester.ts +++ b/packages/kbn-test/src/kbn_client/kbn_client_requester.ts @@ -121,6 +121,8 @@ export class KbnClientRequester { responseType: options.responseType, // work around https://github.com/axios/axios/issues/2791 transformResponse: options.responseType === 'text' ? [(x) => x] : undefined, + maxContentLength: 30000000, + maxBodyLength: 30000000, paramsSerializer: (params) => Qs.stringify(params), }); diff --git a/packages/kbn-test/src/kbn_client/kbn_client_spaces.ts b/packages/kbn-test/src/kbn_client/kbn_client_spaces.ts new file mode 100644 index 00000000000000..e88531606e9178 --- /dev/null +++ b/packages/kbn-test/src/kbn_client/kbn_client_spaces.ts @@ -0,0 +1,67 @@ +/* + * 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 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { KbnClientRequester, uriencode } from './kbn_client_requester'; + +interface UpdateBody { + name: string; + description?: string; + disabledFeatures?: string | string[]; + initials?: string; + color?: string; + imageUrl?: string; +} + +interface CreateBody extends UpdateBody { + id: string; +} + +export class KbnClientSpaces { + constructor(private readonly requester: KbnClientRequester) {} + + async create(body: CreateBody) { + await this.requester.request({ + method: 'POST', + path: '/api/spaces/space', + body, + }); + } + + async update(id: string, body: UpdateBody) { + await this.requester.request({ + method: 'PUT', + path: uriencode`/api/spaces/space/${id}`, + body, + }); + } + + async get(id: string) { + const { data } = await this.requester.request({ + method: 'GET', + path: uriencode`/api/spaces/space/${id}`, + }); + + return data; + } + + async list() { + const { data } = await this.requester.request({ + method: 'GET', + path: '/api/spaces/space', + }); + + return data; + } + + async delete(id: string) { + await this.requester.request({ + method: 'DELETE', + path: uriencode`/api/spaces/space/${id}`, + }); + } +} diff --git a/src/dev/precommit_hook/casing_check_config.js b/src/dev/precommit_hook/casing_check_config.js index dab7d6257e2e3e..f009a09ca3b1b8 100644 --- a/src/dev/precommit_hook/casing_check_config.js +++ b/src/dev/precommit_hook/casing_check_config.js @@ -40,6 +40,7 @@ export const IGNORE_FILE_GLOBS = [ '.ci/pipeline-library/**/*', 'packages/kbn-test/jest-preset.js', 'test/package/Vagrantfile', + 'test/**/fixtures/**/*', // filename must match language code which requires capital letters '**/translations/*.json', diff --git a/test/accessibility/apps/dashboard_panel.ts b/test/accessibility/apps/dashboard_panel.ts index 77b6cf2dbb6dac..2a6c290172a9e7 100644 --- a/test/accessibility/apps/dashboard_panel.ts +++ b/test/accessibility/apps/dashboard_panel.ts @@ -63,6 +63,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('dashboard panel full screen', async () => { const header = await dashboardPanelActions.getPanelHeading('[Flights] Airline Carrier'); await dashboardPanelActions.toggleContextMenu(header); + await dashboardPanelActions.clickContextMenuMoreItem(); + await testSubjects.click('embeddablePanelAction-togglePanel'); await a11y.testAppSnapshot(); }); diff --git a/test/api_integration/apis/home/sample_data.ts b/test/api_integration/apis/home/sample_data.ts index 99327901ec8c35..c681ad325e56f9 100644 --- a/test/api_integration/apis/home/sample_data.ts +++ b/test/api_integration/apis/home/sample_data.ts @@ -43,7 +43,7 @@ export default function ({ getService }: FtrProviderContext) { expect(resp.body).to.eql({ elasticsearchIndicesCreated: { kibana_sample_data_flights: 13059 }, - kibanaSavedObjectsLoaded: 20, + kibanaSavedObjectsLoaded: 23, }); }); diff --git a/test/api_integration/apis/kql_telemetry/kql_telemetry.ts b/test/api_integration/apis/kql_telemetry/kql_telemetry.ts index 5c4a8b25e4c05a..09e36b9078792a 100644 --- a/test/api_integration/apis/kql_telemetry/kql_telemetry.ts +++ b/test/api_integration/apis/kql_telemetry/kql_telemetry.ts @@ -13,12 +13,12 @@ import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ getService }: FtrProviderContext) { const supertest = getService('supertest'); - const esArchiver = getService('esArchiver'); + const kibanaServer = getService('kibanaServer'); const es = getService('es'); describe('telemetry API', () => { - before(() => esArchiver.load('saved_objects/basic')); - after(() => esArchiver.unload('saved_objects/basic')); + before(() => kibanaServer.importExport.load('saved_objects/basic')); + after(() => kibanaServer.importExport.unload('saved_objects/basic')); it('should increment the opt *in* counter in the .kibana/kql-telemetry document', async () => { await supertest diff --git a/test/api_integration/apis/saved_objects/bulk_create.ts b/test/api_integration/apis/saved_objects/bulk_create.ts index 57b7ff0935f587..209c772fba6c17 100644 --- a/test/api_integration/apis/saved_objects/bulk_create.ts +++ b/test/api_integration/apis/saved_objects/bulk_create.ts @@ -12,8 +12,8 @@ import { getKibanaVersion } from './lib/saved_objects_test_utils'; export default function ({ getService }: FtrProviderContext) { const supertest = getService('supertest'); - const esArchiver = getService('esArchiver'); - const esDeleteAllIndices = getService('esDeleteAllIndices'); + const kibanaServer = getService('kibanaServer'); + const SPACE_ID = 'ftr-so-bulk-create'; const BULK_REQUESTS = [ { @@ -38,99 +38,57 @@ export default function ({ getService }: FtrProviderContext) { before(async () => { KIBANA_VERSION = await getKibanaVersion(getService); + await kibanaServer.importExport.load('saved_objects/basic', { space: SPACE_ID }); }); - describe('with kibana index', () => { - before(() => esArchiver.load('saved_objects/basic')); - after(() => esArchiver.unload('saved_objects/basic')); + after(() => kibanaServer.spaces.delete(SPACE_ID)); - it('should return 200 with individual responses', async () => - await supertest - .post(`/api/saved_objects/_bulk_create`) - .send(BULK_REQUESTS) - .expect(200) - .then((resp) => { - expect(resp.body).to.eql({ - saved_objects: [ - { - type: 'visualization', - id: 'dd7caf20-9efd-11e7-acb3-3dab96693fab', - error: { - error: 'Conflict', - message: - 'Saved object [visualization/dd7caf20-9efd-11e7-acb3-3dab96693fab] conflict', - statusCode: 409, - }, + it('should return 200 with individual responses', async () => + await supertest + .post(`/s/${SPACE_ID}/api/saved_objects/_bulk_create`) + .send(BULK_REQUESTS) + .expect(200) + .then((resp) => { + expect(resp.body).to.eql({ + saved_objects: [ + { + type: 'visualization', + id: 'dd7caf20-9efd-11e7-acb3-3dab96693fab', + error: { + error: 'Conflict', + message: + 'Saved object [visualization/dd7caf20-9efd-11e7-acb3-3dab96693fab] conflict', + statusCode: 409, }, - { - type: 'dashboard', - id: 'a01b2f57-fcfd-4864-b735-09e28f0d815e', - updated_at: resp.body.saved_objects[1].updated_at, - version: resp.body.saved_objects[1].version, - attributes: { - title: 'A great new dashboard', - }, - migrationVersion: { - dashboard: resp.body.saved_objects[1].migrationVersion.dashboard, - }, - coreMigrationVersion: KIBANA_VERSION, - references: [], - namespaces: ['default'], + }, + { + type: 'dashboard', + id: 'a01b2f57-fcfd-4864-b735-09e28f0d815e', + updated_at: resp.body.saved_objects[1].updated_at, + version: resp.body.saved_objects[1].version, + attributes: { + title: 'A great new dashboard', }, - ], - }); - })); - - it('should not return raw id when object id is unspecified', async () => - await supertest - .post(`/api/saved_objects/_bulk_create`) - .send(BULK_REQUESTS.map(({ id, ...rest }) => rest)) - .expect(200) - .then((resp) => { - resp.body.saved_objects.map(({ id }: { id: string }) => - expect(id).not.match(/visualization|dashboard/) - ); - })); - }); - - describe('without kibana index', () => { - before( - async () => - // just in case the kibana server has recreated it - await esDeleteAllIndices('.kibana*') - ); - - it('should return 200 with errors', async () => { - await new Promise((resolve) => setTimeout(resolve, 2000)); - await supertest - .post('/api/saved_objects/_bulk_create') - .send(BULK_REQUESTS) - .expect(200) - .then((resp) => { - expect(resp.body).to.eql({ - saved_objects: [ - { - id: BULK_REQUESTS[0].id, - type: BULK_REQUESTS[0].type, - error: { - error: 'Internal Server Error', - message: 'An internal server error occurred', - statusCode: 500, - }, + migrationVersion: { + dashboard: resp.body.saved_objects[1].migrationVersion.dashboard, }, - { - id: BULK_REQUESTS[1].id, - type: BULK_REQUESTS[1].type, - error: { - error: 'Internal Server Error', - message: 'An internal server error occurred', - statusCode: 500, - }, - }, - ], - }); + coreMigrationVersion: KIBANA_VERSION, + references: [], + namespaces: [SPACE_ID], + }, + ], }); - }); - }); + })); + + it('should not return raw id when object id is unspecified', async () => + await supertest + .post(`/s/${SPACE_ID}/api/saved_objects/_bulk_create`) + .send(BULK_REQUESTS.map(({ id, ...rest }) => rest)) + .expect(200) + .then((resp) => { + resp.body.saved_objects.map(({ id }: { id: string }) => + expect(id).not.match(/visualization|dashboard/) + ); + })); }); } diff --git a/test/api_integration/apis/saved_objects/bulk_get.ts b/test/api_integration/apis/saved_objects/bulk_get.ts index 77f84dee25ded1..81e86913aaf86f 100644 --- a/test/api_integration/apis/saved_objects/bulk_get.ts +++ b/test/api_integration/apis/saved_objects/bulk_get.ts @@ -12,8 +12,7 @@ import { getKibanaVersion } from './lib/saved_objects_test_utils'; export default function ({ getService }: FtrProviderContext) { const supertest = getService('supertest'); - const esArchiver = getService('esArchiver'); - const esDeleteAllIndices = getService('esDeleteAllIndices'); + const kibanaServer = getService('kibanaServer'); const BULK_REQUESTS = [ { @@ -35,121 +34,75 @@ export default function ({ getService }: FtrProviderContext) { before(async () => { KIBANA_VERSION = await getKibanaVersion(getService); + await kibanaServer.importExport.load('saved_objects/basic'); }); - describe('with kibana index', () => { - before(() => esArchiver.load('saved_objects/basic')); - after(() => esArchiver.unload('saved_objects/basic')); + after(() => kibanaServer.importExport.unload('saved_objects/basic')); - it('should return 200 with individual responses', async () => - await supertest - .post(`/api/saved_objects/_bulk_get`) - .send(BULK_REQUESTS) - .expect(200) - .then((resp) => { - expect(resp.body).to.eql({ - saved_objects: [ - { - id: 'dd7caf20-9efd-11e7-acb3-3dab96693fab', - type: 'visualization', - updated_at: '2017-09-21T18:51:23.794Z', - version: resp.body.saved_objects[0].version, - attributes: { - title: 'Count of requests', - description: '', - version: 1, - // cheat for some of the more complex attributes - visState: resp.body.saved_objects[0].attributes.visState, - uiStateJSON: resp.body.saved_objects[0].attributes.uiStateJSON, - kibanaSavedObjectMeta: - resp.body.saved_objects[0].attributes.kibanaSavedObjectMeta, - }, - migrationVersion: resp.body.saved_objects[0].migrationVersion, - coreMigrationVersion: KIBANA_VERSION, - namespaces: ['default'], - references: [ - { - name: 'kibanaSavedObjectMeta.searchSourceJSON.index', - type: 'index-pattern', - id: '91200a00-9efd-11e7-acb3-3dab96693fab', - }, - ], - }, - { - id: 'does not exist', - type: 'dashboard', - error: { - error: 'Not Found', - message: 'Saved object [dashboard/does not exist] not found', - statusCode: 404, - }, - }, - { - id: '7.0.0-alpha1', - type: 'config', - updated_at: '2017-09-21T18:49:16.302Z', - version: resp.body.saved_objects[2].version, - attributes: { - buildNum: 8467, - defaultIndex: '91200a00-9efd-11e7-acb3-3dab96693fab', - }, - namespaces: ['default'], - migrationVersion: resp.body.saved_objects[2].migrationVersion, - coreMigrationVersion: KIBANA_VERSION, - references: [], - }, - ], - }); - expect(resp.body.saved_objects[0].migrationVersion).to.be.ok(); - })); - }); - - describe('without kibana index', () => { - before( - async () => - // just in case the kibana server has recreated it - await esDeleteAllIndices('.kibana*') - ); + it('should return 200 with individual responses', async () => + await supertest + .post(`/api/saved_objects/_bulk_get`) + .send(BULK_REQUESTS) + .expect(200) + .then((resp) => { + const mockDate = '2015-01-01T00:00:00.000Z'; + resp.body.saved_objects[0].updated_at = mockDate; + resp.body.saved_objects[2].updated_at = mockDate; - it('should return 200 with individual responses', async () => - await supertest - .post('/api/saved_objects/_bulk_get') - .send(BULK_REQUESTS) - .expect(200) - .then((resp) => { - expect(resp.body).to.eql({ - saved_objects: [ - { - id: 'dd7caf20-9efd-11e7-acb3-3dab96693fab', - type: 'visualization', - error: { - error: 'Not Found', - message: - 'Saved object [visualization/dd7caf20-9efd-11e7-acb3-3dab96693fab] not found', - statusCode: 404, - }, + expect(resp.body).to.eql({ + saved_objects: [ + { + id: 'dd7caf20-9efd-11e7-acb3-3dab96693fab', + type: 'visualization', + updated_at: '2015-01-01T00:00:00.000Z', + version: resp.body.saved_objects[0].version, + attributes: { + title: 'Count of requests', + description: '', + version: 1, + // cheat for some of the more complex attributes + visState: resp.body.saved_objects[0].attributes.visState, + uiStateJSON: resp.body.saved_objects[0].attributes.uiStateJSON, + kibanaSavedObjectMeta: + resp.body.saved_objects[0].attributes.kibanaSavedObjectMeta, }, - { - id: 'does not exist', - type: 'dashboard', - error: { - error: 'Not Found', - message: 'Saved object [dashboard/does not exist] not found', - statusCode: 404, + migrationVersion: resp.body.saved_objects[0].migrationVersion, + coreMigrationVersion: KIBANA_VERSION, + namespaces: ['default'], + references: [ + { + name: 'kibanaSavedObjectMeta.searchSourceJSON.index', + type: 'index-pattern', + id: '91200a00-9efd-11e7-acb3-3dab96693fab', }, + ], + }, + { + id: 'does not exist', + type: 'dashboard', + error: { + error: 'Not Found', + message: 'Saved object [dashboard/does not exist] not found', + statusCode: 404, }, - { - id: '7.0.0-alpha1', - type: 'config', - error: { - error: 'Not Found', - message: 'Saved object [config/7.0.0-alpha1] not found', - statusCode: 404, - }, + }, + { + id: '7.0.0-alpha1', + type: 'config', + updated_at: '2015-01-01T00:00:00.000Z', + version: resp.body.saved_objects[2].version, + attributes: { + buildNum: 8467, + defaultIndex: '91200a00-9efd-11e7-acb3-3dab96693fab', }, - ], - }); - })); - }); + namespaces: ['default'], + migrationVersion: resp.body.saved_objects[2].migrationVersion, + coreMigrationVersion: KIBANA_VERSION, + references: [], + }, + ], + }); + expect(resp.body.saved_objects[0].migrationVersion).to.be.ok(); + })); }); } diff --git a/test/api_integration/apis/saved_objects/bulk_update.ts b/test/api_integration/apis/saved_objects/bulk_update.ts index a5f5262196346e..8740652fc39538 100644 --- a/test/api_integration/apis/saved_objects/bulk_update.ts +++ b/test/api_integration/apis/saved_objects/bulk_update.ts @@ -12,239 +12,180 @@ import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ getService }: FtrProviderContext) { const supertest = getService('supertest'); - const esArchiver = getService('esArchiver'); - const esDeleteAllIndices = getService('esDeleteAllIndices'); + const kibanaServer = getService('kibanaServer'); describe('bulkUpdate', () => { - describe('with kibana index', () => { - before(() => esArchiver.load('saved_objects/basic')); - after(() => esArchiver.unload('saved_objects/basic')); - it('should return 200', async () => { - const response = await supertest - .put(`/api/saved_objects/_bulk_update`) - .send([ - { - type: 'visualization', - id: 'dd7caf20-9efd-11e7-acb3-3dab96693fab', - attributes: { - title: 'An existing visualization', - }, - }, - { - type: 'dashboard', - id: 'be3733a0-9efe-11e7-acb3-3dab96693fab', - attributes: { - title: 'An existing dashboard', - }, - }, - ]) - .expect(200); - - const { - saved_objects: [firstObject, secondObject], - } = response.body; - - // loose ISO8601 UTC time with milliseconds validation - expect(firstObject) - .to.have.property('updated_at') - .match(/^[\d-]{10}T[\d:\.]{12}Z$/); - expect(_.omit(firstObject, ['updated_at'])).to.eql({ - id: 'dd7caf20-9efd-11e7-acb3-3dab96693fab', - type: 'visualization', - version: firstObject.version, - attributes: { - title: 'An existing visualization', - }, - namespaces: ['default'], - }); - - expect(secondObject) - .to.have.property('updated_at') - .match(/^[\d-]{10}T[\d:\.]{12}Z$/); - expect(_.omit(secondObject, ['updated_at'])).to.eql({ - id: 'be3733a0-9efe-11e7-acb3-3dab96693fab', - type: 'dashboard', - version: secondObject.version, - attributes: { - title: 'An existing dashboard', - }, - namespaces: ['default'], - }); - }); + before(() => kibanaServer.importExport.load('saved_objects/basic')); + after(() => kibanaServer.importExport.unload('saved_objects/basic')); - it('does not pass references if omitted', async () => { - const { - body: { - saved_objects: [visObject, dashObject], - }, - } = await supertest.post(`/api/saved_objects/_bulk_get`).send([ + it('should return 200', async () => { + const response = await supertest + .put(`/api/saved_objects/_bulk_update`) + .send([ { type: 'visualization', id: 'dd7caf20-9efd-11e7-acb3-3dab96693fab', + attributes: { + title: 'An existing visualization', + }, }, { type: 'dashboard', id: 'be3733a0-9efe-11e7-acb3-3dab96693fab', + attributes: { + title: 'An existing dashboard', + }, }, - ]); + ]) + .expect(200); + + const { + saved_objects: [firstObject, secondObject], + } = response.body; + + // loose ISO8601 UTC time with milliseconds validation + expect(firstObject) + .to.have.property('updated_at') + .match(/^[\d-]{10}T[\d:\.]{12}Z$/); + expect(_.omit(firstObject, ['updated_at'])).to.eql({ + id: 'dd7caf20-9efd-11e7-acb3-3dab96693fab', + type: 'visualization', + version: firstObject.version, + attributes: { + title: 'An existing visualization', + }, + namespaces: ['default'], + }); - const response = await supertest - .put(`/api/saved_objects/_bulk_update`) - .send([ - { - type: 'visualization', - id: 'dd7caf20-9efd-11e7-acb3-3dab96693fab', - attributes: { - title: 'Changed title but nothing else', - }, - version: visObject.version, - }, - { - type: 'dashboard', - id: 'be3733a0-9efe-11e7-acb3-3dab96693fab', - attributes: { - title: 'Changed title and references', - }, - version: dashObject.version, - references: [{ id: 'foo', name: 'Foo', type: 'visualization' }], - }, - ]) - .expect(200); + expect(secondObject) + .to.have.property('updated_at') + .match(/^[\d-]{10}T[\d:\.]{12}Z$/); + expect(_.omit(secondObject, ['updated_at'])).to.eql({ + id: 'be3733a0-9efe-11e7-acb3-3dab96693fab', + type: 'dashboard', + version: secondObject.version, + attributes: { + title: 'An existing dashboard', + }, + namespaces: ['default'], + }); + }); - const { - saved_objects: [firstUpdatedObject, secondUpdatedObject], - } = response.body; - expect(firstUpdatedObject).to.not.have.property('error'); - expect(secondUpdatedObject).to.not.have.property('error'); + it('does not pass references if omitted', async () => { + const { + body: { + saved_objects: [visObject, dashObject], + }, + } = await supertest.post(`/api/saved_objects/_bulk_get`).send([ + { + type: 'visualization', + id: 'dd7caf20-9efd-11e7-acb3-3dab96693fab', + }, + { + type: 'dashboard', + id: 'be3733a0-9efe-11e7-acb3-3dab96693fab', + }, + ]); - const { - body: { - saved_objects: [visObjectAfterUpdate, dashObjectAfterUpdate], - }, - } = await supertest.post(`/api/saved_objects/_bulk_get`).send([ + const response = await supertest + .put(`/api/saved_objects/_bulk_update`) + .send([ { type: 'visualization', id: 'dd7caf20-9efd-11e7-acb3-3dab96693fab', + attributes: { + title: 'Changed title but nothing else', + }, + version: visObject.version, }, { type: 'dashboard', id: 'be3733a0-9efe-11e7-acb3-3dab96693fab', + attributes: { + title: 'Changed title and references', + }, + version: dashObject.version, + references: [{ id: 'foo', name: 'Foo', type: 'visualization' }], }, - ]); - - expect(visObjectAfterUpdate.references).to.eql(visObject.references); - expect(dashObjectAfterUpdate.references).to.eql([ - { id: 'foo', name: 'Foo', type: 'visualization' }, - ]); - }); + ]) + .expect(200); + + const { + saved_objects: [firstUpdatedObject, secondUpdatedObject], + } = response.body; + expect(firstUpdatedObject).to.not.have.property('error'); + expect(secondUpdatedObject).to.not.have.property('error'); + + const { + body: { + saved_objects: [visObjectAfterUpdate, dashObjectAfterUpdate], + }, + } = await supertest.post(`/api/saved_objects/_bulk_get`).send([ + { + type: 'visualization', + id: 'dd7caf20-9efd-11e7-acb3-3dab96693fab', + }, + { + type: 'dashboard', + id: 'be3733a0-9efe-11e7-acb3-3dab96693fab', + }, + ]); - it('passes empty references array if empty references array is provided', async () => { - const { - body: { - saved_objects: [{ version }], - }, - } = await supertest.post(`/api/saved_objects/_bulk_get`).send([ - { - type: 'visualization', - id: 'dd7caf20-9efd-11e7-acb3-3dab96693fab', - }, - ]); + expect(visObjectAfterUpdate.references).to.eql(visObject.references); + expect(dashObjectAfterUpdate.references).to.eql([ + { id: 'foo', name: 'Foo', type: 'visualization' }, + ]); + }); - await supertest - .put(`/api/saved_objects/_bulk_update`) - .send([ - { - type: 'visualization', - id: 'dd7caf20-9efd-11e7-acb3-3dab96693fab', - attributes: { - title: 'Changed title but nothing else', - }, - version, - references: [], - }, - ]) - .expect(200); + it('passes empty references array if empty references array is provided', async () => { + const { + body: { + saved_objects: [{ version }], + }, + } = await supertest.post(`/api/saved_objects/_bulk_get`).send([ + { + type: 'visualization', + id: 'dd7caf20-9efd-11e7-acb3-3dab96693fab', + }, + ]); - const { - body: { - saved_objects: [visObjectAfterUpdate], - }, - } = await supertest.post(`/api/saved_objects/_bulk_get`).send([ + await supertest + .put(`/api/saved_objects/_bulk_update`) + .send([ { type: 'visualization', id: 'dd7caf20-9efd-11e7-acb3-3dab96693fab', - }, - ]); - - expect(visObjectAfterUpdate.references).to.eql([]); - }); - - describe('unknown id', () => { - it('should return a generic 404', async () => { - const response = await supertest - .put(`/api/saved_objects/_bulk_update`) - .send([ - { - type: 'visualization', - id: 'not an id', - attributes: { - title: 'An existing visualization', - }, - }, - { - type: 'dashboard', - id: 'be3733a0-9efe-11e7-acb3-3dab96693fab', - attributes: { - title: 'An existing dashboard', - }, - }, - ]) - .expect(200); - - const { - saved_objects: [missingObject, updatedObject], - } = response.body; - - // loose ISO8601 UTC time with milliseconds validation - expect(missingObject).eql({ - type: 'visualization', - id: 'not an id', - error: { - statusCode: 404, - error: 'Not Found', - message: 'Saved object [visualization/not an id] not found', - }, - }); - - expect(updatedObject) - .to.have.property('updated_at') - .match(/^[\d-]{10}T[\d:\.]{12}Z$/); - expect(_.omit(updatedObject, ['updated_at', 'version'])).to.eql({ - id: 'be3733a0-9efe-11e7-acb3-3dab96693fab', - type: 'dashboard', attributes: { - title: 'An existing dashboard', + title: 'Changed title but nothing else', }, - namespaces: ['default'], - }); - }); - }); - }); + version, + references: [], + }, + ]) + .expect(200); + + const { + body: { + saved_objects: [visObjectAfterUpdate], + }, + } = await supertest.post(`/api/saved_objects/_bulk_get`).send([ + { + type: 'visualization', + id: 'dd7caf20-9efd-11e7-acb3-3dab96693fab', + }, + ]); - describe('without kibana index', () => { - before( - async () => - // just in case the kibana server has recreated it - await esDeleteAllIndices('.kibana*') - ); + expect(visObjectAfterUpdate.references).to.eql([]); + }); - it('should return 200 with errors', async () => { + describe('unknown id', () => { + it('should return a generic 404', async () => { const response = await supertest .put(`/api/saved_objects/_bulk_update`) .send([ { type: 'visualization', - id: 'dd7caf20-9efd-11e7-acb3-3dab96693fab', + id: 'not an id', attributes: { title: 'An existing visualization', }, @@ -260,27 +201,30 @@ export default function ({ getService }: FtrProviderContext) { .expect(200); const { - saved_objects: [firstObject, secondObject], + saved_objects: [missingObject, updatedObject], } = response.body; - expect(firstObject).to.eql({ - id: 'dd7caf20-9efd-11e7-acb3-3dab96693fab', + // loose ISO8601 UTC time with milliseconds validation + expect(missingObject).eql({ type: 'visualization', + id: 'not an id', error: { - statusCode: 500, - error: 'Internal Server Error', - message: 'An internal server error occurred', + statusCode: 404, + error: 'Not Found', + message: 'Saved object [visualization/not an id] not found', }, }); - expect(secondObject).to.eql({ + expect(updatedObject) + .to.have.property('updated_at') + .match(/^[\d-]{10}T[\d:\.]{12}Z$/); + expect(_.omit(updatedObject, ['updated_at', 'version'])).to.eql({ id: 'be3733a0-9efe-11e7-acb3-3dab96693fab', type: 'dashboard', - error: { - statusCode: 500, - error: 'Internal Server Error', - message: 'An internal server error occurred', + attributes: { + title: 'An existing dashboard', }, + namespaces: ['default'], }); }); }); diff --git a/test/api_integration/apis/saved_objects/create.ts b/test/api_integration/apis/saved_objects/create.ts index de31b621a64803..dfa7ceb503dfd4 100644 --- a/test/api_integration/apis/saved_objects/create.ts +++ b/test/api_integration/apis/saved_objects/create.ts @@ -12,99 +12,68 @@ import { getKibanaVersion } from './lib/saved_objects_test_utils'; export default function ({ getService }: FtrProviderContext) { const supertest = getService('supertest'); - const es = getService('es'); - const esArchiver = getService('esArchiver'); - const esDeleteAllIndices = getService('esDeleteAllIndices'); + const kibanaServer = getService('kibanaServer'); describe('create', () => { let KIBANA_VERSION: string; before(async () => { KIBANA_VERSION = await getKibanaVersion(getService); + await kibanaServer.importExport.load('saved_objects/basic'); }); - describe('with kibana index', () => { - before(() => esArchiver.load('saved_objects/basic')); - after(() => esArchiver.unload('saved_objects/basic')); - it('should return 200', async () => { - await supertest - .post(`/api/saved_objects/visualization`) - .send({ - attributes: { - title: 'My favorite vis', - }, - }) - .expect(200) - .then((resp) => { - // loose uuid validation - expect(resp.body) - .to.have.property('id') - .match(/^[0-9a-f-]{36}$/); + after(() => kibanaServer.importExport.unload('saved_objects/basic')); - // loose ISO8601 UTC time with milliseconds validation - expect(resp.body) - .to.have.property('updated_at') - .match(/^[\d-]{10}T[\d:\.]{12}Z$/); + it('should return 200', async () => { + await supertest + .post(`/api/saved_objects/visualization`) + .send({ + attributes: { + title: 'My favorite vis', + }, + }) + .expect(200) + .then((resp) => { + // loose uuid validation + expect(resp.body) + .to.have.property('id') + .match(/^[0-9a-f-]{36}$/); - expect(resp.body).to.eql({ - id: resp.body.id, - type: 'visualization', - migrationVersion: resp.body.migrationVersion, - coreMigrationVersion: KIBANA_VERSION, - updated_at: resp.body.updated_at, - version: resp.body.version, - attributes: { - title: 'My favorite vis', - }, - references: [], - namespaces: ['default'], - }); - expect(resp.body.migrationVersion).to.be.ok(); - }); - }); + // loose ISO8601 UTC time with milliseconds validation + expect(resp.body) + .to.have.property('updated_at') + .match(/^[\d-]{10}T[\d:\.]{12}Z$/); - it('result should be updated to the latest coreMigrationVersion', async () => { - await supertest - .post(`/api/saved_objects/visualization`) - .send({ + expect(resp.body).to.eql({ + id: resp.body.id, + type: 'visualization', + migrationVersion: resp.body.migrationVersion, + coreMigrationVersion: KIBANA_VERSION, + updated_at: resp.body.updated_at, + version: resp.body.version, attributes: { title: 'My favorite vis', }, - coreMigrationVersion: '1.2.3', - }) - .expect(200) - .then((resp) => { - expect(resp.body.coreMigrationVersion).to.eql(KIBANA_VERSION); + references: [], + namespaces: ['default'], }); - }); + expect(resp.body.migrationVersion).to.be.ok(); + }); }); - describe('without kibana index', () => { - before( - async () => - // just in case the kibana server has recreated it - await esDeleteAllIndices('.kibana*') - ); - - it('should return 500 and not auto-create saved objects index', async () => { - await supertest - .post(`/api/saved_objects/visualization`) - .send({ - attributes: { - title: 'My favorite vis', - }, - }) - .expect(500) - .then((resp) => { - expect(resp.body).to.eql({ - error: 'Internal Server Error', - message: 'An internal server error occurred.', - statusCode: 500, - }); - }); - - expect((await es.indices.exists({ index: '.kibana' })).body).to.be(false); - }); + it('result should be updated to the latest coreMigrationVersion', async () => { + await supertest + .post(`/api/saved_objects/visualization`) + .send({ + attributes: { + title: 'My favorite vis', + }, + coreMigrationVersion: '1.2.3', + }) + .expect(200) + .then((resp) => { + expect(resp.body.coreMigrationVersion).to.eql(KIBANA_VERSION); + }); }); }); } diff --git a/test/api_integration/apis/saved_objects/delete.ts b/test/api_integration/apis/saved_objects/delete.ts index 0dfece825d3a10..9a4525df1b5f75 100644 --- a/test/api_integration/apis/saved_objects/delete.ts +++ b/test/api_integration/apis/saved_objects/delete.ts @@ -11,53 +11,30 @@ import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ getService }: FtrProviderContext) { const supertest = getService('supertest'); - const esArchiver = getService('esArchiver'); - const esDeleteAllIndices = getService('esDeleteAllIndices'); + const kibanaServer = getService('kibanaServer'); describe('delete', () => { - describe('with kibana index', () => { - before(() => esArchiver.load('saved_objects/basic')); - after(() => esArchiver.unload('saved_objects/basic')); + before(() => kibanaServer.importExport.load('saved_objects/basic')); + after(() => kibanaServer.importExport.unload('saved_objects/basic')); - it('should return 200 when deleting a doc', async () => - await supertest - .delete(`/api/saved_objects/dashboard/be3733a0-9efe-11e7-acb3-3dab96693fab`) - .expect(200) - .then((resp) => { - expect(resp.body).to.eql({}); - })); + it('should return 200 when deleting a doc', async () => + await supertest + .delete(`/api/saved_objects/dashboard/be3733a0-9efe-11e7-acb3-3dab96693fab`) + .expect(200) + .then((resp) => { + expect(resp.body).to.eql({}); + })); - it('should return generic 404 when deleting an unknown doc', async () => - await supertest - .delete(`/api/saved_objects/dashboard/not-a-real-id`) - .expect(404) - .then((resp) => { - expect(resp.body).to.eql({ - statusCode: 404, - error: 'Not Found', - message: 'Saved object [dashboard/not-a-real-id] not found', - }); - })); - }); - - describe('without kibana index', () => { - before( - async () => - // just in case the kibana server has recreated it - await esDeleteAllIndices('.kibana*') - ); - - it('returns generic 404 when kibana index is missing', async () => - await supertest - .delete(`/api/saved_objects/dashboard/be3733a0-9efe-11e7-acb3-3dab96693fab`) - .expect(404) - .then((resp) => { - expect(resp.body).to.eql({ - statusCode: 404, - error: 'Not Found', - message: 'Saved object [dashboard/be3733a0-9efe-11e7-acb3-3dab96693fab] not found', - }); - })); - }); + it('should return generic 404 when deleting an unknown doc', async () => + await supertest + .delete(`/api/saved_objects/dashboard/not-a-real-id`) + .expect(404) + .then((resp) => { + expect(resp.body).to.eql({ + statusCode: 404, + error: 'Not Found', + message: 'Saved object [dashboard/not-a-real-id] not found', + }); + })); }); } diff --git a/test/api_integration/apis/saved_objects/export.ts b/test/api_integration/apis/saved_objects/export.ts index c02ce76340da8b..401ddbfb74e244 100644 --- a/test/api_integration/apis/saved_objects/export.ts +++ b/test/api_integration/apis/saved_objects/export.ts @@ -15,573 +15,558 @@ function ndjsonToObject(input: string) { } export default function ({ getService }: FtrProviderContext) { const supertest = getService('supertest'); - const esArchiver = getService('esArchiver'); - const esDeleteAllIndices = getService('esDeleteAllIndices'); + const kibanaServer = getService('kibanaServer'); + const SPACE_ID = 'ftr-so-export'; describe('export', () => { let KIBANA_VERSION: string; before(async () => { KIBANA_VERSION = await getKibanaVersion(getService); + await kibanaServer.importExport.load('saved_objects/basic', { space: SPACE_ID }); }); - describe('with kibana index', () => { - describe('basic amount of saved objects', () => { - before(() => esArchiver.load('saved_objects/basic')); - after(() => esArchiver.unload('saved_objects/basic')); + after(() => kibanaServer.spaces.delete(SPACE_ID)); - it('should return objects in dependency order', async () => { - await supertest - .post('/api/saved_objects/_export') - .send({ - type: ['index-pattern', 'search', 'visualization', 'dashboard'], - }) - .expect(200) - .then((resp) => { - const objects = ndjsonToObject(resp.text); - expect(objects).to.have.length(4); - expect(objects[0]).to.have.property('id', '91200a00-9efd-11e7-acb3-3dab96693fab'); - expect(objects[0]).to.have.property('type', 'index-pattern'); - expect(objects[1]).to.have.property('id', 'dd7caf20-9efd-11e7-acb3-3dab96693fab'); - expect(objects[1]).to.have.property('type', 'visualization'); - expect(objects[2]).to.have.property('id', 'be3733a0-9efe-11e7-acb3-3dab96693fab'); - expect(objects[2]).to.have.property('type', 'dashboard'); - expect(objects[3]).to.have.property('exportedCount', 3); - expect(objects[3]).to.have.property('missingRefCount', 0); - expect(objects[3].missingReferences).to.have.length(0); - }); - }); + describe('basic amount of saved objects', () => { + it('should return objects in dependency order', async () => { + await supertest + .post(`/s/${SPACE_ID}/api/saved_objects/_export`) + .send({ + type: ['index-pattern', 'search', 'visualization', 'dashboard'], + }) + .expect(200) + .then((resp) => { + const objects = ndjsonToObject(resp.text); + expect(objects).to.have.length(4); + expect(objects[0]).to.have.property('id', '91200a00-9efd-11e7-acb3-3dab96693fab'); + expect(objects[0]).to.have.property('type', 'index-pattern'); + expect(objects[1]).to.have.property('id', 'dd7caf20-9efd-11e7-acb3-3dab96693fab'); + expect(objects[1]).to.have.property('type', 'visualization'); + expect(objects[2]).to.have.property('id', 'be3733a0-9efe-11e7-acb3-3dab96693fab'); + expect(objects[2]).to.have.property('type', 'dashboard'); + expect(objects[3]).to.have.property('exportedCount', 3); + expect(objects[3]).to.have.property('missingRefCount', 0); + expect(objects[3].missingReferences).to.have.length(0); + }); + }); - it('should exclude the export details if asked', async () => { - await supertest - .post('/api/saved_objects/_export') - .send({ - type: ['index-pattern', 'search', 'visualization', 'dashboard'], - excludeExportDetails: true, - }) - .expect(200) - .then((resp) => { - const objects = ndjsonToObject(resp.text); - expect(objects).to.have.length(3); - expect(objects[0]).to.have.property('id', '91200a00-9efd-11e7-acb3-3dab96693fab'); - expect(objects[0]).to.have.property('type', 'index-pattern'); - expect(objects[1]).to.have.property('id', 'dd7caf20-9efd-11e7-acb3-3dab96693fab'); - expect(objects[1]).to.have.property('type', 'visualization'); - expect(objects[2]).to.have.property('id', 'be3733a0-9efe-11e7-acb3-3dab96693fab'); - expect(objects[2]).to.have.property('type', 'dashboard'); - }); - }); + it('should exclude the export details if asked', async () => { + await supertest + .post(`/s/${SPACE_ID}/api/saved_objects/_export`) + .send({ + type: ['index-pattern', 'search', 'visualization', 'dashboard'], + excludeExportDetails: true, + }) + .expect(200) + .then((resp) => { + const objects = ndjsonToObject(resp.text); + expect(objects).to.have.length(3); + expect(objects[0]).to.have.property('id', '91200a00-9efd-11e7-acb3-3dab96693fab'); + expect(objects[0]).to.have.property('type', 'index-pattern'); + expect(objects[1]).to.have.property('id', 'dd7caf20-9efd-11e7-acb3-3dab96693fab'); + expect(objects[1]).to.have.property('type', 'visualization'); + expect(objects[2]).to.have.property('id', 'be3733a0-9efe-11e7-acb3-3dab96693fab'); + expect(objects[2]).to.have.property('type', 'dashboard'); + }); + }); - it('should support including dependencies when exporting selected objects', async () => { - await supertest - .post('/api/saved_objects/_export') - .send({ - includeReferencesDeep: true, - objects: [ - { - type: 'dashboard', - id: 'be3733a0-9efe-11e7-acb3-3dab96693fab', - }, - ], - }) - .expect(200) - .then((resp) => { - const objects = ndjsonToObject(resp.text); - expect(objects).to.have.length(4); - expect(objects[0]).to.have.property('id', '91200a00-9efd-11e7-acb3-3dab96693fab'); - expect(objects[0]).to.have.property('type', 'index-pattern'); - expect(objects[1]).to.have.property('id', 'dd7caf20-9efd-11e7-acb3-3dab96693fab'); - expect(objects[1]).to.have.property('type', 'visualization'); - expect(objects[2]).to.have.property('id', 'be3733a0-9efe-11e7-acb3-3dab96693fab'); - expect(objects[2]).to.have.property('type', 'dashboard'); - expect(objects[3]).to.have.property('exportedCount', 3); - expect(objects[3]).to.have.property('missingRefCount', 0); - expect(objects[3].missingReferences).to.have.length(0); - }); - }); + it('should support including dependencies when exporting selected objects', async () => { + await supertest + .post(`/s/${SPACE_ID}/api/saved_objects/_export`) + .send({ + includeReferencesDeep: true, + objects: [ + { + type: 'dashboard', + id: 'be3733a0-9efe-11e7-acb3-3dab96693fab', + }, + ], + }) + .expect(200) + .then((resp) => { + const objects = ndjsonToObject(resp.text); + expect(objects).to.have.length(4); + expect(objects[0]).to.have.property('id', '91200a00-9efd-11e7-acb3-3dab96693fab'); + expect(objects[0]).to.have.property('type', 'index-pattern'); + expect(objects[1]).to.have.property('id', 'dd7caf20-9efd-11e7-acb3-3dab96693fab'); + expect(objects[1]).to.have.property('type', 'visualization'); + expect(objects[2]).to.have.property('id', 'be3733a0-9efe-11e7-acb3-3dab96693fab'); + expect(objects[2]).to.have.property('type', 'dashboard'); + expect(objects[3]).to.have.property('exportedCount', 3); + expect(objects[3]).to.have.property('missingRefCount', 0); + expect(objects[3].missingReferences).to.have.length(0); + }); + }); - it('should support including dependencies when exporting by type', async () => { - await supertest - .post('/api/saved_objects/_export') - .send({ - includeReferencesDeep: true, - type: ['dashboard'], - }) - .expect(200) - .then((resp) => { - const objects = resp.text.split('\n').map((str) => JSON.parse(str)); - expect(objects).to.have.length(4); - expect(objects[0]).to.have.property('id', '91200a00-9efd-11e7-acb3-3dab96693fab'); - expect(objects[0]).to.have.property('type', 'index-pattern'); - expect(objects[1]).to.have.property('id', 'dd7caf20-9efd-11e7-acb3-3dab96693fab'); - expect(objects[1]).to.have.property('type', 'visualization'); - expect(objects[2]).to.have.property('id', 'be3733a0-9efe-11e7-acb3-3dab96693fab'); - expect(objects[2]).to.have.property('type', 'dashboard'); - expect(objects[3]).to.have.property('exportedCount', 3); - expect(objects[3]).to.have.property('missingRefCount', 0); - expect(objects[3].missingReferences).to.have.length(0); - }); - }); + it('should support including dependencies when exporting by type', async () => { + await supertest + .post(`/s/${SPACE_ID}/api/saved_objects/_export`) + .send({ + includeReferencesDeep: true, + type: ['dashboard'], + }) + .expect(200) + .then((resp) => { + const objects = resp.text.split('\n').map((str) => JSON.parse(str)); + expect(objects).to.have.length(4); + expect(objects[0]).to.have.property('id', '91200a00-9efd-11e7-acb3-3dab96693fab'); + expect(objects[0]).to.have.property('type', 'index-pattern'); + expect(objects[1]).to.have.property('id', 'dd7caf20-9efd-11e7-acb3-3dab96693fab'); + expect(objects[1]).to.have.property('type', 'visualization'); + expect(objects[2]).to.have.property('id', 'be3733a0-9efe-11e7-acb3-3dab96693fab'); + expect(objects[2]).to.have.property('type', 'dashboard'); + expect(objects[3]).to.have.property('exportedCount', 3); + expect(objects[3]).to.have.property('missingRefCount', 0); + expect(objects[3].missingReferences).to.have.length(0); + }); + }); - it('should support including dependencies when exporting by type and search', async () => { - await supertest - .post('/api/saved_objects/_export') - .send({ - includeReferencesDeep: true, - type: ['dashboard'], - search: 'Requests*', - }) - .expect(200) - .then((resp) => { - const objects = ndjsonToObject(resp.text); - expect(objects).to.have.length(4); - expect(objects[0]).to.have.property('id', '91200a00-9efd-11e7-acb3-3dab96693fab'); - expect(objects[0]).to.have.property('type', 'index-pattern'); - expect(objects[1]).to.have.property('id', 'dd7caf20-9efd-11e7-acb3-3dab96693fab'); - expect(objects[1]).to.have.property('type', 'visualization'); - expect(objects[2]).to.have.property('id', 'be3733a0-9efe-11e7-acb3-3dab96693fab'); - expect(objects[2]).to.have.property('type', 'dashboard'); - expect(objects[3]).to.have.property('exportedCount', 3); - expect(objects[3]).to.have.property('missingRefCount', 0); - expect(objects[3].missingReferences).to.have.length(0); - }); - }); + it('should support including dependencies when exporting by type and search', async () => { + await supertest + .post(`/s/${SPACE_ID}/api/saved_objects/_export`) + .send({ + includeReferencesDeep: true, + type: ['dashboard'], + search: 'Requests*', + }) + .expect(200) + .then((resp) => { + const objects = ndjsonToObject(resp.text); + expect(objects).to.have.length(4); + expect(objects[0]).to.have.property('id', '91200a00-9efd-11e7-acb3-3dab96693fab'); + expect(objects[0]).to.have.property('type', 'index-pattern'); + expect(objects[1]).to.have.property('id', 'dd7caf20-9efd-11e7-acb3-3dab96693fab'); + expect(objects[1]).to.have.property('type', 'visualization'); + expect(objects[2]).to.have.property('id', 'be3733a0-9efe-11e7-acb3-3dab96693fab'); + expect(objects[2]).to.have.property('type', 'dashboard'); + expect(objects[3]).to.have.property('exportedCount', 3); + expect(objects[3]).to.have.property('missingRefCount', 0); + expect(objects[3].missingReferences).to.have.length(0); + }); + }); - it(`should throw error when object doesn't exist`, async () => { - await supertest - .post('/api/saved_objects/_export') - .send({ - objects: [ - { - type: 'dashboard', - id: '1', - }, - ], - }) - .expect(400) - .then((resp) => { - expect(resp.body).to.eql({ - statusCode: 400, - error: 'Bad Request', - message: 'Error fetching objects to export', - attributes: { - objects: [ - { - id: '1', - type: 'dashboard', - error: { - error: 'Not Found', - message: 'Saved object [dashboard/1] not found', - statusCode: 404, - }, + it(`should throw error when object doesn't exist`, async () => { + await supertest + .post(`/s/${SPACE_ID}/api/saved_objects/_export`) + .send({ + objects: [ + { + type: 'dashboard', + id: '1', + }, + ], + }) + .expect(400) + .then((resp) => { + expect(resp.body).to.eql({ + statusCode: 400, + error: 'Bad Request', + message: 'Error fetching objects to export', + attributes: { + objects: [ + { + id: '1', + type: 'dashboard', + error: { + error: 'Not Found', + message: 'Saved object [dashboard/1] not found', + statusCode: 404, }, - ], - }, - }); + }, + ], + }, }); - }); + }); + }); - it(`should return 400 when exporting unsupported type`, async () => { - await supertest - .post('/api/saved_objects/_export') - .send({ - type: ['wigwags'], - }) - .expect(400) - .then((resp) => { - expect(resp.body).to.eql({ - statusCode: 400, - error: 'Bad Request', - message: 'Trying to export non-exportable type(s): wigwags', - }); + it(`should return 400 when exporting unsupported type`, async () => { + await supertest + .post(`/s/${SPACE_ID}/api/saved_objects/_export`) + .send({ + type: ['wigwags'], + }) + .expect(400) + .then((resp) => { + expect(resp.body).to.eql({ + statusCode: 400, + error: 'Bad Request', + message: 'Trying to export non-exportable type(s): wigwags', }); - }); + }); + }); - it(`should return 400 when exporting objects with unsupported type`, async () => { - await supertest - .post('/api/saved_objects/_export') - .send({ - objects: [ - { - type: 'wigwags', - id: '1', - }, - ], - }) - .expect(400) - .then((resp) => { - expect(resp.body).to.eql({ - statusCode: 400, - error: 'Bad Request', - message: 'Trying to export object(s) with non-exportable types: wigwags:1', - }); + it(`should return 400 when exporting objects with unsupported type`, async () => { + await supertest + .post(`/s/${SPACE_ID}/api/saved_objects/_export`) + .send({ + objects: [ + { + type: 'wigwags', + id: '1', + }, + ], + }) + .expect(400) + .then((resp) => { + expect(resp.body).to.eql({ + statusCode: 400, + error: 'Bad Request', + message: 'Trying to export object(s) with non-exportable types: wigwags:1', }); - }); + }); + }); - it('should export object with circular refs', async () => { - const soWithCycliRefs = [ - { - type: 'dashboard', - id: 'dashboard-a', - attributes: { - title: 'dashboard-a', + it('should export object with circular refs', async () => { + const soWithCycliRefs = [ + { + type: 'dashboard', + id: 'dashboard-a', + attributes: { + title: 'dashboard-a', + }, + references: [ + { + name: 'circular-dashboard-ref', + id: 'dashboard-b', + type: 'dashboard', }, - references: [ - { - name: 'circular-dashboard-ref', - id: 'dashboard-b', - type: 'dashboard', - }, - ], + ], + }, + { + type: 'dashboard', + id: 'dashboard-b', + attributes: { + title: 'dashboard-b', }, - { - type: 'dashboard', - id: 'dashboard-b', + references: [ + { + name: 'circular-dashboard-ref', + id: 'dashboard-a', + type: 'dashboard', + }, + ], + }, + ]; + await supertest + .post(`/s/${SPACE_ID}/api/saved_objects/_bulk_create`) + .send(soWithCycliRefs) + .expect(200); + const resp = await supertest + .post(`/s/${SPACE_ID}/api/saved_objects/_export`) + .send({ + includeReferencesDeep: true, + type: ['dashboard'], + }) + .expect(200); + + const objects = ndjsonToObject(resp.text); + expect(objects.find((o) => o.id === 'dashboard-a')).to.be.ok(); + expect(objects.find((o) => o.id === 'dashboard-b')).to.be.ok(); + }); + }); + + describe('10,000 objects', () => { + before(async () => { + const fileChunks = []; + for (let i = 0; i <= 9995; i++) { + fileChunks.push( + JSON.stringify({ + type: 'visualization', + id: `${SPACE_ID}-${i}`, attributes: { - title: 'dashboard-b', + title: `My visualization (${i})`, + uiStateJSON: '{}', + visState: '{}', }, references: [ { - name: 'circular-dashboard-ref', - id: 'dashboard-a', - type: 'dashboard', + name: 'kibanaSavedObjectMeta.searchSourceJSON.index', + type: 'index-pattern', + id: '91200a00-9efd-11e7-acb3-3dab96693fab', }, ], - }, - ]; - await supertest.post('/api/saved_objects/_bulk_create').send(soWithCycliRefs).expect(200); - const resp = await supertest - .post('/api/saved_objects/_export') - .send({ - includeReferencesDeep: true, - type: ['dashboard'], }) - .expect(200); + ); + } - const objects = ndjsonToObject(resp.text); - expect(objects.find((o) => o.id === 'dashboard-a')).to.be.ok(); - expect(objects.find((o) => o.id === 'dashboard-b')).to.be.ok(); - }); + await supertest + .post(`/s/${SPACE_ID}/api/saved_objects/_import`) + .attach('file', Buffer.from(fileChunks.join('\n'), 'utf8'), 'export.ndjson') + .expect(200); }); - describe('10,000 objects', () => { - before(() => esArchiver.load('saved_objects/10k')); - after(() => esArchiver.unload('saved_objects/10k')); - - it('should return 400 when exporting without type or objects passed in', async () => { - await supertest - .post('/api/saved_objects/_export') - .expect(400) - .then((resp) => { - expect(resp.body).to.eql({ - statusCode: 400, - error: 'Bad Request', - message: '[request body]: expected a plain object value, but found [null] instead.', - }); + it('should return 400 when exporting without type or objects passed in', async () => { + await supertest + .post(`/s/${SPACE_ID}/api/saved_objects/_export`) + .expect(400) + .then((resp) => { + expect(resp.body).to.eql({ + statusCode: 400, + error: 'Bad Request', + message: '[request body]: expected a plain object value, but found [null] instead.', }); - }); - - it('should return 200 when exporting by single type', async () => { - await supertest - .post('/api/saved_objects/_export') - .send({ - type: 'dashboard', - excludeExportDetails: true, - }) - .expect(200) - .then((resp) => { - expect(resp.header['content-disposition']).to.eql( - 'attachment; filename="export.ndjson"' - ); - expect(resp.header['content-type']).to.eql('application/ndjson'); - const objects = ndjsonToObject(resp.text); + }); + }); - // Sort values aren't deterministic so we need to exclude them - const { sort, ...obj } = objects[0]; - expect(obj).to.eql({ - attributes: { - description: '', - hits: 0, - kibanaSavedObjectMeta: { - searchSourceJSON: objects[0].attributes.kibanaSavedObjectMeta.searchSourceJSON, - }, - optionsJSON: objects[0].attributes.optionsJSON, - panelsJSON: objects[0].attributes.panelsJSON, - refreshInterval: { - display: 'Off', - pause: false, - value: 0, - }, - timeFrom: 'Wed Sep 16 2015 22:52:17 GMT-0700', - timeRestore: true, - timeTo: 'Fri Sep 18 2015 12:24:38 GMT-0700', - title: 'Requests', - version: 1, - }, - id: 'be3733a0-9efe-11e7-acb3-3dab96693fab', - migrationVersion: objects[0].migrationVersion, - coreMigrationVersion: KIBANA_VERSION, - references: [ - { - id: 'dd7caf20-9efd-11e7-acb3-3dab96693fab', - name: '1:panel_1', - type: 'visualization', - }, - ], - type: 'dashboard', - updated_at: '2017-09-21T18:57:40.826Z', - version: objects[0].version, - }); - expect(objects[0].migrationVersion).to.be.ok(); - expect(() => - JSON.parse(objects[0].attributes.kibanaSavedObjectMeta.searchSourceJSON) - ).not.to.throwError(); - expect(() => JSON.parse(objects[0].attributes.optionsJSON)).not.to.throwError(); - expect(() => JSON.parse(objects[0].attributes.panelsJSON)).not.to.throwError(); - }); - }); + it('should return 200 when exporting by single type', async () => { + await supertest + .post(`/s/${SPACE_ID}/api/saved_objects/_export`) + .send({ + type: 'dashboard', + excludeExportDetails: true, + }) + .expect(200) + .then((resp) => { + expect(resp.header['content-disposition']).to.eql( + 'attachment; filename="export.ndjson"' + ); + expect(resp.header['content-type']).to.eql('application/ndjson'); + const objects = ndjsonToObject(resp.text); - it('should return 200 when exporting by array type', async () => { - await supertest - .post('/api/saved_objects/_export') - .send({ - type: ['dashboard'], - excludeExportDetails: true, - }) - .expect(200) - .then((resp) => { - expect(resp.header['content-disposition']).to.eql( - 'attachment; filename="export.ndjson"' - ); - expect(resp.header['content-type']).to.eql('application/ndjson'); - const objects = ndjsonToObject(resp.text); + // Sort values aren't deterministic so we need to exclude them + const { sort, ...obj } = objects[0]; - // Sort values aren't deterministic so we need to exclude them - const { sort, ...obj } = objects[0]; - expect(obj).to.eql({ - attributes: { - description: '', - hits: 0, - kibanaSavedObjectMeta: { - searchSourceJSON: objects[0].attributes.kibanaSavedObjectMeta.searchSourceJSON, - }, - optionsJSON: objects[0].attributes.optionsJSON, - panelsJSON: objects[0].attributes.panelsJSON, - refreshInterval: { - display: 'Off', - pause: false, - value: 0, - }, - timeFrom: 'Wed Sep 16 2015 22:52:17 GMT-0700', - timeRestore: true, - timeTo: 'Fri Sep 18 2015 12:24:38 GMT-0700', - title: 'Requests', - version: 1, + expect(obj).to.eql({ + attributes: { + description: '', + hits: 0, + kibanaSavedObjectMeta: { + searchSourceJSON: objects[0].attributes.kibanaSavedObjectMeta.searchSourceJSON, }, - id: 'be3733a0-9efe-11e7-acb3-3dab96693fab', - migrationVersion: objects[0].migrationVersion, - coreMigrationVersion: KIBANA_VERSION, - references: [ - { - id: 'dd7caf20-9efd-11e7-acb3-3dab96693fab', - name: '1:panel_1', - type: 'visualization', - }, - ], - type: 'dashboard', - updated_at: '2017-09-21T18:57:40.826Z', - version: objects[0].version, - }); - expect(objects[0].migrationVersion).to.be.ok(); - expect(() => - JSON.parse(objects[0].attributes.kibanaSavedObjectMeta.searchSourceJSON) - ).not.to.throwError(); - expect(() => JSON.parse(objects[0].attributes.optionsJSON)).not.to.throwError(); - expect(() => JSON.parse(objects[0].attributes.panelsJSON)).not.to.throwError(); - }); - }); - - it('should return 200 when exporting by objects', async () => { - await supertest - .post('/api/saved_objects/_export') - .send({ - objects: [ + optionsJSON: objects[0].attributes.optionsJSON, + panelsJSON: objects[0].attributes.panelsJSON, + refreshInterval: { + display: 'Off', + pause: false, + value: 0, + }, + timeFrom: 'Wed Sep 16 2015 22:52:17 GMT-0700', + timeRestore: true, + timeTo: 'Fri Sep 18 2015 12:24:38 GMT-0700', + title: 'Requests', + version: 1, + }, + id: 'be3733a0-9efe-11e7-acb3-3dab96693fab', + migrationVersion: objects[0].migrationVersion, + coreMigrationVersion: KIBANA_VERSION, + references: [ { - type: 'dashboard', - id: 'be3733a0-9efe-11e7-acb3-3dab96693fab', + id: 'dd7caf20-9efd-11e7-acb3-3dab96693fab', + name: '1:panel_1', + type: 'visualization', }, ], - excludeExportDetails: true, - }) - .expect(200) - .then((resp) => { - expect(resp.header['content-disposition']).to.eql( - 'attachment; filename="export.ndjson"' - ); - expect(resp.header['content-type']).to.eql('application/ndjson'); - const objects = ndjsonToObject(resp.text); - - // Sort values aren't deterministic so we need to exclude them - const { sort, ...obj } = objects[0]; - expect(obj).to.eql({ - attributes: { - description: '', - hits: 0, - kibanaSavedObjectMeta: { - searchSourceJSON: objects[0].attributes.kibanaSavedObjectMeta.searchSourceJSON, - }, - optionsJSON: objects[0].attributes.optionsJSON, - panelsJSON: objects[0].attributes.panelsJSON, - refreshInterval: { - display: 'Off', - pause: false, - value: 0, - }, - timeFrom: 'Wed Sep 16 2015 22:52:17 GMT-0700', - timeRestore: true, - timeTo: 'Fri Sep 18 2015 12:24:38 GMT-0700', - title: 'Requests', - version: 1, - }, - id: 'be3733a0-9efe-11e7-acb3-3dab96693fab', - migrationVersion: objects[0].migrationVersion, - coreMigrationVersion: KIBANA_VERSION, - references: [ - { - id: 'dd7caf20-9efd-11e7-acb3-3dab96693fab', - name: '1:panel_1', - type: 'visualization', - }, - ], - type: 'dashboard', - updated_at: '2017-09-21T18:57:40.826Z', - version: objects[0].version, - }); - expect(objects[0].migrationVersion).to.be.ok(); - expect(() => - JSON.parse(objects[0].attributes.kibanaSavedObjectMeta.searchSourceJSON) - ).not.to.throwError(); - expect(() => JSON.parse(objects[0].attributes.optionsJSON)).not.to.throwError(); - expect(() => JSON.parse(objects[0].attributes.panelsJSON)).not.to.throwError(); + type: 'dashboard', + updated_at: objects[0].updated_at, + version: objects[0].version, }); - }); + expect(objects[0].migrationVersion).to.be.ok(); + expect(() => + JSON.parse(objects[0].attributes.kibanaSavedObjectMeta.searchSourceJSON) + ).not.to.throwError(); + expect(() => JSON.parse(objects[0].attributes.optionsJSON)).not.to.throwError(); + expect(() => JSON.parse(objects[0].attributes.panelsJSON)).not.to.throwError(); + }); + }); - it('should return 400 when exporting by type and objects', async () => { - await supertest - .post('/api/saved_objects/_export') - .send({ - type: 'dashboard', - objects: [ + it('should return 200 when exporting by array type', async () => { + await supertest + .post(`/s/${SPACE_ID}/api/saved_objects/_export`) + .send({ + type: ['dashboard'], + excludeExportDetails: true, + }) + .expect(200) + .then((resp) => { + expect(resp.header['content-disposition']).to.eql( + 'attachment; filename="export.ndjson"' + ); + expect(resp.header['content-type']).to.eql('application/ndjson'); + const objects = ndjsonToObject(resp.text); + + // Sort values aren't deterministic so we need to exclude them + const { sort, ...obj } = objects[0]; + expect(obj).to.eql({ + attributes: { + description: '', + hits: 0, + kibanaSavedObjectMeta: { + searchSourceJSON: objects[0].attributes.kibanaSavedObjectMeta.searchSourceJSON, + }, + optionsJSON: objects[0].attributes.optionsJSON, + panelsJSON: objects[0].attributes.panelsJSON, + refreshInterval: { + display: 'Off', + pause: false, + value: 0, + }, + timeFrom: 'Wed Sep 16 2015 22:52:17 GMT-0700', + timeRestore: true, + timeTo: 'Fri Sep 18 2015 12:24:38 GMT-0700', + title: 'Requests', + version: 1, + }, + id: 'be3733a0-9efe-11e7-acb3-3dab96693fab', + migrationVersion: objects[0].migrationVersion, + coreMigrationVersion: KIBANA_VERSION, + references: [ { - type: 'dashboard', - id: 'be3733a0-9efe-11e7-acb3-3dab96693fab', + id: 'dd7caf20-9efd-11e7-acb3-3dab96693fab', + name: '1:panel_1', + type: 'visualization', }, ], - excludeExportDetails: true, - }) - .expect(400) - .then((resp) => { - expect(resp.body).to.eql({ - statusCode: 400, - error: 'Bad Request', - message: `Can't specify both "types" and "objects" properties when exporting`, - }); + type: 'dashboard', + updated_at: objects[0].updated_at, + version: objects[0].version, }); - }); + expect(objects[0].migrationVersion).to.be.ok(); + expect(() => + JSON.parse(objects[0].attributes.kibanaSavedObjectMeta.searchSourceJSON) + ).not.to.throwError(); + expect(() => JSON.parse(objects[0].attributes.optionsJSON)).not.to.throwError(); + expect(() => JSON.parse(objects[0].attributes.panelsJSON)).not.to.throwError(); + }); }); - describe('10,001 objects', () => { - let customVisId: string; - before(async () => { - await esArchiver.load('saved_objects/10k'); - await supertest - .post('/api/saved_objects/visualization') - .send({ - attributes: { - title: 'My favorite vis', + it('should return 200 when exporting by objects', async () => { + await supertest + .post(`/s/${SPACE_ID}/api/saved_objects/_export`) + .send({ + objects: [ + { + type: 'dashboard', + id: 'be3733a0-9efe-11e7-acb3-3dab96693fab', }, - }) - .expect(200) - .then((resp) => { - customVisId = resp.body.id; - }); - }); - after(async () => { - await supertest.delete(`/api/saved_objects/visualization/${customVisId}`).expect(200); - await esArchiver.unload('saved_objects/10k'); - }); - - it('should allow exporting more than 10,000 objects if permitted by maxImportExportSize', async () => { - await supertest - .post('/api/saved_objects/_export') - .send({ - type: ['dashboard', 'visualization', 'search', 'index-pattern'], - excludeExportDetails: true, - }) - .expect(200) - .then((resp) => { - expect(resp.header['content-disposition']).to.eql( - 'attachment; filename="export.ndjson"' - ); - expect(resp.header['content-type']).to.eql('application/ndjson'); - const objects = ndjsonToObject(resp.text); - expect(objects.length).to.eql(10001); - }); - }); + ], + excludeExportDetails: true, + }) + .expect(200) + .then((resp) => { + expect(resp.header['content-disposition']).to.eql( + 'attachment; filename="export.ndjson"' + ); + expect(resp.header['content-type']).to.eql('application/ndjson'); + const objects = ndjsonToObject(resp.text); - it('should return 400 when exporting more than allowed by maxImportExportSize', async () => { - let anotherCustomVisId: string; - await supertest - .post('/api/saved_objects/visualization') - .send({ + // Sort values aren't deterministic so we need to exclude them + const { sort, ...obj } = objects[0]; + expect(obj).to.eql({ attributes: { - title: 'My other favorite vis', + description: '', + hits: 0, + kibanaSavedObjectMeta: { + searchSourceJSON: objects[0].attributes.kibanaSavedObjectMeta.searchSourceJSON, + }, + optionsJSON: objects[0].attributes.optionsJSON, + panelsJSON: objects[0].attributes.panelsJSON, + refreshInterval: { + display: 'Off', + pause: false, + value: 0, + }, + timeFrom: 'Wed Sep 16 2015 22:52:17 GMT-0700', + timeRestore: true, + timeTo: 'Fri Sep 18 2015 12:24:38 GMT-0700', + title: 'Requests', + version: 1, }, - }) - .expect(200) - .then((resp) => { - anotherCustomVisId = resp.body.id; - }); - await supertest - .post('/api/saved_objects/_export') - .send({ - type: ['dashboard', 'visualization', 'search', 'index-pattern'], - excludeExportDetails: true, - }) - .expect(400) - .then((resp) => { - expect(resp.body).to.eql({ - statusCode: 400, - error: 'Bad Request', - message: `Can't export more than 10001 objects. If your server has enough memory, this limit can be increased by adjusting the \"savedObjects.maxImportExportSize\" setting.`, - }); + id: 'be3733a0-9efe-11e7-acb3-3dab96693fab', + migrationVersion: objects[0].migrationVersion, + coreMigrationVersion: KIBANA_VERSION, + references: [ + { + id: 'dd7caf20-9efd-11e7-acb3-3dab96693fab', + name: '1:panel_1', + type: 'visualization', + }, + ], + type: 'dashboard', + updated_at: objects[0].updated_at, + version: objects[0].version, }); - await supertest - // @ts-expect-error TS complains about using `anotherCustomVisId` before it is assigned - .delete(`/api/saved_objects/visualization/${anotherCustomVisId}`) - .expect(200); - }); + expect(objects[0].migrationVersion).to.be.ok(); + expect(() => + JSON.parse(objects[0].attributes.kibanaSavedObjectMeta.searchSourceJSON) + ).not.to.throwError(); + expect(() => JSON.parse(objects[0].attributes.optionsJSON)).not.to.throwError(); + expect(() => JSON.parse(objects[0].attributes.panelsJSON)).not.to.throwError(); + }); }); - }); - describe('without kibana index', () => { - before( - async () => - // just in case the kibana server has recreated it - await esDeleteAllIndices('.kibana*') - ); + it('should return 400 when exporting by type and objects', async () => { + await supertest + .post(`/s/${SPACE_ID}/api/saved_objects/_export`) + .send({ + type: 'dashboard', + objects: [ + { + type: 'dashboard', + id: 'be3733a0-9efe-11e7-acb3-3dab96693fab', + }, + ], + excludeExportDetails: true, + }) + .expect(400) + .then((resp) => { + expect(resp.body).to.eql({ + statusCode: 400, + error: 'Bad Request', + message: `Can't specify both "types" and "objects" properties when exporting`, + }); + }); + }); - it('should return empty response', async () => { + it('should allow exporting more than 10,000 objects if permitted by maxImportExportSize', async () => { await supertest - .post('/api/saved_objects/_export') + .post(`/s/${SPACE_ID}/api/saved_objects/_export`) .send({ - type: ['index-pattern', 'search', 'visualization', 'dashboard'], + type: ['dashboard', 'visualization', 'search', 'index-pattern'], excludeExportDetails: true, }) .expect(200) .then((resp) => { - expect(resp.text).to.eql(''); + expect(resp.header['content-disposition']).to.eql( + 'attachment; filename="export.ndjson"' + ); + expect(resp.header['content-type']).to.eql('application/ndjson'); + const objects = ndjsonToObject(resp.text); + expect(objects.length).to.eql(10001); + }); + }); + + it('should return 400 when exporting more than allowed by maxImportExportSize', async () => { + let anotherCustomVisId: string; + await supertest + .post(`/s/${SPACE_ID}/api/saved_objects/visualization`) + .send({ + attributes: { + title: 'My other favorite vis', + }, + }) + .expect(200) + .then((resp) => { + anotherCustomVisId = resp.body.id; + }); + await supertest + .post(`/s/${SPACE_ID}/api/saved_objects/_export`) + .send({ + type: ['dashboard', 'visualization', 'search', 'index-pattern'], + excludeExportDetails: true, + }) + .expect(400) + .then((resp) => { + expect(resp.body).to.eql({ + statusCode: 400, + error: 'Bad Request', + message: `Can't export more than 10001 objects. If your server has enough memory, this limit can be increased by adjusting the \"savedObjects.maxImportExportSize\" setting.`, + }); }); + await supertest + // @ts-expect-error TS complains about using `anotherCustomVisId` before it is assigned + .delete(`/s/${SPACE_ID}/api/saved_objects/visualization/${anotherCustomVisId}`) + .expect(200); }); }); }); diff --git a/test/api_integration/apis/saved_objects/find.ts b/test/api_integration/apis/saved_objects/find.ts index a4862707e2d0ef..4d99061f322a53 100644 --- a/test/api_integration/apis/saved_objects/find.ts +++ b/test/api_integration/apis/saved_objects/find.ts @@ -12,303 +12,317 @@ import { SavedObject } from '../../../../src/core/server'; export default function ({ getService }: FtrProviderContext) { const supertest = getService('supertest'); - const esArchiver = getService('esArchiver'); - const esDeleteAllIndices = getService('esDeleteAllIndices'); + const kibanaServer = getService('kibanaServer'); + const SPACE_ID = 'ftr-so-find'; describe('find', () => { - describe('with kibana index', () => { - before(() => esArchiver.load('saved_objects/basic')); - after(() => esArchiver.unload('saved_objects/basic')); + before(async () => { + await kibanaServer.importExport.load('saved_objects/basic', { space: SPACE_ID }); + await kibanaServer.importExport.load('saved_objects/basic/foo-ns', { + space: `${SPACE_ID}-foo`, + }); + }); - it('should return 200 with individual responses', async () => + after(() => kibanaServer.spaces.delete(SPACE_ID)); + + it('should return 200 with individual responses', async () => + await supertest + .get(`/s/${SPACE_ID}/api/saved_objects/_find?type=visualization&fields=title`) + .expect(200) + .then((resp) => { + expect(resp.body.saved_objects.map((so: { id: string }) => so.id)).to.eql([ + 'dd7caf20-9efd-11e7-acb3-3dab96693fab', + ]); + expect(resp.body.saved_objects[0].migrationVersion).to.be.ok(); + })); + + describe('unknown type', () => { + it('should return 200 with empty response', async () => await supertest - .get('/api/saved_objects/_find?type=visualization&fields=title') + .get(`/s/${SPACE_ID}/api/saved_objects/_find?type=wigwags`) .expect(200) .then((resp) => { - expect(resp.body.saved_objects.map((so: { id: string }) => so.id)).to.eql([ - 'dd7caf20-9efd-11e7-acb3-3dab96693fab', - ]); - expect(resp.body.saved_objects[0].migrationVersion).to.be.ok(); + expect(resp.body).to.eql({ + page: 1, + per_page: 20, + total: 0, + saved_objects: [], + }); })); + }); - describe('unknown type', () => { - it('should return 200 with empty response', async () => - await supertest - .get('/api/saved_objects/_find?type=wigwags') - .expect(200) - .then((resp) => { - expect(resp.body).to.eql({ - page: 1, - per_page: 20, - total: 0, - saved_objects: [], - }); - })); - }); + // FLAKY: https://github.com/elastic/kibana/issues/85911 + describe.skip('page beyond total', () => { + it('should return 200 with empty response', async () => + await supertest + .get(`/s/${SPACE_ID}/api/saved_objects/_find?type=visualization&page=100&per_page=100`) + .expect(200) + .then((resp) => { + expect(resp.body).to.eql({ + page: 100, + per_page: 100, + total: 1, + saved_objects: [], + }); + })); + }); - // FLAKY: https://github.com/elastic/kibana/issues/85911 - describe.skip('page beyond total', () => { - it('should return 200 with empty response', async () => - await supertest - .get('/api/saved_objects/_find?type=visualization&page=100&per_page=100') - .expect(200) - .then((resp) => { - expect(resp.body).to.eql({ - page: 100, - per_page: 100, - total: 1, - saved_objects: [], - }); - })); - }); + describe('unknown search field', () => { + it('should return 200 with empty response', async () => + await supertest + .get(`/s/${SPACE_ID}/api/saved_objects/_find?type=url&search_fields=a`) + .expect(200) + .then((resp) => { + expect(resp.body).to.eql({ + page: 1, + per_page: 20, + total: 0, + saved_objects: [], + }); + })); + }); - describe('unknown search field', () => { - it('should return 200 with empty response', async () => - await supertest - .get('/api/saved_objects/_find?type=url&search_fields=a') - .expect(200) - .then((resp) => { - expect(resp.body).to.eql({ - page: 1, - per_page: 20, - total: 0, - saved_objects: [], - }); - })); - }); + describe('unknown namespace', () => { + it('should return 200 with empty response', async () => + await supertest + .get(`/s/${SPACE_ID}/api/saved_objects/_find?type=visualization&namespaces=foo`) + .expect(200) + .then((resp) => { + expect(resp.body).to.eql({ + page: 1, + per_page: 20, + total: 0, + saved_objects: [], + }); + })); + }); - describe('unknown namespace', () => { - it('should return 200 with empty response', async () => - await supertest - .get('/api/saved_objects/_find?type=visualization&namespaces=foo') - .expect(200) - .then((resp) => { - expect(resp.body).to.eql({ - page: 1, - per_page: 20, - total: 0, - saved_objects: [], - }); - })); - }); + describe('known namespace', () => { + it('should return 200 with individual responses', async () => + await supertest + .get(`/api/saved_objects/_find?type=visualization&fields=title&namespaces=${SPACE_ID}`) + .expect(200) + .then((resp) => { + expect( + resp.body.saved_objects.map((so: { id: string; namespaces: string[] }) => ({ + id: so.id, + namespaces: so.namespaces, + })) + ).to.eql([{ id: 'dd7caf20-9efd-11e7-acb3-3dab96693fab', namespaces: [SPACE_ID] }]); + expect(resp.body.saved_objects[0].migrationVersion).to.be.ok(); + })); + }); - describe('known namespace', () => { - it('should return 200 with individual responses', async () => - await supertest - .get('/api/saved_objects/_find?type=visualization&fields=title&namespaces=default') - .expect(200) - .then((resp) => { - expect( - resp.body.saved_objects.map((so: { id: string; namespaces: string[] }) => ({ - id: so.id, - namespaces: so.namespaces, - })) - ).to.eql([{ id: 'dd7caf20-9efd-11e7-acb3-3dab96693fab', namespaces: ['default'] }]); - expect(resp.body.saved_objects[0].migrationVersion).to.be.ok(); - })); - }); + describe('wildcard namespace', () => { + it('should return 200 with individual responses from the all namespaces', async () => + await supertest + .get(`/api/saved_objects/_find?type=visualization&fields=title&namespaces=*`) + .expect(200) + .then((resp) => { + const knownDocuments = resp.body.saved_objects.filter((so: { namespaces: string[] }) => + so.namespaces.some((ns) => [SPACE_ID, `${SPACE_ID}-foo`].includes(ns)) + ); - describe('wildcard namespace', () => { - it('should return 200 with individual responses from the all namespaces', async () => - await supertest - .get('/api/saved_objects/_find?type=visualization&fields=title&namespaces=*') - .expect(200) - .then((resp) => { - expect( - resp.body.saved_objects.map((so: { id: string; namespaces: string[] }) => ({ - id: so.id, - namespaces: so.namespaces, - })) - ).to.eql([ - { id: 'dd7caf20-9efd-11e7-acb3-3dab96693fab', namespaces: ['default'] }, - { id: 'dd7caf20-9efd-11e7-acb3-3dab96693fab', namespaces: ['foo-ns'] }, - ]); - })); - }); + expect( + knownDocuments.map((so: { id: string; namespaces: string[] }) => ({ + id: so.id, + namespaces: so.namespaces, + })) + ).to.eql([ + { id: 'dd7caf20-9efd-11e7-acb3-3dab96693fab', namespaces: [SPACE_ID] }, + { id: 'dd7caf20-9efd-11e7-acb3-3dab96693fab', namespaces: [`${SPACE_ID}-foo`] }, + ]); + })); + }); - describe('with a filter', () => { - it('should return 200 with a valid response', async () => - await supertest - .get( - '/api/saved_objects/_find?type=visualization&filter=visualization.attributes.title:"Count of requests"' - ) - .expect(200) - .then((resp) => { - expect(resp.body.saved_objects.map((so: { id: string }) => so.id)).to.eql([ - 'dd7caf20-9efd-11e7-acb3-3dab96693fab', - ]); - })); + describe('with a filter', () => { + it('should return 200 with a valid response', async () => + await supertest + .get( + `/s/${SPACE_ID}/api/saved_objects/_find?type=visualization&filter=visualization.attributes.title:"Count of requests"` + ) + .expect(200) + .then((resp) => { + expect(resp.body.saved_objects.map((so: { id: string }) => so.id)).to.eql([ + 'dd7caf20-9efd-11e7-acb3-3dab96693fab', + ]); + })); - it('wrong type should return 400 with Bad Request', async () => - await supertest - .get( - '/api/saved_objects/_find?type=visualization&filter=dashboard.attributes.title:foo' - ) - .expect(400) - .then((resp) => { - expect(resp.body).to.eql({ - error: 'Bad Request', - message: 'This type dashboard is not allowed: Bad Request', - statusCode: 400, - }); - })); + it('wrong type should return 400 with Bad Request', async () => + await supertest + .get( + `/s/${SPACE_ID}/api/saved_objects/_find?type=visualization&filter=dashboard.attributes.title:foo` + ) + .expect(400) + .then((resp) => { + expect(resp.body).to.eql({ + error: 'Bad Request', + message: 'This type dashboard is not allowed: Bad Request', + statusCode: 400, + }); + })); - it('KQL syntax error should return 400 with Bad Request', async () => - await supertest - .get( - '/api/saved_objects/_find?type=dashboard&filter=dashboard.attributes.title:foo { - expect(resp.body).to.eql({ - error: 'Bad Request', - message: - 'KQLSyntaxError: Expected AND, OR, end of input but "<" found.\ndashboard.' + - 'attributes.title:foo + await supertest + .get( + `/s/${SPACE_ID}/api/saved_objects/_find?type=dashboard&filter=dashboard.attributes.title:foo { + expect(resp.body).to.eql({ + error: 'Bad Request', + message: + 'KQLSyntaxError: Expected AND, OR, end of input but "<" found.\ndashboard.' + + 'attributes.title:foo { - it('should return 200 with valid response for a valid aggregation', async () => - await supertest - .get( - `/api/saved_objects/_find?type=visualization&per_page=0&aggs=${encodeURIComponent( - JSON.stringify({ - type_count: { max: { field: 'visualization.attributes.version' } }, - }) - )}` - ) - .expect(200) - .then((resp) => { - expect(resp.body).to.eql({ - aggregations: { - type_count: { - value: 1, - }, + describe('using aggregations', () => { + it('should return 200 with valid response for a valid aggregation', async () => + await supertest + .get( + `/s/${SPACE_ID}/api/saved_objects/_find?type=visualization&per_page=0&aggs=${encodeURIComponent( + JSON.stringify({ + type_count: { max: { field: 'visualization.attributes.version' } }, + }) + )}` + ) + .expect(200) + .then((resp) => { + expect(resp.body).to.eql({ + aggregations: { + type_count: { + value: 1, }, - page: 1, - per_page: 0, - saved_objects: [], - total: 1, - }); - })); + }, + page: 1, + per_page: 0, + saved_objects: [], + total: 1, + }); + })); - it('should return a 400 when referencing an invalid SO attribute', async () => - await supertest - .get( - `/api/saved_objects/_find?type=visualization&per_page=0&aggs=${encodeURIComponent( - JSON.stringify({ - type_count: { max: { field: 'dashboard.attributes.version' } }, - }) - )}` - ) - .expect(400) - .then((resp) => { - expect(resp.body).to.eql({ - error: 'Bad Request', - message: - 'Invalid aggregation: [type_count.max.field] Invalid attribute path: dashboard.attributes.version: Bad Request', - statusCode: 400, - }); - })); + it('should return a 400 when referencing an invalid SO attribute', async () => + await supertest + .get( + `/s/${SPACE_ID}/api/saved_objects/_find?type=visualization&per_page=0&aggs=${encodeURIComponent( + JSON.stringify({ + type_count: { max: { field: 'dashboard.attributes.version' } }, + }) + )}` + ) + .expect(400) + .then((resp) => { + expect(resp.body).to.eql({ + error: 'Bad Request', + message: + 'Invalid aggregation: [type_count.max.field] Invalid attribute path: dashboard.attributes.version: Bad Request', + statusCode: 400, + }); + })); - it('should return a 400 when using a forbidden aggregation option', async () => - await supertest - .get( - `/api/saved_objects/_find?type=visualization&per_page=0&aggs=${encodeURIComponent( - JSON.stringify({ - type_count: { - max: { - field: 'visualization.attributes.version', - script: 'Bad script is bad', - }, + it('should return a 400 when using a forbidden aggregation option', async () => + await supertest + .get( + `/s/${SPACE_ID}/api/saved_objects/_find?type=visualization&per_page=0&aggs=${encodeURIComponent( + JSON.stringify({ + type_count: { + max: { + field: 'visualization.attributes.version', + script: 'Bad script is bad', }, - }) - )}` - ) - .expect(400) - .then((resp) => { - expect(resp.body).to.eql({ - error: 'Bad Request', - message: - 'Invalid aggregation: [type_count.max.script]: definition for this key is missing: Bad Request', - statusCode: 400, - }); - })); - }); + }, + }) + )}` + ) + .expect(400) + .then((resp) => { + expect(resp.body).to.eql({ + error: 'Bad Request', + message: + 'Invalid aggregation: [type_count.max.script]: definition for this key is missing: Bad Request', + statusCode: 400, + }); + })); + }); - describe('`has_reference` and `has_reference_operator` parameters', () => { - before(() => esArchiver.load('saved_objects/references')); - after(() => esArchiver.unload('saved_objects/references')); + describe('`has_reference` and `has_reference_operator` parameters', () => { + before(() => kibanaServer.importExport.load('saved_objects/references', { space: SPACE_ID })); + after(() => + kibanaServer.importExport.unload('saved_objects/references', { space: SPACE_ID }) + ); - it('search for a reference', async () => { - await supertest - .get('/api/saved_objects/_find') - .query({ - type: 'visualization', - has_reference: JSON.stringify({ type: 'ref-type', id: 'ref-1' }), - }) - .expect(200) - .then((resp) => { - const objects = resp.body.saved_objects; - expect(objects.map((obj: SavedObject) => obj.id)).to.eql([ - 'only-ref-1', - 'ref-1-and-ref-2', - ]); - }); - }); + it('search for a reference', async () => { + await supertest + .get(`/s/${SPACE_ID}/api/saved_objects/_find`) + .query({ + type: 'visualization', + has_reference: JSON.stringify({ type: 'ref-type', id: 'ref-1' }), + }) + .expect(200) + .then((resp) => { + const objects = resp.body.saved_objects; + expect(objects.map((obj: SavedObject) => obj.id)).to.eql([ + 'only-ref-1', + 'ref-1-and-ref-2', + ]); + }); + }); - it('search for multiple references with OR operator', async () => { - await supertest - .get('/api/saved_objects/_find') - .query({ - type: 'visualization', - has_reference: JSON.stringify([ - { type: 'ref-type', id: 'ref-1' }, - { type: 'ref-type', id: 'ref-2' }, - ]), - has_reference_operator: 'OR', - }) - .expect(200) - .then((resp) => { - const objects = resp.body.saved_objects; - expect(objects.map((obj: SavedObject) => obj.id)).to.eql([ - 'only-ref-1', - 'ref-1-and-ref-2', - 'only-ref-2', - ]); - }); - }); + it('search for multiple references with OR operator', async () => { + await supertest + .get(`/s/${SPACE_ID}/api/saved_objects/_find`) + .query({ + type: 'visualization', + has_reference: JSON.stringify([ + { type: 'ref-type', id: 'ref-1' }, + { type: 'ref-type', id: 'ref-2' }, + ]), + has_reference_operator: 'OR', + }) + .expect(200) + .then((resp) => { + const objects = resp.body.saved_objects; + expect(objects.map((obj: SavedObject) => obj.id)).to.eql([ + 'only-ref-1', + 'only-ref-2', + 'ref-1-and-ref-2', + ]); + }); + }); - it('search for multiple references with AND operator', async () => { - await supertest - .get('/api/saved_objects/_find') - .query({ - type: 'visualization', - has_reference: JSON.stringify([ - { type: 'ref-type', id: 'ref-1' }, - { type: 'ref-type', id: 'ref-2' }, - ]), - has_reference_operator: 'AND', - }) - .expect(200) - .then((resp) => { - const objects = resp.body.saved_objects; - expect(objects.map((obj: SavedObject) => obj.id)).to.eql(['ref-1-and-ref-2']); - }); - }); + it('search for multiple references with AND operator', async () => { + await supertest + .get(`/s/${SPACE_ID}/api/saved_objects/_find`) + .query({ + type: 'visualization', + has_reference: JSON.stringify([ + { type: 'ref-type', id: 'ref-1' }, + { type: 'ref-type', id: 'ref-2' }, + ]), + has_reference_operator: 'AND', + }) + .expect(200) + .then((resp) => { + const objects = resp.body.saved_objects; + expect(objects.map((obj: SavedObject) => obj.id)).to.eql(['ref-1-and-ref-2']); + }); }); }); describe('searching for special characters', () => { - before(() => esArchiver.load('saved_objects/find_edgecases')); - after(() => esArchiver.unload('saved_objects/find_edgecases')); + before(() => + kibanaServer.importExport.load('saved_objects/find_edgecases', { space: SPACE_ID }) + ); + after(() => + kibanaServer.importExport.unload('saved_objects/find_edgecases', { space: SPACE_ID }) + ); it('can search for objects with dashes', async () => await supertest - .get('/api/saved_objects/_find') + .get(`/s/${SPACE_ID}/api/saved_objects/_find`) .query({ type: 'visualization', search_fields: 'title', @@ -324,7 +338,7 @@ export default function ({ getService }: FtrProviderContext) { it('can search with the prefix search character just after a special one', async () => await supertest - .get('/api/saved_objects/_find') + .get(`/s/${SPACE_ID}/api/saved_objects/_find`) .query({ type: 'visualization', search_fields: 'title', @@ -340,7 +354,7 @@ export default function ({ getService }: FtrProviderContext) { it('can search for objects with asterisk', async () => await supertest - .get('/api/saved_objects/_find') + .get(`/s/${SPACE_ID}/api/saved_objects/_find`) .query({ type: 'visualization', search_fields: 'title', @@ -356,7 +370,7 @@ export default function ({ getService }: FtrProviderContext) { it('can still search tokens by prefix', async () => await supertest - .get('/api/saved_objects/_find') + .get(`/s/${SPACE_ID}/api/saved_objects/_find`) .query({ type: 'visualization', search_fields: 'title', @@ -367,120 +381,8 @@ export default function ({ getService }: FtrProviderContext) { const savedObjects = resp.body.saved_objects; expect( savedObjects.map((so: SavedObject<{ title: string }>) => so.attributes.title) - ).to.eql(['my-visualization', 'some*visualization']); + ).to.eql(['some*visualization', 'my-visualization']); })); }); - - describe('without kibana index', () => { - before( - async () => - // just in case the kibana server has recreated it - await esDeleteAllIndices('.kibana*') - ); - - it('should return 200 with empty response', async () => - await supertest - .get('/api/saved_objects/_find?type=visualization') - .expect(200) - .then((resp) => { - expect(resp.body).to.eql({ - page: 1, - per_page: 20, - total: 0, - saved_objects: [], - }); - })); - - describe('unknown type', () => { - it('should return 200 with empty response', async () => - await supertest - .get('/api/saved_objects/_find?type=wigwags') - .expect(200) - .then((resp) => { - expect(resp.body).to.eql({ - page: 1, - per_page: 20, - total: 0, - saved_objects: [], - }); - })); - }); - - describe('missing type', () => { - it('should return 400', async () => - await supertest - .get('/api/saved_objects/_find') - .expect(400) - .then((resp) => { - expect(resp.body).to.eql({ - error: 'Bad Request', - message: - '[request query.type]: expected at least one defined value but got [undefined]', - statusCode: 400, - }); - })); - }); - - describe('page beyond total', () => { - it('should return 200 with empty response', async () => - await supertest - .get('/api/saved_objects/_find?type=visualization&page=100&per_page=100') - .expect(200) - .then((resp) => { - expect(resp.body).to.eql({ - page: 100, - per_page: 100, - total: 0, - saved_objects: [], - }); - })); - }); - - describe('unknown search field', () => { - it('should return 200 with empty response', async () => - await supertest - .get('/api/saved_objects/_find?type=url&search_fields=a') - .expect(200) - .then((resp) => { - expect(resp.body).to.eql({ - page: 1, - per_page: 20, - total: 0, - saved_objects: [], - }); - })); - }); - - describe('with a filter', () => { - it('should return 200 with an empty response', async () => - await supertest - .get( - '/api/saved_objects/_find?type=visualization&filter=visualization.attributes.title:"Count of requests"' - ) - .expect(200) - .then((resp) => { - expect(resp.body).to.eql({ - page: 1, - per_page: 20, - total: 0, - saved_objects: [], - }); - })); - - it('wrong type should return 400 with Bad Request', async () => - await supertest - .get( - '/api/saved_objects/_find?type=visualization&filter=dashboard.attributes.title:foo' - ) - .expect(400) - .then((resp) => { - expect(resp.body).to.eql({ - error: 'Bad Request', - message: 'This type dashboard is not allowed: Bad Request', - statusCode: 400, - }); - })); - }); - }); }); } diff --git a/test/api_integration/apis/saved_objects/get.ts b/test/api_integration/apis/saved_objects/get.ts index 84ab6e36956d5d..77d7b4faacb414 100644 --- a/test/api_integration/apis/saved_objects/get.ts +++ b/test/api_integration/apis/saved_objects/get.ts @@ -12,84 +12,59 @@ import { getKibanaVersion } from './lib/saved_objects_test_utils'; export default function ({ getService }: FtrProviderContext) { const supertest = getService('supertest'); - const esArchiver = getService('esArchiver'); - const esDeleteAllIndices = getService('esDeleteAllIndices'); + const kibanaServer = getService('kibanaServer'); describe('get', () => { let KIBANA_VERSION: string; before(async () => { KIBANA_VERSION = await getKibanaVersion(getService); + await kibanaServer.importExport.load('saved_objects/basic'); }); + after(() => kibanaServer.importExport.unload('saved_objects/basic')); - describe('with kibana index', () => { - before(() => esArchiver.load('saved_objects/basic')); - after(() => esArchiver.unload('saved_objects/basic')); - - it('should return 200', async () => - await supertest - .get(`/api/saved_objects/visualization/dd7caf20-9efd-11e7-acb3-3dab96693fab`) - .expect(200) - .then((resp) => { - expect(resp.body).to.eql({ - id: 'dd7caf20-9efd-11e7-acb3-3dab96693fab', - type: 'visualization', - updated_at: '2017-09-21T18:51:23.794Z', - version: resp.body.version, - migrationVersion: resp.body.migrationVersion, - coreMigrationVersion: KIBANA_VERSION, - attributes: { - title: 'Count of requests', - description: '', - version: 1, - // cheat for some of the more complex attributes - visState: resp.body.attributes.visState, - uiStateJSON: resp.body.attributes.uiStateJSON, - kibanaSavedObjectMeta: resp.body.attributes.kibanaSavedObjectMeta, + it('should return 200', async () => + await supertest + .get(`/api/saved_objects/visualization/dd7caf20-9efd-11e7-acb3-3dab96693fab`) + .expect(200) + .then((resp) => { + expect(resp.body).to.eql({ + id: 'dd7caf20-9efd-11e7-acb3-3dab96693fab', + type: 'visualization', + updated_at: resp.body.updated_at, + version: resp.body.version, + migrationVersion: resp.body.migrationVersion, + coreMigrationVersion: KIBANA_VERSION, + attributes: { + title: 'Count of requests', + description: '', + version: 1, + // cheat for some of the more complex attributes + visState: resp.body.attributes.visState, + uiStateJSON: resp.body.attributes.uiStateJSON, + kibanaSavedObjectMeta: resp.body.attributes.kibanaSavedObjectMeta, + }, + references: [ + { + type: 'index-pattern', + name: 'kibanaSavedObjectMeta.searchSourceJSON.index', + id: '91200a00-9efd-11e7-acb3-3dab96693fab', }, - references: [ - { - type: 'index-pattern', - name: 'kibanaSavedObjectMeta.searchSourceJSON.index', - id: '91200a00-9efd-11e7-acb3-3dab96693fab', - }, - ], - namespaces: ['default'], - }); - expect(resp.body.migrationVersion).to.be.ok(); - })); - - describe('doc does not exist', () => { - it('should return same generic error as when index does not exist', async () => - await supertest - .get(`/api/saved_objects/visualization/foobar`) - .expect(404) - .then((resp) => { - expect(resp.body).to.eql({ - error: 'Not Found', - message: 'Saved object [visualization/foobar] not found', - statusCode: 404, - }); - })); - }); - }); - - describe('without kibana index', () => { - before( - async () => - // just in case the kibana server has recreated it - await esDeleteAllIndices('.kibana*') - ); + ], + namespaces: ['default'], + }); + expect(resp.body.migrationVersion).to.be.ok(); + })); - it('should return basic 404 without mentioning index', async () => + describe('doc does not exist', () => { + it('should return same generic error as when index does not exist', async () => await supertest - .get('/api/saved_objects/visualization/dd7caf20-9efd-11e7-acb3-3dab96693fab') + .get(`/api/saved_objects/visualization/foobar`) .expect(404) .then((resp) => { expect(resp.body).to.eql({ error: 'Not Found', - message: - 'Saved object [visualization/dd7caf20-9efd-11e7-acb3-3dab96693fab] not found', + message: 'Saved object [visualization/foobar] not found', statusCode: 404, }); })); diff --git a/test/api_integration/apis/saved_objects/import.ts b/test/api_integration/apis/saved_objects/import.ts index d463b9498a52ab..8d3c0b7bbcea3f 100644 --- a/test/api_integration/apis/saved_objects/import.ts +++ b/test/api_integration/apis/saved_objects/import.ts @@ -22,7 +22,7 @@ const createConflictError = ( export default function ({ getService }: FtrProviderContext) { const supertest = getService('supertest'); - const esArchiver = getService('esArchiver'); + const kibanaServer = getService('kibanaServer'); describe('import', () => { // mock success results including metadata @@ -42,199 +42,197 @@ export default function ({ getService }: FtrProviderContext) { meta: { title: 'Requests', icon: 'dashboardApp' }, }; - describe('with kibana index', () => { - describe('with basic data existing', () => { - before(() => esArchiver.load('saved_objects/basic')); - after(() => esArchiver.unload('saved_objects/basic')); + describe('with basic data existing', () => { + before(() => kibanaServer.importExport.load('saved_objects/basic')); + after(() => kibanaServer.importExport.unload('saved_objects/basic')); - it('should return 415 when no file passed in', async () => { - await supertest - .post('/api/saved_objects/_import') - .expect(415) - .then((resp) => { - expect(resp.body).to.eql({ - statusCode: 415, - error: 'Unsupported Media Type', - message: 'Unsupported Media Type', - }); + it('should return 415 when no file passed in', async () => { + await supertest + .post('/api/saved_objects/_import') + .expect(415) + .then((resp) => { + expect(resp.body).to.eql({ + statusCode: 415, + error: 'Unsupported Media Type', + message: 'Unsupported Media Type', }); - }); + }); + }); - it('should return errors when conflicts exist', async () => { - await supertest - .post('/api/saved_objects/_import') - .attach('file', join(__dirname, '../../fixtures/import.ndjson')) - .expect(200) - .then((resp) => { - expect(resp.body).to.eql({ - success: false, - successCount: 0, - errors: [ - createConflictError(indexPattern), - createConflictError(visualization), - createConflictError(dashboard), - ], - warnings: [], - }); + it('should return errors when conflicts exist', async () => { + await supertest + .post('/api/saved_objects/_import') + .attach('file', join(__dirname, '../../fixtures/import.ndjson')) + .expect(200) + .then((resp) => { + expect(resp.body).to.eql({ + success: false, + successCount: 0, + errors: [ + createConflictError(indexPattern), + createConflictError(visualization), + createConflictError(dashboard), + ], + warnings: [], }); - }); + }); + }); - it('should return 200 when conflicts exist but overwrite is passed in', async () => { - await supertest - .post('/api/saved_objects/_import') - .query({ overwrite: true }) - .attach('file', join(__dirname, '../../fixtures/import.ndjson')) - .expect(200) - .then((resp) => { - expect(resp.body).to.eql({ - success: true, - successCount: 3, - successResults: [ - { ...indexPattern, overwrite: true }, - { ...visualization, overwrite: true }, - { ...dashboard, overwrite: true }, - ], - warnings: [], - }); + it('should return 200 when conflicts exist but overwrite is passed in', async () => { + await supertest + .post('/api/saved_objects/_import') + .query({ overwrite: true }) + .attach('file', join(__dirname, '../../fixtures/import.ndjson')) + .expect(200) + .then((resp) => { + expect(resp.body).to.eql({ + success: true, + successCount: 3, + successResults: [ + { ...indexPattern, overwrite: true }, + { ...visualization, overwrite: true }, + { ...dashboard, overwrite: true }, + ], + warnings: [], }); - }); + }); + }); - it('should return 200 when trying to import unsupported types', async () => { - const fileBuffer = Buffer.from( - '{"id":"1","type":"wigwags","attributes":{"title":"my title"},"references":[]}', - 'utf8' - ); - await supertest - .post('/api/saved_objects/_import') - .attach('file', fileBuffer, 'export.ndjson') - .expect(200) - .then((resp) => { - expect(resp.body).to.eql({ - success: false, - successCount: 0, - errors: [ - { - id: '1', - type: 'wigwags', - title: 'my title', - meta: { title: 'my title' }, - error: { type: 'unsupported_type' }, - }, - ], - warnings: [], - }); + it('should return 200 when trying to import unsupported types', async () => { + const fileBuffer = Buffer.from( + '{"id":"1","type":"wigwags","attributes":{"title":"my title"},"references":[]}', + 'utf8' + ); + await supertest + .post('/api/saved_objects/_import') + .attach('file', fileBuffer, 'export.ndjson') + .expect(200) + .then((resp) => { + expect(resp.body).to.eql({ + success: false, + successCount: 0, + errors: [ + { + id: '1', + type: 'wigwags', + title: 'my title', + meta: { title: 'my title' }, + error: { type: 'unsupported_type' }, + }, + ], + warnings: [], }); - }); + }); + }); - it('should return 200 when importing SO with circular refs', async () => { - const fileBuffer = Buffer.from( - dedent` - {"attributes":{"title":"dashboard-b"},"id":"dashboard-b","references":[{"id":"dashboard-a","name":"circular-dashboard-ref","type":"dashboard"}],"type":"dashboard"} - {"attributes":{"title":"dashboard-a"},"id":"dashboard-a","references":[{"id":"dashboard-b","name":"circular-dashboard-ref","type":"dashboard"}],"type":"dashboard"} - `, - 'utf8' - ); - const resp = await supertest - .post('/api/saved_objects/_import') - .attach('file', fileBuffer, 'export.ndjson') - .expect(200); + it('should return 200 when importing SO with circular refs', async () => { + const fileBuffer = Buffer.from( + dedent` + {"attributes":{"title":"dashboard-b"},"id":"dashboard-b","references":[{"id":"dashboard-a","name":"circular-dashboard-ref","type":"dashboard"}],"type":"dashboard"} + {"attributes":{"title":"dashboard-a"},"id":"dashboard-a","references":[{"id":"dashboard-b","name":"circular-dashboard-ref","type":"dashboard"}],"type":"dashboard"} + `, + 'utf8' + ); + const resp = await supertest + .post('/api/saved_objects/_import') + .attach('file', fileBuffer, 'export.ndjson') + .expect(200); - expect(resp.body).to.eql({ - success: true, - successCount: 2, - successResults: [ - { - id: 'dashboard-b', - meta: { - icon: 'dashboardApp', - title: 'dashboard-b', - }, - type: 'dashboard', + expect(resp.body).to.eql({ + success: true, + successCount: 2, + successResults: [ + { + id: 'dashboard-b', + meta: { + icon: 'dashboardApp', + title: 'dashboard-b', }, - { - id: 'dashboard-a', - meta: { - icon: 'dashboardApp', - title: 'dashboard-a', - }, - type: 'dashboard', + type: 'dashboard', + }, + { + id: 'dashboard-a', + meta: { + icon: 'dashboardApp', + title: 'dashboard-a', }, - ], - warnings: [], - }); + type: 'dashboard', + }, + ], + warnings: [], }); + }); - it('should return 400 when trying to import more than 10,000 objects', async () => { - const fileChunks = []; - for (let i = 0; i <= 10001; i++) { - fileChunks.push(`{"type":"visualization","id":"${i}","attributes":{},"references":[]}`); - } - await supertest - .post('/api/saved_objects/_import') - .attach('file', Buffer.from(fileChunks.join('\n'), 'utf8'), 'export.ndjson') - .expect(400) - .then((resp) => { - expect(resp.body).to.eql({ - statusCode: 400, - error: 'Bad Request', - message: "Can't import more than 10001 objects", - }); + it('should return 400 when trying to import more than 10,000 objects', async () => { + const fileChunks = []; + for (let i = 0; i <= 10001; i++) { + fileChunks.push(`{"type":"visualization","id":"${i}","attributes":{},"references":[]}`); + } + await supertest + .post('/api/saved_objects/_import') + .attach('file', Buffer.from(fileChunks.join('\n'), 'utf8'), 'export.ndjson') + .expect(400) + .then((resp) => { + expect(resp.body).to.eql({ + statusCode: 400, + error: 'Bad Request', + message: "Can't import more than 10001 objects", }); - }); + }); + }); - it('should return errors when index patterns or search are missing', async () => { - const objectsToImport = [ - JSON.stringify({ - type: 'visualization', - id: '1', - attributes: { title: 'My visualization' }, - references: [ - { - name: 'ref_0', - type: 'index-pattern', - id: 'non-existing', - }, + it('should return errors when index patterns or search are missing', async () => { + const objectsToImport = [ + JSON.stringify({ + type: 'visualization', + id: '1', + attributes: { title: 'My visualization' }, + references: [ + { + name: 'ref_0', + type: 'index-pattern', + id: 'non-existing', + }, + { + name: 'ref_1', + type: 'search', + id: 'non-existing-search', + }, + ], + }), + ]; + await supertest + .post('/api/saved_objects/_import') + .attach('file', Buffer.from(objectsToImport.join('\n'), 'utf8'), 'export.ndjson') + .expect(200) + .then((resp) => { + expect(resp.body).to.eql({ + success: false, + successCount: 0, + errors: [ { - name: 'ref_1', - type: 'search', - id: 'non-existing-search', + type: 'visualization', + id: '1', + title: 'My visualization', + meta: { title: 'My visualization', icon: 'visualizeApp' }, + error: { + type: 'missing_references', + references: [ + { + type: 'index-pattern', + id: 'non-existing', + }, + { + type: 'search', + id: 'non-existing-search', + }, + ], + }, }, ], - }), - ]; - await supertest - .post('/api/saved_objects/_import') - .attach('file', Buffer.from(objectsToImport.join('\n'), 'utf8'), 'export.ndjson') - .expect(200) - .then((resp) => { - expect(resp.body).to.eql({ - success: false, - successCount: 0, - errors: [ - { - type: 'visualization', - id: '1', - title: 'My visualization', - meta: { title: 'My visualization', icon: 'visualizeApp' }, - error: { - type: 'missing_references', - references: [ - { - type: 'index-pattern', - id: 'non-existing', - }, - { - type: 'search', - id: 'non-existing-search', - }, - ], - }, - }, - ], - warnings: [], - }); + warnings: [], }); - }); + }); }); }); }); diff --git a/test/api_integration/apis/saved_objects/resolve.ts b/test/api_integration/apis/saved_objects/resolve.ts index 9c17dcde8ba222..fcfef0aeb6b582 100644 --- a/test/api_integration/apis/saved_objects/resolve.ts +++ b/test/api_integration/apis/saved_objects/resolve.ts @@ -12,8 +12,7 @@ import { getKibanaVersion } from './lib/saved_objects_test_utils'; export default function ({ getService }: FtrProviderContext) { const supertest = getService('supertest'); - const esArchiver = getService('esArchiver'); - const esDeleteAllIndices = getService('esDeleteAllIndices'); + const kibanaServer = getService('kibanaServer'); describe('resolve', () => { let KIBANA_VERSION: string; @@ -23,19 +22,21 @@ export default function ({ getService }: FtrProviderContext) { }); describe('with kibana index', () => { - before(() => esArchiver.load('saved_objects/basic')); - after(() => esArchiver.unload('saved_objects/basic')); + before(() => kibanaServer.importExport.load('saved_objects/basic')); + after(() => kibanaServer.importExport.unload('saved_objects/basic')); it('should return 200', async () => await supertest .get(`/api/saved_objects/resolve/visualization/dd7caf20-9efd-11e7-acb3-3dab96693fab`) .expect(200) .then((resp) => { + resp.body.saved_object.updated_at = '2015-01-01T00:00:00.000Z'; + expect(resp.body).to.eql({ saved_object: { id: 'dd7caf20-9efd-11e7-acb3-3dab96693fab', type: 'visualization', - updated_at: '2017-09-21T18:51:23.794Z', + updated_at: '2015-01-01T00:00:00.000Z', version: resp.body.saved_object.version, migrationVersion: resp.body.saved_object.migrationVersion, coreMigrationVersion: KIBANA_VERSION, @@ -76,26 +77,5 @@ export default function ({ getService }: FtrProviderContext) { })); }); }); - - describe('without kibana index', () => { - before( - async () => - // just in case the kibana server has recreated it - await esDeleteAllIndices('.kibana') - ); - - it('should return basic 404 without mentioning index', async () => - await supertest - .get('/api/saved_objects/resolve/visualization/dd7caf20-9efd-11e7-acb3-3dab96693fab') - .expect(404) - .then((resp) => { - expect(resp.body).to.eql({ - error: 'Not Found', - message: - 'Saved object [visualization/dd7caf20-9efd-11e7-acb3-3dab96693fab] not found', - statusCode: 404, - }); - })); - }); }); } diff --git a/test/api_integration/apis/saved_objects/resolve_import_errors.ts b/test/api_integration/apis/saved_objects/resolve_import_errors.ts index b93f3a52d73d94..8ac6b3be13063b 100644 --- a/test/api_integration/apis/saved_objects/resolve_import_errors.ts +++ b/test/api_integration/apis/saved_objects/resolve_import_errors.ts @@ -12,8 +12,7 @@ import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ getService }: FtrProviderContext) { const supertest = getService('supertest'); - const esArchiver = getService('esArchiver'); - const esDeleteAllIndices = getService('esDeleteAllIndices'); + const kibanaServer = getService('kibanaServer'); describe('resolve_import_errors', () => { // mock success results including metadata @@ -32,49 +31,42 @@ export default function ({ getService }: FtrProviderContext) { id: 'be3733a0-9efe-11e7-acb3-3dab96693fab', meta: { title: 'Requests', icon: 'dashboardApp' }, }; + const SPACE_ID = 'ftr-so-resolve_import_errors'; - describe('without kibana index', () => { - // Cleanup data that got created in import - before( - async () => - // just in case the kibana server has recreated it - await esDeleteAllIndices('.kibana*') - ); + describe('with basic data existing', () => { + before(() => kibanaServer.importExport.load('saved_objects/basic', { space: SPACE_ID })); + after(() => kibanaServer.spaces.delete(SPACE_ID)); - it('should return 200 and import nothing when empty parameters are passed in', async () => { + it('should return 200 when skipping all the records', async () => { await supertest - .post('/api/saved_objects/_resolve_import_errors') + .post(`/s/${SPACE_ID}/api/saved_objects/_resolve_import_errors`) .field('retries', '[]') .attach('file', join(__dirname, '../../fixtures/import.ndjson')) .expect(200) .then((resp) => { - expect(resp.body).to.eql({ - success: true, - successCount: 0, - warnings: [], - }); + expect(resp.body).to.eql({ success: true, successCount: 0, warnings: [] }); }); }); - it('should return 200 with internal server errors', async () => { + it('should return 200 when manually overwriting each object', async () => { await supertest - .post('/api/saved_objects/_resolve_import_errors') + .post(`/s/${SPACE_ID}/api/saved_objects/_resolve_import_errors`) .field( 'retries', JSON.stringify([ { - type: 'index-pattern', id: '91200a00-9efd-11e7-acb3-3dab96693fab', + type: 'index-pattern', overwrite: true, }, { - type: 'visualization', id: 'dd7caf20-9efd-11e7-acb3-3dab96693fab', + type: 'visualization', overwrite: true, }, { - type: 'dashboard', id: 'be3733a0-9efe-11e7-acb3-3dab96693fab', + type: 'dashboard', overwrite: true, }, ]) @@ -83,110 +75,44 @@ export default function ({ getService }: FtrProviderContext) { .expect(200) .then((resp) => { expect(resp.body).to.eql({ - successCount: 0, - success: false, - errors: [ - { - ...indexPattern, - ...{ title: indexPattern.meta.title }, - overwrite: true, - error: { - statusCode: 500, - error: 'Internal Server Error', - message: 'An internal server error occurred', - type: 'unknown', - }, - }, - { - ...visualization, - ...{ title: visualization.meta.title }, - overwrite: true, - error: { - statusCode: 500, - error: 'Internal Server Error', - message: 'An internal server error occurred', - type: 'unknown', - }, - }, - { - ...dashboard, - ...{ title: dashboard.meta.title }, - overwrite: true, - error: { - statusCode: 500, - error: 'Internal Server Error', - message: 'An internal server error occurred', - type: 'unknown', - }, - }, + success: true, + successCount: 3, + successResults: [ + { ...indexPattern, overwrite: true }, + { ...visualization, overwrite: true }, + { ...dashboard, overwrite: true }, ], warnings: [], }); }); }); - it('should return 400 when no file passed in', async () => { + it('should return 200 with only one record when overwriting 1 and skipping 1', async () => { await supertest - .post('/api/saved_objects/_resolve_import_errors') - .field('retries', '[]') - .expect(400) - .then((resp) => { - expect(resp.body).to.eql({ - statusCode: 400, - error: 'Bad Request', - message: '[request body.file]: expected value of type [Stream] but got [undefined]', - }); - }); - }); - - it('should return 200 when retrying unsupported types', async () => { - const fileBuffer = Buffer.from( - '{"id":"1","type":"wigwags","attributes":{"title":"my title"},"references":[]}', - 'utf8' - ); - await supertest - .post('/api/saved_objects/_resolve_import_errors') - .field('retries', JSON.stringify([{ type: 'wigwags', id: '1' }])) - .attach('file', fileBuffer, 'export.ndjson') + .post(`/s/${SPACE_ID}/api/saved_objects/_resolve_import_errors`) + .field( + 'retries', + JSON.stringify([ + { + id: 'dd7caf20-9efd-11e7-acb3-3dab96693fab', + type: 'visualization', + overwrite: true, + }, + ]) + ) + .attach('file', join(__dirname, '../../fixtures/import.ndjson')) .expect(200) .then((resp) => { expect(resp.body).to.eql({ - success: false, - successCount: 0, - errors: [ - { - id: '1', - type: 'wigwags', - title: 'my title', - meta: { title: 'my title' }, - error: { type: 'unsupported_type' }, - }, - ], + success: true, + successCount: 1, + successResults: [{ ...visualization, overwrite: true }], warnings: [], }); }); }); - it('should return 400 when resolving conflicts with a file containing more than 10,001 objects', async () => { - const fileChunks = []; - for (let i = 0; i <= 10001; i++) { - fileChunks.push(`{"type":"visualization","id":"${i}","attributes":{},"references":[]}`); - } - await supertest - .post('/api/saved_objects/_resolve_import_errors') - .field('retries', '[]') - .attach('file', Buffer.from(fileChunks.join('\n'), 'utf8'), 'export.ndjson') - .expect(400) - .then((resp) => { - expect(resp.body).to.eql({ - statusCode: 400, - error: 'Bad Request', - message: "Can't import more than 10001 objects", - }); - }); - }); - - it('should return 200 with errors when missing references', async () => { + it('should return 200 when replacing references', async () => { const objToInsert = { id: '1', type: 'visualization', @@ -203,13 +129,20 @@ export default function ({ getService }: FtrProviderContext) { ], }; await supertest - .post('/api/saved_objects/_resolve_import_errors') + .post(`/s/${SPACE_ID}/api/saved_objects/_resolve_import_errors`) .field( 'retries', JSON.stringify([ { type: 'visualization', id: '1', + replaceReferences: [ + { + type: 'index-pattern', + from: '2', + to: '91200a00-9efd-11e7-acb3-3dab96693fab', + }, + ], }, ]) ) @@ -217,174 +150,30 @@ export default function ({ getService }: FtrProviderContext) { .expect(200) .then((resp) => { expect(resp.body).to.eql({ - success: false, - successCount: 0, - errors: [ + success: true, + successCount: 1, + successResults: [ { - id: '1', type: 'visualization', - title: 'My favorite vis', + id: '1', meta: { title: 'My favorite vis', icon: 'visualizeApp' }, - error: { - type: 'missing_references', - references: [ - { - type: 'index-pattern', - id: '2', - }, - ], - }, }, ], warnings: [], }); }); - }); - }); - - describe('with kibana index', () => { - describe('with basic data existing', () => { - before(() => esArchiver.load('saved_objects/basic')); - after(() => esArchiver.unload('saved_objects/basic')); - - it('should return 200 when skipping all the records', async () => { - await supertest - .post('/api/saved_objects/_resolve_import_errors') - .field('retries', '[]') - .attach('file', join(__dirname, '../../fixtures/import.ndjson')) - .expect(200) - .then((resp) => { - expect(resp.body).to.eql({ success: true, successCount: 0, warnings: [] }); - }); - }); - - it('should return 200 when manually overwriting each object', async () => { - await supertest - .post('/api/saved_objects/_resolve_import_errors') - .field( - 'retries', - JSON.stringify([ - { - id: '91200a00-9efd-11e7-acb3-3dab96693fab', - type: 'index-pattern', - overwrite: true, - }, - { - id: 'dd7caf20-9efd-11e7-acb3-3dab96693fab', - type: 'visualization', - overwrite: true, - }, - { - id: 'be3733a0-9efe-11e7-acb3-3dab96693fab', - type: 'dashboard', - overwrite: true, - }, - ]) - ) - .attach('file', join(__dirname, '../../fixtures/import.ndjson')) - .expect(200) - .then((resp) => { - expect(resp.body).to.eql({ - success: true, - successCount: 3, - successResults: [ - { ...indexPattern, overwrite: true }, - { ...visualization, overwrite: true }, - { ...dashboard, overwrite: true }, - ], - warnings: [], - }); - }); - }); - - it('should return 200 with only one record when overwriting 1 and skipping 1', async () => { - await supertest - .post('/api/saved_objects/_resolve_import_errors') - .field( - 'retries', - JSON.stringify([ - { - id: 'dd7caf20-9efd-11e7-acb3-3dab96693fab', - type: 'visualization', - overwrite: true, - }, - ]) - ) - .attach('file', join(__dirname, '../../fixtures/import.ndjson')) - .expect(200) - .then((resp) => { - expect(resp.body).to.eql({ - success: true, - successCount: 1, - successResults: [{ ...visualization, overwrite: true }], - warnings: [], - }); - }); - }); - - it('should return 200 when replacing references', async () => { - const objToInsert = { - id: '1', - type: 'visualization', - attributes: { - title: 'My favorite vis', - visState: '{}', - }, - references: [ + await supertest + .get(`/s/${SPACE_ID}/api/saved_objects/visualization/1`) + .expect(200) + .then((resp) => { + expect(resp.body.references).to.eql([ { name: 'ref_0', type: 'index-pattern', - id: '2', + id: '91200a00-9efd-11e7-acb3-3dab96693fab', }, - ], - }; - await supertest - .post('/api/saved_objects/_resolve_import_errors') - .field( - 'retries', - JSON.stringify([ - { - type: 'visualization', - id: '1', - replaceReferences: [ - { - type: 'index-pattern', - from: '2', - to: '91200a00-9efd-11e7-acb3-3dab96693fab', - }, - ], - }, - ]) - ) - .attach('file', Buffer.from(JSON.stringify(objToInsert), 'utf8'), 'export.ndjson') - .expect(200) - .then((resp) => { - expect(resp.body).to.eql({ - success: true, - successCount: 1, - successResults: [ - { - type: 'visualization', - id: '1', - meta: { title: 'My favorite vis', icon: 'visualizeApp' }, - }, - ], - warnings: [], - }); - }); - await supertest - .get('/api/saved_objects/visualization/1') - .expect(200) - .then((resp) => { - expect(resp.body.references).to.eql([ - { - name: 'ref_0', - type: 'index-pattern', - id: '91200a00-9efd-11e7-acb3-3dab96693fab', - }, - ]); - }); - }); + ]); + }); }); }); }); diff --git a/test/api_integration/apis/saved_objects/update.ts b/test/api_integration/apis/saved_objects/update.ts index 7a683175c412e5..75b8651ee64a7c 100644 --- a/test/api_integration/apis/saved_objects/update.ts +++ b/test/api_integration/apis/saved_objects/update.ts @@ -11,181 +11,153 @@ import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ getService }: FtrProviderContext) { const supertest = getService('supertest'); - const esArchiver = getService('esArchiver'); - const esDeleteAllIndices = getService('esDeleteAllIndices'); + const kibanaServer = getService('kibanaServer'); describe('update', () => { - describe('with kibana index', () => { - before(() => esArchiver.load('saved_objects/basic')); - after(() => esArchiver.unload('saved_objects/basic')); - it('should return 200', async () => { - await supertest - .put(`/api/saved_objects/visualization/dd7caf20-9efd-11e7-acb3-3dab96693fab`) - .send({ + before(() => kibanaServer.importExport.load('saved_objects/basic')); + after(() => kibanaServer.importExport.unload('saved_objects/basic')); + it('should return 200', async () => { + await supertest + .put(`/api/saved_objects/visualization/dd7caf20-9efd-11e7-acb3-3dab96693fab`) + .send({ + attributes: { + title: 'My second favorite vis', + }, + }) + .expect(200) + .then((resp) => { + // loose uuid validation + expect(resp.body) + .to.have.property('id') + .match(/^[0-9a-f-]{36}$/); + + // loose ISO8601 UTC time with milliseconds validation + expect(resp.body) + .to.have.property('updated_at') + .match(/^[\d-]{10}T[\d:\.]{12}Z$/); + + expect(resp.body).to.eql({ + id: resp.body.id, + type: 'visualization', + updated_at: resp.body.updated_at, + version: resp.body.version, attributes: { title: 'My second favorite vis', }, - }) - .expect(200) - .then((resp) => { - // loose uuid validation - expect(resp.body) - .to.have.property('id') - .match(/^[0-9a-f-]{36}$/); - - // loose ISO8601 UTC time with milliseconds validation - expect(resp.body) - .to.have.property('updated_at') - .match(/^[\d-]{10}T[\d:\.]{12}Z$/); - - expect(resp.body).to.eql({ - id: resp.body.id, - type: 'visualization', - updated_at: resp.body.updated_at, - version: resp.body.version, - attributes: { - title: 'My second favorite vis', - }, - namespaces: ['default'], - }); + namespaces: ['default'], }); - }); - - it('does not pass references if omitted', async () => { - const resp = await supertest - .put(`/api/saved_objects/visualization/dd7caf20-9efd-11e7-acb3-3dab96693fab`) - .send({ - attributes: { - title: 'foo', - }, - }) - .expect(200); - - expect(resp.body).not.to.have.property('references'); - }); - - it('passes references if they are provided', async () => { - const references = [{ id: 'foo', name: 'Foo', type: 'visualization' }]; - - const resp = await supertest - .put(`/api/saved_objects/visualization/dd7caf20-9efd-11e7-acb3-3dab96693fab`) - .send({ - attributes: { - title: 'foo', - }, - references, - }) - .expect(200); - - expect(resp.body).to.have.property('references'); - expect(resp.body.references).to.eql(references); - }); - - it('passes empty references array if empty references array is provided', async () => { - const resp = await supertest - .put(`/api/saved_objects/visualization/dd7caf20-9efd-11e7-acb3-3dab96693fab`) - .send({ - attributes: { - title: 'foo', - }, - references: [], - }) - .expect(200); - - expect(resp.body).to.have.property('references'); - expect(resp.body.references).to.eql([]); - }); - - it('handles upsert', async () => { - await supertest - .put(`/api/saved_objects/visualization/upserted-viz`) - .send({ - attributes: { - title: 'foo', - }, - upsert: { - title: 'upserted title', - description: 'upserted description', - }, - }) - .expect(200); - - const { body: upserted } = await supertest - .get(`/api/saved_objects/visualization/upserted-viz`) - .expect(200); - - expect(upserted.attributes).to.eql({ - title: 'upserted title', - description: 'upserted description', }); + }); - await supertest - .put(`/api/saved_objects/visualization/upserted-viz`) - .send({ - attributes: { - title: 'foobar', - }, - upsert: { - description: 'new upserted description', - version: 9000, - }, - }) - .expect(200); + it('does not pass references if omitted', async () => { + const resp = await supertest + .put(`/api/saved_objects/visualization/dd7caf20-9efd-11e7-acb3-3dab96693fab`) + .send({ + attributes: { + title: 'foo', + }, + }) + .expect(200); + + expect(resp.body).not.to.have.property('references'); + }); - const { body: notUpserted } = await supertest - .get(`/api/saved_objects/visualization/upserted-viz`) - .expect(200); + it('passes references if they are provided', async () => { + const references = [{ id: 'foo', name: 'Foo', type: 'visualization' }]; + + const resp = await supertest + .put(`/api/saved_objects/visualization/dd7caf20-9efd-11e7-acb3-3dab96693fab`) + .send({ + attributes: { + title: 'foo', + }, + references, + }) + .expect(200); + + expect(resp.body).to.have.property('references'); + expect(resp.body.references).to.eql(references); + }); - expect(notUpserted.attributes).to.eql({ - title: 'foobar', - description: 'upserted description', - }); + it('passes empty references array if empty references array is provided', async () => { + const resp = await supertest + .put(`/api/saved_objects/visualization/dd7caf20-9efd-11e7-acb3-3dab96693fab`) + .send({ + attributes: { + title: 'foo', + }, + references: [], + }) + .expect(200); + + expect(resp.body).to.have.property('references'); + expect(resp.body.references).to.eql([]); + }); + + it('handles upsert', async () => { + await supertest + .put(`/api/saved_objects/visualization/upserted-viz`) + .send({ + attributes: { + title: 'foo', + }, + upsert: { + title: 'upserted title', + description: 'upserted description', + }, + }) + .expect(200); + + const { body: upserted } = await supertest + .get(`/api/saved_objects/visualization/upserted-viz`) + .expect(200); + + expect(upserted.attributes).to.eql({ + title: 'upserted title', + description: 'upserted description', }); - describe('unknown id', () => { - it('should return a generic 404', async () => { - await supertest - .put(`/api/saved_objects/visualization/not an id`) - .send({ - attributes: { - title: 'My second favorite vis', - }, - }) - .expect(404) - .then((resp) => { - expect(resp.body).eql({ - statusCode: 404, - error: 'Not Found', - message: 'Saved object [visualization/not an id] not found', - }); - }); - }); + await supertest + .put(`/api/saved_objects/visualization/upserted-viz`) + .send({ + attributes: { + title: 'foobar', + }, + upsert: { + description: 'new upserted description', + version: 9000, + }, + }) + .expect(200); + + const { body: notUpserted } = await supertest + .get(`/api/saved_objects/visualization/upserted-viz`) + .expect(200); + + expect(notUpserted.attributes).to.eql({ + title: 'foobar', + description: 'upserted description', }); }); - describe('without kibana index', () => { - before( - async () => - // just in case the kibana server has recreated it - await esDeleteAllIndices('.kibana*') - ); - - it('should return 500', async () => + describe('unknown id', () => { + it('should return a generic 404', async () => { await supertest - .put(`/api/saved_objects/visualization/dd7caf20-9efd-11e7-acb3-3dab96693fab`) + .put(`/api/saved_objects/visualization/not an id`) .send({ attributes: { title: 'My second favorite vis', }, }) - .expect(500) + .expect(404) .then((resp) => { expect(resp.body).eql({ - statusCode: 500, - error: 'Internal Server Error', - message: 'An internal server error occurred.', + statusCode: 404, + error: 'Not Found', + message: 'Saved object [visualization/not an id] not found', }); - })); + }); + }); }); }); } diff --git a/test/api_integration/apis/saved_objects_management/find.ts b/test/api_integration/apis/saved_objects_management/find.ts index 9bf3045bd0138f..df39e9b5c2a369 100644 --- a/test/api_integration/apis/saved_objects_management/find.ts +++ b/test/api_integration/apis/saved_objects_management/find.ts @@ -11,7 +11,6 @@ import { Response } from 'supertest'; import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ getService }: FtrProviderContext) { - const esDeleteAllIndices = getService('esDeleteAllIndices'); const supertest = getService('supertest'); const esArchiver = getService('esArchiver'); const kibanaServer = getService('kibanaServer'); @@ -26,8 +25,8 @@ export default function ({ getService }: FtrProviderContext) { }); describe('with kibana index', () => { - before(() => esArchiver.load('saved_objects/basic')); - after(() => esArchiver.unload('saved_objects/basic')); + before(() => kibanaServer.importExport.load('saved_objects/basic')); + after(() => kibanaServer.importExport.unload('saved_objects/basic')); it('should return 200 with individual responses', async () => await supertest @@ -86,8 +85,8 @@ export default function ({ getService }: FtrProviderContext) { }); describe('`hasReference` and `hasReferenceOperator` parameters', () => { - before(() => esArchiver.load('saved_objects/references')); - after(() => esArchiver.unload('saved_objects/references')); + before(() => kibanaServer.importExport.load('saved_objects/references')); + after(() => kibanaServer.importExport.unload('saved_objects/references')); it('search for a reference', async () => { await supertest @@ -119,8 +118,8 @@ export default function ({ getService }: FtrProviderContext) { const objects = resp.body.saved_objects; expect(objects.map((obj: any) => obj.id)).to.eql([ 'only-ref-1', - 'ref-1-and-ref-2', 'only-ref-2', + 'ref-1-and-ref-2', ]); }); }); @@ -145,88 +144,6 @@ export default function ({ getService }: FtrProviderContext) { }); }); - describe('without kibana index', () => { - before( - async () => - // just in case the kibana server has recreated it - await esDeleteAllIndices('.kibana*') - ); - - it('should return 200 with empty response', async () => - await supertest - .get('/api/kibana/management/saved_objects/_find?type=visualization') - .expect(200) - .then((resp: Response) => { - expect(resp.body).to.eql({ - page: 1, - per_page: 20, - total: 0, - saved_objects: [], - }); - })); - - describe('unknown type', () => { - it('should return 200 with empty response', async () => - await supertest - .get('/api/kibana/management/saved_objects/_find?type=wigwags') - .expect(200) - .then((resp: Response) => { - expect(resp.body).to.eql({ - page: 1, - per_page: 20, - total: 0, - saved_objects: [], - }); - })); - }); - - describe('missing type', () => { - it('should return 400', async () => - await supertest - .get('/api/kibana/management/saved_objects/_find') - .expect(400) - .then((resp: Response) => { - expect(resp.body).to.eql({ - error: 'Bad Request', - message: - '[request query.type]: expected at least one defined value but got [undefined]', - statusCode: 400, - }); - })); - }); - - describe('page beyond total', () => { - it('should return 200 with empty response', async () => - await supertest - .get( - '/api/kibana/management/saved_objects/_find?type=visualization&page=100&perPage=100' - ) - .expect(200) - .then((resp: Response) => { - expect(resp.body).to.eql({ - page: 100, - per_page: 100, - total: 0, - saved_objects: [], - }); - })); - }); - - describe('unknown search field', () => { - it('should return 400 when using searchFields', async () => - await supertest - .get('/api/kibana/management/saved_objects/_find?type=url&searchFields=a') - .expect(400) - .then((resp: Response) => { - expect(resp.body).to.eql({ - statusCode: 400, - error: 'Bad Request', - message: '[request query.searchFields]: definition for this key is missing', - }); - })); - }); - }); - describe('meta attributes injected properly', () => { before(() => esArchiver.load('management/saved_objects/search')); after(() => esArchiver.unload('management/saved_objects/search')); diff --git a/test/api_integration/apis/saved_objects_management/get.ts b/test/api_integration/apis/saved_objects_management/get.ts index 4dfd06a61eecf5..eb0b832cb2ed14 100644 --- a/test/api_integration/apis/saved_objects_management/get.ts +++ b/test/api_integration/apis/saved_objects_management/get.ts @@ -11,45 +11,29 @@ import { Response } from 'supertest'; import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ getService }: FtrProviderContext) { - const esDeleteAllIndices = getService('esDeleteAllIndices'); const supertest = getService('supertest'); - const esArchiver = getService('esArchiver'); + const kibanaServer = getService('kibanaServer'); describe('get', () => { const existingObject = 'visualization/dd7caf20-9efd-11e7-acb3-3dab96693fab'; const nonexistentObject = 'wigwags/foo'; - describe('with kibana index', () => { - before(() => esArchiver.load('saved_objects/basic')); - after(() => esArchiver.unload('saved_objects/basic')); - - it('should return 200 for object that exists and inject metadata', async () => - await supertest - .get(`/api/kibana/management/saved_objects/${existingObject}`) - .expect(200) - .then((resp: Response) => { - const { body } = resp; - const { type, id, meta } = body; - expect(type).to.eql('visualization'); - expect(id).to.eql('dd7caf20-9efd-11e7-acb3-3dab96693fab'); - expect(meta).to.not.equal(undefined); - })); - - it('should return 404 for object that does not exist', async () => - await supertest - .get(`/api/kibana/management/saved_objects/${nonexistentObject}`) - .expect(404)); - }); - - describe('without kibana index', () => { - before( - async () => - // just in case the kibana server has recreated it - await esDeleteAllIndices('.kibana*') - ); - - it('should return 404 for object that no longer exists', async () => - await supertest.get(`/api/kibana/management/saved_objects/${existingObject}`).expect(404)); - }); + before(() => kibanaServer.importExport.load('saved_objects/basic')); + after(() => kibanaServer.importExport.unload('saved_objects/basic')); + + it('should return 200 for object that exists and inject metadata', async () => + await supertest + .get(`/api/kibana/management/saved_objects/${existingObject}`) + .expect(200) + .then((resp: Response) => { + const { body } = resp; + const { type, id, meta } = body; + expect(type).to.eql('visualization'); + expect(id).to.eql('dd7caf20-9efd-11e7-acb3-3dab96693fab'); + expect(meta).to.not.equal(undefined); + })); + + it('should return 404 for object that does not exist', async () => + await supertest.get(`/api/kibana/management/saved_objects/${nonexistentObject}`).expect(404)); }); } diff --git a/test/api_integration/apis/saved_objects_management/relationships.ts b/test/api_integration/apis/saved_objects_management/relationships.ts index 17e562d221d72d..ffc97b13859571 100644 --- a/test/api_integration/apis/saved_objects_management/relationships.ts +++ b/test/api_integration/apis/saved_objects_management/relationships.ts @@ -12,7 +12,7 @@ import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ getService }: FtrProviderContext) { const supertest = getService('supertest'); - const esArchiver = getService('esArchiver'); + const kibanaServer = getService('kibanaServer'); const relationSchema = schema.object({ id: schema.string(), @@ -43,12 +43,8 @@ export default function ({ getService }: FtrProviderContext) { }); describe('relationships', () => { - before(async () => { - await esArchiver.load('management/saved_objects/relationships'); - }); - after(async () => { - await esArchiver.unload('management/saved_objects/relationships'); - }); + before(() => kibanaServer.importExport.load('management/saved_objects/relationships')); + after(() => kibanaServer.importExport.unload('management/saved_objects/relationships')); const baseApiUrl = `/api/kibana/management/saved_objects/relationships`; const defaultTypes = ['visualization', 'index-pattern', 'search', 'dashboard']; diff --git a/test/api_integration/apis/search/search.ts b/test/api_integration/apis/search/search.ts index bc092dd3889bb8..7ef82cd5467ab5 100644 --- a/test/api_integration/apis/search/search.ts +++ b/test/api_integration/apis/search/search.ts @@ -99,26 +99,6 @@ export default function ({ getService }: FtrProviderContext) { expect(resp.body.message).to.contain('banana not found'); }); - it('should return 400 when index type is provided in OSS', async () => { - const resp = await supertest - .post(`/internal/search/es`) - .send({ - indexType: 'baad', - params: { - body: { - query: { - match_all: {}, - }, - }, - }, - }) - .expect(400); - - verifyErrorResponse(resp.body, 400); - - expect(resp.body.message).to.contain('Unsupported index pattern'); - }); - it('should return 400 with illegal ES argument', async () => { const resp = await supertest .post(`/internal/search/es`) diff --git a/test/api_integration/apis/shorten/index.js b/test/api_integration/apis/shorten/index.js index d2545e6167cd41..9af979b6af95d7 100644 --- a/test/api_integration/apis/shorten/index.js +++ b/test/api_integration/apis/shorten/index.js @@ -9,12 +9,12 @@ import expect from '@kbn/expect'; export default function ({ getService }) { - const esArchiver = getService('esArchiver'); const supertest = getService('supertest'); + const kibanaServer = getService('kibanaServer'); describe('url shortener', () => { - before(() => esArchiver.load('saved_objects/basic')); - after(() => esArchiver.unload('saved_objects/basic')); + before(() => kibanaServer.importExport.load('saved_objects/basic')); + after(() => kibanaServer.importExport.unload('saved_objects/basic')); it('generates shortened urls', async () => { const resp = await supertest diff --git a/test/api_integration/apis/stats/stats.js b/test/api_integration/apis/stats/stats.js index 159c65c98ef879..2ba14e29a3d1a8 100644 --- a/test/api_integration/apis/stats/stats.js +++ b/test/api_integration/apis/stats/stats.js @@ -44,11 +44,11 @@ const assertStatsAndMetrics = (body) => { export default function ({ getService }) { const supertest = getService('supertest'); - const esArchiver = getService('esArchiver'); + const kibanaServer = getService('kibanaServer'); describe('kibana stats api', () => { - before('make sure there are some saved objects', () => esArchiver.load('saved_objects/basic')); - after('cleanup saved objects changes', () => esArchiver.unload('saved_objects/basic')); + before(() => kibanaServer.importExport.load('saved_objects/basic')); + after(() => kibanaServer.importExport.unload('saved_objects/basic')); describe('basic', () => { it('should return the stats without cluster_uuid with no query string params', () => { diff --git a/test/api_integration/apis/suggestions/suggestions.js b/test/api_integration/apis/suggestions/suggestions.js index 39cff3cb2d7458..b3c8ae238450ca 100644 --- a/test/api_integration/apis/suggestions/suggestions.js +++ b/test/api_integration/apis/suggestions/suggestions.js @@ -8,16 +8,17 @@ export default function ({ getService }) { const esArchiver = getService('esArchiver'); + const kibanaServer = getService('kibanaServer'); const supertest = getService('supertest'); describe('Suggestions API', function () { before(async () => { await esArchiver.load('index_patterns/basic_index'); - await esArchiver.load('index_patterns/basic_kibana'); + await kibanaServer.importExport.load('index_patterns/basic_kibana'); }); after(async () => { await esArchiver.unload('index_patterns/basic_index'); - await esArchiver.unload('index_patterns/basic_kibana'); + await kibanaServer.importExport.unload('index_patterns/basic_kibana'); }); it('should return 200 with special characters', () => diff --git a/test/api_integration/apis/telemetry/index.js b/test/api_integration/apis/telemetry/index.js index db95bf92cd44fa..5394b54062d894 100644 --- a/test/api_integration/apis/telemetry/index.js +++ b/test/api_integration/apis/telemetry/index.js @@ -8,7 +8,6 @@ export default function ({ loadTestFile }) { describe('Telemetry', () => { - loadTestFile(require.resolve('./telemetry_local')); loadTestFile(require.resolve('./opt_in')); loadTestFile(require.resolve('./telemetry_optin_notice_seen')); }); diff --git a/test/api_integration/apis/telemetry/telemetry_local.ts b/test/api_integration/apis/telemetry/telemetry_local.ts deleted file mode 100644 index 8f28872d5bb1bd..00000000000000 --- a/test/api_integration/apis/telemetry/telemetry_local.ts +++ /dev/null @@ -1,331 +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 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import expect from '@kbn/expect'; -import supertestAsPromised from 'supertest-as-promised'; -import { omit } from 'lodash'; -import { basicUiCounters } from './__fixtures__/ui_counters'; -import { basicUsageCounters } from './__fixtures__/usage_counters'; -import type { FtrProviderContext } from '../../ftr_provider_context'; -import type { SavedObject } from '../../../../src/core/server'; -import ossRootTelemetrySchema from '../../../../src/plugins/telemetry/schema/oss_root.json'; -import ossPluginsTelemetrySchema from '../../../../src/plugins/telemetry/schema/oss_plugins.json'; -import { assertTelemetryPayload, flatKeys } from './utils'; - -async function retrieveTelemetry( - supertest: supertestAsPromised.SuperTest -) { - const { body } = await supertest - .post('/api/telemetry/v2/clusters/_stats') - .set('kbn-xsrf', 'xxx') - .send({ unencrypted: true }) - .expect(200); - - expect(body.length).to.be(1); - return body[0]; -} - -export default function ({ getService }: FtrProviderContext) { - const supertest = getService('supertest'); - const es = getService('es'); - const esArchiver = getService('esArchiver'); - - describe('/api/telemetry/v2/clusters/_stats', () => { - before('make sure there are some saved objects', () => esArchiver.load('saved_objects/basic')); - after('cleanup saved objects changes', () => esArchiver.unload('saved_objects/basic')); - - before('create some telemetry-data tracked indices', async () => { - await es.indices.create({ index: 'filebeat-telemetry_tests_logs' }); - }); - - after('cleanup telemetry-data tracked indices', async () => { - await es.indices.delete({ index: 'filebeat-telemetry_tests_logs' }); - }); - - describe('validate data types', () => { - let stats: Record; - - before('pull local stats', async () => { - stats = await retrieveTelemetry(supertest); - }); - - it('should pass the schema validation', () => { - try { - assertTelemetryPayload( - { root: ossRootTelemetrySchema, plugins: ossPluginsTelemetrySchema }, - stats - ); - } catch (err) { - err.message = `The telemetry schemas in 'src/plugins/telemetry/schema/' are out-of-date, please update it as required: ${err.message}`; - throw err; - } - }); - - it('should pass ad-hoc enforced validations', () => { - expect(stats.collection).to.be('local'); - expect(stats.collectionSource).to.be('local'); - expect(stats.license).to.be(undefined); // OSS cannot get the license - expect(stats.stack_stats.kibana.count).to.be.a('number'); - expect(stats.stack_stats.kibana.indices).to.be.a('number'); - expect(stats.stack_stats.kibana.os.platforms[0].platform).to.be.a('string'); - expect(stats.stack_stats.kibana.os.platforms[0].count).to.be(1); - expect(stats.stack_stats.kibana.os.platformReleases[0].platformRelease).to.be.a('string'); - expect(stats.stack_stats.kibana.os.platformReleases[0].count).to.be(1); - expect(stats.stack_stats.kibana.plugins.telemetry.opt_in_status).to.be(false); - expect(stats.stack_stats.kibana.plugins.telemetry.usage_fetcher).to.be.a('string'); - expect(stats.stack_stats.kibana.plugins.stack_management).to.be.an('object'); - expect(stats.stack_stats.kibana.plugins.ui_metric).to.be.an('object'); - expect(stats.stack_stats.kibana.plugins.ui_counters).to.be.an('object'); - expect(stats.stack_stats.kibana.plugins.application_usage).to.be.an('object'); - expect(stats.stack_stats.kibana.plugins.kql.defaultQueryLanguage).to.be.a('string'); - expect(stats.stack_stats.kibana.plugins.localization).to.be.an('object'); - expect(stats.stack_stats.kibana.plugins.csp.strict).to.be(false); - expect(stats.stack_stats.kibana.plugins.csp.warnLegacyBrowsers).to.be(true); - expect(stats.stack_stats.kibana.plugins.csp.rulesChangedFromDefault).to.be(false); - expect(stats.stack_stats.kibana.plugins.kibana_config_usage).to.be.an('object'); - // non-default kibana configs. Configs set at 'test/api_integration/config.js'. - expect(omit(stats.stack_stats.kibana.plugins.kibana_config_usage, 'server.port')).to.eql({ - 'elasticsearch.username': '[redacted]', - 'elasticsearch.password': '[redacted]', - 'elasticsearch.hosts': '[redacted]', - 'elasticsearch.healthCheck.delay': 3600000, - 'plugins.paths': '[redacted]', - 'logging.json': false, - 'server.xsrf.disableProtection': true, - 'server.compression.referrerWhitelist': '[redacted]', - 'server.maxPayload': 1679958, - 'status.allowAnonymous': true, - 'home.disableWelcomeScreen': true, - 'data.search.aggs.shardDelay.enabled': true, - 'security.showInsecureClusterWarning': false, - 'telemetry.banner': false, - 'telemetry.url': '[redacted]', - 'telemetry.optInStatusUrl': '[redacted]', - 'telemetry.optIn': false, - 'newsfeed.service.urlRoot': '[redacted]', - 'newsfeed.service.pathTemplate': '[redacted]', - 'savedObjects.maxImportPayloadBytes': 10485760, - 'savedObjects.maxImportExportSize': 10001, - 'usageCollection.usageCounters.bufferDuration': 0, - }); - expect(stats.stack_stats.kibana.plugins.kibana_config_usage['server.port']).to.be.a( - 'number' - ); - - // Testing stack_stats.data - expect(stats.stack_stats.data).to.be.an('object'); - expect(stats.stack_stats.data).to.be.an('array'); - expect(stats.stack_stats.data[0]).to.be.an('object'); - expect(stats.stack_stats.data[0].pattern_name).to.be('filebeat'); - expect(stats.stack_stats.data[0].shipper).to.be('filebeat'); - expect(stats.stack_stats.data[0].index_count).to.be(1); - expect(stats.stack_stats.data[0].doc_count).to.be(0); - expect(stats.stack_stats.data[0].ecs_index_count).to.be(0); - expect(stats.stack_stats.data[0].size_in_bytes).to.be.a('number'); - - expect(stats.stack_stats.kibana.plugins.saved_objects_counts).to.be.an('object'); - expect(stats.stack_stats.kibana.plugins.saved_objects_counts.by_type).to.be.an('array'); - expect(stats.stack_stats.kibana.plugins.saved_objects_counts.by_type).to.eql([ - { type: 'config', count: 2 }, - { type: 'dashboard', count: 2 }, - { type: 'index-pattern', count: 2 }, - { type: 'visualization', count: 2 }, - ]); - }); - - it('should validate mandatory fields exist', () => { - const actual = flatKeys(stats); - expect(actual).to.be.an('array'); - const expected = [ - 'cluster_name', - 'cluster_stats.cluster_uuid', - 'cluster_stats.indices.analysis', - 'cluster_stats.indices.completion', - 'cluster_stats.indices.count', - 'cluster_stats.indices.docs', - 'cluster_stats.indices.fielddata', - 'cluster_stats.indices.mappings', - 'cluster_stats.indices.query_cache', - 'cluster_stats.indices.segments', - 'cluster_stats.indices.shards', - 'cluster_stats.indices.store', - 'cluster_stats.nodes.count', - 'cluster_stats.nodes.discovery_types', - 'cluster_stats.nodes.fs', - 'cluster_stats.nodes.ingest', - 'cluster_stats.nodes.jvm', - 'cluster_stats.nodes.network_types', - 'cluster_stats.nodes.os', - 'cluster_stats.nodes.packaging_types', - 'cluster_stats.nodes.plugins', - 'cluster_stats.nodes.process', - 'cluster_stats.nodes.versions', - 'cluster_stats.nodes.usage', - 'cluster_stats.status', - 'cluster_stats.timestamp', - 'cluster_uuid', - 'collection', - 'collectionSource', - 'stack_stats.kibana.count', - 'stack_stats.kibana.indices', - 'stack_stats.kibana.os', - 'stack_stats.kibana.plugins', - 'stack_stats.kibana.versions', - 'timestamp', - 'version', - ]; - - expect(expected.every((m) => actual.includes(m))).to.be.ok(); - }); - }); - - describe('UI Counters telemetry', () => { - before('Add UI Counters saved objects', () => esArchiver.load('saved_objects/ui_counters')); - after('cleanup saved objects changes', () => esArchiver.unload('saved_objects/ui_counters')); - it('returns ui counters aggregated by day', async () => { - const stats = await retrieveTelemetry(supertest); - expect(stats.stack_stats.kibana.plugins.ui_counters).to.eql(basicUiCounters); - }); - }); - - describe('Usage Counters telemetry', () => { - before('Add UI Counters saved objects', () => - esArchiver.load('saved_objects/usage_counters') - ); - after('cleanup saved objects changes', () => - esArchiver.unload('saved_objects/usage_counters') - ); - - it('returns usage counters aggregated by day', async () => { - const stats = await retrieveTelemetry(supertest); - expect(stats.stack_stats.kibana.plugins.usage_counters).to.eql(basicUsageCounters); - }); - }); - - describe('application usage limits', () => { - function createSavedObject(viewId?: string) { - return supertest - .post('/api/saved_objects/application_usage_daily') - .send({ - attributes: { - appId: 'test-app', - viewId, - minutesOnScreen: 10.33, - numberOfClicks: 10, - timestamp: new Date().toISOString(), - }, - }) - .expect(200) - .then((resp) => resp.body.id); - } - - describe('basic behaviour', () => { - let savedObjectIds: string[] = []; - before('create application usage entries', async () => { - await esArchiver.emptyKibanaIndex(); - savedObjectIds = await Promise.all([ - createSavedObject(), - createSavedObject('appView1'), - createSavedObject(), - ]); - }); - after('cleanup', async () => { - await Promise.all( - savedObjectIds.map((savedObjectId) => { - return supertest - .delete(`/api/saved_objects/application_usage_daily/${savedObjectId}`) - .expect(200); - }) - ); - }); - - it('should return application_usage data', async () => { - const stats = await retrieveTelemetry(supertest); - expect(stats.stack_stats.kibana.plugins.application_usage).to.eql({ - 'test-app': { - appId: 'test-app', - viewId: 'main', - clicks_total: 20, - clicks_7_days: 20, - clicks_30_days: 20, - clicks_90_days: 20, - minutes_on_screen_total: 20.66, - minutes_on_screen_7_days: 20.66, - minutes_on_screen_30_days: 20.66, - minutes_on_screen_90_days: 20.66, - views: [ - { - appId: 'test-app', - viewId: 'appView1', - clicks_total: 10, - clicks_7_days: 10, - clicks_30_days: 10, - clicks_90_days: 10, - minutes_on_screen_total: 10.33, - minutes_on_screen_7_days: 10.33, - minutes_on_screen_30_days: 10.33, - minutes_on_screen_90_days: 10.33, - }, - ], - }, - }); - }); - }); - - describe('10k + 1', () => { - const savedObjectIds = []; - before('create 10k + 1 entries for application usage', async () => { - await supertest - .post('/api/saved_objects/_bulk_create') - .send( - new Array(10001).fill(0).map(() => ({ - type: 'application_usage_daily', - attributes: { - appId: 'test-app', - minutesOnScreen: 1, - numberOfClicks: 1, - timestamp: new Date().toISOString(), - }, - })) - ) - .expect(200) - .then((resp) => - resp.body.saved_objects.forEach(({ id }: SavedObject) => savedObjectIds.push(id)) - ); - }); - after('clean them all', async () => { - // The SavedObjects API does not allow bulk deleting, and deleting one by one takes ages and the tests timeout - await es.deleteByQuery({ - index: '.kibana', - body: { query: { term: { type: 'application_usage_daily' } } }, - conflicts: 'proceed', - }); - }); - - it("should only use the first 10k docs for the application_usage data (they'll be rolled up in a later process)", async () => { - const stats = await retrieveTelemetry(supertest); - expect(stats.stack_stats.kibana.plugins.application_usage).to.eql({ - 'test-app': { - appId: 'test-app', - viewId: 'main', - clicks_total: 10000, - clicks_7_days: 10000, - clicks_30_days: 10000, - clicks_90_days: 10000, - minutes_on_screen_total: 10000, - minutes_on_screen_7_days: 10000, - minutes_on_screen_30_days: 10000, - minutes_on_screen_90_days: 10000, - views: [], - }, - }); - }); - }); - }); - }); -} diff --git a/test/api_integration/config.js b/test/api_integration/config.js index 7bbace4c60570b..84fb0b7907c3b0 100644 --- a/test/api_integration/config.js +++ b/test/api_integration/config.js @@ -31,6 +31,7 @@ export default async function ({ readConfigFile }) { '--server.xsrf.disableProtection=true', '--server.compression.referrerWhitelist=["some-host.com"]', `--savedObjects.maxImportExportSize=10001`, + '--savedObjects.maxImportPayloadBytes=30000000', // for testing set buffer duration to 0 to immediately flush counters into saved objects. '--usageCollection.usageCounters.bufferDuration=0', ], diff --git a/test/api_integration/fixtures/es_archiver/index_patterns/basic_kibana/data.json b/test/api_integration/fixtures/es_archiver/index_patterns/basic_kibana/data.json deleted file mode 100644 index 54276b59dcc231..00000000000000 --- a/test/api_integration/fixtures/es_archiver/index_patterns/basic_kibana/data.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "type": "doc", - "value": { - "index": ".kibana", - "id": "index-pattern:91200a00-9efd-11e7-acb3-3dab96693fab", - "source": { - "type": "index-pattern", - "updated_at": "2017-09-21T18:49:16.270Z", - "index-pattern": { - "title": "basic_index", - "fields": "[{\"name\":\"bar\",\"type\":\"boolean\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"baz\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"baz.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"foo\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nestedField.child\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"nested\":{\"path\":\"nestedField\"}}}]" - } - } - } -} diff --git a/test/api_integration/fixtures/es_archiver/index_patterns/basic_kibana/mappings.json b/test/api_integration/fixtures/es_archiver/index_patterns/basic_kibana/mappings.json deleted file mode 100644 index 99264d7ebbff85..00000000000000 --- a/test/api_integration/fixtures/es_archiver/index_patterns/basic_kibana/mappings.json +++ /dev/null @@ -1,253 +0,0 @@ -{ - "type": "index", - "value": { - "index": ".kibana", - "settings": { - "index": { - "number_of_shards": "1", - "number_of_replicas": "1" - } - }, - "mappings": { - "dynamic": "strict", - "properties": { - "config": { - "dynamic": "true", - "properties": { - "buildNum": { - "type": "keyword" - }, - "defaultIndex": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword", - "ignore_above": 256 - } - } - } - } - }, - "dashboard": { - "properties": { - "description": { - "type": "text" - }, - "hits": { - "type": "integer" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "optionsJSON": { - "type": "text" - }, - "panelsJSON": { - "type": "text" - }, - "refreshInterval": { - "properties": { - "display": { - "type": "keyword" - }, - "pause": { - "type": "boolean" - }, - "section": { - "type": "integer" - }, - "value": { - "type": "integer" - } - } - }, - "timeFrom": { - "type": "keyword" - }, - "timeRestore": { - "type": "boolean" - }, - "timeTo": { - "type": "keyword" - }, - "title": { - "type": "text" - }, - "uiStateJSON": { - "type": "text" - }, - "version": { - "type": "integer" - } - } - }, - "index-pattern": { - "properties": { - "fieldFormatMap": { - "type": "text" - }, - "fields": { - "type": "text" - }, - "intervalName": { - "type": "keyword" - }, - "notExpandable": { - "type": "boolean" - }, - "sourceFilters": { - "type": "text" - }, - "timeFieldName": { - "type": "keyword" - }, - "title": { - "type": "text" - } - } - }, - "search": { - "properties": { - "columns": { - "type": "keyword" - }, - "description": { - "type": "text" - }, - "hits": { - "type": "integer" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "sort": { - "type": "keyword" - }, - "title": { - "type": "text" - }, - "version": { - "type": "integer" - } - } - }, - "server": { - "properties": { - "uuid": { - "type": "keyword" - } - } - }, - "timelion-sheet": { - "properties": { - "description": { - "type": "text" - }, - "hits": { - "type": "integer" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "timelion_chart_height": { - "type": "integer" - }, - "timelion_columns": { - "type": "integer" - }, - "timelion_interval": { - "type": "keyword" - }, - "timelion_other_interval": { - "type": "keyword" - }, - "timelion_rows": { - "type": "integer" - }, - "timelion_sheet": { - "type": "text" - }, - "title": { - "type": "text" - }, - "version": { - "type": "integer" - } - } - }, - "namespace": { - "type": "keyword" - }, - "type": { - "type": "keyword" - }, - "updated_at": { - "type": "date" - }, - "url": { - "properties": { - "accessCount": { - "type": "long" - }, - "accessDate": { - "type": "date" - }, - "createDate": { - "type": "date" - }, - "url": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword", - "ignore_above": 2048 - } - } - } - } - }, - "visualization": { - "properties": { - "description": { - "type": "text" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "savedSearchId": { - "type": "keyword" - }, - "title": { - "type": "text" - }, - "uiStateJSON": { - "type": "text" - }, - "version": { - "type": "integer" - }, - "visState": { - "type": "text" - } - } - } - } - } - } -} diff --git a/test/api_integration/fixtures/es_archiver/management/saved_objects/relationships/data.json b/test/api_integration/fixtures/es_archiver/management/saved_objects/relationships/data.json deleted file mode 100644 index 21d84c4b55e555..00000000000000 --- a/test/api_integration/fixtures/es_archiver/management/saved_objects/relationships/data.json +++ /dev/null @@ -1,190 +0,0 @@ -{ - "type": "doc", - "value": { - "index": ".kibana", - "id": "timelion-sheet:190f3e90-2ec3-11e8-ba48-69fc4e41e1f6", - "source": { - "type": "timelion-sheet", - "updated_at": "2018-03-23T17:53:30.872Z", - "timelion-sheet": { - "title": "New TimeLion Sheet", - "hits": 0, - "description": "", - "timelion_sheet": [ - ".es(*)" - ], - "timelion_interval": "auto", - "timelion_chart_height": 275, - "timelion_columns": 2, - "timelion_rows": 2, - "version": 1 - } - } - } -} - -{ - "type": "doc", - "value": { - "index": ".kibana", - "id": "index-pattern:8963ca30-3224-11e8-a572-ffca06da1357", - "source": { - "type": "index-pattern", - "updated_at": "2018-03-28T01:08:34.290Z", - "index-pattern": { - "title": "saved_objects*", - "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\":\"id\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true}]" - } - } - } -} - -{ - "type": "doc", - "value": { - "index": ".kibana", - "id": "config:7.0.0-alpha1", - "source": { - "type": "config", - "updated_at": "2018-03-28T01:08:39.248Z", - "config": { - "buildNum": 8467, - "telemetry:optIn": false, - "defaultIndex": "8963ca30-3224-11e8-a572-ffca06da1357" - } - } - } -} - -{ - "type": "doc", - "value": { - "index": ".kibana", - "id": "search:960372e0-3224-11e8-a572-ffca06da1357", - "source": { - "type": "search", - "updated_at": "2018-03-28T01:08:55.182Z", - "search": { - "title": "OneRecord", - "description": "", - "hits": 0, - "columns": [ - "_source" - ], - "sort": [ - "_score", - "desc" - ], - "version": 1, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"index\":\"8963ca30-3224-11e8-a572-ffca06da1357\",\"highlightAll\":true,\"version\":true,\"query\":{\"query\":\"id:3\",\"language\":\"lucene\"},\"filter\":[]}" - } - } - } - } -} - -{ - "type": "doc", - "value": { - "index": ".kibana", - "id": "visualization:a42c0580-3224-11e8-a572-ffca06da1357", - "source": { - "type": "visualization", - "updated_at": "2018-03-28T01:09:18.936Z", - "visualization": { - "title": "VisualizationFromSavedSearch", - "visState": "{\"title\":\"VisualizationFromSavedSearch\",\"type\":\"table\",\"params\":{\"perPage\":10,\"showPartialRows\":false,\"showMeticsAtAllLevels\":false,\"sort\":{\"columnIndex\":null,\"direction\":null},\"showTotal\":false,\"totalFunc\":\"sum\"},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}}]}", - "uiStateJSON": "{\"vis\":{\"params\":{\"sort\":{\"columnIndex\":null,\"direction\":null}}}}", - "description": "", - "savedSearchId": "960372e0-3224-11e8-a572-ffca06da1357", - "version": 1, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"}}" - } - } - } - } -} - -{ - "type": "doc", - "value": { - "index": ".kibana", - "id": "visualization:add810b0-3224-11e8-a572-ffca06da1357", - "source": { - "type": "visualization", - "updated_at": "2018-03-28T01:09:35.163Z", - "visualization": { - "title": "Visualization", - "visState": "{\"title\":\"Visualization\",\"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\":\"count\",\"schema\":\"metric\",\"params\":{}}]}", - "uiStateJSON": "{}", - "description": "", - "version": 1, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"index\":\"8963ca30-3224-11e8-a572-ffca06da1357\",\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"}}" - } - } - } - } -} - -{ - "type": "doc", - "value": { - "index": ".kibana", - "id": "dashboard:b70c7ae0-3224-11e8-a572-ffca06da1357", - "source": { - "type": "dashboard", - "updated_at": "2018-03-28T01:09:50.606Z", - "dashboard": { - "title": "Dashboard", - "hits": 0, - "description": "", - "panelsJSON": "[{\"gridData\":{\"w\":24,\"h\":15,\"x\":0,\"y\":0,\"i\":\"1\"},\"version\":\"7.0.0-alpha1\",\"panelIndex\":\"1\",\"type\":\"visualization\",\"id\":\"add810b0-3224-11e8-a572-ffca06da1357\",\"embeddableConfig\":{}},{\"gridData\":{\"w\":24,\"h\":15,\"x\":24,\"y\":0,\"i\":\"2\"},\"version\":\"7.0.0-alpha1\",\"panelIndex\":\"2\",\"type\":\"visualization\",\"id\":\"a42c0580-3224-11e8-a572-ffca06da1357\",\"embeddableConfig\":{}}]", - "optionsJSON": "{\"darkTheme\":false,\"useMargins\":true,\"hidePanelTitles\":false}", - "version": 1, - "timeRestore": false, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" - } - } - } - } -} - -{ - "type": "doc", - "value": { - "index": ".kibana", - "id": "dashboard:invalid-refs", - "source": { - "type": "dashboard", - "updated_at": "2018-03-28T01:09:50.606Z", - "dashboard": { - "title": "Dashboard", - "hits": 0, - "description": "", - "panelsJSON": "[]", - "optionsJSON": "{}", - "version": 1, - "timeRestore": false, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{}" - } - }, - "references": [ - { - "type":"visualization", - "id": "add810b0-3224-11e8-a572-ffca06da1357", - "name": "valid-ref" - }, - { - "type":"visualization", - "id": "invalid-vis", - "name": "missing-ref" - } - ] - } - } -} diff --git a/test/api_integration/fixtures/es_archiver/management/saved_objects/relationships/mappings.json b/test/api_integration/fixtures/es_archiver/management/saved_objects/relationships/mappings.json deleted file mode 100644 index 6dd4d198e0f676..00000000000000 --- a/test/api_integration/fixtures/es_archiver/management/saved_objects/relationships/mappings.json +++ /dev/null @@ -1,297 +0,0 @@ -{ - "type": "index", - "value": { - "index": ".kibana", - "settings": { - "index": { - "number_of_shards": "1", - "auto_expand_replicas": "0-1", - "number_of_replicas": "0" - } - }, - "mappings": { - "dynamic": "strict", - "properties": { - "references": { - "properties": { - "id": { - "type": "keyword" - }, - "name": { - "type": "keyword" - }, - "type": { - "type": "keyword" - } - }, - "type": "nested" - }, - "config": { - "dynamic": "true", - "properties": { - "buildNum": { - "type": "keyword" - }, - "defaultIndex": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword", - "ignore_above": 256 - } - } - }, - "telemetry:optIn": { - "type": "boolean" - } - } - }, - "dashboard": { - "properties": { - "description": { - "type": "text" - }, - "hits": { - "type": "integer" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "optionsJSON": { - "type": "text" - }, - "panelsJSON": { - "type": "text" - }, - "refreshInterval": { - "properties": { - "display": { - "type": "keyword" - }, - "pause": { - "type": "boolean" - }, - "section": { - "type": "integer" - }, - "value": { - "type": "integer" - } - } - }, - "timeFrom": { - "type": "keyword" - }, - "timeRestore": { - "type": "boolean" - }, - "timeTo": { - "type": "keyword" - }, - "title": { - "type": "text" - }, - "uiStateJSON": { - "type": "text" - }, - "version": { - "type": "integer" - } - } - }, - "graph-workspace": { - "properties": { - "description": { - "type": "text" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "numLinks": { - "type": "integer" - }, - "numVertices": { - "type": "integer" - }, - "title": { - "type": "text" - }, - "version": { - "type": "integer" - }, - "wsState": { - "type": "text" - } - } - }, - "index-pattern": { - "properties": { - "fieldFormatMap": { - "type": "text" - }, - "fields": { - "type": "text" - }, - "intervalName": { - "type": "keyword" - }, - "notExpandable": { - "type": "boolean" - }, - "sourceFilters": { - "type": "text" - }, - "timeFieldName": { - "type": "keyword" - }, - "title": { - "type": "text" - } - } - }, - "search": { - "properties": { - "columns": { - "type": "keyword" - }, - "description": { - "type": "text" - }, - "hits": { - "type": "integer" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "sort": { - "type": "keyword" - }, - "title": { - "type": "text" - }, - "version": { - "type": "integer" - } - } - }, - "server": { - "properties": { - "uuid": { - "type": "keyword" - } - } - }, - "timelion-sheet": { - "properties": { - "description": { - "type": "text" - }, - "hits": { - "type": "integer" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "timelion_chart_height": { - "type": "integer" - }, - "timelion_columns": { - "type": "integer" - }, - "timelion_interval": { - "type": "keyword" - }, - "timelion_other_interval": { - "type": "keyword" - }, - "timelion_rows": { - "type": "integer" - }, - "timelion_sheet": { - "type": "text" - }, - "title": { - "type": "text" - }, - "version": { - "type": "integer" - } - } - }, - "type": { - "type": "keyword" - }, - "updated_at": { - "type": "date" - }, - "url": { - "properties": { - "accessCount": { - "type": "long" - }, - "accessDate": { - "type": "date" - }, - "createDate": { - "type": "date" - }, - "url": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword", - "ignore_above": 2048 - } - } - } - } - }, - "visualization": { - "properties": { - "description": { - "type": "text" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "savedSearchId": { - "type": "keyword" - }, - "title": { - "type": "text" - }, - "uiStateJSON": { - "type": "text" - }, - "version": { - "type": "integer" - }, - "visState": { - "type": "text" - } - } - } - } - } - } -} diff --git a/test/api_integration/fixtures/es_archiver/saved_objects/10k/data.json.gz b/test/api_integration/fixtures/es_archiver/saved_objects/10k/data.json.gz deleted file mode 100644 index b1a2b4301f4d82..00000000000000 Binary files a/test/api_integration/fixtures/es_archiver/saved_objects/10k/data.json.gz and /dev/null differ diff --git a/test/api_integration/fixtures/es_archiver/saved_objects/10k/mappings.json b/test/api_integration/fixtures/es_archiver/saved_objects/10k/mappings.json deleted file mode 100644 index 99264d7ebbff85..00000000000000 --- a/test/api_integration/fixtures/es_archiver/saved_objects/10k/mappings.json +++ /dev/null @@ -1,253 +0,0 @@ -{ - "type": "index", - "value": { - "index": ".kibana", - "settings": { - "index": { - "number_of_shards": "1", - "number_of_replicas": "1" - } - }, - "mappings": { - "dynamic": "strict", - "properties": { - "config": { - "dynamic": "true", - "properties": { - "buildNum": { - "type": "keyword" - }, - "defaultIndex": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword", - "ignore_above": 256 - } - } - } - } - }, - "dashboard": { - "properties": { - "description": { - "type": "text" - }, - "hits": { - "type": "integer" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "optionsJSON": { - "type": "text" - }, - "panelsJSON": { - "type": "text" - }, - "refreshInterval": { - "properties": { - "display": { - "type": "keyword" - }, - "pause": { - "type": "boolean" - }, - "section": { - "type": "integer" - }, - "value": { - "type": "integer" - } - } - }, - "timeFrom": { - "type": "keyword" - }, - "timeRestore": { - "type": "boolean" - }, - "timeTo": { - "type": "keyword" - }, - "title": { - "type": "text" - }, - "uiStateJSON": { - "type": "text" - }, - "version": { - "type": "integer" - } - } - }, - "index-pattern": { - "properties": { - "fieldFormatMap": { - "type": "text" - }, - "fields": { - "type": "text" - }, - "intervalName": { - "type": "keyword" - }, - "notExpandable": { - "type": "boolean" - }, - "sourceFilters": { - "type": "text" - }, - "timeFieldName": { - "type": "keyword" - }, - "title": { - "type": "text" - } - } - }, - "search": { - "properties": { - "columns": { - "type": "keyword" - }, - "description": { - "type": "text" - }, - "hits": { - "type": "integer" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "sort": { - "type": "keyword" - }, - "title": { - "type": "text" - }, - "version": { - "type": "integer" - } - } - }, - "server": { - "properties": { - "uuid": { - "type": "keyword" - } - } - }, - "timelion-sheet": { - "properties": { - "description": { - "type": "text" - }, - "hits": { - "type": "integer" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "timelion_chart_height": { - "type": "integer" - }, - "timelion_columns": { - "type": "integer" - }, - "timelion_interval": { - "type": "keyword" - }, - "timelion_other_interval": { - "type": "keyword" - }, - "timelion_rows": { - "type": "integer" - }, - "timelion_sheet": { - "type": "text" - }, - "title": { - "type": "text" - }, - "version": { - "type": "integer" - } - } - }, - "namespace": { - "type": "keyword" - }, - "type": { - "type": "keyword" - }, - "updated_at": { - "type": "date" - }, - "url": { - "properties": { - "accessCount": { - "type": "long" - }, - "accessDate": { - "type": "date" - }, - "createDate": { - "type": "date" - }, - "url": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword", - "ignore_above": 2048 - } - } - } - } - }, - "visualization": { - "properties": { - "description": { - "type": "text" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "savedSearchId": { - "type": "keyword" - }, - "title": { - "type": "text" - }, - "uiStateJSON": { - "type": "text" - }, - "version": { - "type": "integer" - }, - "visState": { - "type": "text" - } - } - } - } - } - } -} diff --git a/test/api_integration/fixtures/es_archiver/saved_objects/basic/data.json.gz b/test/api_integration/fixtures/es_archiver/saved_objects/basic/data.json.gz deleted file mode 100644 index c72f46370fa122..00000000000000 Binary files a/test/api_integration/fixtures/es_archiver/saved_objects/basic/data.json.gz and /dev/null differ diff --git a/test/api_integration/fixtures/es_archiver/saved_objects/basic/mappings.json b/test/api_integration/fixtures/es_archiver/saved_objects/basic/mappings.json deleted file mode 100644 index e601c43431437c..00000000000000 --- a/test/api_integration/fixtures/es_archiver/saved_objects/basic/mappings.json +++ /dev/null @@ -1,267 +0,0 @@ -{ - "type": "index", - "value": { - "index": ".kibana", - "settings": { - "index": { - "number_of_shards": "1", - "number_of_replicas": "1" - } - }, - "mappings": { - "dynamic": "strict", - "properties": { - "config": { - "dynamic": "true", - "properties": { - "buildNum": { - "type": "keyword" - }, - "defaultIndex": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword", - "ignore_above": 256 - } - } - } - } - }, - "dashboard": { - "properties": { - "description": { - "type": "text" - }, - "hits": { - "type": "integer" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "optionsJSON": { - "type": "text" - }, - "panelsJSON": { - "type": "text" - }, - "refreshInterval": { - "properties": { - "display": { - "type": "keyword" - }, - "pause": { - "type": "boolean" - }, - "section": { - "type": "integer" - }, - "value": { - "type": "integer" - } - } - }, - "timeFrom": { - "type": "keyword" - }, - "timeRestore": { - "type": "boolean" - }, - "timeTo": { - "type": "keyword" - }, - "title": { - "type": "text" - }, - "uiStateJSON": { - "type": "text" - }, - "version": { - "type": "integer" - } - } - }, - "index-pattern": { - "properties": { - "fieldFormatMap": { - "type": "text" - }, - "fields": { - "type": "text" - }, - "intervalName": { - "type": "keyword" - }, - "notExpandable": { - "type": "boolean" - }, - "sourceFilters": { - "type": "text" - }, - "timeFieldName": { - "type": "keyword" - }, - "title": { - "type": "text" - } - } - }, - "search": { - "properties": { - "columns": { - "type": "keyword" - }, - "description": { - "type": "text" - }, - "hits": { - "type": "integer" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "sort": { - "type": "keyword" - }, - "title": { - "type": "text" - }, - "version": { - "type": "integer" - } - } - }, - "server": { - "properties": { - "uuid": { - "type": "keyword" - } - } - }, - "timelion-sheet": { - "properties": { - "description": { - "type": "text" - }, - "hits": { - "type": "integer" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "timelion_chart_height": { - "type": "integer" - }, - "timelion_columns": { - "type": "integer" - }, - "timelion_interval": { - "type": "keyword" - }, - "timelion_other_interval": { - "type": "keyword" - }, - "timelion_rows": { - "type": "integer" - }, - "timelion_sheet": { - "type": "text" - }, - "title": { - "type": "text" - }, - "version": { - "type": "integer" - } - } - }, - "namespace": { - "type": "keyword" - }, - "references": { - "properties": { - "id": { - "type": "keyword" - }, - "name": { - "type": "keyword" - }, - "type": { - "type": "keyword" - } - }, - "type": "nested" - }, - "type": { - "type": "keyword" - }, - "updated_at": { - "type": "date" - }, - "url": { - "properties": { - "accessCount": { - "type": "long" - }, - "accessDate": { - "type": "date" - }, - "createDate": { - "type": "date" - }, - "url": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword", - "ignore_above": 2048 - } - } - } - } - }, - "visualization": { - "properties": { - "description": { - "type": "text" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "savedSearchId": { - "type": "keyword" - }, - "title": { - "type": "text" - }, - "uiStateJSON": { - "type": "text" - }, - "version": { - "type": "integer" - }, - "visState": { - "type": "text" - } - } - } - } - } - } -} diff --git a/test/api_integration/fixtures/es_archiver/saved_objects/find_edgecases/data.json b/test/api_integration/fixtures/es_archiver/saved_objects/find_edgecases/data.json deleted file mode 100644 index 0c8b35fd3f4994..00000000000000 --- a/test/api_integration/fixtures/es_archiver/saved_objects/find_edgecases/data.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "type": "doc", - "value": { - "index": ".kibana", - "id": "visualization:title-with-dash", - "source": { - "type": "visualization", - "updated_at": "2017-09-21T18:51:23.794Z", - "visualization": { - "title": "my-visualization", - "visState": "{}", - "uiStateJSON": "{\"spy\":{\"mode\":{\"name\":null,\"fill\":false}}}", - "description": "", - "version": 1, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"}}" - } - }, - "references": [] - } - } -} - -{ - "type": "doc", - "value": { - "index": ".kibana", - "id": "visualization:title-with-asterisk", - "source": { - "type": "visualization", - "updated_at": "2017-09-21T18:51:23.794Z", - "visualization": { - "title": "some*visualization", - "visState": "{}", - "uiStateJSON": "{\"spy\":{\"mode\":{\"name\":null,\"fill\":false}}}", - "description": "", - "version": 1, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"}}" - } - }, - "references": [] - } - } -} - - -{ - "type": "doc", - "value": { - "index": ".kibana", - "id": "visualization:noise-1", - "source": { - "type": "visualization", - "updated_at": "2017-09-21T18:51:23.794Z", - "visualization": { - "title": "Just some noise in the dataset", - "visState": "{}", - "uiStateJSON": "{\"spy\":{\"mode\":{\"name\":null,\"fill\":false}}}", - "description": "", - "version": 1, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"}}" - } - }, - "references": [] - } - } -} - -{ - "type": "doc", - "value": { - "index": ".kibana", - "id": "visualization:noise-2", - "source": { - "type": "visualization", - "updated_at": "2017-09-21T18:51:23.794Z", - "visualization": { - "title": "Just some noise in the dataset", - "visState": "{}", - "uiStateJSON": "{\"spy\":{\"mode\":{\"name\":null,\"fill\":false}}}", - "description": "", - "version": 1, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"}}" - } - }, - "references": [] - } - } -} - diff --git a/test/api_integration/fixtures/es_archiver/saved_objects/find_edgecases/mappings.json b/test/api_integration/fixtures/es_archiver/saved_objects/find_edgecases/mappings.json deleted file mode 100644 index e601c43431437c..00000000000000 --- a/test/api_integration/fixtures/es_archiver/saved_objects/find_edgecases/mappings.json +++ /dev/null @@ -1,267 +0,0 @@ -{ - "type": "index", - "value": { - "index": ".kibana", - "settings": { - "index": { - "number_of_shards": "1", - "number_of_replicas": "1" - } - }, - "mappings": { - "dynamic": "strict", - "properties": { - "config": { - "dynamic": "true", - "properties": { - "buildNum": { - "type": "keyword" - }, - "defaultIndex": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword", - "ignore_above": 256 - } - } - } - } - }, - "dashboard": { - "properties": { - "description": { - "type": "text" - }, - "hits": { - "type": "integer" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "optionsJSON": { - "type": "text" - }, - "panelsJSON": { - "type": "text" - }, - "refreshInterval": { - "properties": { - "display": { - "type": "keyword" - }, - "pause": { - "type": "boolean" - }, - "section": { - "type": "integer" - }, - "value": { - "type": "integer" - } - } - }, - "timeFrom": { - "type": "keyword" - }, - "timeRestore": { - "type": "boolean" - }, - "timeTo": { - "type": "keyword" - }, - "title": { - "type": "text" - }, - "uiStateJSON": { - "type": "text" - }, - "version": { - "type": "integer" - } - } - }, - "index-pattern": { - "properties": { - "fieldFormatMap": { - "type": "text" - }, - "fields": { - "type": "text" - }, - "intervalName": { - "type": "keyword" - }, - "notExpandable": { - "type": "boolean" - }, - "sourceFilters": { - "type": "text" - }, - "timeFieldName": { - "type": "keyword" - }, - "title": { - "type": "text" - } - } - }, - "search": { - "properties": { - "columns": { - "type": "keyword" - }, - "description": { - "type": "text" - }, - "hits": { - "type": "integer" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "sort": { - "type": "keyword" - }, - "title": { - "type": "text" - }, - "version": { - "type": "integer" - } - } - }, - "server": { - "properties": { - "uuid": { - "type": "keyword" - } - } - }, - "timelion-sheet": { - "properties": { - "description": { - "type": "text" - }, - "hits": { - "type": "integer" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "timelion_chart_height": { - "type": "integer" - }, - "timelion_columns": { - "type": "integer" - }, - "timelion_interval": { - "type": "keyword" - }, - "timelion_other_interval": { - "type": "keyword" - }, - "timelion_rows": { - "type": "integer" - }, - "timelion_sheet": { - "type": "text" - }, - "title": { - "type": "text" - }, - "version": { - "type": "integer" - } - } - }, - "namespace": { - "type": "keyword" - }, - "references": { - "properties": { - "id": { - "type": "keyword" - }, - "name": { - "type": "keyword" - }, - "type": { - "type": "keyword" - } - }, - "type": "nested" - }, - "type": { - "type": "keyword" - }, - "updated_at": { - "type": "date" - }, - "url": { - "properties": { - "accessCount": { - "type": "long" - }, - "accessDate": { - "type": "date" - }, - "createDate": { - "type": "date" - }, - "url": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword", - "ignore_above": 2048 - } - } - } - } - }, - "visualization": { - "properties": { - "description": { - "type": "text" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "savedSearchId": { - "type": "keyword" - }, - "title": { - "type": "text" - }, - "uiStateJSON": { - "type": "text" - }, - "version": { - "type": "integer" - }, - "visState": { - "type": "text" - } - } - } - } - } - } -} diff --git a/test/api_integration/fixtures/es_archiver/saved_objects/references/data.json b/test/api_integration/fixtures/es_archiver/saved_objects/references/data.json deleted file mode 100644 index 8b2095972bd4df..00000000000000 --- a/test/api_integration/fixtures/es_archiver/saved_objects/references/data.json +++ /dev/null @@ -1,120 +0,0 @@ -{ - "type": "doc", - "value": { - "index": ".kibana", - "id": "visualization:only-ref-1", - "source": { - "type": "visualization", - "updated_at": "2017-09-21T18:51:23.794Z", - "visualization": { - "title": "Vis with ref to ref-1", - "visState": "{}", - "uiStateJSON": "{\"spy\":{\"mode\":{\"name\":null,\"fill\":false}}}", - "description": "", - "version": 1, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"}}" - } - }, - "references": [ - { - "type": "ref-type", - "id": "ref-1", - "name": "ref-1" - } - ] - } - } -} - -{ - "type": "doc", - "value": { - "index": ".kibana", - "id": "visualization:ref-1-and-ref-2", - "source": { - "type": "visualization", - "updated_at": "2017-09-21T18:51:23.794Z", - "visualization": { - "title": "Vis with ref to ref-1 and ref-2", - "visState": "{}", - "uiStateJSON": "{\"spy\":{\"mode\":{\"name\":null,\"fill\":false}}}", - "description": "", - "version": 1, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"}}" - } - }, - "references": [ - { - "type": "ref-type", - "id": "ref-1", - "name": "ref-1" - }, - { - "type": "ref-type", - "id": "ref-2", - "name": "ref-2" - } - ] - } - } -} - -{ - "type": "doc", - "value": { - "index": ".kibana", - "id": "visualization:only-ref-2", - "source": { - "type": "visualization", - "updated_at": "2017-09-21T18:51:23.794Z", - "visualization": { - "title": "Vis with ref to ref-2", - "visState": "{}", - "uiStateJSON": "{\"spy\":{\"mode\":{\"name\":null,\"fill\":false}}}", - "description": "", - "version": 1, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"}}" - } - }, - "references": [ - { - "type": "ref-type", - "id": "ref-2", - "name": "ref-2" - } - ] - } - } -} - -{ - "type": "doc", - "value": { - "index": ".kibana", - "id": "visualization:only-ref-3", - "source": { - "type": "visualization", - "updated_at": "2017-09-21T18:51:23.794Z", - "visualization": { - "title": "Vis with ref to ref-3", - "visState": "{}", - "uiStateJSON": "{\"spy\":{\"mode\":{\"name\":null,\"fill\":false}}}", - "description": "", - "version": 1, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"}}" - } - }, - "references": [ - { - "type": "ref-type", - "id": "ref-3", - "name": "ref-3" - } - ] - } - } -} diff --git a/test/api_integration/fixtures/es_archiver/saved_objects/references/mappings.json b/test/api_integration/fixtures/es_archiver/saved_objects/references/mappings.json deleted file mode 100644 index e601c43431437c..00000000000000 --- a/test/api_integration/fixtures/es_archiver/saved_objects/references/mappings.json +++ /dev/null @@ -1,267 +0,0 @@ -{ - "type": "index", - "value": { - "index": ".kibana", - "settings": { - "index": { - "number_of_shards": "1", - "number_of_replicas": "1" - } - }, - "mappings": { - "dynamic": "strict", - "properties": { - "config": { - "dynamic": "true", - "properties": { - "buildNum": { - "type": "keyword" - }, - "defaultIndex": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword", - "ignore_above": 256 - } - } - } - } - }, - "dashboard": { - "properties": { - "description": { - "type": "text" - }, - "hits": { - "type": "integer" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "optionsJSON": { - "type": "text" - }, - "panelsJSON": { - "type": "text" - }, - "refreshInterval": { - "properties": { - "display": { - "type": "keyword" - }, - "pause": { - "type": "boolean" - }, - "section": { - "type": "integer" - }, - "value": { - "type": "integer" - } - } - }, - "timeFrom": { - "type": "keyword" - }, - "timeRestore": { - "type": "boolean" - }, - "timeTo": { - "type": "keyword" - }, - "title": { - "type": "text" - }, - "uiStateJSON": { - "type": "text" - }, - "version": { - "type": "integer" - } - } - }, - "index-pattern": { - "properties": { - "fieldFormatMap": { - "type": "text" - }, - "fields": { - "type": "text" - }, - "intervalName": { - "type": "keyword" - }, - "notExpandable": { - "type": "boolean" - }, - "sourceFilters": { - "type": "text" - }, - "timeFieldName": { - "type": "keyword" - }, - "title": { - "type": "text" - } - } - }, - "search": { - "properties": { - "columns": { - "type": "keyword" - }, - "description": { - "type": "text" - }, - "hits": { - "type": "integer" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "sort": { - "type": "keyword" - }, - "title": { - "type": "text" - }, - "version": { - "type": "integer" - } - } - }, - "server": { - "properties": { - "uuid": { - "type": "keyword" - } - } - }, - "timelion-sheet": { - "properties": { - "description": { - "type": "text" - }, - "hits": { - "type": "integer" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "timelion_chart_height": { - "type": "integer" - }, - "timelion_columns": { - "type": "integer" - }, - "timelion_interval": { - "type": "keyword" - }, - "timelion_other_interval": { - "type": "keyword" - }, - "timelion_rows": { - "type": "integer" - }, - "timelion_sheet": { - "type": "text" - }, - "title": { - "type": "text" - }, - "version": { - "type": "integer" - } - } - }, - "namespace": { - "type": "keyword" - }, - "references": { - "properties": { - "id": { - "type": "keyword" - }, - "name": { - "type": "keyword" - }, - "type": { - "type": "keyword" - } - }, - "type": "nested" - }, - "type": { - "type": "keyword" - }, - "updated_at": { - "type": "date" - }, - "url": { - "properties": { - "accessCount": { - "type": "long" - }, - "accessDate": { - "type": "date" - }, - "createDate": { - "type": "date" - }, - "url": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword", - "ignore_above": 2048 - } - } - } - } - }, - "visualization": { - "properties": { - "description": { - "type": "text" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "savedSearchId": { - "type": "keyword" - }, - "title": { - "type": "text" - }, - "uiStateJSON": { - "type": "text" - }, - "version": { - "type": "integer" - }, - "visState": { - "type": "text" - } - } - } - } - } - } -} diff --git a/test/api_integration/fixtures/kbn_archiver/index_patterns/basic_kibana.json b/test/api_integration/fixtures/kbn_archiver/index_patterns/basic_kibana.json new file mode 100644 index 00000000000000..2fff00dd22664d --- /dev/null +++ b/test/api_integration/fixtures/kbn_archiver/index_patterns/basic_kibana.json @@ -0,0 +1,15 @@ +{ + "attributes": { + "fields": "[{\"name\":\"bar\",\"type\":\"boolean\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"baz\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"baz.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"foo\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nestedField.child\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"nested\":{\"path\":\"nestedField\"}}}]", + "title": "basic_index" + }, + "coreMigrationVersion": "7.14.0", + "id": "91200a00-9efd-11e7-acb3-3dab96693fab", + "migrationVersion": { + "index-pattern": "7.11.0" + }, + "references": [], + "type": "index-pattern", + "updated_at": "2017-09-21T18:49:16.270Z", + "version": "WzEsMl0=" +} \ No newline at end of file diff --git a/test/api_integration/fixtures/kbn_archiver/management/saved_objects/relationships.json b/test/api_integration/fixtures/kbn_archiver/management/saved_objects/relationships.json new file mode 100644 index 00000000000000..da2241952ca373 --- /dev/null +++ b/test/api_integration/fixtures/kbn_archiver/management/saved_objects/relationships.json @@ -0,0 +1,200 @@ +{ + "attributes": { + "description": "", + "hits": 0, + "timelion_chart_height": 275, + "timelion_columns": 2, + "timelion_interval": "auto", + "timelion_rows": 2, + "timelion_sheet": [ + ".es(*)" + ], + "title": "New TimeLion Sheet", + "version": 1 + }, + "coreMigrationVersion": "8.0.0", + "id": "190f3e90-2ec3-11e8-ba48-69fc4e41e1f6", + "references": [], + "type": "timelion-sheet", + "updated_at": "2018-03-23T17:53:30.872Z", + "version": "WzgsMl0=" +} + +{ + "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\":\"id\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true}]", + "title": "saved_objects*" + }, + "coreMigrationVersion": "8.0.0", + "id": "8963ca30-3224-11e8-a572-ffca06da1357", + "migrationVersion": { + "index-pattern": "7.11.0" + }, + "references": [], + "type": "index-pattern", + "updated_at": "2018-03-28T01:08:34.290Z", + "version": "WzksMl0=" +} + +{ + "attributes": { + "columns": [ + "_source" + ], + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"highlightAll\":true,\"version\":true,\"query\":{\"query\":\"id:3\",\"language\":\"lucene\"},\"filter\":[],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "sort": [ + [ + "_score", + "desc" + ] + ], + "title": "OneRecord", + "version": 1 + }, + "coreMigrationVersion": "8.0.0", + "id": "960372e0-3224-11e8-a572-ffca06da1357", + "migrationVersion": { + "search": "7.9.3" + }, + "references": [ + { + "id": "8963ca30-3224-11e8-a572-ffca06da1357", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "search", + "updated_at": "2018-03-28T01:08:55.182Z", + "version": "WzExLDJd" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"}}" + }, + "savedSearchRefName": "search_0", + "title": "VisualizationFromSavedSearch", + "uiStateJSON": "{\"vis\":{\"params\":{\"sort\":{\"columnIndex\":null,\"direction\":null}}}}", + "version": 1, + "visState": "{\"title\":\"VisualizationFromSavedSearch\",\"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\":{}}]}" + }, + "coreMigrationVersion": "8.0.0", + "id": "a42c0580-3224-11e8-a572-ffca06da1357", + "migrationVersion": { + "visualization": "7.13.0" + }, + "references": [ + { + "id": "960372e0-3224-11e8-a572-ffca06da1357", + "name": "search_0", + "type": "search" + } + ], + "type": "visualization", + "updated_at": "2018-03-28T01:09:18.936Z", + "version": "WzEyLDJd" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Visualization", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Visualization\",\"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\":\"count\",\"schema\":\"metric\",\"params\":{}}]}" + }, + "coreMigrationVersion": "8.0.0", + "id": "add810b0-3224-11e8-a572-ffca06da1357", + "migrationVersion": { + "visualization": "7.13.0" + }, + "references": [ + { + "id": "8963ca30-3224-11e8-a572-ffca06da1357", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2018-03-28T01:09:35.163Z", + "version": "WzEzLDJd" +} + +{ + "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.0.0-alpha1\",\"gridData\":{\"w\":24,\"h\":15,\"x\":0,\"y\":0,\"i\":\"1\"},\"panelIndex\":\"1\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_0\"},{\"version\":\"7.0.0-alpha1\",\"gridData\":{\"w\":24,\"h\":15,\"x\":24,\"y\":0,\"i\":\"2\"},\"panelIndex\":\"2\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_1\"}]", + "timeRestore": false, + "title": "Dashboard", + "version": 1 + }, + "coreMigrationVersion": "8.0.0", + "id": "b70c7ae0-3224-11e8-a572-ffca06da1357", + "migrationVersion": { + "dashboard": "7.11.0" + }, + "references": [ + { + "id": "add810b0-3224-11e8-a572-ffca06da1357", + "name": "panel_0", + "type": "visualization" + }, + { + "id": "a42c0580-3224-11e8-a572-ffca06da1357", + "name": "panel_1", + "type": "visualization" + } + ], + "type": "dashboard", + "updated_at": "2018-03-28T01:09:50.606Z", + "version": "WzE0LDJd" +} + +{ + "attributes": { + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"kuery\"}}" + }, + "optionsJSON": "{}", + "panelsJSON": "[]", + "timeRestore": false, + "title": "Dashboard", + "version": 1 + }, + "coreMigrationVersion": "8.0.0", + "id": "invalid-refs", + "migrationVersion": { + "dashboard": "7.11.0" + }, + "references": [ + { + "id": "add810b0-3224-11e8-a572-ffca06da1357", + "name": "valid-ref", + "type": "visualization" + }, + { + "id": "invalid-vis", + "name": "missing-ref", + "type": "visualization" + } + ], + "type": "dashboard", + "updated_at": "2018-03-28T01:09:50.606Z", + "version": "WzE1LDJd" +} \ No newline at end of file diff --git a/test/api_integration/fixtures/kbn_archiver/saved_objects/basic.json b/test/api_integration/fixtures/kbn_archiver/saved_objects/basic.json new file mode 100644 index 00000000000000..4f343b81cd4021 --- /dev/null +++ b/test/api_integration/fixtures/kbn_archiver/saved_objects/basic.json @@ -0,0 +1,97 @@ +{ + "attributes": { + "buildNum": 8467, + "defaultIndex": "91200a00-9efd-11e7-acb3-3dab96693fab" + }, + "coreMigrationVersion": "7.14.0", + "id": "7.0.0-alpha1", + "migrationVersion": { + "config": "7.13.0" + }, + "references": [], + "type": "config", + "updated_at": "2017-09-21T18:49:16.302Z", + "version": "WzksMl0=" +} + +{ + "attributes": { + "fields": "[{\"name\":\"@message\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"@message.raw\",\"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.raw\",\"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\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"agent.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"bytes\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"clientip\",\"type\":\"ip\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"extension\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"extension.raw\",\"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.raw\",\"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.raw\",\"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.raw\",\"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.raw\",\"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.raw\",\"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.raw\",\"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.raw\",\"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.raw\",\"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.raw\",\"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.raw\",\"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.raw\",\"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.raw\",\"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.raw\",\"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.raw\",\"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.raw\",\"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.raw\",\"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.raw\",\"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.raw\",\"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.raw\",\"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.raw\",\"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.raw\",\"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.raw\",\"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.raw\",\"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.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"type\",\"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.raw\",\"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.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true}]", + "timeFieldName": "@timestamp", + "title": "logstash-*" + }, + "coreMigrationVersion": "7.14.0", + "id": "91200a00-9efd-11e7-acb3-3dab96693fab", + "migrationVersion": { + "index-pattern": "7.11.0" + }, + "references": [], + "type": "index-pattern", + "updated_at": "2017-09-21T18:49:16.270Z", + "version": "WzgsMl0=" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Count of requests", + "uiStateJSON": "{\"spy\":{\"mode\":{\"name\":null,\"fill\":false}}}", + "version": 1, + "visState": "{\"title\":\"Count of requests\",\"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\":{}}}]}" + }, + "coreMigrationVersion": "7.14.0", + "id": "dd7caf20-9efd-11e7-acb3-3dab96693fab", + "migrationVersion": { + "visualization": "7.13.0" + }, + "references": [ + { + "id": "91200a00-9efd-11e7-acb3-3dab96693fab", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2017-09-21T18:51:23.794Z", + "version": "WzEwLDJd" +} + +{ + "attributes": { + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" + }, + "optionsJSON": "{\"darkTheme\":false}", + "panelsJSON": "[{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":0,\"w\":24,\"h\":12,\"i\":\"1\"},\"panelIndex\":\"1\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_1\"}]", + "refreshInterval": { + "display": "Off", + "pause": false, + "value": 0 + }, + "timeFrom": "Wed Sep 16 2015 22:52:17 GMT-0700", + "timeRestore": true, + "timeTo": "Fri Sep 18 2015 12:24:38 GMT-0700", + "title": "Requests", + "version": 1 + }, + "coreMigrationVersion": "7.14.0", + "id": "be3733a0-9efe-11e7-acb3-3dab96693fab", + "migrationVersion": { + "dashboard": "7.11.0" + }, + "references": [ + { + "id": "dd7caf20-9efd-11e7-acb3-3dab96693fab", + "name": "1:panel_1", + "type": "visualization" + } + ], + "type": "dashboard", + "updated_at": "2017-09-21T18:57:40.826Z", + "version": "WzExLDJd" +} \ No newline at end of file diff --git a/test/api_integration/fixtures/kbn_archiver/saved_objects/basic/foo-ns.json b/test/api_integration/fixtures/kbn_archiver/saved_objects/basic/foo-ns.json new file mode 100644 index 00000000000000..736abf331d3146 --- /dev/null +++ b/test/api_integration/fixtures/kbn_archiver/saved_objects/basic/foo-ns.json @@ -0,0 +1,97 @@ +{ + "attributes": { + "buildNum": 8467, + "defaultIndex": "91200a00-9efd-11e7-acb3-3dab96693fab" + }, + "coreMigrationVersion": "7.14.0", + "id": "7.0.0-alpha1", + "migrationVersion": { + "config": "7.13.0" + }, + "references": [], + "type": "config", + "updated_at": "2017-09-21T18:49:16.302Z", + "version": "WzEzLDJd" +} + +{ + "attributes": { + "fields": "[{\"name\":\"@message\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"@message.raw\",\"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.raw\",\"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\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"agent.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"bytes\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"clientip\",\"type\":\"ip\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"extension\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"extension.raw\",\"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.raw\",\"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.raw\",\"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.raw\",\"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.raw\",\"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.raw\",\"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.raw\",\"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.raw\",\"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.raw\",\"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.raw\",\"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.raw\",\"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.raw\",\"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.raw\",\"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.raw\",\"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.raw\",\"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.raw\",\"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.raw\",\"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.raw\",\"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.raw\",\"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.raw\",\"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.raw\",\"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.raw\",\"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.raw\",\"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.raw\",\"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.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"type\",\"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.raw\",\"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.raw\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true}]", + "timeFieldName": "@timestamp", + "title": "logstash-*" + }, + "coreMigrationVersion": "7.14.0", + "id": "91200a00-9efd-11e7-acb3-3dab96693fab", + "migrationVersion": { + "index-pattern": "7.11.0" + }, + "references": [], + "type": "index-pattern", + "updated_at": "2017-09-21T18:49:16.270Z", + "version": "WzEyLDJd" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Count of requests", + "uiStateJSON": "{\"spy\":{\"mode\":{\"name\":null,\"fill\":false}}}", + "version": 1, + "visState": "{\"title\":\"Count of requests\",\"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\":{}}}]}" + }, + "coreMigrationVersion": "7.14.0", + "id": "dd7caf20-9efd-11e7-acb3-3dab96693fab", + "migrationVersion": { + "visualization": "7.13.0" + }, + "references": [ + { + "id": "91200a00-9efd-11e7-acb3-3dab96693fab", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2017-09-21T18:51:23.794Z", + "version": "WzE0LDJd" +} + +{ + "attributes": { + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" + }, + "optionsJSON": "{\"darkTheme\":false}", + "panelsJSON": "[{\"version\":\"7.3.0\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":0,\"w\":24,\"h\":12,\"i\":\"1\"},\"panelIndex\":\"1\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_1\"}]", + "refreshInterval": { + "display": "Off", + "pause": false, + "value": 0 + }, + "timeFrom": "Wed Sep 16 2015 22:52:17 GMT-0700", + "timeRestore": true, + "timeTo": "Fri Sep 18 2015 12:24:38 GMT-0700", + "title": "Requests", + "version": 1 + }, + "coreMigrationVersion": "7.14.0", + "id": "be3733a0-9efe-11e7-acb3-3dab96693fab", + "migrationVersion": { + "dashboard": "7.11.0" + }, + "references": [ + { + "id": "dd7caf20-9efd-11e7-acb3-3dab96693fab", + "name": "1:panel_1", + "type": "visualization" + } + ], + "type": "dashboard", + "updated_at": "2017-09-21T18:57:40.826Z", + "version": "WzE1LDJd" +} \ No newline at end of file diff --git a/test/api_integration/fixtures/kbn_archiver/saved_objects/find_edgecases.json b/test/api_integration/fixtures/kbn_archiver/saved_objects/find_edgecases.json new file mode 100644 index 00000000000000..7b181e10b958fa --- /dev/null +++ b/test/api_integration/fixtures/kbn_archiver/saved_objects/find_edgecases.json @@ -0,0 +1,87 @@ +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"}}" + }, + "title": "Just some noise in the dataset", + "uiStateJSON": "{\"spy\":{\"mode\":{\"name\":null,\"fill\":false}}}", + "version": 1, + "visState": "{}" + }, + "coreMigrationVersion": "8.0.0", + "id": "noise-1", + "migrationVersion": { + "visualization": "7.13.0" + }, + "references": [], + "type": "visualization", + "updated_at": "2017-09-21T18:51:23.794Z", + "version": "WzYsMl0=" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"}}" + }, + "title": "Just some noise in the dataset", + "uiStateJSON": "{\"spy\":{\"mode\":{\"name\":null,\"fill\":false}}}", + "version": 1, + "visState": "{}" + }, + "coreMigrationVersion": "8.0.0", + "id": "noise-2", + "migrationVersion": { + "visualization": "7.13.0" + }, + "references": [], + "type": "visualization", + "updated_at": "2017-09-21T18:51:23.794Z", + "version": "WzcsMl0=" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"}}" + }, + "title": "some*visualization", + "uiStateJSON": "{\"spy\":{\"mode\":{\"name\":null,\"fill\":false}}}", + "version": 1, + "visState": "{}" + }, + "coreMigrationVersion": "8.0.0", + "id": "title-with-asterisk", + "migrationVersion": { + "visualization": "7.13.0" + }, + "references": [], + "type": "visualization", + "updated_at": "2017-09-21T18:51:23.794Z", + "version": "WzUsMl0=" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"}}" + }, + "title": "my-visualization", + "uiStateJSON": "{\"spy\":{\"mode\":{\"name\":null,\"fill\":false}}}", + "version": 1, + "visState": "{}" + }, + "coreMigrationVersion": "8.0.0", + "id": "title-with-dash", + "migrationVersion": { + "visualization": "7.13.0" + }, + "references": [], + "type": "visualization", + "updated_at": "2017-09-21T18:51:23.794Z", + "version": "WzQsMl0=" +} \ No newline at end of file diff --git a/test/api_integration/fixtures/kbn_archiver/saved_objects/references.json b/test/api_integration/fixtures/kbn_archiver/saved_objects/references.json new file mode 100644 index 00000000000000..1da6ed3731e320 --- /dev/null +++ b/test/api_integration/fixtures/kbn_archiver/saved_objects/references.json @@ -0,0 +1,116 @@ +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"}}" + }, + "title": "Vis with ref to ref-1", + "uiStateJSON": "{\"spy\":{\"mode\":{\"name\":null,\"fill\":false}}}", + "version": 1, + "visState": "{}" + }, + "coreMigrationVersion": "8.0.0", + "id": "only-ref-1", + "migrationVersion": { + "visualization": "7.13.0" + }, + "references": [ + { + "id": "ref-1", + "name": "ref-1", + "type": "ref-type" + } + ], + "type": "visualization", + "updated_at": "2017-09-21T18:51:23.794Z", + "version": "WzQsMl0=" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"}}" + }, + "title": "Vis with ref to ref-2", + "uiStateJSON": "{\"spy\":{\"mode\":{\"name\":null,\"fill\":false}}}", + "version": 1, + "visState": "{}" + }, + "coreMigrationVersion": "8.0.0", + "id": "only-ref-2", + "migrationVersion": { + "visualization": "7.13.0" + }, + "references": [ + { + "id": "ref-2", + "name": "ref-2", + "type": "ref-type" + } + ], + "type": "visualization", + "updated_at": "2017-09-21T18:51:23.794Z", + "version": "WzYsMl0=" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"}}" + }, + "title": "Vis with ref to ref-3", + "uiStateJSON": "{\"spy\":{\"mode\":{\"name\":null,\"fill\":false}}}", + "version": 1, + "visState": "{}" + }, + "coreMigrationVersion": "8.0.0", + "id": "only-ref-3", + "migrationVersion": { + "visualization": "7.13.0" + }, + "references": [ + { + "id": "ref-3", + "name": "ref-3", + "type": "ref-type" + } + ], + "type": "visualization", + "updated_at": "2017-09-21T18:51:23.794Z", + "version": "WzcsMl0=" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"}}" + }, + "title": "Vis with ref to ref-1 and ref-2", + "uiStateJSON": "{\"spy\":{\"mode\":{\"name\":null,\"fill\":false}}}", + "version": 1, + "visState": "{}" + }, + "coreMigrationVersion": "8.0.0", + "id": "ref-1-and-ref-2", + "migrationVersion": { + "visualization": "7.13.0" + }, + "references": [ + { + "id": "ref-1", + "name": "ref-1", + "type": "ref-type" + }, + { + "id": "ref-2", + "name": "ref-2", + "type": "ref-type" + } + ], + "type": "visualization", + "updated_at": "2017-09-21T18:51:23.794Z", + "version": "WzUsMl0=" +} \ No newline at end of file diff --git a/test/common/services/deployment.ts b/test/common/services/deployment.ts index 4f7baf69d5d1e0..b250d39ce65d65 100644 --- a/test/common/services/deployment.ts +++ b/test/common/services/deployment.ts @@ -29,14 +29,6 @@ export class DeploymentService extends FtrService { return getUrl.baseUrl(this.config.get('servers.elasticsearch')); } - /** - * Helper to detect an OSS licensed Kibana - * Useful for functional testing in cloud environment - */ - async isOss() { - return this.config.get('kbnTestServer.serverArgs').indexOf('--oss') > -1; - } - async isCloud(): Promise { const baseUrl = this.getHostPort(); const username = this.config.get('servers.kibana.username'); diff --git a/test/examples/config.js b/test/examples/config.js index 1ee095fbdedeb0..fc62f185fb682c 100644 --- a/test/examples/config.js +++ b/test/examples/config.js @@ -50,6 +50,9 @@ export default async function ({ readConfigFile }) { esArchiver: { directory: path.resolve(__dirname, '../es_archives'), }, + kbnArchiver: { + directory: path.resolve(__dirname, '../functional/fixtures/kbn_archiver'), + }, screenshots: functionalConfig.get('screenshots'), junit: { reportName: 'Example plugin functional tests', diff --git a/test/examples/embeddables/dashboard.ts b/test/examples/embeddables/dashboard.ts index 597846ab6a43d4..553ebe126070e5 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 browser = getService('browser'); @@ -102,12 +103,14 @@ export default function ({ getService, getPageObjects }: PluginFunctionalProvide describe('dashboard container', () => { before(async () => { await esArchiver.loadIfNeeded('../functional/fixtures/es_archiver/dashboard/current/data'); - await esArchiver.loadIfNeeded('../functional/fixtures/es_archiver/dashboard/current/kibana'); + await kibanaServer.importExport.load('dashboard/current/kibana'); await PageObjects.common.navigateToApp('dashboardEmbeddableExamples'); await testSubjects.click('dashboardEmbeddableByValue'); await updateInput(JSON.stringify(testDashboardInput, null, 4)); }); + after(() => kibanaServer.importExport.unload('dashboard/current/kibana')); + it('pie charts', async () => { await pieChart.expectPieSliceCount(5); }); diff --git a/test/examples/expressions_explorer/expressions.ts b/test/examples/expressions_explorer/expressions.ts index 39afa177501d5b..4c240653b5fdd0 100644 --- a/test/examples/expressions_explorer/expressions.ts +++ b/test/examples/expressions_explorer/expressions.ts @@ -22,7 +22,7 @@ export default function ({ getService }: PluginFunctionalProviderContext) { await retry.try(async () => { const text = await testSubjects.getVisibleText('expressionResult'); expect(text).to.be( - '{\n "type": "error",\n "error": {\n "message": "Function markdown could not be found.",\n "name": "fn not found"\n }\n}' + '{\n "type": "render",\n "as": "markdown",\n "value": {\n "content": "## expressions explorer",\n "font": {\n "type": "style",\n "spec": {\n "fontFamily": "\'Open Sans\', Helvetica, Arial, sans-serif",\n "fontWeight": "normal",\n "fontStyle": "normal",\n "textDecoration": "none",\n "textAlign": "left",\n "fontSize": "14px",\n "lineHeight": "1"\n },\n "css": "font-family:\'Open Sans\', Helvetica, Arial, sans-serif;font-weight:normal;font-style:normal;text-decoration:none;text-align:left;font-size:14px;line-height:1"\n },\n "openLinksInNewTab": false\n }\n}' ); }); }); @@ -30,7 +30,7 @@ export default function ({ getService }: PluginFunctionalProviderContext) { it('renders expression', async () => { await retry.try(async () => { const text = await testSubjects.getVisibleText('expressionRender'); - expect(text).to.be('Function markdown could not be found.'); + expect(text).to.be('expressions explorer rendering'); }); }); diff --git a/test/functional/apps/dashboard/copy_panel_to.ts b/test/functional/apps/dashboard/copy_panel_to.ts index 641d520801c4dc..8eab23e416bca2 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,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('dashboard panel copy to', function viewEditModeTests() { before(async function () { - await esArchiver.load('dashboard/current/kibana'); + await kibanaServer.importExport.load('dashboard/current/kibana'); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); @@ -61,6 +60,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { after(async function () { await PageObjects.dashboard.gotoDashboardLandingPage(); + await kibanaServer.importExport.unload('dashboard/current/kibana'); }); 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 3de3b2f843f554..73c877007571e4 100644 --- a/test/functional/apps/dashboard/create_and_add_embeddables.ts +++ b/test/functional/apps/dashboard/create_and_add_embeddables.ts @@ -16,13 +16,12 @@ 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('dashboard/current/kibana'); + await kibanaServer.importExport.load('dashboard/current/kibana'); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); @@ -31,6 +30,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.dashboard.loadSavedDashboard('few panels'); }); + after(() => kibanaServer.importExport.unload('dashboard/current/kibana')); + describe('add new visualization link', () => { it('adds new visualization via the top nav link', async () => { const originalPanelCount = await PageObjects.dashboard.getPanelCount(); diff --git a/test/functional/apps/dashboard/dashboard_back_button.ts b/test/functional/apps/dashboard/dashboard_back_button.ts index 7e0bf92e3292aa..7008fa101e0b51 100644 --- a/test/functional/apps/dashboard/dashboard_back_button.ts +++ b/test/functional/apps/dashboard/dashboard_back_button.ts @@ -10,14 +10,13 @@ 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'); describe('dashboard back button', () => { before(async () => { - await esArchiver.loadIfNeeded('dashboard/current/kibana'); + await kibanaServer.importExport.load('dashboard/current/kibana'); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); @@ -25,6 +24,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.dashboard.preserveCrossAppState(); }); + after(() => kibanaServer.importExport.unload('dashboard/current/kibana')); + it('after navigation from listing page to dashboard back button works', async () => { await PageObjects.dashboard.gotoDashboardLandingPage(); await PageObjects.dashboard.loadSavedDashboard('dashboard with everything'); diff --git a/test/functional/apps/dashboard/dashboard_error_handling.ts b/test/functional/apps/dashboard/dashboard_error_handling.ts index 5d3d8bd251d63c..b3ef9f40455d71 100644 --- a/test/functional/apps/dashboard/dashboard_error_handling.ts +++ b/test/functional/apps/dashboard/dashboard_error_handling.ts @@ -9,7 +9,7 @@ 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']); const browser = getService('browser'); const testSubjects = getService('testSubjects'); @@ -19,10 +19,16 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { */ describe('dashboard error handling', () => { before(async () => { - await esArchiver.loadIfNeeded('dashboard/current/kibana'); + await kibanaServer.importExport.load('dashboard/current/kibana'); await PageObjects.common.navigateToApp('dashboard'); + await kibanaServer.savedObjects.delete({ + type: 'index-pattern', + id: 'to-be-removed', + }); }); + after(() => kibanaServer.importExport.unload('dashboard/current/kibana')); + // wrapping into own describe to make sure new tab is cleaned up even if test failed // see: https://github.com/elastic/kibana/pull/67280#discussion_r430528122 describe('recreate index pattern link works', () => { diff --git a/test/functional/apps/dashboard/dashboard_filter_bar.ts b/test/functional/apps/dashboard/dashboard_filter_bar.ts index c2d6cc4c38b6be..ad6aa9fa69e215 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 PageObjects = getPageObjects([ @@ -31,13 +30,15 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('dashboard filter bar', () => { before(async () => { - await esArchiver.load('dashboard/current/kibana'); + await kibanaServer.importExport.load('dashboard/current/kibana'); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); await PageObjects.common.navigateToApp('dashboard'); }); + after(() => kibanaServer.importExport.unload('dashboard/current/kibana')); + describe('Add a filter bar', function () { before(async () => { await PageObjects.dashboard.gotoDashboardLandingPage(); @@ -200,6 +201,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('bad filters are loaded properly', function () { before(async () => { + await kibanaServer.savedObjects.delete({ + type: 'index-pattern', + id: 'to-be-removed', + }); await filterBar.ensureFieldEditorModalIsClosed(); await PageObjects.dashboard.gotoDashboardLandingPage(); await PageObjects.dashboard.loadSavedDashboard('dashboard with bad filters'); diff --git a/test/functional/apps/dashboard/dashboard_filtering.ts b/test/functional/apps/dashboard/dashboard_filtering.ts index 86c57efec818b5..b60df350aaa99a 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'); @@ -54,7 +53,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }; before(async () => { - await esArchiver.load('dashboard/current/kibana'); + await kibanaServer.importExport.load('dashboard/current/kibana'); await security.testUser.setRoles(['kibana_admin', 'test_logstash_reader', 'animals']); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', @@ -66,6 +65,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { after(async () => { await security.testUser.restoreDefaults(); + await kibanaServer.importExport.unload('dashboard/current/kibana'); }); 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 809fb6fc140014..0812cef9aec57b 100644 --- a/test/functional/apps/dashboard/dashboard_grid.ts +++ b/test/functional/apps/dashboard/dashboard_grid.ts @@ -12,14 +12,13 @@ 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('dashboard/current/kibana'); + await kibanaServer.importExport.load('dashboard/current/kibana'); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); @@ -29,6 +28,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.dashboard.switchToEditMode(); }); + after(() => kibanaServer.importExport.unload('dashboard/current/kibana')); + 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 1f62256a3fdb59..173854f6774724 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,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { let originalTitles: string[] = []; before(async () => { - await esArchiver.load('dashboard/current/kibana'); + await kibanaServer.importExport.load('dashboard/current/kibana'); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); @@ -31,6 +30,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { originalTitles = await PageObjects.dashboard.getPanelTitles(); }); + after(() => kibanaServer.importExport.unload('dashboard/current/kibana')); + 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 bf8300defc445a..780c275f822d90 100644 --- a/test/functional/apps/dashboard/dashboard_query_bar.ts +++ b/test/functional/apps/dashboard/dashboard_query_bar.ts @@ -20,7 +20,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('dashboard query bar', () => { before(async () => { - await esArchiver.load('dashboard/current/kibana'); + await kibanaServer.importExport.load('dashboard/current/kibana'); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); @@ -29,6 +29,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.dashboard.loadSavedDashboard('dashboard with filter'); }); + after(() => kibanaServer.importExport.unload('dashboard/current/kibana')); + it('causes panels to reload when refresh is clicked', async () => { await esArchiver.unload('dashboard/current/data'); diff --git a/test/functional/apps/dashboard/dashboard_saved_query.ts b/test/functional/apps/dashboard/dashboard_saved_query.ts index 307c34d3f3c43f..7e7c82d3542b33 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,15 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('dashboard saved queries', function describeIndexTests() { before(async function () { - await esArchiver.load('dashboard/current/kibana'); + await kibanaServer.importExport.load('dashboard/current/kibana'); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); await PageObjects.common.navigateToApp('dashboard'); }); + after(() => kibanaServer.importExport.unload('dashboard/current/kibana')); + 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 c93636aeb63c67..a56897732b007b 100644 --- a/test/functional/apps/dashboard/dashboard_snapshots.ts +++ b/test/functional/apps/dashboard/dashboard_snapshots.ts @@ -18,14 +18,13 @@ 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('dashboard/current/kibana'); + await kibanaServer.importExport.load('dashboard/current/kibana'); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); @@ -38,6 +37,7 @@ export default function ({ after(async function () { await browser.setWindowSize(1300, 900); + await kibanaServer.importExport.unload('dashboard/current/kibana'); }); 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 1cdc4bbff2c532..b7eccb9a7c02db 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,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }; before(async () => { - await esArchiver.load('dashboard/current/kibana'); + await kibanaServer.importExport.load('dashboard/current/kibana'); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); @@ -44,6 +43,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.dashboard.preserveCrossAppState(); }); + after(() => kibanaServer.importExport.unload('dashboard/current/kibana')); + 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 fd203cd8c1356d..8fd153e10e7df7 100644 --- a/test/functional/apps/dashboard/dashboard_unsaved_state.ts +++ b/test/functional/apps/dashboard/dashboard_unsaved_state.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 testSubjects = getService('testSubjects'); const kibanaServer = getService('kibanaServer'); const dashboardAddPanel = getService('dashboardAddPanel'); @@ -23,7 +22,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { // FLAKY: https://github.com/elastic/kibana/issues/91191 describe.skip('dashboard unsaved panels', () => { before(async () => { - await esArchiver.load('dashboard/current/kibana'); + await kibanaServer.importExport.load('dashboard/current/kibana'); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); @@ -34,6 +33,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { originalPanelCount = await PageObjects.dashboard.getPanelCount(); }); + after(() => kibanaServer.importExport.unload('dashboard/current/kibana')); + it('does not show unsaved changes badge when there are no unsaved changes', async () => { await testSubjects.missingOrFail('dashboardUnsavedChangesBadge'); }); diff --git a/test/functional/apps/dashboard/data_shared_attributes.ts b/test/functional/apps/dashboard/data_shared_attributes.ts index 2d6396be80f462..a5505f08e7dbbe 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 PageObjects = getPageObjects(['common', 'dashboard', 'timePicker']); @@ -21,7 +20,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { let originalPanelTitles: string[]; before(async () => { - await esArchiver.load('dashboard/current/kibana'); + await kibanaServer.importExport.load('dashboard/current/kibana'); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); @@ -31,6 +30,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.dashboard.waitForRenderComplete(); }); + after(() => kibanaServer.importExport.unload('dashboard/current/kibana')); + it('should have time picker with data-shared-timefilter-duration', async () => { await retry.try(async () => { const sharedData = await PageObjects.timePicker.getTimeDurationForSharing(); diff --git a/test/functional/apps/dashboard/edit_embeddable_redirects.ts b/test/functional/apps/dashboard/edit_embeddable_redirects.ts index be540e18a503f9..ff6fb0ef74d93f 100644 --- a/test/functional/apps/dashboard/edit_embeddable_redirects.ts +++ b/test/functional/apps/dashboard/edit_embeddable_redirects.ts @@ -12,14 +12,13 @@ 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('dashboard/current/kibana'); + await kibanaServer.importExport.load('dashboard/current/kibana'); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); @@ -29,6 +28,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.dashboard.switchToEditMode(); }); + after(() => kibanaServer.importExport.unload('dashboard/current/kibana')); + 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 b2f21aefcf79cc..7a8708cfe418b6 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,15 @@ export default function ({ getService, getPageObjects }) { describe('edit visualizations from dashboard', () => { before(async () => { - await esArchiver.load('dashboard/current/kibana'); + await kibanaServer.importExport.load('dashboard/current/kibana'); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); await PageObjects.common.navigateToApp('dashboard'); }); + after(() => kibanaServer.importExport.unload('dashboard/current/kibana')); + 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 b96e9572625731..0924959e8b1e7d 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,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { ]; before(async () => { - await esArchiver.load('dashboard/current/kibana'); + await kibanaServer.importExport.load('dashboard/current/kibana'); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); @@ -37,6 +36,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.dashboard.loadSavedDashboard('few panels'); }); + after(() => kibanaServer.importExport.unload('dashboard/current/kibana')); + it('hides the chrome', async () => { const globalNavShown = await globalNav.exists(); expect(globalNavShown).to.be(true); diff --git a/test/functional/apps/dashboard/embeddable_data_grid.ts b/test/functional/apps/dashboard/embeddable_data_grid.ts index a9e0039de1f79f..ae6016370166ad 100644 --- a/test/functional/apps/dashboard/embeddable_data_grid.ts +++ b/test/functional/apps/dashboard/embeddable_data_grid.ts @@ -23,7 +23,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { before(async () => { await esArchiver.loadIfNeeded('logstash_functional'); await esArchiver.loadIfNeeded('dashboard/current/data'); - await esArchiver.loadIfNeeded('dashboard/current/kibana'); + await kibanaServer.importExport.load('dashboard/current/kibana'); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', 'doc_table:legacy': false, @@ -36,6 +36,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await dashboardAddPanel.addSavedSearch('Rendering-Test:-saved-search'); }); + after(() => kibanaServer.importExport.unload('dashboard/current/kibana')); + 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 20fe9aeb1387a2..e9d596c70edeb7 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,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('embeddable library', () => { before(async () => { - await esArchiver.load('dashboard/current/kibana'); + await kibanaServer.importExport.load('dashboard/current/kibana'); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); @@ -30,6 +29,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.dashboard.clickNewDashboard(); }); + after(() => kibanaServer.importExport.unload('dashboard/current/kibana')); + it('unlink visualize panel from embeddable library', async () => { // add heatmap panel from library await dashboardAddPanel.clickOpenAddPanel(); diff --git a/test/functional/apps/dashboard/embeddable_rendering.ts b/test/functional/apps/dashboard/embeddable_rendering.ts index c9ffd3f6ae86e7..fa939e344cb766 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 security = getService('security'); @@ -94,7 +93,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe.skip('dashboard embeddable rendering', function describeIndexTests() { before(async () => { await security.testUser.setRoles(['kibana_admin', 'animals', 'test_logstash_reader']); - await esArchiver.load('dashboard/current/kibana'); + await kibanaServer.importExport.load('dashboard/current/kibana'); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); @@ -113,6 +112,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const newUrl = currentUrl.replace(/\?.*$/, ''); await browser.get(newUrl, false); await security.testUser.restoreDefaults(); + await kibanaServer.importExport.unload('dashboard/current/kibana'); }); it('adding visualizations', async () => { diff --git a/test/functional/apps/dashboard/empty_dashboard.ts b/test/functional/apps/dashboard/empty_dashboard.ts index 2cfa6d73dcb728..eeec5233398171 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,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('empty dashboard', () => { before(async () => { - await esArchiver.load('dashboard/current/kibana'); + await kibanaServer.importExport.load('dashboard/current/kibana'); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); @@ -33,6 +32,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { after(async () => { await dashboardAddPanel.closeAddPanel(); await PageObjects.dashboard.gotoDashboardLandingPage(); + await kibanaServer.importExport.unload('dashboard/current/kibana'); }); 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 1f63dcdafdcce2..027777ee7b8732 100644 --- a/test/functional/apps/dashboard/full_screen_mode.ts +++ b/test/functional/apps/dashboard/full_screen_mode.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 PageObjects = getPageObjects(['dashboard', 'common']); @@ -20,7 +19,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('full screen mode', () => { before(async () => { - await esArchiver.load('dashboard/current/kibana'); + await kibanaServer.importExport.load('dashboard/current/kibana'); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); @@ -29,6 +28,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.dashboard.loadSavedDashboard('few panels'); }); + after(() => kibanaServer.importExport.unload('dashboard/current/kibana')); + 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 9c7f472b287a72..ad539740045948 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,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('legacy urls', function describeIndexTests() { before(async function () { await security.testUser.setRoles(['kibana_admin', 'animals']); - await esArchiver.load('dashboard/current/kibana'); + await kibanaServer.importExport.load('dashboard/current/kibana'); await PageObjects.common.navigateToApp('dashboard'); await PageObjects.dashboard.clickNewDashboard(); await dashboardAddPanel.addVisualization('Rendering-Test:-animal-sounds-pie'); @@ -53,6 +53,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.dashboard.gotoDashboardLandingPage(); await listingTable.deleteItem('legacyTest', testDashboardId); await security.testUser.restoreDefaults(); + await kibanaServer.importExport.unload('dashboard/current/kibana'); }); describe('kibana link redirect', () => { diff --git a/test/functional/apps/dashboard/panel_expand_toggle.ts b/test/functional/apps/dashboard/panel_expand_toggle.ts index 45642542cc0aca..305b4ccf827eba 100644 --- a/test/functional/apps/dashboard/panel_expand_toggle.ts +++ b/test/functional/apps/dashboard/panel_expand_toggle.ts @@ -13,14 +13,13 @@ 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', 'visualize', 'header', 'common']); describe('expanding a panel', () => { before(async () => { - await esArchiver.load('dashboard/current/kibana'); + await kibanaServer.importExport.load('dashboard/current/kibana'); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); @@ -29,6 +28,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.dashboard.loadSavedDashboard('few panels'); }); + after(() => kibanaServer.importExport.unload('dashboard/current/kibana')); + 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 098f6ccc00d94a..2961e7ce191d44 100644 --- a/test/functional/apps/dashboard/saved_search_embeddable.ts +++ b/test/functional/apps/dashboard/saved_search_embeddable.ts @@ -21,7 +21,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { before(async () => { await esArchiver.loadIfNeeded('logstash_functional'); await esArchiver.loadIfNeeded('dashboard/current/data'); - await esArchiver.loadIfNeeded('dashboard/current/kibana'); + await kibanaServer.importExport.load('dashboard/current/kibana'); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); @@ -35,6 +35,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { ); }); + after(() => kibanaServer.importExport.unload('dashboard/current/kibana')); + 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 8191b5efb51f61..a7dbd4aea32160 100644 --- a/test/functional/apps/dashboard/share.ts +++ b/test/functional/apps/dashboard/share.ts @@ -10,13 +10,12 @@ 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('dashboard/current/kibana'); + await kibanaServer.importExport.load('dashboard/current/kibana'); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); @@ -25,6 +24,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.dashboard.loadSavedDashboard('few panels'); }); + after(() => kibanaServer.importExport.unload('dashboard/current/kibana')); + 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/time_zones.ts b/test/functional/apps/dashboard/time_zones.ts index a4a586cb635d5c..44443da0b3eab5 100644 --- a/test/functional/apps/dashboard/time_zones.ts +++ b/test/functional/apps/dashboard/time_zones.ts @@ -13,7 +13,6 @@ import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { const pieChart = getService('pieChart'); - const esArchiver = getService('esArchiver'); const kibanaServer = getService('kibanaServer'); const PageObjects = getPageObjects([ 'dashboard', @@ -27,7 +26,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { this.tags('includeFirefox'); before(async () => { - await esArchiver.load('dashboard/current/kibana'); + await kibanaServer.importExport.load('dashboard/current/kibana'); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); @@ -44,6 +43,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { after(async () => { await kibanaServer.uiSettings.replace({ 'dateFormat:tz': 'UTC' }); + await kibanaServer.importExport.unload('dashboard/current/kibana'); }); it('Exported dashboard adjusts EST time to UTC', async () => { diff --git a/test/functional/apps/dashboard/url_field_formatter.ts b/test/functional/apps/dashboard/url_field_formatter.ts index f930987f16d5f8..b6b08025cd1b55 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'); @@ -39,7 +38,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { // FLAKY: https://github.com/elastic/kibana/issues/79463 describe.skip('Changing field formatter to Url', () => { before(async function () { - await esArchiver.load('dashboard/current/kibana'); + await kibanaServer.importExport.load('dashboard/current/kibana'); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); @@ -52,6 +51,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await settings.controlChangeSave(); }); + after(() => kibanaServer.importExport.unload('dashboard/current/kibana')); + it('applied on dashboard', async () => { await common.navigateToApp('dashboard'); await dashboard.loadSavedDashboard('dashboard with everything'); diff --git a/test/functional/apps/dashboard/view_edit.ts b/test/functional/apps/dashboard/view_edit.ts index 99a78ebd069c5d..cf8de265d3cb26 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 testSubjects = getService('testSubjects'); @@ -22,7 +21,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('dashboard view edit mode', function viewEditModeTests() { before(async () => { - await esArchiver.load('dashboard/current/kibana'); + await kibanaServer.importExport.load('dashboard/current/kibana'); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); @@ -30,6 +29,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.dashboard.preserveCrossAppState(); }); + after(() => kibanaServer.importExport.unload('dashboard/current/kibana')); + it('create new dashboard opens in edit mode', async function () { await PageObjects.dashboard.gotoDashboardLandingPage(); await PageObjects.dashboard.clickNewDashboard(); diff --git a/test/functional/apps/home/_home.js b/test/functional/apps/home/_home.js index 056f3ec6f993c7..24e672463964d4 100644 --- a/test/functional/apps/home/_home.js +++ b/test/functional/apps/home/_home.js @@ -11,6 +11,7 @@ import expect from '@kbn/expect'; export default function ({ getService, getPageObjects }) { const browser = getService('browser'); const globalNav = getService('globalNav'); + const testSubjects = getService('testSubjects'); const PageObjects = getPageObjects(['common', 'header', 'home']); describe('Kibana takes you home', function describeIndexTests() { @@ -25,7 +26,8 @@ export default function ({ getService, getPageObjects }) { }); it('clicking on console on homepage should take you to console app', async () => { - await PageObjects.home.clickSynopsis('console'); + await PageObjects.common.navigateToUrl('home'); + await testSubjects.click('homeDevTools'); const url = await browser.getCurrentUrl(); expect(url.includes('/app/dev_tools#/console')).to.be(true); }); diff --git a/test/functional/apps/home/_newsfeed.ts b/test/functional/apps/home/_newsfeed.ts index 449aeea0133419..5b8b5a22cf439a 100644 --- a/test/functional/apps/home/_newsfeed.ts +++ b/test/functional/apps/home/_newsfeed.ts @@ -11,7 +11,6 @@ import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { const globalNav = getService('globalNav'); - const deployment = getService('deployment'); const PageObjects = getPageObjects(['newsfeed']); describe('Newsfeed', () => { @@ -38,16 +37,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('shows all news from newsfeed', async () => { const objects = await PageObjects.newsfeed.getNewsfeedList(); - if (await deployment.isOss()) { - expect(objects).to.eql([ - '21 June 2019\nYou are functionally testing the newsfeed widget with fixtures!\nSee test/common/fixtures/plugins/newsfeed/newsfeed_simulation\nGeneric feed-viewer could go here', - '21 June 2019\nStaging too!\nHello world\nGeneric feed-viewer could go here', - ]); - } else { - // can't shim the API in cloud so going to check that at least something is rendered - // to test that the API was called and returned something that could be rendered - expect(objects.length).to.be.above(0); - } + // can't shim the API in cloud so going to check that at least something is rendered + // to test that the API was called and returned something that could be rendered + expect(objects.length).to.be.above(0); }); it('clicking on newsfeed icon should close opened newsfeed', async () => { diff --git a/test/functional/apps/management/_scripted_fields.js b/test/functional/apps/management/_scripted_fields.js index fdbc419c162412..c7a4c8c51bf44a 100644 --- a/test/functional/apps/management/_scripted_fields.js +++ b/test/functional/apps/management/_scripted_fields.js @@ -27,7 +27,6 @@ import expect from '@kbn/expect'; export default function ({ getService, getPageObjects }) { const esArchiver = getService('esArchiver'); const kibanaServer = getService('kibanaServer'); - const deployment = getService('deployment'); const log = getService('log'); const browser = getService('browser'); const retry = getService('retry'); @@ -187,16 +186,14 @@ export default function ({ getService, getPageObjects }) { }); it('should visualize scripted field in vertical bar chart', async function () { - const isOss = await deployment.isOss(); - if (!isOss) { - await filterBar.removeAllFilters(); - await PageObjects.discover.clickFieldListItemVisualize(scriptedPainlessFieldName); - await PageObjects.header.waitUntilLoadingHasFinished(); - // verify Lens opens a visualization - expect(await testSubjects.getVisibleTextAll('lns-dimensionTrigger')).to.contain( - 'Average of ram_Pain1' - ); - } + await filterBar.removeAllFilters(); + await PageObjects.discover.clickFieldListItemVisualize(scriptedPainlessFieldName); + await PageObjects.header.waitUntilLoadingHasFinished(); + // verify Lens opens a visualization + expect(await testSubjects.getVisibleTextAll('lns-dimensionTrigger')).to.contain( + '@timestamp', + 'Median of ram_Pain1' + ); }); }); @@ -277,15 +274,12 @@ export default function ({ getService, getPageObjects }) { }); it('should visualize scripted field in vertical bar chart', async function () { - const isOss = await deployment.isOss(); - if (!isOss) { - await PageObjects.discover.clickFieldListItemVisualize(scriptedPainlessFieldName2); - await PageObjects.header.waitUntilLoadingHasFinished(); - // verify Lens opens a visualization - expect(await testSubjects.getVisibleTextAll('lns-dimensionTrigger')).to.contain( - 'Top values of painString' - ); - } + await PageObjects.discover.clickFieldListItemVisualize(scriptedPainlessFieldName2); + await PageObjects.header.waitUntilLoadingHasFinished(); + // verify Lens opens a visualization + expect(await testSubjects.getVisibleTextAll('lns-dimensionTrigger')).to.contain( + 'Top values of painString' + ); }); }); @@ -367,15 +361,12 @@ export default function ({ getService, getPageObjects }) { }); it('should visualize scripted field in vertical bar chart', async function () { - const isOss = await deployment.isOss(); - if (!isOss) { - await PageObjects.discover.clickFieldListItemVisualize(scriptedPainlessFieldName2); - await PageObjects.header.waitUntilLoadingHasFinished(); - // verify Lens opens a visualization - expect(await testSubjects.getVisibleTextAll('lns-dimensionTrigger')).to.contain( - 'Top values of painBool' - ); - } + await PageObjects.discover.clickFieldListItemVisualize(scriptedPainlessFieldName2); + await PageObjects.header.waitUntilLoadingHasFinished(); + // verify Lens opens a visualization + expect(await testSubjects.getVisibleTextAll('lns-dimensionTrigger')).to.contain( + 'Top values of painBool' + ); }); }); @@ -460,15 +451,10 @@ export default function ({ getService, getPageObjects }) { }); it('should visualize scripted field in vertical bar chart', async function () { - const isOss = await deployment.isOss(); - if (!isOss) { - await PageObjects.discover.clickFieldListItemVisualize(scriptedPainlessFieldName2); - await PageObjects.header.waitUntilLoadingHasFinished(); - // verify Lens opens a visualization - expect(await testSubjects.getVisibleTextAll('lns-dimensionTrigger')).to.contain( - 'painDate' - ); - } + await PageObjects.discover.clickFieldListItemVisualize(scriptedPainlessFieldName2); + await PageObjects.header.waitUntilLoadingHasFinished(); + // verify Lens opens a visualization + expect(await testSubjects.getVisibleTextAll('lns-dimensionTrigger')).to.contain('painDate'); }); }); }); diff --git a/test/functional/apps/visualize/_chart_types.ts b/test/functional/apps/visualize/_chart_types.ts index 4ee6e3dac21b63..71bdc75d41d9cb 100644 --- a/test/functional/apps/visualize/_chart_types.ts +++ b/test/functional/apps/visualize/_chart_types.ts @@ -35,6 +35,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.visualize.clickAggBasedVisualizations(); const expectedChartTypes = [ 'Area', + 'Coordinate Map', 'Data table', 'Gauge', 'Goal', @@ -43,6 +44,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { 'Line', 'Metric', 'Pie', + 'Region Map', 'Tag cloud', 'Timelion', 'Vertical bar', diff --git a/test/functional/apps/visualize/_tile_map.ts b/test/functional/apps/visualize/_tile_map.ts index 3af467affa1fbe..719c2c48761f9a 100644 --- a/test/functional/apps/visualize/_tile_map.ts +++ b/test/functional/apps/visualize/_tile_map.ts @@ -125,26 +125,26 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('Fit data bounds should zoom to level 3', async function () { const expectedPrecision2DataTable = [ - ['-', 'dr4', '127', { lat: 40, lon: -76 }], - ['-', 'dr7', '92', { lat: 41, lon: -74 }], - ['-', '9q5', '91', { lat: 34, lon: -119 }], - ['-', '9qc', '89', { lat: 38, lon: -122 }], - ['-', 'drk', '87', { lat: 41, lon: -73 }], - ['-', 'dps', '82', { lat: 42, lon: -84 }], - ['-', 'dph', '82', { lat: 40, lon: -84 }], - ['-', 'dp3', '79', { lat: 41, lon: -88 }], - ['-', 'dpe', '78', { lat: 42, lon: -86 }], - ['-', 'dp8', '77', { lat: 43, lon: -90 }], - ['-', 'dp6', '74', { lat: 41, lon: -87 }], - ['-', 'djv', '74', { lat: 33, lon: -83 }], - ['-', '9qh', '74', { lat: 34, lon: -118 }], - ['-', 'dpq', '73', { lat: 41, lon: -81 }], - ['-', 'dpp', '73', { lat: 40, lon: -80 }], - ['-', '9y7', '73', { lat: 35, lon: -97 }], - ['-', '9vg', '73', { lat: 32, lon: -97 }], - ['-', 'drs', '71', { lat: 42, lon: -73 }], - ['-', '9ys', '71', { lat: 37, lon: -95 }], - ['-', '9yn', '71', { lat: 34, lon: -93 }], + ['-', 'dn', '1,429', { lat: 36, lon: -85 }], + ['-', 'dp', '1,418', { lat: 41, lon: -85 }], + ['-', '9y', '1,215', { lat: 36, lon: -96 }], + ['-', '9z', '1,099', { lat: 42, lon: -96 }], + ['-', 'dr', '1,076', { lat: 42, lon: -74 }], + ['-', 'dj', '982', { lat: 31, lon: -85 }], + ['-', '9v', '938', { lat: 31, lon: -96 }], + ['-', '9q', '722', { lat: 36, lon: -120 }], + ['-', '9w', '475', { lat: 36, lon: -107 }], + ['-', 'cb', '457', { lat: 46, lon: -96 }], + ['-', 'c2', '453', { lat: 47, lon: -120 }], + ['-', '9x', '420', { lat: 41, lon: -107 }], + ['-', 'dq', '399', { lat: 37, lon: -78 }], + ['-', '9r', '396', { lat: 41, lon: -120 }], + ['-', '9t', '274', { lat: 32, lon: -107 }], + ['-', 'c8', '271', { lat: 47, lon: -107 }], + ['-', 'dh', '214', { lat: 26, lon: -82 }], + ['-', 'b6', '207', { lat: 60, lon: -162 }], + ['-', 'bd', '206', { lat: 59, lon: -153 }], + ['-', 'b7', '167', { lat: 64, lon: -163 }], ]; await PageObjects.tileMap.clickMapFitDataBounds(); diff --git a/test/functional/apps/visualize/index.ts b/test/functional/apps/visualize/index.ts index 3702fe6bf64a35..940648e998dcc0 100644 --- a/test/functional/apps/visualize/index.ts +++ b/test/functional/apps/visualize/index.ts @@ -14,8 +14,6 @@ export default function ({ getService, loadTestFile }: FtrProviderContext) { const log = getService('log'); const esArchiver = getService('esArchiver'); const kibanaServer = getService('kibanaServer'); - const deployment = getService('deployment'); - let isOss = true; describe('visualize app', () => { before(async () => { @@ -28,7 +26,6 @@ export default function ({ getService, loadTestFile }: FtrProviderContext) { defaultIndex: 'logstash-*', [UI_SETTINGS.FORMAT_BYTES_DEFAULT_PATTERN]: '0,0.[000]b', }); - isOss = await deployment.isOss(); }); // TODO: Remove when vislib is removed @@ -66,11 +63,7 @@ export default function ({ getService, loadTestFile }: FtrProviderContext) { loadTestFile(require.resolve('./_data_table')); loadTestFile(require.resolve('./_data_table_nontimeindex')); loadTestFile(require.resolve('./_data_table_notimeindex_filters')); - - // this check is not needed when the CI doesn't run anymore for the OSS - if (!isOss) { - loadTestFile(require.resolve('./_chart_types')); - } + loadTestFile(require.resolve('./_chart_types')); }); describe('', function () { @@ -98,11 +91,8 @@ export default function ({ getService, loadTestFile }: FtrProviderContext) { loadTestFile(require.resolve('./_linked_saved_searches')); loadTestFile(require.resolve('./_visualize_listing')); loadTestFile(require.resolve('./_add_to_dashboard.ts')); - - if (isOss) { - loadTestFile(require.resolve('./_tile_map')); - loadTestFile(require.resolve('./_region_map')); - } + loadTestFile(require.resolve('./_tile_map')); + loadTestFile(require.resolve('./_region_map')); }); describe('', function () { diff --git a/test/functional/config.js b/test/functional/config.js index 1048bd72dc5759..4a6791a3bc62fb 100644 --- a/test/functional/config.js +++ b/test/functional/config.js @@ -14,6 +14,7 @@ export default async function ({ readConfigFile }) { return { testFiles: [ + require.resolve('./apps/status_page'), require.resolve('./apps/bundles'), require.resolve('./apps/console'), require.resolve('./apps/context'), @@ -23,7 +24,6 @@ export default async function ({ readConfigFile }) { require.resolve('./apps/home'), require.resolve('./apps/management'), require.resolve('./apps/saved_objects_management'), - require.resolve('./apps/status_page'), require.resolve('./apps/timelion'), require.resolve('./apps/visualize'), ], @@ -36,13 +36,15 @@ export default async function ({ readConfigFile }) { ...commonConfig.get('esTestCluster'), serverArgs: ['xpack.security.enabled=false'], }, + kbnTestServer: { ...commonConfig.get('kbnTestServer'), serverArgs: [ ...commonConfig.get('kbnTestServer.serverArgs'), - '--oss', '--telemetry.optIn=false', + '--xpack.security.enabled=false', '--savedObjects.maxImportPayloadBytes=10485760', + '--xpack.maps.showMapVisualizationTypes=true', ], }, diff --git a/test/functional/fixtures/es_archiver/dashboard/current/kibana/data.json.gz b/test/functional/fixtures/es_archiver/dashboard/current/kibana/data.json.gz deleted file mode 100644 index ae78761fef0d34..00000000000000 Binary files a/test/functional/fixtures/es_archiver/dashboard/current/kibana/data.json.gz and /dev/null differ 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 9f5edaad0fe763..00000000000000 --- a/test/functional/fixtures/es_archiver/dashboard/current/kibana/mappings.json +++ /dev/null @@ -1,490 +0,0 @@ -{ - "type": "index", - "value": { - "aliases": { - ".kibana": { - } - }, - "index": ".kibana_1", - "mappings": { - "_meta": { - "migrationMappingPropertyHashes": { - "application_usage_totals": "c897e4310c5f24b07caaff3db53ae2c1", - "application_usage_transactional": "965839e75f809fefe04f92dc4d99722a", - "config": "ae24d22d5986d04124cc6568f771066f", - "dashboard": "d00f614b29a80360e1190193fd333bab", - "index-pattern": "66eccb05066c5a89924f48a9e9736499", - "kql-telemetry": "d12a98a6f19a2d273696597547e064ee", - "migrationVersion": "4a1746014a75ade3a714e1db5763276f", - "namespace": "2f4316de49999235636386fe51dc06c1", - "namespaces": "2f4316de49999235636386fe51dc06c1", - "query": "11aaeb7f5f7fa5bb43f25e18ce26e7d9", - "references": "7997cf5a56cc02bdc9c93361bde732b0", - "sample-data-telemetry": "7d3cfeb915303c9641c59681967ffeb4", - "search": "181661168bbadd1eff5902361e2a0d5c", - "telemetry": "36a616f7026dfa617d6655df850fe16d", - "timelion-sheet": "9a2a2748877c7a7b582fef201ab1d4cf", - "tsvb-validation-telemetry": "3a37ef6c8700ae6fc97d5c7da00e9215", - "type": "2f4316de49999235636386fe51dc06c1", - "ui-metric": "0d409297dc5ebe1e3a1da691c6ee32e3", - "updated_at": "00da57df13e94e9d98437d13ace4bfe0", - "url": "b675c3be8d76ecf029294d51dc7ec65d", - "visualization": "52d7a13ad68a150c4525b292d23e12cc" - } - }, - "dynamic": "strict", - "properties": { - "application_usage_totals": { - "properties": { - "appId": { - "type": "keyword" - }, - "minutesOnScreen": { - "type": "float" - }, - "numberOfClicks": { - "type": "long" - } - } - }, - "application_usage_transactional": { - "properties": { - "appId": { - "type": "keyword" - }, - "minutesOnScreen": { - "type": "float" - }, - "numberOfClicks": { - "type": "long" - }, - "timestamp": { - "type": "date" - } - } - }, - "config": { - "dynamic": "true", - "properties": { - "accessibility:disableAnimations": { - "type": "boolean" - }, - "buildNum": { - "type": "keyword" - }, - "dateFormat:tz": { - "fields": { - "keyword": { - "ignore_above": 256, - "type": "keyword" - } - }, - "type": "text" - }, - "defaultIndex": { - "fields": { - "keyword": { - "ignore_above": 256, - "type": "keyword" - } - }, - "type": "text" - }, - "notifications:lifetime:banner": { - "type": "long" - }, - "notifications:lifetime:error": { - "type": "long" - }, - "notifications:lifetime:info": { - "type": "long" - }, - "notifications:lifetime:warning": { - "type": "long" - }, - "xPackMonitoring:showBanner": { - "type": "boolean" - } - } - }, - "dashboard": { - "properties": { - "description": { - "type": "text" - }, - "hits": { - "type": "integer" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "optionsJSON": { - "type": "text" - }, - "panelsJSON": { - "type": "text" - }, - "refreshInterval": { - "properties": { - "display": { - "type": "keyword" - }, - "pause": { - "type": "boolean" - }, - "section": { - "type": "integer" - }, - "value": { - "type": "integer" - } - } - }, - "timeFrom": { - "type": "keyword" - }, - "timeRestore": { - "type": "boolean" - }, - "timeTo": { - "type": "keyword" - }, - "title": { - "type": "text" - }, - "version": { - "type": "integer" - } - } - }, - "index-pattern": { - "properties": { - "fieldFormatMap": { - "type": "text" - }, - "fields": { - "type": "text" - }, - "intervalName": { - "type": "keyword" - }, - "notExpandable": { - "type": "boolean" - }, - "sourceFilters": { - "type": "text" - }, - "timeFieldName": { - "type": "keyword" - }, - "title": { - "type": "text" - }, - "type": { - "type": "keyword" - }, - "typeMeta": { - "type": "keyword" - } - } - }, - "kql-telemetry": { - "properties": { - "optInCount": { - "type": "long" - }, - "optOutCount": { - "type": "long" - } - } - }, - "migrationVersion": { - "dynamic": "true", - "properties": { - "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" - }, - "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": { - "type": "keyword" - }, - "description": { - "type": "text" - }, - "hits": { - "type": "integer" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "sort": { - "type": "keyword" - }, - "title": { - "type": "text" - }, - "version": { - "type": "integer" - } - } - }, - "server": { - "properties": { - "uuid": { - "type": "keyword" - } - } - }, - "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" - } - } - }, - "timelion-sheet": { - "properties": { - "description": { - "type": "text" - }, - "hits": { - "type": "integer" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "timelion_chart_height": { - "type": "integer" - }, - "timelion_columns": { - "type": "integer" - }, - "timelion_interval": { - "type": "keyword" - }, - "timelion_other_interval": { - "type": "keyword" - }, - "timelion_rows": { - "type": "integer" - }, - "timelion_sheet": { - "type": "text" - }, - "title": { - "type": "text" - }, - "version": { - "type": "integer" - } - } - }, - "tsvb-validation-telemetry": { - "properties": { - "failedRequests": { - "type": "long" - } - } - }, - "type": { - "type": "keyword" - }, - "ui-metric": { - "properties": { - "count": { - "type": "integer" - } - } - }, - "updated_at": { - "type": "date" - }, - "url": { - "properties": { - "accessCount": { - "type": "long" - }, - "accessDate": { - "type": "date" - }, - "createDate": { - "type": "date" - }, - "url": { - "fields": { - "keyword": { - "type": "keyword" - } - }, - "type": "text" - } - } - }, - "visualization": { - "properties": { - "description": { - "type": "text" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "savedSearchRefName": { - "type": "keyword" - }, - "title": { - "type": "text" - }, - "uiStateJSON": { - "type": "text" - }, - "version": { - "type": "integer" - }, - "visState": { - "type": "text" - } - } - } - } - }, - "settings": { - "index": { - "auto_expand_replicas": "0-1", - "number_of_replicas": "0", - "number_of_shards": "1" - } - } - } -} \ No newline at end of file diff --git a/test/functional/fixtures/es_archiver/saved_objects_management/export_transform/data.json b/test/functional/fixtures/es_archiver/saved_objects_management/export_transform/data.json deleted file mode 100644 index bd3fe654a56c4e..00000000000000 --- a/test/functional/fixtures/es_archiver/saved_objects_management/export_transform/data.json +++ /dev/null @@ -1,141 +0,0 @@ -{ - "type": "doc", - "value": { - "index": ".kibana", - "id": "test-export-transform:type_1-obj_1", - "source": { - "test-export-transform": { - "title": "test_1-obj_1", - "enabled": true - }, - "type": "test-export-transform", - "migrationVersion": {}, - "updated_at": "2018-12-21T00:43:07.096Z" - } - } -} - -{ - "type": "doc", - "value": { - "index": ".kibana", - "id": "test-export-transform:type_1-obj_2", - "source": { - "test-export-transform": { - "title": "test_1-obj_2", - "enabled": true - }, - "type": "test-export-transform", - "migrationVersion": {}, - "updated_at": "2018-12-21T00:43:07.096Z" - } - } -} - -{ - "type": "doc", - "value": { - "index": ".kibana", - "id": "test-export-add:type_2-obj_1", - "source": { - "test-export-add": { - "title": "test_2-obj_1" - }, - "type": "test-export-add", - "migrationVersion": {}, - "updated_at": "2018-12-21T00:43:07.096Z" - } - } -} - -{ - "type": "doc", - "value": { - "index": ".kibana", - "id": "test-export-add:type_2-obj_2", - "source": { - "test-export-add": { - "title": "test_2-obj_2" - }, - "type": "test-export-add", - "migrationVersion": {}, - "updated_at": "2018-12-21T00:43:07.096Z" - } - } -} - -{ - "type": "doc", - "value": { - "index": ".kibana", - "id": "test-export-add-dep:type_dep-obj_1", - "source": { - "test-export-add-dep": { - "title": "type_dep-obj_1" - }, - "type": "test-export-add-dep", - "migrationVersion": {}, - "updated_at": "2018-12-21T00:43:07.096Z", - "references": [ - { - "type": "test-export-add", - "id": "type_2-obj_1" - } - ] - } - } -} - -{ - "type": "doc", - "value": { - "index": ".kibana", - "id": "test-export-add-dep:type_dep-obj_2", - "source": { - "test-export-add-dep": { - "title": "type_dep-obj_2" - }, - "type": "test-export-add-dep", - "migrationVersion": {}, - "updated_at": "2018-12-21T00:43:07.096Z", - "references": [ - { - "type": "test-export-add", - "id": "type_2-obj_2" - } - ] - } - } -} - -{ - "type": "doc", - "value": { - "index": ".kibana", - "id": "test-export-invalid-transform:type_3-obj_1", - "source": { - "test-export-invalid-transform": { - "title": "test_2-obj_1" - }, - "type": "test-export-invalid-transform", - "migrationVersion": {}, - "updated_at": "2018-12-21T00:43:07.096Z" - } - } -} - -{ - "type": "doc", - "value": { - "index": ".kibana", - "id": "test-export-transform-error:type_4-obj_1", - "source": { - "test-export-transform-error": { - "title": "test_2-obj_1" - }, - "type": "test-export-transform-error", - "migrationVersion": {}, - "updated_at": "2018-12-21T00:43:07.096Z" - } - } -} diff --git a/test/functional/fixtures/es_archiver/saved_objects_management/export_transform/mappings.json b/test/functional/fixtures/es_archiver/saved_objects_management/export_transform/mappings.json deleted file mode 100644 index d85125efd672ae..00000000000000 --- a/test/functional/fixtures/es_archiver/saved_objects_management/export_transform/mappings.json +++ /dev/null @@ -1,499 +0,0 @@ -{ - "type": "index", - "value": { - "index": ".kibana", - "settings": { - "index": { - "number_of_shards": "1", - "auto_expand_replicas": "0-1", - "number_of_replicas": "0" - } - }, - "mappings": { - "dynamic": "strict", - "properties": { - "test-export-transform": { - "properties": { - "title": { "type": "text" }, - "enabled": { "type": "boolean" } - } - }, - "test-export-add": { - "properties": { - "title": { "type": "text" } - } - }, - "test-export-add-dep": { - "properties": { - "title": { "type": "text" } - } - }, - "test-export-transform-error": { - "properties": { - "title": { "type": "text" } - } - }, - "test-export-invalid-transform": { - "properties": { - "title": { "type": "text" } - } - }, - "apm-telemetry": { - "properties": { - "has_any_services": { - "type": "boolean" - }, - "services_per_agent": { - "properties": { - "go": { - "type": "long", - "null_value": 0 - }, - "java": { - "type": "long", - "null_value": 0 - }, - "js-base": { - "type": "long", - "null_value": 0 - }, - "nodejs": { - "type": "long", - "null_value": 0 - }, - "python": { - "type": "long", - "null_value": 0 - }, - "ruby": { - "type": "long", - "null_value": 0 - } - } - } - } - }, - "canvas-workpad": { - "dynamic": "false", - "properties": { - "@created": { - "type": "date" - }, - "@timestamp": { - "type": "date" - }, - "id": { - "type": "text", - "index": false - }, - "name": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword" - } - } - } - } - }, - "config": { - "dynamic": "true", - "properties": { - "accessibility:disableAnimations": { - "type": "boolean" - }, - "buildNum": { - "type": "keyword" - }, - "dateFormat:tz": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword", - "ignore_above": 256 - } - } - }, - "defaultIndex": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword", - "ignore_above": 256 - } - } - }, - "telemetry:optIn": { - "type": "boolean" - } - } - }, - "dashboard": { - "properties": { - "description": { - "type": "text" - }, - "hits": { - "type": "integer" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "optionsJSON": { - "type": "text" - }, - "panelsJSON": { - "type": "text" - }, - "refreshInterval": { - "properties": { - "display": { - "type": "keyword" - }, - "pause": { - "type": "boolean" - }, - "section": { - "type": "integer" - }, - "value": { - "type": "integer" - } - } - }, - "timeFrom": { - "type": "keyword" - }, - "timeRestore": { - "type": "boolean" - }, - "timeTo": { - "type": "keyword" - }, - "title": { - "type": "text" - }, - "uiStateJSON": { - "type": "text" - }, - "version": { - "type": "integer" - } - } - }, - "map": { - "properties": { - "bounds": { - "type": "geo_shape", - "tree": "quadtree" - }, - "description": { - "type": "text" - }, - "layerListJSON": { - "type": "text" - }, - "mapStateJSON": { - "type": "text" - }, - "title": { - "type": "text" - }, - "uiStateJSON": { - "type": "text" - }, - "version": { - "type": "integer" - } - } - }, - "graph-workspace": { - "properties": { - "description": { - "type": "text" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "numLinks": { - "type": "integer" - }, - "numVertices": { - "type": "integer" - }, - "title": { - "type": "text" - }, - "version": { - "type": "integer" - }, - "wsState": { - "type": "text" - } - } - }, - "index-pattern": { - "properties": { - "fieldFormatMap": { - "type": "text" - }, - "fields": { - "type": "text" - }, - "intervalName": { - "type": "keyword" - }, - "notExpandable": { - "type": "boolean" - }, - "sourceFilters": { - "type": "text" - }, - "timeFieldName": { - "type": "keyword" - }, - "title": { - "type": "text" - }, - "type": { - "type": "keyword" - }, - "typeMeta": { - "type": "keyword" - } - } - }, - "kql-telemetry": { - "properties": { - "optInCount": { - "type": "long" - }, - "optOutCount": { - "type": "long" - } - } - }, - "migrationVersion": { - "dynamic": "true", - "properties": { - "index-pattern": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword", - "ignore_above": 256 - } - } - }, - "space": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword", - "ignore_above": 256 - } - } - } - } - }, - "namespace": { - "type": "keyword" - }, - "search": { - "properties": { - "columns": { - "type": "keyword" - }, - "description": { - "type": "text" - }, - "hits": { - "type": "integer" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "sort": { - "type": "keyword" - }, - "title": { - "type": "text" - }, - "version": { - "type": "integer" - } - } - }, - "server": { - "properties": { - "uuid": { - "type": "keyword" - } - } - }, - "space": { - "properties": { - "_reserved": { - "type": "boolean" - }, - "color": { - "type": "keyword" - }, - "description": { - "type": "text" - }, - "disabledFeatures": { - "type": "keyword" - }, - "initials": { - "type": "keyword" - }, - "name": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword", - "ignore_above": 2048 - } - } - } - } - }, - "spaceId": { - "type": "keyword" - }, - "telemetry": { - "properties": { - "enabled": { - "type": "boolean" - } - } - }, - "timelion-sheet": { - "properties": { - "description": { - "type": "text" - }, - "hits": { - "type": "integer" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "timelion_chart_height": { - "type": "integer" - }, - "timelion_columns": { - "type": "integer" - }, - "timelion_interval": { - "type": "keyword" - }, - "timelion_other_interval": { - "type": "keyword" - }, - "timelion_rows": { - "type": "integer" - }, - "timelion_sheet": { - "type": "text" - }, - "title": { - "type": "text" - }, - "version": { - "type": "integer" - } - } - }, - "type": { - "type": "keyword" - }, - "updated_at": { - "type": "date" - }, - "url": { - "properties": { - "accessCount": { - "type": "long" - }, - "accessDate": { - "type": "date" - }, - "createDate": { - "type": "date" - }, - "url": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword", - "ignore_above": 2048 - } - } - } - } - }, - "visualization": { - "properties": { - "description": { - "type": "text" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "savedSearchId": { - "type": "keyword" - }, - "title": { - "type": "text" - }, - "uiStateJSON": { - "type": "text" - }, - "version": { - "type": "integer" - }, - "visState": { - "type": "text" - } - } - }, - "references": { - "properties": { - "id": { - "type": "keyword" - }, - "name": { - "type": "keyword" - }, - "type": { - "type": "keyword" - } - }, - "type": "nested" - } - } - } - } -} diff --git a/test/functional/fixtures/es_archiver/saved_objects_management/hidden_types/mappings.json b/test/functional/fixtures/es_archiver/saved_objects_management/hidden_types/mappings.json deleted file mode 100644 index dfefd60a5ebe3e..00000000000000 --- a/test/functional/fixtures/es_archiver/saved_objects_management/hidden_types/mappings.json +++ /dev/null @@ -1,518 +0,0 @@ -{ - "type": "index", - "value": { - "index": ".kibana", - "settings": { - "index": { - "number_of_shards": "1", - "auto_expand_replicas": "0-1", - "number_of_replicas": "0" - } - }, - "mappings": { - "dynamic": "strict", - "properties": { - "test-actions-export-hidden": { - "properties": { - "title": { "type": "text" } - } - }, - "test-export-transform": { - "properties": { - "title": { "type": "text" }, - "enabled": { "type": "boolean" } - } - }, - "test-export-add": { - "properties": { - "title": { "type": "text" } - } - }, - "test-export-add-dep": { - "properties": { - "title": { "type": "text" } - } - }, - "test-export-transform-error": { - "properties": { - "title": { "type": "text" } - } - }, - "test-export-invalid-transform": { - "properties": { - "title": { "type": "text" } - } - }, - "apm-telemetry": { - "properties": { - "has_any_services": { - "type": "boolean" - }, - "services_per_agent": { - "properties": { - "go": { - "type": "long", - "null_value": 0 - }, - "java": { - "type": "long", - "null_value": 0 - }, - "js-base": { - "type": "long", - "null_value": 0 - }, - "nodejs": { - "type": "long", - "null_value": 0 - }, - "python": { - "type": "long", - "null_value": 0 - }, - "ruby": { - "type": "long", - "null_value": 0 - } - } - } - } - }, - "canvas-workpad": { - "dynamic": "false", - "properties": { - "@created": { - "type": "date" - }, - "@timestamp": { - "type": "date" - }, - "id": { - "type": "text", - "index": false - }, - "name": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword" - } - } - } - } - }, - "config": { - "dynamic": "true", - "properties": { - "accessibility:disableAnimations": { - "type": "boolean" - }, - "buildNum": { - "type": "keyword" - }, - "dateFormat:tz": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword", - "ignore_above": 256 - } - } - }, - "defaultIndex": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword", - "ignore_above": 256 - } - } - }, - "telemetry:optIn": { - "type": "boolean" - } - } - }, - "dashboard": { - "properties": { - "description": { - "type": "text" - }, - "hits": { - "type": "integer" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "optionsJSON": { - "type": "text" - }, - "panelsJSON": { - "type": "text" - }, - "refreshInterval": { - "properties": { - "display": { - "type": "keyword" - }, - "pause": { - "type": "boolean" - }, - "section": { - "type": "integer" - }, - "value": { - "type": "integer" - } - } - }, - "timeFrom": { - "type": "keyword" - }, - "timeRestore": { - "type": "boolean" - }, - "timeTo": { - "type": "keyword" - }, - "title": { - "type": "text" - }, - "uiStateJSON": { - "type": "text" - }, - "version": { - "type": "integer" - } - } - }, - "map": { - "properties": { - "bounds": { - "type": "geo_shape", - "tree": "quadtree" - }, - "description": { - "type": "text" - }, - "layerListJSON": { - "type": "text" - }, - "mapStateJSON": { - "type": "text" - }, - "title": { - "type": "text" - }, - "uiStateJSON": { - "type": "text" - }, - "version": { - "type": "integer" - } - } - }, - "graph-workspace": { - "properties": { - "description": { - "type": "text" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "numLinks": { - "type": "integer" - }, - "numVertices": { - "type": "integer" - }, - "title": { - "type": "text" - }, - "version": { - "type": "integer" - }, - "wsState": { - "type": "text" - } - } - }, - "index-pattern": { - "properties": { - "fieldFormatMap": { - "type": "text" - }, - "fields": { - "type": "text" - }, - "intervalName": { - "type": "keyword" - }, - "notExpandable": { - "type": "boolean" - }, - "sourceFilters": { - "type": "text" - }, - "timeFieldName": { - "type": "keyword" - }, - "title": { - "type": "text" - }, - "type": { - "type": "keyword" - }, - "typeMeta": { - "type": "keyword" - } - } - }, - "kql-telemetry": { - "properties": { - "optInCount": { - "type": "long" - }, - "optOutCount": { - "type": "long" - } - } - }, - "migrationVersion": { - "dynamic": "true", - "properties": { - "index-pattern": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword", - "ignore_above": 256 - } - } - }, - "space": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword", - "ignore_above": 256 - } - } - } - } - }, - "namespace": { - "type": "keyword" - }, - "search": { - "properties": { - "columns": { - "type": "keyword" - }, - "description": { - "type": "text" - }, - "hits": { - "type": "integer" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "sort": { - "type": "keyword" - }, - "title": { - "type": "text" - }, - "version": { - "type": "integer" - } - } - }, - "server": { - "properties": { - "uuid": { - "type": "keyword" - } - } - }, - "space": { - "properties": { - "_reserved": { - "type": "boolean" - }, - "color": { - "type": "keyword" - }, - "description": { - "type": "text" - }, - "disabledFeatures": { - "type": "keyword" - }, - "initials": { - "type": "keyword" - }, - "name": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword", - "ignore_above": 2048 - } - } - } - } - }, - "spaceId": { - "type": "keyword" - }, - "telemetry": { - "properties": { - "enabled": { - "type": "boolean" - } - } - }, - "timelion-sheet": { - "properties": { - "description": { - "type": "text" - }, - "hits": { - "type": "integer" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "timelion_chart_height": { - "type": "integer" - }, - "timelion_columns": { - "type": "integer" - }, - "timelion_interval": { - "type": "keyword" - }, - "timelion_other_interval": { - "type": "keyword" - }, - "timelion_rows": { - "type": "integer" - }, - "timelion_sheet": { - "type": "text" - }, - "title": { - "type": "text" - }, - "version": { - "type": "integer" - } - } - }, - "type": { - "type": "keyword" - }, - "updated_at": { - "type": "date" - }, - "url": { - "properties": { - "accessCount": { - "type": "long" - }, - "accessDate": { - "type": "date" - }, - "createDate": { - "type": "date" - }, - "url": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword", - "ignore_above": 2048 - } - } - } - } - }, - "visualization": { - "properties": { - "description": { - "type": "text" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "savedSearchId": { - "type": "keyword" - }, - "title": { - "type": "text" - }, - "uiStateJSON": { - "type": "text" - }, - "version": { - "type": "integer" - }, - "visState": { - "type": "text" - } - } - }, - "references": { - "properties": { - "id": { - "type": "keyword" - }, - "name": { - "type": "keyword" - }, - "type": { - "type": "keyword" - } - }, - "type": "nested" - }, - "test-hidden-non-importable-exportable": { - "properties": { - "title": { - "type": "text" - } - } - }, - "test-hidden-importable-exportable": { - "properties": { - "title": { - "type": "text" - } - } - } - } - } - } -} 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 00000000000000..07acf3c93ff715 --- /dev/null +++ b/test/functional/fixtures/kbn_archiver/dashboard/current/kibana.json @@ -0,0 +1,2699 @@ +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{}" + }, + "title": "Rendering Test: tsvb-table", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Rendering Test: tsvb-table\",\"type\":\"metrics\",\"params\":{\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\",\"type\":\"table\",\"series\":[{\"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\"},{\"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},\"aggs\":[]}" + }, + "coreMigrationVersion": "7.14.0", + "id": "02a2e4e0-3dcd-11e8-8660-4d65aa086b3c", + "migrationVersion": { + "visualization": "7.13.0" + }, + "references": [], + "type": "visualization", + "updated_at": "2018-04-17T15:06:30.351Z", + "version": "WzIzNiwyXQ==" +} + +{ + "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\",\"params\":{\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\",\"type\":\"timeseries\",\"series\":[{\"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},\"aggs\":[]}" + }, + "coreMigrationVersion": "7.14.0", + "id": "039e4770-4194-11e8-bb13-d53698fb349a", + "migrationVersion": { + "visualization": "7.13.0" + }, + "references": [], + "type": "visualization", + "updated_at": "2018-04-17T15:06:35.220Z", + "version": "WzI1MSwyXQ==" +} + +{ + "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": "7.14.0", + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "migrationVersion": { + "index-pattern": "7.11.0" + }, + "references": [], + "type": "index-pattern", + "updated_at": "2018-04-16T16:57:12.263Z", + "version": "WzIyMCwyXQ==" +} + +{ + "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": "7.14.0", + "id": "03d2afd0-4192-11e8-bb13-d53698fb349a", + "migrationVersion": { + "visualization": "7.13.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": "WzI1NSwyXQ==" +} + +{ + "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": "7.14.0", + "id": "a0f483a0-3dc9-11e8-8660-4d65aa086b3c", + "migrationVersion": { + "index-pattern": "7.11.0" + }, + "references": [], + "type": "index-pattern", + "updated_at": "2018-05-09T20:55:44.314Z", + "version": "WzI3MywyXQ==" +} + +{ + "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}},\"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": "7.14.0", + "id": "0644f890-53cb-11e8-b481-c9426d020fcd", + "migrationVersion": { + "visualization": "7.13.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": "WzI3MSwyXQ==" +} + +{ + "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": "7.14.0", + "id": "0ca8c600-4195-11e8-bb13-d53698fb349a", + "migrationVersion": { + "visualization": "7.13.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": "WzI1MCwyXQ==" +} + +{ + "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": "7.14.0", + "id": "11ae2bd0-3dcc-11e8-8660-4d65aa086b3c", + "migrationVersion": { + "visualization": "7.13.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": "WzIyNiwyXQ==" +} + +{ + "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": "7.14.0", + "id": "145ced90-3dcb-11e8-8660-4d65aa086b3c", + "migrationVersion": { + "visualization": "7.13.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": "WzIyNywyXQ==" +} + +{ + "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": "7.14.0", + "id": "14616b50-3dd4-11e8-b2b9-5d5dc1715159", + "migrationVersion": { + "dashboard": "7.11.0" + }, + "references": [], + "type": "dashboard", + "updated_at": "2018-04-11T22:02:51.909Z", + "version": "WzE1MywyXQ==" +} + +{ + "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": "7.14.0", + "id": "19523860-3dd4-11e8-b2b9-5d5dc1715159", + "migrationVersion": { + "dashboard": "7.11.0" + }, + "references": [], + "type": "dashboard", + "updated_at": "2018-04-11T22:03:00.198Z", + "version": "WzE1MiwyXQ==" +} + +{ + "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": "7.14.0", + "id": "edb65990-53ca-11e8-b481-c9426d020fcd", + "migrationVersion": { + "visualization": "7.13.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": "WzI3MCwyXQ==" +} + +{ + "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": "7.14.0", + "id": "1b2f47b0-53cb-11e8-b481-c9426d020fcd", + "migrationVersion": { + "dashboard": "7.11.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", + "version": "WzI3MiwyXQ==" +} + +{ + "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": "7.14.0", + "id": "1dcdfe30-4192-11e8-bb13-d53698fb349a", + "migrationVersion": { + "visualization": "7.13.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": "WzI2MiwyXQ==" +} + +{ + "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}},\"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": "7.14.0", + "id": "29bd0240-4197-11e8-bb13-d53698fb349a", + "migrationVersion": { + "visualization": "7.13.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": "WzIxOSwyXQ==" +} + +{ + "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": "7.14.0", + "id": "e2023110-3dcb-11e8-8660-4d65aa086b3c", + "migrationVersion": { + "visualization": "7.13.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": "WzIyOCwyXQ==" +} + +{ + "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": "7.14.0", + "id": "2ae34a60-3dd4-11e8-b2b9-5d5dc1715159", + "migrationVersion": { + "dashboard": "7.11.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", + "version": "WzE0OCwyXQ==" +} + +{ + "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": "7.14.0", + "id": "2d1b1620-3dcd-11e8-8660-4d65aa086b3c", + "migrationVersion": { + "visualization": "7.13.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": "WzIzMiwyXQ==" +} + +{ + "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": "7.14.0", + "id": "4b5d6ef0-3dcb-11e8-8660-4d65aa086b3c", + "migrationVersion": { + "visualization": "7.13.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": "WzI0MywyXQ==" +} + +{ + "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": "7.14.0", + "id": "33bb8ad0-3dd4-11e8-b2b9-5d5dc1715159", + "migrationVersion": { + "dashboard": "7.11.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", + "version": "WzE1NCwyXQ==" +} + +{ + "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": "7.14.0", + "id": "3525b840-3dcb-11e8-8660-4d65aa086b3c", + "migrationVersion": { + "visualization": "7.13.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": "WzI0NCwyXQ==" +} + +{ + "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\",\"params\":{\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\",\"type\":\"metric\",\"series\":[{\"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\"}],\"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},\"aggs\":[]}" + }, + "coreMigrationVersion": "7.14.0", + "id": "35417e50-4194-11e8-bb13-d53698fb349a", + "migrationVersion": { + "visualization": "7.13.0" + }, + "references": [], + "type": "visualization", + "updated_at": "2018-04-17T16:06:03.785Z", + "version": "WzI2MywyXQ==" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[{\"meta\":{\"negate\":true,\"disabled\":false,\"alias\":null,\"type\":\"range\",\"key\":\"bytes\",\"value\":\"0 to 10,000\",\"params\":{\"gte\":0,\"lt\":10000},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"range\":{\"bytes\":{\"gte\":0,\"lt\":10000}},\"$state\":{\"store\":\"appState\"}}],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Rendering Test: geo map", + "uiStateJSON": "{\"mapZoom\":4,\"mapCenter\":[35.460669951495305,-85.60546875000001]}", + "version": 1, + "visState": "{\"title\":\"Rendering Test: geo map\",\"type\":\"tile_map\",\"params\":{\"mapType\":\"Scaled Circle Markers\",\"isDesaturated\":true,\"addTooltip\":true,\"heatClusterSize\":1.5,\"legendPosition\":\"bottomright\",\"mapZoom\":2,\"mapCenter\":[0,0],\"wms\":{\"enabled\":false,\"options\":{\"format\":\"image/png\",\"transparent\":true},\"baseLayersAreLoaded\":{},\"tmsLayers\":[{\"id\":\"road_map\",\"url\":\"https://tiles-stage.elastic.co/v2/default/{z}/{x}/{y}.png?elastic_tile_service_tos=agree&my_app_name=kibana&my_app_version=6.3.0\",\"minZoom\":0,\"maxZoom\":10,\"attribution\":\"

© OpenStreetMap contributors | Elastic Maps Service

\",\"subdomains\":[]}],\"selectedTmsLayer\":{\"id\":\"road_map\",\"url\":\"https://tiles-stage.elastic.co/v2/default/{z}/{x}/{y}.png?elastic_tile_service_tos=agree&my_app_name=kibana&my_app_version=6.3.0\",\"minZoom\":0,\"maxZoom\":10,\"attribution\":\"

© OpenStreetMap contributors | Elastic Maps Service

\",\"subdomains\":[]}}},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"geohash_grid\",\"schema\":\"segment\",\"params\":{\"field\":\"geo.coordinates\",\"autoPrecision\":true,\"isFilteredByCollar\":true,\"useGeocentroid\":true,\"precision\":3}}]}" + }, + "coreMigrationVersion": "7.14.0", + "id": "37a541c0-3dcc-11e8-8660-4d65aa086b3c", + "migrationVersion": { + "visualization": "7.13.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.156Z", + "version": "WzI0MiwyXQ==" +} + +{ + "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": "7.14.0", + "id": "3de0bda0-3dd4-11e8-b2b9-5d5dc1715159", + "migrationVersion": { + "dashboard": "7.11.0" + }, + "references": [], + "type": "dashboard", + "updated_at": "2018-04-11T22:04:01.530Z", + "version": "WzE2MSwyXQ==" +} + +{ + "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}},\"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": "7.14.0", + "id": "3fe22200-3dcb-11e8-8660-4d65aa086b3c", + "migrationVersion": { + "visualization": "7.13.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": "WzIyNCwyXQ==" +} + +{ + "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": "7.14.0", + "id": "42535e30-3dcd-11e8-8660-4d65aa086b3c", + "migrationVersion": { + "visualization": "7.13.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": "WzIzNCwyXQ==" +} + +{ + "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": "7.14.0", + "id": "46c8b580-3dd4-11e8-b2b9-5d5dc1715159", + "migrationVersion": { + "dashboard": "7.11.0" + }, + "references": [], + "type": "dashboard", + "updated_at": "2018-04-11T22:04:16.472Z", + "version": "WzE2MiwyXQ==" +} + +{ + "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}},\"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": "7.14.0", + "id": "4c0c3f90-3e5a-11e8-9fc3-39e49624228e", + "migrationVersion": { + "visualization": "7.13.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": "WzI0NiwyXQ==" +} + +{ + "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": "7.14.0", + "id": "4c0f47e0-3dcd-11e8-8660-4d65aa086b3c", + "migrationVersion": { + "visualization": "7.13.0" + }, + "references": [], + "type": "visualization", + "updated_at": "2018-04-17T15:06:31.111Z", + "version": "WzIzMSwyXQ==" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Rendering Test: region map", + "uiStateJSON": "{\"mapZoom\":2,\"mapCenter\":[8.754794702435618,-9.140625000000002]}", + "version": 1, + "visState": "{\"title\":\"Rendering Test: region map\",\"type\":\"region_map\",\"params\":{\"legendPosition\":\"bottomright\",\"addTooltip\":true,\"colorSchema\":\"Yellow to Red\",\"selectedLayer\":{\"attribution\":\"

Made with NaturalEarth | Elastic Maps Service

\",\"name\":\"World Countries\",\"weight\":1,\"format\":{\"type\":\"geojson\"},\"url\":\"https://staging-dot-elastic-layer.appspot.com/blob/5715999101812736?elastic_tile_service_tos=agree&my_app_version=6.3.0\",\"fields\":[{\"name\":\"iso2\",\"description\":\"Two letter abbreviation\"},{\"name\":\"iso3\",\"description\":\"Three letter abbreviation\"},{\"name\":\"name\",\"description\":\"Country name\"}],\"created_at\":\"2017-07-31T16:00:19.996450\",\"tags\":[],\"id\":5715999101812736,\"layerId\":\"elastic_maps_service.World Countries\"},\"selectedJoinField\":{\"name\":\"iso2\",\"description\":\"Two letter abbreviation\"},\"isDisplayWarning\":true,\"wms\":{\"enabled\":false,\"options\":{\"format\":\"image/png\",\"transparent\":true},\"baseLayersAreLoaded\":{},\"tmsLayers\":[{\"id\":\"road_map\",\"url\":\"https://tiles-stage.elastic.co/v2/default/{z}/{x}/{y}.png?elastic_tile_service_tos=agree&my_app_name=kibana&my_app_version=6.3.0\",\"minZoom\":0,\"maxZoom\":10,\"attribution\":\"

© OpenStreetMap contributors | Elastic Maps Service

\",\"subdomains\":[]}],\"selectedTmsLayer\":{\"id\":\"road_map\",\"url\":\"https://tiles-stage.elastic.co/v2/default/{z}/{x}/{y}.png?elastic_tile_service_tos=agree&my_app_name=kibana&my_app_version=6.3.0\",\"minZoom\":0,\"maxZoom\":10,\"attribution\":\"

© OpenStreetMap contributors | Elastic Maps Service

\",\"subdomains\":[]}},\"mapZoom\":2,\"mapCenter\":[0,0],\"outlineWeight\":1,\"showAllShapes\":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": "7.14.0", + "id": "4ca00ba0-3dcc-11e8-8660-4d65aa086b3c", + "migrationVersion": { + "visualization": "7.13.0" + }, + "references": [ + { + "id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2018-04-17T15:06:32.131Z", + "version": "WzIyNSwyXQ==" +} + +{ + "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": "7.14.0", + "id": "4f0fd980-3dd4-11e8-b2b9-5d5dc1715159", + "migrationVersion": { + "dashboard": "7.11.0" + }, + "references": [], + "type": "dashboard", + "updated_at": "2018-04-11T22:04:30.360Z", + "version": "WzE2MCwyXQ==" +} + +{ + "attributes": { + "title": "logstash-*" + }, + "coreMigrationVersion": "7.14.0", + "id": "to-be-removed", + "migrationVersion": { + "index-pattern": "7.11.0" + }, + "references": [], + "type": "index-pattern", + "updated_at": "2018-04-12T16:24:29.357Z", + "version": "WzE0NCwyXQ==" +} + +{ + "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}},\"title\":\"vis with missing index pattern\"}" + }, + "coreMigrationVersion": "7.14.0", + "id": "to-be-removed", + "migrationVersion": { + "visualization": "7.13.0" + }, + "references": [ + { + "id": "to-be-removed", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2020-05-25T15:16:27.743Z", + "version": "WzI3NSwyXQ==" +} + +{ + "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": "7.14.0", + "id": "502e63a0-9e93-11ea-853e-adc0effaf76d", + "migrationVersion": { + "dashboard": "7.11.0" + }, + "references": [ + { + "id": "to-be-removed", + "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": "WzI3NiwyXQ==" +} + +{ + "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}},\"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": "7.14.0", + "id": "50643b60-3dd3-11e8-b2b9-5d5dc1715159", + "migrationVersion": { + "visualization": "7.13.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": "WzI0NywyXQ==" +} + +{ + "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": "7.14.0", + "id": "55d37a30-4197-11e8-bb13-d53698fb349a", + "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" + } + ], + "type": "search", + "updated_at": "2018-04-16T16:58:07.059Z", + "version": "WzIyMSwyXQ==" +} + +{ + "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}},\"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": "7.14.0", + "id": "584c0300-4191-11e8-bb13-d53698fb349a", + "migrationVersion": { + "visualization": "7.13.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": "WzI2NiwyXQ==" +} + +{ + "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": "7.14.0", + "id": "a16d1990-3dca-11e8-8660-4d65aa086b3c", + "migrationVersion": { + "search": "7.9.3" + }, + "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": "WzE0NSwyXQ==" +} + +{ + "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}},\"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": "7.14.0", + "id": "771b4f10-3e59-11e8-9fc3-39e49624228e", + "migrationVersion": { + "visualization": "7.13.0" + }, + "references": [ + { + "id": "a16d1990-3dca-11e8-8660-4d65aa086b3c", + "name": "search_0", + "type": "search" + } + ], + "type": "visualization", + "updated_at": "2018-04-17T15:06:34.200Z", + "version": "WzI0OCwyXQ==" +} + +{ + "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": "7.14.0", + "id": "5bac3a80-3e5b-11e8-9fc3-39e49624228e", + "migrationVersion": { + "dashboard": "7.11.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", + "version": "WzE2OCwyXQ==" +} + +{ + "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": "7.14.0", + "id": "f908c8e0-3e6d-11e8-bbb9-e15942d5d48c", + "migrationVersion": { + "index-pattern": "7.11.0" + }, + "references": [], + "type": "index-pattern", + "updated_at": "2018-04-12T16:24:29.357Z", + "version": "WzE2OSwyXQ==" +} + +{ + "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": "7.14.0", + "id": "5e085850-3e6e-11e8-bbb9-e15942d5d48c", + "migrationVersion": { + "visualization": "7.13.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": "WzIxNiwyXQ==" +} + +{ + "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": "7.14.0", + "id": "60659030-3dd4-11e8-b2b9-5d5dc1715159", + "migrationVersion": { + "dashboard": "7.11.0" + }, + "references": [], + "type": "dashboard", + "updated_at": "2018-04-11T22:04:59.443Z", + "version": "WzE1NSwyXQ==" +} + +{ + "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": "7.14.0", + "id": "61c58ad0-3dd3-11e8-b2b9-5d5dc1715159", + "migrationVersion": { + "dashboard": "7.11.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", + "version": "WzE0NywyXQ==" +} + +{ + "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": "7.14.0", + "id": "6351c590-53cb-11e8-b481-c9426d020fcd", + "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" + } + ], + "type": "search", + "updated_at": "2018-05-09T20:56:04.457Z", + "version": "WzI3NCwyXQ==" +} + +{ + "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\":\"Filter Bytes Test:>5000\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Filter Bytes Test: geo map with filter and query bytes > 5000 in US geo.src, heatmap setting", + "uiStateJSON": "{\"mapZoom\":7,\"mapCenter\":[42.98857645832184,-75.49804687500001]}", + "version": 1, + "visState": "{\"title\":\"Filter Bytes Test: geo map with filter and query bytes > 5000 in US geo.src, heatmap setting\",\"type\":\"tile_map\",\"params\":{\"mapType\":\"Heatmap\",\"isDesaturated\":true,\"addTooltip\":true,\"heatClusterSize\":1.5,\"legendPosition\":\"bottomright\",\"mapZoom\":2,\"mapCenter\":[0,0],\"wms\":{\"enabled\":false,\"options\":{\"format\":\"image/png\",\"transparent\":true},\"baseLayersAreLoaded\":{},\"tmsLayers\":[{\"id\":\"road_map\",\"url\":\"https://tiles-stage.elastic.co/v2/default/{z}/{x}/{y}.png?elastic_tile_service_tos=agree&my_app_name=kibana&my_app_version=6.3.0\",\"minZoom\":0,\"maxZoom\":10,\"attribution\":\"

© OpenStreetMap contributors | Elastic Maps Service

\",\"subdomains\":[]}],\"selectedTmsLayer\":{\"id\":\"road_map\",\"url\":\"https://tiles-stage.elastic.co/v2/default/{z}/{x}/{y}.png?elastic_tile_service_tos=agree&my_app_name=kibana&my_app_version=6.3.0\",\"minZoom\":0,\"maxZoom\":10,\"attribution\":\"

© OpenStreetMap contributors | Elastic Maps Service

\",\"subdomains\":[]}}},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"geohash_grid\",\"schema\":\"segment\",\"params\":{\"field\":\"geo.coordinates\",\"autoPrecision\":true,\"isFilteredByCollar\":true,\"useGeocentroid\":true,\"precision\":4}}]}" + }, + "coreMigrationVersion": "7.14.0", + "id": "63983430-4192-11e8-bb13-d53698fb349a", + "migrationVersion": { + "visualization": "7.13.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.275Z", + "version": "WzI1OCwyXQ==" +} + +{ + "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": "7.14.0", + "id": "65227c00-3dd4-11e8-b2b9-5d5dc1715159", + "migrationVersion": { + "dashboard": "7.11.0" + }, + "references": [], + "type": "dashboard", + "updated_at": "2018-04-11T22:05:07.392Z", + "version": "WzE1NiwyXQ==" +} + +{ + "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": "7.14.0", + "id": "6803a2f0-3dd4-11e8-b2b9-5d5dc1715159", + "migrationVersion": { + "dashboard": "7.11.0" + }, + "references": [], + "type": "dashboard", + "updated_at": "2018-04-11T22:05:12.223Z", + "version": "WzE1NywyXQ==" +} + +{ + "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": "7.14.0", + "id": "6b18f940-3dd4-11e8-b2b9-5d5dc1715159", + "migrationVersion": { + "dashboard": "7.11.0" + }, + "references": [], + "type": "dashboard", + "updated_at": "2018-04-11T22:05:17.396Z", + "version": "WzE1OCwyXQ==" +} + +{ + "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": "7.14.0", + "id": "6c0b16e0-3dd3-11e8-b2b9-5d5dc1715159", + "migrationVersion": { + "dashboard": "7.11.0" + }, + "references": [], + "type": "dashboard", + "updated_at": "2018-04-11T21:58:09.486Z", + "version": "WzE1MSwyXQ==" +} + +{ + "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": "7.14.0", + "id": "6e12ff60-3dd4-11e8-b2b9-5d5dc1715159", + "migrationVersion": { + "dashboard": "7.11.0" + }, + "references": [], + "type": "dashboard", + "updated_at": "2018-04-11T22:05:22.390Z", + "version": "WzE1OSwyXQ==" +} + +{ + "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": "7.14.0", + "id": "6eb8a840-a32e-11ea-88c2-d56dd2b14bd7", + "migrationVersion": { + "dashboard": "7.11.0" + }, + "references": [ + { + "id": "to-be-removed", + "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": "WzI4MCwyXQ==" +} + +{ + "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": "7.14.0", + "id": "708fe640-3dd4-11e8-b2b9-5d5dc1715159", + "migrationVersion": { + "dashboard": "7.11.0" + }, + "references": [], + "type": "dashboard", + "updated_at": "2018-04-11T22:05:26.564Z", + "version": "WzE2MywyXQ==" +} + +{ + "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": "7.14.0", + "id": "760a9060-4190-11e8-bb13-d53698fb349a", + "migrationVersion": { + "visualization": "7.13.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": "WzI1MiwyXQ==" +} + +{ + "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\",\"params\":{\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\",\"type\":\"top_n\",\"series\":[{\"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\"},{\"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},\"aggs\":[]}" + }, + "coreMigrationVersion": "7.14.0", + "id": "76c7f020-4194-11e8-bb13-d53698fb349a", + "migrationVersion": { + "visualization": "7.13.0" + }, + "references": [], + "type": "visualization", + "updated_at": "2018-04-17T15:06:34.583Z", + "version": "WzI0OSwyXQ==" +} + +{ + "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": "7.14.0", + "id": "76d03330-3dd3-11e8-b2b9-5d5dc1715159", + "migrationVersion": { + "dashboard": "7.11.0" + }, + "references": [], + "type": "dashboard", + "updated_at": "2018-04-11T21:58:27.555Z", + "version": "WzE0OSwyXQ==" +} + +{ + "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": "7.14.0", + "id": "78803be0-3dcd-11e8-8660-4d65aa086b3c", + "migrationVersion": { + "visualization": "7.13.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": "WzIyMywyXQ==" +} + +{ + "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": "7.14.0", + "id": "7b8d50a0-3dd4-11e8-b2b9-5d5dc1715159", + "migrationVersion": { + "dashboard": "7.11.0" + }, + "references": [], + "type": "dashboard", + "updated_at": "2018-04-11T22:05:45.002Z", + "version": "WzE2NCwyXQ==" +} + +{ + "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": "7.14.0", + "id": "7e42d3b0-3dd4-11e8-b2b9-5d5dc1715159", + "migrationVersion": { + "dashboard": "7.11.0" + }, + "references": [], + "type": "dashboard", + "updated_at": "2018-04-11T22:05:49.547Z", + "version": "WzE2NSwyXQ==" +} + +{ + "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": "7.14.0", + "id": "7fda8ee0-3dcd-11e8-8660-4d65aa086b3c", + "migrationVersion": { + "visualization": "7.13.0" + }, + "references": [], + "type": "visualization", + "updated_at": "2018-04-17T15:06:30.344Z", + "version": "WzIzNSwyXQ==" +} + +{ + "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": "7.14.0", + "id": "7ff2c4c0-4191-11e8-bb13-d53698fb349a", + "migrationVersion": { + "visualization": "7.13.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": "WzI1NiwyXQ==" +} + +{ + "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": "7.14.0", + "id": "8090dcb0-4195-11e8-bb13-d53698fb349a", + "migrationVersion": { + "visualization": "7.13.0" + }, + "references": [], + "type": "visualization", + "updated_at": "2018-04-17T19:28:21.967Z", + "version": "WzI2OCwyXQ==" +} + +{ + "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": "7.14.0", + "id": "846988b0-3dd4-11e8-b2b9-5d5dc1715159", + "migrationVersion": { + "dashboard": "7.11.0" + }, + "references": [], + "type": "dashboard", + "updated_at": "2018-04-11T22:05:59.867Z", + "version": "WzE2NiwyXQ==" +} + +{ + "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": "7.14.0", + "id": "8bc8d6c0-3e6e-11e8-bbb9-e15942d5d48c", + "migrationVersion": { + "visualization": "7.13.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": "WzIzMywyXQ==" +} + +{ + "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": "7.14.0", + "id": "9b780cd0-3dd3-11e8-b2b9-5d5dc1715159", + "migrationVersion": { + "dashboard": "7.11.0" + }, + "references": [], + "type": "dashboard", + "updated_at": "2018-04-11T22:00:07.322Z", + "version": "WzE1MCwyXQ==" +} + +{ + "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": "7.14.0", + "id": "9bebe980-4192-11e8-bb13-d53698fb349a", + "migrationVersion": { + "visualization": "7.13.0" + }, + "references": [], + "type": "visualization", + "updated_at": "2018-04-17T15:59:42.648Z", + "version": "WzI2MSwyXQ==" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{}" + }, + "title": "Filter Bytes Test: tsvb markdown", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Filter Bytes Test: tsvb markdown\",\"type\":\"metrics\",\"params\":{\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\",\"type\":\"markdown\",\"series\":[{\"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\"}],\"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},\"aggs\":[]}" + }, + "coreMigrationVersion": "7.14.0", + "id": "9fb4c670-4194-11e8-bb13-d53698fb349a", + "migrationVersion": { + "visualization": "7.13.0" + }, + "references": [], + "type": "visualization", + "updated_at": "2018-04-17T16:32:59.086Z", + "version": "WzI2NCwyXQ==" +} + +{ + "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": "7.14.0", + "id": "a5d56330-3e6e-11e8-bbb9-e15942d5d48c", + "migrationVersion": { + "dashboard": "7.11.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", + "version": "WzIxNywyXQ==" +} + +{ + "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": "7.14.0", + "id": "b3e70d00-4190-11e8-bb13-d53698fb349a", + "migrationVersion": { + "visualization": "7.13.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": "WzI1MywyXQ==" +} + +{ + "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": "7.14.0", + "id": "c10c6b00-4191-11e8-bb13-d53698fb349a", + "migrationVersion": { + "visualization": "7.13.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": "WzI1NCwyXQ==" +} + +{ + "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": "7.14.0", + "id": "df72ad40-4194-11e8-bb13-d53698fb349a", + "migrationVersion": { + "visualization": "7.13.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": "WzI1NywyXQ==" +} + +{ + "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": "7.14.0", + "id": "b60de070-4197-11e8-bb13-d53698fb349a", + "migrationVersion": { + "dashboard": "7.11.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", + "version": "WzIyMiwyXQ==" +} + +{ + "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": "7.14.0", + "id": "b92ae920-3dcc-11e8-8660-4d65aa086b3c", + "migrationVersion": { + "visualization": "7.13.0" + }, + "references": [], + "type": "visualization", + "updated_at": "2018-04-17T15:06:31.110Z", + "version": "WzIyOSwyXQ==" +} + +{ + "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": "7.14.0", + "id": "be5accf0-3dca-11e8-8660-4d65aa086b3c", + "migrationVersion": { + "search": "7.9.3" + }, + "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": "WzI1OSwyXQ==" +} + +{ + "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\"},\"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": "7.14.0", + "id": "befdb6b0-3e59-11e8-9fc3-39e49624228e", + "migrationVersion": { + "visualization": "7.13.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": "WzI2NSwyXQ==" +} + +{ + "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},\"aggs\":[]}" + }, + "coreMigrationVersion": "7.14.0", + "id": "c40f4d40-3dcc-11e8-8660-4d65aa086b3c", + "migrationVersion": { + "visualization": "7.13.0" + }, + "references": [], + "type": "visualization", + "updated_at": "2018-04-17T15:06:30.347Z", + "version": "WzI0MCwyXQ==" +} + +{ + "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": "7.14.0", + "id": "ca5ada40-3dca-11e8-8660-4d65aa086b3c", + "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" + } + ], + "type": "search", + "updated_at": "2018-04-17T15:09:55.976Z", + "version": "WzI2MCwyXQ==" +} + +{ + "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": "7.14.0", + "id": "cbd3bc30-3e5a-11e8-9fc3-39e49624228e", + "migrationVersion": { + "dashboard": "7.11.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", + "version": "WzE2NywyXQ==" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{}" + }, + "title": "Rendering Test: tsvb-metric", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Rendering Test: tsvb-metric\",\"type\":\"metrics\",\"params\":{\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\",\"type\":\"metric\",\"series\":[{\"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},\"aggs\":[]}" + }, + "coreMigrationVersion": "7.14.0", + "id": "cc43fab0-3dcc-11e8-8660-4d65aa086b3c", + "migrationVersion": { + "visualization": "7.13.0" + }, + "references": [], + "type": "visualization", + "updated_at": "2018-04-17T15:06:30.353Z", + "version": "WzIzOSwyXQ==" +} + +{ + "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": "7.14.0", + "id": "e6140540-3dca-11e8-8660-4d65aa086b3c", + "migrationVersion": { + "visualization": "7.13.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": "WzI0NSwyXQ==" +} + +{ + "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": "7.14.0", + "id": "ffa2e0c0-3dcb-11e8-8660-4d65aa086b3c", + "migrationVersion": { + "visualization": "7.13.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": "WzI0MSwyXQ==" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{}" + }, + "title": "Rendering Test: tsvb-guage", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Rendering Test: tsvb-guage\",\"type\":\"metrics\",\"params\":{\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\",\"type\":\"gauge\",\"series\":[{\"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\"},{\"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},\"aggs\":[]}" + }, + "coreMigrationVersion": "7.14.0", + "id": "e4d8b430-3dcc-11e8-8660-4d65aa086b3c", + "migrationVersion": { + "visualization": "7.13.0" + }, + "references": [], + "type": "visualization", + "updated_at": "2018-04-17T15:06:31.106Z", + "version": "WzIzMCwyXQ==" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{}" + }, + "title": "Rendering Test: tsvb-markdown", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Rendering Test: tsvb-markdown\",\"type\":\"metrics\",\"params\":{\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\",\"type\":\"markdown\",\"series\":[{\"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\"},{\"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},\"aggs\":[]}" + }, + "coreMigrationVersion": "7.14.0", + "id": "f81134a0-3dcc-11e8-8660-4d65aa086b3c", + "migrationVersion": { + "visualization": "7.13.0" + }, + "references": [], + "type": "visualization", + "updated_at": "2018-04-17T15:06:30.355Z", + "version": "WzIzNywyXQ==" +} + +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{}" + }, + "title": "Rendering Test: tsvb-topn", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Rendering Test: tsvb-topn\",\"type\":\"metrics\",\"params\":{\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\",\"type\":\"top_n\",\"series\":[{\"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\"},{\"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},\"aggs\":[]}" + }, + "coreMigrationVersion": "7.14.0", + "id": "df815d20-3dcc-11e8-8660-4d65aa086b3c", + "migrationVersion": { + "visualization": "7.13.0" + }, + "references": [], + "type": "visualization", + "updated_at": "2018-04-17T15:06:30.349Z", + "version": "WzIzOCwyXQ==" +} + +{ + "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\":24,\"y\":15,\"w\":24,\"h\":15,\"i\":\"4\"},\"panelIndex\":\"4\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_4\"},{\"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\":24,\"y\":90,\"w\":24,\"h\":15,\"i\":\"14\"},\"panelIndex\":\"14\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_14\"},{\"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": "7.14.0", + "id": "d2525040-3dcd-11e8-8660-4d65aa086b3c", + "migrationVersion": { + "dashboard": "7.11.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": "37a541c0-3dcc-11e8-8660-4d65aa086b3c", + "name": "4:panel_4", + "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": "4ca00ba0-3dcc-11e8-8660-4d65aa086b3c", + "name": "14:panel_14", + "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": "WzIxOCwyXQ==" +} \ No newline at end of file diff --git a/test/functional/fixtures/kbn_archiver/saved_objects_management/export_transform.json b/test/functional/fixtures/kbn_archiver/saved_objects_management/export_transform.json new file mode 100644 index 00000000000000..4ae4d8649a0bd2 --- /dev/null +++ b/test/functional/fixtures/kbn_archiver/saved_objects_management/export_transform.json @@ -0,0 +1,91 @@ +{ + "id": "type_1-obj_1", + "attributes": { + "title": "test_1-obj_1", + "enabled": true + }, + "references": [], + "type": "test-export-transform", + "updated_at": "2018-12-21T00:43:07.096Z" +} + +{ + "id": "type_1-obj_2", + "attributes": { + "title": "test_1-obj_2", + "enabled": true + }, + "references": [], + "type": "test-export-transform", + "updated_at": "2018-12-21T00:43:07.096Z" +} + +{ + "id": "type_2-obj_1", + "attributes": { + "title": "test_2-obj_1" + }, + "references": [], + "type": "test-export-add", + "updated_at": "2018-12-21T00:43:07.096Z" +} + +{ + "id": "type_2-obj_2", + "attributes": { + "title": "test_2-obj_2" + }, + "references": [], + "type": "test-export-add", + "updated_at": "2018-12-21T00:43:07.096Z" +} + +{ + "id": "type_dep-obj_1", + "attributes": { + "title": "type_dep-obj_1" + }, + "references": [ + { + "id": "type_2-obj_1", + "type": "test-export-add" + } + ], + "type": "test-export-add-dep", + "updated_at": "2018-12-21T00:43:07.096Z" +} + +{ + "id": "type_dep-obj_2", + "attributes": { + "title": "type_dep-obj_2" + }, + "references": [ + { + "id": "type_2-obj_2", + "type": "test-export-add" + } + ], + "type": "test-export-add-dep", + "updated_at": "2018-12-21T00:43:07.096Z" +} + +{ + "id": "type_3-obj_1", + "attributes": { + "title": "test_2-obj_1" + }, + "references": [], + "type": "test-export-invalid-transform", + "updated_at": "2018-12-21T00:43:07.096Z" +} + +{ + "id": "type_4-obj_1", + "attributes": { + "title": "test_2-obj_1" + }, + "references": [], + "type": "test-export-transform-error", + "updated_at": "2018-12-21T00:43:07.096Z" +} \ No newline at end of file diff --git a/test/functional/fixtures/es_archiver/saved_objects_management/hidden_types/data.json b/test/functional/fixtures/kbn_archiver/saved_objects_management/hidden_types.json similarity index 50% rename from test/functional/fixtures/es_archiver/saved_objects_management/hidden_types/data.json rename to test/functional/fixtures/kbn_archiver/saved_objects_management/hidden_types.json index ef86f5e74865ec..2ece0ee218eba1 100644 --- a/test/functional/fixtures/es_archiver/saved_objects_management/hidden_types/data.json +++ b/test/functional/fixtures/kbn_archiver/saved_objects_management/hidden_types.json @@ -1,71 +1,65 @@ { - "type": "doc", - "value": { - "index": ".kibana", - "id": "test-actions-export-hidden:obj_1", - "source": { - "test-actions-export-hidden": { + "attributes": { + "timeFieldName": "@timestamp", + "title": "logstash-*" + }, + "coreMigrationVersion": "7.14.0", + "id": "logstash-*", + "migrationVersion": { + "index-pattern": "7.11.0" + }, + "references": [], + "type": "index-pattern", + "updated_at": "2017-09-21T18:49:16.270Z", + "version": "WzgsMl0=" +} + +{ + "id": "obj_1", + "attributes": { "title": "hidden object 1" - }, - "type": "test-actions-export-hidden", - "migrationVersion": {}, - "updated_at": "2018-12-21T00:43:07.096Z" - } - } + }, + "references": [], + "type": "test-actions-export-hidden", + "updated_at": "2018-12-21T00:43:07.096Z" } { - "type": "doc", - "value": { - "index": ".kibana", - "id": "test-actions-export-hidden:obj_2", - "source": { - "test-actions-export-hidden": { + "id": "obj_2", + "attributes": { "title": "hidden object 2" - }, - "type": "test-actions-export-hidden", - "migrationVersion": {}, - "updated_at": "2018-12-21T00:43:07.096Z" - } - } + }, + "references": [], + "type": "test-actions-export-hidden", + "updated_at": "2018-12-21T00:43:07.096Z" } { - "type": "doc", - "value": { - "index": ".kibana", - "id": "visualization:75c3e060-1e7c-11e9-8488-65449e65d0ed", - "source": { - "visualization": { + "id": "75c3e060-1e7c-11e9-8488-65449e65d0ed", + "attributes": { "title": "A Pie", "visState": "{\"title\":\"A Pie\",\"type\":\"pie\",\"params\":{\"type\":\"pie\",\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"isDonut\":true,\"labels\":{\"show\":false,\"values\":true,\"last_level\":true,\"truncate\":100},\"dimensions\":{\"metric\":{\"accessor\":0,\"format\":{\"id\":\"number\"},\"params\":{},\"aggType\":\"count\"}}},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"segment\",\"params\":{\"field\":\"geo.src\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\"}}]}", "uiStateJSON": "{}", "description": "", "version": 1, "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"index\":\"logstash-*\",\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[]}" + "searchSourceJSON": "{\"index\":\"logstash-*\",\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[]}" } - }, - "type": "visualization", - "updated_at": "2019-01-22T19:32:31.206Z" }, - "references" : [ - { - "name" : "kibanaSavedObjectMeta.searchSourceJSON.index", - "type" : "index-pattern", - "id" : "logstash-*" - } - ] - } + "references": [ + { + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern", + "id": "logstash-*" + } + ], + "type": "visualization", + "updated_at": "2019-01-22T19:32:31.206Z" } { - "type": "doc", - "value": { - "index": ".kibana", - "id": "dashboard:i-exist", - "source": { - "dashboard": { + "id": "i-exist", + "attributes": { "title": "A Dashboard", "hits": 0, "description": "", @@ -74,11 +68,10 @@ "version": 1, "timeRestore": false, "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[]}" + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[]}" } - }, - "type": "dashboard", - "updated_at": "2019-01-22T19:32:47.232Z" - } - } -} + }, + "references": [], + "type": "dashboard", + "updated_at": "2019-01-22T19:32:47.232Z" +} \ No newline at end of file diff --git a/test/functional/page_objects/home_page.ts b/test/functional/page_objects/home_page.ts index 05f7fb7eecb3d0..f03f74ef8c61d9 100644 --- a/test/functional/page_objects/home_page.ts +++ b/test/functional/page_objects/home_page.ts @@ -12,9 +12,7 @@ export function HomePageProvider({ getService, getPageObjects }: FtrProviderCont const testSubjects = getService('testSubjects'); const retry = getService('retry'); const find = getService('find'); - const deployment = getService('deployment'); const PageObjects = getPageObjects(['common']); - let isOss = true; class HomePage { async clickSynopsis(title: string) { @@ -72,10 +70,7 @@ export function HomePageProvider({ getService, getPageObjects }: FtrProviderCont async launchSampleDashboard(id: string) { await this.launchSampleDataSet(id); - isOss = await deployment.isOss(); - if (!isOss) { - await find.clickByLinkText('Dashboard'); - } + await find.clickByLinkText('Dashboard'); } async launchSampleDataSet(id: string) { diff --git a/test/plugin_functional/config.ts b/test/plugin_functional/config.ts index 1ff55edc010da1..79c92ac01e1bf1 100644 --- a/test/plugin_functional/config.ts +++ b/test/plugin_functional/config.ts @@ -44,7 +44,10 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { }, apps: functionalConfig.get('apps'), esArchiver: { - directory: path.resolve(__dirname, '../es_archives'), + directory: path.resolve(__dirname, '../functional/fixtures/es_archiver'), + }, + kbnArchiver: { + directory: path.resolve(__dirname, '../functional/fixtures/kbn_archiver'), }, screenshots: functionalConfig.get('screenshots'), junit: { diff --git a/test/plugin_functional/test_suites/core/deprecations.ts b/test/plugin_functional/test_suites/core/deprecations.ts index a78527d0d82e25..393d2f2538d0e1 100644 --- a/test/plugin_functional/test_suites/core/deprecations.ts +++ b/test/plugin_functional/test_suites/core/deprecations.ts @@ -66,8 +66,8 @@ export default function ({ getService, getPageObjects }: PluginFunctionalProvide ]; describe('deprecations service', () => { - before(() => esArchiver.load('../functional/fixtures/es_archiver/deprecations_service')); - after(() => esArchiver.unload('../functional/fixtures/es_archiver/deprecations_service')); + before(() => esArchiver.load('deprecations_service')); + after(() => esArchiver.unload('deprecations_service')); describe('GET /api/deprecations/', async () => { it('returns registered config deprecations and feature deprecations', async () => { diff --git a/test/plugin_functional/test_suites/custom_visualizations/index.js b/test/plugin_functional/test_suites/custom_visualizations/index.js index eaca1ad3f4d3b7..a2def064d3e684 100644 --- a/test/plugin_functional/test_suites/custom_visualizations/index.js +++ b/test/plugin_functional/test_suites/custom_visualizations/index.js @@ -13,8 +13,8 @@ export default function ({ getService, loadTestFile }) { describe('custom visualizations', function () { before(async () => { - await esArchiver.loadIfNeeded('../functional/fixtures/es_archiver/logstash_functional'); - await esArchiver.loadIfNeeded('../functional/fixtures/es_archiver/visualize'); + await esArchiver.loadIfNeeded('logstash_functional'); + await esArchiver.loadIfNeeded('visualize'); await kibanaServer.uiSettings.replace({ 'dateFormat:tz': 'Australia/North', defaultIndex: 'logstash-*', diff --git a/test/plugin_functional/test_suites/data_plugin/index.ts b/test/plugin_functional/test_suites/data_plugin/index.ts index d39eb839d322d8..cc0bee679538af 100644 --- a/test/plugin_functional/test_suites/data_plugin/index.ts +++ b/test/plugin_functional/test_suites/data_plugin/index.ts @@ -18,9 +18,7 @@ export default function ({ describe('data plugin', () => { before(async () => { - await esArchiver.loadIfNeeded( - '../functional/fixtures/es_archiver/getting_started/shakespeare' - ); + await esArchiver.loadIfNeeded('getting_started/shakespeare'); await PageObjects.common.navigateToApp('settings'); await PageObjects.settings.createIndexPattern('shakespeare', ''); }); diff --git a/test/plugin_functional/test_suites/data_plugin/session.ts b/test/plugin_functional/test_suites/data_plugin/session.ts index ae4f8ffdf40726..7e83e0e2e9d551 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'); @@ -70,10 +71,8 @@ export default function ({ getService, getPageObjects }: PluginFunctionalProvide describe('Dashboard', () => { before(async () => { - await esArchiver.loadIfNeeded('../functional/fixtures/es_archiver/dashboard/current/data'); - await esArchiver.loadIfNeeded( - '../functional/fixtures/es_archiver/dashboard/current/kibana' - ); + await esArchiver.loadIfNeeded('dashboard/current/data'); + await kibanaServer.importExport.load('dashboard/current/kibana'); await PageObjects.common.navigateToApp('dashboard'); await PageObjects.dashboard.loadSavedDashboard('dashboard with filter'); await PageObjects.header.waitUntilLoadingHasFinished(); @@ -85,8 +84,8 @@ export default function ({ getService, getPageObjects }: PluginFunctionalProvide }); after(async () => { - await esArchiver.unload('../functional/fixtures/es_archiver/dashboard/current/data'); - await esArchiver.unload('../functional/fixtures/es_archiver/dashboard/current/kibana'); + await esArchiver.unload('dashboard/current/data'); + await kibanaServer.importExport.unload('dashboard/current/kibana'); }); it('on load there is a single session', async () => { diff --git a/test/plugin_functional/test_suites/doc_views/index.ts b/test/plugin_functional/test_suites/doc_views/index.ts index 2fed8e10ffc8e7..6c931d670fbfa7 100644 --- a/test/plugin_functional/test_suites/doc_views/index.ts +++ b/test/plugin_functional/test_suites/doc_views/index.ts @@ -13,7 +13,7 @@ export default function ({ getService, loadTestFile }: PluginFunctionalProviderC describe('doc views', function () { before(async () => { - await esArchiver.loadIfNeeded('../functional/fixtures/es_archiver/discover'); + await esArchiver.loadIfNeeded('discover'); }); loadTestFile(require.resolve('./doc_views')); diff --git a/test/plugin_functional/test_suites/panel_actions/index.js b/test/plugin_functional/test_suites/panel_actions/index.js index 4951b810854fea..a1804149b6f147 100644 --- a/test/plugin_functional/test_suites/panel_actions/index.js +++ b/test/plugin_functional/test_suites/panel_actions/index.js @@ -6,17 +6,6 @@ * Side Public License, v 1. */ -import path from 'path'; - -export const KIBANA_ARCHIVE_PATH = path.resolve( - __dirname, - '../../../functional/fixtures/es_archiver/dashboard/current/kibana' -); -export const DATA_ARCHIVE_PATH = path.resolve( - __dirname, - '../../../functional/fixtures/es_archiver/dashboard/current/data' -); - export default function ({ getService, getPageObjects, loadTestFile }) { const browser = getService('browser'); const esArchiver = getService('esArchiver'); @@ -26,8 +15,8 @@ export default function ({ getService, getPageObjects, loadTestFile }) { describe('pluggable panel actions', function () { before(async () => { await browser.setWindowSize(1300, 900); - await esArchiver.load(KIBANA_ARCHIVE_PATH); - await esArchiver.loadIfNeeded(DATA_ARCHIVE_PATH); + await kibanaServer.importExport.load('dashboard/current/kibana'); + await esArchiver.loadIfNeeded('dashboard/current/data'); await kibanaServer.uiSettings.replace({ defaultIndex: 'logstash-*', }); @@ -37,8 +26,8 @@ export default function ({ getService, getPageObjects, loadTestFile }) { after(async function () { await PageObjects.dashboard.clearSavedObjectsFromAppLinks(); - await esArchiver.unload(KIBANA_ARCHIVE_PATH); - await esArchiver.unload(DATA_ARCHIVE_PATH); + await kibanaServer.importExport.unload('dashboard/current/kibana'); + await esArchiver.unload('dashboard/current/data'); }); loadTestFile(require.resolve('./panel_actions')); diff --git a/test/plugin_functional/test_suites/saved_objects_hidden_type/delete.ts b/test/plugin_functional/test_suites/saved_objects_hidden_type/delete.ts index 666afe1acedca6..5e67069ecb7a43 100644 --- a/test/plugin_functional/test_suites/saved_objects_hidden_type/delete.ts +++ b/test/plugin_functional/test_suites/saved_objects_hidden_type/delete.ts @@ -6,23 +6,39 @@ * Side Public License, v 1. */ +import fs from 'fs'; +import path from 'path'; import expect from '@kbn/expect'; import { PluginFunctionalProviderContext } from '../../services'; export default function ({ getService }: PluginFunctionalProviderContext) { const supertest = getService('supertest'); - const esArchiver = getService('esArchiver'); + const es = getService('es'); describe('delete', () => { before(() => - esArchiver.load( - '../functional/fixtures/es_archiver/saved_objects_management/hidden_saved_objects' - ) + es.bulk({ + refresh: 'wait_for', + body: fs + .readFileSync( + path.resolve(__dirname, '../saved_objects_management/bulk/hidden_saved_objects.ndjson') + ) + .toString() + .split('\n'), + }) ); + after(() => - esArchiver.unload( - '../functional/fixtures/es_archiver/saved_objects_management/hidden_saved_objects' - ) + es.deleteByQuery({ + index: '.kibana', + body: { + query: { + terms: { + type: ['test-hidden-importable-exportable', 'test-hidden-non-importable-exportable'], + }, + }, + }, + }) ); it('should return generic 404 when trying to delete a doc with importableAndExportable types', async () => diff --git a/test/plugin_functional/test_suites/saved_objects_hidden_type/export.ts b/test/plugin_functional/test_suites/saved_objects_hidden_type/export.ts index af25835db5a81a..2c66953ef8e5b0 100644 --- a/test/plugin_functional/test_suites/saved_objects_hidden_type/export.ts +++ b/test/plugin_functional/test_suites/saved_objects_hidden_type/export.ts @@ -6,6 +6,8 @@ * Side Public License, v 1. */ +import fs from 'fs'; +import path from 'path'; import expect from '@kbn/expect'; import { PluginFunctionalProviderContext } from '../../services'; @@ -15,20 +17,33 @@ function ndjsonToObject(input: string): string[] { export default function ({ getService }: PluginFunctionalProviderContext) { const supertest = getService('supertest'); - const esArchiver = getService('esArchiver'); + const es = getService('es'); describe('export', () => { before(() => - esArchiver.load( - '../functional/fixtures/es_archiver/saved_objects_management/hidden_saved_objects' - ) + es.bulk({ + refresh: 'wait_for', + body: fs + .readFileSync( + path.resolve(__dirname, '../saved_objects_management/bulk/hidden_saved_objects.ndjson') + ) + .toString() + .split('\n'), + }) ); + after(() => - esArchiver.unload( - '../functional/fixtures/es_archiver/saved_objects_management/hidden_saved_objects' - ) + es.deleteByQuery({ + index: '.kibana', + body: { + query: { + terms: { + type: ['test-hidden-importable-exportable', 'test-hidden-non-importable-exportable'], + }, + }, + }, + }) ); - it('exports objects with importableAndExportable types', async () => await supertest .post('/api/saved_objects/_export') diff --git a/test/plugin_functional/test_suites/saved_objects_hidden_type/find.ts b/test/plugin_functional/test_suites/saved_objects_hidden_type/find.ts index 723140f5c6bf5a..5650acf6250e87 100644 --- a/test/plugin_functional/test_suites/saved_objects_hidden_type/find.ts +++ b/test/plugin_functional/test_suites/saved_objects_hidden_type/find.ts @@ -6,23 +6,39 @@ * Side Public License, v 1. */ +import fs from 'fs'; +import path from 'path'; import expect from '@kbn/expect'; import { PluginFunctionalProviderContext } from '../../services'; export default function ({ getService }: PluginFunctionalProviderContext) { const supertest = getService('supertest'); - const esArchiver = getService('esArchiver'); + const es = getService('es'); describe('find', () => { before(() => - esArchiver.load( - '../functional/fixtures/es_archiver/saved_objects_management/hidden_saved_objects' - ) + es.bulk({ + refresh: 'wait_for', + body: fs + .readFileSync( + path.resolve(__dirname, '../saved_objects_management/bulk/hidden_saved_objects.ndjson') + ) + .toString() + .split('\n'), + }) ); + after(() => - esArchiver.unload( - '../functional/fixtures/es_archiver/saved_objects_management/hidden_saved_objects' - ) + es.deleteByQuery({ + index: '.kibana', + body: { + query: { + terms: { + type: ['test-hidden-importable-exportable', 'test-hidden-non-importable-exportable'], + }, + }, + }, + }) ); it('returns empty response for importableAndExportable types', async () => diff --git a/test/plugin_functional/test_suites/saved_objects_hidden_type/import.ts b/test/plugin_functional/test_suites/saved_objects_hidden_type/import.ts index 5de7d8375dd8ce..b9862bef99a214 100644 --- a/test/plugin_functional/test_suites/saved_objects_hidden_type/import.ts +++ b/test/plugin_functional/test_suites/saved_objects_hidden_type/import.ts @@ -6,23 +6,39 @@ * Side Public License, v 1. */ +import fs from 'fs'; +import path from 'path'; import expect from '@kbn/expect'; import { PluginFunctionalProviderContext } from '../../services'; export default function ({ getService }: PluginFunctionalProviderContext) { const supertest = getService('supertest'); - const esArchiver = getService('esArchiver'); + const es = getService('es'); describe('import', () => { before(() => - esArchiver.load( - '../functional/fixtures/es_archiver/saved_objects_management/hidden_saved_objects' - ) + es.bulk({ + refresh: 'wait_for', + body: fs + .readFileSync( + path.resolve(__dirname, '../saved_objects_management/bulk/hidden_saved_objects.ndjson') + ) + .toString() + .split('\n'), + }) ); + after(() => - esArchiver.unload( - '../functional/fixtures/es_archiver/saved_objects_management/hidden_saved_objects' - ) + es.deleteByQuery({ + index: '.kibana', + body: { + query: { + terms: { + type: ['test-hidden-importable-exportable', 'test-hidden-non-importable-exportable'], + }, + }, + }, + }) ); it('imports objects with importableAndExportable type', async () => { diff --git a/test/plugin_functional/test_suites/saved_objects_hidden_type/resolve_import_errors.ts b/test/plugin_functional/test_suites/saved_objects_hidden_type/resolve_import_errors.ts index dddee085ae22b0..b877db676cd63d 100644 --- a/test/plugin_functional/test_suites/saved_objects_hidden_type/resolve_import_errors.ts +++ b/test/plugin_functional/test_suites/saved_objects_hidden_type/resolve_import_errors.ts @@ -6,23 +6,39 @@ * Side Public License, v 1. */ +import fs from 'fs'; +import path from 'path'; import expect from '@kbn/expect'; import { PluginFunctionalProviderContext } from '../../services'; export default function ({ getService }: PluginFunctionalProviderContext) { const supertest = getService('supertest'); - const esArchiver = getService('esArchiver'); + const es = getService('es'); describe('export', () => { before(() => - esArchiver.load( - '../functional/fixtures/es_archiver/saved_objects_management/hidden_saved_objects' - ) + es.bulk({ + refresh: 'wait_for', + body: fs + .readFileSync( + path.resolve(__dirname, '../saved_objects_management/bulk/hidden_saved_objects.ndjson') + ) + .toString() + .split('\n'), + }) ); + after(() => - esArchiver.unload( - '../functional/fixtures/es_archiver/saved_objects_management/hidden_saved_objects' - ) + es.deleteByQuery({ + index: '.kibana', + body: { + query: { + terms: { + type: ['test-hidden-importable-exportable', 'test-hidden-non-importable-exportable'], + }, + }, + }, + }) ); it('resolves objects with importableAndExportable types', async () => { diff --git a/test/plugin_functional/test_suites/saved_objects_management/bulk/hidden_saved_objects.ndjson b/test/plugin_functional/test_suites/saved_objects_management/bulk/hidden_saved_objects.ndjson new file mode 100644 index 00000000000000..f02b093d73ed27 --- /dev/null +++ b/test/plugin_functional/test_suites/saved_objects_management/bulk/hidden_saved_objects.ndjson @@ -0,0 +1,4 @@ +{ "index" : { "_index" : ".kibana", "_id" : "test-hidden-importable-exportable:ff3733a0-9fty-11e7-ahb3-3dcb94193fab" } } +{ "type" : "test-hidden-importable-exportable", "updated_at": "2021-02-11T18:51:23.794Z", "test-hidden-importable-exportable": { "title": "Hidden Saved object type that is importable/exportable." } } +{ "index" : { "_index" : ".kibana", "_id" : "test-hidden-non-importable-exportable:op3767a1-9rcg-53u7-jkb3-3dnb74193awc" } } +{ "type" : "test-hidden-non-importable-exportable", "updated_at": "2021-02-11T18:51:23.794Z", "test-hidden-non-importable-exportable": { "title": "Hidden Saved object type that is not importable/exportable." } } diff --git a/test/plugin_functional/test_suites/saved_objects_management/export_transform.ts b/test/plugin_functional/test_suites/saved_objects_management/export_transform.ts index 87bf5e0584a7d7..7ade3e9a644f66 100644 --- a/test/plugin_functional/test_suites/saved_objects_management/export_transform.ts +++ b/test/plugin_functional/test_suites/saved_objects_management/export_transform.ts @@ -16,20 +16,11 @@ function parseNdJson(input: string): Array> { export default function ({ getService }: PluginFunctionalProviderContext) { const supertest = getService('supertest'); - const esArchiver = getService('esArchiver'); + const kibanaServer = getService('kibanaServer'); describe('export transforms', () => { - before(async () => { - await esArchiver.load( - '../functional/fixtures/es_archiver/saved_objects_management/export_transform' - ); - }); - - after(async () => { - await esArchiver.unload( - '../functional/fixtures/es_archiver/saved_objects_management/export_transform' - ); - }); + before(() => kibanaServer.importExport.load('saved_objects_management/export_transform')); + after(() => kibanaServer.importExport.unload('saved_objects_management/export_transform')); it('allows to mutate the objects during an export', async () => { await supertest diff --git a/test/plugin_functional/test_suites/saved_objects_management/find.ts b/test/plugin_functional/test_suites/saved_objects_management/find.ts index e5a5d69c7e4d47..95a7f0d9f335e0 100644 --- a/test/plugin_functional/test_suites/saved_objects_management/find.ts +++ b/test/plugin_functional/test_suites/saved_objects_management/find.ts @@ -6,25 +6,43 @@ * Side Public License, v 1. */ +import fs from 'fs'; +import path from 'path'; import expect from '@kbn/expect'; import { PluginFunctionalProviderContext } from '../../services'; export default function ({ getService }: PluginFunctionalProviderContext) { const supertest = getService('supertest'); - const esArchiver = getService('esArchiver'); + const es = getService('es'); describe('find', () => { describe('saved objects with hidden type', () => { before(() => - esArchiver.load( - '../functional/fixtures/es_archiver/saved_objects_management/hidden_saved_objects' - ) + es.bulk({ + refresh: 'wait_for', + body: fs + .readFileSync(path.resolve(__dirname, './bulk/hidden_saved_objects.ndjson')) + .toString() + .split('\n'), + }) ); + after(() => - esArchiver.unload( - '../functional/fixtures/es_archiver/saved_objects_management/hidden_saved_objects' - ) + es.deleteByQuery({ + index: '.kibana', + body: { + query: { + terms: { + type: [ + 'test-hidden-importable-exportable', + 'test-hidden-non-importable-exportable', + ], + }, + }, + }, + }) ); + it('returns saved objects with importableAndExportable types', async () => await supertest .get( diff --git a/test/plugin_functional/test_suites/saved_objects_management/get.ts b/test/plugin_functional/test_suites/saved_objects_management/get.ts index fa35983df8301a..dcf281a9fa4739 100644 --- a/test/plugin_functional/test_suites/saved_objects_management/get.ts +++ b/test/plugin_functional/test_suites/saved_objects_management/get.ts @@ -6,25 +6,43 @@ * Side Public License, v 1. */ +import fs from 'fs'; +import path from 'path'; import expect from '@kbn/expect'; import { PluginFunctionalProviderContext } from '../../services'; export default function ({ getService }: PluginFunctionalProviderContext) { const supertest = getService('supertest'); - const esArchiver = getService('esArchiver'); + const es = getService('es'); describe('get', () => { describe('saved objects with hidden type', () => { before(() => - esArchiver.load( - '../functional/fixtures/es_archiver/saved_objects_management/hidden_saved_objects' - ) + es.bulk({ + refresh: 'wait_for', + body: fs + .readFileSync(path.resolve(__dirname, './bulk/hidden_saved_objects.ndjson')) + .toString() + .split('\n'), + }) ); + after(() => - esArchiver.unload( - '../functional/fixtures/es_archiver/saved_objects_management/hidden_saved_objects' - ) + es.deleteByQuery({ + index: '.kibana', + body: { + query: { + terms: { + type: [ + 'test-hidden-importable-exportable', + 'test-hidden-non-importable-exportable', + ], + }, + }, + }, + }) ); + const hiddenTypeExportableImportable = 'test-hidden-importable-exportable/ff3733a0-9fty-11e7-ahb3-3dcb94193fab'; const hiddenTypeNonExportableImportable = diff --git a/test/plugin_functional/test_suites/saved_objects_management/hidden_types.ts b/test/plugin_functional/test_suites/saved_objects_management/hidden_types.ts index 464b7c6e7ced71..6ff7835d2bdbc1 100644 --- a/test/plugin_functional/test_suites/saved_objects_management/hidden_types.ts +++ b/test/plugin_functional/test_suites/saved_objects_management/hidden_types.ts @@ -18,21 +18,12 @@ const fixturePaths = { export default function ({ getService, getPageObjects }: PluginFunctionalProviderContext) { const PageObjects = getPageObjects(['common', 'settings', 'header', 'savedObjects']); const supertest = getService('supertest'); - const esArchiver = getService('esArchiver'); + const kibanaServer = getService('kibanaServer'); const testSubjects = getService('testSubjects'); - describe('saved objects management with hidden types', () => { - before(async () => { - await esArchiver.load( - '../functional/fixtures/es_archiver/saved_objects_management/hidden_types' - ); - }); - - after(async () => { - await esArchiver.unload( - '../functional/fixtures/es_archiver/saved_objects_management/hidden_types' - ); - }); + describe('with hidden types', () => { + before(() => kibanaServer.importExport.load('saved_objects_management/hidden_types')); + after(() => kibanaServer.importExport.unload('saved_objects_management/hidden_types')); beforeEach(async () => { await PageObjects.settings.navigateTo(); diff --git a/test/plugin_functional/test_suites/saved_objects_management/scroll_count.ts b/test/plugin_functional/test_suites/saved_objects_management/scroll_count.ts index f74cd5b938447d..dba9885350b220 100644 --- a/test/plugin_functional/test_suites/saved_objects_management/scroll_count.ts +++ b/test/plugin_functional/test_suites/saved_objects_management/scroll_count.ts @@ -6,25 +6,42 @@ * Side Public License, v 1. */ +import fs from 'fs'; +import path from 'path'; import expect from '@kbn/expect'; import { PluginFunctionalProviderContext } from '../../services'; export default function ({ getService }: PluginFunctionalProviderContext) { const supertest = getService('supertest'); - const esArchiver = getService('esArchiver'); + const es = getService('es'); const apiUrl = '/api/kibana/management/saved_objects/scroll/counts'; describe('scroll_count', () => { describe('saved objects with hidden type', () => { before(() => - esArchiver.load( - '../functional/fixtures/es_archiver/saved_objects_management/hidden_saved_objects' - ) + es.bulk({ + refresh: 'wait_for', + body: fs + .readFileSync(path.resolve(__dirname, './bulk/hidden_saved_objects.ndjson')) + .toString() + .split('\n'), + }) ); + after(() => - esArchiver.unload( - '../functional/fixtures/es_archiver/saved_objects_management/hidden_saved_objects' - ) + es.deleteByQuery({ + index: '.kibana', + body: { + query: { + terms: { + type: [ + 'test-hidden-importable-exportable', + 'test-hidden-non-importable-exportable', + ], + }, + }, + }, + }) ); it('only counts hidden types that are importableAndExportable', async () => { diff --git a/test/scripts/jenkins_build_kibana.sh b/test/scripts/jenkins_build_kibana.sh index 95c619423d313e..d2e0fece46cf66 100755 --- a/test/scripts/jenkins_build_kibana.sh +++ b/test/scripts/jenkins_build_kibana.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash +cd "$KIBANA_DIR" source src/dev/ci_setup/setup_env.sh if [[ ! "$TASK_QUEUE_PROCESS_ID" ]]; then @@ -12,13 +13,50 @@ export KBN_NP_PLUGINS_BUILT=true echo " -> Ensuring all functional tests are in a ciGroup" node scripts/ensure_all_tests_in_ci_group; -echo " -> building and extracting OSS Kibana distributable for use in functional tests" -node scripts/build --debug --oss +echo " -> Ensuring all x-pack functional tests are in a ciGroup" +node x-pack/scripts/functional_tests --assert-none-excluded \ + --include-tag ciGroup1 \ + --include-tag ciGroup2 \ + --include-tag ciGroup3 \ + --include-tag ciGroup4 \ + --include-tag ciGroup5 \ + --include-tag ciGroup6 \ + --include-tag ciGroup7 \ + --include-tag ciGroup8 \ + --include-tag ciGroup9 \ + --include-tag ciGroup10 \ + --include-tag ciGroup11 \ + --include-tag ciGroup12 \ + --include-tag ciGroup13 \ + --include-tag ciGroupDocker + +echo " -> building and extracting default Kibana distributable for use in functional tests" +node scripts/build --debug --no-oss echo " -> shipping metrics from build to ci-stats" node scripts/ship_ci_stats \ --metrics target/optimizer_bundle_metrics.json \ --metrics packages/kbn-ui-shared-deps/target/metrics.json -mkdir -p "$WORKSPACE/kibana-build-oss" -cp -pR build/oss/kibana-*-SNAPSHOT-linux-x86_64/. $WORKSPACE/kibana-build-oss/ +linuxBuild="$(find "$KIBANA_DIR/target" -name 'kibana-*-linux-x86_64.tar.gz')" +installDir="$KIBANA_DIR/install/kibana" +mkdir -p "$installDir" +tar -xzf "$linuxBuild" -C "$installDir" --strip=1 + +mkdir -p "$WORKSPACE/kibana-build" +cp -pR install/kibana/. $WORKSPACE/kibana-build/ +cp "$linuxBuild" "$WORKSPACE/kibana-default.tar.gz" + +mkdir -p "$WORKSPACE/kibana-build" +cp -pR install/kibana/. $WORKSPACE/kibana-build/ + +echo " -> Archive built plugins" +shopt -s globstar +tar -zcf \ + "$WORKSPACE/kibana-default-plugins.tar.gz" \ + x-pack/plugins/**/target/public \ + x-pack/test/**/target/public \ + examples/**/target/public \ + x-pack/examples/**/target/public \ + test/**/target/public +shopt -u globstar diff --git a/test/scripts/jenkins_build_load_testing.sh b/test/scripts/jenkins_build_load_testing.sh index 659321f1d39751..5447b9e7c3092a 100755 --- a/test/scripts/jenkins_build_load_testing.sh +++ b/test/scripts/jenkins_build_load_testing.sh @@ -26,8 +26,8 @@ installDir="$KIBANA_DIR/install/kibana" mkdir -p "$installDir" tar -xzf "$linuxBuild" -C "$installDir" --strip=1 -mkdir -p "$WORKSPACE/kibana-build-xpack" -cp -pR install/kibana/. $WORKSPACE/kibana-build-xpack/ +mkdir -p "$WORKSPACE/kibana-build" +cp -pR install/kibana/. $WORKSPACE/kibana-build/ echo " -> test setup" source test/scripts/jenkins_test_setup_xpack.sh diff --git a/test/scripts/jenkins_build_plugins.sh b/test/scripts/jenkins_build_plugins.sh index a3d77ed968169b..7e102e67bb8e01 100755 --- a/test/scripts/jenkins_build_plugins.sh +++ b/test/scripts/jenkins_build_plugins.sh @@ -4,9 +4,18 @@ source src/dev/ci_setup/setup_env.sh echo " -> building kibana platform plugins" node scripts/build_kibana_platform_plugins \ - --oss \ --scan-dir "$KIBANA_DIR/test/plugin_functional/plugins" \ --scan-dir "$KIBANA_DIR/test/interpreter_functional/plugins" \ --scan-dir "$KIBANA_DIR/examples" \ - --workers 6 \ - --verbose + --scan-dir "$KIBANA_DIR/test/plugin_functional/plugins" \ + --scan-dir "$KIBANA_DIR/test/common/fixtures/plugins" \ + --scan-dir "$XPACK_DIR/test/plugin_functional/plugins" \ + --scan-dir "$XPACK_DIR/test/functional_with_es_ssl/fixtures/plugins" \ + --scan-dir "$XPACK_DIR/test/alerting_api_integration/plugins" \ + --scan-dir "$XPACK_DIR/test/plugin_api_integration/plugins" \ + --scan-dir "$XPACK_DIR/test/plugin_api_perf/plugins" \ + --scan-dir "$XPACK_DIR/test/licensing_plugin/plugins" \ + --scan-dir "$XPACK_DIR/test/usage_collection/plugins" \ + --scan-dir "$XPACK_DIR/test/security_functional/fixtures/common" \ + --scan-dir "$XPACK_DIR/examples" \ + --workers 12 diff --git a/test/scripts/jenkins_test_setup_oss.sh b/test/scripts/jenkins_test_setup_oss.sh index 53626ce89462ad..29d396667c465a 100755 --- a/test/scripts/jenkins_test_setup_oss.sh +++ b/test/scripts/jenkins_test_setup_oss.sh @@ -3,11 +3,11 @@ source test/scripts/jenkins_test_setup.sh if [[ -z "$CODE_COVERAGE" ]]; then - destDir="$WORKSPACE/kibana-build-oss-${TASK_QUEUE_PROCESS_ID:-$CI_PARALLEL_PROCESS_NUMBER}" + destDir="$WORKSPACE/kibana-build-${TASK_QUEUE_PROCESS_ID:-$CI_PARALLEL_PROCESS_NUMBER}" if [[ ! -d $destDir ]]; then mkdir -p $destDir - cp -pR "$WORKSPACE/kibana-build-oss/." $destDir/ + cp -pR "$WORKSPACE/kibana-build/." $destDir/ fi export KIBANA_INSTALL_DIR="$destDir" diff --git a/test/scripts/jenkins_test_setup_xpack.sh b/test/scripts/jenkins_test_setup_xpack.sh index b9227fd8ff4160..31acc4f4865e2e 100755 --- a/test/scripts/jenkins_test_setup_xpack.sh +++ b/test/scripts/jenkins_test_setup_xpack.sh @@ -3,11 +3,11 @@ source test/scripts/jenkins_test_setup.sh if [[ -z "$CODE_COVERAGE" ]]; then - destDir="$WORKSPACE/kibana-build-xpack-${TASK_QUEUE_PROCESS_ID:-$CI_PARALLEL_PROCESS_NUMBER}" + destDir="$WORKSPACE/kibana-build-${TASK_QUEUE_PROCESS_ID:-$CI_PARALLEL_PROCESS_NUMBER}" if [[ ! -d $destDir ]]; then mkdir -p $destDir - cp -pR "$WORKSPACE/kibana-build-xpack/." $destDir/ + cp -pR "$WORKSPACE/kibana-build/." $destDir/ fi export KIBANA_INSTALL_DIR="$(realpath $destDir)" diff --git a/test/scripts/jenkins_xpack_baseline.sh b/test/scripts/jenkins_xpack_baseline.sh index 2755a6e0a705dc..93363687b39a90 100755 --- a/test/scripts/jenkins_xpack_baseline.sh +++ b/test/scripts/jenkins_xpack_baseline.sh @@ -17,8 +17,8 @@ installDir="$KIBANA_DIR/install/kibana" mkdir -p "$installDir" tar -xzf "$linuxBuild" -C "$installDir" --strip=1 -mkdir -p "$WORKSPACE/kibana-build-xpack" -cp -pR install/kibana/. $WORKSPACE/kibana-build-xpack/ +mkdir -p "$WORKSPACE/kibana-build" +cp -pR install/kibana/. $WORKSPACE/kibana-build/ cd "$KIBANA_DIR" source "test/scripts/jenkins_xpack_saved_objects_field_metrics.sh" diff --git a/test/scripts/jenkins_xpack_build_kibana.sh b/test/scripts/jenkins_xpack_build_kibana.sh deleted file mode 100755 index 8cdeb2a04a3620..00000000000000 --- a/test/scripts/jenkins_xpack_build_kibana.sh +++ /dev/null @@ -1,61 +0,0 @@ -#!/usr/bin/env bash - -cd "$KIBANA_DIR" -source src/dev/ci_setup/setup_env.sh - -if [[ ! "$TASK_QUEUE_PROCESS_ID" ]]; then - ./test/scripts/jenkins_xpack_build_plugins.sh -fi - -# doesn't persist, also set in kibanaPipeline.groovy -export KBN_NP_PLUGINS_BUILT=true - -echo " -> Ensuring all functional tests are in a ciGroup" -cd "$XPACK_DIR" -node scripts/functional_tests --assert-none-excluded \ - --include-tag ciGroup1 \ - --include-tag ciGroup2 \ - --include-tag ciGroup3 \ - --include-tag ciGroup4 \ - --include-tag ciGroup5 \ - --include-tag ciGroup6 \ - --include-tag ciGroup7 \ - --include-tag ciGroup8 \ - --include-tag ciGroup9 \ - --include-tag ciGroup10 \ - --include-tag ciGroup11 \ - --include-tag ciGroup12 \ - --include-tag ciGroup13 \ - --include-tag ciGroupDocker - -echo " -> building and extracting default Kibana distributable for use in functional tests" -cd "$KIBANA_DIR" -node scripts/build --debug --no-oss - -echo " -> shipping metrics from build to ci-stats" -node scripts/ship_ci_stats \ - --metrics target/optimizer_bundle_metrics.json \ - --metrics packages/kbn-ui-shared-deps/target/metrics.json - -linuxBuild="$(find "$KIBANA_DIR/target" -name 'kibana-*-linux-x86_64.tar.gz')" -installDir="$KIBANA_DIR/install/kibana" -mkdir -p "$installDir" -tar -xzf "$linuxBuild" -C "$installDir" --strip=1 - -mkdir -p "$WORKSPACE/kibana-build-xpack" -cp -pR install/kibana/. $WORKSPACE/kibana-build-xpack/ -cp "$linuxBuild" "$WORKSPACE/kibana-default.tar.gz" - -mkdir -p "$WORKSPACE/kibana-build-xpack" -cp -pR install/kibana/. $WORKSPACE/kibana-build-xpack/ - -echo " -> Archive built plugins" -shopt -s globstar -tar -zcf \ - "$WORKSPACE/kibana-default-plugins.tar.gz" \ - x-pack/plugins/**/target/public \ - x-pack/test/**/target/public \ - examples/**/target/public \ - x-pack/examples/**/target/public \ - test/**/target/public -shopt -u globstar diff --git a/test/server_integration/http/ssl_redirect/index.js b/test/server_integration/http/ssl_redirect/index.js index bcd1b6f25ea511..8abe700e261493 100644 --- a/test/server_integration/http/ssl_redirect/index.js +++ b/test/server_integration/http/ssl_redirect/index.js @@ -17,7 +17,7 @@ export default function ({ getService }) { await supertest.get('/').expect('location', url).expect(302); - await supertest.get('/').redirects(1).expect('location', '/app/home').expect(302); + await supertest.get('/').redirects(1).expect('location', '/spaces/enter').expect(302); }); }); } diff --git a/vars/kibanaPipeline.groovy b/vars/kibanaPipeline.groovy index 65e2945ea4464e..4cd9308e810aad 100644 --- a/vars/kibanaPipeline.groovy +++ b/vars/kibanaPipeline.groovy @@ -286,33 +286,23 @@ def doSetup() { } } -def buildOss(maxWorkers = '') { - notifyOnError { - withEnv(["KBN_OPTIMIZER_MAX_WORKERS=${maxWorkers}"]) { - runbld("./test/scripts/jenkins_build_kibana.sh", "Build OSS/Default Kibana") - } - } -} - def getBuildArtifactBucket() { def dir = env.ghprbPullId ? "pr-${env.ghprbPullId}" : buildState.get('checkoutInfo').branch.replace("/", "__") return "gs://ci-artifacts.kibana.dev/default-build/${dir}/${buildState.get('checkoutInfo').commit}" } -def buildXpack(maxWorkers = '', uploadArtifacts = false) { +def buildKibana(maxWorkers = '') { notifyOnError { withEnv(["KBN_OPTIMIZER_MAX_WORKERS=${maxWorkers}"]) { - runbld("./test/scripts/jenkins_xpack_build_kibana.sh", "Build X-Pack Kibana") + runbld("./test/scripts/jenkins_build_kibana.sh", "Build Kibana") } - if (uploadArtifacts) { - withGcpServiceAccount.fromVaultSecret('secret/kibana-issues/dev/ci-artifacts-key', 'value') { - bash(""" - cd "${env.WORKSPACE}" - gsutil -q -m cp 'kibana-default.tar.gz' '${getBuildArtifactBucket()}/' - gsutil -q -m cp 'kibana-default-plugins.tar.gz' '${getBuildArtifactBucket()}/' - """, "Upload Default Build artifacts to GCS") - } + withGcpServiceAccount.fromVaultSecret('secret/kibana-issues/dev/ci-artifacts-key', 'value') { + bash(""" + cd "${env.WORKSPACE}" + gsutil -q -m cp 'kibana-default.tar.gz' '${getBuildArtifactBucket()}/' + gsutil -q -m cp 'kibana-default-plugins.tar.gz' '${getBuildArtifactBucket()}/' + """, "Upload Default Build artifacts to GCS") } } } @@ -426,14 +416,10 @@ def withDocker(Closure closure) { ) } -def buildOssPlugins() { +def buildPlugins() { runbld('./test/scripts/jenkins_build_plugins.sh', 'Build OSS Plugins') } -def buildXpackPlugins() { - runbld('./test/scripts/jenkins_xpack_build_plugins.sh', 'Build X-Pack Plugins') -} - def withTasks(Map params = [:], Closure closure) { catchErrors { def config = [setupWork: {}, worker: [:], parallel: 24] + params @@ -449,8 +435,7 @@ def withTasks(Map params = [:], Closure closure) { }, // There are integration tests etc that require the plugins to be built first, so let's go ahead and build them before set up the parallel workspaces - ossPlugins: { buildOssPlugins() }, - xpackPlugins: { buildXpackPlugins() }, + plugins: { buildPlugins() }, ]) config.setupWork() @@ -470,8 +455,11 @@ def allCiTasks() { tasks.check() tasks.lint() tasks.test() - tasks.functionalOss() - tasks.functionalXpack() + task { + buildKibana(16) + tasks.functionalOss() + tasks.functionalXpack() + } tasks.storybooksCi() } }, diff --git a/vars/tasks.groovy b/vars/tasks.groovy index 1d33fd12496814..e6061de2987ba3 100644 --- a/vars/tasks.groovy +++ b/vars/tasks.groovy @@ -55,8 +55,8 @@ def xpackCiGroupDocker() { kibanaPipeline.downloadDefaultBuildArtifacts() kibanaPipeline.bash(""" cd '${env.WORKSPACE}' - mkdir -p kibana-build-xpack - tar -xzf kibana-default.tar.gz -C kibana-build-xpack --strip=1 + mkdir -p kibana-build + tar -xzf kibana-default.tar.gz -C kibana-build --strip=1 tar -xzf kibana-default-plugins.tar.gz -C kibana """, "Extract Default Build artifacts") kibanaPipeline.xpackCiGroupProcess('Docker', true)() @@ -75,8 +75,6 @@ def functionalOss(Map params = [:]) { ] task { - kibanaPipeline.buildOss(6) - if (config.ciGroups) { ossCiGroups() } @@ -115,8 +113,6 @@ def functionalXpack(Map params = [:]) { ] task { - kibanaPipeline.buildXpack(10, true) - if (config.ciGroups) { xpackCiGroups() xpackCiGroupDocker() diff --git a/x-pack/test/api_integration/apis/kibana/kql_telemetry/kql_telemetry.js b/x-pack/test/api_integration/apis/kibana/kql_telemetry/kql_telemetry.js index 8c67f3a42721f8..95a65de81e85b6 100644 --- a/x-pack/test/api_integration/apis/kibana/kql_telemetry/kql_telemetry.js +++ b/x-pack/test/api_integration/apis/kibana/kql_telemetry/kql_telemetry.js @@ -10,12 +10,8 @@ import expect from '@kbn/expect'; export default function ({ getService }) { const supertestNoAuth = getService('supertestWithoutAuth'); const supertest = getService('supertest'); - const esArchiver = getService('esArchiver'); describe('telemetry API', () => { - before(() => esArchiver.load('empty_kibana')); - after(() => esArchiver.unload('empty_kibana')); - describe('no auth', () => { it('should return 401', async () => { return supertestNoAuth diff --git a/x-pack/test/functional/es_archives/getting_started/shakespeare/mappings.json b/x-pack/test/functional/es_archives/getting_started/shakespeare/mappings.json index 0e030c54d49122..c9b63dd079f865 100644 --- a/x-pack/test/functional/es_archives/getting_started/shakespeare/mappings.json +++ b/x-pack/test/functional/es_archives/getting_started/shakespeare/mappings.json @@ -20,8 +20,8 @@ }, "settings": { "index": { - "number_of_replicas": "1", - "number_of_shards": "5" + "number_of_replicas": "0", + "number_of_shards": "1" } } } diff --git a/x-pack/test/reporting_api_integration/reporting_and_security/bwc_generation_urls.ts b/x-pack/test/reporting_api_integration/reporting_and_security/bwc_generation_urls.ts index fd194a1df1f652..26780754833051 100644 --- a/x-pack/test/reporting_api_integration/reporting_and_security/bwc_generation_urls.ts +++ b/x-pack/test/reporting_api_integration/reporting_and_security/bwc_generation_urls.ts @@ -10,9 +10,9 @@ import pathNode from 'path'; import { FtrProviderContext } from '../ftr_provider_context'; import * as GenerationUrls from '../services/generation_urls'; -const OSS_KIBANA_ARCHIVE_PATH = pathNode.resolve( +const KIBANA_ARCHIVE_PATH = pathNode.resolve( REPO_ROOT, - 'test/functional/fixtures/es_archiver/dashboard/current/kibana' + 'test/functional/fixtures/kbn_archiver/dashboard/current/kibana' ); const OSS_DATA_ARCHIVE_PATH = pathNode.resolve( REPO_ROOT, @@ -27,7 +27,7 @@ export default function ({ getService }: FtrProviderContext) { describe('BWC report generation urls', () => { before(async () => { - await esArchiver.load(OSS_KIBANA_ARCHIVE_PATH); + await kibanaServer.importExport.load(KIBANA_ARCHIVE_PATH); await esArchiver.load(OSS_DATA_ARCHIVE_PATH); await kibanaServer.uiSettings.update({ @@ -36,6 +36,8 @@ export default function ({ getService }: FtrProviderContext) { await reportingAPI.deleteAllReports(); }); + after(() => kibanaServer.importExport.unload(KIBANA_ARCHIVE_PATH)); + describe('Pre 6_2', () => { // The URL being tested was captured from release 6.4 and then the layout section was removed to test structure before // preserve_layout was introduced. See https://github.com/elastic/kibana/issues/23414 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 a69534cfc4df74..154ff3c1bea550 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 @@ -12,9 +12,9 @@ import { FtrProviderContext } from '../ftr_provider_context'; import * as GenerationUrls from '../services/generation_urls'; import { ReportingUsageStats } from '../services/usage'; -const OSS_KIBANA_ARCHIVE_PATH = path.resolve( +const KIBANA_ARCHIVE_PATH = path.resolve( REPO_ROOT, - 'test/functional/fixtures/es_archiver/dashboard/current/kibana' + 'test/functional/fixtures/kbn_archiver/dashboard/current/kibana' ); const OSS_DATA_ARCHIVE_PATH = path.resolve( REPO_ROOT, @@ -35,7 +35,7 @@ export default function ({ getService }: FtrProviderContext) { describe('Usage', () => { before(async () => { - await esArchiver.load(OSS_KIBANA_ARCHIVE_PATH); + await kibanaServer.importExport.load(KIBANA_ARCHIVE_PATH); await esArchiver.load(OSS_DATA_ARCHIVE_PATH); await kibanaServer.uiSettings.update({ @@ -45,7 +45,7 @@ export default function ({ getService }: FtrProviderContext) { }); after(async () => { - await esArchiver.unload(OSS_KIBANA_ARCHIVE_PATH); + await kibanaServer.importExport.unload(KIBANA_ARCHIVE_PATH); await esArchiver.unload(OSS_DATA_ARCHIVE_PATH); });