diff --git a/src/dev/precommit_hook/casing_check_config.js b/src/dev/precommit_hook/casing_check_config.js index cec80dd547a53..b8eacdd6a3897 100644 --- a/src/dev/precommit_hook/casing_check_config.js +++ b/src/dev/precommit_hook/casing_check_config.js @@ -173,12 +173,12 @@ export const TEMPORARILY_IGNORED_PATHS = [ 'x-pack/plugins/monitoring/public/icons/health-green.svg', 'x-pack/plugins/monitoring/public/icons/health-red.svg', 'x-pack/plugins/monitoring/public/icons/health-yellow.svg', - 'x-pack/plugins/reporting/server/export_types/printable_pdf/server/lib/pdf/assets/fonts/noto/NotoSansCJKtc-Medium.ttf', - 'x-pack/plugins/reporting/server/export_types/printable_pdf/server/lib/pdf/assets/fonts/noto/NotoSansCJKtc-Regular.ttf', - 'x-pack/plugins/reporting/server/export_types/printable_pdf/server/lib/pdf/assets/fonts/roboto/Roboto-Italic.ttf', - 'x-pack/plugins/reporting/server/export_types/printable_pdf/server/lib/pdf/assets/fonts/roboto/Roboto-Medium.ttf', - 'x-pack/plugins/reporting/server/export_types/printable_pdf/server/lib/pdf/assets/fonts/roboto/Roboto-Regular.ttf', - 'x-pack/plugins/reporting/server/export_types/printable_pdf/server/lib/pdf/assets/img/logo-grey.png', + 'x-pack/plugins/reporting/server/export_types/printable_pdf/lib/pdf/assets/fonts/noto/NotoSansCJKtc-Medium.ttf', + 'x-pack/plugins/reporting/server/export_types/printable_pdf/lib/pdf/assets/fonts/noto/NotoSansCJKtc-Regular.ttf', + 'x-pack/plugins/reporting/server/export_types/printable_pdf/lib/pdf/assets/fonts/roboto/Roboto-Italic.ttf', + 'x-pack/plugins/reporting/server/export_types/printable_pdf/lib/pdf/assets/fonts/roboto/Roboto-Medium.ttf', + 'x-pack/plugins/reporting/server/export_types/printable_pdf/lib/pdf/assets/fonts/roboto/Roboto-Regular.ttf', + 'x-pack/plugins/reporting/server/export_types/printable_pdf/lib/pdf/assets/img/logo-grey.png', 'x-pack/test/functional/es_archives/monitoring/beats-with-restarted-instance/data.json.gz', 'x-pack/test/functional/es_archives/monitoring/beats-with-restarted-instance/mappings.json', 'x-pack/test/functional/es_archives/monitoring/logstash-pipelines/data.json.gz', diff --git a/x-pack/plugins/reporting/common/types.ts b/x-pack/plugins/reporting/common/types.ts index 2819c28cfb54f..18b0ac2a72802 100644 --- a/x-pack/plugins/reporting/common/types.ts +++ b/x-pack/plugins/reporting/common/types.ts @@ -7,7 +7,7 @@ // eslint-disable-next-line @kbn/eslint/no-restricted-paths export { ReportingConfigType } from '../server/config'; // eslint-disable-next-line @kbn/eslint/no-restricted-paths -export { LayoutInstance } from '../server/export_types/common/layouts'; +export { LayoutInstance } from '../server/lib/layouts'; export type JobId = string; export type JobStatus = diff --git a/x-pack/plugins/reporting/server/browsers/chromium/driver/chromium_driver.ts b/x-pack/plugins/reporting/server/browsers/chromium/driver/chromium_driver.ts index bca9496bc9add..eb16a9d6de1a8 100644 --- a/x-pack/plugins/reporting/server/browsers/chromium/driver/chromium_driver.ts +++ b/x-pack/plugins/reporting/server/browsers/chromium/driver/chromium_driver.ts @@ -9,8 +9,8 @@ import { map, truncate } from 'lodash'; import open from 'opn'; import { ElementHandle, EvaluateFn, Page, Response, SerializableOrJSHandle } from 'puppeteer'; import { parse as parseUrl } from 'url'; -import { ViewZoomWidthHeight } from '../../../export_types/common/layouts/layout'; import { LevelLogger } from '../../../lib'; +import { ViewZoomWidthHeight } from '../../../lib/layouts/layout'; import { ConditionalHeaders, ElementPosition } from '../../../types'; import { allowRequest, NetworkPolicy } from '../../network_policy'; diff --git a/x-pack/plugins/reporting/server/core.ts b/x-pack/plugins/reporting/server/core.ts index eccd6c7db1698..95dc7586ad4a6 100644 --- a/x-pack/plugins/reporting/server/core.ts +++ b/x-pack/plugins/reporting/server/core.ts @@ -20,7 +20,7 @@ import { SecurityPluginSetup } from '../../security/server'; import { ScreenshotsObservableFn } from '../server/types'; import { ReportingConfig } from './'; import { HeadlessChromiumDriverFactory } from './browsers/chromium/driver_factory'; -import { screenshotsObservableFactory } from './export_types/common/lib/screenshots'; +import { screenshotsObservableFactory } from './lib/screenshots'; import { checkLicense, getExportTypesRegistry } from './lib'; import { ESQueueInstance } from './lib/create_queue'; import { EnqueueJobFn } from './lib/enqueue_job'; diff --git a/x-pack/plugins/reporting/server/export_types/common/constants.ts b/x-pack/plugins/reporting/server/export_types/common/constants.ts deleted file mode 100644 index 76fab923978f8..0000000000000 --- a/x-pack/plugins/reporting/server/export_types/common/constants.ts +++ /dev/null @@ -1,7 +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; - * you may not use this file except in compliance with the Elastic License. - */ - -export const DEFAULT_PAGELOAD_SELECTOR = '.application'; diff --git a/x-pack/plugins/reporting/server/export_types/common/execute_job/decrypt_job_headers.test.ts b/x-pack/plugins/reporting/server/export_types/common/decrypt_job_headers.test.ts similarity index 93% rename from x-pack/plugins/reporting/server/export_types/common/execute_job/decrypt_job_headers.test.ts rename to x-pack/plugins/reporting/server/export_types/common/decrypt_job_headers.test.ts index 4998d936c9b16..908817a2ccf81 100644 --- a/x-pack/plugins/reporting/server/export_types/common/execute_job/decrypt_job_headers.test.ts +++ b/x-pack/plugins/reporting/server/export_types/common/decrypt_job_headers.test.ts @@ -4,8 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ -import { cryptoFactory, LevelLogger } from '../../../lib'; -import { decryptJobHeaders } from './decrypt_job_headers'; +import { cryptoFactory, LevelLogger } from '../../lib'; +import { decryptJobHeaders } from './'; const encryptHeaders = async (encryptionKey: string, headers: Record) => { const crypto = cryptoFactory(encryptionKey); diff --git a/x-pack/plugins/reporting/server/export_types/common/execute_job/decrypt_job_headers.ts b/x-pack/plugins/reporting/server/export_types/common/decrypt_job_headers.ts similarity index 96% rename from x-pack/plugins/reporting/server/export_types/common/execute_job/decrypt_job_headers.ts rename to x-pack/plugins/reporting/server/export_types/common/decrypt_job_headers.ts index 579b5196ad4d9..845b9adb38be9 100644 --- a/x-pack/plugins/reporting/server/export_types/common/execute_job/decrypt_job_headers.ts +++ b/x-pack/plugins/reporting/server/export_types/common/decrypt_job_headers.ts @@ -5,7 +5,7 @@ */ import { i18n } from '@kbn/i18n'; -import { cryptoFactory, LevelLogger } from '../../../lib'; +import { cryptoFactory, LevelLogger } from '../../lib'; interface HasEncryptedHeaders { headers?: string; diff --git a/x-pack/plugins/reporting/common/get_absolute_url.test.ts b/x-pack/plugins/reporting/server/export_types/common/get_absolute_url.test.ts similarity index 100% rename from x-pack/plugins/reporting/common/get_absolute_url.test.ts rename to x-pack/plugins/reporting/server/export_types/common/get_absolute_url.test.ts diff --git a/x-pack/plugins/reporting/common/get_absolute_url.ts b/x-pack/plugins/reporting/server/export_types/common/get_absolute_url.ts similarity index 100% rename from x-pack/plugins/reporting/common/get_absolute_url.ts rename to x-pack/plugins/reporting/server/export_types/common/get_absolute_url.ts diff --git a/x-pack/plugins/reporting/server/export_types/common/execute_job/get_conditional_headers.test.ts b/x-pack/plugins/reporting/server/export_types/common/get_conditional_headers.test.ts similarity index 93% rename from x-pack/plugins/reporting/server/export_types/common/execute_job/get_conditional_headers.test.ts rename to x-pack/plugins/reporting/server/export_types/common/get_conditional_headers.test.ts index 030ced5dc4b80..0372d515c21a8 100644 --- a/x-pack/plugins/reporting/server/export_types/common/execute_job/get_conditional_headers.test.ts +++ b/x-pack/plugins/reporting/server/export_types/common/get_conditional_headers.test.ts @@ -5,12 +5,12 @@ */ import sinon from 'sinon'; -import { ReportingConfig } from '../../../'; -import { ReportingCore } from '../../../core'; -import { createMockReportingCore } from '../../../test_helpers'; -import { ScheduledTaskParams } from '../../../types'; -import { ScheduledTaskParamsPDF } from '../../printable_pdf/types'; -import { getConditionalHeaders, getCustomLogo } from './index'; +import { ReportingConfig } from '../../'; +import { ReportingCore } from '../../core'; +import { createMockReportingCore } from '../../test_helpers'; +import { ScheduledTaskParams } from '../../types'; +import { ScheduledTaskParamsPDF } from '../printable_pdf/types'; +import { getConditionalHeaders, getCustomLogo } from './'; let mockConfig: ReportingConfig; let mockReportingPlugin: ReportingCore; diff --git a/x-pack/plugins/reporting/server/export_types/common/execute_job/get_conditional_headers.ts b/x-pack/plugins/reporting/server/export_types/common/get_conditional_headers.ts similarity index 91% rename from x-pack/plugins/reporting/server/export_types/common/execute_job/get_conditional_headers.ts rename to x-pack/plugins/reporting/server/export_types/common/get_conditional_headers.ts index 7a50eaac80d85..799d023486832 100644 --- a/x-pack/plugins/reporting/server/export_types/common/execute_job/get_conditional_headers.ts +++ b/x-pack/plugins/reporting/server/export_types/common/get_conditional_headers.ts @@ -4,8 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ -import { ReportingConfig } from '../../../'; -import { ConditionalHeaders } from '../../../types'; +import { ReportingConfig } from '../../'; +import { ConditionalHeaders } from '../../types'; export const getConditionalHeaders = ({ config, diff --git a/x-pack/plugins/reporting/server/export_types/common/execute_job/get_custom_logo.test.ts b/x-pack/plugins/reporting/server/export_types/common/get_custom_logo.test.ts similarity index 85% rename from x-pack/plugins/reporting/server/export_types/common/execute_job/get_custom_logo.test.ts rename to x-pack/plugins/reporting/server/export_types/common/get_custom_logo.test.ts index c364752c8dd0f..a3d65a1398a20 100644 --- a/x-pack/plugins/reporting/server/export_types/common/execute_job/get_custom_logo.test.ts +++ b/x-pack/plugins/reporting/server/export_types/common/get_custom_logo.test.ts @@ -4,10 +4,10 @@ * you may not use this file except in compliance with the Elastic License. */ -import { ReportingCore } from '../../../core'; -import { createMockReportingCore } from '../../../test_helpers'; -import { ScheduledTaskParamsPDF } from '../../printable_pdf/types'; -import { getConditionalHeaders, getCustomLogo } from './index'; +import { ReportingCore } from '../../core'; +import { createMockReportingCore } from '../../test_helpers'; +import { ScheduledTaskParamsPDF } from '../printable_pdf/types'; +import { getConditionalHeaders, getCustomLogo } from './'; const mockConfigGet = jest.fn().mockImplementation((key: string) => { return 'localhost'; diff --git a/x-pack/plugins/reporting/server/export_types/common/execute_job/get_custom_logo.ts b/x-pack/plugins/reporting/server/export_types/common/get_custom_logo.ts similarity index 82% rename from x-pack/plugins/reporting/server/export_types/common/execute_job/get_custom_logo.ts rename to x-pack/plugins/reporting/server/export_types/common/get_custom_logo.ts index 36c02eb47565c..547cc45258dae 100644 --- a/x-pack/plugins/reporting/server/export_types/common/execute_job/get_custom_logo.ts +++ b/x-pack/plugins/reporting/server/export_types/common/get_custom_logo.ts @@ -4,10 +4,10 @@ * you may not use this file except in compliance with the Elastic License. */ -import { ReportingConfig, ReportingCore } from '../../../'; -import { UI_SETTINGS_CUSTOM_PDF_LOGO } from '../../../../common/constants'; -import { ConditionalHeaders } from '../../../types'; -import { ScheduledTaskParamsPDF } from '../../printable_pdf/types'; // Logo is PDF only +import { ReportingConfig, ReportingCore } from '../../'; +import { UI_SETTINGS_CUSTOM_PDF_LOGO } from '../../../common/constants'; +import { ConditionalHeaders } from '../../types'; +import { ScheduledTaskParamsPDF } from '../printable_pdf/types'; // Logo is PDF only export const getCustomLogo = async ({ reporting, diff --git a/x-pack/plugins/reporting/server/export_types/common/execute_job/get_full_urls.test.ts b/x-pack/plugins/reporting/server/export_types/common/get_full_urls.test.ts similarity index 97% rename from x-pack/plugins/reporting/server/export_types/common/execute_job/get_full_urls.test.ts rename to x-pack/plugins/reporting/server/export_types/common/get_full_urls.test.ts index ad952c084d4f3..73d7c7b03c128 100644 --- a/x-pack/plugins/reporting/server/export_types/common/execute_job/get_full_urls.test.ts +++ b/x-pack/plugins/reporting/server/export_types/common/get_full_urls.test.ts @@ -4,9 +4,9 @@ * you may not use this file except in compliance with the Elastic License. */ -import { ReportingConfig } from '../../../'; -import { ScheduledTaskParamsPNG } from '../../png/types'; -import { ScheduledTaskParamsPDF } from '../../printable_pdf/types'; +import { ReportingConfig } from '../../'; +import { ScheduledTaskParamsPNG } from '../png/types'; +import { ScheduledTaskParamsPDF } from '../printable_pdf/types'; import { getFullUrls } from './get_full_urls'; interface FullUrlsOpts { diff --git a/x-pack/plugins/reporting/server/export_types/common/execute_job/get_full_urls.ts b/x-pack/plugins/reporting/server/export_types/common/get_full_urls.ts similarity index 90% rename from x-pack/plugins/reporting/server/export_types/common/execute_job/get_full_urls.ts rename to x-pack/plugins/reporting/server/export_types/common/get_full_urls.ts index 67bc8d16fa758..d3362fd190680 100644 --- a/x-pack/plugins/reporting/server/export_types/common/execute_job/get_full_urls.ts +++ b/x-pack/plugins/reporting/server/export_types/common/get_full_urls.ts @@ -10,11 +10,11 @@ import { UrlWithParsedQuery, UrlWithStringQuery, } from 'url'; -import { ReportingConfig } from '../../..'; -import { getAbsoluteUrlFactory } from '../../../../common/get_absolute_url'; -import { validateUrls } from '../../../../common/validate_urls'; -import { ScheduledTaskParamsPNG } from '../../png/types'; -import { ScheduledTaskParamsPDF } from '../../printable_pdf/types'; +import { ReportingConfig } from '../../'; +import { ScheduledTaskParamsPNG } from '../png/types'; +import { ScheduledTaskParamsPDF } from '../printable_pdf/types'; +import { getAbsoluteUrlFactory } from './get_absolute_url'; +import { validateUrls } from './validate_urls'; function isPngJob( job: ScheduledTaskParamsPNG | ScheduledTaskParamsPDF diff --git a/x-pack/plugins/reporting/server/export_types/common/execute_job/index.ts b/x-pack/plugins/reporting/server/export_types/common/index.ts similarity index 91% rename from x-pack/plugins/reporting/server/export_types/common/execute_job/index.ts rename to x-pack/plugins/reporting/server/export_types/common/index.ts index b9d59b2be1296..a4e114d6b2f2e 100644 --- a/x-pack/plugins/reporting/server/export_types/common/execute_job/index.ts +++ b/x-pack/plugins/reporting/server/export_types/common/index.ts @@ -9,3 +9,4 @@ export { getConditionalHeaders } from './get_conditional_headers'; export { getCustomLogo } from './get_custom_logo'; export { getFullUrls } from './get_full_urls'; export { omitBlacklistedHeaders } from './omit_blacklisted_headers'; +export { validateUrls } from './validate_urls'; diff --git a/x-pack/plugins/reporting/server/export_types/common/execute_job/omit_blacklisted_headers.test.ts b/x-pack/plugins/reporting/server/export_types/common/omit_blacklisted_headers.test.ts similarity index 100% rename from x-pack/plugins/reporting/server/export_types/common/execute_job/omit_blacklisted_headers.test.ts rename to x-pack/plugins/reporting/server/export_types/common/omit_blacklisted_headers.test.ts diff --git a/x-pack/plugins/reporting/server/export_types/common/execute_job/omit_blacklisted_headers.ts b/x-pack/plugins/reporting/server/export_types/common/omit_blacklisted_headers.ts similarity index 95% rename from x-pack/plugins/reporting/server/export_types/common/execute_job/omit_blacklisted_headers.ts rename to x-pack/plugins/reporting/server/export_types/common/omit_blacklisted_headers.ts index 305fb6bab5478..e56ffc737764c 100644 --- a/x-pack/plugins/reporting/server/export_types/common/execute_job/omit_blacklisted_headers.ts +++ b/x-pack/plugins/reporting/server/export_types/common/omit_blacklisted_headers.ts @@ -7,7 +7,7 @@ import { omitBy } from 'lodash'; import { KBN_SCREENSHOT_HEADER_BLACKLIST, KBN_SCREENSHOT_HEADER_BLACKLIST_STARTS_WITH_PATTERN, -} from '../../../../common/constants'; +} from '../../../common/constants'; export const omitBlacklistedHeaders = ({ job, diff --git a/x-pack/plugins/reporting/common/validate_urls.test.ts b/x-pack/plugins/reporting/server/export_types/common/validate_urls.test.ts similarity index 100% rename from x-pack/plugins/reporting/common/validate_urls.test.ts rename to x-pack/plugins/reporting/server/export_types/common/validate_urls.test.ts diff --git a/x-pack/plugins/reporting/common/validate_urls.ts b/x-pack/plugins/reporting/server/export_types/common/validate_urls.ts similarity index 100% rename from x-pack/plugins/reporting/common/validate_urls.ts rename to x-pack/plugins/reporting/server/export_types/common/validate_urls.ts diff --git a/x-pack/plugins/reporting/server/export_types/csv/server/create_job.ts b/x-pack/plugins/reporting/server/export_types/csv/create_job.ts similarity index 90% rename from x-pack/plugins/reporting/server/export_types/csv/server/create_job.ts rename to x-pack/plugins/reporting/server/export_types/csv/create_job.ts index fb2d9bfdc5838..5e8ce923a79e0 100644 --- a/x-pack/plugins/reporting/server/export_types/csv/server/create_job.ts +++ b/x-pack/plugins/reporting/server/export_types/csv/create_job.ts @@ -4,9 +4,9 @@ * you may not use this file except in compliance with the Elastic License. */ -import { cryptoFactory } from '../../../lib'; -import { ESQueueCreateJobFn, ScheduleTaskFnFactory } from '../../../types'; -import { JobParamsDiscoverCsv } from '../types'; +import { cryptoFactory } from '../../lib'; +import { ESQueueCreateJobFn, ScheduleTaskFnFactory } from '../../types'; +import { JobParamsDiscoverCsv } from './types'; export const scheduleTaskFnFactory: ScheduleTaskFnFactory new Promise((resolve) => setTimeout(() => resolve(), ms)); diff --git a/x-pack/plugins/reporting/server/export_types/csv/server/execute_job.ts b/x-pack/plugins/reporting/server/export_types/csv/execute_job.ts similarity index 92% rename from x-pack/plugins/reporting/server/export_types/csv/server/execute_job.ts rename to x-pack/plugins/reporting/server/export_types/csv/execute_job.ts index b38cd8c5af9e7..f0c41a6a49703 100644 --- a/x-pack/plugins/reporting/server/export_types/csv/server/execute_job.ts +++ b/x-pack/plugins/reporting/server/export_types/csv/execute_job.ts @@ -7,11 +7,11 @@ import { Crypto } from '@elastic/node-crypto'; import { i18n } from '@kbn/i18n'; import Hapi from 'hapi'; -import { KibanaRequest } from '../../../../../../../src/core/server'; -import { CONTENT_TYPE_CSV, CSV_JOB_TYPE } from '../../../../common/constants'; -import { cryptoFactory, LevelLogger } from '../../../lib'; -import { ESQueueWorkerExecuteFn, RunTaskFnFactory } from '../../../types'; -import { ScheduledTaskParamsCSV } from '../types'; +import { KibanaRequest } from '../../../../../../src/core/server'; +import { CONTENT_TYPE_CSV, CSV_JOB_TYPE } from '../../../common/constants'; +import { cryptoFactory, LevelLogger } from '../../lib'; +import { ESQueueWorkerExecuteFn, RunTaskFnFactory } from '../../types'; +import { ScheduledTaskParamsCSV } from './types'; import { createGenerateCsv } from './generate_csv'; const getRequest = async (headers: string | undefined, crypto: Crypto, logger: LevelLogger) => { diff --git a/x-pack/plugins/reporting/server/export_types/csv/server/generate_csv/cell_has_formula.ts b/x-pack/plugins/reporting/server/export_types/csv/generate_csv/cell_has_formula.ts similarity index 85% rename from x-pack/plugins/reporting/server/export_types/csv/server/generate_csv/cell_has_formula.ts rename to x-pack/plugins/reporting/server/export_types/csv/generate_csv/cell_has_formula.ts index 659aef85ed593..1433d852ce630 100644 --- a/x-pack/plugins/reporting/server/export_types/csv/server/generate_csv/cell_has_formula.ts +++ b/x-pack/plugins/reporting/server/export_types/csv/generate_csv/cell_has_formula.ts @@ -5,7 +5,7 @@ */ import { startsWith } from 'lodash'; -import { CSV_FORMULA_CHARS } from '../../../../../common/constants'; +import { CSV_FORMULA_CHARS } from '../../../../common/constants'; export const cellHasFormulas = (val: string) => CSV_FORMULA_CHARS.some((formulaChar) => startsWith(val, formulaChar)); diff --git a/x-pack/plugins/reporting/server/export_types/csv/server/generate_csv/check_cells_for_formulas.test.ts b/x-pack/plugins/reporting/server/export_types/csv/generate_csv/check_cells_for_formulas.test.ts similarity index 100% rename from x-pack/plugins/reporting/server/export_types/csv/server/generate_csv/check_cells_for_formulas.test.ts rename to x-pack/plugins/reporting/server/export_types/csv/generate_csv/check_cells_for_formulas.test.ts diff --git a/x-pack/plugins/reporting/server/export_types/csv/server/generate_csv/check_cells_for_formulas.ts b/x-pack/plugins/reporting/server/export_types/csv/generate_csv/check_cells_for_formulas.ts similarity index 100% rename from x-pack/plugins/reporting/server/export_types/csv/server/generate_csv/check_cells_for_formulas.ts rename to x-pack/plugins/reporting/server/export_types/csv/generate_csv/check_cells_for_formulas.ts diff --git a/x-pack/plugins/reporting/server/export_types/csv/server/generate_csv/escape_value.test.ts b/x-pack/plugins/reporting/server/export_types/csv/generate_csv/escape_value.test.ts similarity index 100% rename from x-pack/plugins/reporting/server/export_types/csv/server/generate_csv/escape_value.test.ts rename to x-pack/plugins/reporting/server/export_types/csv/generate_csv/escape_value.test.ts diff --git a/x-pack/plugins/reporting/server/export_types/csv/server/generate_csv/escape_value.ts b/x-pack/plugins/reporting/server/export_types/csv/generate_csv/escape_value.ts similarity index 95% rename from x-pack/plugins/reporting/server/export_types/csv/server/generate_csv/escape_value.ts rename to x-pack/plugins/reporting/server/export_types/csv/generate_csv/escape_value.ts index 344091ee18268..c850d8b2dc741 100644 --- a/x-pack/plugins/reporting/server/export_types/csv/server/generate_csv/escape_value.ts +++ b/x-pack/plugins/reporting/server/export_types/csv/generate_csv/escape_value.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { RawValue } from '../../types'; +import { RawValue } from '../types'; import { cellHasFormulas } from './cell_has_formula'; const nonAlphaNumRE = /[^a-zA-Z0-9]/; diff --git a/x-pack/plugins/reporting/server/export_types/csv/server/generate_csv/field_format_map.test.ts b/x-pack/plugins/reporting/server/export_types/csv/generate_csv/field_format_map.test.ts similarity index 97% rename from x-pack/plugins/reporting/server/export_types/csv/server/generate_csv/field_format_map.test.ts rename to x-pack/plugins/reporting/server/export_types/csv/generate_csv/field_format_map.test.ts index 1f0e450da698f..4cb8de5810584 100644 --- a/x-pack/plugins/reporting/server/export_types/csv/server/generate_csv/field_format_map.test.ts +++ b/x-pack/plugins/reporting/server/export_types/csv/generate_csv/field_format_map.test.ts @@ -6,7 +6,7 @@ import expect from '@kbn/expect'; import { fieldFormats, FieldFormatsGetConfigFn, UI_SETTINGS } from 'src/plugins/data/server'; -import { IndexPatternSavedObject } from '../../types'; +import { IndexPatternSavedObject } from '../types'; import { fieldFormatMapFactory } from './field_format_map'; type ConfigValue = { number: { id: string; params: {} } } | string; diff --git a/x-pack/plugins/reporting/server/export_types/csv/server/generate_csv/field_format_map.ts b/x-pack/plugins/reporting/server/export_types/csv/generate_csv/field_format_map.ts similarity index 97% rename from x-pack/plugins/reporting/server/export_types/csv/server/generate_csv/field_format_map.ts rename to x-pack/plugins/reporting/server/export_types/csv/generate_csv/field_format_map.ts index 848cf569bc8d7..e01fee530fc65 100644 --- a/x-pack/plugins/reporting/server/export_types/csv/server/generate_csv/field_format_map.ts +++ b/x-pack/plugins/reporting/server/export_types/csv/generate_csv/field_format_map.ts @@ -7,7 +7,7 @@ import _ from 'lodash'; import { FieldFormat } from 'src/plugins/data/common'; import { FieldFormatConfig, IFieldFormatsRegistry } from 'src/plugins/data/server'; -import { IndexPatternSavedObject } from '../../types'; +import { IndexPatternSavedObject } from '../types'; /** * Create a map of FieldFormat instances for index pattern fields diff --git a/x-pack/plugins/reporting/server/export_types/csv/server/generate_csv/flatten_hit.test.ts b/x-pack/plugins/reporting/server/export_types/csv/generate_csv/flatten_hit.test.ts similarity index 100% rename from x-pack/plugins/reporting/server/export_types/csv/server/generate_csv/flatten_hit.test.ts rename to x-pack/plugins/reporting/server/export_types/csv/generate_csv/flatten_hit.test.ts diff --git a/x-pack/plugins/reporting/server/export_types/csv/server/generate_csv/flatten_hit.ts b/x-pack/plugins/reporting/server/export_types/csv/generate_csv/flatten_hit.ts similarity index 100% rename from x-pack/plugins/reporting/server/export_types/csv/server/generate_csv/flatten_hit.ts rename to x-pack/plugins/reporting/server/export_types/csv/generate_csv/flatten_hit.ts diff --git a/x-pack/plugins/reporting/server/export_types/csv/server/generate_csv/format_csv_values.test.ts b/x-pack/plugins/reporting/server/export_types/csv/generate_csv/format_csv_values.test.ts similarity index 100% rename from x-pack/plugins/reporting/server/export_types/csv/server/generate_csv/format_csv_values.test.ts rename to x-pack/plugins/reporting/server/export_types/csv/generate_csv/format_csv_values.test.ts diff --git a/x-pack/plugins/reporting/server/export_types/csv/server/generate_csv/format_csv_values.ts b/x-pack/plugins/reporting/server/export_types/csv/generate_csv/format_csv_values.ts similarity index 97% rename from x-pack/plugins/reporting/server/export_types/csv/server/generate_csv/format_csv_values.ts rename to x-pack/plugins/reporting/server/export_types/csv/generate_csv/format_csv_values.ts index 387066415a1bc..d0294072112bf 100644 --- a/x-pack/plugins/reporting/server/export_types/csv/server/generate_csv/format_csv_values.ts +++ b/x-pack/plugins/reporting/server/export_types/csv/generate_csv/format_csv_values.ts @@ -6,7 +6,7 @@ import { isNull, isObject, isUndefined } from 'lodash'; import { FieldFormat } from 'src/plugins/data/common'; -import { RawValue } from '../../types'; +import { RawValue } from '../types'; export function createFormatCsvValues( escapeValue: (value: RawValue, index: number, array: RawValue[]) => string, diff --git a/x-pack/plugins/reporting/server/export_types/csv/server/generate_csv/get_ui_settings.ts b/x-pack/plugins/reporting/server/export_types/csv/generate_csv/get_ui_settings.ts similarity index 94% rename from x-pack/plugins/reporting/server/export_types/csv/server/generate_csv/get_ui_settings.ts rename to x-pack/plugins/reporting/server/export_types/csv/generate_csv/get_ui_settings.ts index 8f72c467b0711..915d5010a4885 100644 --- a/x-pack/plugins/reporting/server/export_types/csv/server/generate_csv/get_ui_settings.ts +++ b/x-pack/plugins/reporting/server/export_types/csv/generate_csv/get_ui_settings.ts @@ -6,8 +6,8 @@ import { i18n } from '@kbn/i18n'; import { IUiSettingsClient } from 'kibana/server'; -import { ReportingConfig } from '../../../..'; -import { LevelLogger } from '../../../../lib'; +import { ReportingConfig } from '../../../'; +import { LevelLogger } from '../../../lib'; export const getUiSettings = async ( timezone: string | undefined, diff --git a/x-pack/plugins/reporting/server/export_types/csv/server/generate_csv/hit_iterator.test.ts b/x-pack/plugins/reporting/server/export_types/csv/generate_csv/hit_iterator.test.ts similarity index 96% rename from x-pack/plugins/reporting/server/export_types/csv/server/generate_csv/hit_iterator.test.ts rename to x-pack/plugins/reporting/server/export_types/csv/generate_csv/hit_iterator.test.ts index 479879e3c8b01..831bf45cf72ea 100644 --- a/x-pack/plugins/reporting/server/export_types/csv/server/generate_csv/hit_iterator.test.ts +++ b/x-pack/plugins/reporting/server/export_types/csv/generate_csv/hit_iterator.test.ts @@ -6,9 +6,9 @@ import expect from '@kbn/expect'; import sinon from 'sinon'; -import { CancellationToken } from '../../../../../common'; -import { LevelLogger } from '../../../../lib'; -import { ScrollConfig } from '../../../../types'; +import { CancellationToken } from '../../../../common'; +import { LevelLogger } from '../../../lib'; +import { ScrollConfig } from '../../../types'; import { createHitIterator } from './hit_iterator'; const mockLogger = { diff --git a/x-pack/plugins/reporting/server/export_types/csv/server/generate_csv/hit_iterator.ts b/x-pack/plugins/reporting/server/export_types/csv/generate_csv/hit_iterator.ts similarity index 95% rename from x-pack/plugins/reporting/server/export_types/csv/server/generate_csv/hit_iterator.ts rename to x-pack/plugins/reporting/server/export_types/csv/generate_csv/hit_iterator.ts index b877023064ac6..dee653cf30007 100644 --- a/x-pack/plugins/reporting/server/export_types/csv/server/generate_csv/hit_iterator.ts +++ b/x-pack/plugins/reporting/server/export_types/csv/generate_csv/hit_iterator.ts @@ -6,9 +6,9 @@ import { i18n } from '@kbn/i18n'; import { SearchParams, SearchResponse } from 'elasticsearch'; -import { CancellationToken } from '../../../../../common'; -import { LevelLogger } from '../../../../lib'; -import { ScrollConfig } from '../../../../types'; +import { CancellationToken } from '../../../../common'; +import { LevelLogger } from '../../../lib'; +import { ScrollConfig } from '../../../types'; export type EndpointCaller = (method: string, params: object) => Promise>; diff --git a/x-pack/plugins/reporting/server/export_types/csv/server/generate_csv/index.ts b/x-pack/plugins/reporting/server/export_types/csv/generate_csv/index.ts similarity index 93% rename from x-pack/plugins/reporting/server/export_types/csv/server/generate_csv/index.ts rename to x-pack/plugins/reporting/server/export_types/csv/generate_csv/index.ts index 2cb10e291619c..8da27100ac31c 100644 --- a/x-pack/plugins/reporting/server/export_types/csv/server/generate_csv/index.ts +++ b/x-pack/plugins/reporting/server/export_types/csv/generate_csv/index.ts @@ -6,12 +6,12 @@ import { i18n } from '@kbn/i18n'; import { IUiSettingsClient } from 'src/core/server'; -import { getFieldFormats } from '../../../../services'; -import { ReportingConfig } from '../../../..'; -import { CancellationToken } from '../../../../../../../plugins/reporting/common'; -import { CSV_BOM_CHARS } from '../../../../../common/constants'; -import { LevelLogger } from '../../../../lib'; -import { IndexPatternSavedObject, SavedSearchGeneratorResult } from '../../types'; +import { getFieldFormats } from '../../../services'; +import { ReportingConfig } from '../../../'; +import { CancellationToken } from '../../../../../../plugins/reporting/common'; +import { CSV_BOM_CHARS } from '../../../../common/constants'; +import { LevelLogger } from '../../../lib'; +import { IndexPatternSavedObject, SavedSearchGeneratorResult } from '../types'; import { checkIfRowsHaveFormulas } from './check_cells_for_formulas'; import { createEscapeValue } from './escape_value'; import { fieldFormatMapFactory } from './field_format_map'; diff --git a/x-pack/plugins/reporting/server/export_types/csv/server/generate_csv/max_size_string_builder.test.ts b/x-pack/plugins/reporting/server/export_types/csv/generate_csv/max_size_string_builder.test.ts similarity index 100% rename from x-pack/plugins/reporting/server/export_types/csv/server/generate_csv/max_size_string_builder.test.ts rename to x-pack/plugins/reporting/server/export_types/csv/generate_csv/max_size_string_builder.test.ts diff --git a/x-pack/plugins/reporting/server/export_types/csv/server/generate_csv/max_size_string_builder.ts b/x-pack/plugins/reporting/server/export_types/csv/generate_csv/max_size_string_builder.ts similarity index 100% rename from x-pack/plugins/reporting/server/export_types/csv/server/generate_csv/max_size_string_builder.ts rename to x-pack/plugins/reporting/server/export_types/csv/generate_csv/max_size_string_builder.ts diff --git a/x-pack/plugins/reporting/server/export_types/csv/index.ts b/x-pack/plugins/reporting/server/export_types/csv/index.ts index b5eacdfc62c8b..dffc874831dc2 100644 --- a/x-pack/plugins/reporting/server/export_types/csv/index.ts +++ b/x-pack/plugins/reporting/server/export_types/csv/index.ts @@ -15,8 +15,8 @@ import { import { CSV_JOB_TYPE as jobType } from '../../../constants'; import { ESQueueCreateJobFn, ESQueueWorkerExecuteFn, ExportTypeDefinition } from '../../types'; import { metadata } from './metadata'; -import { scheduleTaskFnFactory } from './server/create_job'; -import { runTaskFnFactory } from './server/execute_job'; +import { scheduleTaskFnFactory } from './create_job'; +import { runTaskFnFactory } from './execute_job'; import { JobParamsDiscoverCsv, ScheduledTaskParamsCSV } from './types'; export const getExportType = (): ExportTypeDefinition< diff --git a/x-pack/plugins/reporting/server/export_types/csv/server/lib/get_request.ts b/x-pack/plugins/reporting/server/export_types/csv/lib/get_request.ts similarity index 93% rename from x-pack/plugins/reporting/server/export_types/csv/server/lib/get_request.ts rename to x-pack/plugins/reporting/server/export_types/csv/lib/get_request.ts index 21e49bd62ccc7..09e6becc2baec 100644 --- a/x-pack/plugins/reporting/server/export_types/csv/server/lib/get_request.ts +++ b/x-pack/plugins/reporting/server/export_types/csv/lib/get_request.ts @@ -7,8 +7,8 @@ import { Crypto } from '@elastic/node-crypto'; import { i18n } from '@kbn/i18n'; import Hapi from 'hapi'; -import { KibanaRequest } from '../../../../../../../../src/core/server'; -import { LevelLogger } from '../../../../lib'; +import { KibanaRequest } from '../../../../../../../src/core/server'; +import { LevelLogger } from '../../../lib'; export const getRequest = async ( headers: string | undefined, diff --git a/x-pack/plugins/reporting/server/export_types/csv_from_savedobject/server/create_job.ts b/x-pack/plugins/reporting/server/export_types/csv_from_savedobject/create_job.ts similarity index 94% rename from x-pack/plugins/reporting/server/export_types/csv_from_savedobject/server/create_job.ts rename to x-pack/plugins/reporting/server/export_types/csv_from_savedobject/create_job.ts index 96fb2033f0954..e7fb0c6e2cb99 100644 --- a/x-pack/plugins/reporting/server/export_types/csv_from_savedobject/server/create_job.ts +++ b/x-pack/plugins/reporting/server/export_types/csv_from_savedobject/create_job.ts @@ -7,9 +7,9 @@ import { notFound, notImplemented } from 'boom'; import { get } from 'lodash'; import { KibanaRequest, RequestHandlerContext } from 'src/core/server'; -import { CSV_FROM_SAVEDOBJECT_JOB_TYPE } from '../../../../common/constants'; -import { cryptoFactory } from '../../../lib'; -import { ScheduleTaskFnFactory, TimeRangeParams } from '../../../types'; +import { CSV_FROM_SAVEDOBJECT_JOB_TYPE } from '../../../common/constants'; +import { cryptoFactory } from '../../lib'; +import { ScheduleTaskFnFactory, TimeRangeParams } from '../../types'; import { JobParamsPanelCsv, SavedObject, @@ -18,7 +18,7 @@ import { SavedSearchObjectAttributesJSON, SearchPanel, VisObjectAttributesJSON, -} from '../types'; +} from './types'; export type ImmediateCreateJobFn = ( jobParams: JobParamsPanelCsv, diff --git a/x-pack/plugins/reporting/server/export_types/csv_from_savedobject/server/execute_job.ts b/x-pack/plugins/reporting/server/export_types/csv_from_savedobject/execute_job.ts similarity index 93% rename from x-pack/plugins/reporting/server/export_types/csv_from_savedobject/server/execute_job.ts rename to x-pack/plugins/reporting/server/export_types/csv_from_savedobject/execute_job.ts index a7992c34a88f1..ffe453f996698 100644 --- a/x-pack/plugins/reporting/server/export_types/csv_from_savedobject/server/execute_job.ts +++ b/x-pack/plugins/reporting/server/export_types/csv_from_savedobject/execute_job.ts @@ -5,11 +5,11 @@ */ import { KibanaRequest, RequestHandlerContext } from 'src/core/server'; -import { CancellationToken } from '../../../../common'; -import { CONTENT_TYPE_CSV, CSV_FROM_SAVEDOBJECT_JOB_TYPE } from '../../../../common/constants'; -import { RunTaskFnFactory, ScheduledTaskParams, TaskRunResult } from '../../../types'; -import { createGenerateCsv } from '../../csv/server/generate_csv'; -import { JobParamsPanelCsv, SearchPanel } from '../types'; +import { CancellationToken } from '../../../common'; +import { CONTENT_TYPE_CSV, CSV_FROM_SAVEDOBJECT_JOB_TYPE } from '../../../common/constants'; +import { RunTaskFnFactory, ScheduledTaskParams, TaskRunResult } from '../../types'; +import { createGenerateCsv } from '../csv/generate_csv'; +import { JobParamsPanelCsv, SearchPanel } from './types'; import { getFakeRequest } from './lib/get_fake_request'; import { getGenerateCsvParams } from './lib/get_csv_job'; diff --git a/x-pack/plugins/reporting/server/export_types/csv_from_savedobject/index.ts b/x-pack/plugins/reporting/server/export_types/csv_from_savedobject/index.ts index 9a9f445de0b13..7467f415299fa 100644 --- a/x-pack/plugins/reporting/server/export_types/csv_from_savedobject/index.ts +++ b/x-pack/plugins/reporting/server/export_types/csv_from_savedobject/index.ts @@ -15,16 +15,16 @@ import { import { CSV_FROM_SAVEDOBJECT_JOB_TYPE } from '../../../constants'; import { ExportTypeDefinition } from '../../types'; import { metadata } from './metadata'; -import { ImmediateCreateJobFn, scheduleTaskFnFactory } from './server/create_job'; -import { ImmediateExecuteFn, runTaskFnFactory } from './server/execute_job'; +import { ImmediateCreateJobFn, scheduleTaskFnFactory } from './create_job'; +import { ImmediateExecuteFn, runTaskFnFactory } from './execute_job'; import { JobParamsPanelCsv } from './types'; /* * These functions are exported to share with the API route handler that * generates csv from saved object immediately on request. */ -export { scheduleTaskFnFactory } from './server/create_job'; -export { runTaskFnFactory } from './server/execute_job'; +export { scheduleTaskFnFactory } from './create_job'; +export { runTaskFnFactory } from './execute_job'; export const getExportType = (): ExportTypeDefinition< JobParamsPanelCsv, diff --git a/x-pack/plugins/reporting/server/export_types/csv_from_savedobject/server/lib/get_csv_job.test.ts b/x-pack/plugins/reporting/server/export_types/csv_from_savedobject/lib/get_csv_job.test.ts similarity index 99% rename from x-pack/plugins/reporting/server/export_types/csv_from_savedobject/server/lib/get_csv_job.test.ts rename to x-pack/plugins/reporting/server/export_types/csv_from_savedobject/lib/get_csv_job.test.ts index 3271c6fdae24d..9646d7eecd5b5 100644 --- a/x-pack/plugins/reporting/server/export_types/csv_from_savedobject/server/lib/get_csv_job.test.ts +++ b/x-pack/plugins/reporting/server/export_types/csv_from_savedobject/lib/get_csv_job.test.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { JobParamsPanelCsv, SearchPanel } from '../../types'; +import { JobParamsPanelCsv, SearchPanel } from '../types'; import { getGenerateCsvParams } from './get_csv_job'; describe('Get CSV Job', () => { diff --git a/x-pack/plugins/reporting/server/export_types/csv_from_savedobject/server/lib/get_csv_job.ts b/x-pack/plugins/reporting/server/export_types/csv_from_savedobject/lib/get_csv_job.ts similarity index 96% rename from x-pack/plugins/reporting/server/export_types/csv_from_savedobject/server/lib/get_csv_job.ts rename to x-pack/plugins/reporting/server/export_types/csv_from_savedobject/lib/get_csv_job.ts index 5f1954b80e1bc..0fc29c5b208d9 100644 --- a/x-pack/plugins/reporting/server/export_types/csv_from_savedobject/server/lib/get_csv_job.ts +++ b/x-pack/plugins/reporting/server/export_types/csv_from_savedobject/lib/get_csv_job.ts @@ -11,7 +11,7 @@ import { Filter, IIndexPattern, Query, -} from '../../../../../../../../src/plugins/data/server'; +} from '../../../../../../../src/plugins/data/server'; import { DocValueFields, IndexPatternField, @@ -20,10 +20,10 @@ import { SavedSearchObjectAttributes, SearchPanel, SearchSource, -} from '../../types'; +} from '../types'; import { getDataSource } from './get_data_source'; import { getFilters } from './get_filters'; -import { GenerateCsvParams } from '../../../csv/server/generate_csv'; +import { GenerateCsvParams } from '../../csv/generate_csv'; export const getEsQueryConfig = async (config: IUiSettingsClient) => { const configs = await Promise.all([ diff --git a/x-pack/plugins/reporting/server/export_types/csv_from_savedobject/server/lib/get_data_source.ts b/x-pack/plugins/reporting/server/export_types/csv_from_savedobject/lib/get_data_source.ts similarity index 95% rename from x-pack/plugins/reporting/server/export_types/csv_from_savedobject/server/lib/get_data_source.ts rename to x-pack/plugins/reporting/server/export_types/csv_from_savedobject/lib/get_data_source.ts index bf915696c8974..e3631b9c89724 100644 --- a/x-pack/plugins/reporting/server/export_types/csv_from_savedobject/server/lib/get_data_source.ts +++ b/x-pack/plugins/reporting/server/export_types/csv_from_savedobject/lib/get_data_source.ts @@ -4,8 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ -import { IndexPatternSavedObject } from '../../../csv/types'; -import { SavedObjectReference, SavedSearchObjectAttributesJSON, SearchSource } from '../../types'; +import { IndexPatternSavedObject } from '../../csv/types'; +import { SavedObjectReference, SavedSearchObjectAttributesJSON, SearchSource } from '../types'; export async function getDataSource( savedObjectsClient: any, diff --git a/x-pack/plugins/reporting/server/export_types/csv_from_savedobject/server/lib/get_fake_request.ts b/x-pack/plugins/reporting/server/export_types/csv_from_savedobject/lib/get_fake_request.ts similarity index 90% rename from x-pack/plugins/reporting/server/export_types/csv_from_savedobject/server/lib/get_fake_request.ts rename to x-pack/plugins/reporting/server/export_types/csv_from_savedobject/lib/get_fake_request.ts index 09c58806de120..3afbaa650e6c8 100644 --- a/x-pack/plugins/reporting/server/export_types/csv_from_savedobject/server/lib/get_fake_request.ts +++ b/x-pack/plugins/reporting/server/export_types/csv_from_savedobject/lib/get_fake_request.ts @@ -6,9 +6,9 @@ import { i18n } from '@kbn/i18n'; import { KibanaRequest } from 'kibana/server'; -import { cryptoFactory, LevelLogger } from '../../../../lib'; -import { ScheduledTaskParams } from '../../../../types'; -import { JobParamsPanelCsv } from '../../types'; +import { cryptoFactory, LevelLogger } from '../../../lib'; +import { ScheduledTaskParams } from '../../../types'; +import { JobParamsPanelCsv } from '../types'; export const getFakeRequest = async ( job: ScheduledTaskParams, diff --git a/x-pack/plugins/reporting/server/export_types/csv_from_savedobject/server/lib/get_filters.test.ts b/x-pack/plugins/reporting/server/export_types/csv_from_savedobject/lib/get_filters.test.ts similarity index 98% rename from x-pack/plugins/reporting/server/export_types/csv_from_savedobject/server/lib/get_filters.test.ts rename to x-pack/plugins/reporting/server/export_types/csv_from_savedobject/lib/get_filters.test.ts index b5d564d93d0d6..429b2c518cf14 100644 --- a/x-pack/plugins/reporting/server/export_types/csv_from_savedobject/server/lib/get_filters.test.ts +++ b/x-pack/plugins/reporting/server/export_types/csv_from_savedobject/lib/get_filters.test.ts @@ -4,8 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ -import { TimeRangeParams } from '../../../../types'; -import { QueryFilter, SavedSearchObjectAttributes, SearchSourceFilter } from '../../types'; +import { TimeRangeParams } from '../../../types'; +import { QueryFilter, SavedSearchObjectAttributes, SearchSourceFilter } from '../types'; import { getFilters } from './get_filters'; interface Args { diff --git a/x-pack/plugins/reporting/server/export_types/csv_from_savedobject/server/lib/get_filters.ts b/x-pack/plugins/reporting/server/export_types/csv_from_savedobject/lib/get_filters.ts similarity index 95% rename from x-pack/plugins/reporting/server/export_types/csv_from_savedobject/server/lib/get_filters.ts rename to x-pack/plugins/reporting/server/export_types/csv_from_savedobject/lib/get_filters.ts index 1258b03d3051b..a1b04cca0419d 100644 --- a/x-pack/plugins/reporting/server/export_types/csv_from_savedobject/server/lib/get_filters.ts +++ b/x-pack/plugins/reporting/server/export_types/csv_from_savedobject/lib/get_filters.ts @@ -6,8 +6,8 @@ import { badRequest } from 'boom'; import moment from 'moment-timezone'; -import { TimeRangeParams } from '../../../../types'; -import { Filter, QueryFilter, SavedSearchObjectAttributes, SearchSourceFilter } from '../../types'; +import { TimeRangeParams } from '../../../types'; +import { Filter, QueryFilter, SavedSearchObjectAttributes, SearchSourceFilter } from '../types'; export function getFilters( indexPatternId: string, diff --git a/x-pack/plugins/reporting/server/export_types/png/server/create_job/index.ts b/x-pack/plugins/reporting/server/export_types/png/create_job/index.ts similarity index 85% rename from x-pack/plugins/reporting/server/export_types/png/server/create_job/index.ts rename to x-pack/plugins/reporting/server/export_types/png/create_job/index.ts index f459b8f249c70..b63f2a09041b3 100644 --- a/x-pack/plugins/reporting/server/export_types/png/server/create_job/index.ts +++ b/x-pack/plugins/reporting/server/export_types/png/create_job/index.ts @@ -4,10 +4,10 @@ * you may not use this file except in compliance with the Elastic License. */ -import { validateUrls } from '../../../../../common/validate_urls'; -import { cryptoFactory } from '../../../../lib'; -import { ESQueueCreateJobFn, ScheduleTaskFnFactory } from '../../../../types'; -import { JobParamsPNG } from '../../types'; +import { cryptoFactory } from '../../../lib'; +import { ESQueueCreateJobFn, ScheduleTaskFnFactory } from '../../../types'; +import { validateUrls } from '../../common'; +import { JobParamsPNG } from '../types'; export const scheduleTaskFnFactory: ScheduleTaskFnFactory>; diff --git a/x-pack/plugins/reporting/server/export_types/png/index.ts b/x-pack/plugins/reporting/server/export_types/png/index.ts index b708448b0f8b2..25b4dbd60535b 100644 --- a/x-pack/plugins/reporting/server/export_types/png/index.ts +++ b/x-pack/plugins/reporting/server/export_types/png/index.ts @@ -12,10 +12,10 @@ import { LICENSE_TYPE_TRIAL, PNG_JOB_TYPE as jobType, } from '../../../common/constants'; -import { ESQueueCreateJobFn, ESQueueWorkerExecuteFn, ExportTypeDefinition } from '../..//types'; +import { ESQueueCreateJobFn, ESQueueWorkerExecuteFn, ExportTypeDefinition } from '../../types'; import { metadata } from './metadata'; -import { scheduleTaskFnFactory } from './server/create_job'; -import { runTaskFnFactory } from './server/execute_job'; +import { scheduleTaskFnFactory } from './create_job'; +import { runTaskFnFactory } from './execute_job'; import { JobParamsPNG, ScheduledTaskParamsPNG } from './types'; export const getExportType = (): ExportTypeDefinition< diff --git a/x-pack/plugins/reporting/server/export_types/png/server/lib/generate_png.ts b/x-pack/plugins/reporting/server/export_types/png/lib/generate_png.ts similarity index 89% rename from x-pack/plugins/reporting/server/export_types/png/server/lib/generate_png.ts rename to x-pack/plugins/reporting/server/export_types/png/lib/generate_png.ts index d7e9d0f812b37..5969b5b8abc00 100644 --- a/x-pack/plugins/reporting/server/export_types/png/server/lib/generate_png.ts +++ b/x-pack/plugins/reporting/server/export_types/png/lib/generate_png.ts @@ -7,11 +7,10 @@ import apm from 'elastic-apm-node'; import * as Rx from 'rxjs'; import { map } from 'rxjs/operators'; -import { ReportingCore } from '../../../../'; -import { LevelLogger } from '../../../../lib'; -import { ConditionalHeaders, ScreenshotResults } from '../../../../types'; -import { LayoutParams } from '../../../common/layouts'; -import { PreserveLayout } from '../../../common/layouts/preserve_layout'; +import { ReportingCore } from '../../../'; +import { LevelLogger } from '../../../lib'; +import { LayoutParams, PreserveLayout } from '../../../lib/layouts'; +import { ConditionalHeaders, ScreenshotResults } from '../../../types'; export async function generatePngObservableFactory(reporting: ReportingCore) { const getScreenshots = await reporting.getScreenshotsObservable(); diff --git a/x-pack/plugins/reporting/server/export_types/png/types.d.ts b/x-pack/plugins/reporting/server/export_types/png/types.d.ts index 7a25f4ed8fe73..4c40f55f0f0d6 100644 --- a/x-pack/plugins/reporting/server/export_types/png/types.d.ts +++ b/x-pack/plugins/reporting/server/export_types/png/types.d.ts @@ -5,7 +5,7 @@ */ import { ScheduledTaskParams } from '../../../server/types'; -import { LayoutInstance, LayoutParams } from '../common/layouts'; +import { LayoutInstance, LayoutParams } from '../../lib/layouts'; // Job params: structure of incoming user request data export interface JobParamsPNG { diff --git a/x-pack/plugins/reporting/server/export_types/printable_pdf/server/create_job/index.ts b/x-pack/plugins/reporting/server/export_types/printable_pdf/create_job/index.ts similarity index 86% rename from x-pack/plugins/reporting/server/export_types/printable_pdf/server/create_job/index.ts rename to x-pack/plugins/reporting/server/export_types/printable_pdf/create_job/index.ts index 76c5718249720..aa88ef863d32b 100644 --- a/x-pack/plugins/reporting/server/export_types/printable_pdf/server/create_job/index.ts +++ b/x-pack/plugins/reporting/server/export_types/printable_pdf/create_job/index.ts @@ -4,10 +4,10 @@ * you may not use this file except in compliance with the Elastic License. */ -import { validateUrls } from '../../../../../common/validate_urls'; -import { cryptoFactory } from '../../../../lib'; -import { ESQueueCreateJobFn, ScheduleTaskFnFactory } from '../../../../types'; -import { JobParamsPDF } from '../../types'; +import { validateUrls } from '../../common'; +import { cryptoFactory } from '../../../lib'; +import { ESQueueCreateJobFn, ScheduleTaskFnFactory } from '../../../types'; +import { JobParamsPDF } from '../types'; export const scheduleTaskFnFactory: ScheduleTaskFnFactory ({ generatePdfObservableFactory: jest.fn() })); import * as Rx from 'rxjs'; -import { ReportingCore } from '../../../../'; -import { CancellationToken } from '../../../../../common'; -import { cryptoFactory, LevelLogger } from '../../../../lib'; -import { createMockReportingCore } from '../../../../test_helpers'; -import { ScheduledTaskParamsPDF } from '../../types'; +import { ReportingCore } from '../../../'; +import { CancellationToken } from '../../../../common'; +import { cryptoFactory, LevelLogger } from '../../../lib'; +import { createMockReportingCore } from '../../../test_helpers'; import { generatePdfObservableFactory } from '../lib/generate_pdf'; +import { ScheduledTaskParamsPDF } from '../types'; import { runTaskFnFactory } from './'; let mockReporting: ReportingCore; diff --git a/x-pack/plugins/reporting/server/export_types/printable_pdf/server/execute_job/index.ts b/x-pack/plugins/reporting/server/export_types/printable_pdf/execute_job/index.ts similarity index 94% rename from x-pack/plugins/reporting/server/export_types/printable_pdf/server/execute_job/index.ts rename to x-pack/plugins/reporting/server/export_types/printable_pdf/execute_job/index.ts index 7f8f2f4f6906a..eb15c0a71ca3f 100644 --- a/x-pack/plugins/reporting/server/export_types/printable_pdf/server/execute_job/index.ts +++ b/x-pack/plugins/reporting/server/export_types/printable_pdf/execute_job/index.ts @@ -7,17 +7,17 @@ import apm from 'elastic-apm-node'; import * as Rx from 'rxjs'; import { catchError, map, mergeMap, takeUntil } from 'rxjs/operators'; -import { PDF_JOB_TYPE } from '../../../../../common/constants'; -import { ESQueueWorkerExecuteFn, RunTaskFnFactory, TaskRunResult } from '../../../../types'; +import { PDF_JOB_TYPE } from '../../../../common/constants'; +import { ESQueueWorkerExecuteFn, RunTaskFnFactory, TaskRunResult } from '../../../types'; import { decryptJobHeaders, getConditionalHeaders, getCustomLogo, getFullUrls, omitBlacklistedHeaders, -} from '../../../common/execute_job'; -import { ScheduledTaskParamsPDF } from '../../types'; +} from '../../common'; import { generatePdfObservableFactory } from '../lib/generate_pdf'; +import { ScheduledTaskParamsPDF } from '../types'; type QueuedPdfExecutorFactory = RunTaskFnFactory>; diff --git a/x-pack/plugins/reporting/server/export_types/printable_pdf/index.ts b/x-pack/plugins/reporting/server/export_types/printable_pdf/index.ts index 073bd38b538fb..e5115c243c697 100644 --- a/x-pack/plugins/reporting/server/export_types/printable_pdf/index.ts +++ b/x-pack/plugins/reporting/server/export_types/printable_pdf/index.ts @@ -14,8 +14,8 @@ import { } from '../../../common/constants'; import { ESQueueCreateJobFn, ESQueueWorkerExecuteFn, ExportTypeDefinition } from '../../types'; import { metadata } from './metadata'; -import { scheduleTaskFnFactory } from './server/create_job'; -import { runTaskFnFactory } from './server/execute_job'; +import { scheduleTaskFnFactory } from './create_job'; +import { runTaskFnFactory } from './execute_job'; import { JobParamsPDF, ScheduledTaskParamsPDF } from './types'; export const getExportType = (): ExportTypeDefinition< diff --git a/x-pack/plugins/reporting/server/export_types/printable_pdf/server/lib/generate_pdf.ts b/x-pack/plugins/reporting/server/export_types/printable_pdf/lib/generate_pdf.ts similarity index 96% rename from x-pack/plugins/reporting/server/export_types/printable_pdf/server/lib/generate_pdf.ts rename to x-pack/plugins/reporting/server/export_types/printable_pdf/lib/generate_pdf.ts index 366949a033757..f2ce423566c46 100644 --- a/x-pack/plugins/reporting/server/export_types/printable_pdf/server/lib/generate_pdf.ts +++ b/x-pack/plugins/reporting/server/export_types/printable_pdf/lib/generate_pdf.ts @@ -7,10 +7,10 @@ import { groupBy } from 'lodash'; import * as Rx from 'rxjs'; import { mergeMap } from 'rxjs/operators'; -import { ReportingCore } from '../../../../'; -import { LevelLogger } from '../../../../lib'; -import { ConditionalHeaders, ScreenshotResults } from '../../../../types'; -import { createLayout, LayoutInstance, LayoutParams } from '../../../common/layouts'; +import { ReportingCore } from '../../../'; +import { LevelLogger } from '../../../lib'; +import { createLayout, LayoutInstance, LayoutParams } from '../../../lib/layouts'; +import { ConditionalHeaders, ScreenshotResults } from '../../../types'; // @ts-ignore untyped module import { pdf } from './pdf'; import { getTracker } from './tracker'; diff --git a/x-pack/plugins/reporting/server/export_types/printable_pdf/server/lib/pdf/assets/fonts/noto/LICENSE_OFL.txt b/x-pack/plugins/reporting/server/export_types/printable_pdf/lib/pdf/assets/fonts/noto/LICENSE_OFL.txt similarity index 100% rename from x-pack/plugins/reporting/server/export_types/printable_pdf/server/lib/pdf/assets/fonts/noto/LICENSE_OFL.txt rename to x-pack/plugins/reporting/server/export_types/printable_pdf/lib/pdf/assets/fonts/noto/LICENSE_OFL.txt diff --git a/x-pack/plugins/reporting/server/export_types/printable_pdf/server/lib/pdf/assets/fonts/noto/NotoSansCJKtc-Medium.ttf b/x-pack/plugins/reporting/server/export_types/printable_pdf/lib/pdf/assets/fonts/noto/NotoSansCJKtc-Medium.ttf similarity index 100% rename from x-pack/plugins/reporting/server/export_types/printable_pdf/server/lib/pdf/assets/fonts/noto/NotoSansCJKtc-Medium.ttf rename to x-pack/plugins/reporting/server/export_types/printable_pdf/lib/pdf/assets/fonts/noto/NotoSansCJKtc-Medium.ttf diff --git a/x-pack/plugins/reporting/server/export_types/printable_pdf/server/lib/pdf/assets/fonts/noto/NotoSansCJKtc-Regular.ttf b/x-pack/plugins/reporting/server/export_types/printable_pdf/lib/pdf/assets/fonts/noto/NotoSansCJKtc-Regular.ttf similarity index 100% rename from x-pack/plugins/reporting/server/export_types/printable_pdf/server/lib/pdf/assets/fonts/noto/NotoSansCJKtc-Regular.ttf rename to x-pack/plugins/reporting/server/export_types/printable_pdf/lib/pdf/assets/fonts/noto/NotoSansCJKtc-Regular.ttf diff --git a/x-pack/plugins/reporting/server/export_types/printable_pdf/server/lib/pdf/assets/fonts/noto/index.js b/x-pack/plugins/reporting/server/export_types/printable_pdf/lib/pdf/assets/fonts/noto/index.js similarity index 100% rename from x-pack/plugins/reporting/server/export_types/printable_pdf/server/lib/pdf/assets/fonts/noto/index.js rename to x-pack/plugins/reporting/server/export_types/printable_pdf/lib/pdf/assets/fonts/noto/index.js diff --git a/x-pack/plugins/reporting/server/export_types/printable_pdf/server/lib/pdf/assets/fonts/roboto/LICENSE.txt b/x-pack/plugins/reporting/server/export_types/printable_pdf/lib/pdf/assets/fonts/roboto/LICENSE.txt similarity index 100% rename from x-pack/plugins/reporting/server/export_types/printable_pdf/server/lib/pdf/assets/fonts/roboto/LICENSE.txt rename to x-pack/plugins/reporting/server/export_types/printable_pdf/lib/pdf/assets/fonts/roboto/LICENSE.txt diff --git a/x-pack/plugins/reporting/server/export_types/printable_pdf/server/lib/pdf/assets/fonts/roboto/Roboto-Italic.ttf b/x-pack/plugins/reporting/server/export_types/printable_pdf/lib/pdf/assets/fonts/roboto/Roboto-Italic.ttf similarity index 100% rename from x-pack/plugins/reporting/server/export_types/printable_pdf/server/lib/pdf/assets/fonts/roboto/Roboto-Italic.ttf rename to x-pack/plugins/reporting/server/export_types/printable_pdf/lib/pdf/assets/fonts/roboto/Roboto-Italic.ttf diff --git a/x-pack/plugins/reporting/server/export_types/printable_pdf/server/lib/pdf/assets/fonts/roboto/Roboto-Medium.ttf b/x-pack/plugins/reporting/server/export_types/printable_pdf/lib/pdf/assets/fonts/roboto/Roboto-Medium.ttf similarity index 100% rename from x-pack/plugins/reporting/server/export_types/printable_pdf/server/lib/pdf/assets/fonts/roboto/Roboto-Medium.ttf rename to x-pack/plugins/reporting/server/export_types/printable_pdf/lib/pdf/assets/fonts/roboto/Roboto-Medium.ttf diff --git a/x-pack/plugins/reporting/server/export_types/printable_pdf/server/lib/pdf/assets/fonts/roboto/Roboto-Regular.ttf b/x-pack/plugins/reporting/server/export_types/printable_pdf/lib/pdf/assets/fonts/roboto/Roboto-Regular.ttf similarity index 100% rename from x-pack/plugins/reporting/server/export_types/printable_pdf/server/lib/pdf/assets/fonts/roboto/Roboto-Regular.ttf rename to x-pack/plugins/reporting/server/export_types/printable_pdf/lib/pdf/assets/fonts/roboto/Roboto-Regular.ttf diff --git a/x-pack/plugins/reporting/server/export_types/printable_pdf/server/lib/pdf/assets/img/logo-grey.png b/x-pack/plugins/reporting/server/export_types/printable_pdf/lib/pdf/assets/img/logo-grey.png similarity index 100% rename from x-pack/plugins/reporting/server/export_types/printable_pdf/server/lib/pdf/assets/img/logo-grey.png rename to x-pack/plugins/reporting/server/export_types/printable_pdf/lib/pdf/assets/img/logo-grey.png diff --git a/x-pack/plugins/reporting/server/export_types/printable_pdf/server/lib/pdf/index.js b/x-pack/plugins/reporting/server/export_types/printable_pdf/lib/pdf/index.js similarity index 100% rename from x-pack/plugins/reporting/server/export_types/printable_pdf/server/lib/pdf/index.js rename to x-pack/plugins/reporting/server/export_types/printable_pdf/lib/pdf/index.js diff --git a/x-pack/plugins/reporting/server/export_types/printable_pdf/server/lib/tracker.ts b/x-pack/plugins/reporting/server/export_types/printable_pdf/lib/tracker.ts similarity index 100% rename from x-pack/plugins/reporting/server/export_types/printable_pdf/server/lib/tracker.ts rename to x-pack/plugins/reporting/server/export_types/printable_pdf/lib/tracker.ts diff --git a/x-pack/plugins/reporting/server/export_types/printable_pdf/server/lib/uri_encode.js b/x-pack/plugins/reporting/server/export_types/printable_pdf/lib/uri_encode.js similarity index 92% rename from x-pack/plugins/reporting/server/export_types/printable_pdf/server/lib/uri_encode.js rename to x-pack/plugins/reporting/server/export_types/printable_pdf/lib/uri_encode.js index d057cfba4ef30..657af71c42c83 100644 --- a/x-pack/plugins/reporting/server/export_types/printable_pdf/server/lib/uri_encode.js +++ b/x-pack/plugins/reporting/server/export_types/printable_pdf/lib/uri_encode.js @@ -5,7 +5,7 @@ */ import { forEach, isArray } from 'lodash'; -import { url } from '../../../../../../../../src/plugins/kibana_utils/server'; +import { url } from '../../../../../../../src/plugins/kibana_utils/server'; function toKeyValue(obj) { const parts = []; diff --git a/x-pack/plugins/reporting/server/export_types/printable_pdf/types.d.ts b/x-pack/plugins/reporting/server/export_types/printable_pdf/types.d.ts index 5399781a77753..cba0f41f07536 100644 --- a/x-pack/plugins/reporting/server/export_types/printable_pdf/types.d.ts +++ b/x-pack/plugins/reporting/server/export_types/printable_pdf/types.d.ts @@ -5,7 +5,7 @@ */ import { ScheduledTaskParams } from '../../../server/types'; -import { LayoutInstance, LayoutParams } from '../common/layouts'; +import { LayoutInstance, LayoutParams } from '../../lib/layouts'; // Job params: structure of incoming user request data, after being parsed from RISON export interface JobParamsPDF { diff --git a/x-pack/plugins/reporting/server/lib/create_queue.ts b/x-pack/plugins/reporting/server/lib/create_queue.ts index a8dcb92c55b2d..2da3d8bd47ccb 100644 --- a/x-pack/plugins/reporting/server/lib/create_queue.ts +++ b/x-pack/plugins/reporting/server/lib/create_queue.ts @@ -6,10 +6,10 @@ import { ReportingCore } from '../core'; import { JobSource, TaskRunResult } from '../types'; -import { createTaggedLogger } from './create_tagged_logger'; // TODO remove createTaggedLogger once esqueue is removed import { createWorkerFactory } from './create_worker'; // @ts-ignore import { Esqueue } from './esqueue'; +import { createTaggedLogger } from './esqueue/create_tagged_logger'; import { LevelLogger } from './level_logger'; import { ReportingStore } from './store'; diff --git a/x-pack/plugins/reporting/server/lib/create_tagged_logger.ts b/x-pack/plugins/reporting/server/lib/esqueue/create_tagged_logger.ts similarity index 95% rename from x-pack/plugins/reporting/server/lib/create_tagged_logger.ts rename to x-pack/plugins/reporting/server/lib/esqueue/create_tagged_logger.ts index 775930ec83bdf..2b97f3f25217a 100644 --- a/x-pack/plugins/reporting/server/lib/create_tagged_logger.ts +++ b/x-pack/plugins/reporting/server/lib/esqueue/create_tagged_logger.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { LevelLogger } from './level_logger'; +import { LevelLogger } from '../level_logger'; export function createTaggedLogger(logger: LevelLogger, tags: string[]) { return (msg: string, additionalTags = []) => { diff --git a/x-pack/plugins/reporting/server/lib/index.ts b/x-pack/plugins/reporting/server/lib/index.ts index f5a50fca28b7a..e4adb1188e3fc 100644 --- a/x-pack/plugins/reporting/server/lib/index.ts +++ b/x-pack/plugins/reporting/server/lib/index.ts @@ -4,12 +4,12 @@ * you may not use this file except in compliance with the Elastic License. */ -export { LevelLogger } from './level_logger'; export { checkLicense } from './check_license'; export { createQueueFactory } from './create_queue'; export { cryptoFactory } from './crypto'; export { enqueueJobFactory } from './enqueue_job'; export { getExportTypesRegistry } from './export_types_registry'; -export { runValidations } from './validate'; -export { startTrace } from './trace'; +export { LevelLogger } from './level_logger'; export { ReportingStore } from './store'; +export { startTrace } from './trace'; +export { runValidations } from './validate'; diff --git a/x-pack/plugins/reporting/server/export_types/common/layouts/create_layout.ts b/x-pack/plugins/reporting/server/lib/layouts/create_layout.ts similarity index 94% rename from x-pack/plugins/reporting/server/export_types/common/layouts/create_layout.ts rename to x-pack/plugins/reporting/server/lib/layouts/create_layout.ts index 216a59d41cec0..921d302387edf 100644 --- a/x-pack/plugins/reporting/server/export_types/common/layouts/create_layout.ts +++ b/x-pack/plugins/reporting/server/lib/layouts/create_layout.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { CaptureConfig } from '../../../types'; +import { CaptureConfig } from '../../types'; import { LayoutParams, LayoutTypes } from './'; import { Layout } from './layout'; import { PreserveLayout } from './preserve_layout'; diff --git a/x-pack/plugins/reporting/server/export_types/common/layouts/index.ts b/x-pack/plugins/reporting/server/lib/layouts/index.ts similarity index 94% rename from x-pack/plugins/reporting/server/export_types/common/layouts/index.ts rename to x-pack/plugins/reporting/server/lib/layouts/index.ts index 23e4c095afe61..d46f088475222 100644 --- a/x-pack/plugins/reporting/server/export_types/common/layouts/index.ts +++ b/x-pack/plugins/reporting/server/lib/layouts/index.ts @@ -4,8 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ -import { HeadlessChromiumDriver } from '../../../browsers'; -import { LevelLogger } from '../../../lib'; +import { HeadlessChromiumDriver } from '../../browsers'; +import { LevelLogger } from '../'; import { Layout } from './layout'; export { createLayout } from './create_layout'; diff --git a/x-pack/plugins/reporting/server/export_types/common/layouts/layout.ts b/x-pack/plugins/reporting/server/lib/layouts/layout.ts similarity index 100% rename from x-pack/plugins/reporting/server/export_types/common/layouts/layout.ts rename to x-pack/plugins/reporting/server/lib/layouts/layout.ts diff --git a/x-pack/plugins/reporting/server/export_types/common/layouts/preserve_layout.css b/x-pack/plugins/reporting/server/lib/layouts/preserve_layout.css similarity index 100% rename from x-pack/plugins/reporting/server/export_types/common/layouts/preserve_layout.css rename to x-pack/plugins/reporting/server/lib/layouts/preserve_layout.css diff --git a/x-pack/plugins/reporting/server/export_types/common/layouts/preserve_layout.ts b/x-pack/plugins/reporting/server/lib/layouts/preserve_layout.ts similarity index 100% rename from x-pack/plugins/reporting/server/export_types/common/layouts/preserve_layout.ts rename to x-pack/plugins/reporting/server/lib/layouts/preserve_layout.ts diff --git a/x-pack/plugins/reporting/server/export_types/common/layouts/print.css b/x-pack/plugins/reporting/server/lib/layouts/print.css similarity index 96% rename from x-pack/plugins/reporting/server/export_types/common/layouts/print.css rename to x-pack/plugins/reporting/server/lib/layouts/print.css index b5b6eae5e1ff6..4f1e3f4e5abd0 100644 --- a/x-pack/plugins/reporting/server/export_types/common/layouts/print.css +++ b/x-pack/plugins/reporting/server/lib/layouts/print.css @@ -110,7 +110,7 @@ discover-app .discover-table-footer { /** * 1. Reporting manually makes each visualization it wants to screenshot larger, so we need to hide * the visualizations in the other panels. We can only use properties that will be manually set in - * reporting/export_types/printable_pdf/server/lib/screenshot.js or this will also hide the visualization + * reporting/export_types/printable_pdf/lib/screenshot.js or this will also hide the visualization * we want to capture. * 2. React grid item's transform affects the visualizations, even when they are using fixed positioning. Chrome seems * to handle this fine, but firefox moves the visualizations around. diff --git a/x-pack/plugins/reporting/server/export_types/common/layouts/print_layout.ts b/x-pack/plugins/reporting/server/lib/layouts/print_layout.ts similarity index 91% rename from x-pack/plugins/reporting/server/export_types/common/layouts/print_layout.ts rename to x-pack/plugins/reporting/server/lib/layouts/print_layout.ts index 30c83771aa3c9..b055fae8a780d 100644 --- a/x-pack/plugins/reporting/server/export_types/common/layouts/print_layout.ts +++ b/x-pack/plugins/reporting/server/lib/layouts/print_layout.ts @@ -6,10 +6,10 @@ import path from 'path'; import { EvaluateFn, SerializableOrJSHandle } from 'puppeteer'; -import { CaptureConfig } from '../../../types'; -import { HeadlessChromiumDriver } from '../../../browsers'; -import { LevelLogger } from '../../../lib'; -import { getDefaultLayoutSelectors, LayoutSelectorDictionary, Size, LayoutTypes } from './'; +import { LevelLogger } from '../'; +import { HeadlessChromiumDriver } from '../../browsers'; +import { CaptureConfig } from '../../types'; +import { getDefaultLayoutSelectors, LayoutSelectorDictionary, LayoutTypes, Size } from './'; import { Layout } from './layout'; export class PrintLayout extends Layout { diff --git a/x-pack/plugins/reporting/server/export_types/common/lib/screenshots/constants.ts b/x-pack/plugins/reporting/server/lib/screenshots/constants.ts similarity index 92% rename from x-pack/plugins/reporting/server/export_types/common/lib/screenshots/constants.ts rename to x-pack/plugins/reporting/server/lib/screenshots/constants.ts index a3faf9337524e..854763e499135 100644 --- a/x-pack/plugins/reporting/server/export_types/common/lib/screenshots/constants.ts +++ b/x-pack/plugins/reporting/server/lib/screenshots/constants.ts @@ -4,6 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ +export const DEFAULT_PAGELOAD_SELECTOR = '.application'; + export const CONTEXT_GETNUMBEROFITEMS = 'GetNumberOfItems'; export const CONTEXT_INJECTCSS = 'InjectCss'; export const CONTEXT_WAITFORRENDER = 'WaitForRender'; diff --git a/x-pack/plugins/reporting/server/export_types/common/lib/screenshots/get_element_position_data.ts b/x-pack/plugins/reporting/server/lib/screenshots/get_element_position_data.ts similarity index 93% rename from x-pack/plugins/reporting/server/export_types/common/lib/screenshots/get_element_position_data.ts rename to x-pack/plugins/reporting/server/lib/screenshots/get_element_position_data.ts index 140d76f8d1cd6..4fb9fd96ecfe6 100644 --- a/x-pack/plugins/reporting/server/export_types/common/lib/screenshots/get_element_position_data.ts +++ b/x-pack/plugins/reporting/server/lib/screenshots/get_element_position_data.ts @@ -5,10 +5,10 @@ */ import { i18n } from '@kbn/i18n'; -import { HeadlessChromiumDriver } from '../../../../browsers'; -import { LevelLogger, startTrace } from '../../../../lib'; -import { AttributesMap, ElementsPositionAndAttribute } from '../../../../types'; -import { LayoutInstance } from '../../layouts'; +import { HeadlessChromiumDriver } from '../../browsers'; +import { AttributesMap, ElementsPositionAndAttribute } from '../../types'; +import { LevelLogger, startTrace } from '../'; +import { LayoutInstance } from '../layouts'; import { CONTEXT_ELEMENTATTRIBUTES } from './constants'; export const getElementPositionAndAttributes = async ( diff --git a/x-pack/plugins/reporting/server/export_types/common/lib/screenshots/get_number_of_items.ts b/x-pack/plugins/reporting/server/lib/screenshots/get_number_of_items.ts similarity index 91% rename from x-pack/plugins/reporting/server/export_types/common/lib/screenshots/get_number_of_items.ts rename to x-pack/plugins/reporting/server/lib/screenshots/get_number_of_items.ts index 42eb91ecba830..49c690e8c024d 100644 --- a/x-pack/plugins/reporting/server/export_types/common/lib/screenshots/get_number_of_items.ts +++ b/x-pack/plugins/reporting/server/lib/screenshots/get_number_of_items.ts @@ -5,10 +5,10 @@ */ import { i18n } from '@kbn/i18n'; -import { HeadlessChromiumDriver } from '../../../../browsers'; -import { LevelLogger, startTrace } from '../../../../lib'; -import { CaptureConfig } from '../../../../types'; -import { LayoutInstance } from '../../layouts'; +import { HeadlessChromiumDriver } from '../../browsers'; +import { CaptureConfig } from '../../types'; +import { LevelLogger, startTrace } from '../'; +import { LayoutInstance } from '../layouts'; import { CONTEXT_GETNUMBEROFITEMS, CONTEXT_READMETADATA } from './constants'; export const getNumberOfItems = async ( @@ -68,7 +68,6 @@ export const getNumberOfItems = async ( }, }) ); - itemsCount = 1; } endTrace(); diff --git a/x-pack/plugins/reporting/server/export_types/common/lib/screenshots/get_screenshots.ts b/x-pack/plugins/reporting/server/lib/screenshots/get_screenshots.ts similarity index 91% rename from x-pack/plugins/reporting/server/export_types/common/lib/screenshots/get_screenshots.ts rename to x-pack/plugins/reporting/server/lib/screenshots/get_screenshots.ts index 05c315b8341a3..bc7b7005674a7 100644 --- a/x-pack/plugins/reporting/server/export_types/common/lib/screenshots/get_screenshots.ts +++ b/x-pack/plugins/reporting/server/lib/screenshots/get_screenshots.ts @@ -5,9 +5,9 @@ */ import { i18n } from '@kbn/i18n'; -import { HeadlessChromiumDriver } from '../../../../browsers'; -import { LevelLogger, startTrace } from '../../../../lib'; -import { ElementsPositionAndAttribute, Screenshot } from '../../../../types'; +import { HeadlessChromiumDriver } from '../../browsers'; +import { ElementsPositionAndAttribute, Screenshot } from '../../types'; +import { LevelLogger, startTrace } from '../'; export const getScreenshots = async ( browser: HeadlessChromiumDriver, diff --git a/x-pack/plugins/reporting/server/export_types/common/lib/screenshots/get_time_range.ts b/x-pack/plugins/reporting/server/lib/screenshots/get_time_range.ts similarity index 87% rename from x-pack/plugins/reporting/server/export_types/common/lib/screenshots/get_time_range.ts rename to x-pack/plugins/reporting/server/lib/screenshots/get_time_range.ts index ba68a5fec4e4c..afd6364454835 100644 --- a/x-pack/plugins/reporting/server/export_types/common/lib/screenshots/get_time_range.ts +++ b/x-pack/plugins/reporting/server/lib/screenshots/get_time_range.ts @@ -4,9 +4,9 @@ * you may not use this file except in compliance with the Elastic License. */ -import { HeadlessChromiumDriver } from '../../../../browsers'; -import { LevelLogger, startTrace } from '../../../../lib'; -import { LayoutInstance } from '../../layouts'; +import { LevelLogger, startTrace } from '../'; +import { LayoutInstance } from '../../../common/types'; +import { HeadlessChromiumDriver } from '../../browsers'; import { CONTEXT_GETTIMERANGE } from './constants'; export const getTimeRange = async ( diff --git a/x-pack/plugins/reporting/server/export_types/common/lib/screenshots/index.ts b/x-pack/plugins/reporting/server/lib/screenshots/index.ts similarity index 100% rename from x-pack/plugins/reporting/server/export_types/common/lib/screenshots/index.ts rename to x-pack/plugins/reporting/server/lib/screenshots/index.ts diff --git a/x-pack/plugins/reporting/server/export_types/common/lib/screenshots/inject_css.ts b/x-pack/plugins/reporting/server/lib/screenshots/inject_css.ts similarity index 90% rename from x-pack/plugins/reporting/server/export_types/common/lib/screenshots/inject_css.ts rename to x-pack/plugins/reporting/server/lib/screenshots/inject_css.ts index d72afacc1bef3..f893951815e9e 100644 --- a/x-pack/plugins/reporting/server/export_types/common/lib/screenshots/inject_css.ts +++ b/x-pack/plugins/reporting/server/lib/screenshots/inject_css.ts @@ -7,9 +7,9 @@ import { i18n } from '@kbn/i18n'; import fs from 'fs'; import { promisify } from 'util'; -import { HeadlessChromiumDriver } from '../../../../browsers'; -import { LevelLogger, startTrace } from '../../../../lib'; -import { Layout } from '../../layouts/layout'; +import { LevelLogger, startTrace } from '../'; +import { HeadlessChromiumDriver } from '../../browsers'; +import { Layout } from '../layouts'; import { CONTEXT_INJECTCSS } from './constants'; const fsp = { readFile: promisify(fs.readFile) }; diff --git a/x-pack/plugins/reporting/server/export_types/common/lib/screenshots/observable.test.ts b/x-pack/plugins/reporting/server/lib/screenshots/observable.test.ts similarity index 97% rename from x-pack/plugins/reporting/server/export_types/common/lib/screenshots/observable.test.ts rename to x-pack/plugins/reporting/server/lib/screenshots/observable.test.ts index b00233137943d..1b72be6c92f43 100644 --- a/x-pack/plugins/reporting/server/export_types/common/lib/screenshots/observable.test.ts +++ b/x-pack/plugins/reporting/server/lib/screenshots/observable.test.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -jest.mock('../../../../browsers/chromium/puppeteer', () => ({ +jest.mock('../../browsers/chromium/puppeteer', () => ({ puppeteerLaunch: () => ({ // Fixme needs event emitters newPage: () => ({ @@ -17,11 +17,11 @@ jest.mock('../../../../browsers/chromium/puppeteer', () => ({ import * as Rx from 'rxjs'; // eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { loggingSystemMock } from '../../../../../../../../src/core/server/mocks'; -import { HeadlessChromiumDriver } from '../../../../browsers'; -import { LevelLogger } from '../../../../lib'; -import { createMockBrowserDriverFactory, createMockLayoutInstance } from '../../../../test_helpers'; -import { CaptureConfig, ConditionalHeaders, ElementsPositionAndAttribute } from '../../../../types'; +import { loggingSystemMock } from '../../../../../../src/core/server/mocks'; +import { HeadlessChromiumDriver } from '../../browsers'; +import { LevelLogger } from '../'; +import { createMockBrowserDriverFactory, createMockLayoutInstance } from '../../test_helpers'; +import { CaptureConfig, ConditionalHeaders, ElementsPositionAndAttribute } from '../../types'; import * as contexts from './constants'; import { screenshotsObservableFactory } from './observable'; diff --git a/x-pack/plugins/reporting/server/export_types/common/lib/screenshots/observable.ts b/x-pack/plugins/reporting/server/lib/screenshots/observable.ts similarity index 97% rename from x-pack/plugins/reporting/server/export_types/common/lib/screenshots/observable.ts rename to x-pack/plugins/reporting/server/lib/screenshots/observable.ts index 028bff4aaa5ee..ab4dabf9ed2c2 100644 --- a/x-pack/plugins/reporting/server/export_types/common/lib/screenshots/observable.ts +++ b/x-pack/plugins/reporting/server/lib/screenshots/observable.ts @@ -16,15 +16,15 @@ import { tap, toArray, } from 'rxjs/operators'; -import { HeadlessChromiumDriverFactory } from '../../../../browsers'; +import { HeadlessChromiumDriverFactory } from '../../browsers'; import { CaptureConfig, ElementsPositionAndAttribute, ScreenshotObservableOpts, ScreenshotResults, ScreenshotsObservableFn, -} from '../../../../types'; -import { DEFAULT_PAGELOAD_SELECTOR } from '../../constants'; +} from '../../types'; +import { DEFAULT_PAGELOAD_SELECTOR } from './constants'; import { getElementPositionAndAttributes } from './get_element_position_data'; import { getNumberOfItems } from './get_number_of_items'; import { getScreenshots } from './get_screenshots'; diff --git a/x-pack/plugins/reporting/server/export_types/common/lib/screenshots/open_url.ts b/x-pack/plugins/reporting/server/lib/screenshots/open_url.ts similarity index 85% rename from x-pack/plugins/reporting/server/export_types/common/lib/screenshots/open_url.ts rename to x-pack/plugins/reporting/server/lib/screenshots/open_url.ts index bd7e8c508c118..c21ef3b91fab3 100644 --- a/x-pack/plugins/reporting/server/export_types/common/lib/screenshots/open_url.ts +++ b/x-pack/plugins/reporting/server/lib/screenshots/open_url.ts @@ -5,9 +5,9 @@ */ import { i18n } from '@kbn/i18n'; -import { HeadlessChromiumDriver } from '../../../../browsers'; -import { LevelLogger, startTrace } from '../../../../lib'; -import { CaptureConfig, ConditionalHeaders } from '../../../../types'; +import { HeadlessChromiumDriver } from '../../browsers'; +import { CaptureConfig, ConditionalHeaders } from '../../types'; +import { LevelLogger, startTrace } from '../'; export const openUrl = async ( captureConfig: CaptureConfig, diff --git a/x-pack/plugins/reporting/server/export_types/common/lib/screenshots/wait_for_render.ts b/x-pack/plugins/reporting/server/lib/screenshots/wait_for_render.ts similarity index 92% rename from x-pack/plugins/reporting/server/export_types/common/lib/screenshots/wait_for_render.ts rename to x-pack/plugins/reporting/server/lib/screenshots/wait_for_render.ts index b6519e914430a..f36a7b6f73664 100644 --- a/x-pack/plugins/reporting/server/export_types/common/lib/screenshots/wait_for_render.ts +++ b/x-pack/plugins/reporting/server/lib/screenshots/wait_for_render.ts @@ -5,10 +5,10 @@ */ import { i18n } from '@kbn/i18n'; -import { HeadlessChromiumDriver } from '../../../../browsers'; -import { LevelLogger, startTrace } from '../../../../lib'; -import { CaptureConfig } from '../../../../types'; -import { LayoutInstance } from '../../layouts'; +import { HeadlessChromiumDriver } from '../../browsers'; +import { CaptureConfig } from '../../types'; +import { LevelLogger, startTrace } from '../'; +import { LayoutInstance } from '../layouts'; import { CONTEXT_WAITFORRENDER } from './constants'; export const waitForRenderComplete = async ( diff --git a/x-pack/plugins/reporting/server/export_types/common/lib/screenshots/wait_for_visualizations.ts b/x-pack/plugins/reporting/server/lib/screenshots/wait_for_visualizations.ts similarity index 90% rename from x-pack/plugins/reporting/server/export_types/common/lib/screenshots/wait_for_visualizations.ts rename to x-pack/plugins/reporting/server/lib/screenshots/wait_for_visualizations.ts index 75a7b6516473c..779d00442522d 100644 --- a/x-pack/plugins/reporting/server/export_types/common/lib/screenshots/wait_for_visualizations.ts +++ b/x-pack/plugins/reporting/server/lib/screenshots/wait_for_visualizations.ts @@ -5,10 +5,10 @@ */ import { i18n } from '@kbn/i18n'; -import { HeadlessChromiumDriver } from '../../../../browsers'; -import { LevelLogger, startTrace } from '../../../../lib'; -import { CaptureConfig } from '../../../../types'; -import { LayoutInstance } from '../../layouts'; +import { HeadlessChromiumDriver } from '../../browsers'; +import { LevelLogger, startTrace } from '../'; +import { CaptureConfig } from '../../types'; +import { LayoutInstance } from '../layouts'; import { CONTEXT_WAITFORELEMENTSTOBEINDOM } from './constants'; type SelectorArgs = Record; diff --git a/x-pack/plugins/reporting/server/lib/store/store.ts b/x-pack/plugins/reporting/server/lib/store/store.ts index 1cb964a7bbfac..0f1ed83b71767 100644 --- a/x-pack/plugins/reporting/server/lib/store/store.ts +++ b/x-pack/plugins/reporting/server/lib/store/store.ts @@ -7,8 +7,8 @@ import { ElasticsearchServiceSetup } from 'src/core/server'; import { LevelLogger } from '../'; import { ReportingCore } from '../../'; -import { LayoutInstance } from '../../export_types/common/layouts'; import { indexTimestamp } from './index_timestamp'; +import { LayoutInstance } from '../layouts'; import { mapping } from './mapping'; import { Report } from './report'; diff --git a/x-pack/plugins/reporting/server/lib/validate/index.ts b/x-pack/plugins/reporting/server/lib/validate/index.ts index 7c439d6023d5f..d20df6b7315be 100644 --- a/x-pack/plugins/reporting/server/lib/validate/index.ts +++ b/x-pack/plugins/reporting/server/lib/validate/index.ts @@ -8,7 +8,7 @@ import { i18n } from '@kbn/i18n'; import { ElasticsearchServiceSetup } from 'kibana/server'; import { ReportingConfig } from '../../'; import { HeadlessChromiumDriverFactory } from '../../browsers/chromium/driver_factory'; -import { LevelLogger } from '../../lib'; +import { LevelLogger } from '../'; import { validateBrowser } from './validate_browser'; import { validateMaxContentLength } from './validate_max_content_length'; diff --git a/x-pack/plugins/reporting/server/lib/validate/validate_max_content_length.ts b/x-pack/plugins/reporting/server/lib/validate/validate_max_content_length.ts index 6d34937d9bd75..c38c6e5297854 100644 --- a/x-pack/plugins/reporting/server/lib/validate/validate_max_content_length.ts +++ b/x-pack/plugins/reporting/server/lib/validate/validate_max_content_length.ts @@ -8,7 +8,7 @@ import numeral from '@elastic/numeral'; import { ElasticsearchServiceSetup } from 'kibana/server'; import { defaults, get } from 'lodash'; import { ReportingConfig } from '../../'; -import { LevelLogger } from '../../lib'; +import { LevelLogger } from '../'; const KIBANA_MAX_SIZE_BYTES_PATH = 'csv.maxSizeBytes'; const ES_MAX_SIZE_BYTES_PATH = 'http.max_content_length'; diff --git a/x-pack/plugins/reporting/server/routes/generate_from_savedobject_immediate.ts b/x-pack/plugins/reporting/server/routes/generate_from_savedobject_immediate.ts index 773295deea954..8250ca462049b 100644 --- a/x-pack/plugins/reporting/server/routes/generate_from_savedobject_immediate.ts +++ b/x-pack/plugins/reporting/server/routes/generate_from_savedobject_immediate.ts @@ -7,8 +7,8 @@ import { schema } from '@kbn/config-schema'; import { ReportingCore } from '../'; import { API_BASE_GENERATE_V1 } from '../../common/constants'; -import { scheduleTaskFnFactory } from '../export_types/csv_from_savedobject/server/create_job'; -import { runTaskFnFactory } from '../export_types/csv_from_savedobject/server/execute_job'; +import { scheduleTaskFnFactory } from '../export_types/csv_from_savedobject/create_job'; +import { runTaskFnFactory } from '../export_types/csv_from_savedobject/execute_job'; import { LevelLogger as Logger } from '../lib'; import { TaskRunResult } from '../types'; import { authorizedUserPreRoutingFactory } from './lib/authorized_user_pre_routing'; diff --git a/x-pack/plugins/reporting/server/routes/jobs.ts b/x-pack/plugins/reporting/server/routes/jobs.ts index 90185f0736ed8..4033719b053ba 100644 --- a/x-pack/plugins/reporting/server/routes/jobs.ts +++ b/x-pack/plugins/reporting/server/routes/jobs.ts @@ -8,8 +8,8 @@ import { schema } from '@kbn/config-schema'; import Boom from 'boom'; import { ReportingCore } from '../'; import { API_BASE_URL } from '../../common/constants'; -import { jobsQueryFactory } from '../lib/jobs_query'; import { authorizedUserPreRoutingFactory } from './lib/authorized_user_pre_routing'; +import { jobsQueryFactory } from './lib/jobs_query'; import { deleteJobResponseHandlerFactory, downloadJobResponseHandlerFactory, diff --git a/x-pack/plugins/reporting/server/routes/lib/authorized_user_pre_routing.ts b/x-pack/plugins/reporting/server/routes/lib/authorized_user_pre_routing.ts index 74737b0a5d1e2..3758eafc6d718 100644 --- a/x-pack/plugins/reporting/server/routes/lib/authorized_user_pre_routing.ts +++ b/x-pack/plugins/reporting/server/routes/lib/authorized_user_pre_routing.ts @@ -6,8 +6,8 @@ import { RequestHandler, RouteMethod } from 'src/core/server'; import { AuthenticatedUser } from '../../../../security/server'; -import { getUserFactory } from '../../lib/get_user'; import { ReportingCore } from '../../core'; +import { getUserFactory } from './get_user'; type ReportingUser = AuthenticatedUser | null; const superuserRole = 'superuser'; diff --git a/x-pack/plugins/reporting/server/lib/get_user.ts b/x-pack/plugins/reporting/server/routes/lib/get_user.ts similarity index 87% rename from x-pack/plugins/reporting/server/lib/get_user.ts rename to x-pack/plugins/reporting/server/routes/lib/get_user.ts index 49d15a7c55100..fd56e8cfc28c7 100644 --- a/x-pack/plugins/reporting/server/lib/get_user.ts +++ b/x-pack/plugins/reporting/server/routes/lib/get_user.ts @@ -5,7 +5,7 @@ */ import { KibanaRequest } from 'kibana/server'; -import { SecurityPluginSetup } from '../../../security/server'; +import { SecurityPluginSetup } from '../../../../security/server'; export function getUserFactory(security?: SecurityPluginSetup) { return (request: KibanaRequest) => { diff --git a/x-pack/plugins/reporting/server/routes/lib/job_response_handler.ts b/x-pack/plugins/reporting/server/routes/lib/job_response_handler.ts index 651f1c34fee6c..df346c8b9b832 100644 --- a/x-pack/plugins/reporting/server/routes/lib/job_response_handler.ts +++ b/x-pack/plugins/reporting/server/routes/lib/job_response_handler.ts @@ -8,8 +8,8 @@ import { kibanaResponseFactory } from 'kibana/server'; import { ReportingCore } from '../../'; import { AuthenticatedUser } from '../../../../security/server'; import { WHITELISTED_JOB_CONTENT_TYPES } from '../../../common/constants'; -import { jobsQueryFactory } from '../../lib/jobs_query'; import { getDocumentPayloadFactory } from './get_document_payload'; +import { jobsQueryFactory } from './jobs_query'; interface JobResponseHandlerParams { docId: string; diff --git a/x-pack/plugins/reporting/server/lib/jobs_query.ts b/x-pack/plugins/reporting/server/routes/lib/jobs_query.ts similarity index 96% rename from x-pack/plugins/reporting/server/lib/jobs_query.ts rename to x-pack/plugins/reporting/server/routes/lib/jobs_query.ts index f4670847260ee..f3955b4871b31 100644 --- a/x-pack/plugins/reporting/server/lib/jobs_query.ts +++ b/x-pack/plugins/reporting/server/routes/lib/jobs_query.ts @@ -7,9 +7,9 @@ import { i18n } from '@kbn/i18n'; import { errors as elasticsearchErrors } from 'elasticsearch'; import { get } from 'lodash'; -import { ReportingCore } from '../'; -import { AuthenticatedUser } from '../../../security/server'; -import { JobSource } from '../types'; +import { ReportingCore } from '../../'; +import { AuthenticatedUser } from '../../../../security/server'; +import { JobSource } from '../../types'; const esErrors = elasticsearchErrors as Record; const defaultSize = 10; diff --git a/x-pack/plugins/reporting/server/test_helpers/create_mock_browserdriverfactory.ts b/x-pack/plugins/reporting/server/test_helpers/create_mock_browserdriverfactory.ts index 97e22e2ca2863..db10d96db2263 100644 --- a/x-pack/plugins/reporting/server/test_helpers/create_mock_browserdriverfactory.ts +++ b/x-pack/plugins/reporting/server/test_helpers/create_mock_browserdriverfactory.ts @@ -7,8 +7,8 @@ import { Page } from 'puppeteer'; import * as Rx from 'rxjs'; import { chromium, HeadlessChromiumDriver, HeadlessChromiumDriverFactory } from '../browsers'; -import * as contexts from '../export_types/common/lib/screenshots/constants'; import { LevelLogger } from '../lib'; +import * as contexts from '../lib/screenshots/constants'; import { CaptureConfig, ElementsPositionAndAttribute } from '../types'; interface CreateMockBrowserDriverFactoryOpts { diff --git a/x-pack/plugins/reporting/server/test_helpers/create_mock_layoutinstance.ts b/x-pack/plugins/reporting/server/test_helpers/create_mock_layoutinstance.ts index 22da9eb418e9a..c9dbbda9fd68d 100644 --- a/x-pack/plugins/reporting/server/test_helpers/create_mock_layoutinstance.ts +++ b/x-pack/plugins/reporting/server/test_helpers/create_mock_layoutinstance.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { createLayout, LayoutInstance, LayoutTypes } from '../export_types/common/layouts'; +import { createLayout, LayoutInstance, LayoutTypes } from '../lib/layouts'; import { CaptureConfig } from '../types'; export const createMockLayoutInstance = (captureConfig: CaptureConfig) => { diff --git a/x-pack/plugins/reporting/server/types.ts b/x-pack/plugins/reporting/server/types.ts index 667c1546c6147..ff597b53ea0b0 100644 --- a/x-pack/plugins/reporting/server/types.ts +++ b/x-pack/plugins/reporting/server/types.ts @@ -15,8 +15,8 @@ import { SecurityPluginSetup } from '../../security/server'; import { JobStatus } from '../common/types'; import { ReportingConfigType } from './config'; import { ReportingCore } from './core'; -import { LayoutInstance } from './export_types/common/layouts'; import { LevelLogger } from './lib'; +import { LayoutInstance } from './lib/layouts'; /* * Routing / API types