diff --git a/.eslintignore b/.eslintignore index 1f22b6074e76e0..2eaa498f86e5ae 100644 --- a/.eslintignore +++ b/.eslintignore @@ -10,7 +10,6 @@ bower_components /html_docs /src/plugins/data/common/es_query/kuery/ast/_generated_/** /src/plugins/vis_type_timelion/public/_generated_/** -src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data /src/legacy/ui/public/flot-charts /test/fixtures/scenarios /src/legacy/core_plugins/console/public/webpackShims diff --git a/.eslintrc.js b/.eslintrc.js index dfb4603ba95afc..e45a2a96f29d7e 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -217,6 +217,9 @@ module.exports = { 'examples/**/*', '!(src|x-pack)/**/*.test.*', '!(x-pack/)?test/**/*', + // next folder contains legacy browser tests which can't be migrated to jest + // which import np files + '!src/legacy/core_plugins/kibana/public/__tests__/**/*', ], from: [ '(src|x-pack)/plugins/**/(public|server)/**/*', @@ -562,7 +565,7 @@ module.exports = { */ { // front end typescript and javascript files only - files: ['x-pack/legacy/plugins/siem/public/**/*.{js,ts,tsx}'], + files: ['x-pack/plugins/siem/public/**/*.{js,ts,tsx}'], rules: { 'import/no-nodejs-modules': 'error', 'no-restricted-imports': [ @@ -611,7 +614,7 @@ module.exports = { // { // // will introduced after the other warns are fixed // // typescript and javascript for front end react performance - // files: ['x-pack/legacy/plugins/siem/public/**/!(*.test).{js,ts,tsx}'], + // files: ['x-pack/plugins/siem/public/**/!(*.test).{js,ts,tsx}'], // plugins: ['react-perf'], // rules: { // // 'react-perf/jsx-no-new-object-as-prop': 'error', diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 0d86726dca836c..4a16952f820142 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -11,7 +11,7 @@ /src/legacy/core_plugins/kibana/public/discover/ @elastic/kibana-app /src/legacy/core_plugins/kibana/public/local_application_service/ @elastic/kibana-app /src/legacy/core_plugins/kibana/public/dev_tools/ @elastic/kibana-app -/src/legacy/core_plugins/vis_type_vislib/ @elastic/kibana-app +/src/plugins/vis_type_vislib/ @elastic/kibana-app /src/plugins/vis_type_xy/ @elastic/kibana-app /src/plugins/vis_type_table/ @elastic/kibana-app /src/plugins/kibana_legacy/ @elastic/kibana-app diff --git a/.i18nrc.json b/.i18nrc.json index 35ce7452343466..b04c02f6b22655 100644 --- a/.i18nrc.json +++ b/.i18nrc.json @@ -50,10 +50,10 @@ "visTypeMetric": "src/plugins/vis_type_metric", "visTypeTable": "src/plugins/vis_type_table", "visTypeTagCloud": "src/plugins/vis_type_tagcloud", - "visTypeTimeseries": ["src/legacy/core_plugins/vis_type_timeseries", "src/plugins/vis_type_timeseries"], + "visTypeTimeseries": "src/plugins/vis_type_timeseries", "visTypeVega": "src/plugins/vis_type_vega", - "visTypeVislib": "src/legacy/core_plugins/vis_type_vislib", - "visTypeXy": "src/legacy/core_plugins/vis_type_xy", + "visTypeVislib": "src/plugins/vis_type_vislib", + "visTypeXy": "src/plugins/vis_type_xy", "visualizations": "src/plugins/visualizations", "visualize": "src/plugins/visualize" }, diff --git a/.sass-lint.yml b/.sass-lint.yml index 9b31f3fae6d161..44b4d493841361 100644 --- a/.sass-lint.yml +++ b/.sass-lint.yml @@ -2,8 +2,8 @@ files: include: - 'src/legacy/core_plugins/metrics/**/*.s+(a|c)ss' - 'src/legacy/core_plugins/timelion/**/*.s+(a|c)ss' - - 'src/legacy/core_plugins/vis_type_vislib/**/*.s+(a|c)ss' - - 'src/legacy/core_plugins/vis_type_xy/**/*.s+(a|c)ss' + - 'src/plugins/vis_type_vislib/**/*.s+(a|c)ss' + - 'src/plugins/vis_type_xy/**/*.s+(a|c)ss' - 'x-pack/legacy/plugins/security/**/*.s+(a|c)ss' - 'x-pack/legacy/plugins/canvas/**/*.s+(a|c)ss' - 'x-pack/plugins/triggers_actions_ui/**/*.s+(a|c)ss' diff --git a/Jenkinsfile b/Jenkinsfile index 98cc6994f229b0..958ced8c6195a6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,54 +4,56 @@ library 'kibana-pipeline-library' kibanaLibrary.load() kibanaPipeline(timeoutMinutes: 135, checkPrChanges: true) { - githubPr.withDefaultPrComments { - catchError { - retryable.enable() - parallel([ - 'kibana-intake-agent': workers.intake('kibana-intake', './test/scripts/jenkins_unit.sh'), - 'x-pack-intake-agent': workers.intake('x-pack-intake', './test/scripts/jenkins_xpack.sh'), - 'kibana-oss-agent': workers.functional('kibana-oss-tests', { kibanaPipeline.buildOss() }, [ - 'oss-firefoxSmoke': kibanaPipeline.functionalTestProcess('kibana-firefoxSmoke', './test/scripts/jenkins_firefox_smoke.sh'), - 'oss-ciGroup1': kibanaPipeline.ossCiGroupProcess(1), - 'oss-ciGroup2': kibanaPipeline.ossCiGroupProcess(2), - 'oss-ciGroup3': kibanaPipeline.ossCiGroupProcess(3), - 'oss-ciGroup4': kibanaPipeline.ossCiGroupProcess(4), - 'oss-ciGroup5': kibanaPipeline.ossCiGroupProcess(5), - 'oss-ciGroup6': kibanaPipeline.ossCiGroupProcess(6), - 'oss-ciGroup7': kibanaPipeline.ossCiGroupProcess(7), - 'oss-ciGroup8': kibanaPipeline.ossCiGroupProcess(8), - 'oss-ciGroup9': kibanaPipeline.ossCiGroupProcess(9), - 'oss-ciGroup10': kibanaPipeline.ossCiGroupProcess(10), - 'oss-ciGroup11': kibanaPipeline.ossCiGroupProcess(11), - 'oss-ciGroup12': kibanaPipeline.ossCiGroupProcess(12), - 'oss-accessibility': kibanaPipeline.functionalTestProcess('kibana-accessibility', './test/scripts/jenkins_accessibility.sh'), - // 'oss-visualRegression': kibanaPipeline.functionalTestProcess('visualRegression', './test/scripts/jenkins_visual_regression.sh'), - ]), - 'kibana-xpack-agent': workers.functional('kibana-xpack-tests', { kibanaPipeline.buildXpack() }, [ - 'xpack-firefoxSmoke': kibanaPipeline.functionalTestProcess('xpack-firefoxSmoke', './test/scripts/jenkins_xpack_firefox_smoke.sh'), - 'xpack-ciGroup1': kibanaPipeline.xpackCiGroupProcess(1), - 'xpack-ciGroup2': kibanaPipeline.xpackCiGroupProcess(2), - 'xpack-ciGroup3': kibanaPipeline.xpackCiGroupProcess(3), - 'xpack-ciGroup4': kibanaPipeline.xpackCiGroupProcess(4), - 'xpack-ciGroup5': kibanaPipeline.xpackCiGroupProcess(5), - 'xpack-ciGroup6': kibanaPipeline.xpackCiGroupProcess(6), - 'xpack-ciGroup7': kibanaPipeline.xpackCiGroupProcess(7), - 'xpack-ciGroup8': kibanaPipeline.xpackCiGroupProcess(8), - 'xpack-ciGroup9': kibanaPipeline.xpackCiGroupProcess(9), - 'xpack-ciGroup10': kibanaPipeline.xpackCiGroupProcess(10), - 'xpack-accessibility': kibanaPipeline.functionalTestProcess('xpack-accessibility', './test/scripts/jenkins_xpack_accessibility.sh'), - 'xpack-siemCypress': { processNumber -> - whenChanged(['x-pack/plugins/siem/', 'x-pack/legacy/plugins/siem/', 'x-pack/test/siem_cypress/']) { - kibanaPipeline.functionalTestProcess('xpack-siemCypress', './test/scripts/jenkins_siem_cypress.sh')(processNumber) - } - }, + ciStats.trackBuild { + githubPr.withDefaultPrComments { + catchError { + retryable.enable() + parallel([ + 'kibana-intake-agent': workers.intake('kibana-intake', './test/scripts/jenkins_unit.sh'), + 'x-pack-intake-agent': workers.intake('x-pack-intake', './test/scripts/jenkins_xpack.sh'), + 'kibana-oss-agent': workers.functional('kibana-oss-tests', { kibanaPipeline.buildOss() }, [ + 'oss-firefoxSmoke': kibanaPipeline.functionalTestProcess('kibana-firefoxSmoke', './test/scripts/jenkins_firefox_smoke.sh'), + 'oss-ciGroup1': kibanaPipeline.ossCiGroupProcess(1), + 'oss-ciGroup2': kibanaPipeline.ossCiGroupProcess(2), + 'oss-ciGroup3': kibanaPipeline.ossCiGroupProcess(3), + 'oss-ciGroup4': kibanaPipeline.ossCiGroupProcess(4), + 'oss-ciGroup5': kibanaPipeline.ossCiGroupProcess(5), + 'oss-ciGroup6': kibanaPipeline.ossCiGroupProcess(6), + 'oss-ciGroup7': kibanaPipeline.ossCiGroupProcess(7), + 'oss-ciGroup8': kibanaPipeline.ossCiGroupProcess(8), + 'oss-ciGroup9': kibanaPipeline.ossCiGroupProcess(9), + 'oss-ciGroup10': kibanaPipeline.ossCiGroupProcess(10), + 'oss-ciGroup11': kibanaPipeline.ossCiGroupProcess(11), + 'oss-ciGroup12': kibanaPipeline.ossCiGroupProcess(12), + 'oss-accessibility': kibanaPipeline.functionalTestProcess('kibana-accessibility', './test/scripts/jenkins_accessibility.sh'), + // 'oss-visualRegression': kibanaPipeline.functionalTestProcess('visualRegression', './test/scripts/jenkins_visual_regression.sh'), + ]), + 'kibana-xpack-agent': workers.functional('kibana-xpack-tests', { kibanaPipeline.buildXpack() }, [ + 'xpack-firefoxSmoke': kibanaPipeline.functionalTestProcess('xpack-firefoxSmoke', './test/scripts/jenkins_xpack_firefox_smoke.sh'), + 'xpack-ciGroup1': kibanaPipeline.xpackCiGroupProcess(1), + 'xpack-ciGroup2': kibanaPipeline.xpackCiGroupProcess(2), + 'xpack-ciGroup3': kibanaPipeline.xpackCiGroupProcess(3), + 'xpack-ciGroup4': kibanaPipeline.xpackCiGroupProcess(4), + 'xpack-ciGroup5': kibanaPipeline.xpackCiGroupProcess(5), + 'xpack-ciGroup6': kibanaPipeline.xpackCiGroupProcess(6), + 'xpack-ciGroup7': kibanaPipeline.xpackCiGroupProcess(7), + 'xpack-ciGroup8': kibanaPipeline.xpackCiGroupProcess(8), + 'xpack-ciGroup9': kibanaPipeline.xpackCiGroupProcess(9), + 'xpack-ciGroup10': kibanaPipeline.xpackCiGroupProcess(10), + 'xpack-accessibility': kibanaPipeline.functionalTestProcess('xpack-accessibility', './test/scripts/jenkins_xpack_accessibility.sh'), + 'xpack-siemCypress': { processNumber -> + whenChanged(['x-pack/plugins/siem/', 'x-pack/test/siem_cypress/']) { + kibanaPipeline.functionalTestProcess('xpack-siemCypress', './test/scripts/jenkins_siem_cypress.sh')(processNumber) + } + }, - // 'xpack-visualRegression': kibanaPipeline.functionalTestProcess('xpack-visualRegression', './test/scripts/jenkins_xpack_visual_regression.sh'), - ]), - ]) + // 'xpack-visualRegression': kibanaPipeline.functionalTestProcess('xpack-visualRegression', './test/scripts/jenkins_xpack_visual_regression.sh'), + ]), + ]) + } } - } - retryable.printFlakyFailures() - kibanaPipeline.sendMail() + retryable.printFlakyFailures() + kibanaPipeline.sendMail() + } } diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.field.__spec.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.field.__spec.md new file mode 100644 index 00000000000000..43ff9a930b974d --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.field.__spec.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [Field](./kibana-plugin-plugins-data-public.field.md) > [$$spec](./kibana-plugin-plugins-data-public.field.__spec.md) + +## Field.$$spec property + +Signature: + +```typescript +$$spec: FieldSpec; +``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield._constructor_.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.field._constructor_.md similarity index 68% rename from docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield._constructor_.md rename to docs/development/plugins/data/public/kibana-plugin-plugins-data-public.field._constructor_.md index cf7470c035a533..c3b2ac8d30b5a9 100644 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield._constructor_.md +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.field._constructor_.md @@ -1,8 +1,8 @@ -[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [IndexPatternField](./kibana-plugin-plugins-data-public.indexpatternfield.md) > [(constructor)](./kibana-plugin-plugins-data-public.indexpatternfield._constructor_.md) +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [Field](./kibana-plugin-plugins-data-public.field.md) > [(constructor)](./kibana-plugin-plugins-data-public.field._constructor_.md) -## IndexPatternField.(constructor) +## Field.(constructor) Constructs a new instance of the `Field` class diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.field.aggregatable.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.field.aggregatable.md new file mode 100644 index 00000000000000..fcfd7d73c8b0ce --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.field.aggregatable.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [Field](./kibana-plugin-plugins-data-public.field.md) > [aggregatable](./kibana-plugin-plugins-data-public.field.aggregatable.md) + +## Field.aggregatable property + +Signature: + +```typescript +aggregatable?: boolean; +``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.field.conflictdescriptions.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.field.conflictdescriptions.md new file mode 100644 index 00000000000000..21b6917c4aad41 --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.field.conflictdescriptions.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [Field](./kibana-plugin-plugins-data-public.field.md) > [conflictDescriptions](./kibana-plugin-plugins-data-public.field.conflictdescriptions.md) + +## Field.conflictDescriptions property + +Signature: + +```typescript +conflictDescriptions?: Record; +``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.field.count.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.field.count.md new file mode 100644 index 00000000000000..4f51d88a3046ed --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.field.count.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [Field](./kibana-plugin-plugins-data-public.field.md) > [count](./kibana-plugin-plugins-data-public.field.count.md) + +## Field.count property + +Signature: + +```typescript +count?: number; +``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.field.displayname.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.field.displayname.md new file mode 100644 index 00000000000000..0846a7595cf907 --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.field.displayname.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [Field](./kibana-plugin-plugins-data-public.field.md) > [displayName](./kibana-plugin-plugins-data-public.field.displayname.md) + +## Field.displayName property + +Signature: + +```typescript +displayName?: string; +``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.field.estypes.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.field.estypes.md new file mode 100644 index 00000000000000..efe1bceb43361a --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.field.estypes.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [Field](./kibana-plugin-plugins-data-public.field.md) > [esTypes](./kibana-plugin-plugins-data-public.field.estypes.md) + +## Field.esTypes property + +Signature: + +```typescript +esTypes?: string[]; +``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.field.filterable.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.field.filterable.md new file mode 100644 index 00000000000000..fd7be589e87a79 --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.field.filterable.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [Field](./kibana-plugin-plugins-data-public.field.md) > [filterable](./kibana-plugin-plugins-data-public.field.filterable.md) + +## Field.filterable property + +Signature: + +```typescript +filterable?: boolean; +``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.field.format.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.field.format.md new file mode 100644 index 00000000000000..431e043d1fecc6 --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.field.format.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [Field](./kibana-plugin-plugins-data-public.field.md) > [format](./kibana-plugin-plugins-data-public.field.format.md) + +## Field.format property + +Signature: + +```typescript +format: any; +``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.field.indexpattern.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.field.indexpattern.md new file mode 100644 index 00000000000000..59420747e0958e --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.field.indexpattern.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [Field](./kibana-plugin-plugins-data-public.field.md) > [indexPattern](./kibana-plugin-plugins-data-public.field.indexpattern.md) + +## Field.indexPattern property + +Signature: + +```typescript +indexPattern?: IndexPattern; +``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.field.lang.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.field.lang.md new file mode 100644 index 00000000000000..d51857090356fe --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.field.lang.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [Field](./kibana-plugin-plugins-data-public.field.md) > [lang](./kibana-plugin-plugins-data-public.field.lang.md) + +## Field.lang property + +Signature: + +```typescript +lang?: string; +``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.field.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.field.md new file mode 100644 index 00000000000000..86ff2b2c28ae94 --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.field.md @@ -0,0 +1,41 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [Field](./kibana-plugin-plugins-data-public.field.md) + +## Field class + +Signature: + +```typescript +export declare class Field implements IFieldType +``` + +## Constructors + +| Constructor | Modifiers | Description | +| --- | --- | --- | +| [(constructor)(indexPattern, spec, shortDotsEnable)](./kibana-plugin-plugins-data-public.field._constructor_.md) | | Constructs a new instance of the Field class | + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [$$spec](./kibana-plugin-plugins-data-public.field.__spec.md) | | FieldSpec | | +| [aggregatable](./kibana-plugin-plugins-data-public.field.aggregatable.md) | | boolean | | +| [conflictDescriptions](./kibana-plugin-plugins-data-public.field.conflictdescriptions.md) | | Record<string, string[]> | | +| [count](./kibana-plugin-plugins-data-public.field.count.md) | | number | | +| [displayName](./kibana-plugin-plugins-data-public.field.displayname.md) | | string | | +| [esTypes](./kibana-plugin-plugins-data-public.field.estypes.md) | | string[] | | +| [filterable](./kibana-plugin-plugins-data-public.field.filterable.md) | | boolean | | +| [format](./kibana-plugin-plugins-data-public.field.format.md) | | any | | +| [indexPattern](./kibana-plugin-plugins-data-public.field.indexpattern.md) | | IndexPattern | | +| [lang](./kibana-plugin-plugins-data-public.field.lang.md) | | string | | +| [name](./kibana-plugin-plugins-data-public.field.name.md) | | string | | +| [script](./kibana-plugin-plugins-data-public.field.script.md) | | string | | +| [scripted](./kibana-plugin-plugins-data-public.field.scripted.md) | | boolean | | +| [searchable](./kibana-plugin-plugins-data-public.field.searchable.md) | | boolean | | +| [sortable](./kibana-plugin-plugins-data-public.field.sortable.md) | | boolean | | +| [subType](./kibana-plugin-plugins-data-public.field.subtype.md) | | IFieldSubType | | +| [type](./kibana-plugin-plugins-data-public.field.type.md) | | string | | +| [visualizable](./kibana-plugin-plugins-data-public.field.visualizable.md) | | boolean | | + diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.field.name.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.field.name.md new file mode 100644 index 00000000000000..d2a9b9b86aefc9 --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.field.name.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [Field](./kibana-plugin-plugins-data-public.field.md) > [name](./kibana-plugin-plugins-data-public.field.name.md) + +## Field.name property + +Signature: + +```typescript +name: string; +``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.field.script.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.field.script.md new file mode 100644 index 00000000000000..676ff9bdfc35a7 --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.field.script.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [Field](./kibana-plugin-plugins-data-public.field.md) > [script](./kibana-plugin-plugins-data-public.field.script.md) + +## Field.script property + +Signature: + +```typescript +script?: string; +``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.field.scripted.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.field.scripted.md new file mode 100644 index 00000000000000..1f6c8105e3f618 --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.field.scripted.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [Field](./kibana-plugin-plugins-data-public.field.md) > [scripted](./kibana-plugin-plugins-data-public.field.scripted.md) + +## Field.scripted property + +Signature: + +```typescript +scripted?: boolean; +``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.field.searchable.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.field.searchable.md new file mode 100644 index 00000000000000..186d344f503788 --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.field.searchable.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [Field](./kibana-plugin-plugins-data-public.field.md) > [searchable](./kibana-plugin-plugins-data-public.field.searchable.md) + +## Field.searchable property + +Signature: + +```typescript +searchable?: boolean; +``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.field.sortable.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.field.sortable.md new file mode 100644 index 00000000000000..0cd4b14d0e1e5c --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.field.sortable.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [Field](./kibana-plugin-plugins-data-public.field.md) > [sortable](./kibana-plugin-plugins-data-public.field.sortable.md) + +## Field.sortable property + +Signature: + +```typescript +sortable?: boolean; +``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.field.subtype.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.field.subtype.md new file mode 100644 index 00000000000000..bef3b2131fa475 --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.field.subtype.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [Field](./kibana-plugin-plugins-data-public.field.md) > [subType](./kibana-plugin-plugins-data-public.field.subtype.md) + +## Field.subType property + +Signature: + +```typescript +subType?: IFieldSubType; +``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.field.type.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.field.type.md new file mode 100644 index 00000000000000..490615edcf097e --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.field.type.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [Field](./kibana-plugin-plugins-data-public.field.md) > [type](./kibana-plugin-plugins-data-public.field.type.md) + +## Field.type property + +Signature: + +```typescript +type: string; +``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.field.visualizable.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.field.visualizable.md new file mode 100644 index 00000000000000..f32a5c456dc5db --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.field.visualizable.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [Field](./kibana-plugin-plugins-data-public.field.md) > [visualizable](./kibana-plugin-plugins-data-public.field.visualizable.md) + +## Field.visualizable property + +Signature: + +```typescript +visualizable?: boolean; +``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformat._constructor_.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformat._constructor_.md new file mode 100644 index 00000000000000..e38da6600696c9 --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformat._constructor_.md @@ -0,0 +1,21 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [FieldFormat](./kibana-plugin-plugins-data-public.fieldformat.md) > [(constructor)](./kibana-plugin-plugins-data-public.fieldformat._constructor_.md) + +## FieldFormat.(constructor) + +Constructs a new instance of the `FieldFormat` class + +Signature: + +```typescript +constructor(_params?: IFieldFormatMetaParams, getConfig?: FieldFormatsGetConfigFn); +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| \_params | IFieldFormatMetaParams | | +| getConfig | FieldFormatsGetConfigFn | | + diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformat._params.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformat._params.md new file mode 100644 index 00000000000000..ac3f256a9afc30 --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformat._params.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [FieldFormat](./kibana-plugin-plugins-data-public.fieldformat.md) > [\_params](./kibana-plugin-plugins-data-public.fieldformat._params.md) + +## FieldFormat.\_params property + +Signature: + +```typescript +protected readonly _params: any; +``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformat.convert.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformat.convert.md new file mode 100644 index 00000000000000..0535585cb4718c --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformat.convert.md @@ -0,0 +1,26 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [FieldFormat](./kibana-plugin-plugins-data-public.fieldformat.md) > [convert](./kibana-plugin-plugins-data-public.fieldformat.convert.md) + +## FieldFormat.convert() method + +Convert a raw value to a formatted string + +Signature: + +```typescript +convert(value: any, contentType?: FieldFormatsContentType, options?: HtmlContextTypeOptions | TextContextTypeOptions): string; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| value | any | | +| contentType | FieldFormatsContentType | | +| options | HtmlContextTypeOptions | TextContextTypeOptions | | + +Returns: + +`string` + diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformat.convertobject.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformat.convertobject.md new file mode 100644 index 00000000000000..436124ac083871 --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformat.convertobject.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [FieldFormat](./kibana-plugin-plugins-data-public.fieldformat.md) > [convertObject](./kibana-plugin-plugins-data-public.fieldformat.convertobject.md) + +## FieldFormat.convertObject property + + {FieldFormatConvert} have to remove the private because of https://github.com/Microsoft/TypeScript/issues/17293 + +Signature: + +```typescript +convertObject: FieldFormatConvert | undefined; +``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformat.fieldtype.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformat.fieldtype.md new file mode 100644 index 00000000000000..1d109a599d2d9c --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformat.fieldtype.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [FieldFormat](./kibana-plugin-plugins-data-public.fieldformat.md) > [fieldType](./kibana-plugin-plugins-data-public.fieldformat.fieldtype.md) + +## FieldFormat.fieldType property + + {string} - Field Format Type + +Signature: + +```typescript +static fieldType: string | string[]; +``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformat.from.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformat.from.md new file mode 100644 index 00000000000000..ec497de59d2368 --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformat.from.md @@ -0,0 +1,22 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [FieldFormat](./kibana-plugin-plugins-data-public.fieldformat.md) > [from](./kibana-plugin-plugins-data-public.fieldformat.from.md) + +## FieldFormat.from() method + +Signature: + +```typescript +static from(convertFn: FieldFormatConvertFunction): FieldFormatInstanceType; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| convertFn | FieldFormatConvertFunction | | + +Returns: + +`FieldFormatInstanceType` + diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformat.getconfig.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformat.getconfig.md new file mode 100644 index 00000000000000..446e0c237ce132 --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformat.getconfig.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [FieldFormat](./kibana-plugin-plugins-data-public.fieldformat.md) > [getConfig](./kibana-plugin-plugins-data-public.fieldformat.getconfig.md) + +## FieldFormat.getConfig property + +Signature: + +```typescript +protected getConfig: FieldFormatsGetConfigFn | undefined; +``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformat.getconverterfor.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformat.getconverterfor.md new file mode 100644 index 00000000000000..f4eeb5eed06a09 --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformat.getconverterfor.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [FieldFormat](./kibana-plugin-plugins-data-public.fieldformat.md) > [getConverterFor](./kibana-plugin-plugins-data-public.fieldformat.getconverterfor.md) + +## FieldFormat.getConverterFor() method + +Get a convert function that is bound to a specific contentType + +Signature: + +```typescript +getConverterFor(contentType?: FieldFormatsContentType): FieldFormatConvertFunction; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| contentType | FieldFormatsContentType | | + +Returns: + +`FieldFormatConvertFunction` + diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformat.getparamdefaults.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformat.getparamdefaults.md new file mode 100644 index 00000000000000..59afdc25df350a --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformat.getparamdefaults.md @@ -0,0 +1,17 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [FieldFormat](./kibana-plugin-plugins-data-public.fieldformat.md) > [getParamDefaults](./kibana-plugin-plugins-data-public.fieldformat.getparamdefaults.md) + +## FieldFormat.getParamDefaults() method + +Get parameter defaults {object} - parameter defaults + +Signature: + +```typescript +getParamDefaults(): Record; +``` +Returns: + +`Record` + diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformat.htmlconvert.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformat.htmlconvert.md new file mode 100644 index 00000000000000..945ac7ededff64 --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformat.htmlconvert.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [FieldFormat](./kibana-plugin-plugins-data-public.fieldformat.md) > [htmlConvert](./kibana-plugin-plugins-data-public.fieldformat.htmlconvert.md) + +## FieldFormat.htmlConvert property + + {htmlConvert} have to remove the protected because of https://github.com/Microsoft/TypeScript/issues/17293 + +Signature: + +```typescript +htmlConvert: HtmlContextTypeConvert | undefined; +``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformat.id.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformat.id.md new file mode 100644 index 00000000000000..91c3ff4f2d9a30 --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformat.id.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [FieldFormat](./kibana-plugin-plugins-data-public.fieldformat.md) > [id](./kibana-plugin-plugins-data-public.fieldformat.id.md) + +## FieldFormat.id property + + {string} - Field Format Id + +Signature: + +```typescript +static id: string; +``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformat.isinstanceoffieldformat.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformat.isinstanceoffieldformat.md new file mode 100644 index 00000000000000..c6afa27fe59528 --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformat.isinstanceoffieldformat.md @@ -0,0 +1,22 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [FieldFormat](./kibana-plugin-plugins-data-public.fieldformat.md) > [isInstanceOfFieldFormat](./kibana-plugin-plugins-data-public.fieldformat.isinstanceoffieldformat.md) + +## FieldFormat.isInstanceOfFieldFormat() method + +Signature: + +```typescript +static isInstanceOfFieldFormat(fieldFormat: any): fieldFormat is FieldFormat; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| fieldFormat | any | | + +Returns: + +`fieldFormat is FieldFormat` + diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformat.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformat.md new file mode 100644 index 00000000000000..b53e301c46c1cf --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformat.md @@ -0,0 +1,46 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [FieldFormat](./kibana-plugin-plugins-data-public.fieldformat.md) + +## FieldFormat class + +Signature: + +```typescript +export declare abstract class FieldFormat +``` + +## Constructors + +| Constructor | Modifiers | Description | +| --- | --- | --- | +| [(constructor)(\_params, getConfig)](./kibana-plugin-plugins-data-public.fieldformat._constructor_.md) | | Constructs a new instance of the FieldFormat class | + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [\_params](./kibana-plugin-plugins-data-public.fieldformat._params.md) | | any | | +| [convertObject](./kibana-plugin-plugins-data-public.fieldformat.convertobject.md) | | FieldFormatConvert | undefined | {FieldFormatConvert} have to remove the private because of https://github.com/Microsoft/TypeScript/issues/17293 | +| [fieldType](./kibana-plugin-plugins-data-public.fieldformat.fieldtype.md) | static | string | string[] | {string} - Field Format Type | +| [getConfig](./kibana-plugin-plugins-data-public.fieldformat.getconfig.md) | | FieldFormatsGetConfigFn | undefined | | +| [htmlConvert](./kibana-plugin-plugins-data-public.fieldformat.htmlconvert.md) | | HtmlContextTypeConvert | undefined | {htmlConvert} have to remove the protected because of https://github.com/Microsoft/TypeScript/issues/17293 | +| [id](./kibana-plugin-plugins-data-public.fieldformat.id.md) | static | string | {string} - Field Format Id | +| [textConvert](./kibana-plugin-plugins-data-public.fieldformat.textconvert.md) | | TextContextTypeConvert | undefined | {textConvert} have to remove the protected because of https://github.com/Microsoft/TypeScript/issues/17293 | +| [title](./kibana-plugin-plugins-data-public.fieldformat.title.md) | static | string | {string} - Field Format Title | +| [type](./kibana-plugin-plugins-data-public.fieldformat.type.md) | | any | {Function} - ref to child class | + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [convert(value, contentType, options)](./kibana-plugin-plugins-data-public.fieldformat.convert.md) | | Convert a raw value to a formatted string | +| [from(convertFn)](./kibana-plugin-plugins-data-public.fieldformat.from.md) | static | | +| [getConverterFor(contentType)](./kibana-plugin-plugins-data-public.fieldformat.getconverterfor.md) | | Get a convert function that is bound to a specific contentType | +| [getParamDefaults()](./kibana-plugin-plugins-data-public.fieldformat.getparamdefaults.md) | | Get parameter defaults {object} - parameter defaults | +| [isInstanceOfFieldFormat(fieldFormat)](./kibana-plugin-plugins-data-public.fieldformat.isinstanceoffieldformat.md) | static | | +| [param(name)](./kibana-plugin-plugins-data-public.fieldformat.param.md) | | Get the value of a param. This value may be a default value. | +| [params()](./kibana-plugin-plugins-data-public.fieldformat.params.md) | | Get all of the params in a single object {object} | +| [setupContentType()](./kibana-plugin-plugins-data-public.fieldformat.setupcontenttype.md) | | | +| [toJSON()](./kibana-plugin-plugins-data-public.fieldformat.tojson.md) | | Serialize this format to a simple POJO, with only the params that are not default {object} | + diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformat.param.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformat.param.md new file mode 100644 index 00000000000000..1e7fd9d161429b --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformat.param.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [FieldFormat](./kibana-plugin-plugins-data-public.fieldformat.md) > [param](./kibana-plugin-plugins-data-public.fieldformat.param.md) + +## FieldFormat.param() method + +Get the value of a param. This value may be a default value. + +Signature: + +```typescript +param(name: string): any; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| name | string | | + +Returns: + +`any` + diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformat.params.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformat.params.md new file mode 100644 index 00000000000000..5825af4925d066 --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformat.params.md @@ -0,0 +1,17 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [FieldFormat](./kibana-plugin-plugins-data-public.fieldformat.md) > [params](./kibana-plugin-plugins-data-public.fieldformat.params.md) + +## FieldFormat.params() method + +Get all of the params in a single object {object} + +Signature: + +```typescript +params(): Record; +``` +Returns: + +`Record` + diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformat.setupcontenttype.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformat.setupcontenttype.md new file mode 100644 index 00000000000000..41f5f2446f22aa --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformat.setupcontenttype.md @@ -0,0 +1,15 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [FieldFormat](./kibana-plugin-plugins-data-public.fieldformat.md) > [setupContentType](./kibana-plugin-plugins-data-public.fieldformat.setupcontenttype.md) + +## FieldFormat.setupContentType() method + +Signature: + +```typescript +setupContentType(): FieldFormatConvert; +``` +Returns: + +`FieldFormatConvert` + diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformat.textconvert.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformat.textconvert.md new file mode 100644 index 00000000000000..57ccca9136081f --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformat.textconvert.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [FieldFormat](./kibana-plugin-plugins-data-public.fieldformat.md) > [textConvert](./kibana-plugin-plugins-data-public.fieldformat.textconvert.md) + +## FieldFormat.textConvert property + + {textConvert} have to remove the protected because of https://github.com/Microsoft/TypeScript/issues/17293 + +Signature: + +```typescript +textConvert: TextContextTypeConvert | undefined; +``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformat.title.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformat.title.md new file mode 100644 index 00000000000000..b19246758f080b --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformat.title.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [FieldFormat](./kibana-plugin-plugins-data-public.fieldformat.md) > [title](./kibana-plugin-plugins-data-public.fieldformat.title.md) + +## FieldFormat.title property + + {string} - Field Format Title + +Signature: + +```typescript +static title: string; +``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformat.tojson.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformat.tojson.md new file mode 100644 index 00000000000000..5fa7d4841537b9 --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformat.tojson.md @@ -0,0 +1,25 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [FieldFormat](./kibana-plugin-plugins-data-public.fieldformat.md) > [toJSON](./kibana-plugin-plugins-data-public.fieldformat.tojson.md) + +## FieldFormat.toJSON() method + +Serialize this format to a simple POJO, with only the params that are not default + + {object} + +Signature: + +```typescript +toJSON(): { + id: unknown; + params: _.Dictionary | undefined; + }; +``` +Returns: + +`{ + id: unknown; + params: _.Dictionary | undefined; + }` + diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformat.type.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformat.type.md new file mode 100644 index 00000000000000..394a2e3cc9afbf --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformat.type.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [FieldFormat](./kibana-plugin-plugins-data-public.fieldformat.md) > [type](./kibana-plugin-plugins-data-public.fieldformat.type.md) + +## FieldFormat.type property + + {Function} - ref to child class + +Signature: + +```typescript +type: any; +``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.__spec.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.__spec.md deleted file mode 100644 index f52a3324af36f7..00000000000000 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.__spec.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [IndexPatternField](./kibana-plugin-plugins-data-public.indexpatternfield.md) > [$$spec](./kibana-plugin-plugins-data-public.indexpatternfield.__spec.md) - -## IndexPatternField.$$spec property - -Signature: - -```typescript -$$spec: FieldSpec; -``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.aggregatable.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.aggregatable.md deleted file mode 100644 index 267c8f786b5dd2..00000000000000 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.aggregatable.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [IndexPatternField](./kibana-plugin-plugins-data-public.indexpatternfield.md) > [aggregatable](./kibana-plugin-plugins-data-public.indexpatternfield.aggregatable.md) - -## IndexPatternField.aggregatable property - -Signature: - -```typescript -aggregatable?: boolean; -``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.count.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.count.md deleted file mode 100644 index 8e848276f21c4c..00000000000000 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.count.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [IndexPatternField](./kibana-plugin-plugins-data-public.indexpatternfield.md) > [count](./kibana-plugin-plugins-data-public.indexpatternfield.count.md) - -## IndexPatternField.count property - -Signature: - -```typescript -count?: number; -``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.displayname.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.displayname.md deleted file mode 100644 index ed9630f92fc975..00000000000000 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.displayname.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [IndexPatternField](./kibana-plugin-plugins-data-public.indexpatternfield.md) > [displayName](./kibana-plugin-plugins-data-public.indexpatternfield.displayname.md) - -## IndexPatternField.displayName property - -Signature: - -```typescript -displayName?: string; -``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.estypes.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.estypes.md deleted file mode 100644 index dec74df099d43a..00000000000000 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.estypes.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [IndexPatternField](./kibana-plugin-plugins-data-public.indexpatternfield.md) > [esTypes](./kibana-plugin-plugins-data-public.indexpatternfield.estypes.md) - -## IndexPatternField.esTypes property - -Signature: - -```typescript -esTypes?: string[]; -``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.filterable.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.filterable.md deleted file mode 100644 index 4290c4a2f86b3b..00000000000000 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.filterable.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [IndexPatternField](./kibana-plugin-plugins-data-public.indexpatternfield.md) > [filterable](./kibana-plugin-plugins-data-public.indexpatternfield.filterable.md) - -## IndexPatternField.filterable property - -Signature: - -```typescript -filterable?: boolean; -``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.format.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.format.md deleted file mode 100644 index d5df8ed628cb08..00000000000000 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.format.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [IndexPatternField](./kibana-plugin-plugins-data-public.indexpatternfield.md) > [format](./kibana-plugin-plugins-data-public.indexpatternfield.format.md) - -## IndexPatternField.format property - -Signature: - -```typescript -format: any; -``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.indexpattern.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.indexpattern.md deleted file mode 100644 index d1a1ee0905c6e3..00000000000000 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.indexpattern.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [IndexPatternField](./kibana-plugin-plugins-data-public.indexpatternfield.md) > [indexPattern](./kibana-plugin-plugins-data-public.indexpatternfield.indexpattern.md) - -## IndexPatternField.indexPattern property - -Signature: - -```typescript -indexPattern?: IndexPattern; -``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.lang.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.lang.md deleted file mode 100644 index f731be8f613cfa..00000000000000 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.lang.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [IndexPatternField](./kibana-plugin-plugins-data-public.indexpatternfield.md) > [lang](./kibana-plugin-plugins-data-public.indexpatternfield.lang.md) - -## IndexPatternField.lang property - -Signature: - -```typescript -lang?: string; -``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.md deleted file mode 100644 index df0de6ce0e5419..00000000000000 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.md +++ /dev/null @@ -1,40 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [IndexPatternField](./kibana-plugin-plugins-data-public.indexpatternfield.md) - -## IndexPatternField class - -Signature: - -```typescript -export declare class Field implements IFieldType -``` - -## Constructors - -| Constructor | Modifiers | Description | -| --- | --- | --- | -| [(constructor)(indexPattern, spec, shortDotsEnable)](./kibana-plugin-plugins-data-public.indexpatternfield._constructor_.md) | | Constructs a new instance of the Field class | - -## Properties - -| Property | Modifiers | Type | Description | -| --- | --- | --- | --- | -| [$$spec](./kibana-plugin-plugins-data-public.indexpatternfield.__spec.md) | | FieldSpec | | -| [aggregatable](./kibana-plugin-plugins-data-public.indexpatternfield.aggregatable.md) | | boolean | | -| [count](./kibana-plugin-plugins-data-public.indexpatternfield.count.md) | | number | | -| [displayName](./kibana-plugin-plugins-data-public.indexpatternfield.displayname.md) | | string | | -| [esTypes](./kibana-plugin-plugins-data-public.indexpatternfield.estypes.md) | | string[] | | -| [filterable](./kibana-plugin-plugins-data-public.indexpatternfield.filterable.md) | | boolean | | -| [format](./kibana-plugin-plugins-data-public.indexpatternfield.format.md) | | any | | -| [indexPattern](./kibana-plugin-plugins-data-public.indexpatternfield.indexpattern.md) | | IndexPattern | | -| [lang](./kibana-plugin-plugins-data-public.indexpatternfield.lang.md) | | string | | -| [name](./kibana-plugin-plugins-data-public.indexpatternfield.name.md) | | string | | -| [script](./kibana-plugin-plugins-data-public.indexpatternfield.script.md) | | string | | -| [scripted](./kibana-plugin-plugins-data-public.indexpatternfield.scripted.md) | | boolean | | -| [searchable](./kibana-plugin-plugins-data-public.indexpatternfield.searchable.md) | | boolean | | -| [sortable](./kibana-plugin-plugins-data-public.indexpatternfield.sortable.md) | | boolean | | -| [subType](./kibana-plugin-plugins-data-public.indexpatternfield.subtype.md) | | IFieldSubType | | -| [type](./kibana-plugin-plugins-data-public.indexpatternfield.type.md) | | string | | -| [visualizable](./kibana-plugin-plugins-data-public.indexpatternfield.visualizable.md) | | boolean | | - diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.name.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.name.md deleted file mode 100644 index cb24621e732093..00000000000000 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.name.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [IndexPatternField](./kibana-plugin-plugins-data-public.indexpatternfield.md) > [name](./kibana-plugin-plugins-data-public.indexpatternfield.name.md) - -## IndexPatternField.name property - -Signature: - -```typescript -name: string; -``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.script.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.script.md deleted file mode 100644 index 132ba25a476374..00000000000000 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.script.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [IndexPatternField](./kibana-plugin-plugins-data-public.indexpatternfield.md) > [script](./kibana-plugin-plugins-data-public.indexpatternfield.script.md) - -## IndexPatternField.script property - -Signature: - -```typescript -script?: string; -``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.scripted.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.scripted.md deleted file mode 100644 index 1dd6bc865a75d9..00000000000000 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.scripted.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [IndexPatternField](./kibana-plugin-plugins-data-public.indexpatternfield.md) > [scripted](./kibana-plugin-plugins-data-public.indexpatternfield.scripted.md) - -## IndexPatternField.scripted property - -Signature: - -```typescript -scripted?: boolean; -``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.searchable.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.searchable.md deleted file mode 100644 index 42f984d851435b..00000000000000 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.searchable.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [IndexPatternField](./kibana-plugin-plugins-data-public.indexpatternfield.md) > [searchable](./kibana-plugin-plugins-data-public.indexpatternfield.searchable.md) - -## IndexPatternField.searchable property - -Signature: - -```typescript -searchable?: boolean; -``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.sortable.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.sortable.md deleted file mode 100644 index 72d225185140be..00000000000000 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.sortable.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [IndexPatternField](./kibana-plugin-plugins-data-public.indexpatternfield.md) > [sortable](./kibana-plugin-plugins-data-public.indexpatternfield.sortable.md) - -## IndexPatternField.sortable property - -Signature: - -```typescript -sortable?: boolean; -``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.subtype.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.subtype.md deleted file mode 100644 index 2d807f8a5739ce..00000000000000 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.subtype.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [IndexPatternField](./kibana-plugin-plugins-data-public.indexpatternfield.md) > [subType](./kibana-plugin-plugins-data-public.indexpatternfield.subtype.md) - -## IndexPatternField.subType property - -Signature: - -```typescript -subType?: IFieldSubType; -``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.type.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.type.md deleted file mode 100644 index c8483c9b83c9a1..00000000000000 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.type.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [IndexPatternField](./kibana-plugin-plugins-data-public.indexpatternfield.md) > [type](./kibana-plugin-plugins-data-public.indexpatternfield.type.md) - -## IndexPatternField.type property - -Signature: - -```typescript -type: string; -``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.visualizable.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.visualizable.md deleted file mode 100644 index dd661ae779c117..00000000000000 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.visualizable.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [IndexPatternField](./kibana-plugin-plugins-data-public.indexpatternfield.md) > [visualizable](./kibana-plugin-plugins-data-public.indexpatternfield.visualizable.md) - -## IndexPatternField.visualizable property - -Signature: - -```typescript -visualizable?: boolean; -``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.md index 604ac5120922bf..0fd82ffb2240c8 100644 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.md +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.md @@ -11,9 +11,10 @@ | [AggParamType](./kibana-plugin-plugins-data-public.aggparamtype.md) | | | [AggTypeFieldFilters](./kibana-plugin-plugins-data-public.aggtypefieldfilters.md) | A registry to store which are used to filter down available fields for a specific visualization and . | | [AggTypeFilters](./kibana-plugin-plugins-data-public.aggtypefilters.md) | A registry to store which are used to filter down available aggregations for a specific visualization and . | +| [Field](./kibana-plugin-plugins-data-public.field.md) | | +| [FieldFormat](./kibana-plugin-plugins-data-public.fieldformat.md) | | | [FilterManager](./kibana-plugin-plugins-data-public.filtermanager.md) | | | [IndexPattern](./kibana-plugin-plugins-data-public.indexpattern.md) | | -| [IndexPatternField](./kibana-plugin-plugins-data-public.indexpatternfield.md) | | | [IndexPatternFieldList](./kibana-plugin-plugins-data-public.indexpatternfieldlist.md) | | | [IndexPatternSelect](./kibana-plugin-plugins-data-public.indexpatternselect.md) | | | [OptionedParamType](./kibana-plugin-plugins-data-public.optionedparamtype.md) | | diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.plugin.setup.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.plugin.setup.md index 4d7a0b3cfbbca5..bd617990a00a2f 100644 --- a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.plugin.setup.md +++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.plugin.setup.md @@ -9,7 +9,7 @@ ```typescript setup(core: CoreSetup, { usageCollection }: DataPluginSetupDependencies): { fieldFormats: { - register: (customFieldFormat: import("../common").FieldFormatInstanceType) => number; + register: (customFieldFormat: import("../public").FieldFormatInstanceType) => number; }; search: ISearchSetup; }; @@ -26,7 +26,7 @@ setup(core: CoreSetup, { usageCollection }: DataPluginSetupDependencies): { `{ fieldFormats: { - register: (customFieldFormat: import("../common").FieldFormatInstanceType) => number; + register: (customFieldFormat: import("../public").FieldFormatInstanceType) => number; }; search: ISearchSetup; }` diff --git a/docs/management/advanced-options.asciidoc b/docs/management/advanced-options.asciidoc index 7081590931a992..51910169e8673a 100644 --- a/docs/management/advanced-options.asciidoc +++ b/docs/management/advanced-options.asciidoc @@ -142,7 +142,14 @@ This setting does not have an effect when loading a saved search. Highlighting slows requests when working on big documents. +[float] +[[kibana-ml-settings]] +==== Machine learning +[horizontal] +`ml:fileDataVisualizerMaxFileSize`:: Sets the file size limit when importing +data in the {data-viz}. The default value is `100MB`. The highest supported +value for this setting is `1GB`. [float] diff --git a/docs/settings/ml-settings.asciidoc b/docs/settings/ml-settings.asciidoc index b71e1c672756ac..36578c909f5131 100644 --- a/docs/settings/ml-settings.asciidoc +++ b/docs/settings/ml-settings.asciidoc @@ -19,10 +19,4 @@ instance. If `xpack.ml.enabled` is set to `true` in `elasticsearch.yml`, however you can still use the {ml} APIs. To disable {ml} entirely, see the {ref}/ml-settings.html[{es} {ml} settings]. -[[data-visualizer-settings]] -==== {data-viz} settings - -`xpack.ml.file_data_visualizer.max_file_size`:: -Sets the file size limit when importing data in the {data-viz}. The default -value is `100MB`. The highest supported value for this setting is `1GB`. diff --git a/docs/user/ml/index.asciidoc b/docs/user/ml/index.asciidoc index e9ef4a55b2b3ae..6483ddde073350 100644 --- a/docs/user/ml/index.asciidoc +++ b/docs/user/ml/index.asciidoc @@ -20,7 +20,7 @@ image::user/ml/images/ml-data-visualizer-sample.jpg[{data-viz} for sample flight experimental[] You can also upload a CSV, NDJSON, or log file. The *{data-viz}* identifies the file format and field mappings. You can then optionally import that data into an {es} index. To change the default file size limit, see -<>. +<>. You need the following permissions to use the {data-viz} with file upload: diff --git a/package.json b/package.json index bfea8c7423f9c8..0ad304fdf2f690 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,8 @@ "data/optimize", "built_assets", ".eslintcache", - ".node_binaries" + ".node_binaries", + "src/plugins/*/target" ] } }, diff --git a/packages/kbn-dev-utils/package.json b/packages/kbn-dev-utils/package.json index ee9f349f490517..08b2e5b226967e 100644 --- a/packages/kbn-dev-utils/package.json +++ b/packages/kbn-dev-utils/package.json @@ -10,6 +10,7 @@ "kbn:watch": "yarn build --watch" }, "dependencies": { + "axios": "^0.19.0", "chalk": "^2.4.2", "dedent": "^0.7.0", "execa": "^4.0.0", diff --git a/packages/kbn-dev-utils/src/ci_stats_reporter/README.md b/packages/kbn-dev-utils/src/ci_stats_reporter/README.md new file mode 100644 index 00000000000000..6133f9871699f9 --- /dev/null +++ b/packages/kbn-dev-utils/src/ci_stats_reporter/README.md @@ -0,0 +1,23 @@ +# Kibana CI Stats reporter + +We're working on building a new service, the Kibana CI Stats service, which will collect information about CI runs and metrics produced while testing Kibana, and then provide tools for reporting on those metrics in specific PRs and overall as a way to spot trends. + +### `CiStatsReporter` + +This class integrates with the `ciStats.trackBuild {}` Jenkins Pipeline function, consuming the `KIBANA_CI_STATS_CONFIG` variable produced by that wrapper, and then allowing test code to report stats to the service. + +To create an instance of the reporter, import the class and call `CiStatsReporter.fromEnv(log)` (passing it a tooling log). + +#### `CiStatsReporter#metric(name: string, subName: string, value: number)` + +Use this method to record metrics in the Kibana CI Stats service. + +Example: + +```ts +import { CiStatsReporter, ToolingLog } from '@kbn/dev-utils'; + +const log = new ToolingLog(...); +const reporter = CiStatsReporter.fromEnv(log) +reporter.metric('Build speed', specificBuildName, timeToRunBuild) +``` \ No newline at end of file diff --git a/packages/kbn-dev-utils/src/ci_stats_reporter/ci_stats_reporter.ts b/packages/kbn-dev-utils/src/ci_stats_reporter/ci_stats_reporter.ts new file mode 100644 index 00000000000000..5fe1844a85563c --- /dev/null +++ b/packages/kbn-dev-utils/src/ci_stats_reporter/ci_stats_reporter.ts @@ -0,0 +1,153 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { inspect } from 'util'; + +import Axios from 'axios'; + +import { ToolingLog } from '../tooling_log'; + +interface Config { + apiUrl: string; + apiToken: string; + buildId: string; +} + +function parseConfig(log: ToolingLog) { + const configJson = process.env.KIBANA_CI_STATS_CONFIG; + if (!configJson) { + log.debug('KIBANA_CI_STATS_CONFIG environment variable not found, disabling CiStatsReporter'); + return; + } + + let config: unknown; + try { + config = JSON.parse(configJson); + } catch (_) { + // handled below + } + + if (typeof config === 'object' && config !== null) { + return validateConfig(log, config as { [k in keyof Config]: unknown }); + } + + log.warning('KIBANA_CI_STATS_CONFIG is invalid, stats will not be reported'); + return; +} + +function validateConfig(log: ToolingLog, config: { [k in keyof Config]: unknown }) { + const validApiUrl = typeof config.apiUrl === 'string' && config.apiUrl.length !== 0; + if (!validApiUrl) { + log.warning('KIBANA_CI_STATS_CONFIG is missing a valid api url, stats will not be reported'); + return; + } + + const validApiToken = typeof config.apiToken === 'string' && config.apiToken.length !== 0; + if (!validApiToken) { + log.warning('KIBANA_CI_STATS_CONFIG is missing a valid api token, stats will not be reported'); + return; + } + + const validId = typeof config.buildId === 'string' && config.buildId.length !== 0; + if (!validId) { + log.warning('KIBANA_CI_STATS_CONFIG is missing a valid build id, stats will not be reported'); + return; + } + + return config as Config; +} + +export class CiStatsReporter { + static fromEnv(log: ToolingLog) { + return new CiStatsReporter(parseConfig(log), log); + } + + constructor(private config: Config | undefined, private log: ToolingLog) {} + + isEnabled() { + return !!this.config; + } + + async metric(name: string, subName: string, value: number) { + if (!this.config) { + return; + } + + let attempt = 0; + const maxAttempts = 5; + + while (true) { + attempt += 1; + + try { + await Axios.request({ + method: 'POST', + url: '/metric', + baseURL: this.config.apiUrl, + params: { + buildId: this.config.buildId, + }, + headers: { + Authorization: `token ${this.config.apiToken}`, + }, + data: { + name, + subName, + value, + }, + }); + + return; + } catch (error) { + if (!error?.request) { + // not an axios error, must be a usage error that we should notify user about + throw error; + } + + if (error?.response && error.response.status !== 502) { + // error response from service was received so warn the user and move on + this.log.warning( + `error recording metric [status=${error.response.status}] [resp=${inspect( + error.response.data + )}] [${name}/${subName}=${value}]` + ); + return; + } + + if (attempt === maxAttempts) { + this.log.warning( + `failed to reach kibana-ci-stats service too many times, unable to record metric [${name}/${subName}=${value}]` + ); + return; + } + + // we failed to reach the backend and we have remaining attempts, lets retry after a short delay + const reason = error?.response?.status + ? `${error.response.status} response` + : 'no response'; + + this.log.warning( + `failed to reach kibana-ci-stats service [reason=${reason}], retrying in ${attempt} seconds` + ); + + await new Promise(resolve => setTimeout(resolve, attempt * 1000)); + } + } + } +} diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/default/index.js b/packages/kbn-dev-utils/src/ci_stats_reporter/index.ts similarity index 94% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/default/index.js rename to packages/kbn-dev-utils/src/ci_stats_reporter/index.ts index 506002df4fd075..3487de08f034d2 100644 --- a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/default/index.js +++ b/packages/kbn-dev-utils/src/ci_stats_reporter/index.ts @@ -17,4 +17,4 @@ * under the License. */ -export { DefaultFormatEditor } from './default'; +export * from './ci_stats_reporter'; diff --git a/packages/kbn-dev-utils/src/index.ts b/packages/kbn-dev-utils/src/index.ts index 305e29a0e41df6..40ee72d94729fd 100644 --- a/packages/kbn-dev-utils/src/index.ts +++ b/packages/kbn-dev-utils/src/index.ts @@ -37,3 +37,4 @@ export { run, createFailError, createFlagError, combineErrors, isFailError, Flag export { REPO_ROOT } from './repo_root'; export { KbnClient } from './kbn_client'; export * from './axios'; +export * from './ci_stats_reporter'; diff --git a/packages/kbn-optimizer/src/cli.ts b/packages/kbn-optimizer/src/cli.ts index c0bb408d60d8f8..e46075eff63a77 100644 --- a/packages/kbn-optimizer/src/cli.ts +++ b/packages/kbn-optimizer/src/cli.ts @@ -21,10 +21,11 @@ import 'source-map-support/register'; import Path from 'path'; -import { run, REPO_ROOT, createFlagError } from '@kbn/dev-utils'; +import { run, REPO_ROOT, createFlagError, createFailError, CiStatsReporter } from '@kbn/dev-utils'; import { logOptimizerState } from './log_optimizer_state'; import { OptimizerConfig } from './optimizer'; +import { reportOptimizerStats } from './report_optimizer_stats'; import { runOptimizer } from './run_optimizer'; run( @@ -81,6 +82,11 @@ run( throw createFlagError('expected --scan-dir to be a string'); } + const reportStatsName = flags['report-stats']; + if (reportStatsName !== undefined && typeof reportStatsName !== 'string') { + throw createFlagError('expected --report-stats to be a string'); + } + const config = OptimizerConfig.create({ repoRoot: REPO_ROOT, watch, @@ -95,14 +101,24 @@ run( includeCoreBundle, }); - await runOptimizer(config) - .pipe(logOptimizerState(log, config)) - .toPromise(); + let update$ = runOptimizer(config); + + if (reportStatsName) { + const reporter = CiStatsReporter.fromEnv(log); + + if (!reporter.isEnabled()) { + throw createFailError('Unable to initialize CiStatsReporter from env'); + } + + update$ = update$.pipe(reportOptimizerStats(reporter, reportStatsName)); + } + + await update$.pipe(logOptimizerState(log, config)).toPromise(); }, { flags: { boolean: ['core', 'watch', 'oss', 'examples', 'dist', 'cache', 'profile', 'inspect-workers'], - string: ['workers', 'scan-dir'], + string: ['workers', 'scan-dir', 'report-stats'], default: { core: true, examples: true, @@ -120,6 +136,7 @@ run( --dist create bundles that are suitable for inclusion in the Kibana distributable --scan-dir add a directory to the list of directories scanned for plugins (specify as many times as necessary) --no-inspect-workers when inspecting the parent process, don't inspect the workers + --report-stats=[name] attempt to report stats about this execution of the build to the kibana-ci-stats service using this name `, }, } diff --git a/packages/kbn-optimizer/src/index.ts b/packages/kbn-optimizer/src/index.ts index 8026cf39db73dc..29922944e88172 100644 --- a/packages/kbn-optimizer/src/index.ts +++ b/packages/kbn-optimizer/src/index.ts @@ -21,3 +21,4 @@ export { OptimizerConfig } from './optimizer'; export * from './run_optimizer'; export * from './log_optimizer_state'; export * from './common/disallowed_syntax_plugin'; +export * from './report_optimizer_stats'; diff --git a/packages/kbn-optimizer/src/optimizer/handle_optimizer_completion.ts b/packages/kbn-optimizer/src/optimizer/handle_optimizer_completion.ts index 5dd500cd7a9e4f..b4b02649259a29 100644 --- a/packages/kbn-optimizer/src/optimizer/handle_optimizer_completion.ts +++ b/packages/kbn-optimizer/src/optimizer/handle_optimizer_completion.ts @@ -17,20 +17,20 @@ * under the License. */ -import * as Rx from 'rxjs'; import { tap } from 'rxjs/operators'; import { createFailError } from '@kbn/dev-utils'; -import { pipeClosure, Update } from '../common'; +import { pipeClosure } from '../common'; +import { OptimizerUpdate$ } from '../run_optimizer'; import { OptimizerState } from './optimizer_state'; import { OptimizerConfig } from './optimizer_config'; export function handleOptimizerCompletion(config: OptimizerConfig) { - return pipeClosure((source$: Rx.Observable>) => { + return pipeClosure((update$: OptimizerUpdate$) => { let prevState: OptimizerState | undefined; - return source$.pipe( + return update$.pipe( tap({ next: update => { prevState = update.state; diff --git a/packages/kbn-optimizer/src/report_optimizer_stats.ts b/packages/kbn-optimizer/src/report_optimizer_stats.ts new file mode 100644 index 00000000000000..375978b9b79447 --- /dev/null +++ b/packages/kbn-optimizer/src/report_optimizer_stats.ts @@ -0,0 +1,46 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { materialize, mergeMap, dematerialize } from 'rxjs/operators'; +import { CiStatsReporter } from '@kbn/dev-utils'; + +import { OptimizerUpdate$ } from './run_optimizer'; +import { OptimizerState } from './optimizer'; +import { pipeClosure } from './common'; + +export function reportOptimizerStats(reporter: CiStatsReporter, name: string) { + return pipeClosure((update$: OptimizerUpdate$) => { + let lastState: OptimizerState | undefined; + return update$.pipe( + materialize(), + mergeMap(async n => { + if (n.kind === 'N' && n.value?.state) { + lastState = n.value?.state; + } + + if (n.kind === 'C' && lastState) { + await reporter.metric('@kbn/optimizer build time', name, lastState.durSec); + } + + return n; + }), + dematerialize() + ); + }); +} diff --git a/packages/kbn-pm/dist/index.js b/packages/kbn-pm/dist/index.js index b9219566427286..28cf36dedba3f3 100644 --- a/packages/kbn-pm/dist/index.js +++ b/packages/kbn-pm/dist/index.js @@ -94,21 +94,21 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _cli__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "run", function() { return _cli__WEBPACK_IMPORTED_MODULE_0__["run"]; }); -/* harmony import */ var _production__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(703); +/* harmony import */ var _production__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(705); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "buildProductionProjects", function() { return _production__WEBPACK_IMPORTED_MODULE_1__["buildProductionProjects"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "prepareExternalProjectDependencies", function() { return _production__WEBPACK_IMPORTED_MODULE_1__["prepareExternalProjectDependencies"]; }); -/* harmony import */ var _utils_projects__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(500); +/* harmony import */ var _utils_projects__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(502); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getProjects", function() { return _utils_projects__WEBPACK_IMPORTED_MODULE_2__["getProjects"]; }); -/* harmony import */ var _utils_project__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(515); +/* harmony import */ var _utils_project__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(517); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Project", function() { return _utils_project__WEBPACK_IMPORTED_MODULE_3__["Project"]; }); -/* harmony import */ var _utils_workspaces__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(576); +/* harmony import */ var _utils_workspaces__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(578); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "copyWorkspacePackages", function() { return _utils_workspaces__WEBPACK_IMPORTED_MODULE_4__["copyWorkspacePackages"]; }); -/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(577); +/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(579); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getProjectPaths", function() { return _config__WEBPACK_IMPORTED_MODULE_5__["getProjectPaths"]; }); /* @@ -152,7 +152,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(16); /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _commands__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(17); -/* harmony import */ var _run__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(687); +/* harmony import */ var _run__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(689); /* harmony import */ var _utils_log__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(34); /* * Licensed to Elasticsearch B.V. under one or more contributor @@ -2506,9 +2506,9 @@ module.exports = require("path"); __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "commands", function() { return commands; }); /* harmony import */ var _bootstrap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(18); -/* harmony import */ var _clean__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(584); -/* harmony import */ var _run__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(684); -/* harmony import */ var _watch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(685); +/* harmony import */ var _clean__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(586); +/* harmony import */ var _run__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(686); +/* harmony import */ var _watch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(687); /* * Licensed to Elasticsearch B.V. under one or more contributor * license agreements. See the NOTICE file distributed with @@ -2549,10 +2549,10 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(chalk__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _utils_link_project_executables__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(19); /* harmony import */ var _utils_log__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(34); -/* harmony import */ var _utils_parallelize__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(499); -/* harmony import */ var _utils_projects__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(500); -/* harmony import */ var _utils_project_checksums__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(578); -/* harmony import */ var _utils_bootstrap_cache_file__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(583); +/* harmony import */ var _utils_parallelize__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(501); +/* harmony import */ var _utils_projects__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(502); +/* harmony import */ var _utils_project_checksums__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(580); +/* harmony import */ var _utils_bootstrap_cache_file__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(585); /* * Licensed to Elasticsearch B.V. under one or more contributor * license agreements. See the NOTICE file distributed with @@ -4517,6 +4517,7 @@ exports.REPO_ROOT = repo_root_1.REPO_ROOT; var kbn_client_1 = __webpack_require__(449); exports.KbnClient = kbn_client_1.KbnClient; tslib_1.__exportStar(__webpack_require__(492), exports); +tslib_1.__exportStar(__webpack_require__(499), exports); /***/ }), @@ -40169,9 +40170,9 @@ module.exports = __webpack_require__(454); var utils = __webpack_require__(455); var bind = __webpack_require__(456); -var Axios = __webpack_require__(458); +var Axios = __webpack_require__(457); var mergeConfig = __webpack_require__(488); -var defaults = __webpack_require__(464); +var defaults = __webpack_require__(463); /** * Create an instance of Axios @@ -40206,7 +40207,7 @@ axios.create = function create(instanceConfig) { // Expose Cancel & CancelToken axios.Cancel = __webpack_require__(489); axios.CancelToken = __webpack_require__(490); -axios.isCancel = __webpack_require__(463); +axios.isCancel = __webpack_require__(462); // Expose all/spread axios.all = function all(promises) { @@ -40228,7 +40229,6 @@ module.exports.default = axios; var bind = __webpack_require__(456); -var isBuffer = __webpack_require__(457); /*global toString:true*/ @@ -40246,6 +40246,27 @@ function isArray(val) { return toString.call(val) === '[object Array]'; } +/** + * Determine if a value is undefined + * + * @param {Object} val The value to test + * @returns {boolean} True if the value is undefined, otherwise false + */ +function isUndefined(val) { + return typeof val === 'undefined'; +} + +/** + * Determine if a value is a Buffer + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Buffer, otherwise false + */ +function isBuffer(val) { + return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) + && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val); +} + /** * Determine if a value is an ArrayBuffer * @@ -40302,16 +40323,6 @@ function isNumber(val) { return typeof val === 'number'; } -/** - * Determine if a value is undefined - * - * @param {Object} val The value to test - * @returns {boolean} True if the value is undefined, otherwise false - */ -function isUndefined(val) { - return typeof val === 'undefined'; -} - /** * Determine if a value is an Object * @@ -40581,32 +40592,15 @@ module.exports = function bind(fn, thisArg) { /***/ }), /* 457 */ -/***/ (function(module, exports) { - -/*! - * Determine if an object is a Buffer - * - * @author Feross Aboukhadijeh - * @license MIT - */ - -module.exports = function isBuffer (obj) { - return obj != null && obj.constructor != null && - typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj) -} - - -/***/ }), -/* 458 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var utils = __webpack_require__(455); -var buildURL = __webpack_require__(459); -var InterceptorManager = __webpack_require__(460); -var dispatchRequest = __webpack_require__(461); +var buildURL = __webpack_require__(458); +var InterceptorManager = __webpack_require__(459); +var dispatchRequest = __webpack_require__(460); var mergeConfig = __webpack_require__(488); /** @@ -40638,7 +40632,15 @@ Axios.prototype.request = function request(config) { } config = mergeConfig(this.defaults, config); - config.method = config.method ? config.method.toLowerCase() : 'get'; + + // Set config.method + if (config.method) { + config.method = config.method.toLowerCase(); + } else if (this.defaults.method) { + config.method = this.defaults.method.toLowerCase(); + } else { + config.method = 'get'; + } // Hook up interceptors middleware var chain = [dispatchRequest, undefined]; @@ -40690,7 +40692,7 @@ module.exports = Axios; /***/ }), -/* 459 */ +/* 458 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -40768,7 +40770,7 @@ module.exports = function buildURL(url, params, paramsSerializer) { /***/ }), -/* 460 */ +/* 459 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -40827,18 +40829,16 @@ module.exports = InterceptorManager; /***/ }), -/* 461 */ +/* 460 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var utils = __webpack_require__(455); -var transformData = __webpack_require__(462); -var isCancel = __webpack_require__(463); -var defaults = __webpack_require__(464); -var isAbsoluteURL = __webpack_require__(486); -var combineURLs = __webpack_require__(487); +var transformData = __webpack_require__(461); +var isCancel = __webpack_require__(462); +var defaults = __webpack_require__(463); /** * Throws a `Cancel` if cancellation has been requested. @@ -40858,11 +40858,6 @@ function throwIfCancellationRequested(config) { module.exports = function dispatchRequest(config) { throwIfCancellationRequested(config); - // Support baseURL config - if (config.baseURL && !isAbsoluteURL(config.url)) { - config.url = combineURLs(config.baseURL, config.url); - } - // Ensure headers exist config.headers = config.headers || {}; @@ -40877,7 +40872,7 @@ module.exports = function dispatchRequest(config) { config.headers = utils.merge( config.headers.common || {}, config.headers[config.method] || {}, - config.headers || {} + config.headers ); utils.forEach( @@ -40920,7 +40915,7 @@ module.exports = function dispatchRequest(config) { /***/ }), -/* 462 */ +/* 461 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -40947,7 +40942,7 @@ module.exports = function transformData(data, headers, fns) { /***/ }), -/* 463 */ +/* 462 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -40959,14 +40954,14 @@ module.exports = function isCancel(value) { /***/ }), -/* 464 */ +/* 463 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var utils = __webpack_require__(455); -var normalizeHeaderName = __webpack_require__(465); +var normalizeHeaderName = __webpack_require__(464); var DEFAULT_CONTENT_TYPE = { 'Content-Type': 'application/x-www-form-urlencoded' @@ -40980,13 +40975,12 @@ function setContentTypeIfUnset(headers, value) { function getDefaultAdapter() { var adapter; - // Only Node.JS has a process variable that is of [[Class]] process - if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') { - // For node use HTTP adapter - adapter = __webpack_require__(466); - } else if (typeof XMLHttpRequest !== 'undefined') { + if (typeof XMLHttpRequest !== 'undefined') { // For browsers use XHR adapter - adapter = __webpack_require__(482); + adapter = __webpack_require__(465); + } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') { + // For node use HTTP adapter + adapter = __webpack_require__(475); } return adapter; } @@ -41064,7 +41058,7 @@ module.exports = defaults; /***/ }), -/* 465 */ +/* 464 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -41083,295 +41077,200 @@ module.exports = function normalizeHeaderName(headers, normalizedName) { /***/ }), -/* 466 */ +/* 465 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var utils = __webpack_require__(455); -var settle = __webpack_require__(467); -var buildURL = __webpack_require__(459); -var http = __webpack_require__(470); -var https = __webpack_require__(471); -var httpFollow = __webpack_require__(472).http; -var httpsFollow = __webpack_require__(472).https; -var url = __webpack_require__(452); -var zlib = __webpack_require__(480); -var pkg = __webpack_require__(481); -var createError = __webpack_require__(468); -var enhanceError = __webpack_require__(469); - -var isHttps = /https:?/; +var settle = __webpack_require__(466); +var buildURL = __webpack_require__(458); +var buildFullPath = __webpack_require__(469); +var parseHeaders = __webpack_require__(472); +var isURLSameOrigin = __webpack_require__(473); +var createError = __webpack_require__(467); -/*eslint consistent-return:0*/ -module.exports = function httpAdapter(config) { - return new Promise(function dispatchHttpRequest(resolvePromise, rejectPromise) { - var timer; - var resolve = function resolve(value) { - clearTimeout(timer); - resolvePromise(value); - }; - var reject = function reject(value) { - clearTimeout(timer); - rejectPromise(value); - }; - var data = config.data; - var headers = config.headers; +module.exports = function xhrAdapter(config) { + return new Promise(function dispatchXhrRequest(resolve, reject) { + var requestData = config.data; + var requestHeaders = config.headers; - // Set User-Agent (required by some servers) - // Only set header if it hasn't been set in config - // See https://github.com/axios/axios/issues/69 - if (!headers['User-Agent'] && !headers['user-agent']) { - headers['User-Agent'] = 'axios/' + pkg.version; + if (utils.isFormData(requestData)) { + delete requestHeaders['Content-Type']; // Let the browser set it } - if (data && !utils.isStream(data)) { - if (Buffer.isBuffer(data)) { - // Nothing to do... - } else if (utils.isArrayBuffer(data)) { - data = Buffer.from(new Uint8Array(data)); - } else if (utils.isString(data)) { - data = Buffer.from(data, 'utf-8'); - } else { - return reject(createError( - 'Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream', - config - )); - } - - // Add Content-Length header if data exists - headers['Content-Length'] = data.length; - } + var request = new XMLHttpRequest(); // HTTP basic authentication - var auth = undefined; if (config.auth) { var username = config.auth.username || ''; var password = config.auth.password || ''; - auth = username + ':' + password; + requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password); } - // Parse url - var parsed = url.parse(config.url); - var protocol = parsed.protocol || 'http:'; + var fullPath = buildFullPath(config.baseURL, config.url); + request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true); - if (!auth && parsed.auth) { - var urlAuth = parsed.auth.split(':'); - var urlUsername = urlAuth[0] || ''; - var urlPassword = urlAuth[1] || ''; - auth = urlUsername + ':' + urlPassword; - } + // Set the request timeout in MS + request.timeout = config.timeout; - if (auth) { - delete headers.Authorization; - } + // Listen for ready state + request.onreadystatechange = function handleLoad() { + if (!request || request.readyState !== 4) { + return; + } - var isHttpsRequest = isHttps.test(protocol); - var agent = isHttpsRequest ? config.httpsAgent : config.httpAgent; + // The request errored out and we didn't get a response, this will be + // handled by onerror instead + // With one exception: request that using file: protocol, most browsers + // will return status as 0 even though it's a successful request + if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) { + return; + } - var options = { - path: buildURL(parsed.path, config.params, config.paramsSerializer).replace(/^\?/, ''), - method: config.method.toUpperCase(), - headers: headers, - agent: agent, - auth: auth - }; + // Prepare the response + var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null; + var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response; + var response = { + data: responseData, + status: request.status, + statusText: request.statusText, + headers: responseHeaders, + config: config, + request: request + }; - if (config.socketPath) { - options.socketPath = config.socketPath; - } else { - options.hostname = parsed.hostname; - options.port = parsed.port; - } + settle(resolve, reject, response); - var proxy = config.proxy; - if (!proxy && proxy !== false) { - var proxyEnv = protocol.slice(0, -1) + '_proxy'; - var proxyUrl = process.env[proxyEnv] || process.env[proxyEnv.toUpperCase()]; - if (proxyUrl) { - var parsedProxyUrl = url.parse(proxyUrl); - var noProxyEnv = process.env.no_proxy || process.env.NO_PROXY; - var shouldProxy = true; + // Clean up request + request = null; + }; - if (noProxyEnv) { - var noProxy = noProxyEnv.split(',').map(function trim(s) { - return s.trim(); - }); + // Handle browser request cancellation (as opposed to a manual cancellation) + request.onabort = function handleAbort() { + if (!request) { + return; + } - shouldProxy = !noProxy.some(function proxyMatch(proxyElement) { - if (!proxyElement) { - return false; - } - if (proxyElement === '*') { - return true; - } - if (proxyElement[0] === '.' && - parsed.hostname.substr(parsed.hostname.length - proxyElement.length) === proxyElement && - proxyElement.match(/\./g).length === parsed.hostname.match(/\./g).length) { - return true; - } + reject(createError('Request aborted', config, 'ECONNABORTED', request)); - return parsed.hostname === proxyElement; - }); - } + // Clean up request + request = null; + }; + // Handle low level network errors + request.onerror = function handleError() { + // Real errors are hidden from us by the browser + // onerror should only fire if it's a network error + reject(createError('Network Error', config, null, request)); - if (shouldProxy) { - proxy = { - host: parsedProxyUrl.hostname, - port: parsedProxyUrl.port - }; + // Clean up request + request = null; + }; - if (parsedProxyUrl.auth) { - var proxyUrlAuth = parsedProxyUrl.auth.split(':'); - proxy.auth = { - username: proxyUrlAuth[0], - password: proxyUrlAuth[1] - }; - } - } + // Handle timeout + request.ontimeout = function handleTimeout() { + var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded'; + if (config.timeoutErrorMessage) { + timeoutErrorMessage = config.timeoutErrorMessage; } - } + reject(createError(timeoutErrorMessage, config, 'ECONNABORTED', + request)); - if (proxy) { - options.hostname = proxy.host; - options.host = proxy.host; - options.headers.host = parsed.hostname + (parsed.port ? ':' + parsed.port : ''); - options.port = proxy.port; - options.path = protocol + '//' + parsed.hostname + (parsed.port ? ':' + parsed.port : '') + options.path; + // Clean up request + request = null; + }; - // Basic proxy authorization - if (proxy.auth) { - var base64 = Buffer.from(proxy.auth.username + ':' + proxy.auth.password, 'utf8').toString('base64'); - options.headers['Proxy-Authorization'] = 'Basic ' + base64; - } - } + // Add xsrf header + // This is only done if running in a standard browser environment. + // Specifically not if we're in a web worker, or react-native. + if (utils.isStandardBrowserEnv()) { + var cookies = __webpack_require__(474); - var transport; - var isHttpsProxy = isHttpsRequest && (proxy ? isHttps.test(proxy.protocol) : true); - if (config.transport) { - transport = config.transport; - } else if (config.maxRedirects === 0) { - transport = isHttpsProxy ? https : http; - } else { - if (config.maxRedirects) { - options.maxRedirects = config.maxRedirects; + // Add xsrf header + var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ? + cookies.read(config.xsrfCookieName) : + undefined; + + if (xsrfValue) { + requestHeaders[config.xsrfHeaderName] = xsrfValue; } - transport = isHttpsProxy ? httpsFollow : httpFollow; } - if (config.maxContentLength && config.maxContentLength > -1) { - options.maxBodyLength = config.maxContentLength; + // Add headers to the request + if ('setRequestHeader' in request) { + utils.forEach(requestHeaders, function setRequestHeader(val, key) { + if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') { + // Remove Content-Type if data is undefined + delete requestHeaders[key]; + } else { + // Otherwise add header to the request + request.setRequestHeader(key, val); + } + }); } - // Create the request - var req = transport.request(options, function handleResponse(res) { - if (req.aborted) return; - - // uncompress the response body transparently if required - var stream = res; - switch (res.headers['content-encoding']) { - /*eslint default-case:0*/ - case 'gzip': - case 'compress': - case 'deflate': - // add the unzipper to the body stream processing pipeline - stream = (res.statusCode === 204) ? stream : stream.pipe(zlib.createUnzip()); - - // remove the content-encoding in order to not confuse downstream operations - delete res.headers['content-encoding']; - break; - } - - // return the last request in case of redirects - var lastRequest = res.req || req; - - var response = { - status: res.statusCode, - statusText: res.statusMessage, - headers: res.headers, - config: config, - request: lastRequest - }; - - if (config.responseType === 'stream') { - response.data = stream; - settle(resolve, reject, response); - } else { - var responseBuffer = []; - stream.on('data', function handleStreamData(chunk) { - responseBuffer.push(chunk); - - // make sure the content length is not over the maxContentLength if specified - if (config.maxContentLength > -1 && Buffer.concat(responseBuffer).length > config.maxContentLength) { - stream.destroy(); - reject(createError('maxContentLength size of ' + config.maxContentLength + ' exceeded', - config, null, lastRequest)); - } - }); - - stream.on('error', function handleStreamError(err) { - if (req.aborted) return; - reject(enhanceError(err, config, null, lastRequest)); - }); - - stream.on('end', function handleStreamEnd() { - var responseData = Buffer.concat(responseBuffer); - if (config.responseType !== 'arraybuffer') { - responseData = responseData.toString(config.responseEncoding); - } + // Add withCredentials to request if needed + if (!utils.isUndefined(config.withCredentials)) { + request.withCredentials = !!config.withCredentials; + } - response.data = responseData; - settle(resolve, reject, response); - }); + // Add responseType to request if needed + if (config.responseType) { + try { + request.responseType = config.responseType; + } catch (e) { + // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2. + // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function. + if (config.responseType !== 'json') { + throw e; + } } - }); + } - // Handle errors - req.on('error', function handleRequestError(err) { - if (req.aborted) return; - reject(enhanceError(err, config, null, req)); - }); + // Handle progress if needed + if (typeof config.onDownloadProgress === 'function') { + request.addEventListener('progress', config.onDownloadProgress); + } - // Handle request timeout - if (config.timeout) { - timer = setTimeout(function handleRequestTimeout() { - req.abort(); - reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED', req)); - }, config.timeout); + // Not all browsers support upload events + if (typeof config.onUploadProgress === 'function' && request.upload) { + request.upload.addEventListener('progress', config.onUploadProgress); } if (config.cancelToken) { // Handle cancellation config.cancelToken.promise.then(function onCanceled(cancel) { - if (req.aborted) return; + if (!request) { + return; + } - req.abort(); + request.abort(); reject(cancel); + // Clean up request + request = null; }); } - // Send the request - if (utils.isStream(data)) { - data.on('error', function handleStreamError(err) { - reject(enhanceError(err, config, null, req)); - }).pipe(req); - } else { - req.end(data); + if (requestData === undefined) { + requestData = null; } + + // Send the request + request.send(requestData); }); }; /***/ }), -/* 467 */ +/* 466 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var createError = __webpack_require__(468); +var createError = __webpack_require__(467); /** * Resolve or reject a Promise based on response status. @@ -41397,13 +41296,13 @@ module.exports = function settle(resolve, reject, response) { /***/ }), -/* 468 */ +/* 467 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var enhanceError = __webpack_require__(469); +var enhanceError = __webpack_require__(468); /** * Create an Error with the specified message, config, error code, request and response. @@ -41422,7 +41321,7 @@ module.exports = function createError(message, config, code, request, response) /***/ }), -/* 469 */ +/* 468 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -41470,28 +41369,578 @@ module.exports = function enhanceError(error, config, code, request, response) { }; +/***/ }), +/* 469 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var isAbsoluteURL = __webpack_require__(470); +var combineURLs = __webpack_require__(471); + +/** + * Creates a new URL by combining the baseURL with the requestedURL, + * only when the requestedURL is not already an absolute URL. + * If the requestURL is absolute, this function returns the requestedURL untouched. + * + * @param {string} baseURL The base URL + * @param {string} requestedURL Absolute or relative URL to combine + * @returns {string} The combined full path + */ +module.exports = function buildFullPath(baseURL, requestedURL) { + if (baseURL && !isAbsoluteURL(requestedURL)) { + return combineURLs(baseURL, requestedURL); + } + return requestedURL; +}; + + /***/ }), /* 470 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Determines whether the specified URL is absolute + * + * @param {string} url The URL to test + * @returns {boolean} True if the specified URL is absolute, otherwise false + */ +module.exports = function isAbsoluteURL(url) { + // A URL is considered absolute if it begins with "://" or "//" (protocol-relative URL). + // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed + // by any combination of letters, digits, plus, period, or hyphen. + return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url); +}; + + +/***/ }), +/* 471 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Creates a new URL by combining the specified URLs + * + * @param {string} baseURL The base URL + * @param {string} relativeURL The relative URL + * @returns {string} The combined URL + */ +module.exports = function combineURLs(baseURL, relativeURL) { + return relativeURL + ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '') + : baseURL; +}; + + +/***/ }), +/* 472 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var utils = __webpack_require__(455); + +// Headers whose duplicates are ignored by node +// c.f. https://nodejs.org/api/http.html#http_message_headers +var ignoreDuplicateOf = [ + 'age', 'authorization', 'content-length', 'content-type', 'etag', + 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since', + 'last-modified', 'location', 'max-forwards', 'proxy-authorization', + 'referer', 'retry-after', 'user-agent' +]; + +/** + * Parse headers into an object + * + * ``` + * Date: Wed, 27 Aug 2014 08:58:49 GMT + * Content-Type: application/json + * Connection: keep-alive + * Transfer-Encoding: chunked + * ``` + * + * @param {String} headers Headers needing to be parsed + * @returns {Object} Headers parsed into an object + */ +module.exports = function parseHeaders(headers) { + var parsed = {}; + var key; + var val; + var i; + + if (!headers) { return parsed; } + + utils.forEach(headers.split('\n'), function parser(line) { + i = line.indexOf(':'); + key = utils.trim(line.substr(0, i)).toLowerCase(); + val = utils.trim(line.substr(i + 1)); + + if (key) { + if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) { + return; + } + if (key === 'set-cookie') { + parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]); + } else { + parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val; + } + } + }); + + return parsed; +}; + + +/***/ }), +/* 473 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var utils = __webpack_require__(455); + +module.exports = ( + utils.isStandardBrowserEnv() ? + + // Standard browser envs have full support of the APIs needed to test + // whether the request URL is of the same origin as current location. + (function standardBrowserEnv() { + var msie = /(msie|trident)/i.test(navigator.userAgent); + var urlParsingNode = document.createElement('a'); + var originURL; + + /** + * Parse a URL to discover it's components + * + * @param {String} url The URL to be parsed + * @returns {Object} + */ + function resolveURL(url) { + var href = url; + + if (msie) { + // IE needs attribute set twice to normalize properties + urlParsingNode.setAttribute('href', href); + href = urlParsingNode.href; + } + + urlParsingNode.setAttribute('href', href); + + // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils + return { + href: urlParsingNode.href, + protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '', + host: urlParsingNode.host, + search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '', + hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '', + hostname: urlParsingNode.hostname, + port: urlParsingNode.port, + pathname: (urlParsingNode.pathname.charAt(0) === '/') ? + urlParsingNode.pathname : + '/' + urlParsingNode.pathname + }; + } + + originURL = resolveURL(window.location.href); + + /** + * Determine if a URL shares the same origin as the current location + * + * @param {String} requestURL The URL to test + * @returns {boolean} True if URL shares the same origin, otherwise false + */ + return function isURLSameOrigin(requestURL) { + var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL; + return (parsed.protocol === originURL.protocol && + parsed.host === originURL.host); + }; + })() : + + // Non standard browser envs (web workers, react-native) lack needed support. + (function nonStandardBrowserEnv() { + return function isURLSameOrigin() { + return true; + }; + })() +); + + +/***/ }), +/* 474 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var utils = __webpack_require__(455); + +module.exports = ( + utils.isStandardBrowserEnv() ? + + // Standard browser envs support document.cookie + (function standardBrowserEnv() { + return { + write: function write(name, value, expires, path, domain, secure) { + var cookie = []; + cookie.push(name + '=' + encodeURIComponent(value)); + + if (utils.isNumber(expires)) { + cookie.push('expires=' + new Date(expires).toGMTString()); + } + + if (utils.isString(path)) { + cookie.push('path=' + path); + } + + if (utils.isString(domain)) { + cookie.push('domain=' + domain); + } + + if (secure === true) { + cookie.push('secure'); + } + + document.cookie = cookie.join('; '); + }, + + read: function read(name) { + var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); + return (match ? decodeURIComponent(match[3]) : null); + }, + + remove: function remove(name) { + this.write(name, '', Date.now() - 86400000); + } + }; + })() : + + // Non standard browser env (web workers, react-native) lack needed support. + (function nonStandardBrowserEnv() { + return { + write: function write() {}, + read: function read() { return null; }, + remove: function remove() {} + }; + })() +); + + +/***/ }), +/* 475 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var utils = __webpack_require__(455); +var settle = __webpack_require__(466); +var buildFullPath = __webpack_require__(469); +var buildURL = __webpack_require__(458); +var http = __webpack_require__(476); +var https = __webpack_require__(477); +var httpFollow = __webpack_require__(478).http; +var httpsFollow = __webpack_require__(478).https; +var url = __webpack_require__(452); +var zlib = __webpack_require__(486); +var pkg = __webpack_require__(487); +var createError = __webpack_require__(467); +var enhanceError = __webpack_require__(468); + +var isHttps = /https:?/; + +/*eslint consistent-return:0*/ +module.exports = function httpAdapter(config) { + return new Promise(function dispatchHttpRequest(resolvePromise, rejectPromise) { + var resolve = function resolve(value) { + resolvePromise(value); + }; + var reject = function reject(value) { + rejectPromise(value); + }; + var data = config.data; + var headers = config.headers; + + // Set User-Agent (required by some servers) + // Only set header if it hasn't been set in config + // See https://github.com/axios/axios/issues/69 + if (!headers['User-Agent'] && !headers['user-agent']) { + headers['User-Agent'] = 'axios/' + pkg.version; + } + + if (data && !utils.isStream(data)) { + if (Buffer.isBuffer(data)) { + // Nothing to do... + } else if (utils.isArrayBuffer(data)) { + data = Buffer.from(new Uint8Array(data)); + } else if (utils.isString(data)) { + data = Buffer.from(data, 'utf-8'); + } else { + return reject(createError( + 'Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream', + config + )); + } + + // Add Content-Length header if data exists + headers['Content-Length'] = data.length; + } + + // HTTP basic authentication + var auth = undefined; + if (config.auth) { + var username = config.auth.username || ''; + var password = config.auth.password || ''; + auth = username + ':' + password; + } + + // Parse url + var fullPath = buildFullPath(config.baseURL, config.url); + var parsed = url.parse(fullPath); + var protocol = parsed.protocol || 'http:'; + + if (!auth && parsed.auth) { + var urlAuth = parsed.auth.split(':'); + var urlUsername = urlAuth[0] || ''; + var urlPassword = urlAuth[1] || ''; + auth = urlUsername + ':' + urlPassword; + } + + if (auth) { + delete headers.Authorization; + } + + var isHttpsRequest = isHttps.test(protocol); + var agent = isHttpsRequest ? config.httpsAgent : config.httpAgent; + + var options = { + path: buildURL(parsed.path, config.params, config.paramsSerializer).replace(/^\?/, ''), + method: config.method.toUpperCase(), + headers: headers, + agent: agent, + agents: { http: config.httpAgent, https: config.httpsAgent }, + auth: auth + }; + + if (config.socketPath) { + options.socketPath = config.socketPath; + } else { + options.hostname = parsed.hostname; + options.port = parsed.port; + } + + var proxy = config.proxy; + if (!proxy && proxy !== false) { + var proxyEnv = protocol.slice(0, -1) + '_proxy'; + var proxyUrl = process.env[proxyEnv] || process.env[proxyEnv.toUpperCase()]; + if (proxyUrl) { + var parsedProxyUrl = url.parse(proxyUrl); + var noProxyEnv = process.env.no_proxy || process.env.NO_PROXY; + var shouldProxy = true; + + if (noProxyEnv) { + var noProxy = noProxyEnv.split(',').map(function trim(s) { + return s.trim(); + }); + + shouldProxy = !noProxy.some(function proxyMatch(proxyElement) { + if (!proxyElement) { + return false; + } + if (proxyElement === '*') { + return true; + } + if (proxyElement[0] === '.' && + parsed.hostname.substr(parsed.hostname.length - proxyElement.length) === proxyElement) { + return true; + } + + return parsed.hostname === proxyElement; + }); + } + + + if (shouldProxy) { + proxy = { + host: parsedProxyUrl.hostname, + port: parsedProxyUrl.port + }; + + if (parsedProxyUrl.auth) { + var proxyUrlAuth = parsedProxyUrl.auth.split(':'); + proxy.auth = { + username: proxyUrlAuth[0], + password: proxyUrlAuth[1] + }; + } + } + } + } + + if (proxy) { + options.hostname = proxy.host; + options.host = proxy.host; + options.headers.host = parsed.hostname + (parsed.port ? ':' + parsed.port : ''); + options.port = proxy.port; + options.path = protocol + '//' + parsed.hostname + (parsed.port ? ':' + parsed.port : '') + options.path; + + // Basic proxy authorization + if (proxy.auth) { + var base64 = Buffer.from(proxy.auth.username + ':' + proxy.auth.password, 'utf8').toString('base64'); + options.headers['Proxy-Authorization'] = 'Basic ' + base64; + } + } + + var transport; + var isHttpsProxy = isHttpsRequest && (proxy ? isHttps.test(proxy.protocol) : true); + if (config.transport) { + transport = config.transport; + } else if (config.maxRedirects === 0) { + transport = isHttpsProxy ? https : http; + } else { + if (config.maxRedirects) { + options.maxRedirects = config.maxRedirects; + } + transport = isHttpsProxy ? httpsFollow : httpFollow; + } + + if (config.maxContentLength && config.maxContentLength > -1) { + options.maxBodyLength = config.maxContentLength; + } + + // Create the request + var req = transport.request(options, function handleResponse(res) { + if (req.aborted) return; + + // uncompress the response body transparently if required + var stream = res; + switch (res.headers['content-encoding']) { + /*eslint default-case:0*/ + case 'gzip': + case 'compress': + case 'deflate': + // add the unzipper to the body stream processing pipeline + stream = (res.statusCode === 204) ? stream : stream.pipe(zlib.createUnzip()); + + // remove the content-encoding in order to not confuse downstream operations + delete res.headers['content-encoding']; + break; + } + + // return the last request in case of redirects + var lastRequest = res.req || req; + + var response = { + status: res.statusCode, + statusText: res.statusMessage, + headers: res.headers, + config: config, + request: lastRequest + }; + + if (config.responseType === 'stream') { + response.data = stream; + settle(resolve, reject, response); + } else { + var responseBuffer = []; + stream.on('data', function handleStreamData(chunk) { + responseBuffer.push(chunk); + + // make sure the content length is not over the maxContentLength if specified + if (config.maxContentLength > -1 && Buffer.concat(responseBuffer).length > config.maxContentLength) { + stream.destroy(); + reject(createError('maxContentLength size of ' + config.maxContentLength + ' exceeded', + config, null, lastRequest)); + } + }); + + stream.on('error', function handleStreamError(err) { + if (req.aborted) return; + reject(enhanceError(err, config, null, lastRequest)); + }); + + stream.on('end', function handleStreamEnd() { + var responseData = Buffer.concat(responseBuffer); + if (config.responseType !== 'arraybuffer') { + responseData = responseData.toString(config.responseEncoding); + } + + response.data = responseData; + settle(resolve, reject, response); + }); + } + }); + + // Handle errors + req.on('error', function handleRequestError(err) { + if (req.aborted) return; + reject(enhanceError(err, config, null, req)); + }); + + // Handle request timeout + if (config.timeout) { + // Sometime, the response will be very slow, and does not respond, the connect event will be block by event loop system. + // And timer callback will be fired, and abort() will be invoked before connection, then get "socket hang up" and code ECONNRESET. + // At this time, if we have a large number of request, nodejs will hang up some socket on background. and the number will up and up. + // And then these socket which be hang up will devoring CPU little by little. + // ClientRequest.setTimeout will be fired on the specify milliseconds, and can make sure that abort() will be fired after connect. + req.setTimeout(config.timeout, function handleRequestTimeout() { + req.abort(); + reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED', req)); + }); + } + + if (config.cancelToken) { + // Handle cancellation + config.cancelToken.promise.then(function onCanceled(cancel) { + if (req.aborted) return; + + req.abort(); + reject(cancel); + }); + } + + // Send the request + if (utils.isStream(data)) { + data.on('error', function handleStreamError(err) { + reject(enhanceError(err, config, null, req)); + }).pipe(req); + } else { + req.end(data); + } + }); +}; + + +/***/ }), +/* 476 */ /***/ (function(module, exports) { module.exports = require("http"); /***/ }), -/* 471 */ +/* 477 */ /***/ (function(module, exports) { module.exports = require("https"); /***/ }), -/* 472 */ +/* 478 */ /***/ (function(module, exports, __webpack_require__) { var url = __webpack_require__(452); -var http = __webpack_require__(470); -var https = __webpack_require__(471); +var http = __webpack_require__(476); +var https = __webpack_require__(477); var assert = __webpack_require__(30); var Writable = __webpack_require__(27).Writable; -var debug = __webpack_require__(473)("follow-redirects"); +var debug = __webpack_require__(479)("follow-redirects"); // RFC7231§4.2.1: Of the request methods defined by this specification, // the GET, HEAD, OPTIONS, and TRACE methods are defined to be safe. @@ -41811,7 +42260,7 @@ module.exports.wrap = wrap; /***/ }), -/* 473 */ +/* 479 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -41820,14 +42269,14 @@ module.exports.wrap = wrap; */ if (typeof process === 'undefined' || process.type === 'renderer') { - module.exports = __webpack_require__(474); + module.exports = __webpack_require__(480); } else { - module.exports = __webpack_require__(477); + module.exports = __webpack_require__(483); } /***/ }), -/* 474 */ +/* 480 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -41836,7 +42285,7 @@ if (typeof process === 'undefined' || process.type === 'renderer') { * Expose `debug()` as the module. */ -exports = module.exports = __webpack_require__(475); +exports = module.exports = __webpack_require__(481); exports.log = log; exports.formatArgs = formatArgs; exports.save = save; @@ -42028,7 +42477,7 @@ function localstorage() { /***/ }), -/* 475 */ +/* 481 */ /***/ (function(module, exports, __webpack_require__) { @@ -42044,7 +42493,7 @@ exports.coerce = coerce; exports.disable = disable; exports.enable = enable; exports.enabled = enabled; -exports.humanize = __webpack_require__(476); +exports.humanize = __webpack_require__(482); /** * Active `debug` instances. @@ -42259,7 +42708,7 @@ function coerce(val) { /***/ }), -/* 476 */ +/* 482 */ /***/ (function(module, exports) { /** @@ -42417,14 +42866,14 @@ function plural(ms, n, name) { /***/ }), -/* 477 */ +/* 483 */ /***/ (function(module, exports, __webpack_require__) { /** * Module dependencies. */ -var tty = __webpack_require__(478); +var tty = __webpack_require__(484); var util = __webpack_require__(29); /** @@ -42433,7 +42882,7 @@ var util = __webpack_require__(29); * Expose `debug()` as the module. */ -exports = module.exports = __webpack_require__(475); +exports = module.exports = __webpack_require__(481); exports.init = init; exports.log = log; exports.formatArgs = formatArgs; @@ -42448,7 +42897,7 @@ exports.useColors = useColors; exports.colors = [ 6, 2, 3, 4, 5, 1 ]; try { - var supportsColor = __webpack_require__(479); + var supportsColor = __webpack_require__(485); if (supportsColor && supportsColor.level >= 2) { exports.colors = [ 20, 21, 26, 27, 32, 33, 38, 39, 40, 41, 42, 43, 44, 45, 56, 57, 62, 63, 68, @@ -42587,600 +43036,182 @@ function load() { /** * Init logic for `debug` instances. - * - * Create a new `inspectOpts` object in case `useColors` is set - * differently for a particular `debug` instance. - */ - -function init (debug) { - debug.inspectOpts = {}; - - var keys = Object.keys(exports.inspectOpts); - for (var i = 0; i < keys.length; i++) { - debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; - } -} - -/** - * Enable namespaces listed in `process.env.DEBUG` initially. - */ - -exports.enable(load()); - - -/***/ }), -/* 478 */ -/***/ (function(module, exports) { - -module.exports = require("tty"); - -/***/ }), -/* 479 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const os = __webpack_require__(11); -const hasFlag = __webpack_require__(12); - -const env = process.env; - -let forceColor; -if (hasFlag('no-color') || - hasFlag('no-colors') || - hasFlag('color=false')) { - forceColor = false; -} else if (hasFlag('color') || - hasFlag('colors') || - hasFlag('color=true') || - hasFlag('color=always')) { - forceColor = true; -} -if ('FORCE_COLOR' in env) { - forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0; -} - -function translateLevel(level) { - if (level === 0) { - return false; - } - - return { - level, - hasBasic: true, - has256: level >= 2, - has16m: level >= 3 - }; -} - -function supportsColor(stream) { - if (forceColor === false) { - return 0; - } - - if (hasFlag('color=16m') || - hasFlag('color=full') || - hasFlag('color=truecolor')) { - return 3; - } - - if (hasFlag('color=256')) { - return 2; - } - - if (stream && !stream.isTTY && forceColor !== true) { - return 0; - } - - const min = forceColor ? 1 : 0; - - if (process.platform === 'win32') { - // Node.js 7.5.0 is the first version of Node.js to include a patch to - // libuv that enables 256 color output on Windows. Anything earlier and it - // won't work. However, here we target Node.js 8 at minimum as it is an LTS - // release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows - // release that supports 256 colors. Windows 10 build 14931 is the first release - // that supports 16m/TrueColor. - const osRelease = os.release().split('.'); - if ( - Number(process.versions.node.split('.')[0]) >= 8 && - Number(osRelease[0]) >= 10 && - Number(osRelease[2]) >= 10586 - ) { - return Number(osRelease[2]) >= 14931 ? 3 : 2; - } - - return 1; - } - - if ('CI' in env) { - if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(sign => sign in env) || env.CI_NAME === 'codeship') { - return 1; - } - - return min; - } - - if ('TEAMCITY_VERSION' in env) { - return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0; - } - - if (env.COLORTERM === 'truecolor') { - return 3; - } - - if ('TERM_PROGRAM' in env) { - const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10); - - switch (env.TERM_PROGRAM) { - case 'iTerm.app': - return version >= 3 ? 3 : 2; - case 'Apple_Terminal': - return 2; - // No default - } - } - - if (/-256(color)?$/i.test(env.TERM)) { - return 2; - } - - if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { - return 1; - } - - if ('COLORTERM' in env) { - return 1; - } - - if (env.TERM === 'dumb') { - return min; - } - - return min; -} - -function getSupportLevel(stream) { - const level = supportsColor(stream); - return translateLevel(level); -} - -module.exports = { - supportsColor: getSupportLevel, - stdout: getSupportLevel(process.stdout), - stderr: getSupportLevel(process.stderr) -}; - - -/***/ }), -/* 480 */ -/***/ (function(module, exports) { - -module.exports = require("zlib"); - -/***/ }), -/* 481 */ -/***/ (function(module) { - -module.exports = JSON.parse("{\"name\":\"axios\",\"version\":\"0.19.0\",\"description\":\"Promise based HTTP client for the browser and node.js\",\"main\":\"index.js\",\"scripts\":{\"test\":\"grunt test && bundlesize\",\"start\":\"node ./sandbox/server.js\",\"build\":\"NODE_ENV=production grunt build\",\"preversion\":\"npm test\",\"version\":\"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json\",\"postversion\":\"git push && git push --tags\",\"examples\":\"node ./examples/server.js\",\"coveralls\":\"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js\",\"fix\":\"eslint --fix lib/**/*.js\"},\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/axios/axios.git\"},\"keywords\":[\"xhr\",\"http\",\"ajax\",\"promise\",\"node\"],\"author\":\"Matt Zabriskie\",\"license\":\"MIT\",\"bugs\":{\"url\":\"https://github.com/axios/axios/issues\"},\"homepage\":\"https://github.com/axios/axios\",\"devDependencies\":{\"bundlesize\":\"^0.17.0\",\"coveralls\":\"^3.0.0\",\"es6-promise\":\"^4.2.4\",\"grunt\":\"^1.0.2\",\"grunt-banner\":\"^0.6.0\",\"grunt-cli\":\"^1.2.0\",\"grunt-contrib-clean\":\"^1.1.0\",\"grunt-contrib-watch\":\"^1.0.0\",\"grunt-eslint\":\"^20.1.0\",\"grunt-karma\":\"^2.0.0\",\"grunt-mocha-test\":\"^0.13.3\",\"grunt-ts\":\"^6.0.0-beta.19\",\"grunt-webpack\":\"^1.0.18\",\"istanbul-instrumenter-loader\":\"^1.0.0\",\"jasmine-core\":\"^2.4.1\",\"karma\":\"^1.3.0\",\"karma-chrome-launcher\":\"^2.2.0\",\"karma-coverage\":\"^1.1.1\",\"karma-firefox-launcher\":\"^1.1.0\",\"karma-jasmine\":\"^1.1.1\",\"karma-jasmine-ajax\":\"^0.1.13\",\"karma-opera-launcher\":\"^1.0.0\",\"karma-safari-launcher\":\"^1.0.0\",\"karma-sauce-launcher\":\"^1.2.0\",\"karma-sinon\":\"^1.0.5\",\"karma-sourcemap-loader\":\"^0.3.7\",\"karma-webpack\":\"^1.7.0\",\"load-grunt-tasks\":\"^3.5.2\",\"minimist\":\"^1.2.0\",\"mocha\":\"^5.2.0\",\"sinon\":\"^4.5.0\",\"typescript\":\"^2.8.1\",\"url-search-params\":\"^0.10.0\",\"webpack\":\"^1.13.1\",\"webpack-dev-server\":\"^1.14.1\"},\"browser\":{\"./lib/adapters/http.js\":\"./lib/adapters/xhr.js\"},\"typings\":\"./index.d.ts\",\"dependencies\":{\"follow-redirects\":\"1.5.10\",\"is-buffer\":\"^2.0.2\"},\"bundlesize\":[{\"path\":\"./dist/axios.min.js\",\"threshold\":\"5kB\"}]}"); - -/***/ }), -/* 482 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var utils = __webpack_require__(455); -var settle = __webpack_require__(467); -var buildURL = __webpack_require__(459); -var parseHeaders = __webpack_require__(483); -var isURLSameOrigin = __webpack_require__(484); -var createError = __webpack_require__(468); - -module.exports = function xhrAdapter(config) { - return new Promise(function dispatchXhrRequest(resolve, reject) { - var requestData = config.data; - var requestHeaders = config.headers; - - if (utils.isFormData(requestData)) { - delete requestHeaders['Content-Type']; // Let the browser set it - } - - var request = new XMLHttpRequest(); - - // HTTP basic authentication - if (config.auth) { - var username = config.auth.username || ''; - var password = config.auth.password || ''; - requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password); - } - - request.open(config.method.toUpperCase(), buildURL(config.url, config.params, config.paramsSerializer), true); - - // Set the request timeout in MS - request.timeout = config.timeout; - - // Listen for ready state - request.onreadystatechange = function handleLoad() { - if (!request || request.readyState !== 4) { - return; - } - - // The request errored out and we didn't get a response, this will be - // handled by onerror instead - // With one exception: request that using file: protocol, most browsers - // will return status as 0 even though it's a successful request - if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) { - return; - } - - // Prepare the response - var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null; - var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response; - var response = { - data: responseData, - status: request.status, - statusText: request.statusText, - headers: responseHeaders, - config: config, - request: request - }; - - settle(resolve, reject, response); - - // Clean up request - request = null; - }; - - // Handle browser request cancellation (as opposed to a manual cancellation) - request.onabort = function handleAbort() { - if (!request) { - return; - } - - reject(createError('Request aborted', config, 'ECONNABORTED', request)); - - // Clean up request - request = null; - }; - - // Handle low level network errors - request.onerror = function handleError() { - // Real errors are hidden from us by the browser - // onerror should only fire if it's a network error - reject(createError('Network Error', config, null, request)); - - // Clean up request - request = null; - }; - - // Handle timeout - request.ontimeout = function handleTimeout() { - reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED', - request)); - - // Clean up request - request = null; - }; - - // Add xsrf header - // This is only done if running in a standard browser environment. - // Specifically not if we're in a web worker, or react-native. - if (utils.isStandardBrowserEnv()) { - var cookies = __webpack_require__(485); - - // Add xsrf header - var xsrfValue = (config.withCredentials || isURLSameOrigin(config.url)) && config.xsrfCookieName ? - cookies.read(config.xsrfCookieName) : - undefined; - - if (xsrfValue) { - requestHeaders[config.xsrfHeaderName] = xsrfValue; - } - } - - // Add headers to the request - if ('setRequestHeader' in request) { - utils.forEach(requestHeaders, function setRequestHeader(val, key) { - if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') { - // Remove Content-Type if data is undefined - delete requestHeaders[key]; - } else { - // Otherwise add header to the request - request.setRequestHeader(key, val); - } - }); - } - - // Add withCredentials to request if needed - if (config.withCredentials) { - request.withCredentials = true; - } - - // Add responseType to request if needed - if (config.responseType) { - try { - request.responseType = config.responseType; - } catch (e) { - // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2. - // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function. - if (config.responseType !== 'json') { - throw e; - } - } - } - - // Handle progress if needed - if (typeof config.onDownloadProgress === 'function') { - request.addEventListener('progress', config.onDownloadProgress); - } - - // Not all browsers support upload events - if (typeof config.onUploadProgress === 'function' && request.upload) { - request.upload.addEventListener('progress', config.onUploadProgress); - } - - if (config.cancelToken) { - // Handle cancellation - config.cancelToken.promise.then(function onCanceled(cancel) { - if (!request) { - return; - } - - request.abort(); - reject(cancel); - // Clean up request - request = null; - }); - } - - if (requestData === undefined) { - requestData = null; - } - - // Send the request - request.send(requestData); - }); -}; - - -/***/ }), -/* 483 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var utils = __webpack_require__(455); - -// Headers whose duplicates are ignored by node -// c.f. https://nodejs.org/api/http.html#http_message_headers -var ignoreDuplicateOf = [ - 'age', 'authorization', 'content-length', 'content-type', 'etag', - 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since', - 'last-modified', 'location', 'max-forwards', 'proxy-authorization', - 'referer', 'retry-after', 'user-agent' -]; - -/** - * Parse headers into an object - * - * ``` - * Date: Wed, 27 Aug 2014 08:58:49 GMT - * Content-Type: application/json - * Connection: keep-alive - * Transfer-Encoding: chunked - * ``` - * - * @param {String} headers Headers needing to be parsed - * @returns {Object} Headers parsed into an object + * + * Create a new `inspectOpts` object in case `useColors` is set + * differently for a particular `debug` instance. */ -module.exports = function parseHeaders(headers) { - var parsed = {}; - var key; - var val; - var i; - if (!headers) { return parsed; } +function init (debug) { + debug.inspectOpts = {}; - utils.forEach(headers.split('\n'), function parser(line) { - i = line.indexOf(':'); - key = utils.trim(line.substr(0, i)).toLowerCase(); - val = utils.trim(line.substr(i + 1)); + var keys = Object.keys(exports.inspectOpts); + for (var i = 0; i < keys.length; i++) { + debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; + } +} - if (key) { - if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) { - return; - } - if (key === 'set-cookie') { - parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]); - } else { - parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val; - } - } - }); +/** + * Enable namespaces listed in `process.env.DEBUG` initially. + */ - return parsed; -}; +exports.enable(load()); /***/ }), /* 484 */ +/***/ (function(module, exports) { + +module.exports = require("tty"); + +/***/ }), +/* 485 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; +const os = __webpack_require__(11); +const hasFlag = __webpack_require__(12); -var utils = __webpack_require__(455); - -module.exports = ( - utils.isStandardBrowserEnv() ? +const env = process.env; - // Standard browser envs have full support of the APIs needed to test - // whether the request URL is of the same origin as current location. - (function standardBrowserEnv() { - var msie = /(msie|trident)/i.test(navigator.userAgent); - var urlParsingNode = document.createElement('a'); - var originURL; +let forceColor; +if (hasFlag('no-color') || + hasFlag('no-colors') || + hasFlag('color=false')) { + forceColor = false; +} else if (hasFlag('color') || + hasFlag('colors') || + hasFlag('color=true') || + hasFlag('color=always')) { + forceColor = true; +} +if ('FORCE_COLOR' in env) { + forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0; +} - /** - * Parse a URL to discover it's components - * - * @param {String} url The URL to be parsed - * @returns {Object} - */ - function resolveURL(url) { - var href = url; +function translateLevel(level) { + if (level === 0) { + return false; + } - if (msie) { - // IE needs attribute set twice to normalize properties - urlParsingNode.setAttribute('href', href); - href = urlParsingNode.href; - } + return { + level, + hasBasic: true, + has256: level >= 2, + has16m: level >= 3 + }; +} - urlParsingNode.setAttribute('href', href); +function supportsColor(stream) { + if (forceColor === false) { + return 0; + } - // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils - return { - href: urlParsingNode.href, - protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '', - host: urlParsingNode.host, - search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '', - hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '', - hostname: urlParsingNode.hostname, - port: urlParsingNode.port, - pathname: (urlParsingNode.pathname.charAt(0) === '/') ? - urlParsingNode.pathname : - '/' + urlParsingNode.pathname - }; - } + if (hasFlag('color=16m') || + hasFlag('color=full') || + hasFlag('color=truecolor')) { + return 3; + } - originURL = resolveURL(window.location.href); + if (hasFlag('color=256')) { + return 2; + } - /** - * Determine if a URL shares the same origin as the current location - * - * @param {String} requestURL The URL to test - * @returns {boolean} True if URL shares the same origin, otherwise false - */ - return function isURLSameOrigin(requestURL) { - var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL; - return (parsed.protocol === originURL.protocol && - parsed.host === originURL.host); - }; - })() : + if (stream && !stream.isTTY && forceColor !== true) { + return 0; + } - // Non standard browser envs (web workers, react-native) lack needed support. - (function nonStandardBrowserEnv() { - return function isURLSameOrigin() { - return true; - }; - })() -); + const min = forceColor ? 1 : 0; + if (process.platform === 'win32') { + // Node.js 7.5.0 is the first version of Node.js to include a patch to + // libuv that enables 256 color output on Windows. Anything earlier and it + // won't work. However, here we target Node.js 8 at minimum as it is an LTS + // release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows + // release that supports 256 colors. Windows 10 build 14931 is the first release + // that supports 16m/TrueColor. + const osRelease = os.release().split('.'); + if ( + Number(process.versions.node.split('.')[0]) >= 8 && + Number(osRelease[0]) >= 10 && + Number(osRelease[2]) >= 10586 + ) { + return Number(osRelease[2]) >= 14931 ? 3 : 2; + } -/***/ }), -/* 485 */ -/***/ (function(module, exports, __webpack_require__) { + return 1; + } -"use strict"; + if ('CI' in env) { + if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(sign => sign in env) || env.CI_NAME === 'codeship') { + return 1; + } + return min; + } -var utils = __webpack_require__(455); + if ('TEAMCITY_VERSION' in env) { + return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0; + } -module.exports = ( - utils.isStandardBrowserEnv() ? + if (env.COLORTERM === 'truecolor') { + return 3; + } - // Standard browser envs support document.cookie - (function standardBrowserEnv() { - return { - write: function write(name, value, expires, path, domain, secure) { - var cookie = []; - cookie.push(name + '=' + encodeURIComponent(value)); + if ('TERM_PROGRAM' in env) { + const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10); - if (utils.isNumber(expires)) { - cookie.push('expires=' + new Date(expires).toGMTString()); - } + switch (env.TERM_PROGRAM) { + case 'iTerm.app': + return version >= 3 ? 3 : 2; + case 'Apple_Terminal': + return 2; + // No default + } + } - if (utils.isString(path)) { - cookie.push('path=' + path); - } + if (/-256(color)?$/i.test(env.TERM)) { + return 2; + } - if (utils.isString(domain)) { - cookie.push('domain=' + domain); - } + if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { + return 1; + } - if (secure === true) { - cookie.push('secure'); - } + if ('COLORTERM' in env) { + return 1; + } - document.cookie = cookie.join('; '); - }, + if (env.TERM === 'dumb') { + return min; + } - read: function read(name) { - var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); - return (match ? decodeURIComponent(match[3]) : null); - }, + return min; +} - remove: function remove(name) { - this.write(name, '', Date.now() - 86400000); - } - }; - })() : +function getSupportLevel(stream) { + const level = supportsColor(stream); + return translateLevel(level); +} - // Non standard browser env (web workers, react-native) lack needed support. - (function nonStandardBrowserEnv() { - return { - write: function write() {}, - read: function read() { return null; }, - remove: function remove() {} - }; - })() -); +module.exports = { + supportsColor: getSupportLevel, + stdout: getSupportLevel(process.stdout), + stderr: getSupportLevel(process.stderr) +}; /***/ }), /* 486 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/** - * Determines whether the specified URL is absolute - * - * @param {string} url The URL to test - * @returns {boolean} True if the specified URL is absolute, otherwise false - */ -module.exports = function isAbsoluteURL(url) { - // A URL is considered absolute if it begins with "://" or "//" (protocol-relative URL). - // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed - // by any combination of letters, digits, plus, period, or hyphen. - return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url); -}; +/***/ (function(module, exports) { +module.exports = require("zlib"); /***/ }), /* 487 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/** - * Creates a new URL by combining the specified URLs - * - * @param {string} baseURL The base URL - * @param {string} relativeURL The relative URL - * @returns {string} The combined URL - */ -module.exports = function combineURLs(baseURL, relativeURL) { - return relativeURL - ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '') - : baseURL; -}; +/***/ (function(module) { +module.exports = JSON.parse("{\"name\":\"axios\",\"version\":\"0.19.2\",\"description\":\"Promise based HTTP client for the browser and node.js\",\"main\":\"index.js\",\"scripts\":{\"test\":\"grunt test && bundlesize\",\"start\":\"node ./sandbox/server.js\",\"build\":\"NODE_ENV=production grunt build\",\"preversion\":\"npm test\",\"version\":\"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json\",\"postversion\":\"git push && git push --tags\",\"examples\":\"node ./examples/server.js\",\"coveralls\":\"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js\",\"fix\":\"eslint --fix lib/**/*.js\"},\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/axios/axios.git\"},\"keywords\":[\"xhr\",\"http\",\"ajax\",\"promise\",\"node\"],\"author\":\"Matt Zabriskie\",\"license\":\"MIT\",\"bugs\":{\"url\":\"https://github.com/axios/axios/issues\"},\"homepage\":\"https://github.com/axios/axios\",\"devDependencies\":{\"bundlesize\":\"^0.17.0\",\"coveralls\":\"^3.0.0\",\"es6-promise\":\"^4.2.4\",\"grunt\":\"^1.0.2\",\"grunt-banner\":\"^0.6.0\",\"grunt-cli\":\"^1.2.0\",\"grunt-contrib-clean\":\"^1.1.0\",\"grunt-contrib-watch\":\"^1.0.0\",\"grunt-eslint\":\"^20.1.0\",\"grunt-karma\":\"^2.0.0\",\"grunt-mocha-test\":\"^0.13.3\",\"grunt-ts\":\"^6.0.0-beta.19\",\"grunt-webpack\":\"^1.0.18\",\"istanbul-instrumenter-loader\":\"^1.0.0\",\"jasmine-core\":\"^2.4.1\",\"karma\":\"^1.3.0\",\"karma-chrome-launcher\":\"^2.2.0\",\"karma-coverage\":\"^1.1.1\",\"karma-firefox-launcher\":\"^1.1.0\",\"karma-jasmine\":\"^1.1.1\",\"karma-jasmine-ajax\":\"^0.1.13\",\"karma-opera-launcher\":\"^1.0.0\",\"karma-safari-launcher\":\"^1.0.0\",\"karma-sauce-launcher\":\"^1.2.0\",\"karma-sinon\":\"^1.0.5\",\"karma-sourcemap-loader\":\"^0.3.7\",\"karma-webpack\":\"^1.7.0\",\"load-grunt-tasks\":\"^3.5.2\",\"minimist\":\"^1.2.0\",\"mocha\":\"^5.2.0\",\"sinon\":\"^4.5.0\",\"typescript\":\"^2.8.1\",\"url-search-params\":\"^0.10.0\",\"webpack\":\"^1.13.1\",\"webpack-dev-server\":\"^1.14.1\"},\"browser\":{\"./lib/adapters/http.js\":\"./lib/adapters/xhr.js\"},\"typings\":\"./index.d.ts\",\"dependencies\":{\"follow-redirects\":\"1.5.10\"},\"bundlesize\":[{\"path\":\"./dist/axios.min.js\",\"threshold\":\"5kB\"}]}"); /***/ }), /* 488 */ @@ -43204,13 +43235,23 @@ module.exports = function mergeConfig(config1, config2) { config2 = config2 || {}; var config = {}; - utils.forEach(['url', 'method', 'params', 'data'], function valueFromConfig2(prop) { + var valueFromConfig2Keys = ['url', 'method', 'params', 'data']; + var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy']; + var defaultToConfig2Keys = [ + 'baseURL', 'url', 'transformRequest', 'transformResponse', 'paramsSerializer', + 'timeout', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName', + 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', + 'maxContentLength', 'validateStatus', 'maxRedirects', 'httpAgent', + 'httpsAgent', 'cancelToken', 'socketPath' + ]; + + utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) { if (typeof config2[prop] !== 'undefined') { config[prop] = config2[prop]; } }); - utils.forEach(['headers', 'auth', 'proxy'], function mergeDeepProperties(prop) { + utils.forEach(mergeDeepPropertiesKeys, function mergeDeepProperties(prop) { if (utils.isObject(config2[prop])) { config[prop] = utils.deepMerge(config1[prop], config2[prop]); } else if (typeof config2[prop] !== 'undefined') { @@ -43222,13 +43263,25 @@ module.exports = function mergeConfig(config1, config2) { } }); - utils.forEach([ - 'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer', - 'timeout', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName', - 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'maxContentLength', - 'validateStatus', 'maxRedirects', 'httpAgent', 'httpsAgent', 'cancelToken', - 'socketPath' - ], function defaultToConfig2(prop) { + utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) { + if (typeof config2[prop] !== 'undefined') { + config[prop] = config2[prop]; + } else if (typeof config1[prop] !== 'undefined') { + config[prop] = config1[prop]; + } + }); + + var axiosKeys = valueFromConfig2Keys + .concat(mergeDeepPropertiesKeys) + .concat(defaultToConfig2Keys); + + var otherKeys = Object + .keys(config2) + .filter(function filterAxiosKeys(key) { + return axiosKeys.indexOf(key) === -1; + }); + + utils.forEach(otherKeys, function otherKeysDefaultToConfig2(prop) { if (typeof config2[prop] !== 'undefined') { config[prop] = config2[prop]; } else if (typeof config1[prop] !== 'undefined') { @@ -43591,92 +43644,221 @@ exports.KbnClientVersion = KbnClientVersion; * under the License. */ Object.defineProperty(exports, "__esModule", { value: true }); -const kbn_client_requester_1 = __webpack_require__(451); -class KbnClientSavedObjects { - constructor(log, requester) { - this.log = log; - this.requester = requester; - } - /** - * Run the saved objects migration - */ - async migrate() { - this.log.debug('Migrating saved objects'); - return await this.requester.request({ - description: 'migrate saved objects', - path: kbn_client_requester_1.uriencode `/internal/saved_objects/_migrate`, - method: 'POST', - body: {}, - }); - } - /** - * Get an object - */ - async get(options) { - this.log.debug('Gettings saved object: %j', options); - return await this.requester.request({ - description: 'get saved object', - path: kbn_client_requester_1.uriencode `/api/saved_objects/${options.type}/${options.id}`, - method: 'GET', - }); - } - /** - * Create a saved object - */ - async create(options) { - this.log.debug('Creating saved object: %j', options); - return await this.requester.request({ - description: 'update saved object', - path: options.id - ? kbn_client_requester_1.uriencode `/api/saved_objects/${options.type}/${options.id}` - : kbn_client_requester_1.uriencode `/api/saved_objects/${options.type}`, - query: { - overwrite: options.overwrite, - }, - method: 'POST', - body: { - attributes: options.attributes, - migrationVersion: options.migrationVersion, - references: options.references, - }, - }); - } - /** - * Update a saved object - */ - async update(options) { - this.log.debug('Updating saved object: %j', options); - return await this.requester.request({ - description: 'update saved object', - path: kbn_client_requester_1.uriencode `/api/saved_objects/${options.type}/${options.id}`, - query: { - overwrite: options.overwrite, - }, - method: 'PUT', - body: { - attributes: options.attributes, - migrationVersion: options.migrationVersion, - references: options.references, - }, - }); - } - /** - * Delete an object - */ - async delete(options) { - this.log.debug('Deleting saved object %s/%s', options); - return await this.requester.request({ - description: 'delete saved object', - path: kbn_client_requester_1.uriencode `/api/saved_objects/${options.type}/${options.id}`, - method: 'DELETE', - }); - } -} -exports.KbnClientSavedObjects = KbnClientSavedObjects; +const kbn_client_requester_1 = __webpack_require__(451); +class KbnClientSavedObjects { + constructor(log, requester) { + this.log = log; + this.requester = requester; + } + /** + * Run the saved objects migration + */ + async migrate() { + this.log.debug('Migrating saved objects'); + return await this.requester.request({ + description: 'migrate saved objects', + path: kbn_client_requester_1.uriencode `/internal/saved_objects/_migrate`, + method: 'POST', + body: {}, + }); + } + /** + * Get an object + */ + async get(options) { + this.log.debug('Gettings saved object: %j', options); + return await this.requester.request({ + description: 'get saved object', + path: kbn_client_requester_1.uriencode `/api/saved_objects/${options.type}/${options.id}`, + method: 'GET', + }); + } + /** + * Create a saved object + */ + async create(options) { + this.log.debug('Creating saved object: %j', options); + return await this.requester.request({ + description: 'update saved object', + path: options.id + ? kbn_client_requester_1.uriencode `/api/saved_objects/${options.type}/${options.id}` + : kbn_client_requester_1.uriencode `/api/saved_objects/${options.type}`, + query: { + overwrite: options.overwrite, + }, + method: 'POST', + body: { + attributes: options.attributes, + migrationVersion: options.migrationVersion, + references: options.references, + }, + }); + } + /** + * Update a saved object + */ + async update(options) { + this.log.debug('Updating saved object: %j', options); + return await this.requester.request({ + description: 'update saved object', + path: kbn_client_requester_1.uriencode `/api/saved_objects/${options.type}/${options.id}`, + query: { + overwrite: options.overwrite, + }, + method: 'PUT', + body: { + attributes: options.attributes, + migrationVersion: options.migrationVersion, + references: options.references, + }, + }); + } + /** + * Delete an object + */ + async delete(options) { + this.log.debug('Deleting saved object %s/%s', options); + return await this.requester.request({ + description: 'delete saved object', + path: kbn_client_requester_1.uriencode `/api/saved_objects/${options.type}/${options.id}`, + method: 'DELETE', + }); + } +} +exports.KbnClientSavedObjects = KbnClientSavedObjects; + + +/***/ }), +/* 498 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +Object.defineProperty(exports, "__esModule", { value: true }); +const kbn_client_requester_1 = __webpack_require__(451); +class KbnClientUiSettings { + constructor(log, requester, defaults) { + this.log = log; + this.requester = requester; + this.defaults = defaults; + } + async get(setting) { + var _a; + const all = await this.getAll(); + const value = (_a = all[setting]) === null || _a === void 0 ? void 0 : _a.userValue; + this.log.verbose('uiSettings.value: %j', value); + return value; + } + /** + * Gets defaultIndex from the config doc. + */ + async getDefaultIndex() { + return await this.get('defaultIndex'); + } + /** + * Unset a uiSetting + */ + async unset(setting) { + return await this.requester.request({ + path: kbn_client_requester_1.uriencode `/api/kibana/settings/${setting}`, + method: 'DELETE', + }); + } + /** + * Replace all uiSettings with the `doc` values, `doc` is merged + * with some defaults + */ + async replace(doc, { retries = 5 } = {}) { + this.log.debug('replacing kibana config doc: %j', doc); + const changes = { + ...this.defaults, + ...doc, + }; + for (const [name, { isOverridden }] of Object.entries(await this.getAll())) { + if (!isOverridden && !changes.hasOwnProperty(name)) { + changes[name] = null; + } + } + await this.requester.request({ + method: 'POST', + path: '/api/kibana/settings', + body: { changes }, + retries, + }); + } + /** + * Add fields to the config doc (like setting timezone and defaultIndex) + */ + async update(updates) { + this.log.debug('applying update to kibana config: %j', updates); + await this.requester.request({ + path: '/api/kibana/settings', + method: 'POST', + body: { + changes: updates, + }, + }); + } + async getAll() { + const resp = await this.requester.request({ + path: '/api/kibana/settings', + method: 'GET', + }); + return resp.settings; + } +} +exports.KbnClientUiSettings = KbnClientUiSettings; + + +/***/ }), +/* 499 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +Object.defineProperty(exports, "__esModule", { value: true }); +const tslib_1 = __webpack_require__(36); +tslib_1.__exportStar(__webpack_require__(500), exports); /***/ }), -/* 498 */ +/* 500 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -43700,83 +43882,113 @@ exports.KbnClientSavedObjects = KbnClientSavedObjects; * under the License. */ Object.defineProperty(exports, "__esModule", { value: true }); -const kbn_client_requester_1 = __webpack_require__(451); -class KbnClientUiSettings { - constructor(log, requester, defaults) { - this.log = log; - this.requester = requester; - this.defaults = defaults; +const tslib_1 = __webpack_require__(36); +const util_1 = __webpack_require__(29); +const axios_1 = tslib_1.__importDefault(__webpack_require__(453)); +function parseConfig(log) { + const configJson = process.env.KIBANA_CI_STATS_CONFIG; + if (!configJson) { + log.debug('KIBANA_CI_STATS_CONFIG environment variable not found, disabling CiStatsReporter'); + return; } - async get(setting) { - var _a; - const all = await this.getAll(); - const value = (_a = all[setting]) === null || _a === void 0 ? void 0 : _a.userValue; - this.log.verbose('uiSettings.value: %j', value); - return value; + let config; + try { + config = JSON.parse(configJson); } - /** - * Gets defaultIndex from the config doc. - */ - async getDefaultIndex() { - return await this.get('defaultIndex'); + catch (_) { + // handled below } - /** - * Unset a uiSetting - */ - async unset(setting) { - return await this.requester.request({ - path: kbn_client_requester_1.uriencode `/api/kibana/settings/${setting}`, - method: 'DELETE', - }); + if (typeof config === 'object' && config !== null) { + return validateConfig(log, config); } - /** - * Replace all uiSettings with the `doc` values, `doc` is merged - * with some defaults - */ - async replace(doc, { retries = 5 } = {}) { - this.log.debug('replacing kibana config doc: %j', doc); - const changes = { - ...this.defaults, - ...doc, - }; - for (const [name, { isOverridden }] of Object.entries(await this.getAll())) { - if (!isOverridden && !changes.hasOwnProperty(name)) { - changes[name] = null; - } - } - await this.requester.request({ - method: 'POST', - path: '/api/kibana/settings', - body: { changes }, - retries, - }); + log.warning('KIBANA_CI_STATS_CONFIG is invalid, stats will not be reported'); + return; +} +function validateConfig(log, config) { + const validApiUrl = typeof config.apiUrl === 'string' && config.apiUrl.length !== 0; + if (!validApiUrl) { + log.warning('KIBANA_CI_STATS_CONFIG is missing a valid api url, stats will not be reported'); + return; } - /** - * Add fields to the config doc (like setting timezone and defaultIndex) - */ - async update(updates) { - this.log.debug('applying update to kibana config: %j', updates); - await this.requester.request({ - path: '/api/kibana/settings', - method: 'POST', - body: { - changes: updates, - }, - }); + const validApiToken = typeof config.apiToken === 'string' && config.apiToken.length !== 0; + if (!validApiToken) { + log.warning('KIBANA_CI_STATS_CONFIG is missing a valid api token, stats will not be reported'); + return; } - async getAll() { - const resp = await this.requester.request({ - path: '/api/kibana/settings', - method: 'GET', - }); - return resp.settings; + const validId = typeof config.buildId === 'string' && config.buildId.length !== 0; + if (!validId) { + log.warning('KIBANA_CI_STATS_CONFIG is missing a valid build id, stats will not be reported'); + return; } + return config; } -exports.KbnClientUiSettings = KbnClientUiSettings; +class CiStatsReporter { + constructor(config, log) { + this.config = config; + this.log = log; + } + static fromEnv(log) { + return new CiStatsReporter(parseConfig(log), log); + } + isEnabled() { + return !!this.config; + } + async metric(name, subName, value) { + var _a, _b, _c, _d; + if (!this.config) { + return; + } + let attempt = 0; + const maxAttempts = 5; + while (true) { + attempt += 1; + try { + await axios_1.default.request({ + method: 'POST', + url: '/metric', + baseURL: this.config.apiUrl, + params: { + buildId: this.config.buildId, + }, + headers: { + Authorization: `token ${this.config.apiToken}`, + }, + data: { + name, + subName, + value, + }, + }); + return; + } + catch (error) { + if (!((_a = error) === null || _a === void 0 ? void 0 : _a.request)) { + // not an axios error, must be a usage error that we should notify user about + throw error; + } + if (((_b = error) === null || _b === void 0 ? void 0 : _b.response) && error.response.status !== 502) { + // error response from service was received so warn the user and move on + this.log.warning(`error recording metric [status=${error.response.status}] [resp=${util_1.inspect(error.response.data)}] [${name}/${subName}=${value}]`); + return; + } + if (attempt === maxAttempts) { + this.log.warning(`failed to reach kibana-ci-stats service too many times, unable to record metric [${name}/${subName}=${value}]`); + return; + } + // we failed to reach the backend and we have remaining attempts, lets retry after a short delay + const reason = ((_d = (_c = error) === null || _c === void 0 ? void 0 : _c.response) === null || _d === void 0 ? void 0 : _d.status) ? `${error.response.status} response` + : 'no response'; + this.log.warning(`failed to reach kibana-ci-stats service [reason=${reason}], retrying in ${attempt} seconds`); + await new Promise(resolve => setTimeout(resolve, attempt * 1000)); + } + } + } +} +exports.CiStatsReporter = CiStatsReporter; /***/ }), -/* 499 */ +/* 501 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -43842,7 +44054,7 @@ async function parallelize(items, fn, concurrency = 4) { } /***/ }), -/* 500 */ +/* 502 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -43851,15 +44063,15 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "buildProjectGraph", function() { return buildProjectGraph; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "topologicallyBatchProjects", function() { return topologicallyBatchProjects; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "includeTransitiveProjects", function() { return includeTransitiveProjects; }); -/* harmony import */ var glob__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(501); +/* harmony import */ var glob__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(503); /* harmony import */ var glob__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(glob__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(16); /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(29); /* harmony import */ var util__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(util__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _errors__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(514); -/* harmony import */ var _project__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(515); -/* harmony import */ var _workspaces__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(576); +/* harmony import */ var _errors__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(516); +/* harmony import */ var _project__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(517); +/* harmony import */ var _workspaces__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(578); /* * Licensed to Elasticsearch B.V. under one or more contributor * license agreements. See the NOTICE file distributed with @@ -44058,7 +44270,7 @@ function includeTransitiveProjects(subsetOfProjects, allProjects, { } /***/ }), -/* 501 */ +/* 503 */ /***/ (function(module, exports, __webpack_require__) { // Approach: @@ -44104,21 +44316,21 @@ function includeTransitiveProjects(subsetOfProjects, allProjects, { module.exports = glob var fs = __webpack_require__(23) -var rp = __webpack_require__(502) -var minimatch = __webpack_require__(504) +var rp = __webpack_require__(504) +var minimatch = __webpack_require__(506) var Minimatch = minimatch.Minimatch -var inherits = __webpack_require__(508) +var inherits = __webpack_require__(510) var EE = __webpack_require__(379).EventEmitter var path = __webpack_require__(16) var assert = __webpack_require__(30) -var isAbsolute = __webpack_require__(510) -var globSync = __webpack_require__(511) -var common = __webpack_require__(512) +var isAbsolute = __webpack_require__(512) +var globSync = __webpack_require__(513) +var common = __webpack_require__(514) var alphasort = common.alphasort var alphasorti = common.alphasorti var setopts = common.setopts var ownProp = common.ownProp -var inflight = __webpack_require__(513) +var inflight = __webpack_require__(515) var util = __webpack_require__(29) var childrenIgnored = common.childrenIgnored var isIgnored = common.isIgnored @@ -44854,7 +45066,7 @@ Glob.prototype._stat2 = function (f, abs, er, stat, cb) { /***/ }), -/* 502 */ +/* 504 */ /***/ (function(module, exports, __webpack_require__) { module.exports = realpath @@ -44870,7 +45082,7 @@ var origRealpathSync = fs.realpathSync var version = process.version var ok = /^v[0-5]\./.test(version) -var old = __webpack_require__(503) +var old = __webpack_require__(505) function newError (er) { return er && er.syscall === 'realpath' && ( @@ -44926,7 +45138,7 @@ function unmonkeypatch () { /***/ }), -/* 503 */ +/* 505 */ /***/ (function(module, exports, __webpack_require__) { // Copyright Joyent, Inc. and other Node contributors. @@ -45235,7 +45447,7 @@ exports.realpath = function realpath(p, cache, cb) { /***/ }), -/* 504 */ +/* 506 */ /***/ (function(module, exports, __webpack_require__) { module.exports = minimatch @@ -45247,7 +45459,7 @@ try { } catch (er) {} var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} -var expand = __webpack_require__(505) +var expand = __webpack_require__(507) var plTypes = { '!': { open: '(?:(?!(?:', close: '))[^/]*?)'}, @@ -46164,11 +46376,11 @@ function regExpEscape (s) { /***/ }), -/* 505 */ +/* 507 */ /***/ (function(module, exports, __webpack_require__) { -var concatMap = __webpack_require__(506); -var balanced = __webpack_require__(507); +var concatMap = __webpack_require__(508); +var balanced = __webpack_require__(509); module.exports = expandTop; @@ -46371,7 +46583,7 @@ function expand(str, isTop) { /***/ }), -/* 506 */ +/* 508 */ /***/ (function(module, exports) { module.exports = function (xs, fn) { @@ -46390,7 +46602,7 @@ var isArray = Array.isArray || function (xs) { /***/ }), -/* 507 */ +/* 509 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -46456,7 +46668,7 @@ function range(a, b, str) { /***/ }), -/* 508 */ +/* 510 */ /***/ (function(module, exports, __webpack_require__) { try { @@ -46466,12 +46678,12 @@ try { module.exports = util.inherits; } catch (e) { /* istanbul ignore next */ - module.exports = __webpack_require__(509); + module.exports = __webpack_require__(511); } /***/ }), -/* 509 */ +/* 511 */ /***/ (function(module, exports) { if (typeof Object.create === 'function') { @@ -46504,7 +46716,7 @@ if (typeof Object.create === 'function') { /***/ }), -/* 510 */ +/* 512 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -46531,22 +46743,22 @@ module.exports.win32 = win32; /***/ }), -/* 511 */ +/* 513 */ /***/ (function(module, exports, __webpack_require__) { module.exports = globSync globSync.GlobSync = GlobSync var fs = __webpack_require__(23) -var rp = __webpack_require__(502) -var minimatch = __webpack_require__(504) +var rp = __webpack_require__(504) +var minimatch = __webpack_require__(506) var Minimatch = minimatch.Minimatch -var Glob = __webpack_require__(501).Glob +var Glob = __webpack_require__(503).Glob var util = __webpack_require__(29) var path = __webpack_require__(16) var assert = __webpack_require__(30) -var isAbsolute = __webpack_require__(510) -var common = __webpack_require__(512) +var isAbsolute = __webpack_require__(512) +var common = __webpack_require__(514) var alphasort = common.alphasort var alphasorti = common.alphasorti var setopts = common.setopts @@ -47023,7 +47235,7 @@ GlobSync.prototype._makeAbs = function (f) { /***/ }), -/* 512 */ +/* 514 */ /***/ (function(module, exports, __webpack_require__) { exports.alphasort = alphasort @@ -47041,8 +47253,8 @@ function ownProp (obj, field) { } var path = __webpack_require__(16) -var minimatch = __webpack_require__(504) -var isAbsolute = __webpack_require__(510) +var minimatch = __webpack_require__(506) +var isAbsolute = __webpack_require__(512) var Minimatch = minimatch.Minimatch function alphasorti (a, b) { @@ -47269,7 +47481,7 @@ function childrenIgnored (self, path) { /***/ }), -/* 513 */ +/* 515 */ /***/ (function(module, exports, __webpack_require__) { var wrappy = __webpack_require__(385) @@ -47329,7 +47541,7 @@ function slice (args) { /***/ }), -/* 514 */ +/* 516 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -47362,7 +47574,7 @@ class CliError extends Error { } /***/ }), -/* 515 */ +/* 517 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -47376,10 +47588,10 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(29); /* harmony import */ var util__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(util__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var _errors__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(514); +/* harmony import */ var _errors__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(516); /* harmony import */ var _log__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(34); -/* harmony import */ var _package_json__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(516); -/* harmony import */ var _scripts__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(561); +/* harmony import */ var _package_json__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(518); +/* harmony import */ var _scripts__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(563); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } @@ -47610,7 +47822,7 @@ function normalizePath(path) { } /***/ }), -/* 516 */ +/* 518 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -47618,9 +47830,9 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "readPackageJson", function() { return readPackageJson; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "writePackageJson", function() { return writePackageJson; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isLinkDependency", function() { return isLinkDependency; }); -/* harmony import */ var read_pkg__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(517); +/* harmony import */ var read_pkg__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(519); /* harmony import */ var read_pkg__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(read_pkg__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var write_pkg__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(543); +/* harmony import */ var write_pkg__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(545); /* harmony import */ var write_pkg__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(write_pkg__WEBPACK_IMPORTED_MODULE_1__); /* * Licensed to Elasticsearch B.V. under one or more contributor @@ -47654,7 +47866,7 @@ function writePackageJson(path, json) { const isLinkDependency = depVersion => depVersion.startsWith('link:'); /***/ }), -/* 517 */ +/* 519 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -47662,7 +47874,7 @@ const isLinkDependency = depVersion => depVersion.startsWith('link:'); const {promisify} = __webpack_require__(29); const fs = __webpack_require__(23); const path = __webpack_require__(16); -const parseJson = __webpack_require__(518); +const parseJson = __webpack_require__(520); const readFileAsync = promisify(fs.readFile); @@ -47677,7 +47889,7 @@ module.exports = async options => { const json = parseJson(await readFileAsync(filePath, 'utf8')); if (options.normalize) { - __webpack_require__(519)(json); + __webpack_require__(521)(json); } return json; @@ -47694,7 +47906,7 @@ module.exports.sync = options => { const json = parseJson(fs.readFileSync(filePath, 'utf8')); if (options.normalize) { - __webpack_require__(519)(json); + __webpack_require__(521)(json); } return json; @@ -47702,7 +47914,7 @@ module.exports.sync = options => { /***/ }), -/* 518 */ +/* 520 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -47759,15 +47971,15 @@ module.exports = (string, reviver, filename) => { /***/ }), -/* 519 */ +/* 521 */ /***/ (function(module, exports, __webpack_require__) { module.exports = normalize -var fixer = __webpack_require__(520) +var fixer = __webpack_require__(522) normalize.fixer = fixer -var makeWarning = __webpack_require__(541) +var makeWarning = __webpack_require__(543) var fieldsToFix = ['name','version','description','repository','modules','scripts' ,'files','bin','man','bugs','keywords','readme','homepage','license'] @@ -47804,17 +48016,17 @@ function ucFirst (string) { /***/ }), -/* 520 */ +/* 522 */ /***/ (function(module, exports, __webpack_require__) { -var semver = __webpack_require__(521) -var validateLicense = __webpack_require__(522); -var hostedGitInfo = __webpack_require__(527) -var isBuiltinModule = __webpack_require__(530).isCore +var semver = __webpack_require__(523) +var validateLicense = __webpack_require__(524); +var hostedGitInfo = __webpack_require__(529) +var isBuiltinModule = __webpack_require__(532).isCore var depTypes = ["dependencies","devDependencies","optionalDependencies"] -var extractDescription = __webpack_require__(539) +var extractDescription = __webpack_require__(541) var url = __webpack_require__(452) -var typos = __webpack_require__(540) +var typos = __webpack_require__(542) var fixer = module.exports = { // default warning function @@ -48228,7 +48440,7 @@ function bugsTypos(bugs, warn) { /***/ }), -/* 521 */ +/* 523 */ /***/ (function(module, exports) { exports = module.exports = SemVer @@ -49717,11 +49929,11 @@ function coerce (version) { /***/ }), -/* 522 */ +/* 524 */ /***/ (function(module, exports, __webpack_require__) { -var parse = __webpack_require__(523); -var correct = __webpack_require__(525); +var parse = __webpack_require__(525); +var correct = __webpack_require__(527); var genericWarning = ( 'license should be ' + @@ -49807,10 +50019,10 @@ module.exports = function(argument) { /***/ }), -/* 523 */ +/* 525 */ /***/ (function(module, exports, __webpack_require__) { -var parser = __webpack_require__(524).parser +var parser = __webpack_require__(526).parser module.exports = function (argument) { return parser.parse(argument) @@ -49818,7 +50030,7 @@ module.exports = function (argument) { /***/ }), -/* 524 */ +/* 526 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(module) {/* parser generated by jison 0.4.17 */ @@ -51182,10 +51394,10 @@ if ( true && __webpack_require__.c[__webpack_require__.s] === module) { /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(5)(module))) /***/ }), -/* 525 */ +/* 527 */ /***/ (function(module, exports, __webpack_require__) { -var licenseIDs = __webpack_require__(526); +var licenseIDs = __webpack_require__(528); function valid(string) { return licenseIDs.indexOf(string) > -1; @@ -51425,20 +51637,20 @@ module.exports = function(identifier) { /***/ }), -/* 526 */ +/* 528 */ /***/ (function(module) { module.exports = JSON.parse("[\"Glide\",\"Abstyles\",\"AFL-1.1\",\"AFL-1.2\",\"AFL-2.0\",\"AFL-2.1\",\"AFL-3.0\",\"AMPAS\",\"APL-1.0\",\"Adobe-Glyph\",\"APAFML\",\"Adobe-2006\",\"AGPL-1.0\",\"Afmparse\",\"Aladdin\",\"ADSL\",\"AMDPLPA\",\"ANTLR-PD\",\"Apache-1.0\",\"Apache-1.1\",\"Apache-2.0\",\"AML\",\"APSL-1.0\",\"APSL-1.1\",\"APSL-1.2\",\"APSL-2.0\",\"Artistic-1.0\",\"Artistic-1.0-Perl\",\"Artistic-1.0-cl8\",\"Artistic-2.0\",\"AAL\",\"Bahyph\",\"Barr\",\"Beerware\",\"BitTorrent-1.0\",\"BitTorrent-1.1\",\"BSL-1.0\",\"Borceux\",\"BSD-2-Clause\",\"BSD-2-Clause-FreeBSD\",\"BSD-2-Clause-NetBSD\",\"BSD-3-Clause\",\"BSD-3-Clause-Clear\",\"BSD-4-Clause\",\"BSD-Protection\",\"BSD-Source-Code\",\"BSD-3-Clause-Attribution\",\"0BSD\",\"BSD-4-Clause-UC\",\"bzip2-1.0.5\",\"bzip2-1.0.6\",\"Caldera\",\"CECILL-1.0\",\"CECILL-1.1\",\"CECILL-2.0\",\"CECILL-2.1\",\"CECILL-B\",\"CECILL-C\",\"ClArtistic\",\"MIT-CMU\",\"CNRI-Jython\",\"CNRI-Python\",\"CNRI-Python-GPL-Compatible\",\"CPOL-1.02\",\"CDDL-1.0\",\"CDDL-1.1\",\"CPAL-1.0\",\"CPL-1.0\",\"CATOSL-1.1\",\"Condor-1.1\",\"CC-BY-1.0\",\"CC-BY-2.0\",\"CC-BY-2.5\",\"CC-BY-3.0\",\"CC-BY-4.0\",\"CC-BY-ND-1.0\",\"CC-BY-ND-2.0\",\"CC-BY-ND-2.5\",\"CC-BY-ND-3.0\",\"CC-BY-ND-4.0\",\"CC-BY-NC-1.0\",\"CC-BY-NC-2.0\",\"CC-BY-NC-2.5\",\"CC-BY-NC-3.0\",\"CC-BY-NC-4.0\",\"CC-BY-NC-ND-1.0\",\"CC-BY-NC-ND-2.0\",\"CC-BY-NC-ND-2.5\",\"CC-BY-NC-ND-3.0\",\"CC-BY-NC-ND-4.0\",\"CC-BY-NC-SA-1.0\",\"CC-BY-NC-SA-2.0\",\"CC-BY-NC-SA-2.5\",\"CC-BY-NC-SA-3.0\",\"CC-BY-NC-SA-4.0\",\"CC-BY-SA-1.0\",\"CC-BY-SA-2.0\",\"CC-BY-SA-2.5\",\"CC-BY-SA-3.0\",\"CC-BY-SA-4.0\",\"CC0-1.0\",\"Crossword\",\"CrystalStacker\",\"CUA-OPL-1.0\",\"Cube\",\"curl\",\"D-FSL-1.0\",\"diffmark\",\"WTFPL\",\"DOC\",\"Dotseqn\",\"DSDP\",\"dvipdfm\",\"EPL-1.0\",\"ECL-1.0\",\"ECL-2.0\",\"eGenix\",\"EFL-1.0\",\"EFL-2.0\",\"MIT-advertising\",\"MIT-enna\",\"Entessa\",\"ErlPL-1.1\",\"EUDatagrid\",\"EUPL-1.0\",\"EUPL-1.1\",\"Eurosym\",\"Fair\",\"MIT-feh\",\"Frameworx-1.0\",\"FreeImage\",\"FTL\",\"FSFAP\",\"FSFUL\",\"FSFULLR\",\"Giftware\",\"GL2PS\",\"Glulxe\",\"AGPL-3.0\",\"GFDL-1.1\",\"GFDL-1.2\",\"GFDL-1.3\",\"GPL-1.0\",\"GPL-2.0\",\"GPL-3.0\",\"LGPL-2.1\",\"LGPL-3.0\",\"LGPL-2.0\",\"gnuplot\",\"gSOAP-1.3b\",\"HaskellReport\",\"HPND\",\"IBM-pibs\",\"IPL-1.0\",\"ICU\",\"ImageMagick\",\"iMatix\",\"Imlib2\",\"IJG\",\"Info-ZIP\",\"Intel-ACPI\",\"Intel\",\"Interbase-1.0\",\"IPA\",\"ISC\",\"JasPer-2.0\",\"JSON\",\"LPPL-1.0\",\"LPPL-1.1\",\"LPPL-1.2\",\"LPPL-1.3a\",\"LPPL-1.3c\",\"Latex2e\",\"BSD-3-Clause-LBNL\",\"Leptonica\",\"LGPLLR\",\"Libpng\",\"libtiff\",\"LAL-1.2\",\"LAL-1.3\",\"LiLiQ-P-1.1\",\"LiLiQ-Rplus-1.1\",\"LiLiQ-R-1.1\",\"LPL-1.02\",\"LPL-1.0\",\"MakeIndex\",\"MTLL\",\"MS-PL\",\"MS-RL\",\"MirOS\",\"MITNFA\",\"MIT\",\"Motosoto\",\"MPL-1.0\",\"MPL-1.1\",\"MPL-2.0\",\"MPL-2.0-no-copyleft-exception\",\"mpich2\",\"Multics\",\"Mup\",\"NASA-1.3\",\"Naumen\",\"NBPL-1.0\",\"NetCDF\",\"NGPL\",\"NOSL\",\"NPL-1.0\",\"NPL-1.1\",\"Newsletr\",\"NLPL\",\"Nokia\",\"NPOSL-3.0\",\"NLOD-1.0\",\"Noweb\",\"NRL\",\"NTP\",\"Nunit\",\"OCLC-2.0\",\"ODbL-1.0\",\"PDDL-1.0\",\"OCCT-PL\",\"OGTSL\",\"OLDAP-2.2.2\",\"OLDAP-1.1\",\"OLDAP-1.2\",\"OLDAP-1.3\",\"OLDAP-1.4\",\"OLDAP-2.0\",\"OLDAP-2.0.1\",\"OLDAP-2.1\",\"OLDAP-2.2\",\"OLDAP-2.2.1\",\"OLDAP-2.3\",\"OLDAP-2.4\",\"OLDAP-2.5\",\"OLDAP-2.6\",\"OLDAP-2.7\",\"OLDAP-2.8\",\"OML\",\"OPL-1.0\",\"OSL-1.0\",\"OSL-1.1\",\"OSL-2.0\",\"OSL-2.1\",\"OSL-3.0\",\"OpenSSL\",\"OSET-PL-2.1\",\"PHP-3.0\",\"PHP-3.01\",\"Plexus\",\"PostgreSQL\",\"psfrag\",\"psutils\",\"Python-2.0\",\"QPL-1.0\",\"Qhull\",\"Rdisc\",\"RPSL-1.0\",\"RPL-1.1\",\"RPL-1.5\",\"RHeCos-1.1\",\"RSCPL\",\"RSA-MD\",\"Ruby\",\"SAX-PD\",\"Saxpath\",\"SCEA\",\"SWL\",\"SMPPL\",\"Sendmail\",\"SGI-B-1.0\",\"SGI-B-1.1\",\"SGI-B-2.0\",\"OFL-1.0\",\"OFL-1.1\",\"SimPL-2.0\",\"Sleepycat\",\"SNIA\",\"Spencer-86\",\"Spencer-94\",\"Spencer-99\",\"SMLNJ\",\"SugarCRM-1.1.3\",\"SISSL\",\"SISSL-1.2\",\"SPL-1.0\",\"Watcom-1.0\",\"TCL\",\"Unlicense\",\"TMate\",\"TORQUE-1.1\",\"TOSL\",\"Unicode-TOU\",\"UPL-1.0\",\"NCSA\",\"Vim\",\"VOSTROM\",\"VSL-1.0\",\"W3C-19980720\",\"W3C\",\"Wsuipa\",\"Xnet\",\"X11\",\"Xerox\",\"XFree86-1.1\",\"xinetd\",\"xpp\",\"XSkat\",\"YPL-1.0\",\"YPL-1.1\",\"Zed\",\"Zend-2.0\",\"Zimbra-1.3\",\"Zimbra-1.4\",\"Zlib\",\"zlib-acknowledgement\",\"ZPL-1.1\",\"ZPL-2.0\",\"ZPL-2.1\",\"BSD-3-Clause-No-Nuclear-License\",\"BSD-3-Clause-No-Nuclear-Warranty\",\"BSD-3-Clause-No-Nuclear-License-2014\",\"eCos-2.0\",\"GPL-2.0-with-autoconf-exception\",\"GPL-2.0-with-bison-exception\",\"GPL-2.0-with-classpath-exception\",\"GPL-2.0-with-font-exception\",\"GPL-2.0-with-GCC-exception\",\"GPL-3.0-with-autoconf-exception\",\"GPL-3.0-with-GCC-exception\",\"StandardML-NJ\",\"WXwindows\"]"); /***/ }), -/* 527 */ +/* 529 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var url = __webpack_require__(452) -var gitHosts = __webpack_require__(528) -var GitHost = module.exports = __webpack_require__(529) +var gitHosts = __webpack_require__(530) +var GitHost = module.exports = __webpack_require__(531) var protocolToRepresentationMap = { 'git+ssh': 'sshurl', @@ -51559,7 +51771,7 @@ function parseGitUrl (giturl) { /***/ }), -/* 528 */ +/* 530 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -51634,12 +51846,12 @@ Object.keys(gitHosts).forEach(function (name) { /***/ }), -/* 529 */ +/* 531 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var gitHosts = __webpack_require__(528) +var gitHosts = __webpack_require__(530) var extend = Object.assign || __webpack_require__(29)._extend var GitHost = module.exports = function (type, user, auth, project, committish, defaultRepresentation, opts) { @@ -51755,21 +51967,21 @@ GitHost.prototype.toString = function (opts) { /***/ }), -/* 530 */ +/* 532 */ /***/ (function(module, exports, __webpack_require__) { -var core = __webpack_require__(531); -var async = __webpack_require__(533); +var core = __webpack_require__(533); +var async = __webpack_require__(535); async.core = core; async.isCore = function isCore(x) { return core[x]; }; -async.sync = __webpack_require__(538); +async.sync = __webpack_require__(540); exports = async; module.exports = async; /***/ }), -/* 531 */ +/* 533 */ /***/ (function(module, exports, __webpack_require__) { var current = (process.versions && process.versions.node && process.versions.node.split('.')) || []; @@ -51816,7 +52028,7 @@ function versionIncluded(specifierValue) { return matchesRange(specifierValue); } -var data = __webpack_require__(532); +var data = __webpack_require__(534); var core = {}; for (var mod in data) { // eslint-disable-line no-restricted-syntax @@ -51828,21 +52040,21 @@ module.exports = core; /***/ }), -/* 532 */ +/* 534 */ /***/ (function(module) { module.exports = JSON.parse("{\"assert\":true,\"async_hooks\":\">= 8\",\"buffer_ieee754\":\"< 0.9.7\",\"buffer\":true,\"child_process\":true,\"cluster\":true,\"console\":true,\"constants\":true,\"crypto\":true,\"_debugger\":\"< 8\",\"dgram\":true,\"dns\":true,\"domain\":true,\"events\":true,\"freelist\":\"< 6\",\"fs\":true,\"fs/promises\":\">= 10 && < 10.1\",\"_http_agent\":\">= 0.11.1\",\"_http_client\":\">= 0.11.1\",\"_http_common\":\">= 0.11.1\",\"_http_incoming\":\">= 0.11.1\",\"_http_outgoing\":\">= 0.11.1\",\"_http_server\":\">= 0.11.1\",\"http\":true,\"http2\":\">= 8.8\",\"https\":true,\"inspector\":\">= 8.0.0\",\"_linklist\":\"< 8\",\"module\":true,\"net\":true,\"node-inspect/lib/_inspect\":\">= 7.6.0\",\"node-inspect/lib/internal/inspect_client\":\">= 7.6.0\",\"node-inspect/lib/internal/inspect_repl\":\">= 7.6.0\",\"os\":true,\"path\":true,\"perf_hooks\":\">= 8.5\",\"process\":\">= 1\",\"punycode\":true,\"querystring\":true,\"readline\":true,\"repl\":true,\"smalloc\":\">= 0.11.5 && < 3\",\"_stream_duplex\":\">= 0.9.4\",\"_stream_transform\":\">= 0.9.4\",\"_stream_wrap\":\">= 1.4.1\",\"_stream_passthrough\":\">= 0.9.4\",\"_stream_readable\":\">= 0.9.4\",\"_stream_writable\":\">= 0.9.4\",\"stream\":true,\"string_decoder\":true,\"sys\":true,\"timers\":true,\"_tls_common\":\">= 0.11.13\",\"_tls_legacy\":\">= 0.11.3 && < 10\",\"_tls_wrap\":\">= 0.11.3\",\"tls\":true,\"trace_events\":\">= 10\",\"tty\":true,\"url\":true,\"util\":true,\"v8/tools/arguments\":\">= 10\",\"v8/tools/codemap\":[\">= 4.4.0 && < 5\",\">= 5.2.0\"],\"v8/tools/consarray\":[\">= 4.4.0 && < 5\",\">= 5.2.0\"],\"v8/tools/csvparser\":[\">= 4.4.0 && < 5\",\">= 5.2.0\"],\"v8/tools/logreader\":[\">= 4.4.0 && < 5\",\">= 5.2.0\"],\"v8/tools/profile_view\":[\">= 4.4.0 && < 5\",\">= 5.2.0\"],\"v8/tools/splaytree\":[\">= 4.4.0 && < 5\",\">= 5.2.0\"],\"v8\":\">= 1\",\"vm\":true,\"worker_threads\":\">= 11.7\",\"zlib\":true}"); /***/ }), -/* 533 */ +/* 535 */ /***/ (function(module, exports, __webpack_require__) { -var core = __webpack_require__(531); +var core = __webpack_require__(533); var fs = __webpack_require__(23); var path = __webpack_require__(16); -var caller = __webpack_require__(534); -var nodeModulesPaths = __webpack_require__(535); -var normalizeOptions = __webpack_require__(537); +var caller = __webpack_require__(536); +var nodeModulesPaths = __webpack_require__(537); +var normalizeOptions = __webpack_require__(539); var defaultIsFile = function isFile(file, cb) { fs.stat(file, function (err, stat) { @@ -52069,7 +52281,7 @@ module.exports = function resolve(x, options, callback) { /***/ }), -/* 534 */ +/* 536 */ /***/ (function(module, exports) { module.exports = function () { @@ -52083,11 +52295,11 @@ module.exports = function () { /***/ }), -/* 535 */ +/* 537 */ /***/ (function(module, exports, __webpack_require__) { var path = __webpack_require__(16); -var parse = path.parse || __webpack_require__(536); +var parse = path.parse || __webpack_require__(538); var getNodeModulesDirs = function getNodeModulesDirs(absoluteStart, modules) { var prefix = '/'; @@ -52131,7 +52343,7 @@ module.exports = function nodeModulesPaths(start, opts, request) { /***/ }), -/* 536 */ +/* 538 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -52231,7 +52443,7 @@ module.exports.win32 = win32.parse; /***/ }), -/* 537 */ +/* 539 */ /***/ (function(module, exports) { module.exports = function (x, opts) { @@ -52247,15 +52459,15 @@ module.exports = function (x, opts) { /***/ }), -/* 538 */ +/* 540 */ /***/ (function(module, exports, __webpack_require__) { -var core = __webpack_require__(531); +var core = __webpack_require__(533); var fs = __webpack_require__(23); var path = __webpack_require__(16); -var caller = __webpack_require__(534); -var nodeModulesPaths = __webpack_require__(535); -var normalizeOptions = __webpack_require__(537); +var caller = __webpack_require__(536); +var nodeModulesPaths = __webpack_require__(537); +var normalizeOptions = __webpack_require__(539); var defaultIsFile = function isFile(file) { try { @@ -52407,7 +52619,7 @@ module.exports = function (x, options) { /***/ }), -/* 539 */ +/* 541 */ /***/ (function(module, exports) { module.exports = extractDescription @@ -52427,17 +52639,17 @@ function extractDescription (d) { /***/ }), -/* 540 */ +/* 542 */ /***/ (function(module) { module.exports = JSON.parse("{\"topLevel\":{\"dependancies\":\"dependencies\",\"dependecies\":\"dependencies\",\"depdenencies\":\"dependencies\",\"devEependencies\":\"devDependencies\",\"depends\":\"dependencies\",\"dev-dependencies\":\"devDependencies\",\"devDependences\":\"devDependencies\",\"devDepenencies\":\"devDependencies\",\"devdependencies\":\"devDependencies\",\"repostitory\":\"repository\",\"repo\":\"repository\",\"prefereGlobal\":\"preferGlobal\",\"hompage\":\"homepage\",\"hampage\":\"homepage\",\"autohr\":\"author\",\"autor\":\"author\",\"contributers\":\"contributors\",\"publicationConfig\":\"publishConfig\",\"script\":\"scripts\"},\"bugs\":{\"web\":\"url\",\"name\":\"url\"},\"script\":{\"server\":\"start\",\"tests\":\"test\"}}"); /***/ }), -/* 541 */ +/* 543 */ /***/ (function(module, exports, __webpack_require__) { var util = __webpack_require__(29) -var messages = __webpack_require__(542) +var messages = __webpack_require__(544) module.exports = function() { var args = Array.prototype.slice.call(arguments, 0) @@ -52462,20 +52674,20 @@ function makeTypoWarning (providedName, probableName, field) { /***/ }), -/* 542 */ +/* 544 */ /***/ (function(module) { module.exports = JSON.parse("{\"repositories\":\"'repositories' (plural) Not supported. Please pick one as the 'repository' field\",\"missingRepository\":\"No repository field.\",\"brokenGitUrl\":\"Probably broken git url: %s\",\"nonObjectScripts\":\"scripts must be an object\",\"nonStringScript\":\"script values must be string commands\",\"nonArrayFiles\":\"Invalid 'files' member\",\"invalidFilename\":\"Invalid filename in 'files' list: %s\",\"nonArrayBundleDependencies\":\"Invalid 'bundleDependencies' list. Must be array of package names\",\"nonStringBundleDependency\":\"Invalid bundleDependencies member: %s\",\"nonDependencyBundleDependency\":\"Non-dependency in bundleDependencies: %s\",\"nonObjectDependencies\":\"%s field must be an object\",\"nonStringDependency\":\"Invalid dependency: %s %s\",\"deprecatedArrayDependencies\":\"specifying %s as array is deprecated\",\"deprecatedModules\":\"modules field is deprecated\",\"nonArrayKeywords\":\"keywords should be an array of strings\",\"nonStringKeyword\":\"keywords should be an array of strings\",\"conflictingName\":\"%s is also the name of a node core module.\",\"nonStringDescription\":\"'description' field should be a string\",\"missingDescription\":\"No description\",\"missingReadme\":\"No README data\",\"missingLicense\":\"No license field.\",\"nonEmailUrlBugsString\":\"Bug string field must be url, email, or {email,url}\",\"nonUrlBugsUrlField\":\"bugs.url field must be a string url. Deleted.\",\"nonEmailBugsEmailField\":\"bugs.email field must be a string email. Deleted.\",\"emptyNormalizedBugs\":\"Normalized value of bugs field is an empty object. Deleted.\",\"nonUrlHomepage\":\"homepage field must be a string url. Deleted.\",\"invalidLicense\":\"license should be a valid SPDX license expression\",\"typo\":\"%s should probably be %s.\"}"); /***/ }), -/* 543 */ +/* 545 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const path = __webpack_require__(16); -const writeJsonFile = __webpack_require__(544); -const sortKeys = __webpack_require__(556); +const writeJsonFile = __webpack_require__(546); +const sortKeys = __webpack_require__(558); const dependencyKeys = new Set([ 'dependencies', @@ -52540,18 +52752,18 @@ module.exports.sync = (filePath, data, options) => { /***/ }), -/* 544 */ +/* 546 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const path = __webpack_require__(16); -const fs = __webpack_require__(545); -const writeFileAtomic = __webpack_require__(549); -const sortKeys = __webpack_require__(556); -const makeDir = __webpack_require__(558); -const pify = __webpack_require__(559); -const detectIndent = __webpack_require__(560); +const fs = __webpack_require__(547); +const writeFileAtomic = __webpack_require__(551); +const sortKeys = __webpack_require__(558); +const makeDir = __webpack_require__(560); +const pify = __webpack_require__(561); +const detectIndent = __webpack_require__(562); const init = (fn, filePath, data, options) => { if (!filePath) { @@ -52623,13 +52835,13 @@ module.exports.sync = (filePath, data, options) => { /***/ }), -/* 545 */ +/* 547 */ /***/ (function(module, exports, __webpack_require__) { var fs = __webpack_require__(23) -var polyfills = __webpack_require__(546) -var legacy = __webpack_require__(547) -var clone = __webpack_require__(548) +var polyfills = __webpack_require__(548) +var legacy = __webpack_require__(549) +var clone = __webpack_require__(550) var queue = [] @@ -52908,7 +53120,7 @@ function retry () { /***/ }), -/* 546 */ +/* 548 */ /***/ (function(module, exports, __webpack_require__) { var constants = __webpack_require__(25) @@ -53243,7 +53455,7 @@ function patch (fs) { /***/ }), -/* 547 */ +/* 549 */ /***/ (function(module, exports, __webpack_require__) { var Stream = __webpack_require__(27).Stream @@ -53367,7 +53579,7 @@ function legacy (fs) { /***/ }), -/* 548 */ +/* 550 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -53393,7 +53605,7 @@ function clone (obj) { /***/ }), -/* 549 */ +/* 551 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -53403,8 +53615,8 @@ module.exports.sync = writeFileSync module.exports._getTmpname = getTmpname // for testing module.exports._cleanupOnExit = cleanupOnExit -var fs = __webpack_require__(550) -var MurmurHash3 = __webpack_require__(554) +var fs = __webpack_require__(552) +var MurmurHash3 = __webpack_require__(556) var onExit = __webpack_require__(377) var path = __webpack_require__(16) var activeFiles = {} @@ -53413,7 +53625,7 @@ var activeFiles = {} /* istanbul ignore next */ var threadId = (function getId () { try { - var workerThreads = __webpack_require__(555) + var workerThreads = __webpack_require__(557) /// if we are in main thread, this is set to `0` return workerThreads.threadId @@ -53638,12 +53850,12 @@ function writeFileSync (filename, data, options) { /***/ }), -/* 550 */ +/* 552 */ /***/ (function(module, exports, __webpack_require__) { var fs = __webpack_require__(23) -var polyfills = __webpack_require__(551) -var legacy = __webpack_require__(553) +var polyfills = __webpack_require__(553) +var legacy = __webpack_require__(555) var queue = [] var util = __webpack_require__(29) @@ -53667,7 +53879,7 @@ if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) { }) } -module.exports = patch(__webpack_require__(552)) +module.exports = patch(__webpack_require__(554)) if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH) { module.exports = patch(fs) } @@ -53906,10 +54118,10 @@ function retry () { /***/ }), -/* 551 */ +/* 553 */ /***/ (function(module, exports, __webpack_require__) { -var fs = __webpack_require__(552) +var fs = __webpack_require__(554) var constants = __webpack_require__(25) var origCwd = process.cwd @@ -54242,7 +54454,7 @@ function chownErOk (er) { /***/ }), -/* 552 */ +/* 554 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -54270,7 +54482,7 @@ function clone (obj) { /***/ }), -/* 553 */ +/* 555 */ /***/ (function(module, exports, __webpack_require__) { var Stream = __webpack_require__(27).Stream @@ -54394,7 +54606,7 @@ function legacy (fs) { /***/ }), -/* 554 */ +/* 556 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54536,18 +54748,18 @@ function legacy (fs) { /***/ }), -/* 555 */ +/* 557 */ /***/ (function(module, exports) { module.exports = require(undefined); /***/ }), -/* 556 */ +/* 558 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const isPlainObj = __webpack_require__(557); +const isPlainObj = __webpack_require__(559); module.exports = (obj, opts) => { if (!isPlainObj(obj)) { @@ -54604,7 +54816,7 @@ module.exports = (obj, opts) => { /***/ }), -/* 557 */ +/* 559 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -54618,15 +54830,15 @@ module.exports = function (x) { /***/ }), -/* 558 */ +/* 560 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const fs = __webpack_require__(23); const path = __webpack_require__(16); -const pify = __webpack_require__(559); -const semver = __webpack_require__(521); +const pify = __webpack_require__(561); +const semver = __webpack_require__(523); const defaults = { mode: 0o777 & (~process.umask()), @@ -54764,7 +54976,7 @@ module.exports.sync = (input, options) => { /***/ }), -/* 559 */ +/* 561 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -54839,7 +55051,7 @@ module.exports = (input, options) => { /***/ }), -/* 560 */ +/* 562 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -54968,7 +55180,7 @@ module.exports = str => { /***/ }), -/* 561 */ +/* 563 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -54977,7 +55189,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "runScriptInPackage", function() { return runScriptInPackage; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "runScriptInPackageStreaming", function() { return runScriptInPackageStreaming; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "yarnWorkspacesInfo", function() { return yarnWorkspacesInfo; }); -/* harmony import */ var _child_process__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(562); +/* harmony import */ var _child_process__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(564); /* * Licensed to Elasticsearch B.V. under one or more contributor * license agreements. See the NOTICE file distributed with @@ -55047,7 +55259,7 @@ async function yarnWorkspacesInfo(directory) { } /***/ }), -/* 562 */ +/* 564 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -55058,9 +55270,9 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(chalk__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var execa__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(351); /* harmony import */ var execa__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(execa__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var log_symbols__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(563); +/* harmony import */ var log_symbols__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(565); /* harmony import */ var log_symbols__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(log_symbols__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var strong_log_transformer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(568); +/* harmony import */ var strong_log_transformer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(570); /* harmony import */ var strong_log_transformer__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(strong_log_transformer__WEBPACK_IMPORTED_MODULE_3__); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } @@ -55126,12 +55338,12 @@ function spawnStreaming(command, args, opts, { } /***/ }), -/* 563 */ +/* 565 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const chalk = __webpack_require__(564); +const chalk = __webpack_require__(566); const isSupported = process.platform !== 'win32' || process.env.CI || process.env.TERM === 'xterm-256color'; @@ -55153,16 +55365,16 @@ module.exports = isSupported ? main : fallbacks; /***/ }), -/* 564 */ +/* 566 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const escapeStringRegexp = __webpack_require__(3); -const ansiStyles = __webpack_require__(565); -const stdoutColor = __webpack_require__(566).stdout; +const ansiStyles = __webpack_require__(567); +const stdoutColor = __webpack_require__(568).stdout; -const template = __webpack_require__(567); +const template = __webpack_require__(569); const isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm'); @@ -55388,7 +55600,7 @@ module.exports.default = module.exports; // For TypeScript /***/ }), -/* 565 */ +/* 567 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -55561,7 +55773,7 @@ Object.defineProperty(module, 'exports', { /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(5)(module))) /***/ }), -/* 566 */ +/* 568 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -55703,7 +55915,7 @@ module.exports = { /***/ }), -/* 567 */ +/* 569 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -55838,7 +56050,7 @@ module.exports = (chalk, tmp) => { /***/ }), -/* 568 */ +/* 570 */ /***/ (function(module, exports, __webpack_require__) { // Copyright IBM Corp. 2014,2018. All Rights Reserved. @@ -55846,12 +56058,12 @@ module.exports = (chalk, tmp) => { // This file is licensed under the Apache License 2.0. // License text available at https://opensource.org/licenses/Apache-2.0 -module.exports = __webpack_require__(569); -module.exports.cli = __webpack_require__(573); +module.exports = __webpack_require__(571); +module.exports.cli = __webpack_require__(575); /***/ }), -/* 569 */ +/* 571 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -55866,9 +56078,9 @@ var stream = __webpack_require__(27); var util = __webpack_require__(29); var fs = __webpack_require__(23); -var through = __webpack_require__(570); -var duplexer = __webpack_require__(571); -var StringDecoder = __webpack_require__(572).StringDecoder; +var through = __webpack_require__(572); +var duplexer = __webpack_require__(573); +var StringDecoder = __webpack_require__(574).StringDecoder; module.exports = Logger; @@ -56057,7 +56269,7 @@ function lineMerger(host) { /***/ }), -/* 570 */ +/* 572 */ /***/ (function(module, exports, __webpack_require__) { var Stream = __webpack_require__(27) @@ -56171,7 +56383,7 @@ function through (write, end, opts) { /***/ }), -/* 571 */ +/* 573 */ /***/ (function(module, exports, __webpack_require__) { var Stream = __webpack_require__(27) @@ -56264,13 +56476,13 @@ function duplex(writer, reader) { /***/ }), -/* 572 */ +/* 574 */ /***/ (function(module, exports) { module.exports = require("string_decoder"); /***/ }), -/* 573 */ +/* 575 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -56281,11 +56493,11 @@ module.exports = require("string_decoder"); -var minimist = __webpack_require__(574); +var minimist = __webpack_require__(576); var path = __webpack_require__(16); -var Logger = __webpack_require__(569); -var pkg = __webpack_require__(575); +var Logger = __webpack_require__(571); +var pkg = __webpack_require__(577); module.exports = cli; @@ -56339,7 +56551,7 @@ function usage($0, p) { /***/ }), -/* 574 */ +/* 576 */ /***/ (function(module, exports) { module.exports = function (args, opts) { @@ -56581,29 +56793,29 @@ function isNumber (x) { /***/ }), -/* 575 */ +/* 577 */ /***/ (function(module) { module.exports = JSON.parse("{\"name\":\"strong-log-transformer\",\"version\":\"2.1.0\",\"description\":\"Stream transformer that prefixes lines with timestamps and other things.\",\"author\":\"Ryan Graham \",\"license\":\"Apache-2.0\",\"repository\":{\"type\":\"git\",\"url\":\"git://github.com/strongloop/strong-log-transformer\"},\"keywords\":[\"logging\",\"streams\"],\"bugs\":{\"url\":\"https://github.com/strongloop/strong-log-transformer/issues\"},\"homepage\":\"https://github.com/strongloop/strong-log-transformer\",\"directories\":{\"test\":\"test\"},\"bin\":{\"sl-log-transformer\":\"bin/sl-log-transformer.js\"},\"main\":\"index.js\",\"scripts\":{\"test\":\"tap --100 test/test-*\"},\"dependencies\":{\"duplexer\":\"^0.1.1\",\"minimist\":\"^1.2.0\",\"through\":\"^2.3.4\"},\"devDependencies\":{\"tap\":\"^12.0.1\"},\"engines\":{\"node\":\">=4\"}}"); /***/ }), -/* 576 */ +/* 578 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "workspacePackagePaths", function() { return workspacePackagePaths; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "copyWorkspacePackages", function() { return copyWorkspacePackages; }); -/* harmony import */ var glob__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(501); +/* harmony import */ var glob__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(503); /* harmony import */ var glob__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(glob__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(16); /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(29); /* harmony import */ var util__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(util__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(577); +/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(579); /* harmony import */ var _fs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(20); -/* harmony import */ var _package_json__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(516); -/* harmony import */ var _projects__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(500); +/* harmony import */ var _package_json__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(518); +/* harmony import */ var _projects__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(502); /* * Licensed to Elasticsearch B.V. under one or more contributor * license agreements. See the NOTICE file distributed with @@ -56695,7 +56907,7 @@ function packagesFromGlobPattern({ } /***/ }), -/* 577 */ +/* 579 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -56765,7 +56977,7 @@ function getProjectPaths({ } /***/ }), -/* 578 */ +/* 580 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -56773,13 +56985,13 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAllChecksums", function() { return getAllChecksums; }); /* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23); /* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(fs__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(579); +/* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(581); /* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(crypto__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(29); /* harmony import */ var util__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(util__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var execa__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(351); /* harmony import */ var execa__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(execa__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var _yarn_lock__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(580); +/* harmony import */ var _yarn_lock__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(582); /* * Licensed to Elasticsearch B.V. under one or more contributor * license agreements. See the NOTICE file distributed with @@ -56813,7 +57025,7 @@ async function getChangesForProjects(projects, kbn, log) { log.verbose('getting changed files'); const { stdout - } = await execa__WEBPACK_IMPORTED_MODULE_3___default()('git', ['ls-files', '-dmt', '--', ...Array.from(projects.values()).filter(p => kbn.isPartOfRepo(p)).map(p => p.path)], { + } = await execa__WEBPACK_IMPORTED_MODULE_3___default()('git', ['ls-files', '-dmto', '--exclude-standard', '--', ...Array.from(projects.values()).filter(p => kbn.isPartOfRepo(p)).map(p => p.path)], { cwd: kbn.getAbsolute() }); const output = stdout.trim(); @@ -56840,10 +57052,13 @@ async function getChangesForProjects(projects, kbn, log) { unassignedChanges.set(path, 'deleted'); break; + case '?': + unassignedChanges.set(path, 'untracked'); + break; + case 'H': case 'S': case 'K': - case '?': default: log.warning(`unexpected modification status "${tag}" for ${path}, please report this!`); unassignedChanges.set(path, 'invalid'); @@ -57005,19 +57220,19 @@ async function getAllChecksums(kbn, log) { } /***/ }), -/* 579 */ +/* 581 */ /***/ (function(module, exports) { module.exports = require("crypto"); /***/ }), -/* 580 */ +/* 582 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "readYarnLock", function() { return readYarnLock; }); -/* harmony import */ var _yarnpkg_lockfile__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(581); +/* harmony import */ var _yarnpkg_lockfile__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(583); /* harmony import */ var _yarnpkg_lockfile__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_yarnpkg_lockfile__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _utils_fs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20); /* @@ -57061,7 +57276,7 @@ async function readYarnLock(kbn) { } /***/ }), -/* 581 */ +/* 583 */ /***/ (function(module, exports, __webpack_require__) { module.exports = @@ -58620,7 +58835,7 @@ module.exports = invariant; /* 9 */ /***/ (function(module, exports) { -module.exports = __webpack_require__(579); +module.exports = __webpack_require__(581); /***/ }), /* 10 */, @@ -60944,7 +61159,7 @@ function onceStrict (fn) { /* 63 */ /***/ (function(module, exports) { -module.exports = __webpack_require__(582); +module.exports = __webpack_require__(584); /***/ }), /* 64 */, @@ -61882,7 +62097,7 @@ module.exports.win32 = win32; /* 79 */ /***/ (function(module, exports) { -module.exports = __webpack_require__(478); +module.exports = __webpack_require__(484); /***/ }), /* 80 */, @@ -67339,13 +67554,13 @@ module.exports = process && support(supportLevel); /******/ ]); /***/ }), -/* 582 */ +/* 584 */ /***/ (function(module, exports) { module.exports = require("buffer"); /***/ }), -/* 583 */ +/* 585 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -67442,7 +67657,7 @@ class BootstrapCacheFile { } /***/ }), -/* 584 */ +/* 586 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -67450,9 +67665,9 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CleanCommand", function() { return CleanCommand; }); /* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); /* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(chalk__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var del__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(585); +/* harmony import */ var del__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(587); /* harmony import */ var del__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(del__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var ora__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(673); +/* harmony import */ var ora__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(675); /* harmony import */ var ora__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(ora__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(16); /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_3__); @@ -67551,21 +67766,21 @@ const CleanCommand = { }; /***/ }), -/* 585 */ +/* 587 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const {promisify} = __webpack_require__(29); const path = __webpack_require__(16); -const globby = __webpack_require__(586); -const isGlob = __webpack_require__(603); -const slash = __webpack_require__(664); +const globby = __webpack_require__(588); +const isGlob = __webpack_require__(605); +const slash = __webpack_require__(666); const gracefulFs = __webpack_require__(22); -const isPathCwd = __webpack_require__(666); -const isPathInside = __webpack_require__(667); -const rimraf = __webpack_require__(668); -const pMap = __webpack_require__(669); +const isPathCwd = __webpack_require__(668); +const isPathInside = __webpack_require__(669); +const rimraf = __webpack_require__(670); +const pMap = __webpack_require__(671); const rimrafP = promisify(rimraf); @@ -67679,19 +67894,19 @@ module.exports.sync = (patterns, {force, dryRun, cwd = process.cwd(), ...options /***/ }), -/* 586 */ +/* 588 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const fs = __webpack_require__(23); -const arrayUnion = __webpack_require__(587); -const merge2 = __webpack_require__(588); -const glob = __webpack_require__(589); -const fastGlob = __webpack_require__(594); -const dirGlob = __webpack_require__(660); -const gitignore = __webpack_require__(662); -const {FilterStream, UniqueStream} = __webpack_require__(665); +const arrayUnion = __webpack_require__(589); +const merge2 = __webpack_require__(590); +const glob = __webpack_require__(591); +const fastGlob = __webpack_require__(596); +const dirGlob = __webpack_require__(662); +const gitignore = __webpack_require__(664); +const {FilterStream, UniqueStream} = __webpack_require__(667); const DEFAULT_FILTER = () => false; @@ -67864,7 +68079,7 @@ module.exports.gitignore = gitignore; /***/ }), -/* 587 */ +/* 589 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -67876,7 +68091,7 @@ module.exports = (...arguments_) => { /***/ }), -/* 588 */ +/* 590 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -67990,7 +68205,7 @@ function pauseStreams (streams, options) { /***/ }), -/* 589 */ +/* 591 */ /***/ (function(module, exports, __webpack_require__) { // Approach: @@ -68036,21 +68251,21 @@ function pauseStreams (streams, options) { module.exports = glob var fs = __webpack_require__(23) -var rp = __webpack_require__(502) -var minimatch = __webpack_require__(504) +var rp = __webpack_require__(504) +var minimatch = __webpack_require__(506) var Minimatch = minimatch.Minimatch -var inherits = __webpack_require__(590) +var inherits = __webpack_require__(592) var EE = __webpack_require__(379).EventEmitter var path = __webpack_require__(16) var assert = __webpack_require__(30) -var isAbsolute = __webpack_require__(510) -var globSync = __webpack_require__(592) -var common = __webpack_require__(593) +var isAbsolute = __webpack_require__(512) +var globSync = __webpack_require__(594) +var common = __webpack_require__(595) var alphasort = common.alphasort var alphasorti = common.alphasorti var setopts = common.setopts var ownProp = common.ownProp -var inflight = __webpack_require__(513) +var inflight = __webpack_require__(515) var util = __webpack_require__(29) var childrenIgnored = common.childrenIgnored var isIgnored = common.isIgnored @@ -68786,7 +69001,7 @@ Glob.prototype._stat2 = function (f, abs, er, stat, cb) { /***/ }), -/* 590 */ +/* 592 */ /***/ (function(module, exports, __webpack_require__) { try { @@ -68796,12 +69011,12 @@ try { module.exports = util.inherits; } catch (e) { /* istanbul ignore next */ - module.exports = __webpack_require__(591); + module.exports = __webpack_require__(593); } /***/ }), -/* 591 */ +/* 593 */ /***/ (function(module, exports) { if (typeof Object.create === 'function') { @@ -68834,22 +69049,22 @@ if (typeof Object.create === 'function') { /***/ }), -/* 592 */ +/* 594 */ /***/ (function(module, exports, __webpack_require__) { module.exports = globSync globSync.GlobSync = GlobSync var fs = __webpack_require__(23) -var rp = __webpack_require__(502) -var minimatch = __webpack_require__(504) +var rp = __webpack_require__(504) +var minimatch = __webpack_require__(506) var Minimatch = minimatch.Minimatch -var Glob = __webpack_require__(589).Glob +var Glob = __webpack_require__(591).Glob var util = __webpack_require__(29) var path = __webpack_require__(16) var assert = __webpack_require__(30) -var isAbsolute = __webpack_require__(510) -var common = __webpack_require__(593) +var isAbsolute = __webpack_require__(512) +var common = __webpack_require__(595) var alphasort = common.alphasort var alphasorti = common.alphasorti var setopts = common.setopts @@ -69326,7 +69541,7 @@ GlobSync.prototype._makeAbs = function (f) { /***/ }), -/* 593 */ +/* 595 */ /***/ (function(module, exports, __webpack_require__) { exports.alphasort = alphasort @@ -69344,8 +69559,8 @@ function ownProp (obj, field) { } var path = __webpack_require__(16) -var minimatch = __webpack_require__(504) -var isAbsolute = __webpack_require__(510) +var minimatch = __webpack_require__(506) +var isAbsolute = __webpack_require__(512) var Minimatch = minimatch.Minimatch function alphasorti (a, b) { @@ -69572,17 +69787,17 @@ function childrenIgnored (self, path) { /***/ }), -/* 594 */ +/* 596 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const taskManager = __webpack_require__(595); -const async_1 = __webpack_require__(623); -const stream_1 = __webpack_require__(656); -const sync_1 = __webpack_require__(657); -const settings_1 = __webpack_require__(659); -const utils = __webpack_require__(596); +const taskManager = __webpack_require__(597); +const async_1 = __webpack_require__(625); +const stream_1 = __webpack_require__(658); +const sync_1 = __webpack_require__(659); +const settings_1 = __webpack_require__(661); +const utils = __webpack_require__(598); function FastGlob(source, options) { try { assertPatternsInput(source); @@ -69640,13 +69855,13 @@ module.exports = FastGlob; /***/ }), -/* 595 */ +/* 597 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const utils = __webpack_require__(596); +const utils = __webpack_require__(598); function generate(patterns, settings) { const positivePatterns = getPositivePatterns(patterns); const negativePatterns = getNegativePatternsAsPositive(patterns, settings.ignore); @@ -69714,28 +69929,28 @@ exports.convertPatternGroupToTask = convertPatternGroupToTask; /***/ }), -/* 596 */ +/* 598 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const array = __webpack_require__(597); +const array = __webpack_require__(599); exports.array = array; -const errno = __webpack_require__(598); +const errno = __webpack_require__(600); exports.errno = errno; -const fs = __webpack_require__(599); +const fs = __webpack_require__(601); exports.fs = fs; -const path = __webpack_require__(600); +const path = __webpack_require__(602); exports.path = path; -const pattern = __webpack_require__(601); +const pattern = __webpack_require__(603); exports.pattern = pattern; -const stream = __webpack_require__(622); +const stream = __webpack_require__(624); exports.stream = stream; /***/ }), -/* 597 */ +/* 599 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69748,7 +69963,7 @@ exports.flatten = flatten; /***/ }), -/* 598 */ +/* 600 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69761,7 +69976,7 @@ exports.isEnoentCodeError = isEnoentCodeError; /***/ }), -/* 599 */ +/* 601 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69786,7 +70001,7 @@ exports.createDirentFromStats = createDirentFromStats; /***/ }), -/* 600 */ +/* 602 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69807,16 +70022,16 @@ exports.makeAbsolute = makeAbsolute; /***/ }), -/* 601 */ +/* 603 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const path = __webpack_require__(16); -const globParent = __webpack_require__(602); -const isGlob = __webpack_require__(603); -const micromatch = __webpack_require__(605); +const globParent = __webpack_require__(604); +const isGlob = __webpack_require__(605); +const micromatch = __webpack_require__(607); const GLOBSTAR = '**'; function isStaticPattern(pattern) { return !isDynamicPattern(pattern); @@ -69905,13 +70120,13 @@ exports.matchAny = matchAny; /***/ }), -/* 602 */ +/* 604 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var isGlob = __webpack_require__(603); +var isGlob = __webpack_require__(605); var pathPosixDirname = __webpack_require__(16).posix.dirname; var isWin32 = __webpack_require__(11).platform() === 'win32'; @@ -69946,7 +70161,7 @@ module.exports = function globParent(str) { /***/ }), -/* 603 */ +/* 605 */ /***/ (function(module, exports, __webpack_require__) { /*! @@ -69956,7 +70171,7 @@ module.exports = function globParent(str) { * Released under the MIT License. */ -var isExtglob = __webpack_require__(604); +var isExtglob = __webpack_require__(606); var chars = { '{': '}', '(': ')', '[': ']'}; var strictRegex = /\\(.)|(^!|\*|[\].+)]\?|\[[^\\\]]+\]|\{[^\\}]+\}|\(\?[:!=][^\\)]+\)|\([^|]+\|[^\\)]+\))/; var relaxedRegex = /\\(.)|(^!|[*?{}()[\]]|\(\?)/; @@ -70000,7 +70215,7 @@ module.exports = function isGlob(str, options) { /***/ }), -/* 604 */ +/* 606 */ /***/ (function(module, exports) { /*! @@ -70026,16 +70241,16 @@ module.exports = function isExtglob(str) { /***/ }), -/* 605 */ +/* 607 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const util = __webpack_require__(29); -const braces = __webpack_require__(606); -const picomatch = __webpack_require__(616); -const utils = __webpack_require__(619); +const braces = __webpack_require__(608); +const picomatch = __webpack_require__(618); +const utils = __webpack_require__(621); const isEmptyString = val => typeof val === 'string' && (val === '' || val === './'); /** @@ -70500,16 +70715,16 @@ module.exports = micromatch; /***/ }), -/* 606 */ +/* 608 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const stringify = __webpack_require__(607); -const compile = __webpack_require__(609); -const expand = __webpack_require__(613); -const parse = __webpack_require__(614); +const stringify = __webpack_require__(609); +const compile = __webpack_require__(611); +const expand = __webpack_require__(615); +const parse = __webpack_require__(616); /** * Expand the given pattern or create a regex-compatible string. @@ -70677,13 +70892,13 @@ module.exports = braces; /***/ }), -/* 607 */ +/* 609 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const utils = __webpack_require__(608); +const utils = __webpack_require__(610); module.exports = (ast, options = {}) => { let stringify = (node, parent = {}) => { @@ -70716,7 +70931,7 @@ module.exports = (ast, options = {}) => { /***/ }), -/* 608 */ +/* 610 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -70835,14 +71050,14 @@ exports.flatten = (...args) => { /***/ }), -/* 609 */ +/* 611 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const fill = __webpack_require__(610); -const utils = __webpack_require__(608); +const fill = __webpack_require__(612); +const utils = __webpack_require__(610); const compile = (ast, options = {}) => { let walk = (node, parent = {}) => { @@ -70899,7 +71114,7 @@ module.exports = compile; /***/ }), -/* 610 */ +/* 612 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -70913,7 +71128,7 @@ module.exports = compile; const util = __webpack_require__(29); -const toRegexRange = __webpack_require__(611); +const toRegexRange = __webpack_require__(613); const isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val); @@ -71155,7 +71370,7 @@ module.exports = fill; /***/ }), -/* 611 */ +/* 613 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -71168,7 +71383,7 @@ module.exports = fill; -const isNumber = __webpack_require__(612); +const isNumber = __webpack_require__(614); const toRegexRange = (min, max, options) => { if (isNumber(min) === false) { @@ -71450,7 +71665,7 @@ module.exports = toRegexRange; /***/ }), -/* 612 */ +/* 614 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -71475,15 +71690,15 @@ module.exports = function(num) { /***/ }), -/* 613 */ +/* 615 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const fill = __webpack_require__(610); -const stringify = __webpack_require__(607); -const utils = __webpack_require__(608); +const fill = __webpack_require__(612); +const stringify = __webpack_require__(609); +const utils = __webpack_require__(610); const append = (queue = '', stash = '', enclose = false) => { let result = []; @@ -71595,13 +71810,13 @@ module.exports = expand; /***/ }), -/* 614 */ +/* 616 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const stringify = __webpack_require__(607); +const stringify = __webpack_require__(609); /** * Constants @@ -71623,7 +71838,7 @@ const { CHAR_SINGLE_QUOTE, /* ' */ CHAR_NO_BREAK_SPACE, CHAR_ZERO_WIDTH_NOBREAK_SPACE -} = __webpack_require__(615); +} = __webpack_require__(617); /** * parse @@ -71935,7 +72150,7 @@ module.exports = parse; /***/ }), -/* 615 */ +/* 617 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -71999,26 +72214,26 @@ module.exports = { /***/ }), -/* 616 */ +/* 618 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -module.exports = __webpack_require__(617); +module.exports = __webpack_require__(619); /***/ }), -/* 617 */ +/* 619 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const path = __webpack_require__(16); -const scan = __webpack_require__(618); -const parse = __webpack_require__(621); -const utils = __webpack_require__(619); +const scan = __webpack_require__(620); +const parse = __webpack_require__(623); +const utils = __webpack_require__(621); /** * Creates a matcher function from one or more glob patterns. The @@ -72321,7 +72536,7 @@ picomatch.toRegex = (source, options) => { * @return {Object} */ -picomatch.constants = __webpack_require__(620); +picomatch.constants = __webpack_require__(622); /** * Expose "picomatch" @@ -72331,13 +72546,13 @@ module.exports = picomatch; /***/ }), -/* 618 */ +/* 620 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const utils = __webpack_require__(619); +const utils = __webpack_require__(621); const { CHAR_ASTERISK, /* * */ @@ -72355,7 +72570,7 @@ const { CHAR_RIGHT_CURLY_BRACE, /* } */ CHAR_RIGHT_PARENTHESES, /* ) */ CHAR_RIGHT_SQUARE_BRACKET /* ] */ -} = __webpack_require__(620); +} = __webpack_require__(622); const isPathSeparator = code => { return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH; @@ -72557,7 +72772,7 @@ module.exports = (input, options) => { /***/ }), -/* 619 */ +/* 621 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -72569,7 +72784,7 @@ const { REGEX_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_GLOBAL, REGEX_REMOVE_BACKSLASH -} = __webpack_require__(620); +} = __webpack_require__(622); exports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val); exports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str); @@ -72607,7 +72822,7 @@ exports.escapeLast = (input, char, lastIdx) => { /***/ }), -/* 620 */ +/* 622 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -72793,14 +73008,14 @@ module.exports = { /***/ }), -/* 621 */ +/* 623 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const utils = __webpack_require__(619); -const constants = __webpack_require__(620); +const utils = __webpack_require__(621); +const constants = __webpack_require__(622); /** * Constants @@ -73811,13 +74026,13 @@ module.exports = parse; /***/ }), -/* 622 */ +/* 624 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const merge2 = __webpack_require__(588); +const merge2 = __webpack_require__(590); function merge(streams) { const mergedStream = merge2(streams); streams.forEach((stream) => { @@ -73829,14 +74044,14 @@ exports.merge = merge; /***/ }), -/* 623 */ +/* 625 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const stream_1 = __webpack_require__(624); -const provider_1 = __webpack_require__(651); +const stream_1 = __webpack_require__(626); +const provider_1 = __webpack_require__(653); class ProviderAsync extends provider_1.default { constructor() { super(...arguments); @@ -73864,16 +74079,16 @@ exports.default = ProviderAsync; /***/ }), -/* 624 */ +/* 626 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const stream_1 = __webpack_require__(27); -const fsStat = __webpack_require__(625); -const fsWalk = __webpack_require__(630); -const reader_1 = __webpack_require__(650); +const fsStat = __webpack_require__(627); +const fsWalk = __webpack_require__(632); +const reader_1 = __webpack_require__(652); class ReaderStream extends reader_1.default { constructor() { super(...arguments); @@ -73926,15 +74141,15 @@ exports.default = ReaderStream; /***/ }), -/* 625 */ +/* 627 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const async = __webpack_require__(626); -const sync = __webpack_require__(627); -const settings_1 = __webpack_require__(628); +const async = __webpack_require__(628); +const sync = __webpack_require__(629); +const settings_1 = __webpack_require__(630); exports.Settings = settings_1.default; function stat(path, optionsOrSettingsOrCallback, callback) { if (typeof optionsOrSettingsOrCallback === 'function') { @@ -73957,7 +74172,7 @@ function getSettings(settingsOrOptions = {}) { /***/ }), -/* 626 */ +/* 628 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -73995,7 +74210,7 @@ function callSuccessCallback(callback, result) { /***/ }), -/* 627 */ +/* 629 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -74024,13 +74239,13 @@ exports.read = read; /***/ }), -/* 628 */ +/* 630 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const fs = __webpack_require__(629); +const fs = __webpack_require__(631); class Settings { constructor(_options = {}) { this._options = _options; @@ -74047,7 +74262,7 @@ exports.default = Settings; /***/ }), -/* 629 */ +/* 631 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -74070,16 +74285,16 @@ exports.createFileSystemAdapter = createFileSystemAdapter; /***/ }), -/* 630 */ +/* 632 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const async_1 = __webpack_require__(631); -const stream_1 = __webpack_require__(646); -const sync_1 = __webpack_require__(647); -const settings_1 = __webpack_require__(649); +const async_1 = __webpack_require__(633); +const stream_1 = __webpack_require__(648); +const sync_1 = __webpack_require__(649); +const settings_1 = __webpack_require__(651); exports.Settings = settings_1.default; function walk(dir, optionsOrSettingsOrCallback, callback) { if (typeof optionsOrSettingsOrCallback === 'function') { @@ -74109,13 +74324,13 @@ function getSettings(settingsOrOptions = {}) { /***/ }), -/* 631 */ +/* 633 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const async_1 = __webpack_require__(632); +const async_1 = __webpack_require__(634); class AsyncProvider { constructor(_root, _settings) { this._root = _root; @@ -74146,17 +74361,17 @@ function callSuccessCallback(callback, entries) { /***/ }), -/* 632 */ +/* 634 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const events_1 = __webpack_require__(379); -const fsScandir = __webpack_require__(633); -const fastq = __webpack_require__(642); -const common = __webpack_require__(644); -const reader_1 = __webpack_require__(645); +const fsScandir = __webpack_require__(635); +const fastq = __webpack_require__(644); +const common = __webpack_require__(646); +const reader_1 = __webpack_require__(647); class AsyncReader extends reader_1.default { constructor(_root, _settings) { super(_root, _settings); @@ -74246,15 +74461,15 @@ exports.default = AsyncReader; /***/ }), -/* 633 */ +/* 635 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const async = __webpack_require__(634); -const sync = __webpack_require__(639); -const settings_1 = __webpack_require__(640); +const async = __webpack_require__(636); +const sync = __webpack_require__(641); +const settings_1 = __webpack_require__(642); exports.Settings = settings_1.default; function scandir(path, optionsOrSettingsOrCallback, callback) { if (typeof optionsOrSettingsOrCallback === 'function') { @@ -74277,16 +74492,16 @@ function getSettings(settingsOrOptions = {}) { /***/ }), -/* 634 */ +/* 636 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const fsStat = __webpack_require__(625); -const rpl = __webpack_require__(635); -const constants_1 = __webpack_require__(636); -const utils = __webpack_require__(637); +const fsStat = __webpack_require__(627); +const rpl = __webpack_require__(637); +const constants_1 = __webpack_require__(638); +const utils = __webpack_require__(639); function read(dir, settings, callback) { if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) { return readdirWithFileTypes(dir, settings, callback); @@ -74375,7 +74590,7 @@ function callSuccessCallback(callback, result) { /***/ }), -/* 635 */ +/* 637 */ /***/ (function(module, exports) { module.exports = runParallel @@ -74429,7 +74644,7 @@ function runParallel (tasks, cb) { /***/ }), -/* 636 */ +/* 638 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -74445,18 +74660,18 @@ exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = MAJOR_VERSION > 10 || (MAJOR_VERSIO /***/ }), -/* 637 */ +/* 639 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const fs = __webpack_require__(638); +const fs = __webpack_require__(640); exports.fs = fs; /***/ }), -/* 638 */ +/* 640 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -74481,15 +74696,15 @@ exports.createDirentFromStats = createDirentFromStats; /***/ }), -/* 639 */ +/* 641 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const fsStat = __webpack_require__(625); -const constants_1 = __webpack_require__(636); -const utils = __webpack_require__(637); +const fsStat = __webpack_require__(627); +const constants_1 = __webpack_require__(638); +const utils = __webpack_require__(639); function read(dir, settings) { if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) { return readdirWithFileTypes(dir, settings); @@ -74540,15 +74755,15 @@ exports.readdir = readdir; /***/ }), -/* 640 */ +/* 642 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const path = __webpack_require__(16); -const fsStat = __webpack_require__(625); -const fs = __webpack_require__(641); +const fsStat = __webpack_require__(627); +const fs = __webpack_require__(643); class Settings { constructor(_options = {}) { this._options = _options; @@ -74571,7 +74786,7 @@ exports.default = Settings; /***/ }), -/* 641 */ +/* 643 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -74596,13 +74811,13 @@ exports.createFileSystemAdapter = createFileSystemAdapter; /***/ }), -/* 642 */ +/* 644 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var reusify = __webpack_require__(643) +var reusify = __webpack_require__(645) function fastqueue (context, worker, concurrency) { if (typeof context === 'function') { @@ -74776,7 +74991,7 @@ module.exports = fastqueue /***/ }), -/* 643 */ +/* 645 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -74816,7 +75031,7 @@ module.exports = reusify /***/ }), -/* 644 */ +/* 646 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -74847,13 +75062,13 @@ exports.joinPathSegments = joinPathSegments; /***/ }), -/* 645 */ +/* 647 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const common = __webpack_require__(644); +const common = __webpack_require__(646); class Reader { constructor(_root, _settings) { this._root = _root; @@ -74865,14 +75080,14 @@ exports.default = Reader; /***/ }), -/* 646 */ +/* 648 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const stream_1 = __webpack_require__(27); -const async_1 = __webpack_require__(632); +const async_1 = __webpack_require__(634); class StreamProvider { constructor(_root, _settings) { this._root = _root; @@ -74902,13 +75117,13 @@ exports.default = StreamProvider; /***/ }), -/* 647 */ +/* 649 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const sync_1 = __webpack_require__(648); +const sync_1 = __webpack_require__(650); class SyncProvider { constructor(_root, _settings) { this._root = _root; @@ -74923,15 +75138,15 @@ exports.default = SyncProvider; /***/ }), -/* 648 */ +/* 650 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const fsScandir = __webpack_require__(633); -const common = __webpack_require__(644); -const reader_1 = __webpack_require__(645); +const fsScandir = __webpack_require__(635); +const common = __webpack_require__(646); +const reader_1 = __webpack_require__(647); class SyncReader extends reader_1.default { constructor() { super(...arguments); @@ -74989,14 +75204,14 @@ exports.default = SyncReader; /***/ }), -/* 649 */ +/* 651 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const path = __webpack_require__(16); -const fsScandir = __webpack_require__(633); +const fsScandir = __webpack_require__(635); class Settings { constructor(_options = {}) { this._options = _options; @@ -75022,15 +75237,15 @@ exports.default = Settings; /***/ }), -/* 650 */ +/* 652 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const path = __webpack_require__(16); -const fsStat = __webpack_require__(625); -const utils = __webpack_require__(596); +const fsStat = __webpack_require__(627); +const utils = __webpack_require__(598); class Reader { constructor(_settings) { this._settings = _settings; @@ -75062,17 +75277,17 @@ exports.default = Reader; /***/ }), -/* 651 */ +/* 653 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const path = __webpack_require__(16); -const deep_1 = __webpack_require__(652); -const entry_1 = __webpack_require__(653); -const error_1 = __webpack_require__(654); -const entry_2 = __webpack_require__(655); +const deep_1 = __webpack_require__(654); +const entry_1 = __webpack_require__(655); +const error_1 = __webpack_require__(656); +const entry_2 = __webpack_require__(657); class Provider { constructor(_settings) { this._settings = _settings; @@ -75117,13 +75332,13 @@ exports.default = Provider; /***/ }), -/* 652 */ +/* 654 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const utils = __webpack_require__(596); +const utils = __webpack_require__(598); class DeepFilter { constructor(_settings, _micromatchOptions) { this._settings = _settings; @@ -75183,13 +75398,13 @@ exports.default = DeepFilter; /***/ }), -/* 653 */ +/* 655 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const utils = __webpack_require__(596); +const utils = __webpack_require__(598); class EntryFilter { constructor(_settings, _micromatchOptions) { this._settings = _settings; @@ -75244,13 +75459,13 @@ exports.default = EntryFilter; /***/ }), -/* 654 */ +/* 656 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const utils = __webpack_require__(596); +const utils = __webpack_require__(598); class ErrorFilter { constructor(_settings) { this._settings = _settings; @@ -75266,13 +75481,13 @@ exports.default = ErrorFilter; /***/ }), -/* 655 */ +/* 657 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const utils = __webpack_require__(596); +const utils = __webpack_require__(598); class EntryTransformer { constructor(_settings) { this._settings = _settings; @@ -75299,15 +75514,15 @@ exports.default = EntryTransformer; /***/ }), -/* 656 */ +/* 658 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const stream_1 = __webpack_require__(27); -const stream_2 = __webpack_require__(624); -const provider_1 = __webpack_require__(651); +const stream_2 = __webpack_require__(626); +const provider_1 = __webpack_require__(653); class ProviderStream extends provider_1.default { constructor() { super(...arguments); @@ -75335,14 +75550,14 @@ exports.default = ProviderStream; /***/ }), -/* 657 */ +/* 659 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const sync_1 = __webpack_require__(658); -const provider_1 = __webpack_require__(651); +const sync_1 = __webpack_require__(660); +const provider_1 = __webpack_require__(653); class ProviderSync extends provider_1.default { constructor() { super(...arguments); @@ -75365,15 +75580,15 @@ exports.default = ProviderSync; /***/ }), -/* 658 */ +/* 660 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const fsStat = __webpack_require__(625); -const fsWalk = __webpack_require__(630); -const reader_1 = __webpack_require__(650); +const fsStat = __webpack_require__(627); +const fsWalk = __webpack_require__(632); +const reader_1 = __webpack_require__(652); class ReaderSync extends reader_1.default { constructor() { super(...arguments); @@ -75415,7 +75630,7 @@ exports.default = ReaderSync; /***/ }), -/* 659 */ +/* 661 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -75475,13 +75690,13 @@ exports.default = Settings; /***/ }), -/* 660 */ +/* 662 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const path = __webpack_require__(16); -const pathType = __webpack_require__(661); +const pathType = __webpack_require__(663); const getExtensions = extensions => extensions.length > 1 ? `{${extensions.join(',')}}` : extensions[0]; @@ -75557,7 +75772,7 @@ module.exports.sync = (input, options) => { /***/ }), -/* 661 */ +/* 663 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -75607,7 +75822,7 @@ exports.isSymlinkSync = isTypeSync.bind(null, 'lstatSync', 'isSymbolicLink'); /***/ }), -/* 662 */ +/* 664 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -75615,9 +75830,9 @@ exports.isSymlinkSync = isTypeSync.bind(null, 'lstatSync', 'isSymbolicLink'); const {promisify} = __webpack_require__(29); const fs = __webpack_require__(23); const path = __webpack_require__(16); -const fastGlob = __webpack_require__(594); -const gitIgnore = __webpack_require__(663); -const slash = __webpack_require__(664); +const fastGlob = __webpack_require__(596); +const gitIgnore = __webpack_require__(665); +const slash = __webpack_require__(666); const DEFAULT_IGNORE = [ '**/node_modules/**', @@ -75731,7 +75946,7 @@ module.exports.sync = options => { /***/ }), -/* 663 */ +/* 665 */ /***/ (function(module, exports) { // A simple implementation of make-array @@ -76322,7 +76537,7 @@ if ( /***/ }), -/* 664 */ +/* 666 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -76340,7 +76555,7 @@ module.exports = path => { /***/ }), -/* 665 */ +/* 667 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -76393,7 +76608,7 @@ module.exports = { /***/ }), -/* 666 */ +/* 668 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -76415,7 +76630,7 @@ module.exports = path_ => { /***/ }), -/* 667 */ +/* 669 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -76443,7 +76658,7 @@ module.exports = (childPath, parentPath) => { /***/ }), -/* 668 */ +/* 670 */ /***/ (function(module, exports, __webpack_require__) { const assert = __webpack_require__(30) @@ -76451,7 +76666,7 @@ const path = __webpack_require__(16) const fs = __webpack_require__(23) let glob = undefined try { - glob = __webpack_require__(589) + glob = __webpack_require__(591) } catch (_err) { // treat glob as optional. } @@ -76817,12 +77032,12 @@ rimraf.sync = rimrafSync /***/ }), -/* 669 */ +/* 671 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const AggregateError = __webpack_require__(670); +const AggregateError = __webpack_require__(672); module.exports = async ( iterable, @@ -76905,13 +77120,13 @@ module.exports = async ( /***/ }), -/* 670 */ +/* 672 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const indentString = __webpack_require__(671); -const cleanStack = __webpack_require__(672); +const indentString = __webpack_require__(673); +const cleanStack = __webpack_require__(674); const cleanInternalStack = stack => stack.replace(/\s+at .*aggregate-error\/index.js:\d+:\d+\)?/g, ''); @@ -76959,7 +77174,7 @@ module.exports = AggregateError; /***/ }), -/* 671 */ +/* 673 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -77001,7 +77216,7 @@ module.exports = (string, count = 1, options) => { /***/ }), -/* 672 */ +/* 674 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -77048,15 +77263,15 @@ module.exports = (stack, options) => { /***/ }), -/* 673 */ +/* 675 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const chalk = __webpack_require__(674); -const cliCursor = __webpack_require__(678); -const cliSpinners = __webpack_require__(682); -const logSymbols = __webpack_require__(563); +const chalk = __webpack_require__(676); +const cliCursor = __webpack_require__(680); +const cliSpinners = __webpack_require__(684); +const logSymbols = __webpack_require__(565); class Ora { constructor(options) { @@ -77203,16 +77418,16 @@ module.exports.promise = (action, options) => { /***/ }), -/* 674 */ +/* 676 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const escapeStringRegexp = __webpack_require__(3); -const ansiStyles = __webpack_require__(675); -const stdoutColor = __webpack_require__(676).stdout; +const ansiStyles = __webpack_require__(677); +const stdoutColor = __webpack_require__(678).stdout; -const template = __webpack_require__(677); +const template = __webpack_require__(679); const isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm'); @@ -77438,7 +77653,7 @@ module.exports.default = module.exports; // For TypeScript /***/ }), -/* 675 */ +/* 677 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -77611,7 +77826,7 @@ Object.defineProperty(module, 'exports', { /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(5)(module))) /***/ }), -/* 676 */ +/* 678 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -77753,7 +77968,7 @@ module.exports = { /***/ }), -/* 677 */ +/* 679 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -77888,12 +78103,12 @@ module.exports = (chalk, tmp) => { /***/ }), -/* 678 */ +/* 680 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const restoreCursor = __webpack_require__(679); +const restoreCursor = __webpack_require__(681); let hidden = false; @@ -77934,12 +78149,12 @@ exports.toggle = (force, stream) => { /***/ }), -/* 679 */ +/* 681 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const onetime = __webpack_require__(680); +const onetime = __webpack_require__(682); const signalExit = __webpack_require__(377); module.exports = onetime(() => { @@ -77950,12 +78165,12 @@ module.exports = onetime(() => { /***/ }), -/* 680 */ +/* 682 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const mimicFn = __webpack_require__(681); +const mimicFn = __webpack_require__(683); module.exports = (fn, opts) => { // TODO: Remove this in v3 @@ -77996,7 +78211,7 @@ module.exports = (fn, opts) => { /***/ }), -/* 681 */ +/* 683 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -78012,22 +78227,22 @@ module.exports = (to, from) => { /***/ }), -/* 682 */ +/* 684 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -module.exports = __webpack_require__(683); +module.exports = __webpack_require__(685); /***/ }), -/* 683 */ +/* 685 */ /***/ (function(module) { module.exports = JSON.parse("{\"dots\":{\"interval\":80,\"frames\":[\"⠋\",\"⠙\",\"⠹\",\"⠸\",\"⠼\",\"⠴\",\"⠦\",\"⠧\",\"⠇\",\"⠏\"]},\"dots2\":{\"interval\":80,\"frames\":[\"⣾\",\"⣽\",\"⣻\",\"⢿\",\"⡿\",\"⣟\",\"⣯\",\"⣷\"]},\"dots3\":{\"interval\":80,\"frames\":[\"⠋\",\"⠙\",\"⠚\",\"⠞\",\"⠖\",\"⠦\",\"⠴\",\"⠲\",\"⠳\",\"⠓\"]},\"dots4\":{\"interval\":80,\"frames\":[\"⠄\",\"⠆\",\"⠇\",\"⠋\",\"⠙\",\"⠸\",\"⠰\",\"⠠\",\"⠰\",\"⠸\",\"⠙\",\"⠋\",\"⠇\",\"⠆\"]},\"dots5\":{\"interval\":80,\"frames\":[\"⠋\",\"⠙\",\"⠚\",\"⠒\",\"⠂\",\"⠂\",\"⠒\",\"⠲\",\"⠴\",\"⠦\",\"⠖\",\"⠒\",\"⠐\",\"⠐\",\"⠒\",\"⠓\",\"⠋\"]},\"dots6\":{\"interval\":80,\"frames\":[\"⠁\",\"⠉\",\"⠙\",\"⠚\",\"⠒\",\"⠂\",\"⠂\",\"⠒\",\"⠲\",\"⠴\",\"⠤\",\"⠄\",\"⠄\",\"⠤\",\"⠴\",\"⠲\",\"⠒\",\"⠂\",\"⠂\",\"⠒\",\"⠚\",\"⠙\",\"⠉\",\"⠁\"]},\"dots7\":{\"interval\":80,\"frames\":[\"⠈\",\"⠉\",\"⠋\",\"⠓\",\"⠒\",\"⠐\",\"⠐\",\"⠒\",\"⠖\",\"⠦\",\"⠤\",\"⠠\",\"⠠\",\"⠤\",\"⠦\",\"⠖\",\"⠒\",\"⠐\",\"⠐\",\"⠒\",\"⠓\",\"⠋\",\"⠉\",\"⠈\"]},\"dots8\":{\"interval\":80,\"frames\":[\"⠁\",\"⠁\",\"⠉\",\"⠙\",\"⠚\",\"⠒\",\"⠂\",\"⠂\",\"⠒\",\"⠲\",\"⠴\",\"⠤\",\"⠄\",\"⠄\",\"⠤\",\"⠠\",\"⠠\",\"⠤\",\"⠦\",\"⠖\",\"⠒\",\"⠐\",\"⠐\",\"⠒\",\"⠓\",\"⠋\",\"⠉\",\"⠈\",\"⠈\"]},\"dots9\":{\"interval\":80,\"frames\":[\"⢹\",\"⢺\",\"⢼\",\"⣸\",\"⣇\",\"⡧\",\"⡗\",\"⡏\"]},\"dots10\":{\"interval\":80,\"frames\":[\"⢄\",\"⢂\",\"⢁\",\"⡁\",\"⡈\",\"⡐\",\"⡠\"]},\"dots11\":{\"interval\":100,\"frames\":[\"⠁\",\"⠂\",\"⠄\",\"⡀\",\"⢀\",\"⠠\",\"⠐\",\"⠈\"]},\"dots12\":{\"interval\":80,\"frames\":[\"⢀⠀\",\"⡀⠀\",\"⠄⠀\",\"⢂⠀\",\"⡂⠀\",\"⠅⠀\",\"⢃⠀\",\"⡃⠀\",\"⠍⠀\",\"⢋⠀\",\"⡋⠀\",\"⠍⠁\",\"⢋⠁\",\"⡋⠁\",\"⠍⠉\",\"⠋⠉\",\"⠋⠉\",\"⠉⠙\",\"⠉⠙\",\"⠉⠩\",\"⠈⢙\",\"⠈⡙\",\"⢈⠩\",\"⡀⢙\",\"⠄⡙\",\"⢂⠩\",\"⡂⢘\",\"⠅⡘\",\"⢃⠨\",\"⡃⢐\",\"⠍⡐\",\"⢋⠠\",\"⡋⢀\",\"⠍⡁\",\"⢋⠁\",\"⡋⠁\",\"⠍⠉\",\"⠋⠉\",\"⠋⠉\",\"⠉⠙\",\"⠉⠙\",\"⠉⠩\",\"⠈⢙\",\"⠈⡙\",\"⠈⠩\",\"⠀⢙\",\"⠀⡙\",\"⠀⠩\",\"⠀⢘\",\"⠀⡘\",\"⠀⠨\",\"⠀⢐\",\"⠀⡐\",\"⠀⠠\",\"⠀⢀\",\"⠀⡀\"]},\"line\":{\"interval\":130,\"frames\":[\"-\",\"\\\\\",\"|\",\"/\"]},\"line2\":{\"interval\":100,\"frames\":[\"⠂\",\"-\",\"–\",\"—\",\"–\",\"-\"]},\"pipe\":{\"interval\":100,\"frames\":[\"┤\",\"┘\",\"┴\",\"└\",\"├\",\"┌\",\"┬\",\"┐\"]},\"simpleDots\":{\"interval\":400,\"frames\":[\". \",\".. \",\"...\",\" \"]},\"simpleDotsScrolling\":{\"interval\":200,\"frames\":[\". \",\".. \",\"...\",\" ..\",\" .\",\" \"]},\"star\":{\"interval\":70,\"frames\":[\"✶\",\"✸\",\"✹\",\"✺\",\"✹\",\"✷\"]},\"star2\":{\"interval\":80,\"frames\":[\"+\",\"x\",\"*\"]},\"flip\":{\"interval\":70,\"frames\":[\"_\",\"_\",\"_\",\"-\",\"`\",\"`\",\"'\",\"´\",\"-\",\"_\",\"_\",\"_\"]},\"hamburger\":{\"interval\":100,\"frames\":[\"☱\",\"☲\",\"☴\"]},\"growVertical\":{\"interval\":120,\"frames\":[\"▁\",\"▃\",\"▄\",\"▅\",\"▆\",\"▇\",\"▆\",\"▅\",\"▄\",\"▃\"]},\"growHorizontal\":{\"interval\":120,\"frames\":[\"▏\",\"▎\",\"▍\",\"▌\",\"▋\",\"▊\",\"▉\",\"▊\",\"▋\",\"▌\",\"▍\",\"▎\"]},\"balloon\":{\"interval\":140,\"frames\":[\" \",\".\",\"o\",\"O\",\"@\",\"*\",\" \"]},\"balloon2\":{\"interval\":120,\"frames\":[\".\",\"o\",\"O\",\"°\",\"O\",\"o\",\".\"]},\"noise\":{\"interval\":100,\"frames\":[\"▓\",\"▒\",\"░\"]},\"bounce\":{\"interval\":120,\"frames\":[\"⠁\",\"⠂\",\"⠄\",\"⠂\"]},\"boxBounce\":{\"interval\":120,\"frames\":[\"▖\",\"▘\",\"▝\",\"▗\"]},\"boxBounce2\":{\"interval\":100,\"frames\":[\"▌\",\"▀\",\"▐\",\"▄\"]},\"triangle\":{\"interval\":50,\"frames\":[\"◢\",\"◣\",\"◤\",\"◥\"]},\"arc\":{\"interval\":100,\"frames\":[\"◜\",\"◠\",\"◝\",\"◞\",\"◡\",\"◟\"]},\"circle\":{\"interval\":120,\"frames\":[\"◡\",\"⊙\",\"◠\"]},\"squareCorners\":{\"interval\":180,\"frames\":[\"◰\",\"◳\",\"◲\",\"◱\"]},\"circleQuarters\":{\"interval\":120,\"frames\":[\"◴\",\"◷\",\"◶\",\"◵\"]},\"circleHalves\":{\"interval\":50,\"frames\":[\"◐\",\"◓\",\"◑\",\"◒\"]},\"squish\":{\"interval\":100,\"frames\":[\"╫\",\"╪\"]},\"toggle\":{\"interval\":250,\"frames\":[\"⊶\",\"⊷\"]},\"toggle2\":{\"interval\":80,\"frames\":[\"▫\",\"▪\"]},\"toggle3\":{\"interval\":120,\"frames\":[\"□\",\"■\"]},\"toggle4\":{\"interval\":100,\"frames\":[\"■\",\"□\",\"▪\",\"▫\"]},\"toggle5\":{\"interval\":100,\"frames\":[\"▮\",\"▯\"]},\"toggle6\":{\"interval\":300,\"frames\":[\"ဝ\",\"၀\"]},\"toggle7\":{\"interval\":80,\"frames\":[\"⦾\",\"⦿\"]},\"toggle8\":{\"interval\":100,\"frames\":[\"◍\",\"◌\"]},\"toggle9\":{\"interval\":100,\"frames\":[\"◉\",\"◎\"]},\"toggle10\":{\"interval\":100,\"frames\":[\"㊂\",\"㊀\",\"㊁\"]},\"toggle11\":{\"interval\":50,\"frames\":[\"⧇\",\"⧆\"]},\"toggle12\":{\"interval\":120,\"frames\":[\"☗\",\"☖\"]},\"toggle13\":{\"interval\":80,\"frames\":[\"=\",\"*\",\"-\"]},\"arrow\":{\"interval\":100,\"frames\":[\"←\",\"↖\",\"↑\",\"↗\",\"→\",\"↘\",\"↓\",\"↙\"]},\"arrow2\":{\"interval\":80,\"frames\":[\"⬆️ \",\"↗️ \",\"➡️ \",\"↘️ \",\"⬇️ \",\"↙️ \",\"⬅️ \",\"↖️ \"]},\"arrow3\":{\"interval\":120,\"frames\":[\"▹▹▹▹▹\",\"▸▹▹▹▹\",\"▹▸▹▹▹\",\"▹▹▸▹▹\",\"▹▹▹▸▹\",\"▹▹▹▹▸\"]},\"bouncingBar\":{\"interval\":80,\"frames\":[\"[ ]\",\"[= ]\",\"[== ]\",\"[=== ]\",\"[ ===]\",\"[ ==]\",\"[ =]\",\"[ ]\",\"[ =]\",\"[ ==]\",\"[ ===]\",\"[====]\",\"[=== ]\",\"[== ]\",\"[= ]\"]},\"bouncingBall\":{\"interval\":80,\"frames\":[\"( ● )\",\"( ● )\",\"( ● )\",\"( ● )\",\"( ●)\",\"( ● )\",\"( ● )\",\"( ● )\",\"( ● )\",\"(● )\"]},\"smiley\":{\"interval\":200,\"frames\":[\"😄 \",\"😝 \"]},\"monkey\":{\"interval\":300,\"frames\":[\"🙈 \",\"🙈 \",\"🙉 \",\"🙊 \"]},\"hearts\":{\"interval\":100,\"frames\":[\"💛 \",\"💙 \",\"💜 \",\"💚 \",\"❤️ \"]},\"clock\":{\"interval\":100,\"frames\":[\"🕐 \",\"🕑 \",\"🕒 \",\"🕓 \",\"🕔 \",\"🕕 \",\"🕖 \",\"🕗 \",\"🕘 \",\"🕙 \",\"🕚 \"]},\"earth\":{\"interval\":180,\"frames\":[\"🌍 \",\"🌎 \",\"🌏 \"]},\"moon\":{\"interval\":80,\"frames\":[\"🌑 \",\"🌒 \",\"🌓 \",\"🌔 \",\"🌕 \",\"🌖 \",\"🌗 \",\"🌘 \"]},\"runner\":{\"interval\":140,\"frames\":[\"🚶 \",\"🏃 \"]},\"pong\":{\"interval\":80,\"frames\":[\"▐⠂ ▌\",\"▐⠈ ▌\",\"▐ ⠂ ▌\",\"▐ ⠠ ▌\",\"▐ ⡀ ▌\",\"▐ ⠠ ▌\",\"▐ ⠂ ▌\",\"▐ ⠈ ▌\",\"▐ ⠂ ▌\",\"▐ ⠠ ▌\",\"▐ ⡀ ▌\",\"▐ ⠠ ▌\",\"▐ ⠂ ▌\",\"▐ ⠈ ▌\",\"▐ ⠂▌\",\"▐ ⠠▌\",\"▐ ⡀▌\",\"▐ ⠠ ▌\",\"▐ ⠂ ▌\",\"▐ ⠈ ▌\",\"▐ ⠂ ▌\",\"▐ ⠠ ▌\",\"▐ ⡀ ▌\",\"▐ ⠠ ▌\",\"▐ ⠂ ▌\",\"▐ ⠈ ▌\",\"▐ ⠂ ▌\",\"▐ ⠠ ▌\",\"▐ ⡀ ▌\",\"▐⠠ ▌\"]},\"shark\":{\"interval\":120,\"frames\":[\"▐|\\\\____________▌\",\"▐_|\\\\___________▌\",\"▐__|\\\\__________▌\",\"▐___|\\\\_________▌\",\"▐____|\\\\________▌\",\"▐_____|\\\\_______▌\",\"▐______|\\\\______▌\",\"▐_______|\\\\_____▌\",\"▐________|\\\\____▌\",\"▐_________|\\\\___▌\",\"▐__________|\\\\__▌\",\"▐___________|\\\\_▌\",\"▐____________|\\\\▌\",\"▐____________/|▌\",\"▐___________/|_▌\",\"▐__________/|__▌\",\"▐_________/|___▌\",\"▐________/|____▌\",\"▐_______/|_____▌\",\"▐______/|______▌\",\"▐_____/|_______▌\",\"▐____/|________▌\",\"▐___/|_________▌\",\"▐__/|__________▌\",\"▐_/|___________▌\",\"▐/|____________▌\"]},\"dqpb\":{\"interval\":100,\"frames\":[\"d\",\"q\",\"p\",\"b\"]},\"weather\":{\"interval\":100,\"frames\":[\"☀️ \",\"☀️ \",\"☀️ \",\"🌤 \",\"⛅️ \",\"🌥 \",\"☁️ \",\"🌧 \",\"🌨 \",\"🌧 \",\"🌨 \",\"🌧 \",\"🌨 \",\"⛈ \",\"🌨 \",\"🌧 \",\"🌨 \",\"☁️ \",\"🌥 \",\"⛅️ \",\"🌤 \",\"☀️ \",\"☀️ \"]},\"christmas\":{\"interval\":400,\"frames\":[\"🌲\",\"🎄\"]}}"); /***/ }), -/* 684 */ +/* 686 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -78036,8 +78251,8 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); /* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(chalk__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _utils_log__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(34); -/* harmony import */ var _utils_parallelize__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(499); -/* harmony import */ var _utils_projects__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(500); +/* harmony import */ var _utils_parallelize__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(501); +/* harmony import */ var _utils_projects__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(502); /* * Licensed to Elasticsearch B.V. under one or more contributor * license agreements. See the NOTICE file distributed with @@ -78087,7 +78302,7 @@ const RunCommand = { }; /***/ }), -/* 685 */ +/* 687 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -78096,9 +78311,9 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); /* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(chalk__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _utils_log__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(34); -/* harmony import */ var _utils_parallelize__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(499); -/* harmony import */ var _utils_projects__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(500); -/* harmony import */ var _utils_watch__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(686); +/* harmony import */ var _utils_parallelize__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(501); +/* harmony import */ var _utils_projects__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(502); +/* harmony import */ var _utils_watch__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(688); /* * Licensed to Elasticsearch B.V. under one or more contributor * license agreements. See the NOTICE file distributed with @@ -78182,7 +78397,7 @@ const WatchCommand = { }; /***/ }), -/* 686 */ +/* 688 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -78256,7 +78471,7 @@ function waitUntilWatchIsReady(stream, opts = {}) { } /***/ }), -/* 687 */ +/* 689 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -78264,15 +78479,15 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "runCommand", function() { return runCommand; }); /* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); /* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(chalk__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var indent_string__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(688); +/* harmony import */ var indent_string__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(690); /* harmony import */ var indent_string__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(indent_string__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var wrap_ansi__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(689); +/* harmony import */ var wrap_ansi__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(691); /* harmony import */ var wrap_ansi__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(wrap_ansi__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _utils_errors__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(514); +/* harmony import */ var _utils_errors__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(516); /* harmony import */ var _utils_log__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(34); -/* harmony import */ var _utils_projects__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(500); -/* harmony import */ var _utils_projects_tree__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(696); -/* harmony import */ var _utils_kibana__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(697); +/* harmony import */ var _utils_projects__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(502); +/* harmony import */ var _utils_projects_tree__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(698); +/* harmony import */ var _utils_kibana__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(699); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } @@ -78360,7 +78575,7 @@ function toArray(value) { } /***/ }), -/* 688 */ +/* 690 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -78394,13 +78609,13 @@ module.exports = (str, count, opts) => { /***/ }), -/* 689 */ +/* 691 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const stringWidth = __webpack_require__(690); -const stripAnsi = __webpack_require__(694); +const stringWidth = __webpack_require__(692); +const stripAnsi = __webpack_require__(696); const ESCAPES = new Set([ '\u001B', @@ -78594,13 +78809,13 @@ module.exports = (str, cols, opts) => { /***/ }), -/* 690 */ +/* 692 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const stripAnsi = __webpack_require__(691); -const isFullwidthCodePoint = __webpack_require__(693); +const stripAnsi = __webpack_require__(693); +const isFullwidthCodePoint = __webpack_require__(695); module.exports = str => { if (typeof str !== 'string' || str.length === 0) { @@ -78637,18 +78852,18 @@ module.exports = str => { /***/ }), -/* 691 */ +/* 693 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const ansiRegex = __webpack_require__(692); +const ansiRegex = __webpack_require__(694); module.exports = input => typeof input === 'string' ? input.replace(ansiRegex(), '') : input; /***/ }), -/* 692 */ +/* 694 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -78665,7 +78880,7 @@ module.exports = () => { /***/ }), -/* 693 */ +/* 695 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -78718,18 +78933,18 @@ module.exports = x => { /***/ }), -/* 694 */ +/* 696 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const ansiRegex = __webpack_require__(695); +const ansiRegex = __webpack_require__(697); module.exports = input => typeof input === 'string' ? input.replace(ansiRegex(), '') : input; /***/ }), -/* 695 */ +/* 697 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -78746,7 +78961,7 @@ module.exports = () => { /***/ }), -/* 696 */ +/* 698 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -78899,7 +79114,7 @@ function addProjectToTree(tree, pathParts, project) { } /***/ }), -/* 697 */ +/* 699 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -78907,12 +79122,12 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Kibana", function() { return Kibana; }); /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16); /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var multimatch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(698); +/* harmony import */ var multimatch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(700); /* harmony import */ var multimatch__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(multimatch__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var is_path_inside__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(702); +/* harmony import */ var is_path_inside__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(704); /* harmony import */ var is_path_inside__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(is_path_inside__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _projects__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(500); -/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(577); +/* harmony import */ var _projects__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(502); +/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(579); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } @@ -79053,15 +79268,15 @@ class Kibana { } /***/ }), -/* 698 */ +/* 700 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const minimatch = __webpack_require__(504); -const arrayUnion = __webpack_require__(699); -const arrayDiffer = __webpack_require__(700); -const arrify = __webpack_require__(701); +const minimatch = __webpack_require__(506); +const arrayUnion = __webpack_require__(701); +const arrayDiffer = __webpack_require__(702); +const arrify = __webpack_require__(703); module.exports = (list, patterns, options = {}) => { list = arrify(list); @@ -79085,7 +79300,7 @@ module.exports = (list, patterns, options = {}) => { /***/ }), -/* 699 */ +/* 701 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -79097,7 +79312,7 @@ module.exports = (...arguments_) => { /***/ }), -/* 700 */ +/* 702 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -79112,7 +79327,7 @@ module.exports = arrayDiffer; /***/ }), -/* 701 */ +/* 703 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -79142,7 +79357,7 @@ module.exports = arrify; /***/ }), -/* 702 */ +/* 704 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -79170,15 +79385,15 @@ module.exports = (childPath, parentPath) => { /***/ }), -/* 703 */ +/* 705 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _build_production_projects__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(704); +/* harmony import */ var _build_production_projects__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(706); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "buildProductionProjects", function() { return _build_production_projects__WEBPACK_IMPORTED_MODULE_0__["buildProductionProjects"]; }); -/* harmony import */ var _prepare_project_dependencies__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(939); +/* harmony import */ var _prepare_project_dependencies__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(941); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "prepareExternalProjectDependencies", function() { return _prepare_project_dependencies__WEBPACK_IMPORTED_MODULE_1__["prepareExternalProjectDependencies"]; }); /* @@ -79203,23 +79418,23 @@ __webpack_require__.r(__webpack_exports__); /***/ }), -/* 704 */ +/* 706 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "buildProductionProjects", function() { return buildProductionProjects; }); -/* harmony import */ var cpy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(705); +/* harmony import */ var cpy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(707); /* harmony import */ var cpy__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(cpy__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var del__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(585); +/* harmony import */ var del__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(587); /* harmony import */ var del__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(del__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(16); /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(577); +/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(579); /* harmony import */ var _utils_fs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(20); /* harmony import */ var _utils_log__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(34); -/* harmony import */ var _utils_package_json__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(516); -/* harmony import */ var _utils_projects__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(500); +/* harmony import */ var _utils_package_json__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(518); +/* harmony import */ var _utils_projects__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(502); /* * Licensed to Elasticsearch B.V. under one or more contributor * license agreements. See the NOTICE file distributed with @@ -79351,7 +79566,7 @@ async function copyToBuild(project, kibanaRoot, buildRoot) { } /***/ }), -/* 705 */ +/* 707 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -79359,13 +79574,13 @@ async function copyToBuild(project, kibanaRoot, buildRoot) { const EventEmitter = __webpack_require__(379); const path = __webpack_require__(16); const os = __webpack_require__(11); -const pAll = __webpack_require__(706); -const arrify = __webpack_require__(708); -const globby = __webpack_require__(709); -const isGlob = __webpack_require__(603); -const cpFile = __webpack_require__(924); -const junk = __webpack_require__(936); -const CpyError = __webpack_require__(937); +const pAll = __webpack_require__(708); +const arrify = __webpack_require__(710); +const globby = __webpack_require__(711); +const isGlob = __webpack_require__(605); +const cpFile = __webpack_require__(926); +const junk = __webpack_require__(938); +const CpyError = __webpack_require__(939); const defaultOptions = { ignoreJunk: true @@ -79484,12 +79699,12 @@ module.exports = (source, destination, { /***/ }), -/* 706 */ +/* 708 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const pMap = __webpack_require__(707); +const pMap = __webpack_require__(709); module.exports = (iterable, options) => pMap(iterable, element => element(), options); // TODO: Remove this for the next major release @@ -79497,7 +79712,7 @@ module.exports.default = module.exports; /***/ }), -/* 707 */ +/* 709 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -79576,7 +79791,7 @@ module.exports.default = pMap; /***/ }), -/* 708 */ +/* 710 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -79606,17 +79821,17 @@ module.exports = arrify; /***/ }), -/* 709 */ +/* 711 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const fs = __webpack_require__(23); -const arrayUnion = __webpack_require__(710); -const glob = __webpack_require__(712); -const fastGlob = __webpack_require__(717); -const dirGlob = __webpack_require__(917); -const gitignore = __webpack_require__(920); +const arrayUnion = __webpack_require__(712); +const glob = __webpack_require__(714); +const fastGlob = __webpack_require__(719); +const dirGlob = __webpack_require__(919); +const gitignore = __webpack_require__(922); const DEFAULT_FILTER = () => false; @@ -79761,12 +79976,12 @@ module.exports.gitignore = gitignore; /***/ }), -/* 710 */ +/* 712 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var arrayUniq = __webpack_require__(711); +var arrayUniq = __webpack_require__(713); module.exports = function () { return arrayUniq([].concat.apply([], arguments)); @@ -79774,7 +79989,7 @@ module.exports = function () { /***/ }), -/* 711 */ +/* 713 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -79843,7 +80058,7 @@ if ('Set' in global) { /***/ }), -/* 712 */ +/* 714 */ /***/ (function(module, exports, __webpack_require__) { // Approach: @@ -79889,21 +80104,21 @@ if ('Set' in global) { module.exports = glob var fs = __webpack_require__(23) -var rp = __webpack_require__(502) -var minimatch = __webpack_require__(504) +var rp = __webpack_require__(504) +var minimatch = __webpack_require__(506) var Minimatch = minimatch.Minimatch -var inherits = __webpack_require__(713) +var inherits = __webpack_require__(715) var EE = __webpack_require__(379).EventEmitter var path = __webpack_require__(16) var assert = __webpack_require__(30) -var isAbsolute = __webpack_require__(510) -var globSync = __webpack_require__(715) -var common = __webpack_require__(716) +var isAbsolute = __webpack_require__(512) +var globSync = __webpack_require__(717) +var common = __webpack_require__(718) var alphasort = common.alphasort var alphasorti = common.alphasorti var setopts = common.setopts var ownProp = common.ownProp -var inflight = __webpack_require__(513) +var inflight = __webpack_require__(515) var util = __webpack_require__(29) var childrenIgnored = common.childrenIgnored var isIgnored = common.isIgnored @@ -80639,7 +80854,7 @@ Glob.prototype._stat2 = function (f, abs, er, stat, cb) { /***/ }), -/* 713 */ +/* 715 */ /***/ (function(module, exports, __webpack_require__) { try { @@ -80649,12 +80864,12 @@ try { module.exports = util.inherits; } catch (e) { /* istanbul ignore next */ - module.exports = __webpack_require__(714); + module.exports = __webpack_require__(716); } /***/ }), -/* 714 */ +/* 716 */ /***/ (function(module, exports) { if (typeof Object.create === 'function') { @@ -80687,22 +80902,22 @@ if (typeof Object.create === 'function') { /***/ }), -/* 715 */ +/* 717 */ /***/ (function(module, exports, __webpack_require__) { module.exports = globSync globSync.GlobSync = GlobSync var fs = __webpack_require__(23) -var rp = __webpack_require__(502) -var minimatch = __webpack_require__(504) +var rp = __webpack_require__(504) +var minimatch = __webpack_require__(506) var Minimatch = minimatch.Minimatch -var Glob = __webpack_require__(712).Glob +var Glob = __webpack_require__(714).Glob var util = __webpack_require__(29) var path = __webpack_require__(16) var assert = __webpack_require__(30) -var isAbsolute = __webpack_require__(510) -var common = __webpack_require__(716) +var isAbsolute = __webpack_require__(512) +var common = __webpack_require__(718) var alphasort = common.alphasort var alphasorti = common.alphasorti var setopts = common.setopts @@ -81179,7 +81394,7 @@ GlobSync.prototype._makeAbs = function (f) { /***/ }), -/* 716 */ +/* 718 */ /***/ (function(module, exports, __webpack_require__) { exports.alphasort = alphasort @@ -81197,8 +81412,8 @@ function ownProp (obj, field) { } var path = __webpack_require__(16) -var minimatch = __webpack_require__(504) -var isAbsolute = __webpack_require__(510) +var minimatch = __webpack_require__(506) +var isAbsolute = __webpack_require__(512) var Minimatch = minimatch.Minimatch function alphasorti (a, b) { @@ -81425,10 +81640,10 @@ function childrenIgnored (self, path) { /***/ }), -/* 717 */ +/* 719 */ /***/ (function(module, exports, __webpack_require__) { -const pkg = __webpack_require__(718); +const pkg = __webpack_require__(720); module.exports = pkg.async; module.exports.default = pkg.async; @@ -81441,19 +81656,19 @@ module.exports.generateTasks = pkg.generateTasks; /***/ }), -/* 718 */ +/* 720 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var optionsManager = __webpack_require__(719); -var taskManager = __webpack_require__(720); -var reader_async_1 = __webpack_require__(888); -var reader_stream_1 = __webpack_require__(912); -var reader_sync_1 = __webpack_require__(913); -var arrayUtils = __webpack_require__(915); -var streamUtils = __webpack_require__(916); +var optionsManager = __webpack_require__(721); +var taskManager = __webpack_require__(722); +var reader_async_1 = __webpack_require__(890); +var reader_stream_1 = __webpack_require__(914); +var reader_sync_1 = __webpack_require__(915); +var arrayUtils = __webpack_require__(917); +var streamUtils = __webpack_require__(918); /** * Synchronous API. */ @@ -81519,7 +81734,7 @@ function isString(source) { /***/ }), -/* 719 */ +/* 721 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -81557,13 +81772,13 @@ exports.prepare = prepare; /***/ }), -/* 720 */ +/* 722 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var patternUtils = __webpack_require__(721); +var patternUtils = __webpack_require__(723); /** * Generate tasks based on parent directory of each pattern. */ @@ -81654,16 +81869,16 @@ exports.convertPatternGroupToTask = convertPatternGroupToTask; /***/ }), -/* 721 */ +/* 723 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var path = __webpack_require__(16); -var globParent = __webpack_require__(722); -var isGlob = __webpack_require__(725); -var micromatch = __webpack_require__(726); +var globParent = __webpack_require__(724); +var isGlob = __webpack_require__(727); +var micromatch = __webpack_require__(728); var GLOBSTAR = '**'; /** * Return true for static pattern. @@ -81809,15 +82024,15 @@ exports.matchAny = matchAny; /***/ }), -/* 722 */ +/* 724 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var path = __webpack_require__(16); -var isglob = __webpack_require__(723); -var pathDirname = __webpack_require__(724); +var isglob = __webpack_require__(725); +var pathDirname = __webpack_require__(726); var isWin32 = __webpack_require__(11).platform() === 'win32'; module.exports = function globParent(str) { @@ -81840,7 +82055,7 @@ module.exports = function globParent(str) { /***/ }), -/* 723 */ +/* 725 */ /***/ (function(module, exports, __webpack_require__) { /*! @@ -81850,7 +82065,7 @@ module.exports = function globParent(str) { * Licensed under the MIT License. */ -var isExtglob = __webpack_require__(604); +var isExtglob = __webpack_require__(606); module.exports = function isGlob(str) { if (typeof str !== 'string' || str === '') { @@ -81871,7 +82086,7 @@ module.exports = function isGlob(str) { /***/ }), -/* 724 */ +/* 726 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -82021,7 +82236,7 @@ module.exports.win32 = win32; /***/ }), -/* 725 */ +/* 727 */ /***/ (function(module, exports, __webpack_require__) { /*! @@ -82031,7 +82246,7 @@ module.exports.win32 = win32; * Released under the MIT License. */ -var isExtglob = __webpack_require__(604); +var isExtglob = __webpack_require__(606); var chars = { '{': '}', '(': ')', '[': ']'}; module.exports = function isGlob(str, options) { @@ -82073,7 +82288,7 @@ module.exports = function isGlob(str, options) { /***/ }), -/* 726 */ +/* 728 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -82084,18 +82299,18 @@ module.exports = function isGlob(str, options) { */ var util = __webpack_require__(29); -var braces = __webpack_require__(727); -var toRegex = __webpack_require__(840); -var extend = __webpack_require__(848); +var braces = __webpack_require__(729); +var toRegex = __webpack_require__(842); +var extend = __webpack_require__(850); /** * Local dependencies */ -var compilers = __webpack_require__(851); -var parsers = __webpack_require__(884); -var cache = __webpack_require__(885); -var utils = __webpack_require__(886); +var compilers = __webpack_require__(853); +var parsers = __webpack_require__(886); +var cache = __webpack_require__(887); +var utils = __webpack_require__(888); var MAX_LENGTH = 1024 * 64; /** @@ -82957,7 +83172,7 @@ module.exports = micromatch; /***/ }), -/* 727 */ +/* 729 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -82967,18 +83182,18 @@ module.exports = micromatch; * Module dependencies */ -var toRegex = __webpack_require__(728); -var unique = __webpack_require__(742); -var extend = __webpack_require__(737); +var toRegex = __webpack_require__(730); +var unique = __webpack_require__(744); +var extend = __webpack_require__(739); /** * Local dependencies */ -var compilers = __webpack_require__(743); -var parsers = __webpack_require__(760); -var Braces = __webpack_require__(770); -var utils = __webpack_require__(744); +var compilers = __webpack_require__(745); +var parsers = __webpack_require__(762); +var Braces = __webpack_require__(772); +var utils = __webpack_require__(746); var MAX_LENGTH = 1024 * 64; var cache = {}; @@ -83282,15 +83497,15 @@ module.exports = braces; /***/ }), -/* 728 */ +/* 730 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var define = __webpack_require__(729); -var extend = __webpack_require__(737); -var not = __webpack_require__(739); +var define = __webpack_require__(731); +var extend = __webpack_require__(739); +var not = __webpack_require__(741); var MAX_LENGTH = 1024 * 64; /** @@ -83437,7 +83652,7 @@ module.exports.makeRe = makeRe; /***/ }), -/* 729 */ +/* 731 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -83450,7 +83665,7 @@ module.exports.makeRe = makeRe; -var isDescriptor = __webpack_require__(730); +var isDescriptor = __webpack_require__(732); module.exports = function defineProperty(obj, prop, val) { if (typeof obj !== 'object' && typeof obj !== 'function') { @@ -83475,7 +83690,7 @@ module.exports = function defineProperty(obj, prop, val) { /***/ }), -/* 730 */ +/* 732 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -83488,9 +83703,9 @@ module.exports = function defineProperty(obj, prop, val) { -var typeOf = __webpack_require__(731); -var isAccessor = __webpack_require__(732); -var isData = __webpack_require__(735); +var typeOf = __webpack_require__(733); +var isAccessor = __webpack_require__(734); +var isData = __webpack_require__(737); module.exports = function isDescriptor(obj, key) { if (typeOf(obj) !== 'object') { @@ -83504,7 +83719,7 @@ module.exports = function isDescriptor(obj, key) { /***/ }), -/* 731 */ +/* 733 */ /***/ (function(module, exports) { var toString = Object.prototype.toString; @@ -83657,7 +83872,7 @@ function isBuffer(val) { /***/ }), -/* 732 */ +/* 734 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -83670,7 +83885,7 @@ function isBuffer(val) { -var typeOf = __webpack_require__(733); +var typeOf = __webpack_require__(735); // accessor descriptor properties var accessor = { @@ -83733,10 +83948,10 @@ module.exports = isAccessorDescriptor; /***/ }), -/* 733 */ +/* 735 */ /***/ (function(module, exports, __webpack_require__) { -var isBuffer = __webpack_require__(734); +var isBuffer = __webpack_require__(736); var toString = Object.prototype.toString; /** @@ -83855,7 +84070,7 @@ module.exports = function kindOf(val) { /***/ }), -/* 734 */ +/* 736 */ /***/ (function(module, exports) { /*! @@ -83882,7 +84097,7 @@ function isSlowBuffer (obj) { /***/ }), -/* 735 */ +/* 737 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -83895,7 +84110,7 @@ function isSlowBuffer (obj) { -var typeOf = __webpack_require__(736); +var typeOf = __webpack_require__(738); // data descriptor properties var data = { @@ -83944,10 +84159,10 @@ module.exports = isDataDescriptor; /***/ }), -/* 736 */ +/* 738 */ /***/ (function(module, exports, __webpack_require__) { -var isBuffer = __webpack_require__(734); +var isBuffer = __webpack_require__(736); var toString = Object.prototype.toString; /** @@ -84066,13 +84281,13 @@ module.exports = function kindOf(val) { /***/ }), -/* 737 */ +/* 739 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var isObject = __webpack_require__(738); +var isObject = __webpack_require__(740); module.exports = function extend(o/*, objects*/) { if (!isObject(o)) { o = {}; } @@ -84106,7 +84321,7 @@ function hasOwn(obj, key) { /***/ }), -/* 738 */ +/* 740 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -84126,13 +84341,13 @@ module.exports = function isExtendable(val) { /***/ }), -/* 739 */ +/* 741 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var extend = __webpack_require__(740); +var extend = __webpack_require__(742); /** * The main export is a function that takes a `pattern` string and an `options` object. @@ -84199,13 +84414,13 @@ module.exports = toRegex; /***/ }), -/* 740 */ +/* 742 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var isObject = __webpack_require__(741); +var isObject = __webpack_require__(743); module.exports = function extend(o/*, objects*/) { if (!isObject(o)) { o = {}; } @@ -84239,7 +84454,7 @@ function hasOwn(obj, key) { /***/ }), -/* 741 */ +/* 743 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -84259,7 +84474,7 @@ module.exports = function isExtendable(val) { /***/ }), -/* 742 */ +/* 744 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -84309,13 +84524,13 @@ module.exports.immutable = function uniqueImmutable(arr) { /***/ }), -/* 743 */ +/* 745 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var utils = __webpack_require__(744); +var utils = __webpack_require__(746); module.exports = function(braces, options) { braces.compiler @@ -84598,25 +84813,25 @@ function hasQueue(node) { /***/ }), -/* 744 */ +/* 746 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var splitString = __webpack_require__(745); +var splitString = __webpack_require__(747); var utils = module.exports; /** * Module dependencies */ -utils.extend = __webpack_require__(737); -utils.flatten = __webpack_require__(751); -utils.isObject = __webpack_require__(749); -utils.fillRange = __webpack_require__(752); -utils.repeat = __webpack_require__(759); -utils.unique = __webpack_require__(742); +utils.extend = __webpack_require__(739); +utils.flatten = __webpack_require__(753); +utils.isObject = __webpack_require__(751); +utils.fillRange = __webpack_require__(754); +utils.repeat = __webpack_require__(761); +utils.unique = __webpack_require__(744); utils.define = function(obj, key, val) { Object.defineProperty(obj, key, { @@ -84948,7 +85163,7 @@ utils.escapeRegex = function(str) { /***/ }), -/* 745 */ +/* 747 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -84961,7 +85176,7 @@ utils.escapeRegex = function(str) { -var extend = __webpack_require__(746); +var extend = __webpack_require__(748); module.exports = function(str, options, fn) { if (typeof str !== 'string') { @@ -85126,14 +85341,14 @@ function keepEscaping(opts, str, idx) { /***/ }), -/* 746 */ +/* 748 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var isExtendable = __webpack_require__(747); -var assignSymbols = __webpack_require__(750); +var isExtendable = __webpack_require__(749); +var assignSymbols = __webpack_require__(752); module.exports = Object.assign || function(obj/*, objects*/) { if (obj === null || typeof obj === 'undefined') { @@ -85193,7 +85408,7 @@ function isEnum(obj, key) { /***/ }), -/* 747 */ +/* 749 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -85206,7 +85421,7 @@ function isEnum(obj, key) { -var isPlainObject = __webpack_require__(748); +var isPlainObject = __webpack_require__(750); module.exports = function isExtendable(val) { return isPlainObject(val) || typeof val === 'function' || Array.isArray(val); @@ -85214,7 +85429,7 @@ module.exports = function isExtendable(val) { /***/ }), -/* 748 */ +/* 750 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -85227,7 +85442,7 @@ module.exports = function isExtendable(val) { -var isObject = __webpack_require__(749); +var isObject = __webpack_require__(751); function isObjectObject(o) { return isObject(o) === true @@ -85258,7 +85473,7 @@ module.exports = function isPlainObject(o) { /***/ }), -/* 749 */ +/* 751 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -85277,7 +85492,7 @@ module.exports = function isObject(val) { /***/ }), -/* 750 */ +/* 752 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -85324,7 +85539,7 @@ module.exports = function(receiver, objects) { /***/ }), -/* 751 */ +/* 753 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -85353,7 +85568,7 @@ function flat(arr, res) { /***/ }), -/* 752 */ +/* 754 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -85367,10 +85582,10 @@ function flat(arr, res) { var util = __webpack_require__(29); -var isNumber = __webpack_require__(753); -var extend = __webpack_require__(755); -var repeat = __webpack_require__(757); -var toRegex = __webpack_require__(758); +var isNumber = __webpack_require__(755); +var extend = __webpack_require__(757); +var repeat = __webpack_require__(759); +var toRegex = __webpack_require__(760); /** * Return a range of numbers or letters. @@ -85568,7 +85783,7 @@ module.exports = fillRange; /***/ }), -/* 753 */ +/* 755 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -85581,7 +85796,7 @@ module.exports = fillRange; -var typeOf = __webpack_require__(754); +var typeOf = __webpack_require__(756); module.exports = function isNumber(num) { var type = typeOf(num); @@ -85597,10 +85812,10 @@ module.exports = function isNumber(num) { /***/ }), -/* 754 */ +/* 756 */ /***/ (function(module, exports, __webpack_require__) { -var isBuffer = __webpack_require__(734); +var isBuffer = __webpack_require__(736); var toString = Object.prototype.toString; /** @@ -85719,13 +85934,13 @@ module.exports = function kindOf(val) { /***/ }), -/* 755 */ +/* 757 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var isObject = __webpack_require__(756); +var isObject = __webpack_require__(758); module.exports = function extend(o/*, objects*/) { if (!isObject(o)) { o = {}; } @@ -85759,7 +85974,7 @@ function hasOwn(obj, key) { /***/ }), -/* 756 */ +/* 758 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -85779,7 +85994,7 @@ module.exports = function isExtendable(val) { /***/ }), -/* 757 */ +/* 759 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -85856,7 +86071,7 @@ function repeat(str, num) { /***/ }), -/* 758 */ +/* 760 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -85869,8 +86084,8 @@ function repeat(str, num) { -var repeat = __webpack_require__(757); -var isNumber = __webpack_require__(753); +var repeat = __webpack_require__(759); +var isNumber = __webpack_require__(755); var cache = {}; function toRegexRange(min, max, options) { @@ -86157,7 +86372,7 @@ module.exports = toRegexRange; /***/ }), -/* 759 */ +/* 761 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -86182,14 +86397,14 @@ module.exports = function repeat(ele, num) { /***/ }), -/* 760 */ +/* 762 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var Node = __webpack_require__(761); -var utils = __webpack_require__(744); +var Node = __webpack_require__(763); +var utils = __webpack_require__(746); /** * Braces parsers @@ -86549,15 +86764,15 @@ function concatNodes(pos, node, parent, options) { /***/ }), -/* 761 */ +/* 763 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var isObject = __webpack_require__(749); -var define = __webpack_require__(762); -var utils = __webpack_require__(769); +var isObject = __webpack_require__(751); +var define = __webpack_require__(764); +var utils = __webpack_require__(771); var ownNames; /** @@ -87048,7 +87263,7 @@ exports = module.exports = Node; /***/ }), -/* 762 */ +/* 764 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -87061,7 +87276,7 @@ exports = module.exports = Node; -var isDescriptor = __webpack_require__(763); +var isDescriptor = __webpack_require__(765); module.exports = function defineProperty(obj, prop, val) { if (typeof obj !== 'object' && typeof obj !== 'function') { @@ -87086,7 +87301,7 @@ module.exports = function defineProperty(obj, prop, val) { /***/ }), -/* 763 */ +/* 765 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -87099,9 +87314,9 @@ module.exports = function defineProperty(obj, prop, val) { -var typeOf = __webpack_require__(764); -var isAccessor = __webpack_require__(765); -var isData = __webpack_require__(767); +var typeOf = __webpack_require__(766); +var isAccessor = __webpack_require__(767); +var isData = __webpack_require__(769); module.exports = function isDescriptor(obj, key) { if (typeOf(obj) !== 'object') { @@ -87115,7 +87330,7 @@ module.exports = function isDescriptor(obj, key) { /***/ }), -/* 764 */ +/* 766 */ /***/ (function(module, exports) { var toString = Object.prototype.toString; @@ -87250,7 +87465,7 @@ function isBuffer(val) { /***/ }), -/* 765 */ +/* 767 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -87263,7 +87478,7 @@ function isBuffer(val) { -var typeOf = __webpack_require__(766); +var typeOf = __webpack_require__(768); // accessor descriptor properties var accessor = { @@ -87326,7 +87541,7 @@ module.exports = isAccessorDescriptor; /***/ }), -/* 766 */ +/* 768 */ /***/ (function(module, exports) { var toString = Object.prototype.toString; @@ -87461,7 +87676,7 @@ function isBuffer(val) { /***/ }), -/* 767 */ +/* 769 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -87474,7 +87689,7 @@ function isBuffer(val) { -var typeOf = __webpack_require__(768); +var typeOf = __webpack_require__(770); module.exports = function isDataDescriptor(obj, prop) { // data descriptor properties @@ -87517,7 +87732,7 @@ module.exports = function isDataDescriptor(obj, prop) { /***/ }), -/* 768 */ +/* 770 */ /***/ (function(module, exports) { var toString = Object.prototype.toString; @@ -87652,13 +87867,13 @@ function isBuffer(val) { /***/ }), -/* 769 */ +/* 771 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var typeOf = __webpack_require__(754); +var typeOf = __webpack_require__(756); var utils = module.exports; /** @@ -88678,17 +88893,17 @@ function assert(val, message) { /***/ }), -/* 770 */ +/* 772 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var extend = __webpack_require__(737); -var Snapdragon = __webpack_require__(771); -var compilers = __webpack_require__(743); -var parsers = __webpack_require__(760); -var utils = __webpack_require__(744); +var extend = __webpack_require__(739); +var Snapdragon = __webpack_require__(773); +var compilers = __webpack_require__(745); +var parsers = __webpack_require__(762); +var utils = __webpack_require__(746); /** * Customize Snapdragon parser and renderer @@ -88789,17 +89004,17 @@ module.exports = Braces; /***/ }), -/* 771 */ +/* 773 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var Base = __webpack_require__(772); -var define = __webpack_require__(798); -var Compiler = __webpack_require__(808); -var Parser = __webpack_require__(837); -var utils = __webpack_require__(817); +var Base = __webpack_require__(774); +var define = __webpack_require__(800); +var Compiler = __webpack_require__(810); +var Parser = __webpack_require__(839); +var utils = __webpack_require__(819); var regexCache = {}; var cache = {}; @@ -88970,20 +89185,20 @@ module.exports.Parser = Parser; /***/ }), -/* 772 */ +/* 774 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var util = __webpack_require__(29); -var define = __webpack_require__(773); -var CacheBase = __webpack_require__(774); -var Emitter = __webpack_require__(775); -var isObject = __webpack_require__(749); -var merge = __webpack_require__(792); -var pascal = __webpack_require__(795); -var cu = __webpack_require__(796); +var define = __webpack_require__(775); +var CacheBase = __webpack_require__(776); +var Emitter = __webpack_require__(777); +var isObject = __webpack_require__(751); +var merge = __webpack_require__(794); +var pascal = __webpack_require__(797); +var cu = __webpack_require__(798); /** * Optionally define a custom `cache` namespace to use. @@ -89412,7 +89627,7 @@ module.exports.namespace = namespace; /***/ }), -/* 773 */ +/* 775 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -89425,7 +89640,7 @@ module.exports.namespace = namespace; -var isDescriptor = __webpack_require__(763); +var isDescriptor = __webpack_require__(765); module.exports = function defineProperty(obj, prop, val) { if (typeof obj !== 'object' && typeof obj !== 'function') { @@ -89450,21 +89665,21 @@ module.exports = function defineProperty(obj, prop, val) { /***/ }), -/* 774 */ +/* 776 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var isObject = __webpack_require__(749); -var Emitter = __webpack_require__(775); -var visit = __webpack_require__(776); -var toPath = __webpack_require__(779); -var union = __webpack_require__(780); -var del = __webpack_require__(784); -var get = __webpack_require__(782); -var has = __webpack_require__(789); -var set = __webpack_require__(783); +var isObject = __webpack_require__(751); +var Emitter = __webpack_require__(777); +var visit = __webpack_require__(778); +var toPath = __webpack_require__(781); +var union = __webpack_require__(782); +var del = __webpack_require__(786); +var get = __webpack_require__(784); +var has = __webpack_require__(791); +var set = __webpack_require__(785); /** * Create a `Cache` constructor that when instantiated will @@ -89718,7 +89933,7 @@ module.exports.namespace = namespace; /***/ }), -/* 775 */ +/* 777 */ /***/ (function(module, exports, __webpack_require__) { @@ -89887,7 +90102,7 @@ Emitter.prototype.hasListeners = function(event){ /***/ }), -/* 776 */ +/* 778 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -89900,8 +90115,8 @@ Emitter.prototype.hasListeners = function(event){ -var visit = __webpack_require__(777); -var mapVisit = __webpack_require__(778); +var visit = __webpack_require__(779); +var mapVisit = __webpack_require__(780); module.exports = function(collection, method, val) { var result; @@ -89924,7 +90139,7 @@ module.exports = function(collection, method, val) { /***/ }), -/* 777 */ +/* 779 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -89937,7 +90152,7 @@ module.exports = function(collection, method, val) { -var isObject = __webpack_require__(749); +var isObject = __webpack_require__(751); module.exports = function visit(thisArg, method, target, val) { if (!isObject(thisArg) && typeof thisArg !== 'function') { @@ -89964,14 +90179,14 @@ module.exports = function visit(thisArg, method, target, val) { /***/ }), -/* 778 */ +/* 780 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var util = __webpack_require__(29); -var visit = __webpack_require__(777); +var visit = __webpack_require__(779); /** * Map `visit` over an array of objects. @@ -90008,7 +90223,7 @@ function isObject(val) { /***/ }), -/* 779 */ +/* 781 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -90021,7 +90236,7 @@ function isObject(val) { -var typeOf = __webpack_require__(754); +var typeOf = __webpack_require__(756); module.exports = function toPath(args) { if (typeOf(args) !== 'arguments') { @@ -90048,16 +90263,16 @@ function filter(arr) { /***/ }), -/* 780 */ +/* 782 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var isObject = __webpack_require__(741); -var union = __webpack_require__(781); -var get = __webpack_require__(782); -var set = __webpack_require__(783); +var isObject = __webpack_require__(743); +var union = __webpack_require__(783); +var get = __webpack_require__(784); +var set = __webpack_require__(785); module.exports = function unionValue(obj, prop, value) { if (!isObject(obj)) { @@ -90085,7 +90300,7 @@ function arrayify(val) { /***/ }), -/* 781 */ +/* 783 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -90121,7 +90336,7 @@ module.exports = function union(init) { /***/ }), -/* 782 */ +/* 784 */ /***/ (function(module, exports) { /*! @@ -90177,7 +90392,7 @@ function toString(val) { /***/ }), -/* 783 */ +/* 785 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -90190,10 +90405,10 @@ function toString(val) { -var split = __webpack_require__(745); -var extend = __webpack_require__(740); -var isPlainObject = __webpack_require__(748); -var isObject = __webpack_require__(741); +var split = __webpack_require__(747); +var extend = __webpack_require__(742); +var isPlainObject = __webpack_require__(750); +var isObject = __webpack_require__(743); module.exports = function(obj, prop, val) { if (!isObject(obj)) { @@ -90239,7 +90454,7 @@ function isValidKey(key) { /***/ }), -/* 784 */ +/* 786 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -90252,8 +90467,8 @@ function isValidKey(key) { -var isObject = __webpack_require__(749); -var has = __webpack_require__(785); +var isObject = __webpack_require__(751); +var has = __webpack_require__(787); module.exports = function unset(obj, prop) { if (!isObject(obj)) { @@ -90278,7 +90493,7 @@ module.exports = function unset(obj, prop) { /***/ }), -/* 785 */ +/* 787 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -90291,9 +90506,9 @@ module.exports = function unset(obj, prop) { -var isObject = __webpack_require__(786); -var hasValues = __webpack_require__(788); -var get = __webpack_require__(782); +var isObject = __webpack_require__(788); +var hasValues = __webpack_require__(790); +var get = __webpack_require__(784); module.exports = function(obj, prop, noZero) { if (isObject(obj)) { @@ -90304,7 +90519,7 @@ module.exports = function(obj, prop, noZero) { /***/ }), -/* 786 */ +/* 788 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -90317,7 +90532,7 @@ module.exports = function(obj, prop, noZero) { -var isArray = __webpack_require__(787); +var isArray = __webpack_require__(789); module.exports = function isObject(val) { return val != null && typeof val === 'object' && isArray(val) === false; @@ -90325,7 +90540,7 @@ module.exports = function isObject(val) { /***/ }), -/* 787 */ +/* 789 */ /***/ (function(module, exports) { var toString = {}.toString; @@ -90336,7 +90551,7 @@ module.exports = Array.isArray || function (arr) { /***/ }), -/* 788 */ +/* 790 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -90379,7 +90594,7 @@ module.exports = function hasValue(o, noZero) { /***/ }), -/* 789 */ +/* 791 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -90392,9 +90607,9 @@ module.exports = function hasValue(o, noZero) { -var isObject = __webpack_require__(749); -var hasValues = __webpack_require__(790); -var get = __webpack_require__(782); +var isObject = __webpack_require__(751); +var hasValues = __webpack_require__(792); +var get = __webpack_require__(784); module.exports = function(val, prop) { return hasValues(isObject(val) && prop ? get(val, prop) : val); @@ -90402,7 +90617,7 @@ module.exports = function(val, prop) { /***/ }), -/* 790 */ +/* 792 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -90415,8 +90630,8 @@ module.exports = function(val, prop) { -var typeOf = __webpack_require__(791); -var isNumber = __webpack_require__(753); +var typeOf = __webpack_require__(793); +var isNumber = __webpack_require__(755); module.exports = function hasValue(val) { // is-number checks for NaN and other edge cases @@ -90469,10 +90684,10 @@ module.exports = function hasValue(val) { /***/ }), -/* 791 */ +/* 793 */ /***/ (function(module, exports, __webpack_require__) { -var isBuffer = __webpack_require__(734); +var isBuffer = __webpack_require__(736); var toString = Object.prototype.toString; /** @@ -90594,14 +90809,14 @@ module.exports = function kindOf(val) { /***/ }), -/* 792 */ +/* 794 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var isExtendable = __webpack_require__(793); -var forIn = __webpack_require__(794); +var isExtendable = __webpack_require__(795); +var forIn = __webpack_require__(796); function mixinDeep(target, objects) { var len = arguments.length, i = 0; @@ -90665,7 +90880,7 @@ module.exports = mixinDeep; /***/ }), -/* 793 */ +/* 795 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -90678,7 +90893,7 @@ module.exports = mixinDeep; -var isPlainObject = __webpack_require__(748); +var isPlainObject = __webpack_require__(750); module.exports = function isExtendable(val) { return isPlainObject(val) || typeof val === 'function' || Array.isArray(val); @@ -90686,7 +90901,7 @@ module.exports = function isExtendable(val) { /***/ }), -/* 794 */ +/* 796 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -90709,7 +90924,7 @@ module.exports = function forIn(obj, fn, thisArg) { /***/ }), -/* 795 */ +/* 797 */ /***/ (function(module, exports) { /*! @@ -90736,14 +90951,14 @@ module.exports = pascalcase; /***/ }), -/* 796 */ +/* 798 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var util = __webpack_require__(29); -var utils = __webpack_require__(797); +var utils = __webpack_require__(799); /** * Expose class utils @@ -91108,7 +91323,7 @@ cu.bubble = function(Parent, events) { /***/ }), -/* 797 */ +/* 799 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -91122,10 +91337,10 @@ var utils = {}; * Lazily required module dependencies */ -utils.union = __webpack_require__(781); -utils.define = __webpack_require__(798); -utils.isObj = __webpack_require__(749); -utils.staticExtend = __webpack_require__(805); +utils.union = __webpack_require__(783); +utils.define = __webpack_require__(800); +utils.isObj = __webpack_require__(751); +utils.staticExtend = __webpack_require__(807); /** @@ -91136,7 +91351,7 @@ module.exports = utils; /***/ }), -/* 798 */ +/* 800 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -91149,7 +91364,7 @@ module.exports = utils; -var isDescriptor = __webpack_require__(799); +var isDescriptor = __webpack_require__(801); module.exports = function defineProperty(obj, prop, val) { if (typeof obj !== 'object' && typeof obj !== 'function') { @@ -91174,7 +91389,7 @@ module.exports = function defineProperty(obj, prop, val) { /***/ }), -/* 799 */ +/* 801 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -91187,9 +91402,9 @@ module.exports = function defineProperty(obj, prop, val) { -var typeOf = __webpack_require__(800); -var isAccessor = __webpack_require__(801); -var isData = __webpack_require__(803); +var typeOf = __webpack_require__(802); +var isAccessor = __webpack_require__(803); +var isData = __webpack_require__(805); module.exports = function isDescriptor(obj, key) { if (typeOf(obj) !== 'object') { @@ -91203,7 +91418,7 @@ module.exports = function isDescriptor(obj, key) { /***/ }), -/* 800 */ +/* 802 */ /***/ (function(module, exports) { var toString = Object.prototype.toString; @@ -91356,7 +91571,7 @@ function isBuffer(val) { /***/ }), -/* 801 */ +/* 803 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -91369,7 +91584,7 @@ function isBuffer(val) { -var typeOf = __webpack_require__(802); +var typeOf = __webpack_require__(804); // accessor descriptor properties var accessor = { @@ -91432,10 +91647,10 @@ module.exports = isAccessorDescriptor; /***/ }), -/* 802 */ +/* 804 */ /***/ (function(module, exports, __webpack_require__) { -var isBuffer = __webpack_require__(734); +var isBuffer = __webpack_require__(736); var toString = Object.prototype.toString; /** @@ -91554,7 +91769,7 @@ module.exports = function kindOf(val) { /***/ }), -/* 803 */ +/* 805 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -91567,7 +91782,7 @@ module.exports = function kindOf(val) { -var typeOf = __webpack_require__(804); +var typeOf = __webpack_require__(806); // data descriptor properties var data = { @@ -91616,10 +91831,10 @@ module.exports = isDataDescriptor; /***/ }), -/* 804 */ +/* 806 */ /***/ (function(module, exports, __webpack_require__) { -var isBuffer = __webpack_require__(734); +var isBuffer = __webpack_require__(736); var toString = Object.prototype.toString; /** @@ -91738,7 +91953,7 @@ module.exports = function kindOf(val) { /***/ }), -/* 805 */ +/* 807 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -91751,8 +91966,8 @@ module.exports = function kindOf(val) { -var copy = __webpack_require__(806); -var define = __webpack_require__(798); +var copy = __webpack_require__(808); +var define = __webpack_require__(800); var util = __webpack_require__(29); /** @@ -91835,15 +92050,15 @@ module.exports = extend; /***/ }), -/* 806 */ +/* 808 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var typeOf = __webpack_require__(754); -var copyDescriptor = __webpack_require__(807); -var define = __webpack_require__(798); +var typeOf = __webpack_require__(756); +var copyDescriptor = __webpack_require__(809); +var define = __webpack_require__(800); /** * Copy static properties, prototype properties, and descriptors from one object to another. @@ -92016,7 +92231,7 @@ module.exports.has = has; /***/ }), -/* 807 */ +/* 809 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -92104,16 +92319,16 @@ function isObject(val) { /***/ }), -/* 808 */ +/* 810 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var use = __webpack_require__(809); -var define = __webpack_require__(798); -var debug = __webpack_require__(811)('snapdragon:compiler'); -var utils = __webpack_require__(817); +var use = __webpack_require__(811); +var define = __webpack_require__(800); +var debug = __webpack_require__(813)('snapdragon:compiler'); +var utils = __webpack_require__(819); /** * Create a new `Compiler` with the given `options`. @@ -92267,7 +92482,7 @@ Compiler.prototype = { // source map support if (opts.sourcemap) { - var sourcemaps = __webpack_require__(836); + var sourcemaps = __webpack_require__(838); sourcemaps(this); this.mapVisit(this.ast.nodes); this.applySourceMaps(); @@ -92288,7 +92503,7 @@ module.exports = Compiler; /***/ }), -/* 809 */ +/* 811 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -92301,7 +92516,7 @@ module.exports = Compiler; -var utils = __webpack_require__(810); +var utils = __webpack_require__(812); module.exports = function base(app, opts) { if (!utils.isObject(app) && typeof app !== 'function') { @@ -92416,7 +92631,7 @@ module.exports = function base(app, opts) { /***/ }), -/* 810 */ +/* 812 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -92430,8 +92645,8 @@ var utils = {}; * Lazily required module dependencies */ -utils.define = __webpack_require__(798); -utils.isObject = __webpack_require__(749); +utils.define = __webpack_require__(800); +utils.isObject = __webpack_require__(751); utils.isString = function(val) { @@ -92446,7 +92661,7 @@ module.exports = utils; /***/ }), -/* 811 */ +/* 813 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -92455,14 +92670,14 @@ module.exports = utils; */ if (typeof process !== 'undefined' && process.type === 'renderer') { - module.exports = __webpack_require__(812); + module.exports = __webpack_require__(814); } else { - module.exports = __webpack_require__(815); + module.exports = __webpack_require__(817); } /***/ }), -/* 812 */ +/* 814 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -92471,7 +92686,7 @@ if (typeof process !== 'undefined' && process.type === 'renderer') { * Expose `debug()` as the module. */ -exports = module.exports = __webpack_require__(813); +exports = module.exports = __webpack_require__(815); exports.log = log; exports.formatArgs = formatArgs; exports.save = save; @@ -92653,7 +92868,7 @@ function localstorage() { /***/ }), -/* 813 */ +/* 815 */ /***/ (function(module, exports, __webpack_require__) { @@ -92669,7 +92884,7 @@ exports.coerce = coerce; exports.disable = disable; exports.enable = enable; exports.enabled = enabled; -exports.humanize = __webpack_require__(814); +exports.humanize = __webpack_require__(816); /** * The currently active debug mode names, and names to skip. @@ -92861,7 +93076,7 @@ function coerce(val) { /***/ }), -/* 814 */ +/* 816 */ /***/ (function(module, exports) { /** @@ -93019,14 +93234,14 @@ function plural(ms, n, name) { /***/ }), -/* 815 */ +/* 817 */ /***/ (function(module, exports, __webpack_require__) { /** * Module dependencies. */ -var tty = __webpack_require__(478); +var tty = __webpack_require__(484); var util = __webpack_require__(29); /** @@ -93035,7 +93250,7 @@ var util = __webpack_require__(29); * Expose `debug()` as the module. */ -exports = module.exports = __webpack_require__(813); +exports = module.exports = __webpack_require__(815); exports.init = init; exports.log = log; exports.formatArgs = formatArgs; @@ -93214,7 +93429,7 @@ function createWritableStdioStream (fd) { case 'PIPE': case 'TCP': - var net = __webpack_require__(816); + var net = __webpack_require__(818); stream = new net.Socket({ fd: fd, readable: false, @@ -93273,13 +93488,13 @@ exports.enable(load()); /***/ }), -/* 816 */ +/* 818 */ /***/ (function(module, exports) { module.exports = require("net"); /***/ }), -/* 817 */ +/* 819 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -93289,9 +93504,9 @@ module.exports = require("net"); * Module dependencies */ -exports.extend = __webpack_require__(740); -exports.SourceMap = __webpack_require__(818); -exports.sourceMapResolve = __webpack_require__(829); +exports.extend = __webpack_require__(742); +exports.SourceMap = __webpack_require__(820); +exports.sourceMapResolve = __webpack_require__(831); /** * Convert backslash in the given string to forward slashes @@ -93334,7 +93549,7 @@ exports.last = function(arr, n) { /***/ }), -/* 818 */ +/* 820 */ /***/ (function(module, exports, __webpack_require__) { /* @@ -93342,13 +93557,13 @@ exports.last = function(arr, n) { * Licensed under the New BSD license. See LICENSE.txt or: * http://opensource.org/licenses/BSD-3-Clause */ -exports.SourceMapGenerator = __webpack_require__(819).SourceMapGenerator; -exports.SourceMapConsumer = __webpack_require__(825).SourceMapConsumer; -exports.SourceNode = __webpack_require__(828).SourceNode; +exports.SourceMapGenerator = __webpack_require__(821).SourceMapGenerator; +exports.SourceMapConsumer = __webpack_require__(827).SourceMapConsumer; +exports.SourceNode = __webpack_require__(830).SourceNode; /***/ }), -/* 819 */ +/* 821 */ /***/ (function(module, exports, __webpack_require__) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -93358,10 +93573,10 @@ exports.SourceNode = __webpack_require__(828).SourceNode; * http://opensource.org/licenses/BSD-3-Clause */ -var base64VLQ = __webpack_require__(820); -var util = __webpack_require__(822); -var ArraySet = __webpack_require__(823).ArraySet; -var MappingList = __webpack_require__(824).MappingList; +var base64VLQ = __webpack_require__(822); +var util = __webpack_require__(824); +var ArraySet = __webpack_require__(825).ArraySet; +var MappingList = __webpack_require__(826).MappingList; /** * An instance of the SourceMapGenerator represents a source map which is @@ -93770,7 +93985,7 @@ exports.SourceMapGenerator = SourceMapGenerator; /***/ }), -/* 820 */ +/* 822 */ /***/ (function(module, exports, __webpack_require__) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -93810,7 +94025,7 @@ exports.SourceMapGenerator = SourceMapGenerator; * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -var base64 = __webpack_require__(821); +var base64 = __webpack_require__(823); // A single base 64 digit can contain 6 bits of data. For the base 64 variable // length quantities we use in the source map spec, the first bit is the sign, @@ -93916,7 +94131,7 @@ exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { /***/ }), -/* 821 */ +/* 823 */ /***/ (function(module, exports) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -93989,7 +94204,7 @@ exports.decode = function (charCode) { /***/ }), -/* 822 */ +/* 824 */ /***/ (function(module, exports) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -94412,7 +94627,7 @@ exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflate /***/ }), -/* 823 */ +/* 825 */ /***/ (function(module, exports, __webpack_require__) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -94422,7 +94637,7 @@ exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflate * http://opensource.org/licenses/BSD-3-Clause */ -var util = __webpack_require__(822); +var util = __webpack_require__(824); var has = Object.prototype.hasOwnProperty; var hasNativeMap = typeof Map !== "undefined"; @@ -94539,7 +94754,7 @@ exports.ArraySet = ArraySet; /***/ }), -/* 824 */ +/* 826 */ /***/ (function(module, exports, __webpack_require__) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -94549,7 +94764,7 @@ exports.ArraySet = ArraySet; * http://opensource.org/licenses/BSD-3-Clause */ -var util = __webpack_require__(822); +var util = __webpack_require__(824); /** * Determine whether mappingB is after mappingA with respect to generated @@ -94624,7 +94839,7 @@ exports.MappingList = MappingList; /***/ }), -/* 825 */ +/* 827 */ /***/ (function(module, exports, __webpack_require__) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -94634,11 +94849,11 @@ exports.MappingList = MappingList; * http://opensource.org/licenses/BSD-3-Clause */ -var util = __webpack_require__(822); -var binarySearch = __webpack_require__(826); -var ArraySet = __webpack_require__(823).ArraySet; -var base64VLQ = __webpack_require__(820); -var quickSort = __webpack_require__(827).quickSort; +var util = __webpack_require__(824); +var binarySearch = __webpack_require__(828); +var ArraySet = __webpack_require__(825).ArraySet; +var base64VLQ = __webpack_require__(822); +var quickSort = __webpack_require__(829).quickSort; function SourceMapConsumer(aSourceMap) { var sourceMap = aSourceMap; @@ -95712,7 +95927,7 @@ exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; /***/ }), -/* 826 */ +/* 828 */ /***/ (function(module, exports) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -95829,7 +96044,7 @@ exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { /***/ }), -/* 827 */ +/* 829 */ /***/ (function(module, exports) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -95949,7 +96164,7 @@ exports.quickSort = function (ary, comparator) { /***/ }), -/* 828 */ +/* 830 */ /***/ (function(module, exports, __webpack_require__) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -95959,8 +96174,8 @@ exports.quickSort = function (ary, comparator) { * http://opensource.org/licenses/BSD-3-Clause */ -var SourceMapGenerator = __webpack_require__(819).SourceMapGenerator; -var util = __webpack_require__(822); +var SourceMapGenerator = __webpack_require__(821).SourceMapGenerator; +var util = __webpack_require__(824); // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other // operating systems these days (capturing the result). @@ -96368,17 +96583,17 @@ exports.SourceNode = SourceNode; /***/ }), -/* 829 */ +/* 831 */ /***/ (function(module, exports, __webpack_require__) { // Copyright 2014, 2015, 2016, 2017 Simon Lydell // X11 (“MIT”) Licensed. (See LICENSE.) -var sourceMappingURL = __webpack_require__(830) -var resolveUrl = __webpack_require__(831) -var decodeUriComponent = __webpack_require__(832) -var urix = __webpack_require__(834) -var atob = __webpack_require__(835) +var sourceMappingURL = __webpack_require__(832) +var resolveUrl = __webpack_require__(833) +var decodeUriComponent = __webpack_require__(834) +var urix = __webpack_require__(836) +var atob = __webpack_require__(837) @@ -96676,7 +96891,7 @@ module.exports = { /***/ }), -/* 830 */ +/* 832 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;// Copyright 2014 Simon Lydell @@ -96739,7 +96954,7 @@ void (function(root, factory) { /***/ }), -/* 831 */ +/* 833 */ /***/ (function(module, exports, __webpack_require__) { // Copyright 2014 Simon Lydell @@ -96757,13 +96972,13 @@ module.exports = resolveUrl /***/ }), -/* 832 */ +/* 834 */ /***/ (function(module, exports, __webpack_require__) { // Copyright 2017 Simon Lydell // X11 (“MIT”) Licensed. (See LICENSE.) -var decodeUriComponent = __webpack_require__(833) +var decodeUriComponent = __webpack_require__(835) function customDecodeUriComponent(string) { // `decodeUriComponent` turns `+` into ` `, but that's not wanted. @@ -96774,7 +96989,7 @@ module.exports = customDecodeUriComponent /***/ }), -/* 833 */ +/* 835 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -96875,7 +97090,7 @@ module.exports = function (encodedURI) { /***/ }), -/* 834 */ +/* 836 */ /***/ (function(module, exports, __webpack_require__) { // Copyright 2014 Simon Lydell @@ -96898,7 +97113,7 @@ module.exports = urix /***/ }), -/* 835 */ +/* 837 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -96912,7 +97127,7 @@ module.exports = atob.atob = atob; /***/ }), -/* 836 */ +/* 838 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -96920,8 +97135,8 @@ module.exports = atob.atob = atob; var fs = __webpack_require__(23); var path = __webpack_require__(16); -var define = __webpack_require__(798); -var utils = __webpack_require__(817); +var define = __webpack_require__(800); +var utils = __webpack_require__(819); /** * Expose `mixin()`. @@ -97064,19 +97279,19 @@ exports.comment = function(node) { /***/ }), -/* 837 */ +/* 839 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var use = __webpack_require__(809); +var use = __webpack_require__(811); var util = __webpack_require__(29); -var Cache = __webpack_require__(838); -var define = __webpack_require__(798); -var debug = __webpack_require__(811)('snapdragon:parser'); -var Position = __webpack_require__(839); -var utils = __webpack_require__(817); +var Cache = __webpack_require__(840); +var define = __webpack_require__(800); +var debug = __webpack_require__(813)('snapdragon:parser'); +var Position = __webpack_require__(841); +var utils = __webpack_require__(819); /** * Create a new `Parser` with the given `input` and `options`. @@ -97604,7 +97819,7 @@ module.exports = Parser; /***/ }), -/* 838 */ +/* 840 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -97711,13 +97926,13 @@ MapCache.prototype.del = function mapDelete(key) { /***/ }), -/* 839 */ +/* 841 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var define = __webpack_require__(798); +var define = __webpack_require__(800); /** * Store position for a node @@ -97732,16 +97947,16 @@ module.exports = function Position(start, parser) { /***/ }), -/* 840 */ +/* 842 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var safe = __webpack_require__(841); -var define = __webpack_require__(847); -var extend = __webpack_require__(848); -var not = __webpack_require__(850); +var safe = __webpack_require__(843); +var define = __webpack_require__(849); +var extend = __webpack_require__(850); +var not = __webpack_require__(852); var MAX_LENGTH = 1024 * 64; /** @@ -97894,10 +98109,10 @@ module.exports.makeRe = makeRe; /***/ }), -/* 841 */ +/* 843 */ /***/ (function(module, exports, __webpack_require__) { -var parse = __webpack_require__(842); +var parse = __webpack_require__(844); var types = parse.types; module.exports = function (re, opts) { @@ -97943,13 +98158,13 @@ function isRegExp (x) { /***/ }), -/* 842 */ +/* 844 */ /***/ (function(module, exports, __webpack_require__) { -var util = __webpack_require__(843); -var types = __webpack_require__(844); -var sets = __webpack_require__(845); -var positions = __webpack_require__(846); +var util = __webpack_require__(845); +var types = __webpack_require__(846); +var sets = __webpack_require__(847); +var positions = __webpack_require__(848); module.exports = function(regexpStr) { @@ -98231,11 +98446,11 @@ module.exports.types = types; /***/ }), -/* 843 */ +/* 845 */ /***/ (function(module, exports, __webpack_require__) { -var types = __webpack_require__(844); -var sets = __webpack_require__(845); +var types = __webpack_require__(846); +var sets = __webpack_require__(847); // All of these are private and only used by randexp. @@ -98348,7 +98563,7 @@ exports.error = function(regexp, msg) { /***/ }), -/* 844 */ +/* 846 */ /***/ (function(module, exports) { module.exports = { @@ -98364,10 +98579,10 @@ module.exports = { /***/ }), -/* 845 */ +/* 847 */ /***/ (function(module, exports, __webpack_require__) { -var types = __webpack_require__(844); +var types = __webpack_require__(846); var INTS = function() { return [{ type: types.RANGE , from: 48, to: 57 }]; @@ -98452,10 +98667,10 @@ exports.anyChar = function() { /***/ }), -/* 846 */ +/* 848 */ /***/ (function(module, exports, __webpack_require__) { -var types = __webpack_require__(844); +var types = __webpack_require__(846); exports.wordBoundary = function() { return { type: types.POSITION, value: 'b' }; @@ -98475,7 +98690,7 @@ exports.end = function() { /***/ }), -/* 847 */ +/* 849 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -98488,8 +98703,8 @@ exports.end = function() { -var isobject = __webpack_require__(749); -var isDescriptor = __webpack_require__(763); +var isobject = __webpack_require__(751); +var isDescriptor = __webpack_require__(765); var define = (typeof Reflect !== 'undefined' && Reflect.defineProperty) ? Reflect.defineProperty : Object.defineProperty; @@ -98520,14 +98735,14 @@ module.exports = function defineProperty(obj, key, val) { /***/ }), -/* 848 */ +/* 850 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var isExtendable = __webpack_require__(849); -var assignSymbols = __webpack_require__(750); +var isExtendable = __webpack_require__(851); +var assignSymbols = __webpack_require__(752); module.exports = Object.assign || function(obj/*, objects*/) { if (obj === null || typeof obj === 'undefined') { @@ -98587,7 +98802,7 @@ function isEnum(obj, key) { /***/ }), -/* 849 */ +/* 851 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -98600,7 +98815,7 @@ function isEnum(obj, key) { -var isPlainObject = __webpack_require__(748); +var isPlainObject = __webpack_require__(750); module.exports = function isExtendable(val) { return isPlainObject(val) || typeof val === 'function' || Array.isArray(val); @@ -98608,14 +98823,14 @@ module.exports = function isExtendable(val) { /***/ }), -/* 850 */ +/* 852 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var extend = __webpack_require__(848); -var safe = __webpack_require__(841); +var extend = __webpack_require__(850); +var safe = __webpack_require__(843); /** * The main export is a function that takes a `pattern` string and an `options` object. @@ -98687,14 +98902,14 @@ module.exports = toRegex; /***/ }), -/* 851 */ +/* 853 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var nanomatch = __webpack_require__(852); -var extglob = __webpack_require__(868); +var nanomatch = __webpack_require__(854); +var extglob = __webpack_require__(870); module.exports = function(snapdragon) { var compilers = snapdragon.compiler.compilers; @@ -98771,7 +98986,7 @@ function escapeExtglobs(compiler) { /***/ }), -/* 852 */ +/* 854 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -98782,17 +98997,17 @@ function escapeExtglobs(compiler) { */ var util = __webpack_require__(29); -var toRegex = __webpack_require__(853); -var extend = __webpack_require__(854); +var toRegex = __webpack_require__(855); +var extend = __webpack_require__(856); /** * Local dependencies */ -var compilers = __webpack_require__(856); -var parsers = __webpack_require__(857); -var cache = __webpack_require__(860); -var utils = __webpack_require__(862); +var compilers = __webpack_require__(858); +var parsers = __webpack_require__(859); +var cache = __webpack_require__(862); +var utils = __webpack_require__(864); var MAX_LENGTH = 1024 * 64; /** @@ -99616,15 +99831,15 @@ module.exports = nanomatch; /***/ }), -/* 853 */ +/* 855 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var define = __webpack_require__(798); -var extend = __webpack_require__(740); -var not = __webpack_require__(739); +var define = __webpack_require__(800); +var extend = __webpack_require__(742); +var not = __webpack_require__(741); var MAX_LENGTH = 1024 * 64; /** @@ -99771,14 +99986,14 @@ module.exports.makeRe = makeRe; /***/ }), -/* 854 */ +/* 856 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var isExtendable = __webpack_require__(855); -var assignSymbols = __webpack_require__(750); +var isExtendable = __webpack_require__(857); +var assignSymbols = __webpack_require__(752); module.exports = Object.assign || function(obj/*, objects*/) { if (obj === null || typeof obj === 'undefined') { @@ -99838,7 +100053,7 @@ function isEnum(obj, key) { /***/ }), -/* 855 */ +/* 857 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -99851,7 +100066,7 @@ function isEnum(obj, key) { -var isPlainObject = __webpack_require__(748); +var isPlainObject = __webpack_require__(750); module.exports = function isExtendable(val) { return isPlainObject(val) || typeof val === 'function' || Array.isArray(val); @@ -99859,7 +100074,7 @@ module.exports = function isExtendable(val) { /***/ }), -/* 856 */ +/* 858 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -100205,15 +100420,15 @@ module.exports = function(nanomatch, options) { /***/ }), -/* 857 */ +/* 859 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var regexNot = __webpack_require__(739); -var toRegex = __webpack_require__(853); -var isOdd = __webpack_require__(858); +var regexNot = __webpack_require__(741); +var toRegex = __webpack_require__(855); +var isOdd = __webpack_require__(860); /** * Characters to use in negation regex (we want to "not" match @@ -100599,7 +100814,7 @@ module.exports.not = NOT_REGEX; /***/ }), -/* 858 */ +/* 860 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -100612,7 +100827,7 @@ module.exports.not = NOT_REGEX; -var isNumber = __webpack_require__(859); +var isNumber = __webpack_require__(861); module.exports = function isOdd(i) { if (!isNumber(i)) { @@ -100626,7 +100841,7 @@ module.exports = function isOdd(i) { /***/ }), -/* 859 */ +/* 861 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -100654,14 +100869,14 @@ module.exports = function isNumber(num) { /***/ }), -/* 860 */ +/* 862 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = new (__webpack_require__(861))(); +module.exports = new (__webpack_require__(863))(); /***/ }), -/* 861 */ +/* 863 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -100674,7 +100889,7 @@ module.exports = new (__webpack_require__(861))(); -var MapCache = __webpack_require__(838); +var MapCache = __webpack_require__(840); /** * Create a new `FragmentCache` with an optional object to use for `caches`. @@ -100796,7 +101011,7 @@ exports = module.exports = FragmentCache; /***/ }), -/* 862 */ +/* 864 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -100809,14 +101024,14 @@ var path = __webpack_require__(16); * Module dependencies */ -var isWindows = __webpack_require__(863)(); -var Snapdragon = __webpack_require__(771); -utils.define = __webpack_require__(864); -utils.diff = __webpack_require__(865); -utils.extend = __webpack_require__(854); -utils.pick = __webpack_require__(866); -utils.typeOf = __webpack_require__(867); -utils.unique = __webpack_require__(742); +var isWindows = __webpack_require__(865)(); +var Snapdragon = __webpack_require__(773); +utils.define = __webpack_require__(866); +utils.diff = __webpack_require__(867); +utils.extend = __webpack_require__(856); +utils.pick = __webpack_require__(868); +utils.typeOf = __webpack_require__(869); +utils.unique = __webpack_require__(744); /** * Returns true if the given value is effectively an empty string @@ -101182,7 +101397,7 @@ utils.unixify = function(options) { /***/ }), -/* 863 */ +/* 865 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! @@ -101210,7 +101425,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ /***/ }), -/* 864 */ +/* 866 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -101223,8 +101438,8 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ -var isobject = __webpack_require__(749); -var isDescriptor = __webpack_require__(763); +var isobject = __webpack_require__(751); +var isDescriptor = __webpack_require__(765); var define = (typeof Reflect !== 'undefined' && Reflect.defineProperty) ? Reflect.defineProperty : Object.defineProperty; @@ -101255,7 +101470,7 @@ module.exports = function defineProperty(obj, key, val) { /***/ }), -/* 865 */ +/* 867 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -101309,7 +101524,7 @@ function diffArray(one, two) { /***/ }), -/* 866 */ +/* 868 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -101322,7 +101537,7 @@ function diffArray(one, two) { -var isObject = __webpack_require__(749); +var isObject = __webpack_require__(751); module.exports = function pick(obj, keys) { if (!isObject(obj) && typeof obj !== 'function') { @@ -101351,7 +101566,7 @@ module.exports = function pick(obj, keys) { /***/ }), -/* 867 */ +/* 869 */ /***/ (function(module, exports) { var toString = Object.prototype.toString; @@ -101486,7 +101701,7 @@ function isBuffer(val) { /***/ }), -/* 868 */ +/* 870 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -101496,18 +101711,18 @@ function isBuffer(val) { * Module dependencies */ -var extend = __webpack_require__(740); -var unique = __webpack_require__(742); -var toRegex = __webpack_require__(853); +var extend = __webpack_require__(742); +var unique = __webpack_require__(744); +var toRegex = __webpack_require__(855); /** * Local dependencies */ -var compilers = __webpack_require__(869); -var parsers = __webpack_require__(880); -var Extglob = __webpack_require__(883); -var utils = __webpack_require__(882); +var compilers = __webpack_require__(871); +var parsers = __webpack_require__(882); +var Extglob = __webpack_require__(885); +var utils = __webpack_require__(884); var MAX_LENGTH = 1024 * 64; /** @@ -101824,13 +102039,13 @@ module.exports = extglob; /***/ }), -/* 869 */ +/* 871 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var brackets = __webpack_require__(870); +var brackets = __webpack_require__(872); /** * Extglob compilers @@ -102000,7 +102215,7 @@ module.exports = function(extglob) { /***/ }), -/* 870 */ +/* 872 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -102010,17 +102225,17 @@ module.exports = function(extglob) { * Local dependencies */ -var compilers = __webpack_require__(871); -var parsers = __webpack_require__(873); +var compilers = __webpack_require__(873); +var parsers = __webpack_require__(875); /** * Module dependencies */ -var debug = __webpack_require__(875)('expand-brackets'); -var extend = __webpack_require__(740); -var Snapdragon = __webpack_require__(771); -var toRegex = __webpack_require__(853); +var debug = __webpack_require__(877)('expand-brackets'); +var extend = __webpack_require__(742); +var Snapdragon = __webpack_require__(773); +var toRegex = __webpack_require__(855); /** * Parses the given POSIX character class `pattern` and returns a @@ -102218,13 +102433,13 @@ module.exports = brackets; /***/ }), -/* 871 */ +/* 873 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var posix = __webpack_require__(872); +var posix = __webpack_require__(874); module.exports = function(brackets) { brackets.compiler @@ -102312,7 +102527,7 @@ module.exports = function(brackets) { /***/ }), -/* 872 */ +/* 874 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -102341,14 +102556,14 @@ module.exports = { /***/ }), -/* 873 */ +/* 875 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var utils = __webpack_require__(874); -var define = __webpack_require__(798); +var utils = __webpack_require__(876); +var define = __webpack_require__(800); /** * Text regex @@ -102567,14 +102782,14 @@ module.exports.TEXT_REGEX = TEXT_REGEX; /***/ }), -/* 874 */ +/* 876 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var toRegex = __webpack_require__(853); -var regexNot = __webpack_require__(739); +var toRegex = __webpack_require__(855); +var regexNot = __webpack_require__(741); var cached; /** @@ -102608,7 +102823,7 @@ exports.createRegex = function(pattern, include) { /***/ }), -/* 875 */ +/* 877 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102617,14 +102832,14 @@ exports.createRegex = function(pattern, include) { */ if (typeof process !== 'undefined' && process.type === 'renderer') { - module.exports = __webpack_require__(876); + module.exports = __webpack_require__(878); } else { - module.exports = __webpack_require__(879); + module.exports = __webpack_require__(881); } /***/ }), -/* 876 */ +/* 878 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102633,7 +102848,7 @@ if (typeof process !== 'undefined' && process.type === 'renderer') { * Expose `debug()` as the module. */ -exports = module.exports = __webpack_require__(877); +exports = module.exports = __webpack_require__(879); exports.log = log; exports.formatArgs = formatArgs; exports.save = save; @@ -102815,7 +103030,7 @@ function localstorage() { /***/ }), -/* 877 */ +/* 879 */ /***/ (function(module, exports, __webpack_require__) { @@ -102831,7 +103046,7 @@ exports.coerce = coerce; exports.disable = disable; exports.enable = enable; exports.enabled = enabled; -exports.humanize = __webpack_require__(878); +exports.humanize = __webpack_require__(880); /** * The currently active debug mode names, and names to skip. @@ -103023,7 +103238,7 @@ function coerce(val) { /***/ }), -/* 878 */ +/* 880 */ /***/ (function(module, exports) { /** @@ -103181,14 +103396,14 @@ function plural(ms, n, name) { /***/ }), -/* 879 */ +/* 881 */ /***/ (function(module, exports, __webpack_require__) { /** * Module dependencies. */ -var tty = __webpack_require__(478); +var tty = __webpack_require__(484); var util = __webpack_require__(29); /** @@ -103197,7 +103412,7 @@ var util = __webpack_require__(29); * Expose `debug()` as the module. */ -exports = module.exports = __webpack_require__(877); +exports = module.exports = __webpack_require__(879); exports.init = init; exports.log = log; exports.formatArgs = formatArgs; @@ -103376,7 +103591,7 @@ function createWritableStdioStream (fd) { case 'PIPE': case 'TCP': - var net = __webpack_require__(816); + var net = __webpack_require__(818); stream = new net.Socket({ fd: fd, readable: false, @@ -103435,15 +103650,15 @@ exports.enable(load()); /***/ }), -/* 880 */ +/* 882 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var brackets = __webpack_require__(870); -var define = __webpack_require__(881); -var utils = __webpack_require__(882); +var brackets = __webpack_require__(872); +var define = __webpack_require__(883); +var utils = __webpack_require__(884); /** * Characters to use in text regex (we want to "not" match @@ -103598,7 +103813,7 @@ module.exports = parsers; /***/ }), -/* 881 */ +/* 883 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -103611,7 +103826,7 @@ module.exports = parsers; -var isDescriptor = __webpack_require__(763); +var isDescriptor = __webpack_require__(765); module.exports = function defineProperty(obj, prop, val) { if (typeof obj !== 'object' && typeof obj !== 'function') { @@ -103636,14 +103851,14 @@ module.exports = function defineProperty(obj, prop, val) { /***/ }), -/* 882 */ +/* 884 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var regex = __webpack_require__(739); -var Cache = __webpack_require__(861); +var regex = __webpack_require__(741); +var Cache = __webpack_require__(863); /** * Utils @@ -103712,7 +103927,7 @@ utils.createRegex = function(str) { /***/ }), -/* 883 */ +/* 885 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -103722,16 +103937,16 @@ utils.createRegex = function(str) { * Module dependencies */ -var Snapdragon = __webpack_require__(771); -var define = __webpack_require__(881); -var extend = __webpack_require__(740); +var Snapdragon = __webpack_require__(773); +var define = __webpack_require__(883); +var extend = __webpack_require__(742); /** * Local dependencies */ -var compilers = __webpack_require__(869); -var parsers = __webpack_require__(880); +var compilers = __webpack_require__(871); +var parsers = __webpack_require__(882); /** * Customize Snapdragon parser and renderer @@ -103797,16 +104012,16 @@ module.exports = Extglob; /***/ }), -/* 884 */ +/* 886 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var extglob = __webpack_require__(868); -var nanomatch = __webpack_require__(852); -var regexNot = __webpack_require__(739); -var toRegex = __webpack_require__(840); +var extglob = __webpack_require__(870); +var nanomatch = __webpack_require__(854); +var regexNot = __webpack_require__(741); +var toRegex = __webpack_require__(842); var not; /** @@ -103887,14 +104102,14 @@ function textRegex(pattern) { /***/ }), -/* 885 */ +/* 887 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = new (__webpack_require__(861))(); +module.exports = new (__webpack_require__(863))(); /***/ }), -/* 886 */ +/* 888 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -103907,13 +104122,13 @@ var path = __webpack_require__(16); * Module dependencies */ -var Snapdragon = __webpack_require__(771); -utils.define = __webpack_require__(847); -utils.diff = __webpack_require__(865); -utils.extend = __webpack_require__(848); -utils.pick = __webpack_require__(866); -utils.typeOf = __webpack_require__(887); -utils.unique = __webpack_require__(742); +var Snapdragon = __webpack_require__(773); +utils.define = __webpack_require__(849); +utils.diff = __webpack_require__(867); +utils.extend = __webpack_require__(850); +utils.pick = __webpack_require__(868); +utils.typeOf = __webpack_require__(889); +utils.unique = __webpack_require__(744); /** * Returns true if the platform is windows, or `path.sep` is `\\`. @@ -104210,7 +104425,7 @@ utils.unixify = function(options) { /***/ }), -/* 887 */ +/* 889 */ /***/ (function(module, exports) { var toString = Object.prototype.toString; @@ -104345,7 +104560,7 @@ function isBuffer(val) { /***/ }), -/* 888 */ +/* 890 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -104364,9 +104579,9 @@ var __extends = (this && this.__extends) || (function () { }; })(); Object.defineProperty(exports, "__esModule", { value: true }); -var readdir = __webpack_require__(889); -var reader_1 = __webpack_require__(902); -var fs_stream_1 = __webpack_require__(906); +var readdir = __webpack_require__(891); +var reader_1 = __webpack_require__(904); +var fs_stream_1 = __webpack_require__(908); var ReaderAsync = /** @class */ (function (_super) { __extends(ReaderAsync, _super); function ReaderAsync() { @@ -104427,15 +104642,15 @@ exports.default = ReaderAsync; /***/ }), -/* 889 */ +/* 891 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const readdirSync = __webpack_require__(890); -const readdirAsync = __webpack_require__(898); -const readdirStream = __webpack_require__(901); +const readdirSync = __webpack_require__(892); +const readdirAsync = __webpack_require__(900); +const readdirStream = __webpack_require__(903); module.exports = exports = readdirAsyncPath; exports.readdir = exports.readdirAsync = exports.async = readdirAsyncPath; @@ -104519,7 +104734,7 @@ function readdirStreamStat (dir, options) { /***/ }), -/* 890 */ +/* 892 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -104527,11 +104742,11 @@ function readdirStreamStat (dir, options) { module.exports = readdirSync; -const DirectoryReader = __webpack_require__(891); +const DirectoryReader = __webpack_require__(893); let syncFacade = { - fs: __webpack_require__(896), - forEach: __webpack_require__(897), + fs: __webpack_require__(898), + forEach: __webpack_require__(899), sync: true }; @@ -104560,7 +104775,7 @@ function readdirSync (dir, options, internalOptions) { /***/ }), -/* 891 */ +/* 893 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -104569,9 +104784,9 @@ function readdirSync (dir, options, internalOptions) { const Readable = __webpack_require__(27).Readable; const EventEmitter = __webpack_require__(379).EventEmitter; const path = __webpack_require__(16); -const normalizeOptions = __webpack_require__(892); -const stat = __webpack_require__(894); -const call = __webpack_require__(895); +const normalizeOptions = __webpack_require__(894); +const stat = __webpack_require__(896); +const call = __webpack_require__(897); /** * Asynchronously reads the contents of a directory and streams the results @@ -104947,14 +105162,14 @@ module.exports = DirectoryReader; /***/ }), -/* 892 */ +/* 894 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const path = __webpack_require__(16); -const globToRegExp = __webpack_require__(893); +const globToRegExp = __webpack_require__(895); module.exports = normalizeOptions; @@ -105131,7 +105346,7 @@ function normalizeOptions (options, internalOptions) { /***/ }), -/* 893 */ +/* 895 */ /***/ (function(module, exports) { module.exports = function (glob, opts) { @@ -105268,13 +105483,13 @@ module.exports = function (glob, opts) { /***/ }), -/* 894 */ +/* 896 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const call = __webpack_require__(895); +const call = __webpack_require__(897); module.exports = stat; @@ -105349,7 +105564,7 @@ function symlinkStat (fs, path, lstats, callback) { /***/ }), -/* 895 */ +/* 897 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -105410,14 +105625,14 @@ function callOnce (fn) { /***/ }), -/* 896 */ +/* 898 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const fs = __webpack_require__(23); -const call = __webpack_require__(895); +const call = __webpack_require__(897); /** * A facade around {@link fs.readdirSync} that allows it to be called @@ -105481,7 +105696,7 @@ exports.lstat = function (path, callback) { /***/ }), -/* 897 */ +/* 899 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -105510,7 +105725,7 @@ function syncForEach (array, iterator, done) { /***/ }), -/* 898 */ +/* 900 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -105518,12 +105733,12 @@ function syncForEach (array, iterator, done) { module.exports = readdirAsync; -const maybe = __webpack_require__(899); -const DirectoryReader = __webpack_require__(891); +const maybe = __webpack_require__(901); +const DirectoryReader = __webpack_require__(893); let asyncFacade = { fs: __webpack_require__(23), - forEach: __webpack_require__(900), + forEach: __webpack_require__(902), async: true }; @@ -105565,7 +105780,7 @@ function readdirAsync (dir, options, callback, internalOptions) { /***/ }), -/* 899 */ +/* 901 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -105592,7 +105807,7 @@ module.exports = function maybe (cb, promise) { /***/ }), -/* 900 */ +/* 902 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -105628,7 +105843,7 @@ function asyncForEach (array, iterator, done) { /***/ }), -/* 901 */ +/* 903 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -105636,11 +105851,11 @@ function asyncForEach (array, iterator, done) { module.exports = readdirStream; -const DirectoryReader = __webpack_require__(891); +const DirectoryReader = __webpack_require__(893); let streamFacade = { fs: __webpack_require__(23), - forEach: __webpack_require__(900), + forEach: __webpack_require__(902), async: true }; @@ -105660,16 +105875,16 @@ function readdirStream (dir, options, internalOptions) { /***/ }), -/* 902 */ +/* 904 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var path = __webpack_require__(16); -var deep_1 = __webpack_require__(903); -var entry_1 = __webpack_require__(905); -var pathUtil = __webpack_require__(904); +var deep_1 = __webpack_require__(905); +var entry_1 = __webpack_require__(907); +var pathUtil = __webpack_require__(906); var Reader = /** @class */ (function () { function Reader(options) { this.options = options; @@ -105735,14 +105950,14 @@ exports.default = Reader; /***/ }), -/* 903 */ +/* 905 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var pathUtils = __webpack_require__(904); -var patternUtils = __webpack_require__(721); +var pathUtils = __webpack_require__(906); +var patternUtils = __webpack_require__(723); var DeepFilter = /** @class */ (function () { function DeepFilter(options, micromatchOptions) { this.options = options; @@ -105825,7 +106040,7 @@ exports.default = DeepFilter; /***/ }), -/* 904 */ +/* 906 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -105856,14 +106071,14 @@ exports.makeAbsolute = makeAbsolute; /***/ }), -/* 905 */ +/* 907 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var pathUtils = __webpack_require__(904); -var patternUtils = __webpack_require__(721); +var pathUtils = __webpack_require__(906); +var patternUtils = __webpack_require__(723); var EntryFilter = /** @class */ (function () { function EntryFilter(options, micromatchOptions) { this.options = options; @@ -105948,7 +106163,7 @@ exports.default = EntryFilter; /***/ }), -/* 906 */ +/* 908 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -105968,8 +106183,8 @@ var __extends = (this && this.__extends) || (function () { })(); Object.defineProperty(exports, "__esModule", { value: true }); var stream = __webpack_require__(27); -var fsStat = __webpack_require__(907); -var fs_1 = __webpack_require__(911); +var fsStat = __webpack_require__(909); +var fs_1 = __webpack_require__(913); var FileSystemStream = /** @class */ (function (_super) { __extends(FileSystemStream, _super); function FileSystemStream() { @@ -106019,14 +106234,14 @@ exports.default = FileSystemStream; /***/ }), -/* 907 */ +/* 909 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const optionsManager = __webpack_require__(908); -const statProvider = __webpack_require__(910); +const optionsManager = __webpack_require__(910); +const statProvider = __webpack_require__(912); /** * Asynchronous API. */ @@ -106057,13 +106272,13 @@ exports.statSync = statSync; /***/ }), -/* 908 */ +/* 910 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const fsAdapter = __webpack_require__(909); +const fsAdapter = __webpack_require__(911); function prepare(opts) { const options = Object.assign({ fs: fsAdapter.getFileSystemAdapter(opts ? opts.fs : undefined), @@ -106076,7 +106291,7 @@ exports.prepare = prepare; /***/ }), -/* 909 */ +/* 911 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -106099,7 +106314,7 @@ exports.getFileSystemAdapter = getFileSystemAdapter; /***/ }), -/* 910 */ +/* 912 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -106151,7 +106366,7 @@ exports.isFollowedSymlink = isFollowedSymlink; /***/ }), -/* 911 */ +/* 913 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -106182,7 +106397,7 @@ exports.default = FileSystem; /***/ }), -/* 912 */ +/* 914 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -106202,9 +106417,9 @@ var __extends = (this && this.__extends) || (function () { })(); Object.defineProperty(exports, "__esModule", { value: true }); var stream = __webpack_require__(27); -var readdir = __webpack_require__(889); -var reader_1 = __webpack_require__(902); -var fs_stream_1 = __webpack_require__(906); +var readdir = __webpack_require__(891); +var reader_1 = __webpack_require__(904); +var fs_stream_1 = __webpack_require__(908); var TransformStream = /** @class */ (function (_super) { __extends(TransformStream, _super); function TransformStream(reader) { @@ -106272,7 +106487,7 @@ exports.default = ReaderStream; /***/ }), -/* 913 */ +/* 915 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -106291,9 +106506,9 @@ var __extends = (this && this.__extends) || (function () { }; })(); Object.defineProperty(exports, "__esModule", { value: true }); -var readdir = __webpack_require__(889); -var reader_1 = __webpack_require__(902); -var fs_sync_1 = __webpack_require__(914); +var readdir = __webpack_require__(891); +var reader_1 = __webpack_require__(904); +var fs_sync_1 = __webpack_require__(916); var ReaderSync = /** @class */ (function (_super) { __extends(ReaderSync, _super); function ReaderSync() { @@ -106353,7 +106568,7 @@ exports.default = ReaderSync; /***/ }), -/* 914 */ +/* 916 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -106372,8 +106587,8 @@ var __extends = (this && this.__extends) || (function () { }; })(); Object.defineProperty(exports, "__esModule", { value: true }); -var fsStat = __webpack_require__(907); -var fs_1 = __webpack_require__(911); +var fsStat = __webpack_require__(909); +var fs_1 = __webpack_require__(913); var FileSystemSync = /** @class */ (function (_super) { __extends(FileSystemSync, _super); function FileSystemSync() { @@ -106419,7 +106634,7 @@ exports.default = FileSystemSync; /***/ }), -/* 915 */ +/* 917 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -106435,13 +106650,13 @@ exports.flatten = flatten; /***/ }), -/* 916 */ +/* 918 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var merge2 = __webpack_require__(588); +var merge2 = __webpack_require__(590); /** * Merge multiple streams and propagate their errors into one stream in parallel. */ @@ -106456,13 +106671,13 @@ exports.merge = merge; /***/ }), -/* 917 */ +/* 919 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const path = __webpack_require__(16); -const pathType = __webpack_require__(918); +const pathType = __webpack_require__(920); const getExtensions = extensions => extensions.length > 1 ? `{${extensions.join(',')}}` : extensions[0]; @@ -106528,13 +106743,13 @@ module.exports.sync = (input, opts) => { /***/ }), -/* 918 */ +/* 920 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const fs = __webpack_require__(23); -const pify = __webpack_require__(919); +const pify = __webpack_require__(921); function type(fn, fn2, fp) { if (typeof fp !== 'string') { @@ -106577,7 +106792,7 @@ exports.symlinkSync = typeSync.bind(null, 'lstatSync', 'isSymbolicLink'); /***/ }), -/* 919 */ +/* 921 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -106668,17 +106883,17 @@ module.exports = (obj, opts) => { /***/ }), -/* 920 */ +/* 922 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const fs = __webpack_require__(23); const path = __webpack_require__(16); -const fastGlob = __webpack_require__(717); -const gitIgnore = __webpack_require__(921); -const pify = __webpack_require__(922); -const slash = __webpack_require__(923); +const fastGlob = __webpack_require__(719); +const gitIgnore = __webpack_require__(923); +const pify = __webpack_require__(924); +const slash = __webpack_require__(925); const DEFAULT_IGNORE = [ '**/node_modules/**', @@ -106776,7 +106991,7 @@ module.exports.sync = options => { /***/ }), -/* 921 */ +/* 923 */ /***/ (function(module, exports) { // A simple implementation of make-array @@ -107245,7 +107460,7 @@ module.exports = options => new IgnoreBase(options) /***/ }), -/* 922 */ +/* 924 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -107320,7 +107535,7 @@ module.exports = (input, options) => { /***/ }), -/* 923 */ +/* 925 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -107338,17 +107553,17 @@ module.exports = input => { /***/ }), -/* 924 */ +/* 926 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const path = __webpack_require__(16); const {constants: fsConstants} = __webpack_require__(23); -const pEvent = __webpack_require__(925); -const CpFileError = __webpack_require__(928); -const fs = __webpack_require__(932); -const ProgressEmitter = __webpack_require__(935); +const pEvent = __webpack_require__(927); +const CpFileError = __webpack_require__(930); +const fs = __webpack_require__(934); +const ProgressEmitter = __webpack_require__(937); const cpFileAsync = async (source, destination, options, progressEmitter) => { let readError; @@ -107462,12 +107677,12 @@ module.exports.sync = (source, destination, options) => { /***/ }), -/* 925 */ +/* 927 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const pTimeout = __webpack_require__(926); +const pTimeout = __webpack_require__(928); const symbolAsyncIterator = Symbol.asyncIterator || '@@asyncIterator'; @@ -107758,12 +107973,12 @@ module.exports.iterator = (emitter, event, options) => { /***/ }), -/* 926 */ +/* 928 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const pFinally = __webpack_require__(927); +const pFinally = __webpack_require__(929); class TimeoutError extends Error { constructor(message) { @@ -107809,7 +108024,7 @@ module.exports.TimeoutError = TimeoutError; /***/ }), -/* 927 */ +/* 929 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -107831,12 +108046,12 @@ module.exports = (promise, onFinally) => { /***/ }), -/* 928 */ +/* 930 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const NestedError = __webpack_require__(929); +const NestedError = __webpack_require__(931); class CpFileError extends NestedError { constructor(message, nested) { @@ -107850,10 +108065,10 @@ module.exports = CpFileError; /***/ }), -/* 929 */ +/* 931 */ /***/ (function(module, exports, __webpack_require__) { -var inherits = __webpack_require__(930); +var inherits = __webpack_require__(932); var NestedError = function (message, nested) { this.nested = nested; @@ -107904,7 +108119,7 @@ module.exports = NestedError; /***/ }), -/* 930 */ +/* 932 */ /***/ (function(module, exports, __webpack_require__) { try { @@ -107912,12 +108127,12 @@ try { if (typeof util.inherits !== 'function') throw ''; module.exports = util.inherits; } catch (e) { - module.exports = __webpack_require__(931); + module.exports = __webpack_require__(933); } /***/ }), -/* 931 */ +/* 933 */ /***/ (function(module, exports) { if (typeof Object.create === 'function') { @@ -107946,16 +108161,16 @@ if (typeof Object.create === 'function') { /***/ }), -/* 932 */ +/* 934 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const {promisify} = __webpack_require__(29); const fs = __webpack_require__(22); -const makeDir = __webpack_require__(933); -const pEvent = __webpack_require__(925); -const CpFileError = __webpack_require__(928); +const makeDir = __webpack_require__(935); +const pEvent = __webpack_require__(927); +const CpFileError = __webpack_require__(930); const stat = promisify(fs.stat); const lstat = promisify(fs.lstat); @@ -108052,7 +108267,7 @@ exports.copyFileSync = (source, destination, flags) => { /***/ }), -/* 933 */ +/* 935 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -108060,7 +108275,7 @@ exports.copyFileSync = (source, destination, flags) => { const fs = __webpack_require__(23); const path = __webpack_require__(16); const {promisify} = __webpack_require__(29); -const semver = __webpack_require__(934); +const semver = __webpack_require__(936); const defaults = { mode: 0o777 & (~process.umask()), @@ -108209,7 +108424,7 @@ module.exports.sync = (input, options) => { /***/ }), -/* 934 */ +/* 936 */ /***/ (function(module, exports) { exports = module.exports = SemVer @@ -109811,7 +110026,7 @@ function coerce (version, options) { /***/ }), -/* 935 */ +/* 937 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -109852,7 +110067,7 @@ module.exports = ProgressEmitter; /***/ }), -/* 936 */ +/* 938 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -109898,12 +110113,12 @@ exports.default = module.exports; /***/ }), -/* 937 */ +/* 939 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const NestedError = __webpack_require__(938); +const NestedError = __webpack_require__(940); class CpyError extends NestedError { constructor(message, nested) { @@ -109917,7 +110132,7 @@ module.exports = CpyError; /***/ }), -/* 938 */ +/* 940 */ /***/ (function(module, exports, __webpack_require__) { var inherits = __webpack_require__(29).inherits; @@ -109973,14 +110188,14 @@ module.exports = NestedError; /***/ }), -/* 939 */ +/* 941 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "prepareExternalProjectDependencies", function() { return prepareExternalProjectDependencies; }); -/* harmony import */ var _utils_package_json__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(516); -/* harmony import */ var _utils_project__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(515); +/* harmony import */ var _utils_package_json__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(518); +/* harmony import */ var _utils_project__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(517); /* * Licensed to Elasticsearch B.V. under one or more contributor * license agreements. See the NOTICE file distributed with diff --git a/packages/kbn-pm/src/utils/project_checksums.ts b/packages/kbn-pm/src/utils/project_checksums.ts index 572f2adb19bd99..7d939e715d411c 100644 --- a/packages/kbn-pm/src/utils/project_checksums.ts +++ b/packages/kbn-pm/src/utils/project_checksums.ts @@ -32,7 +32,7 @@ import { Kibana } from '../utils/kibana'; export type ChecksumMap = Map; /** map of [repo relative path to changed file, type of change] */ -type Changes = Map; +type Changes = Map; const statAsync = promisify(Fs.stat); const projectBySpecificitySorter = (a: Project, b: Project) => b.path.length - a.path.length; @@ -45,7 +45,8 @@ async function getChangesForProjects(projects: ProjectMap, kbn: Kibana, log: Too 'git', [ 'ls-files', - '-dmt', + '-dmto', + '--exclude-standard', '--', ...Array.from(projects.values()) .filter(p => kbn.isPartOfRepo(p)) @@ -78,10 +79,13 @@ async function getChangesForProjects(projects: ProjectMap, kbn: Kibana, log: Too unassignedChanges.set(path, 'deleted'); break; + case '?': + unassignedChanges.set(path, 'untracked'); + break; + case 'H': case 'S': case 'K': - case '?': default: log.warning(`unexpected modification status "${tag}" for ${path}, please report this!`); unassignedChanges.set(path, 'invalid'); diff --git a/src/cli/cluster/cluster_manager.ts b/src/cli/cluster/cluster_manager.ts index a87e2aa11f2c0d..32a23d74dbda44 100644 --- a/src/cli/cluster/cluster_manager.ts +++ b/src/cli/cluster/cluster_manager.ts @@ -258,7 +258,7 @@ export class ClusterManager { ); const ignorePaths = [ - /[\\\/](\..*|node_modules|bower_components|public|__[a-z0-9_]+__|coverage)[\\\/]/, + /[\\\/](\..*|node_modules|bower_components|target|public|__[a-z0-9_]+__|coverage)([\\\/]|$)/, /\.test\.(js|ts)$/, ...pluginInternalDirsIgnore, fromRoot('src/legacy/server/sass/__tmp__'), diff --git a/src/core/server/mocks.ts b/src/core/server/mocks.ts index 2451b98ffdf29d..c707fa2b479e46 100644 --- a/src/core/server/mocks.ts +++ b/src/core/server/mocks.ts @@ -18,7 +18,7 @@ */ import { of } from 'rxjs'; import { duration } from 'moment'; -import { PluginInitializerContext, CoreSetup, CoreStart } from '.'; +import { PluginInitializerContext, CoreSetup, CoreStart, StartServicesAccessor } from '.'; import { CspConfig } from './csp'; import { loggingServiceMock } from './logging/logging_service.mock'; import { elasticsearchServiceMock } from './elasticsearch/elasticsearch_service.mock'; @@ -100,7 +100,9 @@ function pluginInitializerContextMock(config: T = {} as T) { return mock; } -type CoreSetupMockType = MockedKeys & jest.Mocked>; +type CoreSetupMockType = MockedKeys & { + getStartServices: jest.MockedFunction>; +}; function createCoreSetupMock({ pluginStartDeps = {}, diff --git a/src/dev/build/tasks/build_kibana_platform_plugins.js b/src/dev/build/tasks/build_kibana_platform_plugins.js index 79cd698e4782c8..28d6b49f9e89a8 100644 --- a/src/dev/build/tasks/build_kibana_platform_plugins.js +++ b/src/dev/build/tasks/build_kibana_platform_plugins.js @@ -17,7 +17,13 @@ * under the License. */ -import { runOptimizer, OptimizerConfig, logOptimizerState } from '@kbn/optimizer'; +import { CiStatsReporter } from '@kbn/dev-utils'; +import { + runOptimizer, + OptimizerConfig, + logOptimizerState, + reportOptimizerStats, +} from '@kbn/optimizer'; export const BuildKibanaPlatformPluginsTask = { description: 'Building distributable versions of Kibana platform plugins', @@ -32,8 +38,14 @@ export const BuildKibanaPlatformPluginsTask = { includeCoreBundle: true, }); + const reporter = CiStatsReporter.fromEnv(log); + const reportStatsName = build.isOss() ? 'oss distributable' : 'default distributable'; + await runOptimizer(optimizerConfig) - .pipe(logOptimizerState(log, optimizerConfig)) + .pipe( + reportOptimizerStats(reporter, reportStatsName), + logOptimizerState(log, optimizerConfig) + ) .toPromise(); }, }; diff --git a/src/dev/build/tasks/os_packages/docker_generator/resources/bin/kibana-docker b/src/dev/build/tasks/os_packages/docker_generator/resources/bin/kibana-docker index eb7a121c2e64b2..d1fb544de733c3 100755 --- a/src/dev/build/tasks/os_packages/docker_generator/resources/bin/kibana-docker +++ b/src/dev/build/tasks/os_packages/docker_generator/resources/bin/kibana-docker @@ -234,6 +234,7 @@ kibana_vars=( xpack.security.session.idleTimeout xpack.security.session.lifespan xpack.security.loginAssistanceMessage + xpack.security.loginHelp telemetry.allowChangingOptInStatus telemetry.enabled telemetry.optIn diff --git a/src/dev/precommit_hook/casing_check_config.js b/src/dev/precommit_hook/casing_check_config.js index fc95288eabed85..66296736b3ad04 100644 --- a/src/dev/precommit_hook/casing_check_config.js +++ b/src/dev/precommit_hook/casing_check_config.js @@ -117,7 +117,6 @@ export const TEMPORARILY_IGNORED_PATHS = [ 'src/legacy/core_plugins/tile_map/public/__tests__/shadedCircleMarkers.png', 'src/legacy/core_plugins/tile_map/public/__tests__/shadedGeohashGrid.png', 'src/fixtures/config_upgrade_from_4.0.0_to_4.0.1-snapshot.json', - 'src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/terms/_seriesMultiple.js', 'src/core/server/core_app/assets/favicons/android-chrome-192x192.png', 'src/core/server/core_app/assets/favicons/android-chrome-256x256.png', 'src/core/server/core_app/assets/favicons/android-chrome-512x512.png', diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/_vis_fixture.js b/src/legacy/core_plugins/kibana/public/__tests__/vis_type_vislib/_vis_fixture.js similarity index 82% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/_vis_fixture.js rename to src/legacy/core_plugins/kibana/public/__tests__/vis_type_vislib/_vis_fixture.js index 05cea7addf560d..8a542fec0639c3 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/_vis_fixture.js +++ b/src/legacy/core_plugins/kibana/public/__tests__/vis_type_vislib/_vis_fixture.js @@ -20,13 +20,10 @@ import _ from 'lodash'; import $ from 'jquery'; -import { Vis } from '../../../vis'; +import { Vis } from '../../../../../../plugins/vis_type_vislib/public/vislib/vis'; // TODO: Remove when converted to jest mocks -import { - ColorsService, - // eslint-disable-next-line @kbn/eslint/no-restricted-paths -} from '../../../../../../../../plugins/charts/public/services'; +import { ColorsService } from '../../../../../../plugins/charts/public/services'; const $visCanvas = $('
') .attr('id', 'vislib-vis-fixtures') @@ -72,17 +69,6 @@ const getDeps = () => { }; }; -export const getMockUiState = () => { - const map = new Map(); - - return (() => ({ - get: (...args) => map.get(...args), - set: (...args) => map.set(...args), - setSilent: (...args) => map.set(...args), - on: () => undefined, - }))(); -}; - export function getVis(visLibParams, element) { return new Vis( element || $visCanvas.new(), diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/chart_title.js b/src/legacy/core_plugins/kibana/public/__tests__/vis_type_vislib/lib/chart_title.js similarity index 91% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/chart_title.js rename to src/legacy/core_plugins/kibana/public/__tests__/vis_type_vislib/lib/chart_title.js index b65571becd83c6..81fef155daf57e 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/chart_title.js +++ b/src/legacy/core_plugins/kibana/public/__tests__/vis_type_vislib/lib/chart_title.js @@ -21,9 +21,9 @@ import d3 from 'd3'; import _ from 'lodash'; import expect from '@kbn/expect'; -import { ChartTitle } from '../../lib/chart_title'; -import { VisConfig } from '../../lib/vis_config'; -import { getMockUiState } from './fixtures/_vis_fixture'; +import { ChartTitle } from '../../../../../../../plugins/vis_type_vislib/public/vislib/lib/chart_title'; +import { VisConfig } from '../../../../../../../plugins/vis_type_vislib/public/vislib/lib/vis_config'; +import { getMockUiState } from '../../../../../../../plugins/vis_type_vislib/public/fixtures/mocks'; describe('Vislib ChartTitle Class Test Suite', function() { let mockUiState; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/dispatch.js b/src/legacy/core_plugins/kibana/public/__tests__/vis_type_vislib/lib/dispatch.js similarity index 96% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/dispatch.js rename to src/legacy/core_plugins/kibana/public/__tests__/vis_type_vislib/lib/dispatch.js index a5d8eb80419a11..eb4e109690c37f 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/dispatch.js +++ b/src/legacy/core_plugins/kibana/public/__tests__/vis_type_vislib/lib/dispatch.js @@ -22,9 +22,10 @@ import d3 from 'd3'; import expect from '@kbn/expect'; // Data -import data from './fixtures/mock_data/date_histogram/_series'; +import data from '../../../../../../../plugins/vis_type_vislib/public/fixtures/mock_data/date_histogram/_series'; -import { getVis, getMockUiState } from './fixtures/_vis_fixture'; +import { getMockUiState } from '../../../../../../../plugins/vis_type_vislib/public/fixtures/mocks'; +import { getVis } from '../_vis_fixture'; describe('Vislib Dispatch Class Test Suite', function() { function destroyVis(vis) { diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/handler/handler.js b/src/legacy/core_plugins/kibana/public/__tests__/vis_type_vislib/lib/handler/handler.js similarity index 86% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/handler/handler.js rename to src/legacy/core_plugins/kibana/public/__tests__/vis_type_vislib/lib/handler/handler.js index 8e25015c101860..27f7f4ed3e0732 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/handler/handler.js +++ b/src/legacy/core_plugins/kibana/public/__tests__/vis_type_vislib/lib/handler/handler.js @@ -21,12 +21,12 @@ import expect from '@kbn/expect'; import $ from 'jquery'; // Data -import series from '../fixtures/mock_data/date_histogram/_series'; -import columns from '../fixtures/mock_data/date_histogram/_columns'; -import rows from '../fixtures/mock_data/date_histogram/_rows'; -import stackedSeries from '../fixtures/mock_data/date_histogram/_stacked_series'; - -import { getVis, getMockUiState } from '../fixtures/_vis_fixture'; +import series from '../../../../../../../../plugins/vis_type_vislib/public/fixtures/mock_data/date_histogram/_series'; +import columns from '../../../../../../../../plugins/vis_type_vislib/public/fixtures/mock_data/date_histogram/_columns'; +import rows from '../../../../../../../../plugins/vis_type_vislib/public/fixtures/mock_data/date_histogram/_rows'; +import stackedSeries from '../../../../../../../../plugins/vis_type_vislib/public/fixtures/mock_data/date_histogram/_stacked_series'; +import { getMockUiState } from '../../../../../../../../plugins/vis_type_vislib/public/fixtures/mocks'; +import { getVis } from '../../_vis_fixture'; const dateHistogramArray = [series, columns, rows, stackedSeries]; const names = ['series', 'columns', 'rows', 'stackedSeries']; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/layout/layout.js b/src/legacy/core_plugins/kibana/public/__tests__/vis_type_vislib/lib/layout/layout.js similarity index 85% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/layout/layout.js rename to src/legacy/core_plugins/kibana/public/__tests__/vis_type_vislib/lib/layout/layout.js index f72794e27e834a..505b0a04c61837 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/layout/layout.js +++ b/src/legacy/core_plugins/kibana/public/__tests__/vis_type_vislib/lib/layout/layout.js @@ -22,14 +22,14 @@ import expect from '@kbn/expect'; import $ from 'jquery'; // Data -import series from '../fixtures/mock_data/date_histogram/_series'; -import columns from '../fixtures/mock_data/date_histogram/_columns'; -import rows from '../fixtures/mock_data/date_histogram/_rows'; -import stackedSeries from '../fixtures/mock_data/date_histogram/_stacked_series'; - -import { Layout } from '../../../lib/layout/layout'; -import { getVis, getMockUiState } from '../fixtures/_vis_fixture'; -import { VisConfig } from '../../../lib/vis_config'; +import series from '../../../../../../../../plugins/vis_type_vislib/public/fixtures/mock_data/date_histogram/_series'; +import columns from '../../../../../../../../plugins/vis_type_vislib/public/fixtures/mock_data/date_histogram/_columns'; +import rows from '../../../../../../../../plugins/vis_type_vislib/public/fixtures/mock_data/date_histogram/_rows'; +import stackedSeries from '../../../../../../../../plugins/vis_type_vislib/public/fixtures/mock_data/date_histogram/_stacked_series'; +import { getMockUiState } from '../../../../../../../../plugins/vis_type_vislib/public/fixtures/mocks'; +import { Layout } from '../../../../../../../../plugins/vis_type_vislib/public/vislib/lib/layout/layout'; +import { VisConfig } from '../../../../../../../../plugins/vis_type_vislib/public/vislib/lib/vis_config'; +import { getVis } from '../../_vis_fixture'; const dateHistogramArray = [series, columns, rows, stackedSeries]; const names = ['series', 'columns', 'rows', 'stackedSeries']; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/vis.js b/src/legacy/core_plugins/kibana/public/__tests__/vis_type_vislib/vis.js similarity index 92% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/vis.js rename to src/legacy/core_plugins/kibana/public/__tests__/vis_type_vislib/vis.js index 4852f71d8c45b3..67f29ee96a3364 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/vis.js +++ b/src/legacy/core_plugins/kibana/public/__tests__/vis_type_vislib/vis.js @@ -21,11 +21,12 @@ import _ from 'lodash'; import $ from 'jquery'; import expect from '@kbn/expect'; -import series from './lib/fixtures/mock_data/date_histogram/_series'; -import columns from './lib/fixtures/mock_data/date_histogram/_columns'; -import rows from './lib/fixtures/mock_data/date_histogram/_rows'; -import stackedSeries from './lib/fixtures/mock_data/date_histogram/_stacked_series'; -import { getVis, getMockUiState } from './lib/fixtures/_vis_fixture'; +import series from '../../../../../../plugins/vis_type_vislib/public/fixtures/mock_data/date_histogram/_series'; +import columns from '../../../../../../plugins/vis_type_vislib/public/fixtures/mock_data/date_histogram/_columns'; +import rows from '../../../../../../plugins/vis_type_vislib/public/fixtures/mock_data/date_histogram/_rows'; +import stackedSeries from '../../../../../../plugins/vis_type_vislib/public/fixtures/mock_data/date_histogram/_stacked_series'; +import { getMockUiState } from '../../../../../../plugins/vis_type_vislib/public/fixtures/mocks'; +import { getVis } from './_vis_fixture'; const dataArray = [series, columns, rows, stackedSeries]; const names = ['series', 'columns', 'rows', 'stackedSeries']; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/visualizations/area_chart.js b/src/legacy/core_plugins/kibana/public/__tests__/vis_type_vislib/visualizations/area_chart.js similarity index 89% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/visualizations/area_chart.js rename to src/legacy/core_plugins/kibana/public/__tests__/vis_type_vislib/visualizations/area_chart.js index c3f5859eb454cc..eb529c380cdda4 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/visualizations/area_chart.js +++ b/src/legacy/core_plugins/kibana/public/__tests__/vis_type_vislib/visualizations/area_chart.js @@ -22,15 +22,16 @@ import _ from 'lodash'; import $ from 'jquery'; import expect from '@kbn/expect'; -import { getVis, getMockUiState } from '../lib/fixtures/_vis_fixture'; +import { getMockUiState } from '../../../../../../../plugins/vis_type_vislib/public/fixtures/mocks'; +import { getVis } from '../_vis_fixture'; const dataTypesArray = { - 'series pos': require('../lib/fixtures/mock_data/date_histogram/_series'), - 'series pos neg': require('../lib/fixtures/mock_data/date_histogram/_series_pos_neg'), - 'series neg': require('../lib/fixtures/mock_data/date_histogram/_series_neg'), - 'term columns': require('../lib/fixtures/mock_data/terms/_columns'), - 'range rows': require('../lib/fixtures/mock_data/range/_rows'), - stackedSeries: require('../lib/fixtures/mock_data/date_histogram/_stacked_series'), + 'series pos': require('../../../../../../../plugins/vis_type_vislib/public/fixtures/mock_data/date_histogram/_series'), + 'series pos neg': require('../../../../../../../plugins/vis_type_vislib/public/fixtures/mock_data/date_histogram/_series_pos_neg'), + 'series neg': require('../../../../../../../plugins/vis_type_vislib/public/fixtures/mock_data/date_histogram/_series_neg'), + 'term columns': require('../../../../../../../plugins/vis_type_vislib/public/fixtures/mock_data/terms/_columns'), + 'range rows': require('../../../../../../../plugins/vis_type_vislib/public/fixtures/mock_data/range/_rows'), + stackedSeries: require('../../../../../../../plugins/vis_type_vislib/public/fixtures/mock_data/date_histogram/_stacked_series'), }; const visLibParams = { diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/visualizations/chart.js b/src/legacy/core_plugins/kibana/public/__tests__/vis_type_vislib/visualizations/chart.js similarity index 92% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/visualizations/chart.js rename to src/legacy/core_plugins/kibana/public/__tests__/vis_type_vislib/visualizations/chart.js index 9653f9abab6fb8..4c5e3db3162430 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/visualizations/chart.js +++ b/src/legacy/core_plugins/kibana/public/__tests__/vis_type_vislib/visualizations/chart.js @@ -20,8 +20,9 @@ import d3 from 'd3'; import expect from '@kbn/expect'; -import { Chart } from '../../visualizations/_chart'; -import { getVis, getMockUiState } from '../lib/fixtures/_vis_fixture'; +import { Chart } from '../../../../../../../plugins/vis_type_vislib/public/vislib/visualizations/_chart'; +import { getMockUiState } from '../../../../../../../plugins/vis_type_vislib/public/fixtures/mocks'; +import { getVis } from '../_vis_fixture'; describe('Vislib _chart Test Suite', function() { let vis; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/visualizations/column_chart.js b/src/legacy/core_plugins/kibana/public/__tests__/vis_type_vislib/visualizations/column_chart.js similarity index 89% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/visualizations/column_chart.js rename to src/legacy/core_plugins/kibana/public/__tests__/vis_type_vislib/visualizations/column_chart.js index 2216294fcbac11..5cbd5948bc477a 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/visualizations/column_chart.js +++ b/src/legacy/core_plugins/kibana/public/__tests__/vis_type_vislib/visualizations/column_chart.js @@ -23,17 +23,18 @@ import $ from 'jquery'; import expect from '@kbn/expect'; // Data -import series from '../lib/fixtures/mock_data/date_histogram/_series'; -import seriesPosNeg from '../lib/fixtures/mock_data/date_histogram/_series_pos_neg'; -import seriesNeg from '../lib/fixtures/mock_data/date_histogram/_series_neg'; -import termsColumns from '../lib/fixtures/mock_data/terms/_columns'; -import histogramRows from '../lib/fixtures/mock_data/histogram/_rows'; -import stackedSeries from '../lib/fixtures/mock_data/date_histogram/_stacked_series'; - -import { seriesMonthlyInterval } from '../lib/fixtures/mock_data/date_histogram/_series_monthly_interval'; -import { rowsSeriesWithHoles } from '../lib/fixtures/mock_data/date_histogram/_rows_series_with_holes'; -import rowsWithZeros from '../lib/fixtures/mock_data/date_histogram/_rows'; -import { getVis, getMockUiState } from '../lib/fixtures/_vis_fixture'; +import series from '../../../../../../../plugins/vis_type_vislib/public/fixtures/mock_data/date_histogram/_series'; +import seriesPosNeg from '../../../../../../../plugins/vis_type_vislib/public/fixtures/mock_data/date_histogram/_series_pos_neg'; +import seriesNeg from '../../../../../../../plugins/vis_type_vislib/public/fixtures/mock_data/date_histogram/_series_neg'; +import termsColumns from '../../../../../../../plugins/vis_type_vislib/public/fixtures/mock_data/terms/_columns'; +import histogramRows from '../../../../../../../plugins/vis_type_vislib/public/fixtures/mock_data/histogram/_rows'; +import stackedSeries from '../../../../../../../plugins/vis_type_vislib/public/fixtures/mock_data/date_histogram/_stacked_series'; + +import { seriesMonthlyInterval } from '../../../../../../../plugins/vis_type_vislib/public/fixtures/mock_data/date_histogram/_series_monthly_interval'; +import { rowsSeriesWithHoles } from '../../../../../../../plugins/vis_type_vislib/public/fixtures/mock_data/date_histogram/_rows_series_with_holes'; +import rowsWithZeros from '../../../../../../../plugins/vis_type_vislib/public/fixtures/mock_data/date_histogram/_rows'; +import { getMockUiState } from '../../../../../../../plugins/vis_type_vislib/public/fixtures/mocks'; +import { getVis } from '../_vis_fixture'; // tuple, with the format [description, mode, data] const dataTypesArray = [ diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/visualizations/gauge_chart.js b/src/legacy/core_plugins/kibana/public/__tests__/vis_type_vislib/visualizations/gauge_chart.js similarity index 94% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/visualizations/gauge_chart.js rename to src/legacy/core_plugins/kibana/public/__tests__/vis_type_vislib/visualizations/gauge_chart.js index fe25734fcbfde5..d8ce8f1f5f44bf 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/visualizations/gauge_chart.js +++ b/src/legacy/core_plugins/kibana/public/__tests__/vis_type_vislib/visualizations/gauge_chart.js @@ -21,8 +21,9 @@ import $ from 'jquery'; import _ from 'lodash'; import expect from '@kbn/expect'; -import data from '../lib/fixtures/mock_data/terms/_seriesMultiple'; -import { getVis, getMockUiState } from '../lib/fixtures/_vis_fixture'; +import data from '../../../../../../../plugins/vis_type_vislib/public/fixtures/mock_data/terms/_series_multiple'; +import { getMockUiState } from '../../../../../../../plugins/vis_type_vislib/public/fixtures/mocks'; +import { getVis } from '../_vis_fixture'; describe('Vislib Gauge Chart Test Suite', function() { let vis; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/visualizations/heatmap_chart.js b/src/legacy/core_plugins/kibana/public/__tests__/vis_type_vislib/visualizations/heatmap_chart.js similarity index 89% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/visualizations/heatmap_chart.js rename to src/legacy/core_plugins/kibana/public/__tests__/vis_type_vislib/visualizations/heatmap_chart.js index f4c952be191deb..765b9118e68445 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/visualizations/heatmap_chart.js +++ b/src/legacy/core_plugins/kibana/public/__tests__/vis_type_vislib/visualizations/heatmap_chart.js @@ -23,13 +23,13 @@ import d3 from 'd3'; import expect from '@kbn/expect'; // Data -import series from '../lib/fixtures/mock_data/date_histogram/_series'; -import seriesPosNeg from '../lib/fixtures/mock_data/date_histogram/_series_pos_neg'; -import seriesNeg from '../lib/fixtures/mock_data/date_histogram/_series_neg'; -import termsColumns from '../lib/fixtures/mock_data/terms/_columns'; -import stackedSeries from '../lib/fixtures/mock_data/date_histogram/_stacked_series'; - -import { getVis, getMockUiState } from '../lib/fixtures/_vis_fixture'; +import series from '../../../../../../../plugins/vis_type_vislib/public/fixtures/mock_data/date_histogram/_series'; +import seriesPosNeg from '../../../../../../../plugins/vis_type_vislib/public/fixtures/mock_data/date_histogram/_series_pos_neg'; +import seriesNeg from '../../../../../../../plugins/vis_type_vislib/public/fixtures/mock_data/date_histogram/_series_neg'; +import termsColumns from '../../../../../../../plugins/vis_type_vislib/public/fixtures/mock_data/terms/_columns'; +import stackedSeries from '../../../../../../../plugins/vis_type_vislib/public/fixtures/mock_data/date_histogram/_stacked_series'; +import { getMockUiState } from '../../../../../../../plugins/vis_type_vislib/public/fixtures/mocks'; +import { getVis } from '../_vis_fixture'; // tuple, with the format [description, mode, data] const dataTypesArray = [ diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/visualizations/line_chart.js b/src/legacy/core_plugins/kibana/public/__tests__/vis_type_vislib/visualizations/line_chart.js similarity index 89% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/visualizations/line_chart.js rename to src/legacy/core_plugins/kibana/public/__tests__/vis_type_vislib/visualizations/line_chart.js index 1269fe7bcf62e9..691417e968eedb 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/visualizations/line_chart.js +++ b/src/legacy/core_plugins/kibana/public/__tests__/vis_type_vislib/visualizations/line_chart.js @@ -23,14 +23,14 @@ import $ from 'jquery'; import _ from 'lodash'; // Data -import seriesPos from '../lib/fixtures/mock_data/date_histogram/_series'; -import seriesPosNeg from '../lib/fixtures/mock_data/date_histogram/_series_pos_neg'; -import seriesNeg from '../lib/fixtures/mock_data/date_histogram/_series_neg'; -import histogramColumns from '../lib/fixtures/mock_data/histogram/_columns'; -import rangeRows from '../lib/fixtures/mock_data/range/_rows'; -import termSeries from '../lib/fixtures/mock_data/terms/_series'; - -import { getVis, getMockUiState } from '../lib/fixtures/_vis_fixture'; +import seriesPos from '../../../../../../../plugins/vis_type_vislib/public/fixtures/mock_data/date_histogram/_series'; +import seriesPosNeg from '../../../../../../../plugins/vis_type_vislib/public/fixtures/mock_data/date_histogram/_series_pos_neg'; +import seriesNeg from '../../../../../../../plugins/vis_type_vislib/public/fixtures/mock_data/date_histogram/_series_neg'; +import histogramColumns from '../../../../../../../plugins/vis_type_vislib/public/fixtures/mock_data/histogram/_columns'; +import rangeRows from '../../../../../../../plugins/vis_type_vislib/public/fixtures/mock_data/range/_rows'; +import termSeries from '../../../../../../../plugins/vis_type_vislib/public/fixtures/mock_data/terms/_series'; +import { getMockUiState } from '../../../../../../../plugins/vis_type_vislib/public/fixtures/mocks'; +import { getVis } from '../_vis_fixture'; const dataTypes = [ ['series pos', seriesPos], diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/visualizations/pie_chart.js b/src/legacy/core_plugins/kibana/public/__tests__/vis_type_vislib/visualizations/pie_chart.js similarity index 97% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/visualizations/pie_chart.js rename to src/legacy/core_plugins/kibana/public/__tests__/vis_type_vislib/visualizations/pie_chart.js index caafb2c636271a..506ad2af85c34d 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/visualizations/pie_chart.js +++ b/src/legacy/core_plugins/kibana/public/__tests__/vis_type_vislib/visualizations/pie_chart.js @@ -22,7 +22,8 @@ import _ from 'lodash'; import $ from 'jquery'; import expect from '@kbn/expect'; -import { getVis, getMockUiState } from '../lib/fixtures/_vis_fixture'; +import { getMockUiState } from '../../../../../../../plugins/vis_type_vislib/public/fixtures/mocks'; +import { getVis } from '../_vis_fixture'; import { pieChartMockData } from './pie_chart_mock_data'; const names = ['rows', 'columns', 'slices']; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/visualizations/pie_chart_mock_data.js b/src/legacy/core_plugins/kibana/public/__tests__/vis_type_vislib/visualizations/pie_chart_mock_data.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/visualizations/pie_chart_mock_data.js rename to src/legacy/core_plugins/kibana/public/__tests__/vis_type_vislib/visualizations/pie_chart_mock_data.js diff --git a/src/legacy/core_plugins/kibana/public/index.scss b/src/legacy/core_plugins/kibana/public/index.scss index d49c59970f521d..26805554370b96 100644 --- a/src/legacy/core_plugins/kibana/public/index.scss +++ b/src/legacy/core_plugins/kibana/public/index.scss @@ -7,16 +7,9 @@ // Public UI styles @import 'src/legacy/ui/public/index'; -// vis_type_vislib UI styles -@import 'src/legacy/core_plugins/vis_type_vislib/public/index'; - // Discover styles @import 'discover/index'; -// Visualization styles are imported here for running karma Browser tests -// should be somehow included through the "visualizations" plugin initialization -@import '../../../../plugins/visualizations/public/index'; - // Has to come after visualize because of some // bad cascading in the Editor layout @import '../../../../plugins/maps_legacy/public/index'; diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/create_edit_field/create_edit_field.tsx b/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/create_edit_field/create_edit_field.tsx index 4839870f0f3c8a..564f115cf2c487 100644 --- a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/create_edit_field/create_edit_field.tsx +++ b/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/create_edit_field/create_edit_field.tsx @@ -23,6 +23,7 @@ import { FieldEditor } from 'ui/field_editor'; import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; +import { HttpStart, DocLinksStart } from 'src/core/public'; import { IndexHeader } from '../index_header'; import { IndexPattern, IndexPatternField } from '../../../../../../../../../plugins/data/public'; import { ChromeDocTitle, NotificationsStart } from '../../../../../../../../../core/public'; @@ -37,7 +38,8 @@ interface CreateEditFieldProps extends RouteComponentProps { services: { notifications: NotificationsStart; docTitle: ChromeDocTitle; - http: Function; + getHttpStart: () => HttpStart; + docLinksScriptedFields: DocLinksStart['links']['scriptedFields']; }; } @@ -68,16 +70,14 @@ export const CreateEditField = withRouter( const url = `/management/kibana/index_patterns/${indexPattern.id}`; - if (mode === 'edit') { - if (!field) { - const message = i18n.translate('kbn.management.editIndexPattern.scripted.noFieldLabel', { - defaultMessage: - "'{indexPatternTitle}' index pattern doesn't have a scripted field called '{fieldName}'", - values: { indexPatternTitle: indexPattern.title, fieldName }, - }); - services.notifications.toasts.addWarning(message); - history.push(url); - } + if (mode === 'edit' && !field) { + const message = i18n.translate('kbn.management.editIndexPattern.scripted.noFieldLabel', { + defaultMessage: + "'{indexPatternTitle}' index pattern doesn't have a scripted field called '{fieldName}'", + values: { indexPatternTitle: indexPattern.title, fieldName }, + }); + services.notifications.toasts.addWarning(message); + history.push(url); } const docFieldName = field?.name || newFieldPlaceholder; @@ -88,24 +88,29 @@ export const CreateEditField = withRouter( history.push(`${url}?_a=(tab:${field?.scripted ? TAB_SCRIPTED_FIELDS : TAB_INDEXED_FIELDS})`); }; - return ( - - - - - - - - - ); + if (field) { + return ( + + + + + + + + + ); + } else { + return <>; + } } ); diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/index.js b/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/index.js index e05aea3678fe20..e2f387c0291a7a 100644 --- a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/index.js +++ b/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/index.js @@ -95,7 +95,7 @@ uiModules // routes for create edit field. Will be removed after migartion all component to react. const REACT_FIELD_EDITOR_ID = 'reactFieldEditor'; -const renderCreateEditField = ($scope, $route, getConfig, $http, fieldFormatEditors) => { +const renderCreateEditField = ($scope, $route, getConfig, fieldFormatEditors) => { $scope.$$postDigest(() => { const node = document.getElementById(REACT_FIELD_EDITOR_ID); if (!node) { @@ -112,9 +112,10 @@ const renderCreateEditField = ($scope, $route, getConfig, $http, fieldFormatEdit fieldFormatEditors={fieldFormatEditors} getConfig={getConfig} services={{ - http: $http, + getHttpStart: () => npStart.core.http, notifications: npStart.core.notifications, docTitle: npStart.core.chrome.docTitle, + docLinksScriptedFields: npStart.core.docLinks.links.scriptedFields, }} /> @@ -162,11 +163,11 @@ uiRoutes }, }, controllerAs: 'fieldSettings', - controller: function FieldEditorPageController($scope, $route, $http, Private, config) { + controller: function FieldEditorPageController($scope, $route, Private, config) { const getConfig = (...args) => config.get(...args); const fieldFormatEditors = Private(RegistryFieldFormatEditorsProvider); - renderCreateEditField($scope, $route, getConfig, $http, fieldFormatEditors); + renderCreateEditField($scope, $route, getConfig, fieldFormatEditors); $scope.$on('$destroy', () => { destroyCreateEditField(); diff --git a/src/legacy/core_plugins/tests_bundle/index.js b/src/legacy/core_plugins/tests_bundle/index.js index e1966a9e8b2667..3348096c0e2f1e 100644 --- a/src/legacy/core_plugins/tests_bundle/index.js +++ b/src/legacy/core_plugins/tests_bundle/index.js @@ -18,6 +18,7 @@ */ import { createReadStream } from 'fs'; +import { resolve } from 'path'; import globby from 'globby'; import MultiStream from 'multistream'; @@ -40,6 +41,7 @@ export default kibana => { }, uiExports: { + styleSheetPaths: resolve(__dirname, 'public/index.scss'), async __bundleProvider__(kbnServer) { const modules = new Set(); diff --git a/src/legacy/core_plugins/tests_bundle/public/index.scss b/src/legacy/core_plugins/tests_bundle/public/index.scss new file mode 100644 index 00000000000000..8020cef8d84927 --- /dev/null +++ b/src/legacy/core_plugins/tests_bundle/public/index.scss @@ -0,0 +1,6 @@ +@import 'src/legacy/ui/public/styles/styling_constants'; + +// This file pulls some styles of NP plugins into the legacy test stylesheet +// so they are available for karma browser tests. +@import '../../../../plugins/vis_type_vislib/public/index'; +@import '../../../../plugins/visualizations/public/index'; diff --git a/src/legacy/core_plugins/vis_type_vislib/index.ts b/src/legacy/core_plugins/vis_type_vislib/index.ts deleted file mode 100644 index da9476285a9b2e..00000000000000 --- a/src/legacy/core_plugins/vis_type_vislib/index.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { resolve } from 'path'; -import { Legacy } from 'kibana'; - -import { LegacyPluginApi, LegacyPluginInitializer } from '../../types'; - -const visTypeVislibPluginInitializer: LegacyPluginInitializer = ({ Plugin }: LegacyPluginApi) => - new Plugin({ - id: 'vis_type_vislib', - require: ['kibana', 'elasticsearch', 'interpreter'], - publicDir: resolve(__dirname, 'public'), - styleSheetPaths: resolve(__dirname, 'public/index.scss'), - uiExports: { - hacks: [resolve(__dirname, 'public/legacy')], - injectDefaultVars: server => ({}), - }, - init: (server: Legacy.Server) => ({}), - config(Joi: any) { - return Joi.object({ - enabled: Joi.boolean().default(true), - }).default(); - }, - } as Legacy.PluginSpecOptions); - -// eslint-disable-next-line import/no-default-export -export default visTypeVislibPluginInitializer; diff --git a/src/legacy/core_plugins/vis_type_vislib/package.json b/src/legacy/core_plugins/vis_type_vislib/package.json deleted file mode 100644 index e30a9e2b358342..00000000000000 --- a/src/legacy/core_plugins/vis_type_vislib/package.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "vis_type_vislib", - "version": "kibana" -} diff --git a/src/legacy/core_plugins/vis_type_vislib/public/legacy.ts b/src/legacy/core_plugins/vis_type_vislib/public/legacy.ts deleted file mode 100644 index 579caa1cb88f67..00000000000000 --- a/src/legacy/core_plugins/vis_type_vislib/public/legacy.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { npSetup, npStart } from 'ui/new_platform'; -import { PluginInitializerContext } from 'kibana/public'; - -import { plugin } from '.'; -import { - VisTypeVislibPluginSetupDependencies, - VisTypeVislibPluginStartDependencies, -} from './plugin'; - -const setupPlugins: Readonly = { - expressions: npSetup.plugins.expressions, - visualizations: npSetup.plugins.visualizations, - charts: npSetup.plugins.charts, - visTypeXy: npSetup.plugins.visTypeXy, -}; - -const startPlugins: Readonly = { - data: npStart.plugins.data, -}; - -const pluginInstance = plugin({} as PluginInitializerContext); - -export const setup = pluginInstance.setup(npSetup.core, setupPlugins); -export const start = pluginInstance.start(npStart.core, startPlugins); diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/date_histogram/_columns.js b/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/date_histogram/_columns.js deleted file mode 100644 index b5b14c279b40e0..00000000000000 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/date_histogram/_columns.js +++ /dev/null @@ -1,300 +0,0 @@ -import moment from 'moment'; - -export default { - 'columns': [ - { - 'label': '200: response', - 'xAxisLabel': '@timestamp per 30 sec', - 'ordered': { - 'date': true, - 'interval': 30000, - 'min': 1415826608440, - 'max': 1415827508440 - }, - 'yAxisLabel': 'Count of documents', - 'xAxisFormatter': function (thing) { - return moment(thing); - }, - 'tooltipFormatter': function (d) { - return d; - }, - 'series': [ - { - 'label': 'Count', - 'values': [ - { - 'x': 1415826600000, - 'y': 4 - }, - { - 'x': 1415826630000, - 'y': 8 - }, - { - 'x': 1415826660000, - 'y': 7 - }, - { - 'x': 1415826690000, - 'y': 5 - }, - { - 'x': 1415826720000, - 'y': 5 - }, - { - 'x': 1415826750000, - 'y': 4 - }, - { - 'x': 1415826780000, - 'y': 10 - }, - { - 'x': 1415826810000, - 'y': 7 - }, - { - 'x': 1415826840000, - 'y': 9 - }, - { - 'x': 1415826870000, - 'y': 8 - }, - { - 'x': 1415826900000, - 'y': 9 - }, - { - 'x': 1415826930000, - 'y': 8 - }, - { - 'x': 1415826960000, - 'y': 3 - }, - { - 'x': 1415826990000, - 'y': 9 - }, - { - 'x': 1415827020000, - 'y': 6 - }, - { - 'x': 1415827050000, - 'y': 8 - }, - { - 'x': 1415827080000, - 'y': 7 - }, - { - 'x': 1415827110000, - 'y': 4 - }, - { - 'x': 1415827140000, - 'y': 6 - }, - { - 'x': 1415827170000, - 'y': 10 - }, - { - 'x': 1415827200000, - 'y': 2 - }, - { - 'x': 1415827230000, - 'y': 8 - }, - { - 'x': 1415827260000, - 'y': 5 - }, - { - 'x': 1415827290000, - 'y': 6 - }, - { - 'x': 1415827320000, - 'y': 6 - }, - { - 'x': 1415827350000, - 'y': 10 - }, - { - 'x': 1415827380000, - 'y': 6 - }, - { - 'x': 1415827410000, - 'y': 6 - }, - { - 'x': 1415827440000, - 'y': 12 - }, - { - 'x': 1415827470000, - 'y': 9 - }, - { - 'x': 1415827500000, - 'y': 1 - } - ] - } - ] - }, - { - 'label': '503: response', - 'xAxisLabel': '@timestamp per 30 sec', - 'ordered': { - 'date': true, - 'interval': 30000, - 'min': 1415826608440, - 'max': 1415827508440 - }, - 'yAxisLabel': 'Count of documents', - 'xAxisFormatter': function (thing) { - return moment(thing); - }, - 'tooltipFormatter': function (d) { - return d; - }, - 'series': [ - { - 'label': 'Count', - 'values': [ - { - 'x': 1415826630000, - 'y': 1 - }, - { - 'x': 1415826660000, - 'y': 1 - }, - { - 'x': 1415826720000, - 'y': 1 - }, - { - 'x': 1415826780000, - 'y': 1 - }, - { - 'x': 1415826900000, - 'y': 1 - }, - { - 'x': 1415827020000, - 'y': 1 - }, - { - 'x': 1415827080000, - 'y': 1 - }, - { - 'x': 1415827110000, - 'y': 2 - } - ] - } - ] - }, - { - 'label': '404: response', - 'xAxisLabel': '@timestamp per 30 sec', - 'ordered': { - 'date': true, - 'interval': 30000, - 'min': 1415826608440, - 'max': 1415827508440 - }, - 'yAxisLabel': 'Count of documents', - 'xAxisFormatter': function (thing) { - return moment(thing); - }, - 'tooltipFormatter': function (d) { - return d; - }, - 'series': [ - { - 'label': 'Count', - 'values': [ - { - 'x': 1415826660000, - 'y': 1 - }, - { - 'x': 1415826720000, - 'y': 1 - }, - { - 'x': 1415826810000, - 'y': 1 - }, - { - 'x': 1415826960000, - 'y': 1 - }, - { - 'x': 1415827050000, - 'y': 1 - }, - { - 'x': 1415827260000, - 'y': 1 - }, - { - 'x': 1415827380000, - 'y': 1 - }, - { - 'x': 1415827410000, - 'y': 1 - } - ] - } - ] - } - ], - 'xAxisOrderedValues': [ - 1415826600000, - 1415826630000, - 1415826660000, - 1415826690000, - 1415826720000, - 1415826750000, - 1415826780000, - 1415826810000, - 1415826840000, - 1415826870000, - 1415826900000, - 1415826930000, - 1415826960000, - 1415826990000, - 1415827020000, - 1415827050000, - 1415827080000, - 1415827110000, - 1415827140000, - 1415827170000, - 1415827200000, - 1415827230000, - 1415827260000, - 1415827290000, - 1415827320000, - 1415827350000, - 1415827380000, - 1415827410000, - 1415827440000, - 1415827470000, - 1415827500000, - ], - 'hits': 225 -}; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/date_histogram/_rows.js b/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/date_histogram/_rows.js deleted file mode 100644 index 98609d8ffbcd3b..00000000000000 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/date_histogram/_rows.js +++ /dev/null @@ -1,1678 +0,0 @@ -import moment from 'moment'; - -export default { - 'rows': [ - { - 'label': '0.0-1000.0: bytes', - 'xAxisLabel': '@timestamp per 30 sec', - 'ordered': { - 'date': true, - 'interval': 30000, - 'min': 1415826260456, - 'max': 1415827160456 - }, - 'yAxisLabel': 'Count of documents', - 'xAxisFormatter': function (thing) { - return moment(thing); - }, - 'tooltipFormatter': function (d) { - return d; - }, - 'series': [ - { - 'label': 'jpg', - 'values': [ - { - 'x': 1415826240000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826270000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826300000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826330000, - 'y': 1, - 'y0': 0 - }, - { - 'x': 1415826360000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826390000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826420000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826450000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826480000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826510000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826540000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826570000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826600000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826630000, - 'y': 1, - 'y0': 0 - }, - { - 'x': 1415826660000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826690000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826720000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826750000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826780000, - 'y': 1, - 'y0': 0 - }, - { - 'x': 1415826810000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826840000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826870000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826900000, - 'y': 1, - 'y0': 0 - }, - { - 'x': 1415826930000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826960000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826990000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415827020000, - 'y': 1, - 'y0': 0 - }, - { - 'x': 1415827050000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415827080000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415827110000, - 'y': 1, - 'y0': 0 - }, - { - 'x': 1415827140000, - 'y': 0, - 'y0': 0 - } - ] - }, - { - 'label': 'css', - 'values': [ - { - 'x': 1415826240000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826270000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826300000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826330000, - 'y': 0, - 'y0': 1 - }, - { - 'x': 1415826360000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826390000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826420000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826450000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826480000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826510000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826540000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826570000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826600000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826630000, - 'y': 0, - 'y0': 1 - }, - { - 'x': 1415826660000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826690000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826720000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826750000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826780000, - 'y': 0, - 'y0': 1 - }, - { - 'x': 1415826810000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826840000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826870000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826900000, - 'y': 0, - 'y0': 1 - }, - { - 'x': 1415826930000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826960000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826990000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415827020000, - 'y': 0, - 'y0': 1 - }, - { - 'x': 1415827050000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415827080000, - 'y': 1, - 'y0': 0 - }, - { - 'x': 1415827110000, - 'y': 0, - 'y0': 1 - }, - { - 'x': 1415827140000, - 'y': 0, - 'y0': 0 - } - ] - }, - { - 'label': 'png', - 'values': [ - { - 'x': 1415826240000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826270000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826300000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826330000, - 'y': 0, - 'y0': 1 - }, - { - 'x': 1415826360000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826390000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826420000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826450000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826480000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826510000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826540000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826570000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826600000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826630000, - 'y': 0, - 'y0': 1 - }, - { - 'x': 1415826660000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826690000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826720000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826750000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826780000, - 'y': 0, - 'y0': 1 - }, - { - 'x': 1415826810000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826840000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826870000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826900000, - 'y': 0, - 'y0': 1 - }, - { - 'x': 1415826930000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826960000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826990000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415827020000, - 'y': 0, - 'y0': 1 - }, - { - 'x': 1415827050000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415827080000, - 'y': 0, - 'y0': 1 - }, - { - 'x': 1415827110000, - 'y': 1, - 'y0': 1 - }, - { - 'x': 1415827140000, - 'y': 0, - 'y0': 0 - } - ] - }, - { - 'label': 'php', - 'values': [ - { - 'x': 1415826240000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826270000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826300000, - 'y': 1, - 'y0': 0 - }, - { - 'x': 1415826330000, - 'y': 0, - 'y0': 1 - }, - { - 'x': 1415826360000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826390000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826420000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826450000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826480000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826510000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826540000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826570000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826600000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826630000, - 'y': 0, - 'y0': 1 - }, - { - 'x': 1415826660000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826690000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826720000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826750000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826780000, - 'y': 0, - 'y0': 1 - }, - { - 'x': 1415826810000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826840000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826870000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826900000, - 'y': 0, - 'y0': 1 - }, - { - 'x': 1415826930000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826960000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826990000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415827020000, - 'y': 0, - 'y0': 1 - }, - { - 'x': 1415827050000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415827080000, - 'y': 0, - 'y0': 1 - }, - { - 'x': 1415827110000, - 'y': 0, - 'y0': 2 - }, - { - 'x': 1415827140000, - 'y': 0, - 'y0': 0 - } - ] - }, - { - 'label': 'gif', - 'values': [ - { - 'x': 1415826240000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826270000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826300000, - 'y': 0, - 'y0': 1 - }, - { - 'x': 1415826330000, - 'y': 0, - 'y0': 1 - }, - { - 'x': 1415826360000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826390000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826420000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826450000, - 'y': 1, - 'y0': 0 - }, - { - 'x': 1415826480000, - 'y': 1, - 'y0': 0 - }, - { - 'x': 1415826510000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826540000, - 'y': 3, - 'y0': 0 - }, - { - 'x': 1415826570000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826600000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826630000, - 'y': 0, - 'y0': 1 - }, - { - 'x': 1415826660000, - 'y': 1, - 'y0': 0 - }, - { - 'x': 1415826690000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826720000, - 'y': 1, - 'y0': 0 - }, - { - 'x': 1415826750000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826780000, - 'y': 1, - 'y0': 1 - }, - { - 'x': 1415826810000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826840000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826870000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826900000, - 'y': 0, - 'y0': 1 - }, - { - 'x': 1415826930000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826960000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826990000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415827020000, - 'y': 0, - 'y0': 1 - }, - { - 'x': 1415827050000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415827080000, - 'y': 1, - 'y0': 1 - }, - { - 'x': 1415827110000, - 'y': 1, - 'y0': 2 - }, - { - 'x': 1415827140000, - 'y': 0, - 'y0': 0 - } - ] - } - ] - }, - { - 'label': '1000.0-2000.0: bytes', - 'xAxisLabel': '@timestamp per 30 sec', - 'ordered': { - 'date': true, - 'interval': 30000, - 'min': 1415826260457, - 'max': 1415827160457 - }, - 'yAxisLabel': 'Count of documents', - 'xAxisFormatter': function (thing) { - return moment(thing); - }, - 'tooltipFormatter': function (d) { - return d; - }, - 'series': [ - { - 'label': 'jpg', - 'values': [ - { - 'x': 1415826240000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826270000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826300000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826330000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826360000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826390000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826420000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826450000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826480000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826510000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826540000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826570000, - 'y': 1, - 'y0': 0 - }, - { - 'x': 1415826600000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826630000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826660000, - 'y': 1, - 'y0': 0 - }, - { - 'x': 1415826690000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826720000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826750000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826780000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826810000, - 'y': 2, - 'y0': 0 - }, - { - 'x': 1415826840000, - 'y': 1, - 'y0': 0 - }, - { - 'x': 1415826870000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826900000, - 'y': 1, - 'y0': 0 - }, - { - 'x': 1415826930000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826960000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826990000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415827020000, - 'y': 1, - 'y0': 0 - }, - { - 'x': 1415827050000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415827080000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415827110000, - 'y': 1, - 'y0': 0 - }, - { - 'x': 1415827140000, - 'y': 0, - 'y0': 0 - } - ] - }, - { - 'label': 'css', - 'values': [ - { - 'x': 1415826240000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826270000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826300000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826330000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826360000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826390000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826420000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826450000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826480000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826510000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826540000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826570000, - 'y': 0, - 'y0': 1 - }, - { - 'x': 1415826600000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826630000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826660000, - 'y': 0, - 'y0': 1 - }, - { - 'x': 1415826690000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826720000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826750000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826780000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826810000, - 'y': 0, - 'y0': 2 - }, - { - 'x': 1415826840000, - 'y': 0, - 'y0': 1 - }, - { - 'x': 1415826870000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826900000, - 'y': 0, - 'y0': 1 - }, - { - 'x': 1415826930000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826960000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826990000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415827020000, - 'y': 0, - 'y0': 1 - }, - { - 'x': 1415827050000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415827080000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415827110000, - 'y': 0, - 'y0': 1 - }, - { - 'x': 1415827140000, - 'y': 0, - 'y0': 0 - } - ] - }, - { - 'label': 'png', - 'values': [ - { - 'x': 1415826240000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826270000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826300000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826330000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826360000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826390000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826420000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826450000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826480000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826510000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826540000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826570000, - 'y': 0, - 'y0': 1 - }, - { - 'x': 1415826600000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826630000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826660000, - 'y': 0, - 'y0': 1 - }, - { - 'x': 1415826690000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826720000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826750000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826780000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826810000, - 'y': 0, - 'y0': 2 - }, - { - 'x': 1415826840000, - 'y': 0, - 'y0': 1 - }, - { - 'x': 1415826870000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826900000, - 'y': 0, - 'y0': 1 - }, - { - 'x': 1415826930000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826960000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826990000, - 'y': 1, - 'y0': 0 - }, - { - 'x': 1415827020000, - 'y': 0, - 'y0': 1 - }, - { - 'x': 1415827050000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415827080000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415827110000, - 'y': 0, - 'y0': 1 - }, - { - 'x': 1415827140000, - 'y': 0, - 'y0': 0 - } - ] - }, - { - 'label': 'php', - 'values': [ - { - 'x': 1415826240000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826270000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826300000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826330000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826360000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826390000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826420000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826450000, - 'y': 1, - 'y0': 0 - }, - { - 'x': 1415826480000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826510000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826540000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826570000, - 'y': 0, - 'y0': 1 - }, - { - 'x': 1415826600000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826630000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826660000, - 'y': 0, - 'y0': 1 - }, - { - 'x': 1415826690000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826720000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826750000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826780000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826810000, - 'y': 0, - 'y0': 2 - }, - { - 'x': 1415826840000, - 'y': 0, - 'y0': 1 - }, - { - 'x': 1415826870000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826900000, - 'y': 0, - 'y0': 1 - }, - { - 'x': 1415826930000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826960000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826990000, - 'y': 0, - 'y0': 1 - }, - { - 'x': 1415827020000, - 'y': 0, - 'y0': 1 - }, - { - 'x': 1415827050000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415827080000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415827110000, - 'y': 0, - 'y0': 1 - }, - { - 'x': 1415827140000, - 'y': 0, - 'y0': 0 - } - ] - }, - { - 'label': 'gif', - 'values': [ - { - 'x': 1415826240000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826270000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826300000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826330000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826360000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826390000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826420000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826450000, - 'y': 0, - 'y0': 1 - }, - { - 'x': 1415826480000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826510000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826540000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826570000, - 'y': 0, - 'y0': 1 - }, - { - 'x': 1415826600000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826630000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826660000, - 'y': 0, - 'y0': 1 - }, - { - 'x': 1415826690000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826720000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826750000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826780000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826810000, - 'y': 0, - 'y0': 2 - }, - { - 'x': 1415826840000, - 'y': 0, - 'y0': 1 - }, - { - 'x': 1415826870000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826900000, - 'y': 0, - 'y0': 1 - }, - { - 'x': 1415826930000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826960000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415826990000, - 'y': 0, - 'y0': 1 - }, - { - 'x': 1415827020000, - 'y': 0, - 'y0': 1 - }, - { - 'x': 1415827050000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415827080000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 1415827110000, - 'y': 0, - 'y0': 1 - }, - { - 'x': 1415827140000, - 'y': 0, - 'y0': 0 - } - ] - } - ] - } - ], - 'xAxisOrderedValues': [ - 1415826240000, - 1415826270000, - 1415826300000, - 1415826330000, - 1415826360000, - 1415826390000, - 1415826420000, - 1415826450000, - 1415826480000, - 1415826510000, - 1415826540000, - 1415826570000, - 1415826600000, - 1415826630000, - 1415826660000, - 1415826690000, - 1415826720000, - 1415826750000, - 1415826780000, - 1415826810000, - 1415826840000, - 1415826870000, - 1415826900000, - 1415826930000, - 1415826960000, - 1415826990000, - 1415827020000, - 1415827050000, - 1415827080000, - 1415827110000, - 1415827140000, - ], - 'hits': 236 -}; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/date_histogram/_rows_series_with_holes.js b/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/date_histogram/_rows_series_with_holes.js deleted file mode 100644 index 4ca631c7fc4972..00000000000000 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/date_histogram/_rows_series_with_holes.js +++ /dev/null @@ -1,123 +0,0 @@ -import moment from 'moment'; - -export const rowsSeriesWithHoles = { - rows: [ - { - 'label': '', - 'xAxisLabel': '@timestamp per 30 sec', - 'ordered': { - 'date': true, - 'min': 1411761457636, - 'max': 1411762357636, - 'interval': 30000 - }, - 'yAxisLabel': 'Count of documents', - 'series': [ - { - 'label': 'Count', - 'values': [ - { - 'x': 1411761450000, - 'y': 41 - }, - { - 'x': 1411761510000, - 'y': 22 - }, - { - 'x': 1411761540000, - 'y': 17 - }, - { - 'x': 1411761840000, - 'y': 20 - }, - { - 'x': 1411761870000, - 'y': 20 - }, - { - 'x': 1411761900000, - 'y': 21 - }, - { - 'x': 1411761930000, - 'y': 17 - }, - { - 'x': 1411761960000, - 'y': 20 - }, - { - 'x': 1411761990000, - 'y': 13 - }, - { - 'x': 1411762020000, - 'y': 14 - }, - { - 'x': 1411762050000, - 'y': 25 - }, - { - 'x': 1411762080000, - 'y': 17 - }, - { - 'x': 1411762110000, - 'y': 14 - }, - { - 'x': 1411762140000, - 'y': 22 - }, - { - 'x': 1411762170000, - 'y': 14 - }, - { - 'x': 1411762200000, - 'y': 19 - }, - { - 'x': 1411762320000, - 'y': 15 - }, - { - 'x': 1411762350000, - 'y': 4 - } - ] - } - ], - 'hits': 533, - 'xAxisFormatter': function (thing) { - return moment(thing); - }, - 'tooltipFormatter': function (d) { - return d; - } - } - ], - 'xAxisOrderedValues': [ - 1411761450000, - 1411761510000, - 1411761540000, - 1411761840000, - 1411761870000, - 1411761900000, - 1411761930000, - 1411761960000, - 1411761990000, - 1411762020000, - 1411762050000, - 1411762080000, - 1411762110000, - 1411762140000, - 1411762170000, - 1411762200000, - 1411762320000, - 1411762350000, - ], -}; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/date_histogram/_series.js b/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/date_histogram/_series.js deleted file mode 100644 index 13e2ab7b7fb1ac..00000000000000 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/date_histogram/_series.js +++ /dev/null @@ -1,184 +0,0 @@ -import moment from 'moment'; - -export default { - 'label': '', - 'xAxisLabel': '@timestamp per 30 sec', - 'ordered': { - 'date': true, - 'min': 1411761457636, - 'max': 1411762357636, - 'interval': 30000 - }, - 'yAxisLabel': 'Count of documents', - 'series': [ - { - 'label': 'Count', - 'values': [ - { - 'x': 1411761450000, - 'y': 41 - }, - { - 'x': 1411761480000, - 'y': 18 - }, - { - 'x': 1411761510000, - 'y': 22 - }, - { - 'x': 1411761540000, - 'y': 17 - }, - { - 'x': 1411761570000, - 'y': 17 - }, - { - 'x': 1411761600000, - 'y': 21 - }, - { - 'x': 1411761630000, - 'y': 16 - }, - { - 'x': 1411761660000, - 'y': 17 - }, - { - 'x': 1411761690000, - 'y': 15 - }, - { - 'x': 1411761720000, - 'y': 19 - }, - { - 'x': 1411761750000, - 'y': 11 - }, - { - 'x': 1411761780000, - 'y': 13 - }, - { - 'x': 1411761810000, - 'y': 24 - }, - { - 'x': 1411761840000, - 'y': 20 - }, - { - 'x': 1411761870000, - 'y': 20 - }, - { - 'x': 1411761900000, - 'y': 21 - }, - { - 'x': 1411761930000, - 'y': 17 - }, - { - 'x': 1411761960000, - 'y': 20 - }, - { - 'x': 1411761990000, - 'y': 13 - }, - { - 'x': 1411762020000, - 'y': 14 - }, - { - 'x': 1411762050000, - 'y': 25 - }, - { - 'x': 1411762080000, - 'y': 17 - }, - { - 'x': 1411762110000, - 'y': 14 - }, - { - 'x': 1411762140000, - 'y': 22 - }, - { - 'x': 1411762170000, - 'y': 14 - }, - { - 'x': 1411762200000, - 'y': 19 - }, - { - 'x': 1411762230000, - 'y': 22 - }, - { - 'x': 1411762260000, - 'y': 17 - }, - { - 'x': 1411762290000, - 'y': 8 - }, - { - 'x': 1411762320000, - 'y': 15 - }, - { - 'x': 1411762350000, - 'y': 4 - } - ] - } - ], - 'hits': 533, - 'xAxisOrderedValues': [ - 1411761450000, - 1411761480000, - 1411761510000, - 1411761540000, - 1411761570000, - 1411761600000, - 1411761630000, - 1411761660000, - 1411761690000, - 1411761720000, - 1411761750000, - 1411761780000, - 1411761810000, - 1411761840000, - 1411761870000, - 1411761900000, - 1411761930000, - 1411761960000, - 1411761990000, - 1411762020000, - 1411762050000, - 1411762080000, - 1411762110000, - 1411762140000, - 1411762170000, - 1411762200000, - 1411762230000, - 1411762260000, - 1411762290000, - 1411762320000, - 1411762350000, - ], - 'xAxisFormatter': function (thing) { - return moment(thing); - }, - 'tooltipFormatter': function (d) { - return d; - } -}; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/date_histogram/_series_monthly_interval.js b/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/date_histogram/_series_monthly_interval.js deleted file mode 100644 index 6b7c574ab55511..00000000000000 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/date_histogram/_series_monthly_interval.js +++ /dev/null @@ -1,89 +0,0 @@ -import moment from 'moment'; - -export const seriesMonthlyInterval = { - 'label': '', - 'xAxisLabel': '@timestamp per month', - 'ordered': { - 'date': true, - 'min': 1451631600000, - 'max': 1483254000000, - 'interval': 2678000000 - }, - 'yAxisLabel': 'Count of documents', - 'series': [ - { - 'label': 'Count', - 'values': [ - { - 'x': 1451631600000, - 'y': 10220 - }, - { - 'x': 1454310000000, - 'y': 9997, - }, - { - 'x': 1456815600000, - 'y': 10792, - }, - { - 'x': 1459490400000, - 'y': 10262 - }, - { - 'x': 1462082400000, - 'y': 10080 - }, - { - 'x': 1464760800000, - 'y': 11161 - }, - { - 'x': 1467352800000, - 'y': 9933 - }, - { - 'x': 1470031200000, - 'y': 10342 - }, - { - 'x': 1472709600000, - 'y': 10887 - }, - { - 'x': 1475301600000, - 'y': 9666 - }, - { - 'x': 1477980000000, - 'y': 9556 - }, - { - 'x': 1480575600000, - 'y': 11644 - } - ] - } - ], - 'hits': 533, - 'xAxisOrderedValues': [ - 1451631600000, - 1454310000000, - 1456815600000, - 1459490400000, - 1462082400000, - 1464760800000, - 1467352800000, - 1470031200000, - 1472709600000, - 1475301600000, - 1477980000000, - 1480575600000, - ], - 'xAxisFormatter': function (thing) { - return moment(thing); - }, - 'tooltipFormatter': function (d) { - return d; - } -}; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/date_histogram/_series_neg.js b/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/date_histogram/_series_neg.js deleted file mode 100644 index ff5cd05b2f2d49..00000000000000 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/date_histogram/_series_neg.js +++ /dev/null @@ -1,184 +0,0 @@ -import moment from 'moment'; - -export default { - 'label': '', - 'xAxisLabel': '@timestamp per 30 sec', - 'ordered': { - 'date': true, - 'min': 1411761457636, - 'max': 1411762357636, - 'interval': 30000 - }, - 'yAxisLabel': 'Count of documents', - 'series': [ - { - 'label': 'Count', - 'values': [ - { - 'x': 1411761450000, - 'y': -41 - }, - { - 'x': 1411761480000, - 'y': -18 - }, - { - 'x': 1411761510000, - 'y': -22 - }, - { - 'x': 1411761540000, - 'y': -17 - }, - { - 'x': 1411761570000, - 'y': -17 - }, - { - 'x': 1411761600000, - 'y': -21 - }, - { - 'x': 1411761630000, - 'y': -16 - }, - { - 'x': 1411761660000, - 'y': -17 - }, - { - 'x': 1411761690000, - 'y': -15 - }, - { - 'x': 1411761720000, - 'y': -19 - }, - { - 'x': 1411761750000, - 'y': -11 - }, - { - 'x': 1411761780000, - 'y': -13 - }, - { - 'x': 1411761810000, - 'y': -24 - }, - { - 'x': 1411761840000, - 'y': -20 - }, - { - 'x': 1411761870000, - 'y': -20 - }, - { - 'x': 1411761900000, - 'y': -21 - }, - { - 'x': 1411761930000, - 'y': -17 - }, - { - 'x': 1411761960000, - 'y': -20 - }, - { - 'x': 1411761990000, - 'y': -13 - }, - { - 'x': 1411762020000, - 'y': -14 - }, - { - 'x': 1411762050000, - 'y': -25 - }, - { - 'x': 1411762080000, - 'y': -17 - }, - { - 'x': 1411762110000, - 'y': -14 - }, - { - 'x': 1411762140000, - 'y': -22 - }, - { - 'x': 1411762170000, - 'y': -14 - }, - { - 'x': 1411762200000, - 'y': -19 - }, - { - 'x': 1411762230000, - 'y': -22 - }, - { - 'x': 1411762260000, - 'y': -17 - }, - { - 'x': 1411762290000, - 'y': -8 - }, - { - 'x': 1411762320000, - 'y': -15 - }, - { - 'x': 1411762350000, - 'y': -4 - } - ] - } - ], - 'hits': 533, - 'xAxisOrderedValues': [ - 1411761450000, - 1411761480000, - 1411761510000, - 1411761540000, - 1411761570000, - 1411761600000, - 1411761630000, - 1411761660000, - 1411761690000, - 1411761720000, - 1411761750000, - 1411761780000, - 1411761810000, - 1411761840000, - 1411761870000, - 1411761900000, - 1411761930000, - 1411761960000, - 1411761990000, - 1411762020000, - 1411762050000, - 1411762080000, - 1411762110000, - 1411762140000, - 1411762170000, - 1411762200000, - 1411762230000, - 1411762260000, - 1411762290000, - 1411762320000, - 1411762350000, - ], - 'xAxisFormatter': function (thing) { - return moment(thing); - }, - 'tooltipFormatter': function (d) { - return d; - } -}; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/date_histogram/_series_pos_neg.js b/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/date_histogram/_series_pos_neg.js deleted file mode 100644 index 06d9b31dc6b578..00000000000000 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/date_histogram/_series_pos_neg.js +++ /dev/null @@ -1,184 +0,0 @@ -import moment from 'moment'; - -export default { - 'label': '', - 'xAxisLabel': '@timestamp per 30 sec', - 'ordered': { - 'date': true, - 'min': 1411761457636, - 'max': 1411762357636, - 'interval': 30000 - }, - 'yAxisLabel': 'Count of documents', - 'series': [ - { - 'label': 'Count', - 'values': [ - { - 'x': 1411761450000, - 'y': 41 - }, - { - 'x': 1411761480000, - 'y': 18 - }, - { - 'x': 1411761510000, - 'y': -22 - }, - { - 'x': 1411761540000, - 'y': -17 - }, - { - 'x': 1411761570000, - 'y': -17 - }, - { - 'x': 1411761600000, - 'y': -21 - }, - { - 'x': 1411761630000, - 'y': -16 - }, - { - 'x': 1411761660000, - 'y': 17 - }, - { - 'x': 1411761690000, - 'y': 15 - }, - { - 'x': 1411761720000, - 'y': 19 - }, - { - 'x': 1411761750000, - 'y': 11 - }, - { - 'x': 1411761780000, - 'y': -13 - }, - { - 'x': 1411761810000, - 'y': -24 - }, - { - 'x': 1411761840000, - 'y': -20 - }, - { - 'x': 1411761870000, - 'y': -20 - }, - { - 'x': 1411761900000, - 'y': -21 - }, - { - 'x': 1411761930000, - 'y': 17 - }, - { - 'x': 1411761960000, - 'y': 20 - }, - { - 'x': 1411761990000, - 'y': -13 - }, - { - 'x': 1411762020000, - 'y': -14 - }, - { - 'x': 1411762050000, - 'y': 25 - }, - { - 'x': 1411762080000, - 'y': -17 - }, - { - 'x': 1411762110000, - 'y': -14 - }, - { - 'x': 1411762140000, - 'y': -22 - }, - { - 'x': 1411762170000, - 'y': -14 - }, - { - 'x': 1411762200000, - 'y': 19 - }, - { - 'x': 1411762230000, - 'y': 22 - }, - { - 'x': 1411762260000, - 'y': 17 - }, - { - 'x': 1411762290000, - 'y': 8 - }, - { - 'x': 1411762320000, - 'y': -15 - }, - { - 'x': 1411762350000, - 'y': -4 - } - ] - } - ], - 'hits': 533, - 'xAxisOrderedValues': [ - 1411761450000, - 1411761480000, - 1411761510000, - 1411761540000, - 1411761570000, - 1411761600000, - 1411761630000, - 1411761660000, - 1411761690000, - 1411761720000, - 1411761750000, - 1411761780000, - 1411761810000, - 1411761840000, - 1411761870000, - 1411761900000, - 1411761930000, - 1411761960000, - 1411761990000, - 1411762020000, - 1411762050000, - 1411762080000, - 1411762110000, - 1411762140000, - 1411762170000, - 1411762200000, - 1411762230000, - 1411762260000, - 1411762290000, - 1411762320000, - 1411762350000, - ], - 'xAxisFormatter': function (thing) { - return moment(thing); - }, - 'tooltipFormatter': function (d) { - return d; - } -}; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/date_histogram/_stacked_series.js b/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/date_histogram/_stacked_series.js deleted file mode 100644 index 5208c7e996cd87..00000000000000 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/date_histogram/_stacked_series.js +++ /dev/null @@ -1,1557 +0,0 @@ -import moment from 'moment'; - -export default { - 'label': '', - 'xAxisLabel': '@timestamp per 10 min', - 'ordered': { - 'date': true, - 'min': 1413544140087, - 'max': 1413587340087, - 'interval': 600000 - }, - 'yAxisLabel': 'Count of documents', - 'series': [ - { - 'label': 'html', - 'values': [ - { - 'x': 1413543600000, - 'y': 140 - }, - { - 'x': 1413544200000, - 'y': 1388 - }, - { - 'x': 1413544800000, - 'y': 1308 - }, - { - 'x': 1413545400000, - 'y': 1356 - }, - { - 'x': 1413546000000, - 'y': 1314 - }, - { - 'x': 1413546600000, - 'y': 1343 - }, - { - 'x': 1413547200000, - 'y': 1353 - }, - { - 'x': 1413547800000, - 'y': 1353 - }, - { - 'x': 1413548400000, - 'y': 1334 - }, - { - 'x': 1413549000000, - 'y': 1433 - }, - { - 'x': 1413549600000, - 'y': 1331 - }, - { - 'x': 1413550200000, - 'y': 1349 - }, - { - 'x': 1413550800000, - 'y': 1323 - }, - { - 'x': 1413551400000, - 'y': 1203 - }, - { - 'x': 1413552000000, - 'y': 1231 - }, - { - 'x': 1413552600000, - 'y': 1227 - }, - { - 'x': 1413553200000, - 'y': 1187 - }, - { - 'x': 1413553800000, - 'y': 1119 - }, - { - 'x': 1413554400000, - 'y': 1159 - }, - { - 'x': 1413555000000, - 'y': 1117 - }, - { - 'x': 1413555600000, - 'y': 1152 - }, - { - 'x': 1413556200000, - 'y': 1057 - }, - { - 'x': 1413556800000, - 'y': 1009 - }, - { - 'x': 1413557400000, - 'y': 979 - }, - { - 'x': 1413558000000, - 'y': 975 - }, - { - 'x': 1413558600000, - 'y': 848 - }, - { - 'x': 1413559200000, - 'y': 873 - }, - { - 'x': 1413559800000, - 'y': 808 - }, - { - 'x': 1413560400000, - 'y': 784 - }, - { - 'x': 1413561000000, - 'y': 799 - }, - { - 'x': 1413561600000, - 'y': 684 - }, - { - 'x': 1413562200000, - 'y': 727 - }, - { - 'x': 1413562800000, - 'y': 621 - }, - { - 'x': 1413563400000, - 'y': 615 - }, - { - 'x': 1413564000000, - 'y': 569 - }, - { - 'x': 1413564600000, - 'y': 523 - }, - { - 'x': 1413565200000, - 'y': 474 - }, - { - 'x': 1413565800000, - 'y': 470 - }, - { - 'x': 1413566400000, - 'y': 466 - }, - { - 'x': 1413567000000, - 'y': 394 - }, - { - 'x': 1413567600000, - 'y': 404 - }, - { - 'x': 1413568200000, - 'y': 389 - }, - { - 'x': 1413568800000, - 'y': 312 - }, - { - 'x': 1413569400000, - 'y': 274 - }, - { - 'x': 1413570000000, - 'y': 285 - }, - { - 'x': 1413570600000, - 'y': 299 - }, - { - 'x': 1413571200000, - 'y': 207 - }, - { - 'x': 1413571800000, - 'y': 213 - }, - { - 'x': 1413572400000, - 'y': 119 - }, - { - 'x': 1413573600000, - 'y': 122 - }, - { - 'x': 1413574200000, - 'y': 169 - }, - { - 'x': 1413574800000, - 'y': 151 - }, - { - 'x': 1413575400000, - 'y': 152 - }, - { - 'x': 1413576000000, - 'y': 115 - }, - { - 'x': 1413576600000, - 'y': 117 - }, - { - 'x': 1413577200000, - 'y': 108 - }, - { - 'x': 1413577800000, - 'y': 100 - }, - { - 'x': 1413578400000, - 'y': 78 - }, - { - 'x': 1413579000000, - 'y': 88 - }, - { - 'x': 1413579600000, - 'y': 63 - }, - { - 'x': 1413580200000, - 'y': 58 - }, - { - 'x': 1413580800000, - 'y': 45 - }, - { - 'x': 1413581400000, - 'y': 57 - }, - { - 'x': 1413582000000, - 'y': 34 - }, - { - 'x': 1413582600000, - 'y': 41 - }, - { - 'x': 1413583200000, - 'y': 24 - }, - { - 'x': 1413583800000, - 'y': 27 - }, - { - 'x': 1413584400000, - 'y': 19 - }, - { - 'x': 1413585000000, - 'y': 24 - }, - { - 'x': 1413585600000, - 'y': 18 - }, - { - 'x': 1413586200000, - 'y': 17 - }, - { - 'x': 1413586800000, - 'y': 14 - } - ] - }, - { - 'label': 'php', - 'values': [ - { - 'x': 1413543600000, - 'y': 90 - }, - { - 'x': 1413544200000, - 'y': 949 - }, - { - 'x': 1413544800000, - 'y': 1012 - }, - { - 'x': 1413545400000, - 'y': 1027 - }, - { - 'x': 1413546000000, - 'y': 1073 - }, - { - 'x': 1413546600000, - 'y': 992 - }, - { - 'x': 1413547200000, - 'y': 1005 - }, - { - 'x': 1413547800000, - 'y': 1014 - }, - { - 'x': 1413548400000, - 'y': 987 - }, - { - 'x': 1413549000000, - 'y': 982 - }, - { - 'x': 1413549600000, - 'y': 1086 - }, - { - 'x': 1413550200000, - 'y': 998 - }, - { - 'x': 1413550800000, - 'y': 935 - }, - { - 'x': 1413551400000, - 'y': 995 - }, - { - 'x': 1413552000000, - 'y': 926 - }, - { - 'x': 1413552600000, - 'y': 897 - }, - { - 'x': 1413553200000, - 'y': 873 - }, - { - 'x': 1413553800000, - 'y': 885 - }, - { - 'x': 1413554400000, - 'y': 859 - }, - { - 'x': 1413555000000, - 'y': 852 - }, - { - 'x': 1413555600000, - 'y': 779 - }, - { - 'x': 1413556200000, - 'y': 739 - }, - { - 'x': 1413556800000, - 'y': 783 - }, - { - 'x': 1413557400000, - 'y': 784 - }, - { - 'x': 1413558000000, - 'y': 687 - }, - { - 'x': 1413558600000, - 'y': 660 - }, - { - 'x': 1413559200000, - 'y': 672 - }, - { - 'x': 1413559800000, - 'y': 600 - }, - { - 'x': 1413560400000, - 'y': 659 - }, - { - 'x': 1413561000000, - 'y': 540 - }, - { - 'x': 1413561600000, - 'y': 539 - }, - { - 'x': 1413562200000, - 'y': 481 - }, - { - 'x': 1413562800000, - 'y': 498 - }, - { - 'x': 1413563400000, - 'y': 444 - }, - { - 'x': 1413564000000, - 'y': 452 - }, - { - 'x': 1413564600000, - 'y': 408 - }, - { - 'x': 1413565200000, - 'y': 358 - }, - { - 'x': 1413565800000, - 'y': 321 - }, - { - 'x': 1413566400000, - 'y': 305 - }, - { - 'x': 1413567000000, - 'y': 292 - }, - { - 'x': 1413567600000, - 'y': 289 - }, - { - 'x': 1413568200000, - 'y': 239 - }, - { - 'x': 1413568800000, - 'y': 256 - }, - { - 'x': 1413569400000, - 'y': 220 - }, - { - 'x': 1413570000000, - 'y': 205 - }, - { - 'x': 1413570600000, - 'y': 201 - }, - { - 'x': 1413571200000, - 'y': 183 - }, - { - 'x': 1413571800000, - 'y': 172 - }, - { - 'x': 1413572400000, - 'y': 73 - }, - { - 'x': 1413573600000, - 'y': 90 - }, - { - 'x': 1413574200000, - 'y': 130 - }, - { - 'x': 1413574800000, - 'y': 104 - }, - { - 'x': 1413575400000, - 'y': 108 - }, - { - 'x': 1413576000000, - 'y': 92 - }, - { - 'x': 1413576600000, - 'y': 79 - }, - { - 'x': 1413577200000, - 'y': 90 - }, - { - 'x': 1413577800000, - 'y': 72 - }, - { - 'x': 1413578400000, - 'y': 68 - }, - { - 'x': 1413579000000, - 'y': 52 - }, - { - 'x': 1413579600000, - 'y': 60 - }, - { - 'x': 1413580200000, - 'y': 51 - }, - { - 'x': 1413580800000, - 'y': 32 - }, - { - 'x': 1413581400000, - 'y': 37 - }, - { - 'x': 1413582000000, - 'y': 30 - }, - { - 'x': 1413582600000, - 'y': 29 - }, - { - 'x': 1413583200000, - 'y': 24 - }, - { - 'x': 1413583800000, - 'y': 16 - }, - { - 'x': 1413584400000, - 'y': 15 - }, - { - 'x': 1413585000000, - 'y': 15 - }, - { - 'x': 1413585600000, - 'y': 10 - }, - { - 'x': 1413586200000, - 'y': 9 - }, - { - 'x': 1413586800000, - 'y': 9 - } - ] - }, - { - 'label': 'png', - 'values': [ - { - 'x': 1413543600000, - 'y': 44 - }, - { - 'x': 1413544200000, - 'y': 495 - }, - { - 'x': 1413544800000, - 'y': 489 - }, - { - 'x': 1413545400000, - 'y': 492 - }, - { - 'x': 1413546000000, - 'y': 556 - }, - { - 'x': 1413546600000, - 'y': 536 - }, - { - 'x': 1413547200000, - 'y': 511 - }, - { - 'x': 1413547800000, - 'y': 479 - }, - { - 'x': 1413548400000, - 'y': 544 - }, - { - 'x': 1413549000000, - 'y': 513 - }, - { - 'x': 1413549600000, - 'y': 501 - }, - { - 'x': 1413550200000, - 'y': 532 - }, - { - 'x': 1413550800000, - 'y': 440 - }, - { - 'x': 1413551400000, - 'y': 455 - }, - { - 'x': 1413552000000, - 'y': 455 - }, - { - 'x': 1413552600000, - 'y': 471 - }, - { - 'x': 1413553200000, - 'y': 428 - }, - { - 'x': 1413553800000, - 'y': 457 - }, - { - 'x': 1413554400000, - 'y': 450 - }, - { - 'x': 1413555000000, - 'y': 418 - }, - { - 'x': 1413555600000, - 'y': 398 - }, - { - 'x': 1413556200000, - 'y': 397 - }, - { - 'x': 1413556800000, - 'y': 359 - }, - { - 'x': 1413557400000, - 'y': 398 - }, - { - 'x': 1413558000000, - 'y': 339 - }, - { - 'x': 1413558600000, - 'y': 363 - }, - { - 'x': 1413559200000, - 'y': 297 - }, - { - 'x': 1413559800000, - 'y': 323 - }, - { - 'x': 1413560400000, - 'y': 302 - }, - { - 'x': 1413561000000, - 'y': 260 - }, - { - 'x': 1413561600000, - 'y': 276 - }, - { - 'x': 1413562200000, - 'y': 249 - }, - { - 'x': 1413562800000, - 'y': 248 - }, - { - 'x': 1413563400000, - 'y': 235 - }, - { - 'x': 1413564000000, - 'y': 234 - }, - { - 'x': 1413564600000, - 'y': 188 - }, - { - 'x': 1413565200000, - 'y': 192 - }, - { - 'x': 1413565800000, - 'y': 173 - }, - { - 'x': 1413566400000, - 'y': 160 - }, - { - 'x': 1413567000000, - 'y': 137 - }, - { - 'x': 1413567600000, - 'y': 158 - }, - { - 'x': 1413568200000, - 'y': 111 - }, - { - 'x': 1413568800000, - 'y': 145 - }, - { - 'x': 1413569400000, - 'y': 118 - }, - { - 'x': 1413570000000, - 'y': 104 - }, - { - 'x': 1413570600000, - 'y': 80 - }, - { - 'x': 1413571200000, - 'y': 79 - }, - { - 'x': 1413571800000, - 'y': 86 - }, - { - 'x': 1413572400000, - 'y': 47 - }, - { - 'x': 1413573600000, - 'y': 49 - }, - { - 'x': 1413574200000, - 'y': 68 - }, - { - 'x': 1413574800000, - 'y': 78 - }, - { - 'x': 1413575400000, - 'y': 77 - }, - { - 'x': 1413576000000, - 'y': 50 - }, - { - 'x': 1413576600000, - 'y': 51 - }, - { - 'x': 1413577200000, - 'y': 40 - }, - { - 'x': 1413577800000, - 'y': 42 - }, - { - 'x': 1413578400000, - 'y': 29 - }, - { - 'x': 1413579000000, - 'y': 24 - }, - { - 'x': 1413579600000, - 'y': 30 - }, - { - 'x': 1413580200000, - 'y': 18 - }, - { - 'x': 1413580800000, - 'y': 15 - }, - { - 'x': 1413581400000, - 'y': 19 - }, - { - 'x': 1413582000000, - 'y': 18 - }, - { - 'x': 1413582600000, - 'y': 13 - }, - { - 'x': 1413583200000, - 'y': 11 - }, - { - 'x': 1413583800000, - 'y': 11 - }, - { - 'x': 1413584400000, - 'y': 13 - }, - { - 'x': 1413585000000, - 'y': 9 - }, - { - 'x': 1413585600000, - 'y': 9 - }, - { - 'x': 1413586200000, - 'y': 9 - }, - { - 'x': 1413586800000, - 'y': 3 - } - ] - }, - { - 'label': 'css', - 'values': [ - { - 'x': 1413543600000, - 'y': 35 - }, - { - 'x': 1413544200000, - 'y': 360 - }, - { - 'x': 1413544800000, - 'y': 343 - }, - { - 'x': 1413545400000, - 'y': 329 - }, - { - 'x': 1413546000000, - 'y': 345 - }, - { - 'x': 1413546600000, - 'y': 336 - }, - { - 'x': 1413547200000, - 'y': 330 - }, - { - 'x': 1413547800000, - 'y': 334 - }, - { - 'x': 1413548400000, - 'y': 326 - }, - { - 'x': 1413549000000, - 'y': 351 - }, - { - 'x': 1413549600000, - 'y': 334 - }, - { - 'x': 1413550200000, - 'y': 351 - }, - { - 'x': 1413550800000, - 'y': 337 - }, - { - 'x': 1413551400000, - 'y': 306 - }, - { - 'x': 1413552000000, - 'y': 346 - }, - { - 'x': 1413552600000, - 'y': 317 - }, - { - 'x': 1413553200000, - 'y': 298 - }, - { - 'x': 1413553800000, - 'y': 288 - }, - { - 'x': 1413554400000, - 'y': 283 - }, - { - 'x': 1413555000000, - 'y': 262 - }, - { - 'x': 1413555600000, - 'y': 245 - }, - { - 'x': 1413556200000, - 'y': 259 - }, - { - 'x': 1413556800000, - 'y': 267 - }, - { - 'x': 1413557400000, - 'y': 230 - }, - { - 'x': 1413558000000, - 'y': 218 - }, - { - 'x': 1413558600000, - 'y': 241 - }, - { - 'x': 1413559200000, - 'y': 213 - }, - { - 'x': 1413559800000, - 'y': 239 - }, - { - 'x': 1413560400000, - 'y': 208 - }, - { - 'x': 1413561000000, - 'y': 187 - }, - { - 'x': 1413561600000, - 'y': 166 - }, - { - 'x': 1413562200000, - 'y': 154 - }, - { - 'x': 1413562800000, - 'y': 184 - }, - { - 'x': 1413563400000, - 'y': 148 - }, - { - 'x': 1413564000000, - 'y': 153 - }, - { - 'x': 1413564600000, - 'y': 149 - }, - { - 'x': 1413565200000, - 'y': 102 - }, - { - 'x': 1413565800000, - 'y': 110 - }, - { - 'x': 1413566400000, - 'y': 121 - }, - { - 'x': 1413567000000, - 'y': 120 - }, - { - 'x': 1413567600000, - 'y': 86 - }, - { - 'x': 1413568200000, - 'y': 96 - }, - { - 'x': 1413568800000, - 'y': 71 - }, - { - 'x': 1413569400000, - 'y': 92 - }, - { - 'x': 1413570000000, - 'y': 65 - }, - { - 'x': 1413570600000, - 'y': 54 - }, - { - 'x': 1413571200000, - 'y': 68 - }, - { - 'x': 1413571800000, - 'y': 57 - }, - { - 'x': 1413572400000, - 'y': 33 - }, - { - 'x': 1413573600000, - 'y': 47 - }, - { - 'x': 1413574200000, - 'y': 42 - }, - { - 'x': 1413574800000, - 'y': 39 - }, - { - 'x': 1413575400000, - 'y': 25 - }, - { - 'x': 1413576000000, - 'y': 31 - }, - { - 'x': 1413576600000, - 'y': 37 - }, - { - 'x': 1413577200000, - 'y': 35 - }, - { - 'x': 1413577800000, - 'y': 19 - }, - { - 'x': 1413578400000, - 'y': 15 - }, - { - 'x': 1413579000000, - 'y': 21 - }, - { - 'x': 1413579600000, - 'y': 16 - }, - { - 'x': 1413580200000, - 'y': 18 - }, - { - 'x': 1413580800000, - 'y': 10 - }, - { - 'x': 1413581400000, - 'y': 13 - }, - { - 'x': 1413582000000, - 'y': 14 - }, - { - 'x': 1413582600000, - 'y': 11 - }, - { - 'x': 1413583200000, - 'y': 4 - }, - { - 'x': 1413583800000, - 'y': 6 - }, - { - 'x': 1413584400000, - 'y': 3 - }, - { - 'x': 1413585000000, - 'y': 6 - }, - { - 'x': 1413585600000, - 'y': 6 - }, - { - 'x': 1413586200000, - 'y': 2 - }, - { - 'x': 1413586800000, - 'y': 3 - } - ] - }, - { - 'label': 'gif', - 'values': [ - { - 'x': 1413543600000, - 'y': 21 - }, - { - 'x': 1413544200000, - 'y': 191 - }, - { - 'x': 1413544800000, - 'y': 176 - }, - { - 'x': 1413545400000, - 'y': 166 - }, - { - 'x': 1413546000000, - 'y': 183 - }, - { - 'x': 1413546600000, - 'y': 170 - }, - { - 'x': 1413547200000, - 'y': 153 - }, - { - 'x': 1413547800000, - 'y': 202 - }, - { - 'x': 1413548400000, - 'y': 175 - }, - { - 'x': 1413549000000, - 'y': 161 - }, - { - 'x': 1413549600000, - 'y': 174 - }, - { - 'x': 1413550200000, - 'y': 167 - }, - { - 'x': 1413550800000, - 'y': 171 - }, - { - 'x': 1413551400000, - 'y': 176 - }, - { - 'x': 1413552000000, - 'y': 139 - }, - { - 'x': 1413552600000, - 'y': 145 - }, - { - 'x': 1413553200000, - 'y': 157 - }, - { - 'x': 1413553800000, - 'y': 148 - }, - { - 'x': 1413554400000, - 'y': 149 - }, - { - 'x': 1413555000000, - 'y': 135 - }, - { - 'x': 1413555600000, - 'y': 118 - }, - { - 'x': 1413556200000, - 'y': 142 - }, - { - 'x': 1413556800000, - 'y': 141 - }, - { - 'x': 1413557400000, - 'y': 146 - }, - { - 'x': 1413558000000, - 'y': 114 - }, - { - 'x': 1413558600000, - 'y': 115 - }, - { - 'x': 1413559200000, - 'y': 136 - }, - { - 'x': 1413559800000, - 'y': 106 - }, - { - 'x': 1413560400000, - 'y': 92 - }, - { - 'x': 1413561000000, - 'y': 97 - }, - { - 'x': 1413561600000, - 'y': 90 - }, - { - 'x': 1413562200000, - 'y': 69 - }, - { - 'x': 1413562800000, - 'y': 66 - }, - { - 'x': 1413563400000, - 'y': 93 - }, - { - 'x': 1413564000000, - 'y': 75 - }, - { - 'x': 1413564600000, - 'y': 68 - }, - { - 'x': 1413565200000, - 'y': 55 - }, - { - 'x': 1413565800000, - 'y': 73 - }, - { - 'x': 1413566400000, - 'y': 57 - }, - { - 'x': 1413567000000, - 'y': 48 - }, - { - 'x': 1413567600000, - 'y': 41 - }, - { - 'x': 1413568200000, - 'y': 39 - }, - { - 'x': 1413568800000, - 'y': 32 - }, - { - 'x': 1413569400000, - 'y': 33 - }, - { - 'x': 1413570000000, - 'y': 39 - }, - { - 'x': 1413570600000, - 'y': 35 - }, - { - 'x': 1413571200000, - 'y': 25 - }, - { - 'x': 1413571800000, - 'y': 28 - }, - { - 'x': 1413572400000, - 'y': 8 - }, - { - 'x': 1413573600000, - 'y': 13 - }, - { - 'x': 1413574200000, - 'y': 23 - }, - { - 'x': 1413574800000, - 'y': 19 - }, - { - 'x': 1413575400000, - 'y': 16 - }, - { - 'x': 1413576000000, - 'y': 22 - }, - { - 'x': 1413576600000, - 'y': 13 - }, - { - 'x': 1413577200000, - 'y': 21 - }, - { - 'x': 1413577800000, - 'y': 11 - }, - { - 'x': 1413578400000, - 'y': 12 - }, - { - 'x': 1413579000000, - 'y': 10 - }, - { - 'x': 1413579600000, - 'y': 7 - }, - { - 'x': 1413580200000, - 'y': 4 - }, - { - 'x': 1413580800000, - 'y': 5 - }, - { - 'x': 1413581400000, - 'y': 7 - }, - { - 'x': 1413582000000, - 'y': 9 - }, - { - 'x': 1413582600000, - 'y': 2 - }, - { - 'x': 1413583200000, - 'y': 2 - }, - { - 'x': 1413583800000, - 'y': 4 - }, - { - 'x': 1413584400000, - 'y': 6 - }, - { - 'x': 1413585600000, - 'y': 2 - }, - { - 'x': 1413586200000, - 'y': 4 - }, - { - 'x': 1413586800000, - 'y': 4 - } - ] - } - ], - 'hits': 108970, - 'xAxisOrderedValues': [ - 1413543600000, - 1413544200000, - 1413544800000, - 1413545400000, - 1413546000000, - 1413546600000, - 1413547200000, - 1413547800000, - 1413548400000, - 1413549000000, - 1413549600000, - 1413550200000, - 1413550800000, - 1413551400000, - 1413552000000, - 1413552600000, - 1413553200000, - 1413553800000, - 1413554400000, - 1413555000000, - 1413555600000, - 1413556200000, - 1413556800000, - 1413557400000, - 1413558000000, - 1413558600000, - 1413559200000, - 1413559800000, - 1413560400000, - 1413561000000, - 1413561600000, - 1413562200000, - 1413562800000, - 1413563400000, - 1413564000000, - 1413564600000, - 1413565200000, - 1413565800000, - 1413566400000, - 1413567000000, - 1413567600000, - 1413568200000, - 1413568800000, - 1413569400000, - 1413570000000, - 1413570600000, - 1413571200000, - 1413571800000, - 1413572400000, - 1413573600000, - 1413574200000, - 1413574800000, - 1413575400000, - 1413576000000, - 1413576600000, - 1413577200000, - 1413577800000, - 1413578400000, - 1413579000000, - 1413579600000, - 1413580200000, - 1413580800000, - 1413581400000, - 1413582000000, - 1413582600000, - 1413583200000, - 1413583800000, - 1413584400000, - 1413585000000, - 1413585600000, - 1413586200000, - 1413586800000, - ], - 'xAxisFormatter': function (thing) { - return moment(thing); - }, - 'tooltipFormatter': function (d) { - return d; - } -}; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/filters/_columns.js b/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/filters/_columns.js deleted file mode 100644 index 041fad2ed15b9c..00000000000000 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/filters/_columns.js +++ /dev/null @@ -1,112 +0,0 @@ -import _ from 'lodash'; - -export default { - 'columns': [ - { - 'label': 'Mozilla/5.0 (X11; Linux x86_64; rv:6.0a1) Gecko/20110421 Firefox/6.0a1: agent.raw', - 'xAxisLabel': 'filters', - 'yAxisLabel': 'Count of documents', - 'series': [ - { - 'label': 'Count', - 'values': [ - { - 'x': 'css', - 'y': 10379 - }, - { - 'x': 'png', - 'y': 6395 - } - ] - } - ], - 'xAxisOrderedValues': ['css', 'png'], - 'xAxisFormatter': function (val) { - if (_.isObject(val)) { - return JSON.stringify(val); - } - else if (val == null) { - return ''; - } - else { - return '' + val; - } - }, - 'tooltipFormatter': function (d) { - return d; - } - }, - { - 'label': 'Mozilla/5.0 (X11; Linux i686) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.50 Safari/534.24: agent.raw', - 'xAxisLabel': 'filters', - 'yAxisLabel': 'Count of documents', - 'series': [ - { - 'label': 'Count', - 'values': [ - { - 'x': 'css', - 'y': 9253 - }, - { - 'x': 'png', - 'y': 5571 - } - ] - } - ], - 'xAxisOrderedValues': ['css', 'png'], - 'xAxisFormatter': function (val) { - if (_.isObject(val)) { - return JSON.stringify(val); - } - else if (val == null) { - return ''; - } - else { - return '' + val; - } - }, - 'tooltipFormatter': function (d) { - return d; - } - }, - { - 'label': 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322): agent.raw', - 'xAxisLabel': 'filters', - 'yAxisLabel': 'Count of documents', - 'series': [ - { - 'label': 'Count', - 'values': [ - { - 'x': 'css', - 'y': 7740 - }, - { - 'x': 'png', - 'y': 4697 - } - ] - } - ], - 'xAxisOrderedValues': ['css', 'png'], - 'xAxisFormatter': function (val) { - if (_.isObject(val)) { - return JSON.stringify(val); - } - else if (val == null) { - return ''; - } - else { - return '' + val; - } - }, - 'tooltipFormatter': function (d) { - return d; - } - } - ], - 'hits': 171443 -}; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/filters/_rows.js b/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/filters/_rows.js deleted file mode 100644 index cc4f598c7b1b7f..00000000000000 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/filters/_rows.js +++ /dev/null @@ -1,109 +0,0 @@ -import _ from 'lodash'; - -export default { - 'rows': [ - { - 'label': '200: response', - 'xAxisLabel': 'filters', - 'yAxisLabel': 'Count of documents', - 'series': [ - { - 'label': 'Count', - 'values': [ - { - 'x': 'css', - 'y': 25260 - }, - { - 'x': 'png', - 'y': 15311 - } - ] - } - ], - 'xAxisFormatter': function (val) { - if (_.isObject(val)) { - return JSON.stringify(val); - } - else if (val == null) { - return ''; - } - else { - return '' + val; - } - }, - 'tooltipFormatter': function (d) { - return d; - } - }, - { - 'label': '404: response', - 'xAxisLabel': 'filters', - 'yAxisLabel': 'Count of documents', - 'series': [ - { - 'label': 'Count', - 'values': [ - { - 'x': 'css', - 'y': 1352 - }, - { - 'x': 'png', - 'y': 826 - } - ] - } - ], - 'xAxisFormatter': function (val) { - if (_.isObject(val)) { - return JSON.stringify(val); - } - else if (val == null) { - return ''; - } - else { - return '' + val; - } - }, - 'tooltipFormatter': function (d) { - return d; - } - }, - { - 'label': '503: response', - 'xAxisLabel': 'filters', - 'yAxisLabel': 'Count of documents', - 'series': [ - { - 'label': 'Count', - 'values': [ - { - 'x': 'css', - 'y': 761 - }, - { - 'x': 'png', - 'y': 527 - } - ] - } - ], - 'xAxisFormatter': function (val) { - if (_.isObject(val)) { - return JSON.stringify(val); - } - else if (val == null) { - return ''; - } - else { - return '' + val; - } - }, - 'tooltipFormatter': function (d) { - return d; - } - } - ], - 'hits': 171443 -}; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/filters/_series.js b/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/filters/_series.js deleted file mode 100644 index 2a2d14d59b67ea..00000000000000 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/filters/_series.js +++ /dev/null @@ -1,42 +0,0 @@ -import _ from 'lodash'; - -export default { - 'label': '', - 'xAxisLabel': 'filters', - 'yAxisLabel': 'Count of documents', - 'series': [ - { - 'label': 'Count', - 'values': [ - { - 'x': 'css', - 'y': 27374 - }, - { - 'x': 'html', - 'y': 0 - }, - { - 'x': 'png', - 'y': 16663 - } - ] - } - ], - 'hits': 171454, - 'xAxisOrderedValues': ['css', 'html', 'png'], - 'xAxisFormatter': function (val) { - if (_.isObject(val)) { - return JSON.stringify(val); - } - else if (val == null) { - return ''; - } - else { - return '' + val; - } - }, - 'tooltipFormatter': function (d) { - return d; - } -}; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/geohash/_columns.js b/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/geohash/_columns.js deleted file mode 100644 index d283d793151772..00000000000000 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/geohash/_columns.js +++ /dev/null @@ -1,3745 +0,0 @@ -import _ from 'lodash'; - -export default { - 'columns': [ - { - 'title': 'Top 2 geo.dest: CN', - 'valueFormatter': _.identity, - 'geoJson': { - 'type': 'FeatureCollection', - 'features': [ - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 22.5, - 22.5 - ] - }, - 'properties': { - 'value': 42, - 'geohash': 's', - 'center': [ - 22.5, - 22.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'CN', - 'value': 'CN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': false - } - }, - 'type': 'bucket' - }, - 'key': 's', - 'value': 's', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 42, - 'value': 42, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - 0, - 0 - ], - [ - 45, - 0 - ], - [ - 45, - 45 - ], - [ - 0, - 45 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - -67.5, - 22.5 - ] - }, - 'properties': { - 'value': 31, - 'geohash': 'd', - 'center': [ - -67.5, - 22.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'CN', - 'value': 'CN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': false - } - }, - 'type': 'bucket' - }, - 'key': 'd', - 'value': 'd', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 31, - 'value': 31, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - -90, - 0 - ], - [ - -45, - 0 - ], - [ - -45, - 45 - ], - [ - -90, - 45 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 112.5, - 22.5 - ] - }, - 'properties': { - 'value': 30, - 'geohash': 'w', - 'center': [ - 112.5, - 22.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'CN', - 'value': 'CN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': false - } - }, - 'type': 'bucket' - }, - 'key': 'w', - 'value': 'w', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 30, - 'value': 30, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - 90, - 0 - ], - [ - 135, - 0 - ], - [ - 135, - 45 - ], - [ - 90, - 45 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - -112.5, - 22.5 - ] - }, - 'properties': { - 'value': 25, - 'geohash': '9', - 'center': [ - -112.5, - 22.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'CN', - 'value': 'CN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': false - } - }, - 'type': 'bucket' - }, - 'key': '9', - 'value': '9', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 25, - 'value': 25, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - -135, - 0 - ], - [ - -90, - 0 - ], - [ - -90, - 45 - ], - [ - -135, - 45 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 67.5, - 22.5 - ] - }, - 'properties': { - 'value': 22, - 'geohash': 't', - 'center': [ - 67.5, - 22.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'CN', - 'value': 'CN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': false - } - }, - 'type': 'bucket' - }, - 'key': 't', - 'value': 't', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 22, - 'value': 22, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - 45, - 0 - ], - [ - 90, - 0 - ], - [ - 90, - 45 - ], - [ - 45, - 45 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 22.5, - -22.5 - ] - }, - 'properties': { - 'value': 22, - 'geohash': 'k', - 'center': [ - 22.5, - -22.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'CN', - 'value': 'CN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': false - } - }, - 'type': 'bucket' - }, - 'key': 'k', - 'value': 'k', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 22, - 'value': 22, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - 0, - -45 - ], - [ - 45, - -45 - ], - [ - 45, - 0 - ], - [ - 0, - 0 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - -67.5, - -22.5 - ] - }, - 'properties': { - 'value': 21, - 'geohash': '6', - 'center': [ - -67.5, - -22.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'CN', - 'value': 'CN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': false - } - }, - 'type': 'bucket' - }, - 'key': '6', - 'value': '6', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 21, - 'value': 21, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - -90, - -45 - ], - [ - -45, - -45 - ], - [ - -45, - 0 - ], - [ - -90, - 0 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 22.5, - 67.5 - ] - }, - 'properties': { - 'value': 19, - 'geohash': 'u', - 'center': [ - 22.5, - 67.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'CN', - 'value': 'CN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': false - } - }, - 'type': 'bucket' - }, - 'key': 'u', - 'value': 'u', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 19, - 'value': 19, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - 0, - 45 - ], - [ - 45, - 45 - ], - [ - 45, - 90 - ], - [ - 0, - 90 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 67.5, - 67.5 - ] - }, - 'properties': { - 'value': 18, - 'geohash': 'v', - 'center': [ - 67.5, - 67.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'CN', - 'value': 'CN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': false - } - }, - 'type': 'bucket' - }, - 'key': 'v', - 'value': 'v', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 18, - 'value': 18, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - 45, - 45 - ], - [ - 90, - 45 - ], - [ - 90, - 90 - ], - [ - 45, - 90 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - -112.5, - 67.5 - ] - }, - 'properties': { - 'value': 11, - 'geohash': 'c', - 'center': [ - -112.5, - 67.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'CN', - 'value': 'CN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': false - } - }, - 'type': 'bucket' - }, - 'key': 'c', - 'value': 'c', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 11, - 'value': 11, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - -135, - 45 - ], - [ - -90, - 45 - ], - [ - -90, - 90 - ], - [ - -135, - 90 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 157.5, - -22.5 - ] - }, - 'properties': { - 'value': 10, - 'geohash': 'r', - 'center': [ - 157.5, - -22.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'CN', - 'value': 'CN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': false - } - }, - 'type': 'bucket' - }, - 'key': 'r', - 'value': 'r', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 10, - 'value': 10, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - 135, - -45 - ], - [ - 180, - -45 - ], - [ - 180, - 0 - ], - [ - 135, - 0 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 112.5, - 67.5 - ] - }, - 'properties': { - 'value': 9, - 'geohash': 'y', - 'center': [ - 112.5, - 67.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'CN', - 'value': 'CN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': false - } - }, - 'type': 'bucket' - }, - 'key': 'y', - 'value': 'y', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 9, - 'value': 9, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - 90, - 45 - ], - [ - 135, - 45 - ], - [ - 135, - 90 - ], - [ - 90, - 90 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - -22.5, - 22.5 - ] - }, - 'properties': { - 'value': 9, - 'geohash': 'e', - 'center': [ - -22.5, - 22.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'CN', - 'value': 'CN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': false - } - }, - 'type': 'bucket' - }, - 'key': 'e', - 'value': 'e', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 9, - 'value': 9, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - -45, - 0 - ], - [ - 0, - 0 - ], - [ - 0, - 45 - ], - [ - -45, - 45 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - -67.5, - 67.5 - ] - }, - 'properties': { - 'value': 8, - 'geohash': 'f', - 'center': [ - -67.5, - 67.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'CN', - 'value': 'CN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': false - } - }, - 'type': 'bucket' - }, - 'key': 'f', - 'value': 'f', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 8, - 'value': 8, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - -90, - 45 - ], - [ - -45, - 45 - ], - [ - -45, - 90 - ], - [ - -90, - 90 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - -22.5, - -22.5 - ] - }, - 'properties': { - 'value': 8, - 'geohash': '7', - 'center': [ - -22.5, - -22.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'CN', - 'value': 'CN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': false - } - }, - 'type': 'bucket' - }, - 'key': '7', - 'value': '7', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 8, - 'value': 8, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - -45, - -45 - ], - [ - 0, - -45 - ], - [ - 0, - 0 - ], - [ - -45, - 0 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 112.5, - -22.5 - ] - }, - 'properties': { - 'value': 6, - 'geohash': 'q', - 'center': [ - 112.5, - -22.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'CN', - 'value': 'CN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': false - } - }, - 'type': 'bucket' - }, - 'key': 'q', - 'value': 'q', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 6, - 'value': 6, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - 90, - -45 - ], - [ - 135, - -45 - ], - [ - 135, - 0 - ], - [ - 90, - 0 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - -22.5, - 67.5 - ] - }, - 'properties': { - 'value': 6, - 'geohash': 'g', - 'center': [ - -22.5, - 67.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'CN', - 'value': 'CN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': false - } - }, - 'type': 'bucket' - }, - 'key': 'g', - 'value': 'g', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 6, - 'value': 6, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - -45, - 45 - ], - [ - 0, - 45 - ], - [ - 0, - 90 - ], - [ - -45, - 90 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 157.5, - 22.5 - ] - }, - 'properties': { - 'value': 4, - 'geohash': 'x', - 'center': [ - 157.5, - 22.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'CN', - 'value': 'CN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': false - } - }, - 'type': 'bucket' - }, - 'key': 'x', - 'value': 'x', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 4, - 'value': 4, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - 135, - 0 - ], - [ - 180, - 0 - ], - [ - 180, - 45 - ], - [ - 135, - 45 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - -157.5, - 67.5 - ] - }, - 'properties': { - 'value': 3, - 'geohash': 'b', - 'center': [ - -157.5, - 67.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'CN', - 'value': 'CN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': false - } - }, - 'type': 'bucket' - }, - 'key': 'b', - 'value': 'b', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 3, - 'value': 3, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - -180, - 45 - ], - [ - -135, - 45 - ], - [ - -135, - 90 - ], - [ - -180, - 90 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 157.5, - 67.5 - ] - }, - 'properties': { - 'value': 2, - 'geohash': 'z', - 'center': [ - 157.5, - 67.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'CN', - 'value': 'CN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': false - } - }, - 'type': 'bucket' - }, - 'key': 'z', - 'value': 'z', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 2, - 'value': 2, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - 135, - 45 - ], - [ - 180, - 45 - ], - [ - 180, - 90 - ], - [ - 135, - 90 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 67.5, - -22.5 - ] - }, - 'properties': { - 'value': 1, - 'geohash': 'm', - 'center': [ - 67.5, - -22.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'CN', - 'value': 'CN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': false - } - }, - 'type': 'bucket' - }, - 'key': 'm', - 'value': 'm', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 1, - 'value': 1, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - 45, - -45 - ], - [ - 90, - -45 - ], - [ - 90, - 0 - ], - [ - 45, - 0 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - -22.5, - -67.5 - ] - }, - 'properties': { - 'value': 1, - 'geohash': '5', - 'center': [ - -22.5, - -67.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'CN', - 'value': 'CN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': false - } - }, - 'type': 'bucket' - }, - 'key': '5', - 'value': '5', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 1, - 'value': 1, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - -45, - -90 - ], - [ - 0, - -90 - ], - [ - 0, - -45 - ], - [ - -45, - -45 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - -67.5, - -67.5 - ] - }, - 'properties': { - 'value': 1, - 'geohash': '4', - 'center': [ - -67.5, - -67.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'CN', - 'value': 'CN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': false - } - }, - 'type': 'bucket' - }, - 'key': '4', - 'value': '4', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 1, - 'value': 1, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - -90, - -90 - ], - [ - -45, - -90 - ], - [ - -45, - -45 - ], - [ - -90, - -45 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - -112.5, - -22.5 - ] - }, - 'properties': { - 'value': 1, - 'geohash': '3', - 'center': [ - -112.5, - -22.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'CN', - 'value': 'CN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': false - } - }, - 'type': 'bucket' - }, - 'key': '3', - 'value': '3', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 1, - 'value': 1, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - -135, - -45 - ], - [ - -90, - -45 - ], - [ - -90, - 0 - ], - [ - -135, - 0 - ] - ] - } - } - ], - 'properties': { - 'min': 1, - 'max': 42 - } - } - }, - { - 'label': 'Top 2 geo.dest: IN', - 'valueFormatter': _.identity, - 'geoJson': { - 'type': 'FeatureCollection', - 'features': [ - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 22.5, - 22.5 - ] - }, - 'properties': { - 'value': 32, - 'geohash': 's', - 'center': [ - 22.5, - 22.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'IN', - 'value': 'IN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': false - } - }, - 'type': 'bucket' - }, - 'key': 's', - 'value': 's', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 32, - 'value': 32, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - 0, - 0 - ], - [ - 45, - 0 - ], - [ - 45, - 45 - ], - [ - 0, - 45 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - -67.5, - -22.5 - ] - }, - 'properties': { - 'value': 31, - 'geohash': '6', - 'center': [ - -67.5, - -22.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'IN', - 'value': 'IN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': false - } - }, - 'type': 'bucket' - }, - 'key': '6', - 'value': '6', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 31, - 'value': 31, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - -90, - -45 - ], - [ - -45, - -45 - ], - [ - -45, - 0 - ], - [ - -90, - 0 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - -67.5, - 22.5 - ] - }, - 'properties': { - 'value': 28, - 'geohash': 'd', - 'center': [ - -67.5, - 22.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'IN', - 'value': 'IN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': false - } - }, - 'type': 'bucket' - }, - 'key': 'd', - 'value': 'd', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 28, - 'value': 28, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - -90, - 0 - ], - [ - -45, - 0 - ], - [ - -45, - 45 - ], - [ - -90, - 45 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 112.5, - 22.5 - ] - }, - 'properties': { - 'value': 27, - 'geohash': 'w', - 'center': [ - 112.5, - 22.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'IN', - 'value': 'IN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': false - } - }, - 'type': 'bucket' - }, - 'key': 'w', - 'value': 'w', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 27, - 'value': 27, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - 90, - 0 - ], - [ - 135, - 0 - ], - [ - 135, - 45 - ], - [ - 90, - 45 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 67.5, - 22.5 - ] - }, - 'properties': { - 'value': 24, - 'geohash': 't', - 'center': [ - 67.5, - 22.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'IN', - 'value': 'IN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': false - } - }, - 'type': 'bucket' - }, - 'key': 't', - 'value': 't', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 24, - 'value': 24, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - 45, - 0 - ], - [ - 90, - 0 - ], - [ - 90, - 45 - ], - [ - 45, - 45 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 22.5, - -22.5 - ] - }, - 'properties': { - 'value': 23, - 'geohash': 'k', - 'center': [ - 22.5, - -22.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'IN', - 'value': 'IN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': false - } - }, - 'type': 'bucket' - }, - 'key': 'k', - 'value': 'k', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 23, - 'value': 23, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - 0, - -45 - ], - [ - 45, - -45 - ], - [ - 45, - 0 - ], - [ - 0, - 0 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 22.5, - 67.5 - ] - }, - 'properties': { - 'value': 17, - 'geohash': 'u', - 'center': [ - 22.5, - 67.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'IN', - 'value': 'IN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': false - } - }, - 'type': 'bucket' - }, - 'key': 'u', - 'value': 'u', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 17, - 'value': 17, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - 0, - 45 - ], - [ - 45, - 45 - ], - [ - 45, - 90 - ], - [ - 0, - 90 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - -112.5, - 22.5 - ] - }, - 'properties': { - 'value': 16, - 'geohash': '9', - 'center': [ - -112.5, - 22.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'IN', - 'value': 'IN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': false - } - }, - 'type': 'bucket' - }, - 'key': '9', - 'value': '9', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 16, - 'value': 16, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - -135, - 0 - ], - [ - -90, - 0 - ], - [ - -90, - 45 - ], - [ - -135, - 45 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 67.5, - 67.5 - ] - }, - 'properties': { - 'value': 14, - 'geohash': 'v', - 'center': [ - 67.5, - 67.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'IN', - 'value': 'IN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': false - } - }, - 'type': 'bucket' - }, - 'key': 'v', - 'value': 'v', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 14, - 'value': 14, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - 45, - 45 - ], - [ - 90, - 45 - ], - [ - 90, - 90 - ], - [ - 45, - 90 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - -22.5, - 22.5 - ] - }, - 'properties': { - 'value': 13, - 'geohash': 'e', - 'center': [ - -22.5, - 22.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'IN', - 'value': 'IN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': false - } - }, - 'type': 'bucket' - }, - 'key': 'e', - 'value': 'e', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 13, - 'value': 13, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - -45, - 0 - ], - [ - 0, - 0 - ], - [ - 0, - 45 - ], - [ - -45, - 45 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 157.5, - -22.5 - ] - }, - 'properties': { - 'value': 9, - 'geohash': 'r', - 'center': [ - 157.5, - -22.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'IN', - 'value': 'IN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': false - } - }, - 'type': 'bucket' - }, - 'key': 'r', - 'value': 'r', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 9, - 'value': 9, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - 135, - -45 - ], - [ - 180, - -45 - ], - [ - 180, - 0 - ], - [ - 135, - 0 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 112.5, - 67.5 - ] - }, - 'properties': { - 'value': 6, - 'geohash': 'y', - 'center': [ - 112.5, - 67.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'IN', - 'value': 'IN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': false - } - }, - 'type': 'bucket' - }, - 'key': 'y', - 'value': 'y', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 6, - 'value': 6, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - 90, - 45 - ], - [ - 135, - 45 - ], - [ - 135, - 90 - ], - [ - 90, - 90 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - -22.5, - 67.5 - ] - }, - 'properties': { - 'value': 6, - 'geohash': 'g', - 'center': [ - -22.5, - 67.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'IN', - 'value': 'IN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': false - } - }, - 'type': 'bucket' - }, - 'key': 'g', - 'value': 'g', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 6, - 'value': 6, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - -45, - 45 - ], - [ - 0, - 45 - ], - [ - 0, - 90 - ], - [ - -45, - 90 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - -67.5, - 67.5 - ] - }, - 'properties': { - 'value': 6, - 'geohash': 'f', - 'center': [ - -67.5, - 67.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'IN', - 'value': 'IN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': false - } - }, - 'type': 'bucket' - }, - 'key': 'f', - 'value': 'f', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 6, - 'value': 6, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - -90, - 45 - ], - [ - -45, - 45 - ], - [ - -45, - 90 - ], - [ - -90, - 90 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - -112.5, - 67.5 - ] - }, - 'properties': { - 'value': 5, - 'geohash': 'c', - 'center': [ - -112.5, - 67.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'IN', - 'value': 'IN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': false - } - }, - 'type': 'bucket' - }, - 'key': 'c', - 'value': 'c', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 5, - 'value': 5, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - -135, - 45 - ], - [ - -90, - 45 - ], - [ - -90, - 90 - ], - [ - -135, - 90 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - -157.5, - 67.5 - ] - }, - 'properties': { - 'value': 4, - 'geohash': 'b', - 'center': [ - -157.5, - 67.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'IN', - 'value': 'IN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': false - } - }, - 'type': 'bucket' - }, - 'key': 'b', - 'value': 'b', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 4, - 'value': 4, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - -180, - 45 - ], - [ - -135, - 45 - ], - [ - -135, - 90 - ], - [ - -180, - 90 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 112.5, - -22.5 - ] - }, - 'properties': { - 'value': 3, - 'geohash': 'q', - 'center': [ - 112.5, - -22.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'IN', - 'value': 'IN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': false - } - }, - 'type': 'bucket' - }, - 'key': 'q', - 'value': 'q', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 3, - 'value': 3, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - 90, - -45 - ], - [ - 135, - -45 - ], - [ - 135, - 0 - ], - [ - 90, - 0 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - -67.5, - -67.5 - ] - }, - 'properties': { - 'value': 2, - 'geohash': '4', - 'center': [ - -67.5, - -67.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'IN', - 'value': 'IN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': false - } - }, - 'type': 'bucket' - }, - 'key': '4', - 'value': '4', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 2, - 'value': 2, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - -90, - -90 - ], - [ - -45, - -90 - ], - [ - -45, - -45 - ], - [ - -90, - -45 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 157.5, - 67.5 - ] - }, - 'properties': { - 'value': 1, - 'geohash': 'z', - 'center': [ - 157.5, - 67.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'IN', - 'value': 'IN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': false - } - }, - 'type': 'bucket' - }, - 'key': 'z', - 'value': 'z', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 1, - 'value': 1, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - 135, - 45 - ], - [ - 180, - 45 - ], - [ - 180, - 90 - ], - [ - 135, - 90 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 157.5, - 22.5 - ] - }, - 'properties': { - 'value': 1, - 'geohash': 'x', - 'center': [ - 157.5, - 22.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'IN', - 'value': 'IN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': false - } - }, - 'type': 'bucket' - }, - 'key': 'x', - 'value': 'x', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 1, - 'value': 1, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - 135, - 0 - ], - [ - 180, - 0 - ], - [ - 180, - 45 - ], - [ - 135, - 45 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 157.5, - -67.5 - ] - }, - 'properties': { - 'value': 1, - 'geohash': 'p', - 'center': [ - 157.5, - -67.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'IN', - 'value': 'IN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': false - } - }, - 'type': 'bucket' - }, - 'key': 'p', - 'value': 'p', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 1, - 'value': 1, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - 135, - -90 - ], - [ - 180, - -90 - ], - [ - 180, - -45 - ], - [ - 135, - -45 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 67.5, - -22.5 - ] - }, - 'properties': { - 'value': 1, - 'geohash': 'm', - 'center': [ - 67.5, - -22.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'IN', - 'value': 'IN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': false - } - }, - 'type': 'bucket' - }, - 'key': 'm', - 'value': 'm', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 1, - 'value': 1, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - 45, - -45 - ], - [ - 90, - -45 - ], - [ - 90, - 0 - ], - [ - 45, - 0 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - -22.5, - -22.5 - ] - }, - 'properties': { - 'value': 1, - 'geohash': '7', - 'center': [ - -22.5, - -22.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'IN', - 'value': 'IN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': false - } - }, - 'type': 'bucket' - }, - 'key': '7', - 'value': '7', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 1, - 'value': 1, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - -45, - -45 - ], - [ - 0, - -45 - ], - [ - 0, - 0 - ], - [ - -45, - 0 - ] - ] - } - } - ], - 'properties': { - 'min': 1, - 'max': 32 - } - } - } - ] -}; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/geohash/_geo_json.js b/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/geohash/_geo_json.js deleted file mode 100644 index 4e65502f8d2788..00000000000000 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/geohash/_geo_json.js +++ /dev/null @@ -1,1847 +0,0 @@ -import _ from 'lodash'; - -export default { - 'valueFormatter': _.identity, - 'geohashGridAgg': { 'vis': { 'params': {} } }, - 'geoJson': { - 'type': 'FeatureCollection', - 'features': [ - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 22.5, - 22.5 - ] - }, - 'properties': { - 'value': 608, - 'geohash': 's', - 'center': [ - 22.5, - 22.5 - ], - 'aggConfigResult': { - '$parent': { - 'key': 's', - 'value': 's', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 608, - 'value': 608, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - 0, - 0 - ], - [ - 0, - 45 - ], - [ - 45, - 45 - ], - [ - 45, - 0 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 112.5, - 22.5 - ] - }, - 'properties': { - 'value': 522, - 'geohash': 'w', - 'center': [ - 112.5, - 22.5 - ], - 'aggConfigResult': { - '$parent': { - 'key': 'w', - 'value': 'w', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 522, - 'value': 522, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - 0, - 90 - ], - [ - 0, - 135 - ], - [ - 45, - 135 - ], - [ - 45, - 90 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - -67.5, - -22.5 - ] - }, - 'properties': { - 'value': 517, - 'geohash': '6', - 'center': [ - -67.5, - -22.5 - ], - 'aggConfigResult': { - '$parent': { - 'key': '6', - 'value': '6', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 517, - 'value': 517, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - -45, - -90 - ], - [ - -45, - -45 - ], - [ - 0, - -45 - ], - [ - 0, - -90 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - -67.5, - 22.5 - ] - }, - 'properties': { - 'value': 446, - 'geohash': 'd', - 'center': [ - -67.5, - 22.5 - ], - 'aggConfigResult': { - '$parent': { - 'key': 'd', - 'value': 'd', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 446, - 'value': 446, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - 0, - -90 - ], - [ - 0, - -45 - ], - [ - 45, - -45 - ], - [ - 45, - -90 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 22.5, - 67.5 - ] - }, - 'properties': { - 'value': 426, - 'geohash': 'u', - 'center': [ - 22.5, - 67.5 - ], - 'aggConfigResult': { - '$parent': { - 'key': 'u', - 'value': 'u', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 426, - 'value': 426, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - 45, - 0 - ], - [ - 45, - 45 - ], - [ - 90, - 45 - ], - [ - 90, - 0 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 67.5, - 22.5 - ] - }, - 'properties': { - 'value': 413, - 'geohash': 't', - 'center': [ - 67.5, - 22.5 - ], - 'aggConfigResult': { - '$parent': { - 'key': 't', - 'value': 't', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 413, - 'value': 413, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - 0, - 45 - ], - [ - 0, - 90 - ], - [ - 45, - 90 - ], - [ - 45, - 45 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 22.5, - -22.5 - ] - }, - 'properties': { - 'value': 362, - 'geohash': 'k', - 'center': [ - 22.5, - -22.5 - ], - 'aggConfigResult': { - '$parent': { - 'key': 'k', - 'value': 'k', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 362, - 'value': 362, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - -45, - 0 - ], - [ - -45, - 45 - ], - [ - 0, - 45 - ], - [ - 0, - 0 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - -112.5, - 22.5 - ] - }, - 'properties': { - 'value': 352, - 'geohash': '9', - 'center': [ - -112.5, - 22.5 - ], - 'aggConfigResult': { - '$parent': { - 'key': '9', - 'value': '9', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 352, - 'value': 352, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - 0, - -135 - ], - [ - 0, - -90 - ], - [ - 45, - -90 - ], - [ - 45, - -135 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - -22.5, - 22.5 - ] - }, - 'properties': { - 'value': 216, - 'geohash': 'e', - 'center': [ - -22.5, - 22.5 - ], - 'aggConfigResult': { - '$parent': { - 'key': 'e', - 'value': 'e', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 216, - 'value': 216, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - 0, - -45 - ], - [ - 0, - 0 - ], - [ - 45, - 0 - ], - [ - 45, - -45 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 67.5, - 67.5 - ] - }, - 'properties': { - 'value': 183, - 'geohash': 'v', - 'center': [ - 67.5, - 67.5 - ], - 'aggConfigResult': { - '$parent': { - 'key': 'v', - 'value': 'v', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 183, - 'value': 183, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - 45, - 45 - ], - [ - 45, - 90 - ], - [ - 90, - 90 - ], - [ - 90, - 45 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 157.5, - -22.5 - ] - }, - 'properties': { - 'value': 158, - 'geohash': 'r', - 'center': [ - 157.5, - -22.5 - ], - 'aggConfigResult': { - '$parent': { - 'key': 'r', - 'value': 'r', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 158, - 'value': 158, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - -45, - 135 - ], - [ - -45, - 180 - ], - [ - 0, - 180 - ], - [ - 0, - 135 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 112.5, - 67.5 - ] - }, - 'properties': { - 'value': 139, - 'geohash': 'y', - 'center': [ - 112.5, - 67.5 - ], - 'aggConfigResult': { - '$parent': { - 'key': 'y', - 'value': 'y', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 139, - 'value': 139, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - 45, - 90 - ], - [ - 45, - 135 - ], - [ - 90, - 135 - ], - [ - 90, - 90 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - -112.5, - 67.5 - ] - }, - 'properties': { - 'value': 110, - 'geohash': 'c', - 'center': [ - -112.5, - 67.5 - ], - 'aggConfigResult': { - '$parent': { - 'key': 'c', - 'value': 'c', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 110, - 'value': 110, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - 45, - -135 - ], - [ - 45, - -90 - ], - [ - 90, - -90 - ], - [ - 90, - -135 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 112.5, - -22.5 - ] - }, - 'properties': { - 'value': 101, - 'geohash': 'q', - 'center': [ - 112.5, - -22.5 - ], - 'aggConfigResult': { - '$parent': { - 'key': 'q', - 'value': 'q', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 101, - 'value': 101, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - -45, - 90 - ], - [ - -45, - 135 - ], - [ - 0, - 135 - ], - [ - 0, - 90 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - -22.5, - -22.5 - ] - }, - 'properties': { - 'value': 101, - 'geohash': '7', - 'center': [ - -22.5, - -22.5 - ], - 'aggConfigResult': { - '$parent': { - 'key': '7', - 'value': '7', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 101, - 'value': 101, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - -45, - -45 - ], - [ - -45, - 0 - ], - [ - 0, - 0 - ], - [ - 0, - -45 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - -67.5, - 67.5 - ] - }, - 'properties': { - 'value': 92, - 'geohash': 'f', - 'center': [ - -67.5, - 67.5 - ], - 'aggConfigResult': { - '$parent': { - 'key': 'f', - 'value': 'f', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 92, - 'value': 92, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - 45, - -90 - ], - [ - 45, - -45 - ], - [ - 90, - -45 - ], - [ - 90, - -90 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - -157.5, - 67.5 - ] - }, - 'properties': { - 'value': 75, - 'geohash': 'b', - 'center': [ - -157.5, - 67.5 - ], - 'aggConfigResult': { - '$parent': { - 'key': 'b', - 'value': 'b', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 75, - 'value': 75, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - 45, - -180 - ], - [ - 45, - -135 - ], - [ - 90, - -135 - ], - [ - 90, - -180 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - -22.5, - 67.5 - ] - }, - 'properties': { - 'value': 64, - 'geohash': 'g', - 'center': [ - -22.5, - 67.5 - ], - 'aggConfigResult': { - '$parent': { - 'key': 'g', - 'value': 'g', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 64, - 'value': 64, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - 45, - -45 - ], - [ - 45, - 0 - ], - [ - 90, - 0 - ], - [ - 90, - -45 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 157.5, - 67.5 - ] - }, - 'properties': { - 'value': 36, - 'geohash': 'z', - 'center': [ - 157.5, - 67.5 - ], - 'aggConfigResult': { - '$parent': { - 'key': 'z', - 'value': 'z', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 36, - 'value': 36, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - 45, - 135 - ], - [ - 45, - 180 - ], - [ - 90, - 180 - ], - [ - 90, - 135 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 157.5, - 22.5 - ] - }, - 'properties': { - 'value': 34, - 'geohash': 'x', - 'center': [ - 157.5, - 22.5 - ], - 'aggConfigResult': { - '$parent': { - 'key': 'x', - 'value': 'x', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 34, - 'value': 34, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - 0, - 135 - ], - [ - 0, - 180 - ], - [ - 45, - 180 - ], - [ - 45, - 135 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - -67.5, - -67.5 - ] - }, - 'properties': { - 'value': 30, - 'geohash': '4', - 'center': [ - -67.5, - -67.5 - ], - 'aggConfigResult': { - '$parent': { - 'key': '4', - 'value': '4', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 30, - 'value': 30, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - -90, - -90 - ], - [ - -90, - -45 - ], - [ - -45, - -45 - ], - [ - -45, - -90 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 67.5, - -22.5 - ] - }, - 'properties': { - 'value': 16, - 'geohash': 'm', - 'center': [ - 67.5, - -22.5 - ], - 'aggConfigResult': { - '$parent': { - 'key': 'm', - 'value': 'm', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 16, - 'value': 16, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - -45, - 45 - ], - [ - -45, - 90 - ], - [ - 0, - 90 - ], - [ - 0, - 45 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - -22.5, - -67.5 - ] - }, - 'properties': { - 'value': 10, - 'geohash': '5', - 'center': [ - -22.5, - -67.5 - ], - 'aggConfigResult': { - '$parent': { - 'key': '5', - 'value': '5', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 10, - 'value': 10, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - -90, - -45 - ], - [ - -90, - 0 - ], - [ - -45, - 0 - ], - [ - -45, - -45 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 157.5, - -67.5 - ] - }, - 'properties': { - 'value': 6, - 'geohash': 'p', - 'center': [ - 157.5, - -67.5 - ], - 'aggConfigResult': { - '$parent': { - 'key': 'p', - 'value': 'p', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 6, - 'value': 6, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - -90, - 135 - ], - [ - -90, - 180 - ], - [ - -45, - 180 - ], - [ - -45, - 135 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - -157.5, - -22.5 - ] - }, - 'properties': { - 'value': 6, - 'geohash': '2', - 'center': [ - -157.5, - -22.5 - ], - 'aggConfigResult': { - '$parent': { - 'key': '2', - 'value': '2', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 6, - 'value': 6, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - -45, - -180 - ], - [ - -45, - -135 - ], - [ - 0, - -135 - ], - [ - 0, - -180 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 22.5, - -67.5 - ] - }, - 'properties': { - 'value': 4, - 'geohash': 'h', - 'center': [ - 22.5, - -67.5 - ], - 'aggConfigResult': { - '$parent': { - 'key': 'h', - 'value': 'h', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 4, - 'value': 4, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - -90, - 0 - ], - [ - -90, - 45 - ], - [ - -45, - 45 - ], - [ - -45, - 0 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 112.5, - -67.5 - ] - }, - 'properties': { - 'value': 2, - 'geohash': 'n', - 'center': [ - 112.5, - -67.5 - ], - 'aggConfigResult': { - '$parent': { - 'key': 'n', - 'value': 'n', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 2, - 'value': 2, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - -90, - 90 - ], - [ - -90, - 135 - ], - [ - -45, - 135 - ], - [ - -45, - 90 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 67.5, - -67.5 - ] - }, - 'properties': { - 'value': 2, - 'geohash': 'j', - 'center': [ - 67.5, - -67.5 - ], - 'aggConfigResult': { - '$parent': { - 'key': 'j', - 'value': 'j', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 2, - 'value': 2, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - -90, - 45 - ], - [ - -90, - 90 - ], - [ - -45, - 90 - ], - [ - -45, - 45 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - -112.5, - -22.5 - ] - }, - 'properties': { - 'value': 1, - 'geohash': '3', - 'center': [ - -112.5, - -22.5 - ], - 'aggConfigResult': { - '$parent': { - 'key': '3', - 'value': '3', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 1, - 'value': 1, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - -45, - -135 - ], - [ - -45, - -90 - ], - [ - 0, - -90 - ], - [ - 0, - -135 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - -112.5, - -67.5 - ] - }, - 'properties': { - 'value': 1, - 'geohash': '1', - 'center': [ - -112.5, - -67.5 - ], - 'aggConfigResult': { - '$parent': { - 'key': '1', - 'value': '1', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 1, - 'value': 1, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - -90, - -135 - ], - [ - -90, - -90 - ], - [ - -45, - -90 - ], - [ - -45, - -135 - ] - ] - } - } - ], - 'properties': { - 'min': 1, - 'max': 608, - 'zoom': 2, - 'center': [5, 15] - } - }, -}; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/geohash/_rows.js b/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/geohash/_rows.js deleted file mode 100644 index 64deea0e391a6e..00000000000000 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/geohash/_rows.js +++ /dev/null @@ -1,3667 +0,0 @@ -import _ from 'lodash'; - -export default { - 'rows': [ - { - 'title': 'Top 2 geo.dest: CN', - 'valueFormatter': _.identity, - 'geoJson': { - 'type': 'FeatureCollection', - 'features': [ - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 22.5, - 22.5 - ] - }, - 'properties': { - 'value': 39, - 'geohash': 's', - 'center': [ - 22.5, - 22.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'CN', - 'value': 'CN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': true - } - }, - 'type': 'bucket' - }, - 'key': 's', - 'value': 's', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 39, - 'value': 39, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - 0, - 0 - ], - [ - 45, - 0 - ], - [ - 45, - 45 - ], - [ - 0, - 45 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 112.5, - 22.5 - ] - }, - 'properties': { - 'value': 31, - 'geohash': 'w', - 'center': [ - 112.5, - 22.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'CN', - 'value': 'CN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': true - } - }, - 'type': 'bucket' - }, - 'key': 'w', - 'value': 'w', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 31, - 'value': 31, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - 90, - 0 - ], - [ - 135, - 0 - ], - [ - 135, - 45 - ], - [ - 90, - 45 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - -67.5, - 22.5 - ] - }, - 'properties': { - 'value': 30, - 'geohash': 'd', - 'center': [ - -67.5, - 22.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'CN', - 'value': 'CN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': true - } - }, - 'type': 'bucket' - }, - 'key': 'd', - 'value': 'd', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 30, - 'value': 30, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - -90, - 0 - ], - [ - -45, - 0 - ], - [ - -45, - 45 - ], - [ - -90, - 45 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - -112.5, - 22.5 - ] - }, - 'properties': { - 'value': 25, - 'geohash': '9', - 'center': [ - -112.5, - 22.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'CN', - 'value': 'CN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': true - } - }, - 'type': 'bucket' - }, - 'key': '9', - 'value': '9', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 25, - 'value': 25, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - -135, - 0 - ], - [ - -90, - 0 - ], - [ - -90, - 45 - ], - [ - -135, - 45 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 67.5, - 22.5 - ] - }, - 'properties': { - 'value': 23, - 'geohash': 't', - 'center': [ - 67.5, - 22.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'CN', - 'value': 'CN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': true - } - }, - 'type': 'bucket' - }, - 'key': 't', - 'value': 't', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 23, - 'value': 23, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - 45, - 0 - ], - [ - 90, - 0 - ], - [ - 90, - 45 - ], - [ - 45, - 45 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 22.5, - -22.5 - ] - }, - 'properties': { - 'value': 23, - 'geohash': 'k', - 'center': [ - 22.5, - -22.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'CN', - 'value': 'CN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': true - } - }, - 'type': 'bucket' - }, - 'key': 'k', - 'value': 'k', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 23, - 'value': 23, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - 0, - -45 - ], - [ - 45, - -45 - ], - [ - 45, - 0 - ], - [ - 0, - 0 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - -67.5, - -22.5 - ] - }, - 'properties': { - 'value': 22, - 'geohash': '6', - 'center': [ - -67.5, - -22.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'CN', - 'value': 'CN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': true - } - }, - 'type': 'bucket' - }, - 'key': '6', - 'value': '6', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 22, - 'value': 22, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - -90, - -45 - ], - [ - -45, - -45 - ], - [ - -45, - 0 - ], - [ - -90, - 0 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 22.5, - 67.5 - ] - }, - 'properties': { - 'value': 20, - 'geohash': 'u', - 'center': [ - 22.5, - 67.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'CN', - 'value': 'CN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': true - } - }, - 'type': 'bucket' - }, - 'key': 'u', - 'value': 'u', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 20, - 'value': 20, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - 0, - 45 - ], - [ - 45, - 45 - ], - [ - 45, - 90 - ], - [ - 0, - 90 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 67.5, - 67.5 - ] - }, - 'properties': { - 'value': 18, - 'geohash': 'v', - 'center': [ - 67.5, - 67.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'CN', - 'value': 'CN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': true - } - }, - 'type': 'bucket' - }, - 'key': 'v', - 'value': 'v', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 18, - 'value': 18, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - 45, - 45 - ], - [ - 90, - 45 - ], - [ - 90, - 90 - ], - [ - 45, - 90 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 157.5, - -22.5 - ] - }, - 'properties': { - 'value': 11, - 'geohash': 'r', - 'center': [ - 157.5, - -22.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'CN', - 'value': 'CN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': true - } - }, - 'type': 'bucket' - }, - 'key': 'r', - 'value': 'r', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 11, - 'value': 11, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - 135, - -45 - ], - [ - 180, - -45 - ], - [ - 180, - 0 - ], - [ - 135, - 0 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - -22.5, - 22.5 - ] - }, - 'properties': { - 'value': 11, - 'geohash': 'e', - 'center': [ - -22.5, - 22.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'CN', - 'value': 'CN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': true - } - }, - 'type': 'bucket' - }, - 'key': 'e', - 'value': 'e', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 11, - 'value': 11, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - -45, - 0 - ], - [ - 0, - 0 - ], - [ - 0, - 45 - ], - [ - -45, - 45 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 112.5, - 67.5 - ] - }, - 'properties': { - 'value': 10, - 'geohash': 'y', - 'center': [ - 112.5, - 67.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'CN', - 'value': 'CN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': true - } - }, - 'type': 'bucket' - }, - 'key': 'y', - 'value': 'y', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 10, - 'value': 10, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - 90, - 45 - ], - [ - 135, - 45 - ], - [ - 135, - 90 - ], - [ - 90, - 90 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - -112.5, - 67.5 - ] - }, - 'properties': { - 'value': 10, - 'geohash': 'c', - 'center': [ - -112.5, - 67.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'CN', - 'value': 'CN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': true - } - }, - 'type': 'bucket' - }, - 'key': 'c', - 'value': 'c', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 10, - 'value': 10, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - -135, - 45 - ], - [ - -90, - 45 - ], - [ - -90, - 90 - ], - [ - -135, - 90 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - -67.5, - 67.5 - ] - }, - 'properties': { - 'value': 8, - 'geohash': 'f', - 'center': [ - -67.5, - 67.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'CN', - 'value': 'CN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': true - } - }, - 'type': 'bucket' - }, - 'key': 'f', - 'value': 'f', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 8, - 'value': 8, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - -90, - 45 - ], - [ - -45, - 45 - ], - [ - -45, - 90 - ], - [ - -90, - 90 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - -22.5, - -22.5 - ] - }, - 'properties': { - 'value': 8, - 'geohash': '7', - 'center': [ - -22.5, - -22.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'CN', - 'value': 'CN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': true - } - }, - 'type': 'bucket' - }, - 'key': '7', - 'value': '7', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 8, - 'value': 8, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - -45, - -45 - ], - [ - 0, - -45 - ], - [ - 0, - 0 - ], - [ - -45, - 0 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 112.5, - -22.5 - ] - }, - 'properties': { - 'value': 6, - 'geohash': 'q', - 'center': [ - 112.5, - -22.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'CN', - 'value': 'CN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': true - } - }, - 'type': 'bucket' - }, - 'key': 'q', - 'value': 'q', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 6, - 'value': 6, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - 90, - -45 - ], - [ - 135, - -45 - ], - [ - 135, - 0 - ], - [ - 90, - 0 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - -22.5, - 67.5 - ] - }, - 'properties': { - 'value': 6, - 'geohash': 'g', - 'center': [ - -22.5, - 67.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'CN', - 'value': 'CN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': true - } - }, - 'type': 'bucket' - }, - 'key': 'g', - 'value': 'g', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 6, - 'value': 6, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - -45, - 45 - ], - [ - 0, - 45 - ], - [ - 0, - 90 - ], - [ - -45, - 90 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 157.5, - 22.5 - ] - }, - 'properties': { - 'value': 4, - 'geohash': 'x', - 'center': [ - 157.5, - 22.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'CN', - 'value': 'CN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': true - } - }, - 'type': 'bucket' - }, - 'key': 'x', - 'value': 'x', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 4, - 'value': 4, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - 135, - 0 - ], - [ - 180, - 0 - ], - [ - 180, - 45 - ], - [ - 135, - 45 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - -157.5, - 67.5 - ] - }, - 'properties': { - 'value': 3, - 'geohash': 'b', - 'center': [ - -157.5, - 67.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'CN', - 'value': 'CN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': true - } - }, - 'type': 'bucket' - }, - 'key': 'b', - 'value': 'b', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 3, - 'value': 3, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - -180, - 45 - ], - [ - -135, - 45 - ], - [ - -135, - 90 - ], - [ - -180, - 90 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 157.5, - 67.5 - ] - }, - 'properties': { - 'value': 2, - 'geohash': 'z', - 'center': [ - 157.5, - 67.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'CN', - 'value': 'CN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': true - } - }, - 'type': 'bucket' - }, - 'key': 'z', - 'value': 'z', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 2, - 'value': 2, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - 135, - 45 - ], - [ - 180, - 45 - ], - [ - 180, - 90 - ], - [ - 135, - 90 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - -67.5, - -67.5 - ] - }, - 'properties': { - 'value': 2, - 'geohash': '4', - 'center': [ - -67.5, - -67.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'CN', - 'value': 'CN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': true - } - }, - 'type': 'bucket' - }, - 'key': '4', - 'value': '4', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 2, - 'value': 2, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - -90, - -90 - ], - [ - -45, - -90 - ], - [ - -45, - -45 - ], - [ - -90, - -45 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - -22.5, - -67.5 - ] - }, - 'properties': { - 'value': 1, - 'geohash': '5', - 'center': [ - -22.5, - -67.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'CN', - 'value': 'CN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': true - } - }, - 'type': 'bucket' - }, - 'key': '5', - 'value': '5', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 1, - 'value': 1, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - -45, - -90 - ], - [ - 0, - -90 - ], - [ - 0, - -45 - ], - [ - -45, - -45 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - -112.5, - -22.5 - ] - }, - 'properties': { - 'value': 1, - 'geohash': '3', - 'center': [ - -112.5, - -22.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'CN', - 'value': 'CN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': true - } - }, - 'type': 'bucket' - }, - 'key': '3', - 'value': '3', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 1, - 'value': 1, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - -135, - -45 - ], - [ - -90, - -45 - ], - [ - -90, - 0 - ], - [ - -135, - 0 - ] - ] - } - } - ], - 'properties': { - 'min': 1, - 'max': 39 - } - } - }, - { - 'label': 'Top 2 geo.dest: IN', - 'valueFormatter': _.identity, - 'geoJson': { - 'type': 'FeatureCollection', - 'features': [ - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - -67.5, - -22.5 - ] - }, - 'properties': { - 'value': 31, - 'geohash': '6', - 'center': [ - -67.5, - -22.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'IN', - 'value': 'IN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': true - } - }, - 'type': 'bucket' - }, - 'key': '6', - 'value': '6', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 31, - 'value': 31, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - -90, - -45 - ], - [ - -45, - -45 - ], - [ - -45, - 0 - ], - [ - -90, - 0 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 22.5, - 22.5 - ] - }, - 'properties': { - 'value': 30, - 'geohash': 's', - 'center': [ - 22.5, - 22.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'IN', - 'value': 'IN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': true - } - }, - 'type': 'bucket' - }, - 'key': 's', - 'value': 's', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 30, - 'value': 30, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - 0, - 0 - ], - [ - 45, - 0 - ], - [ - 45, - 45 - ], - [ - 0, - 45 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 112.5, - 22.5 - ] - }, - 'properties': { - 'value': 29, - 'geohash': 'w', - 'center': [ - 112.5, - 22.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'IN', - 'value': 'IN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': true - } - }, - 'type': 'bucket' - }, - 'key': 'w', - 'value': 'w', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 29, - 'value': 29, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - 90, - 0 - ], - [ - 135, - 0 - ], - [ - 135, - 45 - ], - [ - 90, - 45 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - -67.5, - 22.5 - ] - }, - 'properties': { - 'value': 28, - 'geohash': 'd', - 'center': [ - -67.5, - 22.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'IN', - 'value': 'IN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': true - } - }, - 'type': 'bucket' - }, - 'key': 'd', - 'value': 'd', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 28, - 'value': 28, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - -90, - 0 - ], - [ - -45, - 0 - ], - [ - -45, - 45 - ], - [ - -90, - 45 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 67.5, - 22.5 - ] - }, - 'properties': { - 'value': 25, - 'geohash': 't', - 'center': [ - 67.5, - 22.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'IN', - 'value': 'IN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': true - } - }, - 'type': 'bucket' - }, - 'key': 't', - 'value': 't', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 25, - 'value': 25, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - 45, - 0 - ], - [ - 90, - 0 - ], - [ - 90, - 45 - ], - [ - 45, - 45 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 22.5, - -22.5 - ] - }, - 'properties': { - 'value': 24, - 'geohash': 'k', - 'center': [ - 22.5, - -22.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'IN', - 'value': 'IN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': true - } - }, - 'type': 'bucket' - }, - 'key': 'k', - 'value': 'k', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 24, - 'value': 24, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - 0, - -45 - ], - [ - 45, - -45 - ], - [ - 45, - 0 - ], - [ - 0, - 0 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 22.5, - 67.5 - ] - }, - 'properties': { - 'value': 20, - 'geohash': 'u', - 'center': [ - 22.5, - 67.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'IN', - 'value': 'IN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': true - } - }, - 'type': 'bucket' - }, - 'key': 'u', - 'value': 'u', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 20, - 'value': 20, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - 0, - 45 - ], - [ - 45, - 45 - ], - [ - 45, - 90 - ], - [ - 0, - 90 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - -112.5, - 22.5 - ] - }, - 'properties': { - 'value': 18, - 'geohash': '9', - 'center': [ - -112.5, - 22.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'IN', - 'value': 'IN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': true - } - }, - 'type': 'bucket' - }, - 'key': '9', - 'value': '9', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 18, - 'value': 18, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - -135, - 0 - ], - [ - -90, - 0 - ], - [ - -90, - 45 - ], - [ - -135, - 45 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 67.5, - 67.5 - ] - }, - 'properties': { - 'value': 14, - 'geohash': 'v', - 'center': [ - 67.5, - 67.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'IN', - 'value': 'IN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': true - } - }, - 'type': 'bucket' - }, - 'key': 'v', - 'value': 'v', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 14, - 'value': 14, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - 45, - 45 - ], - [ - 90, - 45 - ], - [ - 90, - 90 - ], - [ - 45, - 90 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - -22.5, - 22.5 - ] - }, - 'properties': { - 'value': 11, - 'geohash': 'e', - 'center': [ - -22.5, - 22.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'IN', - 'value': 'IN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': true - } - }, - 'type': 'bucket' - }, - 'key': 'e', - 'value': 'e', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 11, - 'value': 11, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - -45, - 0 - ], - [ - 0, - 0 - ], - [ - 0, - 45 - ], - [ - -45, - 45 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 157.5, - -22.5 - ] - }, - 'properties': { - 'value': 9, - 'geohash': 'r', - 'center': [ - 157.5, - -22.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'IN', - 'value': 'IN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': true - } - }, - 'type': 'bucket' - }, - 'key': 'r', - 'value': 'r', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 9, - 'value': 9, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - 135, - -45 - ], - [ - 180, - -45 - ], - [ - 180, - 0 - ], - [ - 135, - 0 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 112.5, - 67.5 - ] - }, - 'properties': { - 'value': 6, - 'geohash': 'y', - 'center': [ - 112.5, - 67.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'IN', - 'value': 'IN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': true - } - }, - 'type': 'bucket' - }, - 'key': 'y', - 'value': 'y', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 6, - 'value': 6, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - 90, - 45 - ], - [ - 135, - 45 - ], - [ - 135, - 90 - ], - [ - 90, - 90 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - -67.5, - 67.5 - ] - }, - 'properties': { - 'value': 6, - 'geohash': 'f', - 'center': [ - -67.5, - 67.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'IN', - 'value': 'IN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': true - } - }, - 'type': 'bucket' - }, - 'key': 'f', - 'value': 'f', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 6, - 'value': 6, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - -90, - 45 - ], - [ - -45, - 45 - ], - [ - -45, - 90 - ], - [ - -90, - 90 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - -22.5, - 67.5 - ] - }, - 'properties': { - 'value': 5, - 'geohash': 'g', - 'center': [ - -22.5, - 67.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'IN', - 'value': 'IN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': true - } - }, - 'type': 'bucket' - }, - 'key': 'g', - 'value': 'g', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 5, - 'value': 5, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - -45, - 45 - ], - [ - 0, - 45 - ], - [ - 0, - 90 - ], - [ - -45, - 90 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - -112.5, - 67.5 - ] - }, - 'properties': { - 'value': 5, - 'geohash': 'c', - 'center': [ - -112.5, - 67.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'IN', - 'value': 'IN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': true - } - }, - 'type': 'bucket' - }, - 'key': 'c', - 'value': 'c', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 5, - 'value': 5, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - -135, - 45 - ], - [ - -90, - 45 - ], - [ - -90, - 90 - ], - [ - -135, - 90 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - -157.5, - 67.5 - ] - }, - 'properties': { - 'value': 4, - 'geohash': 'b', - 'center': [ - -157.5, - 67.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'IN', - 'value': 'IN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': true - } - }, - 'type': 'bucket' - }, - 'key': 'b', - 'value': 'b', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 4, - 'value': 4, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - -180, - 45 - ], - [ - -135, - 45 - ], - [ - -135, - 90 - ], - [ - -180, - 90 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 112.5, - -22.5 - ] - }, - 'properties': { - 'value': 3, - 'geohash': 'q', - 'center': [ - 112.5, - -22.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'IN', - 'value': 'IN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': true - } - }, - 'type': 'bucket' - }, - 'key': 'q', - 'value': 'q', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 3, - 'value': 3, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - 90, - -45 - ], - [ - 135, - -45 - ], - [ - 135, - 0 - ], - [ - 90, - 0 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - -67.5, - -67.5 - ] - }, - 'properties': { - 'value': 2, - 'geohash': '4', - 'center': [ - -67.5, - -67.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'IN', - 'value': 'IN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': true - } - }, - 'type': 'bucket' - }, - 'key': '4', - 'value': '4', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 2, - 'value': 2, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - -90, - -90 - ], - [ - -45, - -90 - ], - [ - -45, - -45 - ], - [ - -90, - -45 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 157.5, - 67.5 - ] - }, - 'properties': { - 'value': 1, - 'geohash': 'z', - 'center': [ - 157.5, - 67.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'IN', - 'value': 'IN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': true - } - }, - 'type': 'bucket' - }, - 'key': 'z', - 'value': 'z', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 1, - 'value': 1, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - 135, - 45 - ], - [ - 180, - 45 - ], - [ - 180, - 90 - ], - [ - 135, - 90 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 157.5, - 22.5 - ] - }, - 'properties': { - 'value': 1, - 'geohash': 'x', - 'center': [ - 157.5, - 22.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'IN', - 'value': 'IN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': true - } - }, - 'type': 'bucket' - }, - 'key': 'x', - 'value': 'x', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 1, - 'value': 1, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - 135, - 0 - ], - [ - 180, - 0 - ], - [ - 180, - 45 - ], - [ - 135, - 45 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 157.5, - -67.5 - ] - }, - 'properties': { - 'value': 1, - 'geohash': 'p', - 'center': [ - 157.5, - -67.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'IN', - 'value': 'IN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': true - } - }, - 'type': 'bucket' - }, - 'key': 'p', - 'value': 'p', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 1, - 'value': 1, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - 135, - -90 - ], - [ - 180, - -90 - ], - [ - 180, - -45 - ], - [ - 135, - -45 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - 67.5, - -22.5 - ] - }, - 'properties': { - 'value': 1, - 'geohash': 'm', - 'center': [ - 67.5, - -22.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'IN', - 'value': 'IN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': true - } - }, - 'type': 'bucket' - }, - 'key': 'm', - 'value': 'm', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 1, - 'value': 1, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - 45, - -45 - ], - [ - 90, - -45 - ], - [ - 90, - 0 - ], - [ - 45, - 0 - ] - ] - } - }, - { - 'type': 'Feature', - 'geometry': { - 'type': 'Point', - 'coordinates': [ - -22.5, - -22.5 - ] - }, - 'properties': { - 'value': 1, - 'geohash': '7', - 'center': [ - -22.5, - -22.5 - ], - 'aggConfigResult': { - '$parent': { - '$parent': { - '$parent': null, - 'key': 'IN', - 'value': 'IN', - 'aggConfig': { - 'id': '3', - 'type': 'terms', - 'schema': 'split', - 'params': { - 'field': 'geo.dest', - 'size': 2, - 'order': 'desc', - 'orderBy': '1', - 'row': true - } - }, - 'type': 'bucket' - }, - 'key': '7', - 'value': '7', - 'aggConfig': { - 'id': '2', - 'type': 'geohash_grid', - 'schema': 'segment', - 'params': { - 'field': 'geo.coordinates', - 'precision': 1 - } - }, - 'type': 'bucket' - }, - 'key': 1, - 'value': 1, - 'aggConfig': { - 'id': '1', - 'type': 'count', - 'schema': 'metric', - 'params': {} - }, - 'type': 'metric' - }, - 'rectangle': [ - [ - -45, - -45 - ], - [ - 0, - -45 - ], - [ - 0, - 0 - ], - [ - -45, - 0 - ] - ] - } - } - ], - 'properties': { - 'min': 1, - 'max': 31 - } - } - } - ], - 'hits': 1639 -}; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/histogram/_columns.js b/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/histogram/_columns.js deleted file mode 100644 index 96d2cfd174579c..00000000000000 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/histogram/_columns.js +++ /dev/null @@ -1,368 +0,0 @@ -import _ from 'lodash'; - -export default { - 'columns': [ - { - 'label': '404: response', - 'xAxisLabel': 'machine.ram', - 'ordered': { - 'interval': 100 - }, - 'yAxisLabel': 'Count of documents', - 'series': [ - { - 'label': 'Count', - 'values': [ - { - 'x': 2147483600, - 'y': 1, - 'y0': 0 - }, - { - 'x': 3221225400, - 'y': 0, - 'y0': 0 - }, - { - 'x': 4294967200, - 'y': 0, - 'y0': 0 - }, - { - 'x': 5368709100, - 'y': 0, - 'y0': 0 - }, - { - 'x': 6442450900, - 'y': 0, - 'y0': 0 - }, - { - 'x': 7516192700, - 'y': 0, - 'y0': 0 - }, - { - 'x': 8589934500, - 'y': 0, - 'y0': 0 - }, - { - 'x': 10737418200, - 'y': 0, - 'y0': 0 - }, - { - 'x': 11811160000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 12884901800, - 'y': 1, - 'y0': 0 - }, - { - 'x': 13958643700, - 'y': 0, - 'y0': 0 - }, - { - 'x': 15032385500, - 'y': 0, - 'y0': 0 - }, - { - 'x': 16106127300, - 'y': 0, - 'y0': 0 - }, - { - 'x': 18253611000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 19327352800, - 'y': 0, - 'y0': 0 - }, - { - 'x': 20401094600, - 'y': 0, - 'y0': 0 - }, - { - 'x': 21474836400, - 'y': 0, - 'y0': 0 - } - ] - } - ], - 'xAxisFormatter': function (val) { - if (_.isObject(val)) { - return JSON.stringify(val); - } - else if (val == null) { - return ''; - } - else { - return '' + val; - } - }, - 'tooltipFormatter': function (d) { - return d; - } - }, - { - 'label': '200: response', - 'xAxisLabel': 'machine.ram', - 'ordered': { - 'interval': 100 - }, - 'yAxisLabel': 'Count of documents', - 'series': [ - { - 'label': 'Count', - 'values': [ - { - 'x': 2147483600, - 'y': 0, - 'y0': 0 - }, - { - 'x': 3221225400, - 'y': 2, - 'y0': 0 - }, - { - 'x': 4294967200, - 'y': 3, - 'y0': 0 - }, - { - 'x': 5368709100, - 'y': 3, - 'y0': 0 - }, - { - 'x': 6442450900, - 'y': 1, - 'y0': 0 - }, - { - 'x': 7516192700, - 'y': 1, - 'y0': 0 - }, - { - 'x': 8589934500, - 'y': 4, - 'y0': 0 - }, - { - 'x': 10737418200, - 'y': 0, - 'y0': 0 - }, - { - 'x': 11811160000, - 'y': 1, - 'y0': 0 - }, - { - 'x': 12884901800, - 'y': 1, - 'y0': 0 - }, - { - 'x': 13958643700, - 'y': 1, - 'y0': 0 - }, - { - 'x': 15032385500, - 'y': 2, - 'y0': 0 - }, - { - 'x': 16106127300, - 'y': 3, - 'y0': 0 - }, - { - 'x': 18253611000, - 'y': 4, - 'y0': 0 - }, - { - 'x': 19327352800, - 'y': 5, - 'y0': 0 - }, - { - 'x': 20401094600, - 'y': 2, - 'y0': 0 - }, - { - 'x': 21474836400, - 'y': 2, - 'y0': 0 - } - ] - } - ], - 'xAxisFormatter': function (val) { - if (_.isObject(val)) { - return JSON.stringify(val); - } - else if (val == null) { - return ''; - } - else { - return '' + val; - } - }, - 'tooltipFormatter': function (d) { - return d; - } - }, - { - 'label': '503: response', - 'xAxisLabel': 'machine.ram', - 'ordered': { - 'interval': 100 - }, - 'yAxisLabel': 'Count of documents', - 'series': [ - { - 'label': 'Count', - 'values': [ - { - 'x': 2147483600, - 'y': 0, - 'y0': 0 - }, - { - 'x': 3221225400, - 'y': 0, - 'y0': 0 - }, - { - 'x': 4294967200, - 'y': 0, - 'y0': 0 - }, - { - 'x': 5368709100, - 'y': 0, - 'y0': 0 - }, - { - 'x': 6442450900, - 'y': 0, - 'y0': 0 - }, - { - 'x': 7516192700, - 'y': 0, - 'y0': 0 - }, - { - 'x': 8589934500, - 'y': 0, - 'y0': 0 - }, - { - 'x': 10737418200, - 'y': 1, - 'y0': 0 - }, - { - 'x': 11811160000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 12884901800, - 'y': 0, - 'y0': 0 - }, - { - 'x': 13958643700, - 'y': 0, - 'y0': 0 - }, - { - 'x': 15032385500, - 'y': 0, - 'y0': 0 - }, - { - 'x': 16106127300, - 'y': 0, - 'y0': 0 - }, - { - 'x': 18253611000, - 'y': 0, - 'y0': 0 - }, - { - 'x': 19327352800, - 'y': 0, - 'y0': 0 - }, - { - 'x': 20401094600, - 'y': 0, - 'y0': 0 - }, - { - 'x': 21474836400, - 'y': 0, - 'y0': 0 - } - ] - } - ], - 'xAxisFormatter': function (val) { - if (_.isObject(val)) { - return JSON.stringify(val); - } - else if (val == null) { - return ''; - } - else { - return '' + val; - } - }, - 'tooltipFormatter': function (d) { - return d; - } - } - ], - 'xAxisOrderedValues': [ - 2147483600, - 3221225400, - 4294967200, - 5368709100, - 6442450900, - 7516192700, - 8589934500, - 10737418200, - 11811160000, - 12884901800, - 13958643700, - 15032385500, - 16106127300, - 18253611000, - 19327352800, - 20401094600, - 21474836400, - ], - 'hits': 40 -}; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/histogram/_rows.js b/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/histogram/_rows.js deleted file mode 100644 index 27050030ebdfd5..00000000000000 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/histogram/_rows.js +++ /dev/null @@ -1,212 +0,0 @@ -import _ from 'lodash'; - -export default { - 'rows': [ - { - 'label': '404: response', - 'xAxisLabel': 'machine.ram', - 'ordered': { - 'interval': 100 - }, - 'yAxisLabel': 'Count of documents', - 'series': [ - { - 'label': 'Count', - 'values': [ - { - 'x': 2147483600, - 'y': 1 - }, - { - 'x': 10737418200, - 'y': 1 - }, - { - 'x': 15032385500, - 'y': 2 - }, - { - 'x': 19327352800, - 'y': 1 - }, - { - 'x': 32212254700, - 'y': 1 - } - ] - } - ], - 'xAxisFormatter': function (val) { - if (_.isObject(val)) { - return JSON.stringify(val); - } - else if (val == null) { - return ''; - } - else { - return '' + val; - } - }, - 'tooltipFormatter': function (d) { - return d; - } - }, - { - 'label': '200: response', - 'xAxisLabel': 'machine.ram', - 'ordered': { - 'interval': 100 - }, - 'yAxisLabel': 'Count of documents', - 'series': [ - { - 'label': 'Count', - 'values': [ - { - 'x': 3221225400, - 'y': 4 - }, - { - 'x': 4294967200, - 'y': 3 - }, - { - 'x': 5368709100, - 'y': 3 - }, - { - 'x': 6442450900, - 'y': 2 - }, - { - 'x': 7516192700, - 'y': 2 - }, - { - 'x': 8589934500, - 'y': 2 - }, - { - 'x': 9663676400, - 'y': 3 - }, - { - 'x': 11811160000, - 'y': 3 - }, - { - 'x': 12884901800, - 'y': 2 - }, - { - 'x': 13958643700, - 'y': 1 - }, - { - 'x': 15032385500, - 'y': 2 - }, - { - 'x': 16106127300, - 'y': 3 - }, - { - 'x': 17179869100, - 'y': 1 - }, - { - 'x': 18253611000, - 'y': 4 - }, - { - 'x': 19327352800, - 'y': 1 - }, - { - 'x': 20401094600, - 'y': 1 - }, - { - 'x': 21474836400, - 'y': 4 - }, - { - 'x': 32212254700, - 'y': 3 - } - ] - } - ], - 'xAxisFormatter': function (val) { - if (_.isObject(val)) { - return JSON.stringify(val); - } - else if (val == null) { - return ''; - } - else { - return '' + val; - } - }, - 'tooltipFormatter': function (d) { - return d; - } - }, - { - 'label': '503: response', - 'xAxisLabel': 'machine.ram', - 'ordered': { - 'interval': 100 - }, - 'yAxisLabel': 'Count of documents', - 'series': [ - { - 'label': 'Count', - 'values': [ - { - 'x': 10737418200, - 'y': 1 - } - ] - } - ], - 'xAxisFormatter': function (val) { - if (_.isObject(val)) { - return JSON.stringify(val); - } - else if (val == null) { - return ''; - } - else { - return '' + val; - } - }, - 'tooltipFormatter': function (d) { - return d; - } - } - ], - 'xAxisOrderedValues': [ - 2147483600, - 3221225400, - 4294967200, - 5368709100, - 6442450900, - 7516192700, - 8589934500, - 9663676400, - 10737418200, - 11811160000, - 12884901800, - 13958643700, - 15032385500, - 16106127300, - 17179869100, - 18253611000, - 19327352800, - 20401094600, - 21474836400, - 32212254700, - ], - 'hits': 51 -}; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/histogram/_series.js b/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/histogram/_series.js deleted file mode 100644 index 5c7554db2060df..00000000000000 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/histogram/_series.js +++ /dev/null @@ -1,124 +0,0 @@ -import _ from 'lodash'; - -export default { - 'label': '', - 'xAxisLabel': 'machine.ram', - 'ordered': { - 'interval': 100 - }, - 'yAxisLabel': 'Count of documents', - 'series': [ - { - 'label': 'Count', - 'values': [ - { - 'x': 3221225400, - 'y': 5 - }, - { - 'x': 4294967200, - 'y': 2 - }, - { - 'x': 5368709100, - 'y': 5 - }, - { - 'x': 6442450900, - 'y': 4 - }, - { - 'x': 7516192700, - 'y': 1 - }, - { - 'x': 9663676400, - 'y': 9 - }, - { - 'x': 10737418200, - 'y': 5 - }, - { - 'x': 11811160000, - 'y': 5 - }, - { - 'x': 12884901800, - 'y': 2 - }, - { - 'x': 13958643700, - 'y': 3 - }, - { - 'x': 15032385500, - 'y': 3 - }, - { - 'x': 16106127300, - 'y': 3 - }, - { - 'x': 17179869100, - 'y': 1 - }, - { - 'x': 18253611000, - 'y': 6 - }, - { - 'x': 19327352800, - 'y': 3 - }, - { - 'x': 20401094600, - 'y': 3 - }, - { - 'x': 21474836400, - 'y': 7 - }, - { - 'x': 32212254700, - 'y': 4 - } - ] - } - ], - 'hits': 71, - 'xAxisOrderedValues': [ - 3221225400, - 4294967200, - 5368709100, - 6442450900, - 7516192700, - 9663676400, - 10737418200, - 11811160000, - 12884901800, - 13958643700, - 15032385500, - 16106127300, - 17179869100, - 18253611000, - 19327352800, - 20401094600, - 21474836400, - 32212254700, - ], - 'xAxisFormatter': function (val) { - if (_.isObject(val)) { - return JSON.stringify(val); - } - else if (val == null) { - return ''; - } - else { - return '' + val; - } - }, - 'tooltipFormatter': function (d) { - return d; - } -}; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/histogram/_slices.js b/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/histogram/_slices.js deleted file mode 100644 index c47155840cec50..00000000000000 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/histogram/_slices.js +++ /dev/null @@ -1,309 +0,0 @@ -import _ from 'lodash'; - -export default { - 'label': '', - 'slices': { - 'children': [ - { - 'name': 0, - 'size': 378611, - 'aggConfig': { - 'type': 'histogram', - 'schema': 'segment', - 'fieldFormatter': _.constant(String), - 'params': { - 'interval': 1000, - 'extended_bounds': {} - } - } - }, - { - 'name': 1000, - 'size': 205997, - 'aggConfig': { - 'type': 'histogram', - 'schema': 'segment', - 'fieldFormatter': _.constant(String), - 'params': { - 'interval': 1000, - 'extended_bounds': {} - } - } - }, - { - 'name': 2000, - 'size': 397189, - 'aggConfig': { - 'type': 'histogram', - 'schema': 'segment', - 'fieldFormatter': _.constant(String), - 'params': { - 'interval': 1000, - 'extended_bounds': {} - } - } - }, - { - 'name': 3000, - 'size': 397195, - 'aggConfig': { - 'type': 'histogram', - 'schema': 'segment', - 'fieldFormatter': _.constant(String), - 'params': { - 'interval': 1000, - 'extended_bounds': {} - } - } - }, - { - 'name': 4000, - 'size': 398429, - 'aggConfig': { - 'type': 'histogram', - 'schema': 'segment', - 'fieldFormatter': _.constant(String), - 'params': { - 'interval': 1000, - 'extended_bounds': {} - } - } - }, - { - 'name': 5000, - 'size': 397843, - 'aggConfig': { - 'type': 'histogram', - 'schema': 'segment', - 'fieldFormatter': _.constant(String), - 'params': { - 'interval': 1000, - 'extended_bounds': {} - } - } - }, - { - 'name': 6000, - 'size': 398140, - 'aggConfig': { - 'type': 'histogram', - 'schema': 'segment', - 'fieldFormatter': _.constant(String), - 'params': { - 'interval': 1000, - 'extended_bounds': {} - } - } - }, - { - 'name': 7000, - 'size': 398076, - 'aggConfig': { - 'type': 'histogram', - 'schema': 'segment', - 'fieldFormatter': _.constant(String), - 'params': { - 'interval': 1000, - 'extended_bounds': {} - } - } - }, - { - 'name': 8000, - 'size': 396746, - 'aggConfig': { - 'type': 'histogram', - 'schema': 'segment', - 'fieldFormatter': _.constant(String), - 'params': { - 'interval': 1000, - 'extended_bounds': {} - } - } - }, - { - 'name': 9000, - 'size': 397418, - 'aggConfig': { - 'type': 'histogram', - 'schema': 'segment', - 'fieldFormatter': _.constant(String), - 'params': { - 'interval': 1000, - 'extended_bounds': {} - } - } - }, - { - 'name': 10000, - 'size': 20222, - 'aggConfig': { - 'type': 'histogram', - 'schema': 'segment', - 'fieldFormatter': _.constant(String), - 'params': { - 'interval': 1000, - 'extended_bounds': {} - } - } - }, - { - 'name': 11000, - 'size': 20173, - 'aggConfig': { - 'type': 'histogram', - 'schema': 'segment', - 'fieldFormatter': _.constant(String), - 'params': { - 'interval': 1000, - 'extended_bounds': {} - } - } - }, - { - 'name': 12000, - 'size': 20026, - 'aggConfig': { - 'type': 'histogram', - 'schema': 'segment', - 'fieldFormatter': _.constant(String), - 'params': { - 'interval': 1000, - 'extended_bounds': {} - } - } - }, - { - 'name': 13000, - 'size': 19986, - 'aggConfig': { - 'type': 'histogram', - 'schema': 'segment', - 'fieldFormatter': _.constant(String), - 'params': { - 'interval': 1000, - 'extended_bounds': {} - } - } - }, - { - 'name': 14000, - 'size': 20091, - 'aggConfig': { - 'type': 'histogram', - 'schema': 'segment', - 'fieldFormatter': _.constant(String), - 'params': { - 'interval': 1000, - 'extended_bounds': {} - } - } - }, - { - 'name': 15000, - 'size': 20052, - 'aggConfig': { - 'type': 'histogram', - 'schema': 'segment', - 'fieldFormatter': _.constant(String), - 'params': { - 'interval': 1000, - 'extended_bounds': {} - } - } - }, - { - 'name': 16000, - 'size': 20349, - 'aggConfig': { - 'type': 'histogram', - 'schema': 'segment', - 'fieldFormatter': _.constant(String), - 'params': { - 'interval': 1000, - 'extended_bounds': {} - } - } - }, - { - 'name': 17000, - 'size': 20290, - 'aggConfig': { - 'type': 'histogram', - 'schema': 'segment', - 'fieldFormatter': _.constant(String), - 'params': { - 'interval': 1000, - 'extended_bounds': {} - } - } - }, - { - 'name': 18000, - 'size': 20399, - 'aggConfig': { - 'type': 'histogram', - 'schema': 'segment', - 'fieldFormatter': _.constant(String), - 'params': { - 'interval': 1000, - 'extended_bounds': {} - } - } - }, - { - 'name': 19000, - 'size': 20133, - 'aggConfig': { - 'type': 'histogram', - 'schema': 'segment', - 'fieldFormatter': _.constant(String), - 'params': { - 'interval': 1000, - 'extended_bounds': {} - } - } - }, - { - 'name': 20000, - 'size': 9, - 'aggConfig': { - 'type': 'histogram', - 'schema': 'segment', - 'fieldFormatter': _.constant(String), - 'params': { - 'interval': 1000, - 'extended_bounds': {} - } - } - } - ] - }, - 'names': [ - 0, - 1000, - 2000, - 3000, - 4000, - 5000, - 6000, - 7000, - 8000, - 9000, - 10000, - 11000, - 12000, - 13000, - 14000, - 15000, - 16000, - 17000, - 18000, - 19000, - 20000 - ], - 'hits': 3967374, - 'tooltipFormatter': function (event) { - return event.point; - } -}; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/not_enough_data/_one_point.js b/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/not_enough_data/_one_point.js deleted file mode 100644 index b05e258133963b..00000000000000 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/not_enough_data/_one_point.js +++ /dev/null @@ -1,34 +0,0 @@ -import _ from 'lodash'; - -export default { - 'label': '', - 'xAxisLabel': '', - 'yAxisLabel': 'Count of documents', - 'series': [ - { - 'label': 'Count', - 'values': [ - { - 'x': '_all', - 'y': 274 - } - ] - } - ], - 'hits': 274, - 'xAxisOrderedValues': ['_all'], - 'xAxisFormatter': function (val) { - if (_.isObject(val)) { - return JSON.stringify(val); - } - else if (val == null) { - return ''; - } - else { - return '' + val; - } - }, - 'tooltipFormatter': function (d) { - return d; - } -}; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/range/_columns.js b/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/range/_columns.js deleted file mode 100644 index d6f3fc4361f329..00000000000000 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/range/_columns.js +++ /dev/null @@ -1,62 +0,0 @@ -import _ from 'lodash'; - -export default { - 'columns': [ - { - 'label': 'apache: _type', - 'xAxisLabel': 'bytes ranges', - 'yAxisLabel': 'Count of documents', - 'series': [ - { - 'label': 'Count', - 'values': [ - { - 'x': '0.0-1000.0', - 'y': 13309 - }, - { - 'x': '1000.0-2000.0', - 'y': 7196 - } - ] - } - ] - }, - { - 'label': 'nginx: _type', - 'xAxisLabel': 'bytes ranges', - 'yAxisLabel': 'Count of documents', - 'series': [ - { - 'label': 'Count', - 'values': [ - { - 'x': '0.0-1000.0', - 'y': 3278 - }, - { - 'x': '1000.0-2000.0', - 'y': 1804 - } - ] - } - ] - } - ], - 'hits': 171499, - 'xAxisOrderedValues': ['0.0-1000.0', '1000.0-2000.0'], - 'xAxisFormatter': function (val) { - if (_.isObject(val)) { - return JSON.stringify(val); - } - else if (val == null) { - return ''; - } - else { - return '' + val; - } - }, - 'tooltipFormatter': function (d) { - return d; - } -}; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/range/_rows.js b/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/range/_rows.js deleted file mode 100644 index b420565b1c96b5..00000000000000 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/range/_rows.js +++ /dev/null @@ -1,88 +0,0 @@ -import _ from 'lodash'; - -export default { - 'rows': [ - { - 'label': 'Mozilla/5.0 (X11; Linux x86_64; rv:6.0a1) Gecko/20110421 Firefox/6.0a1: agent.raw', - 'xAxisLabel': 'bytes ranges', - 'yAxisLabel': 'Count of documents', - 'series': [ - { - 'label': 'Count', - 'values': [ - { - 'x': '0.0-1000.0', - 'y': 6422, - 'y0': 0 - }, - { - 'x': '1000.0-2000.0', - 'y': 3446, - 'y0': 0 - } - ] - } - ] - }, - { - 'label': 'Mozilla/5.0 (X11; Linux i686) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.50 Safari/534.24: agent.raw', - 'xAxisLabel': 'bytes ranges', - 'yAxisLabel': 'Count of documents', - 'series': [ - { - 'label': 'Count', - 'values': [ - { - 'x': '0.0-1000.0', - 'y': 5430, - 'y0': 0 - }, - { - 'x': '1000.0-2000.0', - 'y': 3010, - 'y0': 0 - } - ] - } - ] - }, - { - 'label': 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322): agent.raw', - 'xAxisLabel': 'bytes ranges', - 'yAxisLabel': 'Count of documents', - 'series': [ - { - 'label': 'Count', - 'values': [ - { - 'x': '0.0-1000.0', - 'y': 4735, - 'y0': 0 - }, - { - 'x': '1000.0-2000.0', - 'y': 2542, - 'y0': 0 - } - ] - } - ] - } - ], - 'hits': 171501, - 'xAxisOrderedValues': ['0.0-1000.0', '1000.0-2000.0'], - 'xAxisFormatter': function (val) { - if (_.isObject(val)) { - return JSON.stringify(val); - } - else if (val == null) { - return ''; - } - else { - return '' + val; - } - }, - 'tooltipFormatter': function (d) { - return d; - } -}; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/range/_series.js b/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/range/_series.js deleted file mode 100644 index 2ac35efadc8f2f..00000000000000 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/range/_series.js +++ /dev/null @@ -1,38 +0,0 @@ -import _ from 'lodash'; - -export default { - 'label': '', - 'xAxisLabel': 'bytes ranges', - 'yAxisLabel': 'Count of documents', - 'series': [ - { - 'label': 'Count', - 'values': [ - { - 'x': '0.0-1000.0', - 'y': 16576 - }, - { - 'x': '1000.0-2000.0', - 'y': 9005 - } - ] - } - ], - 'hits': 171500, - 'xAxisOrderedValues': ['0.0-1000.0', '1000.0-2000.0'], - 'xAxisFormatter': function (val) { - if (_.isObject(val)) { - return JSON.stringify(val); - } - else if (val == null) { - return ''; - } - else { - return '' + val; - } - }, - 'tooltipFormatter': function (d) { - return d; - } -}; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/significant_terms/_columns.js b/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/significant_terms/_columns.js deleted file mode 100644 index 5b1e29ac0d54ae..00000000000000 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/significant_terms/_columns.js +++ /dev/null @@ -1,242 +0,0 @@ -import _ from 'lodash'; - -export default { - 'columns': [ - { - 'label': 'http: links', - 'xAxisLabel': 'Top 5 unusual terms in @tags', - 'yAxisLabel': 'Count of documents', - 'series': [ - { - 'label': 'Count', - 'values': [ - { - 'x': 'success', - 'y': 144000 - }, - { - 'x': 'info', - 'y': 128237 - }, - { - 'x': 'security', - 'y': 34518 - }, - { - 'x': 'error', - 'y': 10258 - }, - { - 'x': 'warning', - 'y': 17188 - } - ] - } - ], - 'xAxisOrderedValues': ['success', 'info', 'security', 'error', 'warning'], - 'xAxisFormatter': function (val) { - if (_.isObject(val)) { - return JSON.stringify(val); - } - else if (val == null) { - return ''; - } - else { - return '' + val; - } - }, - 'tooltipFormatter': function (d) { - return d; - } - }, - { - 'label': 'info: links', - 'xAxisLabel': 'Top 5 unusual terms in @tags', - 'yAxisLabel': 'Count of documents', - 'series': [ - { - 'label': 'Count', - 'values': [ - { - 'x': 'success', - 'y': 108148 - }, - { - 'x': 'info', - 'y': 96242 - }, - { - 'x': 'security', - 'y': 25889 - }, - { - 'x': 'error', - 'y': 7673 - }, - { - 'x': 'warning', - 'y': 12842 - } - ] - } - ], - 'xAxisOrderedValues': ['success', 'info', 'security', 'error', 'warning'], - 'xAxisFormatter': function (val) { - if (_.isObject(val)) { - return JSON.stringify(val); - } - else if (val == null) { - return ''; - } - else { - return '' + val; - } - }, - 'tooltipFormatter': function (d) { - return d; - } - }, - { - 'label': 'www.slate.com: links', - 'xAxisLabel': 'Top 5 unusual terms in @tags', - 'yAxisLabel': 'Count of documents', - 'series': [ - { - 'label': 'Count', - 'values': [ - { - 'x': 'success', - 'y': 98056 - }, - { - 'x': 'info', - 'y': 87344 - }, - { - 'x': 'security', - 'y': 23577 - }, - { - 'x': 'error', - 'y': 7004 - }, - { - 'x': 'warning', - 'y': 11759 - } - ] - } - ], - 'xAxisOrderedValues': ['success', 'info', 'security', 'error', 'warning'], - 'xAxisFormatter': function (val) { - if (_.isObject(val)) { - return JSON.stringify(val); - } - else if (val == null) { - return ''; - } - else { - return '' + val; - } - }, - 'tooltipFormatter': function (d) { - return d; - } - }, - { - 'label': 'twitter.com: links', - 'xAxisLabel': 'Top 5 unusual terms in @tags', - 'yAxisLabel': 'Count of documents', - 'series': [ - { - 'label': 'Count', - 'values': [ - { - 'x': 'success', - 'y': 74154 - }, - { - 'x': 'info', - 'y': 65963 - }, - { - 'x': 'security', - 'y': 17832 - }, - { - 'x': 'error', - 'y': 5258 - }, - { - 'x': 'warning', - 'y': 8906 - } - ] - } - ], - 'xAxisOrderedValues': ['success', 'info', 'security', 'error', 'warning'], - 'xAxisFormatter': function (val) { - if (_.isObject(val)) { - return JSON.stringify(val); - } - else if (val == null) { - return ''; - } - else { - return '' + val; - } - }, - 'tooltipFormatter': function (d) { - return d; - } - }, - { - 'label': 'www.www.slate.com: links', - 'xAxisLabel': 'Top 5 unusual terms in @tags', - 'yAxisLabel': 'Count of documents', - 'series': [ - { - 'label': 'Count', - 'values': [ - { - 'x': 'success', - 'y': 62591 - }, - { - 'x': 'info', - 'y': 55822 - }, - { - 'x': 'security', - 'y': 15100 - }, - { - 'x': 'error', - 'y': 4564 - }, - { - 'x': 'warning', - 'y': 7498 - } - ] - } - ], - 'xAxisOrderedValues': ['success', 'info', 'security', 'error', 'warning'], - 'xAxisFormatter': function (val) { - if (_.isObject(val)) { - return JSON.stringify(val); - } - else if (val == null) { - return ''; - } - else { - return '' + val; - } - }, - 'tooltipFormatter': function (d) { - return d; - } - } - ], - 'hits': 171446 -}; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/significant_terms/_rows.js b/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/significant_terms/_rows.js deleted file mode 100644 index 147eb691eb67bc..00000000000000 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/significant_terms/_rows.js +++ /dev/null @@ -1,242 +0,0 @@ -import _ from 'lodash'; - -export default { - 'rows': [ - { - 'label': 'h3: headings', - 'xAxisLabel': 'Top 5 unusual terms in @tags', - 'yAxisLabel': 'Count of documents', - 'series': [ - { - 'label': 'Count', - 'values': [ - { - 'x': 'success', - 'y': 144000 - }, - { - 'x': 'info', - 'y': 128235 - }, - { - 'x': 'security', - 'y': 34518 - }, - { - 'x': 'error', - 'y': 10257 - }, - { - 'x': 'warning', - 'y': 17188 - } - ] - } - ], - 'xAxisOrderedValues': ['success', 'info', 'security', 'error', 'warning'], - 'xAxisFormatter': function (val) { - if (_.isObject(val)) { - return JSON.stringify(val); - } - else if (val == null) { - return ''; - } - else { - return '' + val; - } - }, - 'tooltipFormatter': function (d) { - return d; - } - }, - { - 'label': 'h5: headings', - 'xAxisLabel': 'Top 5 unusual terms in @tags', - 'yAxisLabel': 'Count of documents', - 'series': [ - { - 'label': 'Count', - 'values': [ - { - 'x': 'success', - 'y': 144000 - }, - { - 'x': 'info', - 'y': 128235 - }, - { - 'x': 'security', - 'y': 34518 - }, - { - 'x': 'error', - 'y': 10257 - }, - { - 'x': 'warning', - 'y': 17188 - } - ] - } - ], - 'xAxisOrderedValues': ['success', 'info', 'security', 'error', 'warning'], - 'xAxisFormatter': function (val) { - if (_.isObject(val)) { - return JSON.stringify(val); - } - else if (val == null) { - return ''; - } - else { - return '' + val; - } - }, - 'tooltipFormatter': function (d) { - return d; - } - }, - { - 'label': 'http: headings', - 'xAxisLabel': 'Top 5 unusual terms in @tags', - 'yAxisLabel': 'Count of documents', - 'series': [ - { - 'label': 'Count', - 'values': [ - { - 'x': 'success', - 'y': 144000 - }, - { - 'x': 'info', - 'y': 128235 - }, - { - 'x': 'security', - 'y': 34518 - }, - { - 'x': 'error', - 'y': 10257 - }, - { - 'x': 'warning', - 'y': 17188 - } - ] - } - ], - 'xAxisOrderedValues': ['success', 'info', 'security', 'error', 'warning'], - 'xAxisFormatter': function (val) { - if (_.isObject(val)) { - return JSON.stringify(val); - } - else if (val == null) { - return ''; - } - else { - return '' + val; - } - }, - 'tooltipFormatter': function (d) { - return d; - } - }, - { - 'label': 'success: headings', - 'xAxisLabel': 'Top 5 unusual terms in @tags', - 'yAxisLabel': 'Count of documents', - 'series': [ - { - 'label': 'Count', - 'values': [ - { - 'x': 'success', - 'y': 120689 - }, - { - 'x': 'info', - 'y': 107621 - }, - { - 'x': 'security', - 'y': 28916 - }, - { - 'x': 'error', - 'y': 8590 - }, - { - 'x': 'warning', - 'y': 14548 - } - ] - } - ], - 'xAxisOrderedValues': ['success', 'info', 'security', 'error', 'warning'], - 'xAxisFormatter': function (val) { - if (_.isObject(val)) { - return JSON.stringify(val); - } - else if (val == null) { - return ''; - } - else { - return '' + val; - } - }, - 'tooltipFormatter': function (d) { - return d; - } - }, - { - 'label': 'www.slate.com: headings', - 'xAxisLabel': 'Top 5 unusual terms in @tags', - 'yAxisLabel': 'Count of documents', - 'series': [ - { - 'label': 'Count', - 'values': [ - { - 'x': 'success', - 'y': 62292 - }, - { - 'x': 'info', - 'y': 55646 - }, - { - 'x': 'security', - 'y': 14823 - }, - { - 'x': 'error', - 'y': 4441 - }, - { - 'x': 'warning', - 'y': 7539 - } - ] - } - ], - 'xAxisOrderedValues': ['success', 'info', 'security', 'error', 'warning'], - 'xAxisFormatter': function (val) { - if (_.isObject(val)) { - return JSON.stringify(val); - } - else if (val == null) { - return ''; - } - else { - return '' + val; - } - }, - 'tooltipFormatter': function (d) { - return d; - } - } - ], - 'hits': 171445 -}; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/significant_terms/_series.js b/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/significant_terms/_series.js deleted file mode 100644 index 3691d854c6c2a9..00000000000000 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/significant_terms/_series.js +++ /dev/null @@ -1,49 +0,0 @@ -import _ from 'lodash'; - -export default { - 'label': '', - 'xAxisLabel': 'Top 5 unusual terms in @tags', - 'yAxisLabel': 'Count of documents', - 'series': [ - { - 'label': 'Count', - 'values': [ - { - 'x': 'success', - 'y': 143995 - }, - { - 'x': 'info', - 'y': 128233 - }, - { - 'x': 'security', - 'y': 34515 - }, - { - 'x': 'error', - 'y': 10256 - }, - { - 'x': 'warning', - 'y': 17188 - } - ] - } - ], - 'hits': 171439, - 'xAxisFormatter': function (val) { - if (_.isObject(val)) { - return JSON.stringify(val); - } - else if (val == null) { - return ''; - } - else { - return '' + val; - } - }, - 'tooltipFormatter': function (d) { - return d; - } -}; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/stacked/_stacked.js b/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/stacked/_stacked.js deleted file mode 100644 index 228a22ed534d59..00000000000000 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/stacked/_stacked.js +++ /dev/null @@ -1,1635 +0,0 @@ -import moment from 'moment'; - -export default { - 'label': '', - 'xAxisLabel': '@timestamp per 30 sec', - 'ordered': { - 'date': true, - 'interval': 30000, - 'min': 1416850340336, - 'max': 1416852140336 - }, - 'yAxisLabel': 'Count of documents', - 'xAxisOrderedValues': [ - 1416850320000, - 1416850350000, - 1416850380000, - 1416850410000, - 1416850440000, - 1416850470000, - 1416850500000, - 1416850530000, - 1416850560000, - 1416850590000, - 1416850620000, - 1416850650000, - 1416850680000, - 1416850710000, - 1416850740000, - 1416850770000, - 1416850800000, - 1416850830000, - 1416850860000, - 1416850890000, - 1416850920000, - 1416850950000, - 1416850980000, - 1416851010000, - 1416851040000, - 1416851070000, - 1416851100000, - 1416851130000, - 1416851160000, - 1416851190000, - 1416851220000, - 1416851250000, - 1416851280000, - 1416851310000, - 1416851340000, - 1416851370000, - 1416851400000, - 1416851430000, - 1416851460000, - 1416851490000, - 1416851520000, - 1416851550000, - 1416851580000, - 1416851610000, - 1416851640000, - 1416851670000, - 1416851700000, - 1416851730000, - 1416851760000, - 1416851790000, - 1416851820000, - 1416851850000, - 1416851880000, - 1416851910000, - 1416851940000, - 1416851970000, - 1416852000000, - 1416852030000, - 1416852060000, - 1416852090000, - 1416852120000, - ], - 'series': [ - { - 'label': 'jpg', - 'values': [ - { - 'x': 1416850320000, - 'y': 110, - 'y0': 0 - }, - { - 'x': 1416850350000, - 'y': 24, - 'y0': 0 - }, - { - 'x': 1416850380000, - 'y': 34, - 'y0': 0 - }, - { - 'x': 1416850410000, - 'y': 21, - 'y0': 0 - }, - { - 'x': 1416850440000, - 'y': 32, - 'y0': 0 - }, - { - 'x': 1416850470000, - 'y': 24, - 'y0': 0 - }, - { - 'x': 1416850500000, - 'y': 16, - 'y0': 0 - }, - { - 'x': 1416850530000, - 'y': 27, - 'y0': 0 - }, - { - 'x': 1416850560000, - 'y': 24, - 'y0': 0 - }, - { - 'x': 1416850590000, - 'y': 38, - 'y0': 0 - }, - { - 'x': 1416850620000, - 'y': 33, - 'y0': 0 - }, - { - 'x': 1416850650000, - 'y': 33, - 'y0': 0 - }, - { - 'x': 1416850680000, - 'y': 31, - 'y0': 0 - }, - { - 'x': 1416850710000, - 'y': 24, - 'y0': 0 - }, - { - 'x': 1416850740000, - 'y': 24, - 'y0': 0 - }, - { - 'x': 1416850770000, - 'y': 38, - 'y0': 0 - }, - { - 'x': 1416850800000, - 'y': 34, - 'y0': 0 - }, - { - 'x': 1416850830000, - 'y': 30, - 'y0': 0 - }, - { - 'x': 1416850860000, - 'y': 38, - 'y0': 0 - }, - { - 'x': 1416850890000, - 'y': 19, - 'y0': 0 - }, - { - 'x': 1416850920000, - 'y': 23, - 'y0': 0 - }, - { - 'x': 1416850950000, - 'y': 33, - 'y0': 0 - }, - { - 'x': 1416850980000, - 'y': 28, - 'y0': 0 - }, - { - 'x': 1416851010000, - 'y': 24, - 'y0': 0 - }, - { - 'x': 1416851040000, - 'y': 22, - 'y0': 0 - }, - { - 'x': 1416851070000, - 'y': 28, - 'y0': 0 - }, - { - 'x': 1416851100000, - 'y': 27, - 'y0': 0 - }, - { - 'x': 1416851130000, - 'y': 32, - 'y0': 0 - }, - { - 'x': 1416851160000, - 'y': 32, - 'y0': 0 - }, - { - 'x': 1416851190000, - 'y': 30, - 'y0': 0 - }, - { - 'x': 1416851220000, - 'y': 32, - 'y0': 0 - }, - { - 'x': 1416851250000, - 'y': 36, - 'y0': 0 - }, - { - 'x': 1416851280000, - 'y': 32, - 'y0': 0 - }, - { - 'x': 1416851310000, - 'y': 29, - 'y0': 0 - }, - { - 'x': 1416851340000, - 'y': 22, - 'y0': 0 - }, - { - 'x': 1416851370000, - 'y': 29, - 'y0': 0 - }, - { - 'x': 1416851400000, - 'y': 33, - 'y0': 0 - }, - { - 'x': 1416851430000, - 'y': 28, - 'y0': 0 - }, - { - 'x': 1416851460000, - 'y': 39, - 'y0': 0 - }, - { - 'x': 1416851490000, - 'y': 28, - 'y0': 0 - }, - { - 'x': 1416851520000, - 'y': 28, - 'y0': 0 - }, - { - 'x': 1416851550000, - 'y': 28, - 'y0': 0 - }, - { - 'x': 1416851580000, - 'y': 30, - 'y0': 0 - }, - { - 'x': 1416851610000, - 'y': 29, - 'y0': 0 - }, - { - 'x': 1416851640000, - 'y': 30, - 'y0': 0 - }, - { - 'x': 1416851670000, - 'y': 23, - 'y0': 0 - }, - { - 'x': 1416851700000, - 'y': 23, - 'y0': 0 - }, - { - 'x': 1416851730000, - 'y': 27, - 'y0': 0 - }, - { - 'x': 1416851760000, - 'y': 21, - 'y0': 0 - }, - { - 'x': 1416851790000, - 'y': 24, - 'y0': 0 - }, - { - 'x': 1416851820000, - 'y': 26, - 'y0': 0 - }, - { - 'x': 1416851850000, - 'y': 26, - 'y0': 0 - }, - { - 'x': 1416851880000, - 'y': 21, - 'y0': 0 - }, - { - 'x': 1416851910000, - 'y': 33, - 'y0': 0 - }, - { - 'x': 1416851940000, - 'y': 23, - 'y0': 0 - }, - { - 'x': 1416851970000, - 'y': 46, - 'y0': 0 - }, - { - 'x': 1416852000000, - 'y': 27, - 'y0': 0 - }, - { - 'x': 1416852030000, - 'y': 20, - 'y0': 0 - }, - { - 'x': 1416852060000, - 'y': 34, - 'y0': 0 - }, - { - 'x': 1416852090000, - 'y': 15, - 'y0': 0 - }, - { - 'x': 1416852120000, - 'y': 18, - 'y0': 0 - } - ] - }, - { - 'label': 'css', - 'values': [ - { - 'x': 1416850320000, - 'y': 3, - 'y0': 11 - }, - { - 'x': 1416850350000, - 'y': 13, - 'y0': 24 - }, - { - 'x': 1416850380000, - 'y': 5, - 'y0': 34 - }, - { - 'x': 1416850410000, - 'y': 12, - 'y0': 21 - }, - { - 'x': 1416850440000, - 'y': 9, - 'y0': 32 - }, - { - 'x': 1416850470000, - 'y': 12, - 'y0': 24 - }, - { - 'x': 1416850500000, - 'y': 6, - 'y0': 16 - }, - { - 'x': 1416850530000, - 'y': 6, - 'y0': 27 - }, - { - 'x': 1416850560000, - 'y': 11, - 'y0': 24 - }, - { - 'x': 1416850590000, - 'y': 11, - 'y0': 38 - }, - { - 'x': 1416850620000, - 'y': 6, - 'y0': 33 - }, - { - 'x': 1416850650000, - 'y': 8, - 'y0': 33 - }, - { - 'x': 1416850680000, - 'y': 6, - 'y0': 31 - }, - { - 'x': 1416850710000, - 'y': 4, - 'y0': 24 - }, - { - 'x': 1416850740000, - 'y': 9, - 'y0': 24 - }, - { - 'x': 1416850770000, - 'y': 3, - 'y0': 38 - }, - { - 'x': 1416850800000, - 'y': 5, - 'y0': 34 - }, - { - 'x': 1416850830000, - 'y': 6, - 'y0': 30 - }, - { - 'x': 1416850860000, - 'y': 9, - 'y0': 38 - }, - { - 'x': 1416850890000, - 'y': 5, - 'y0': 19 - }, - { - 'x': 1416850920000, - 'y': 8, - 'y0': 23 - }, - { - 'x': 1416850950000, - 'y': 9, - 'y0': 33 - }, - { - 'x': 1416850980000, - 'y': 5, - 'y0': 28 - }, - { - 'x': 1416851010000, - 'y': 6, - 'y0': 24 - }, - { - 'x': 1416851040000, - 'y': 9, - 'y0': 22 - }, - { - 'x': 1416851070000, - 'y': 9, - 'y0': 28 - }, - { - 'x': 1416851100000, - 'y': 11, - 'y0': 27 - }, - { - 'x': 1416851130000, - 'y': 5, - 'y0': 32 - }, - { - 'x': 1416851160000, - 'y': 8, - 'y0': 32 - }, - { - 'x': 1416851190000, - 'y': 6, - 'y0': 30 - }, - { - 'x': 1416851220000, - 'y': 10, - 'y0': 32 - }, - { - 'x': 1416851250000, - 'y': 5, - 'y0': 36 - }, - { - 'x': 1416851280000, - 'y': 6, - 'y0': 32 - }, - { - 'x': 1416851310000, - 'y': 4, - 'y0': 29 - }, - { - 'x': 1416851340000, - 'y': 8, - 'y0': 22 - }, - { - 'x': 1416851370000, - 'y': 3, - 'y0': 29 - }, - { - 'x': 1416851400000, - 'y': 8, - 'y0': 33 - }, - { - 'x': 1416851430000, - 'y': 10, - 'y0': 28 - }, - { - 'x': 1416851460000, - 'y': 5, - 'y0': 39 - }, - { - 'x': 1416851490000, - 'y': 7, - 'y0': 28 - }, - { - 'x': 1416851520000, - 'y': 6, - 'y0': 28 - }, - { - 'x': 1416851550000, - 'y': 4, - 'y0': 28 - }, - { - 'x': 1416851580000, - 'y': 9, - 'y0': 30 - }, - { - 'x': 1416851610000, - 'y': 3, - 'y0': 29 - }, - { - 'x': 1416851640000, - 'y': 9, - 'y0': 30 - }, - { - 'x': 1416851670000, - 'y': 6, - 'y0': 23 - }, - { - 'x': 1416851700000, - 'y': 11, - 'y0': 23 - }, - { - 'x': 1416851730000, - 'y': 4, - 'y0': 27 - }, - { - 'x': 1416851760000, - 'y': 8, - 'y0': 21 - }, - { - 'x': 1416851790000, - 'y': 5, - 'y0': 24 - }, - { - 'x': 1416851820000, - 'y': 7, - 'y0': 26 - }, - { - 'x': 1416851850000, - 'y': 7, - 'y0': 26 - }, - { - 'x': 1416851880000, - 'y': 4, - 'y0': 21 - }, - { - 'x': 1416851910000, - 'y': 8, - 'y0': 33 - }, - { - 'x': 1416851940000, - 'y': 6, - 'y0': 23 - }, - { - 'x': 1416851970000, - 'y': 6, - 'y0': 46 - }, - { - 'x': 1416852000000, - 'y': 3, - 'y0': 27 - }, - { - 'x': 1416852030000, - 'y': 6, - 'y0': 20 - }, - { - 'x': 1416852060000, - 'y': 5, - 'y0': 34 - }, - { - 'x': 1416852090000, - 'y': 5, - 'y0': 15 - }, - { - 'x': 1416852120000, - 'y': 1, - 'y0': 18 - } - ] - }, - { - 'label': 'gif', - 'values': [ - { - 'x': 1416850320000, - 'y': 1, - 'y0': 14 - }, - { - 'x': 1416850350000, - 'y': 2, - 'y0': 37 - }, - { - 'x': 1416850380000, - 'y': 4, - 'y0': 39 - }, - { - 'x': 1416850410000, - 'y': 2, - 'y0': 33 - }, - { - 'x': 1416850440000, - 'y': 3, - 'y0': 41 - }, - { - 'x': 1416850470000, - 'y': 1, - 'y0': 36 - }, - { - 'x': 1416850500000, - 'y': 1, - 'y0': 22 - }, - { - 'x': 1416850530000, - 'y': 1, - 'y0': 33 - }, - { - 'x': 1416850560000, - 'y': 2, - 'y0': 35 - }, - { - 'x': 1416850590000, - 'y': 5, - 'y0': 49 - }, - { - 'x': 1416850620000, - 'y': 1, - 'y0': 39 - }, - { - 'x': 1416850650000, - 'y': 1, - 'y0': 41 - }, - { - 'x': 1416850680000, - 'y': 4, - 'y0': 37 - }, - { - 'x': 1416850710000, - 'y': 1, - 'y0': 28 - }, - { - 'x': 1416850740000, - 'y': 3, - 'y0': 33 - }, - { - 'x': 1416850770000, - 'y': 2, - 'y0': 41 - }, - { - 'x': 1416850800000, - 'y': 2, - 'y0': 39 - }, - { - 'x': 1416850830000, - 'y': 5, - 'y0': 36 - }, - { - 'x': 1416850860000, - 'y': 3, - 'y0': 47 - }, - { - 'x': 1416850890000, - 'y': 1, - 'y0': 24 - }, - { - 'x': 1416850920000, - 'y': 3, - 'y0': 31 - }, - { - 'x': 1416850950000, - 'y': 4, - 'y0': 42 - }, - { - 'x': 1416850980000, - 'y': 3, - 'y0': 33 - }, - { - 'x': 1416851010000, - 'y': 5, - 'y0': 30 - }, - { - 'x': 1416851040000, - 'y': 2, - 'y0': 31 - }, - { - 'x': 1416851070000, - 'y': 3, - 'y0': 37 - }, - { - 'x': 1416851100000, - 'y': 5, - 'y0': 38 - }, - { - 'x': 1416851130000, - 'y': 3, - 'y0': 37 - }, - { - 'x': 1416851160000, - 'y': 4, - 'y0': 40 - }, - { - 'x': 1416851190000, - 'y': 9, - 'y0': 36 - }, - { - 'x': 1416851220000, - 'y': 7, - 'y0': 42 - }, - { - 'x': 1416851250000, - 'y': 2, - 'y0': 41 - }, - { - 'x': 1416851280000, - 'y': 1, - 'y0': 38 - }, - { - 'x': 1416851310000, - 'y': 2, - 'y0': 33 - }, - { - 'x': 1416851340000, - 'y': 5, - 'y0': 30 - }, - { - 'x': 1416851370000, - 'y': 3, - 'y0': 32 - }, - { - 'x': 1416851400000, - 'y': 5, - 'y0': 41 - }, - { - 'x': 1416851430000, - 'y': 4, - 'y0': 38 - }, - { - 'x': 1416851460000, - 'y': 5, - 'y0': 44 - }, - { - 'x': 1416851490000, - 'y': 2, - 'y0': 35 - }, - { - 'x': 1416851520000, - 'y': 2, - 'y0': 34 - }, - { - 'x': 1416851550000, - 'y': 4, - 'y0': 32 - }, - { - 'x': 1416851580000, - 'y': 3, - 'y0': 39 - }, - { - 'x': 1416851610000, - 'y': 4, - 'y0': 32 - }, - { - 'x': 1416851640000, - 'y': 0, - 'y0': 39 - }, - { - 'x': 1416851670000, - 'y': 2, - 'y0': 29 - }, - { - 'x': 1416851700000, - 'y': 1, - 'y0': 34 - }, - { - 'x': 1416851730000, - 'y': 3, - 'y0': 31 - }, - { - 'x': 1416851760000, - 'y': 0, - 'y0': 29 - }, - { - 'x': 1416851790000, - 'y': 4, - 'y0': 29 - }, - { - 'x': 1416851820000, - 'y': 3, - 'y0': 33 - }, - { - 'x': 1416851850000, - 'y': 3, - 'y0': 33 - }, - { - 'x': 1416851880000, - 'y': 0, - 'y0': 25 - }, - { - 'x': 1416851910000, - 'y': 0, - 'y0': 41 - }, - { - 'x': 1416851940000, - 'y': 3, - 'y0': 29 - }, - { - 'x': 1416851970000, - 'y': 3, - 'y0': 52 - }, - { - 'x': 1416852000000, - 'y': 1, - 'y0': 30 - }, - { - 'x': 1416852030000, - 'y': 5, - 'y0': 26 - }, - { - 'x': 1416852060000, - 'y': 3, - 'y0': 39 - }, - { - 'x': 1416852090000, - 'y': 1, - 'y0': 20 - }, - { - 'x': 1416852120000, - 'y': 2, - 'y0': 19 - } - ] - }, - { - 'label': 'png', - 'values': [ - { - 'x': 1416850320000, - 'y': 1, - 'y0': 15 - }, - { - 'x': 1416850350000, - 'y': 6, - 'y0': 39 - }, - { - 'x': 1416850380000, - 'y': 6, - 'y0': 43 - }, - { - 'x': 1416850410000, - 'y': 5, - 'y0': 35 - }, - { - 'x': 1416850440000, - 'y': 3, - 'y0': 44 - }, - { - 'x': 1416850470000, - 'y': 5, - 'y0': 37 - }, - { - 'x': 1416850500000, - 'y': 6, - 'y0': 23 - }, - { - 'x': 1416850530000, - 'y': 1, - 'y0': 34 - }, - { - 'x': 1416850560000, - 'y': 3, - 'y0': 37 - }, - { - 'x': 1416850590000, - 'y': 2, - 'y0': 54 - }, - { - 'x': 1416850620000, - 'y': 1, - 'y0': 40 - }, - { - 'x': 1416850650000, - 'y': 1, - 'y0': 42 - }, - { - 'x': 1416850680000, - 'y': 2, - 'y0': 41 - }, - { - 'x': 1416850710000, - 'y': 5, - 'y0': 29 - }, - { - 'x': 1416850740000, - 'y': 7, - 'y0': 36 - }, - { - 'x': 1416850770000, - 'y': 2, - 'y0': 43 - }, - { - 'x': 1416850800000, - 'y': 3, - 'y0': 41 - }, - { - 'x': 1416850830000, - 'y': 6, - 'y0': 41 - }, - { - 'x': 1416850860000, - 'y': 2, - 'y0': 50 - }, - { - 'x': 1416850890000, - 'y': 4, - 'y0': 25 - }, - { - 'x': 1416850920000, - 'y': 2, - 'y0': 34 - }, - { - 'x': 1416850950000, - 'y': 3, - 'y0': 46 - }, - { - 'x': 1416850980000, - 'y': 8, - 'y0': 36 - }, - { - 'x': 1416851010000, - 'y': 4, - 'y0': 35 - }, - { - 'x': 1416851040000, - 'y': 4, - 'y0': 33 - }, - { - 'x': 1416851070000, - 'y': 1, - 'y0': 40 - }, - { - 'x': 1416851100000, - 'y': 2, - 'y0': 43 - }, - { - 'x': 1416851130000, - 'y': 4, - 'y0': 40 - }, - { - 'x': 1416851160000, - 'y': 3, - 'y0': 44 - }, - { - 'x': 1416851190000, - 'y': 4, - 'y0': 45 - }, - { - 'x': 1416851220000, - 'y': 2, - 'y0': 49 - }, - { - 'x': 1416851250000, - 'y': 4, - 'y0': 43 - }, - { - 'x': 1416851280000, - 'y': 8, - 'y0': 39 - }, - { - 'x': 1416851310000, - 'y': 4, - 'y0': 35 - }, - { - 'x': 1416851340000, - 'y': 4, - 'y0': 35 - }, - { - 'x': 1416851370000, - 'y': 7, - 'y0': 35 - }, - { - 'x': 1416851400000, - 'y': 2, - 'y0': 46 - }, - { - 'x': 1416851430000, - 'y': 3, - 'y0': 42 - }, - { - 'x': 1416851460000, - 'y': 3, - 'y0': 49 - }, - { - 'x': 1416851490000, - 'y': 3, - 'y0': 37 - }, - { - 'x': 1416851520000, - 'y': 4, - 'y0': 36 - }, - { - 'x': 1416851550000, - 'y': 3, - 'y0': 36 - }, - { - 'x': 1416851580000, - 'y': 4, - 'y0': 42 - }, - { - 'x': 1416851610000, - 'y': 5, - 'y0': 36 - }, - { - 'x': 1416851640000, - 'y': 3, - 'y0': 39 - }, - { - 'x': 1416851670000, - 'y': 3, - 'y0': 31 - }, - { - 'x': 1416851700000, - 'y': 2, - 'y0': 35 - }, - { - 'x': 1416851730000, - 'y': 5, - 'y0': 34 - }, - { - 'x': 1416851760000, - 'y': 4, - 'y0': 29 - }, - { - 'x': 1416851790000, - 'y': 5, - 'y0': 33 - }, - { - 'x': 1416851820000, - 'y': 1, - 'y0': 36 - }, - { - 'x': 1416851850000, - 'y': 3, - 'y0': 36 - }, - { - 'x': 1416851880000, - 'y': 6, - 'y0': 25 - }, - { - 'x': 1416851910000, - 'y': 4, - 'y0': 41 - }, - { - 'x': 1416851940000, - 'y': 7, - 'y0': 32 - }, - { - 'x': 1416851970000, - 'y': 5, - 'y0': 55 - }, - { - 'x': 1416852000000, - 'y': 2, - 'y0': 31 - }, - { - 'x': 1416852030000, - 'y': 2, - 'y0': 31 - }, - { - 'x': 1416852060000, - 'y': 4, - 'y0': 42 - }, - { - 'x': 1416852090000, - 'y': 6, - 'y0': 21 - }, - { - 'x': 1416852120000, - 'y': 2, - 'y0': 21 - } - ] - }, - { - 'label': 'php', - 'values': [ - { - 'x': 1416850320000, - 'y': 0, - 'y0': 16 - }, - { - 'x': 1416850350000, - 'y': 1, - 'y0': 45 - }, - { - 'x': 1416850380000, - 'y': 0, - 'y0': 49 - }, - { - 'x': 1416850410000, - 'y': 2, - 'y0': 40 - }, - { - 'x': 1416850440000, - 'y': 0, - 'y0': 47 - }, - { - 'x': 1416850470000, - 'y': 0, - 'y0': 42 - }, - { - 'x': 1416850500000, - 'y': 3, - 'y0': 29 - }, - { - 'x': 1416850530000, - 'y': 1, - 'y0': 35 - }, - { - 'x': 1416850560000, - 'y': 3, - 'y0': 40 - }, - { - 'x': 1416850590000, - 'y': 2, - 'y0': 56 - }, - { - 'x': 1416850620000, - 'y': 2, - 'y0': 41 - }, - { - 'x': 1416850650000, - 'y': 5, - 'y0': 43 - }, - { - 'x': 1416850680000, - 'y': 2, - 'y0': 43 - }, - { - 'x': 1416850710000, - 'y': 1, - 'y0': 34 - }, - { - 'x': 1416850740000, - 'y': 2, - 'y0': 43 - }, - { - 'x': 1416850770000, - 'y': 2, - 'y0': 45 - }, - { - 'x': 1416850800000, - 'y': 1, - 'y0': 44 - }, - { - 'x': 1416850830000, - 'y': 1, - 'y0': 47 - }, - { - 'x': 1416850860000, - 'y': 1, - 'y0': 52 - }, - { - 'x': 1416850890000, - 'y': 1, - 'y0': 29 - }, - { - 'x': 1416850920000, - 'y': 2, - 'y0': 36 - }, - { - 'x': 1416850950000, - 'y': 2, - 'y0': 49 - }, - { - 'x': 1416850980000, - 'y': 0, - 'y0': 44 - }, - { - 'x': 1416851010000, - 'y': 3, - 'y0': 39 - }, - { - 'x': 1416851040000, - 'y': 2, - 'y0': 37 - }, - { - 'x': 1416851070000, - 'y': 2, - 'y0': 41 - }, - { - 'x': 1416851100000, - 'y': 2, - 'y0': 45 - }, - { - 'x': 1416851130000, - 'y': 0, - 'y0': 44 - }, - { - 'x': 1416851160000, - 'y': 1, - 'y0': 47 - }, - { - 'x': 1416851190000, - 'y': 2, - 'y0': 49 - }, - { - 'x': 1416851220000, - 'y': 4, - 'y0': 51 - }, - { - 'x': 1416851250000, - 'y': 0, - 'y0': 47 - }, - { - 'x': 1416851280000, - 'y': 3, - 'y0': 47 - }, - { - 'x': 1416851310000, - 'y': 3, - 'y0': 39 - }, - { - 'x': 1416851340000, - 'y': 2, - 'y0': 39 - }, - { - 'x': 1416851370000, - 'y': 2, - 'y0': 42 - }, - { - 'x': 1416851400000, - 'y': 3, - 'y0': 48 - }, - { - 'x': 1416851430000, - 'y': 1, - 'y0': 45 - }, - { - 'x': 1416851460000, - 'y': 0, - 'y0': 52 - }, - { - 'x': 1416851490000, - 'y': 2, - 'y0': 40 - }, - { - 'x': 1416851520000, - 'y': 1, - 'y0': 40 - }, - { - 'x': 1416851550000, - 'y': 3, - 'y0': 39 - }, - { - 'x': 1416851580000, - 'y': 1, - 'y0': 46 - }, - { - 'x': 1416851610000, - 'y': 2, - 'y0': 41 - }, - { - 'x': 1416851640000, - 'y': 1, - 'y0': 42 - }, - { - 'x': 1416851670000, - 'y': 2, - 'y0': 34 - }, - { - 'x': 1416851700000, - 'y': 3, - 'y0': 37 - }, - { - 'x': 1416851730000, - 'y': 1, - 'y0': 39 - }, - { - 'x': 1416851760000, - 'y': 1, - 'y0': 33 - }, - { - 'x': 1416851790000, - 'y': 1, - 'y0': 38 - }, - { - 'x': 1416851820000, - 'y': 1, - 'y0': 37 - }, - { - 'x': 1416851850000, - 'y': 1, - 'y0': 39 - }, - { - 'x': 1416851880000, - 'y': 1, - 'y0': 31 - }, - { - 'x': 1416851910000, - 'y': 2, - 'y0': 45 - }, - { - 'x': 1416851940000, - 'y': 0, - 'y0': 39 - }, - { - 'x': 1416851970000, - 'y': 0, - 'y0': 60 - }, - { - 'x': 1416852000000, - 'y': 1, - 'y0': 33 - }, - { - 'x': 1416852030000, - 'y': 2, - 'y0': 33 - }, - { - 'x': 1416852060000, - 'y': 1, - 'y0': 46 - }, - { - 'x': 1416852090000, - 'y': 1, - 'y0': 27 - }, - { - 'x': 1416852120000, - 'y': 0, - 'y0': 23 - } - ] - } - ], - 'hits': 2595, - 'xAxisFormatter': function (thing) { - return moment(thing); - }, - 'tooltipFormatter': function (d) { - return d; - } -}; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/terms/_columns.js b/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/terms/_columns.js deleted file mode 100644 index 4683640725f2a8..00000000000000 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/terms/_columns.js +++ /dev/null @@ -1,146 +0,0 @@ -import _ from 'lodash'; - -export default { - 'columns': [ - { - 'label': 'logstash: index', - 'xAxisLabel': 'Top 5 extension', - 'yAxisLabel': 'Count of documents', - 'series': [ - { - 'label': 'Count', - 'values': [ - { - 'x': 'jpg', - 'y': 110710 - }, - { - 'x': 'css', - 'y': 27376 - }, - { - 'x': 'png', - 'y': 16664 - }, - { - 'x': 'gif', - 'y': 11264 - }, - { - 'x': 'php', - 'y': 5448 - } - ] - } - ], - 'xAxisFormatter': function (val) { - if (_.isObject(val)) { - return JSON.stringify(val); - } - else if (val == null) { - return ''; - } - else { - return '' + val; - } - }, - 'tooltipFormatter': function (d) { - return d; - } - }, - { - 'label': '2014.11.12: index', - 'xAxisLabel': 'Top 5 extension', - 'yAxisLabel': 'Count of documents', - 'series': [ - { - 'label': 'Count', - 'values': [ - { - 'x': 'jpg', - 'y': 110643 - }, - { - 'x': 'css', - 'y': 27350 - }, - { - 'x': 'png', - 'y': 16648 - }, - { - 'x': 'gif', - 'y': 11257 - }, - { - 'x': 'php', - 'y': 5440 - } - ] - } - ], - 'xAxisFormatter': function (val) { - if (_.isObject(val)) { - return JSON.stringify(val); - } - else if (val == null) { - return ''; - } - else { - return '' + val; - } - }, - 'tooltipFormatter': function (d) { - return d; - } - }, - { - 'label': '2014.11.11: index', - 'xAxisLabel': 'Top 5 extension', - 'yAxisLabel': 'Count of documents', - 'series': [ - { - 'label': 'Count', - 'values': [ - { - 'x': 'jpg', - 'y': 67 - }, - { - 'x': 'css', - 'y': 26 - }, - { - 'x': 'png', - 'y': 16 - }, - { - 'x': 'gif', - 'y': 7 - }, - { - 'x': 'php', - 'y': 8 - } - ] - } - ], - 'xAxisFormatter': function (val) { - if (_.isObject(val)) { - return JSON.stringify(val); - } - else if (val == null) { - return ''; - } - else { - return '' + val; - } - }, - 'tooltipFormatter': function (d) { - return d; - } - } - ], - 'xAxisOrderedValues': ['jpg', 'css', 'png', 'gif', 'php'], - 'hits': 171462 -}; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/terms/_rows.js b/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/terms/_rows.js deleted file mode 100644 index 2b4ee83eca44c7..00000000000000 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/terms/_rows.js +++ /dev/null @@ -1,100 +0,0 @@ -import _ from 'lodash'; - -export default { - 'rows': [ - { - 'label': '0.0-1000.0: bytes', - 'xAxisLabel': 'Top 5 extension', - 'yAxisLabel': 'Count of documents', - 'series': [ - { - 'label': 'Count', - 'values': [ - { - 'x': 'jpg', - 'y': 3378 - }, - { - 'x': 'css', - 'y': 762 - }, - { - 'x': 'png', - 'y': 527 - }, - { - 'x': 'gif', - 'y': 11258 - }, - { - 'x': 'php', - 'y': 653 - } - ] - } - ], - 'xAxisFormatter': function (val) { - if (_.isObject(val)) { - return JSON.stringify(val); - } - else if (val == null) { - return ''; - } - else { - return '' + val; - } - }, - 'tooltipFormatter': function (d) { - return d; - } - }, - { - 'label': '1000.0-2000.0: bytes', - 'xAxisLabel': 'Top 5 extension', - 'yAxisLabel': 'Count of documents', - 'series': [ - { - 'label': 'Count', - 'values': [ - { - 'x': 'jpg', - 'y': 6422 - }, - { - 'x': 'css', - 'y': 1591 - }, - { - 'x': 'png', - 'y': 430 - }, - { - 'x': 'gif', - 'y': 8 - }, - { - 'x': 'php', - 'y': 561 - } - ] - } - ], - 'xAxisFormatter': function (val) { - if (_.isObject(val)) { - return JSON.stringify(val); - } - else if (val == null) { - return ''; - } - else { - return '' + val; - } - }, - 'tooltipFormatter': function (d) { - return d; - } - } - ], - 'xAxisOrderedValues': ['jpg', 'css', 'png', 'gif', 'php'], - 'hits': 171458 -}; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/terms/_series.js b/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/terms/_series.js deleted file mode 100644 index f717012d430cf3..00000000000000 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/terms/_series.js +++ /dev/null @@ -1,50 +0,0 @@ -import _ from 'lodash'; - -export default { - 'label': '', - 'xAxisLabel': 'Top 5 extension', - 'xAxisOrderedValues': ['jpg', 'css', 'png', 'gif', 'php'], - 'yAxisLabel': 'Count of documents', - 'series': [ - { - 'label': 'Count', - 'values': [ - { - 'x': 'jpg', - 'y': 110710 - }, - { - 'x': 'css', - 'y': 27389 - }, - { - 'x': 'png', - 'y': 16661 - }, - { - 'x': 'gif', - 'y': 11269 - }, - { - 'x': 'php', - 'y': 5447 - } - ] - } - ], - 'hits': 171476, - 'xAxisFormatter': function (val) { - if (_.isObject(val)) { - return JSON.stringify(val); - } - else if (val == null) { - return ''; - } - else { - return '' + val; - } - }, - 'tooltipFormatter': function (d) { - return d; - } -}; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/terms/_seriesMultiple.js b/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/terms/_seriesMultiple.js deleted file mode 100644 index 2b86663ab4673e..00000000000000 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data/terms/_seriesMultiple.js +++ /dev/null @@ -1,72 +0,0 @@ -import _ from 'lodash'; - -export default { - 'xAxisOrderedValues': ['_all'], - 'yAxisLabel': 'Count', - 'zAxisLabel': 'machine.os.raw: Descending', - 'yScale': null, - 'series': [{ - 'label': 'ios', - 'id': '1', - 'yAxisFormatter': _.identity, - 'values': [{ - 'x': '_all', - 'y': 2820, - 'series': 'ios' - }] - }, { - 'label': 'win 7', - 'aggId': '1', - 'yAxisFormatter': _.identity, - 'values': [{ - 'x': '_all', - 'y': 2319, - 'series': 'win 7' - }] - }, { - 'label': 'win 8', - 'id': '1', - 'yAxisFormatter': _.identity, - 'values': [{ - 'x': '_all', - 'y': 1835, - 'series': 'win 8' - }] - }, { - 'label': 'windows xp service pack 2 version 20123452', - 'id': '1', - 'yAxisFormatter': _.identity, - 'values': [{ - 'x': '_all', - 'y': 734, - 'series': 'win xp' - }] - }, { - 'label': 'osx', - 'id': '1', - 'yAxisFormatter': _.identity, - 'values': [{ - 'x': '_all', - 'y': 1352, - 'series': 'osx' - }] - }], - 'hits': 14005, - 'xAxisFormatter': function (val) { - if (_.isObject(val)) { - return JSON.stringify(val); - } - else if (val == null) { - return ''; - } - else { - return '' + val; - } - }, - 'yAxisFormatter': function (val) { - return val; - }, - 'tooltipFormatter': function (d) { - return d; - } -}; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/types/point_series.js b/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/types/point_series.js deleted file mode 100644 index 03646d08298dd6..00000000000000 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/types/point_series.js +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import expect from '@kbn/expect'; - -import percentileTestdata from './testdata_linechart_percentile.json'; -import percentileTestdataResult from './testdata_linechart_percentile_result.json'; - -import { vislibPointSeriesTypes as pointSeriesConfig } from '../../../lib/types/point_series'; - -describe('Point Series Config Type Class Test Suite', function() { - let parsedConfig; - const histogramConfig = { - type: 'histogram', - addLegend: true, - tooltip: { - show: true, - }, - categoryAxes: [ - { - id: 'CategoryAxis-1', - type: 'category', - title: {}, - }, - ], - valueAxes: [ - { - id: 'ValueAxis-1', - type: 'value', - labels: {}, - title: {}, - }, - ], - }; - - const data = { - get: prop => { - return data[prop] || data.data[prop] || null; - }, - getLabels: () => [], - data: { - hits: 621, - ordered: { - date: true, - interval: 30000, - max: 1408734982458, - min: 1408734082458, - }, - series: [ - { label: 's1', values: [{ x: 1408734060000, y: 8 }] }, - { label: 's2', values: [{ x: 1408734060000, y: 8 }] }, - { label: 's3', values: [{ x: 1408734060000, y: 8 }] }, - { label: 's4', values: [{ x: 1408734060000, y: 8 }] }, - { label: 's5', values: [{ x: 1408734060000, y: 8 }] }, - { label: 's6', values: [{ x: 1408734060000, y: 8 }] }, - { label: 's7', values: [{ x: 1408734060000, y: 8 }] }, - { label: 's8', values: [{ x: 1408734060000, y: 8 }] }, - { label: 's9', values: [{ x: 1408734060000, y: 8 }] }, - { label: 's10', values: [{ x: 1408734060000, y: 8 }] }, - { label: 's11', values: [{ x: 1408734060000, y: 8 }] }, - { label: 's12', values: [{ x: 1408734060000, y: 8 }] }, - { label: 's13', values: [{ x: 1408734060000, y: 8 }] }, - { label: 's14', values: [{ x: 1408734060000, y: 8 }] }, - { label: 's15', values: [{ x: 1408734060000, y: 8 }] }, - { label: 's16', values: [{ x: 1408734060000, y: 8 }] }, - { label: 's17', values: [{ x: 1408734060000, y: 8 }] }, - { label: 's18', values: [{ x: 1408734060000, y: 8 }] }, - { label: 's19', values: [{ x: 1408734060000, y: 8 }] }, - { label: 's20', values: [{ x: 1408734060000, y: 8 }] }, - { label: 's21', values: [{ x: 1408734060000, y: 8 }] }, - { label: 's22', values: [{ x: 1408734060000, y: 8 }] }, - { label: 's23', values: [{ x: 1408734060000, y: 8 }] }, - { label: 's24', values: [{ x: 1408734060000, y: 8 }] }, - { label: 's25', values: [{ x: 1408734060000, y: 8 }] }, - { label: 's26', values: [{ x: 1408734060000, y: 8 }] }, - ], - xAxisLabel: 'Date Histogram', - yAxisLabel: 'series', - yAxisFormatter: () => 'test', - }, - }; - - describe('histogram chart', function() { - beforeEach(function() { - parsedConfig = pointSeriesConfig.column(histogramConfig, data); - }); - it('should not throw an error when more than 25 series are provided', function() { - expect(parsedConfig.error).to.be.undefined; - }); - - it('should set axis title and formatter from data', () => { - expect(parsedConfig.categoryAxes[0].title.text).to.equal(data.data.xAxisLabel); - expect(parsedConfig.valueAxes[0].labels.axisFormatter).to.not.be.undefined; - }); - }); - - describe('line chart', function() { - beforeEach(function() { - const percentileDataObj = { - get: prop => { - return data[prop] || data.data[prop] || null; - }, - getLabels: () => [], - data: percentileTestdata.data, - }; - parsedConfig = pointSeriesConfig.line(percentileTestdata.cfg, percentileDataObj); - }); - it('should render a percentile line chart', function() { - expect(JSON.stringify(parsedConfig)).to.eql(JSON.stringify(percentileTestdataResult)); - }); - }); -}); diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/vislib.js b/src/legacy/core_plugins/vis_type_vislib/public/vislib/vislib.js deleted file mode 100644 index 024dee60ef2bf4..00000000000000 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/vislib.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import './lib/types/pie'; -import './lib/types/point_series'; -import './lib/types'; -import './lib/layout/layout_types'; -import './lib/data'; -import './visualizations/vis_types'; -import { Vis } from './vis'; - -// prefetched for faster optimization runs -// end prefetching - -/** - * Provides the Kibana4 Visualization Library - * - * @module vislib - * @main vislib - * @return {Object} Contains the version number and the Vis Class for creating visualizations - */ -export function VislibProvider() { - return { - version: '0.0.0', - Vis, - }; -} diff --git a/src/legacy/ui/public/field_editor/__snapshots__/field_editor.test.js.snap b/src/legacy/ui/public/field_editor/__snapshots__/field_editor.test.tsx.snap similarity index 77% rename from src/legacy/ui/public/field_editor/__snapshots__/field_editor.test.js.snap rename to src/legacy/ui/public/field_editor/__snapshots__/field_editor.test.tsx.snap index 19d12f4bbbd4c4..dc11bdfefa46bf 100644 --- a/src/legacy/ui/public/field_editor/__snapshots__/field_editor.test.js.snap +++ b/src/legacy/ui/public/field_editor/__snapshots__/field_editor.test.tsx.snap @@ -19,10 +19,31 @@ exports[`FieldEditor should render create new scripted field correctly 1`] = ` isVisible={false} /> - Test format - , - } - } + defaultMessage="Format" + id="common.ui.fieldEditor.formatHeader" + values={Object {}} /> } > @@ -134,8 +149,8 @@ exports[`FieldEditor should render create new scripted field correctly 1`] = ` "value": "", }, Object { - "text": "Test format", - "value": "test_format", + "text": undefined, + "value": "", }, ] } @@ -260,10 +275,31 @@ exports[`FieldEditor should render edit scripted field correctly 1`] = ` isVisible={false} /> - Test format - , - } - } + defaultMessage="Format" + id="common.ui.fieldEditor.formatHeader" + values={Object {}} /> } > @@ -371,8 +401,8 @@ exports[`FieldEditor should render edit scripted field correctly 1`] = ` "value": "", }, Object { - "text": "Test format", - "value": "test_format", + "text": undefined, + "value": "", }, ] } @@ -508,10 +538,31 @@ exports[`FieldEditor should show conflict field warning 1`] = ` isVisible={false} /> - Test format - , - } - } + defaultMessage="Format" + id="common.ui.fieldEditor.formatHeader" + values={Object {}} /> } > @@ -667,8 +712,8 @@ exports[`FieldEditor should show conflict field warning 1`] = ` "value": "", }, Object { - "text": "Test format", - "value": "test_format", + "text": undefined, + "value": "", }, ] } @@ -793,10 +838,31 @@ exports[`FieldEditor should show deprecated lang warning 1`] = ` isVisible={false} /> , "painlessLink": - Test format - , - } - } + defaultMessage="Format" + id="common.ui.fieldEditor.formatHeader" + values={Object {}} /> } > @@ -994,8 +1054,8 @@ exports[`FieldEditor should show deprecated lang warning 1`] = ` "value": "", }, Object { - "text": "Test format", - "value": "test_format", + "text": undefined, + "value": "", }, ] } @@ -1131,10 +1191,31 @@ exports[`FieldEditor should show multiple type field warning with a table contai isVisible={false} /> - Test format - , - } - } + defaultMessage="Format" + id="common.ui.fieldEditor.formatHeader" + values={Object {}} /> } > @@ -1346,8 +1421,8 @@ exports[`FieldEditor should show multiple type field warning with a table contai "value": "", }, Object { - "text": "Test format", - "value": "test_format", + "text": undefined, + "value": "", }, ] } diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/__snapshots__/field_format_editor.test.js.snap b/src/legacy/ui/public/field_editor/components/field_format_editor/__snapshots__/field_format_editor.test.tsx.snap similarity index 62% rename from src/legacy/ui/public/field_editor/components/field_format_editor/__snapshots__/field_format_editor.test.js.snap rename to src/legacy/ui/public/field_editor/components/field_format_editor/__snapshots__/field_format_editor.test.tsx.snap index b83ae8a901ecc4..82d21eb5d30ada 100644 --- a/src/legacy/ui/public/field_editor/components/field_format_editor/__snapshots__/field_format_editor.test.js.snap +++ b/src/legacy/ui/public/field_editor/components/field_format_editor/__snapshots__/field_format_editor.test.tsx.snap @@ -12,4 +12,14 @@ exports[`FieldFormatEditor should render normally 1`] = ` `; -exports[`FieldFormatEditor should render nothing if there is no editor for the format 1`] = ``; +exports[`FieldFormatEditor should render nothing if there is no editor for the format 1`] = ` + + + +`; diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/bytes/__snapshots__/bytes.test.js.snap b/src/legacy/ui/public/field_editor/components/field_format_editor/editors/bytes/__snapshots__/bytes.test.tsx.snap similarity index 98% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/bytes/__snapshots__/bytes.test.js.snap rename to src/legacy/ui/public/field_editor/components/field_format_editor/editors/bytes/__snapshots__/bytes.test.tsx.snap index 1f77660c9784cb..bf1682faf9a9d9 100644 --- a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/bytes/__snapshots__/bytes.test.js.snap +++ b/src/legacy/ui/public/field_editor/components/field_format_editor/editors/bytes/__snapshots__/bytes.test.tsx.snap @@ -5,7 +5,6 @@ exports[`BytesFormatEditor should render normally 1`] = ` input => input * 2), + getConverterFor: jest.fn().mockImplementation(() => (input: number) => input * 2), getParamDefaults: jest.fn().mockImplementation(() => { return { pattern: '0,0.[000]b' }; }), }; -const formatParams = {}; +const formatParams = { + pattern: '', +}; const onChange = jest.fn(); const onError = jest.fn(); @@ -41,8 +44,9 @@ describe('BytesFormatEditor', () => { it('should render normally', async () => { const component = shallow( { it('should render string type normally (regex field)', async () => { const component = shallowWithI18nProvider( { it('should render other type normally (range field)', async () => { const component = shallowWithI18nProvider( { it('should render multiple colors', async () => { const component = shallowWithI18nProvider( { + static formatId = 'color'; + constructor(props: FormatEditorProps) { super(props); this.onChange({ fieldType: props.fieldType, }); } - onColorChange = (newColorParams, index) => { + onColorChange = (newColorParams: Partial, index: number) => { const colors = [...this.props.formatParams.colors]; colors[index] = { ...colors[index], @@ -54,7 +69,7 @@ export class ColorFormatEditor extends DefaultFormatEditor { }); }; - removeColor = index => { + removeColor = (index: number) => { const colors = [...this.props.formatParams.colors]; colors.splice(index, 1); this.onChange({ @@ -86,7 +101,7 @@ export class ColorFormatEditor extends DefaultFormatEditor { defaultMessage="Pattern (regular expression)" /> ), - render: (value, item) => { + render: (value: string, item: IndexedColor) => { return ( ), - render: (value, item) => { + render: (value: string, item: IndexedColor) => { return ( ), - render: (color, item) => { + render: (color: string, item: IndexedColor) => { return ( ), - render: (color, item) => { + render: (color: string, item: IndexedColor) => { return ( ), - render: item => { + render: (item: IndexedColor) => { return (
{ + onClick: (item: IndexedColor) => { this.removeColor(item.index); }, type: 'icon', @@ -230,5 +249,3 @@ export class ColorFormatEditor extends DefaultFormatEditor { ); } } - -ColorFormatEditor.formatId = 'color'; diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/color/index.js b/src/legacy/ui/public/field_editor/components/field_format_editor/editors/color/index.ts similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/color/index.js rename to src/legacy/ui/public/field_editor/components/field_format_editor/editors/color/index.ts diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/date/__snapshots__/date.test.js.snap b/src/legacy/ui/public/field_editor/components/field_format_editor/editors/date/__snapshots__/date.test.tsx.snap similarity index 99% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/date/__snapshots__/date.test.js.snap rename to src/legacy/ui/public/field_editor/components/field_format_editor/editors/date/__snapshots__/date.test.tsx.snap index e33f0d6ee9c611..2d73f775e316c7 100644 --- a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/date/__snapshots__/date.test.js.snap +++ b/src/legacy/ui/public/field_editor/components/field_format_editor/editors/date/__snapshots__/date.test.tsx.snap @@ -5,7 +5,6 @@ exports[`DateFormatEditor should render normally 1`] = ` input => `converted date for ${input}`), + getConverterFor: jest + .fn() + .mockImplementation(() => (input: string) => `converted date for ${input}`), getParamDefaults: jest.fn().mockImplementation(() => { return { pattern: 'MMMM Do YYYY, HH:mm:ss.SSS' }; }), }; -const formatParams = {}; +const formatParams = { pattern: '' }; const onChange = jest.fn(); const onError = jest.fn(); @@ -41,8 +44,9 @@ describe('DateFormatEditor', () => { it('should render normally', async () => { const component = shallow( { static formatId = 'date'; - - constructor(props) { - super(props); - this.state.sampleInputs = [ + state = { + ...defaultState, + sampleInputs: [ Date.now(), moment() .startOf('year') @@ -41,8 +43,8 @@ export class DateFormatEditor extends DefaultFormatEditor { moment() .endOf('year') .valueOf(), - ]; - } + ], + }; render() { const { format, formatParams } = this.props; diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/date/index.js b/src/legacy/ui/public/field_editor/components/field_format_editor/editors/date/index.ts similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/date/index.js rename to src/legacy/ui/public/field_editor/components/field_format_editor/editors/date/index.ts diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/date_nanos/__snapshots__/date_nanos.test.js.snap b/src/legacy/ui/public/field_editor/components/field_format_editor/editors/date_nanos/__snapshots__/date_nanos.test.tsx.snap similarity index 99% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/date_nanos/__snapshots__/date_nanos.test.js.snap rename to src/legacy/ui/public/field_editor/components/field_format_editor/editors/date_nanos/__snapshots__/date_nanos.test.tsx.snap index cb570144fcee3f..1456deaa13e47b 100644 --- a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/date_nanos/__snapshots__/date_nanos.test.js.snap +++ b/src/legacy/ui/public/field_editor/components/field_format_editor/editors/date_nanos/__snapshots__/date_nanos.test.tsx.snap @@ -5,7 +5,6 @@ exports[`DateFormatEditor should render normally 1`] = ` input => `converted date for ${input}`), + getConverterFor: jest + .fn() + .mockImplementation(() => (input: string) => `converted date for ${input}`), getParamDefaults: jest.fn().mockImplementation(() => { return { pattern: 'MMM D, YYYY @ HH:mm:ss.SSSSSSSSS' }; }), }; -const formatParams = {}; +const formatParams = { + pattern: '', +}; const onChange = jest.fn(); const onError = jest.fn(); @@ -41,8 +46,9 @@ describe('DateFormatEditor', () => { it('should render normally', async () => { const component = shallow( { static formatId = 'date_nanos'; - - constructor(props) { - super(props); - this.state.sampleInputs = [ + state = { + ...defaultState, + sampleInputs: [ '2015-01-01T12:10:30.123456789Z', '2019-05-08T06:55:21.567891234Z', '2019-08-06T17:22:30.987654321Z', - ]; - } + ], + }; render() { const { format, formatParams } = this.props; diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/date_nanos/index.js b/src/legacy/ui/public/field_editor/components/field_format_editor/editors/date_nanos/index.ts similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/date_nanos/index.js rename to src/legacy/ui/public/field_editor/components/field_format_editor/editors/date_nanos/index.ts diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/default/__snapshots__/default.test.js.snap b/src/legacy/ui/public/field_editor/components/field_format_editor/editors/default/__snapshots__/default.test.js.snap deleted file mode 100644 index 0f9eef6f922c84..00000000000000 --- a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/default/__snapshots__/default.test.js.snap +++ /dev/null @@ -1,3 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`DefaultFormatEditor should render nothing 1`] = `""`; diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/default/__snapshots__/default.test.tsx.snap b/src/legacy/ui/public/field_editor/components/field_format_editor/editors/default/__snapshots__/default.test.tsx.snap new file mode 100644 index 00000000000000..74468ea1451f44 --- /dev/null +++ b/src/legacy/ui/public/field_editor/components/field_format_editor/editors/default/__snapshots__/default.test.tsx.snap @@ -0,0 +1,3 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`DefaultFormatEditor should render nothing 1`] = ``; diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/default/default.test.js b/src/legacy/ui/public/field_editor/components/field_format_editor/editors/default/default.test.tsx similarity index 77% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/default/default.test.js rename to src/legacy/ui/public/field_editor/components/field_format_editor/editors/default/default.test.tsx index cf87d4a886024b..3f30af97dc063b 100644 --- a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/default/default.test.js +++ b/src/legacy/ui/public/field_editor/components/field_format_editor/editors/default/default.test.tsx @@ -19,8 +19,9 @@ import React from 'react'; import { shallow } from 'enzyme'; +import { FieldFormat } from 'src/plugins/data/public'; -import { DefaultFormatEditor, convertSampleInput } from './default'; +import { DefaultFormatEditor, convertSampleInput, ConverterParams } from './default'; const fieldType = 'number'; const format = { @@ -32,13 +33,11 @@ const onError = jest.fn(); describe('DefaultFormatEditor', () => { describe('convertSampleInput', () => { - const converter = input => { - if (isNaN(input)) { - throw { - message: 'Input is not a number', - }; + const converter = (input: ConverterParams) => { + if (typeof input !== 'number') { + throw new Error('Input is not a number'); } else { - return input * 2; + return (input * 2).toString(); } }; @@ -46,12 +45,12 @@ describe('DefaultFormatEditor', () => { const inputs = [1, 10, 15]; const output = convertSampleInput(converter, inputs); - expect(output.error).toEqual(null); + expect(output.error).toBeUndefined(); expect(JSON.stringify(output.samples)).toEqual( JSON.stringify([ - { input: 1, output: 2 }, - { input: 10, output: 20 }, - { input: 15, output: 30 }, + { input: 1, output: '2' }, + { input: 10, output: '20' }, + { input: 15, output: '30' }, ]) ); }); @@ -70,8 +69,9 @@ describe('DefaultFormatEditor', () => { it('should render nothing', async () => { const component = shallow( { it('should call prop onChange()', async () => { const component = shallow( ); - component.instance().onChange(); + (component.instance() as DefaultFormatEditor).onChange(); expect(onChange).toBeCalled(); }); it('should call prop onError() if converter throws an error', async () => { const newFormat = { getConverterFor: jest.fn().mockImplementation(() => () => { - throw { message: 'Test error message' }; + throw new Error('Test error message'); }), }; shallow( { - let error = null; - let samples = []; +import { FieldFormat, FieldFormatsContentType } from 'src/plugins/data/public'; +import { Sample } from '../../../../types'; +import { FieldFormatEditorProps } from '../../field_format_editor'; + +export type ConverterParams = string | number | Array; + +export const convertSampleInput = ( + converter: (input: ConverterParams) => string, + inputs: ConverterParams[] +) => { + let error; + let samples: Sample[] = []; try { samples = inputs.map(input => { @@ -45,32 +53,48 @@ export const convertSampleInput = (converter, inputs) => { }; }; -export class DefaultFormatEditor extends PureComponent { - static propTypes = { - fieldType: PropTypes.string.isRequired, - format: PropTypes.object.isRequired, - formatParams: PropTypes.object.isRequired, - onChange: PropTypes.func.isRequired, - onError: PropTypes.func.isRequired, - }; +interface SampleInputs { + [key: string]: Array; +} - constructor(props) { - super(props); - this.state = { - sampleInputs: [], - sampleConverterType: 'text', - error: null, - samples: [], - }; - } +export interface FormatEditorProps

{ + fieldType: string; + format: FieldFormat; + formatParams: { type?: string } & P; + onChange: (newParams: Record) => void; + onError: FieldFormatEditorProps['onError']; + basePath: string; +} - static getDerivedStateFromProps(nextProps, state) { +export interface FormatEditorState { + sampleInputs: ReactText[]; + sampleConverterType: FieldFormatsContentType; + error?: string; + samples: Sample[]; + sampleInputsByType: SampleInputs; +} + +export const defaultState = { + sampleInputs: [] as ReactText[], + sampleConverterType: 'text' as FieldFormatsContentType, + error: undefined, + samples: [] as Sample[], + sampleInputsByType: {}, +}; + +export class DefaultFormatEditor

extends PureComponent< + FormatEditorProps

, + FormatEditorState & S +> { + state = defaultState as FormatEditorState & S; + + static getDerivedStateFromProps(nextProps: FormatEditorProps<{}>, state: FormatEditorState) { const { format, formatParams, onError } = nextProps; const { sampleInputsByType, sampleInputs, sampleConverterType } = state; const converter = format.getConverterFor(sampleConverterType); const type = typeof sampleInputsByType === 'object' && formatParams.type; - const inputs = type ? sampleInputsByType[formatParams.type] || [] : sampleInputs; + const inputs = type ? sampleInputsByType[formatParams.type as string] || [] : sampleInputs; const output = convertSampleInput(converter, inputs); onError(output.error); return output; @@ -78,6 +102,7 @@ export class DefaultFormatEditor extends PureComponent { onChange = (newParams = {}) => { const { onChange, formatParams } = this.props; + onChange({ ...formatParams, ...newParams, @@ -85,6 +110,6 @@ export class DefaultFormatEditor extends PureComponent { }; render() { - return null; + return <>; } } diff --git a/src/legacy/core_plugins/vis_type_vislib/public/legacy_imports.ts b/src/legacy/ui/public/field_editor/components/field_format_editor/editors/default/index.ts similarity index 86% rename from src/legacy/core_plugins/vis_type_vislib/public/legacy_imports.ts rename to src/legacy/ui/public/field_editor/components/field_format_editor/editors/default/index.ts index c04ffa506eb04d..a6575f296864d4 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/legacy_imports.ts +++ b/src/legacy/ui/public/field_editor/components/field_format_editor/editors/default/index.ts @@ -17,5 +17,4 @@ * under the License. */ -import { search } from '../../../../plugins/data/public'; -export const { tabifyAggResponse, tabifyGetColumns } = search; +export { DefaultFormatEditor, defaultState, FormatEditorProps, FormatEditorState } from './default'; diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/duration/__snapshots__/duration.test.js.snap b/src/legacy/ui/public/field_editor/components/field_format_editor/editors/duration/__snapshots__/duration.test.tsx.snap similarity index 98% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/duration/__snapshots__/duration.test.js.snap rename to src/legacy/ui/public/field_editor/components/field_format_editor/editors/duration/__snapshots__/duration.test.tsx.snap index ef11d70926ad75..dbebd324b16b69 100644 --- a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/duration/__snapshots__/duration.test.js.snap +++ b/src/legacy/ui/public/field_editor/components/field_format_editor/editors/duration/__snapshots__/duration.test.tsx.snap @@ -5,7 +5,6 @@ exports[`DurationFormatEditor should render human readable output normally 1`] = input => `converted duration for ${input}`), + getConverterFor: jest + .fn() + .mockImplementation(() => (input: string) => `converted duration for ${input}`), getParamDefaults: jest.fn().mockImplementation(() => { return { inputFormat: 'seconds', @@ -52,7 +55,11 @@ const format = { ], }, }; -const formatParams = {}; +const formatParams = { + outputPrecision: 2, + inputFormat: '', + outputFormat: '', +}; const onChange = jest.fn(); const onError = jest.fn(); @@ -64,8 +71,9 @@ describe('DurationFormatEditor', () => { it('should render human readable output normally', async () => { const component = shallow( { }; const component = shallow( { + static formatId = 'duration'; + state = { + ...defaultState, + sampleInputs: [-123, 1, 12, 123, 658, 1988, 3857, 123292, 923528271], + hasDecimalError: false, + }; - static getDerivedStateFromProps(nextProps, state) { + static getDerivedStateFromProps( + nextProps: FormatEditorProps, + state: FormatEditorState & DurationFormatEditorState + ) { const output = super.getDerivedStateFromProps(nextProps, state); let error = null; - if (!nextProps.format.isHuman() && nextProps.formatParams.outputPrecision > 20) { + if ( + !(nextProps.format as DurationFormat).isHuman() && + nextProps.formatParams.outputPrecision > 20 + ) { error = i18n.translate('common.ui.fieldEditor.durationErrorMessage', { defaultMessage: 'Decimal places must be between 0 and 20', }); @@ -77,10 +110,10 @@ export class DurationFormatEditor extends DefaultFormatEditor { > { + options={format.type.inputFormats.map((fmt: InputFormat) => { return { - value: format.kind, - text: format.text, + value: fmt.kind, + text: fmt.text, }; })} onChange={e => { @@ -100,10 +133,10 @@ export class DurationFormatEditor extends DefaultFormatEditor { > { + options={format.type.outputFormats.map((fmt: OutputFormat) => { return { - value: format.method, - text: format.text, + value: fmt.method, + text: fmt.text, }; })} onChange={e => { @@ -112,7 +145,7 @@ export class DurationFormatEditor extends DefaultFormatEditor { isInvalid={!!error} /> - {!format.isHuman() ? ( + {!(format as DurationFormat).isHuman() ? ( input => input * 2), + getConverterFor: jest.fn().mockImplementation(() => (input: number) => input * 2), getParamDefaults: jest.fn().mockImplementation(() => { return { pattern: '0,0.[000]' }; }), }; -const formatParams = {}; +const formatParams = { + pattern: '', +}; const onChange = jest.fn(); const onError = jest.fn(); @@ -41,8 +44,9 @@ describe('NumberFormatEditor', () => { it('should render normally', async () => { const component = shallow( { static formatId = 'number'; - - constructor(props) { - super(props); - this.state.sampleInputs = [10000, 12.345678, -1, -999, 0.52]; - } + state = { + ...defaultState, + sampleInputs: [10000, 12.345678, -1, -999, 0.52], + }; render() { const { format, formatParams } = this.props; diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/percent/__snapshots__/percent.test.js.snap b/src/legacy/ui/public/field_editor/components/field_format_editor/editors/percent/__snapshots__/percent.test.tsx.snap similarity index 99% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/percent/__snapshots__/percent.test.js.snap rename to src/legacy/ui/public/field_editor/components/field_format_editor/editors/percent/__snapshots__/percent.test.tsx.snap index 30d1de270522ed..0784a3f5e407db 100644 --- a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/percent/__snapshots__/percent.test.js.snap +++ b/src/legacy/ui/public/field_editor/components/field_format_editor/editors/percent/__snapshots__/percent.test.tsx.snap @@ -5,7 +5,6 @@ exports[`PercentFormatEditor should render normally 1`] = ` input => input * 2), + getConverterFor: jest.fn().mockImplementation(() => (input: number) => input * 2), getParamDefaults: jest.fn().mockImplementation(() => { return { pattern: '0,0.[000]%' }; }), }; -const formatParams = {}; +const formatParams = { + pattern: '', +}; const onChange = jest.fn(); const onError = jest.fn(); @@ -41,8 +44,9 @@ describe('PercentFormatEditor', () => { it('should render normally', async () => { const component = shallow( { it('should render normally', async () => { const component = shallowWithI18nProvider( { it('should render multiple lookup entries and unknown key value', async () => { const component = shallowWithI18nProvider( diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/static_lookup/static_lookup.js b/src/legacy/ui/public/field_editor/components/field_format_editor/editors/static_lookup/static_lookup.tsx similarity index 86% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/static_lookup/static_lookup.js rename to src/legacy/ui/public/field_editor/components/field_format_editor/editors/static_lookup/static_lookup.tsx index 31ff99696da017..f998e271b6c999 100644 --- a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/static_lookup/static_lookup.js +++ b/src/legacy/ui/public/field_editor/components/field_format_editor/editors/static_lookup/static_lookup.tsx @@ -21,13 +21,26 @@ import React, { Fragment } from 'react'; import { EuiBasicTable, EuiButton, EuiFieldText, EuiFormRow, EuiSpacer } from '@elastic/eui'; -import { DefaultFormatEditor } from '../default'; - import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; +import { DefaultFormatEditor } from '../default'; + +export interface StaticLookupFormatEditorFormatParams { + lookupEntries: Array<{ key: string; value: string }>; + unknownKeyValue: string; +} + +interface StaticLookupItem { + key: string; + value: string; + index: number; +} -export class StaticLookupFormatEditor extends DefaultFormatEditor { - onLookupChange = (newLookupParams, index) => { +export class StaticLookupFormatEditor extends DefaultFormatEditor< + StaticLookupFormatEditorFormatParams +> { + static formatId = 'static_lookup'; + onLookupChange = (newLookupParams: { value?: string; key?: string }, index: number) => { const lookupEntries = [...this.props.formatParams.lookupEntries]; lookupEntries[index] = { ...lookupEntries[index], @@ -45,7 +58,7 @@ export class StaticLookupFormatEditor extends DefaultFormatEditor { }); }; - removeLookup = index => { + removeLookup = (index: number) => { const lookupEntries = [...this.props.formatParams.lookupEntries]; lookupEntries.splice(index, 1); this.onChange({ @@ -73,7 +86,7 @@ export class StaticLookupFormatEditor extends DefaultFormatEditor { name: ( ), - render: (value, item) => { + render: (value: number, item: StaticLookupItem) => { return ( ), - render: (value, item) => { + render: (value: number, item: StaticLookupItem) => { return ( { + onClick: (item: StaticLookupItem) => { this.removeLookup(item.index); }, type: 'icon', @@ -172,5 +189,3 @@ export class StaticLookupFormatEditor extends DefaultFormatEditor { ); } } - -StaticLookupFormatEditor.formatId = 'static_lookup'; diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/string/__snapshots__/string.test.js.snap b/src/legacy/ui/public/field_editor/components/field_format_editor/editors/string/__snapshots__/string.test.tsx.snap similarity index 98% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/string/__snapshots__/string.test.js.snap rename to src/legacy/ui/public/field_editor/components/field_format_editor/editors/string/__snapshots__/string.test.tsx.snap index 270ff844fd0863..cde081ff10d147 100644 --- a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/string/__snapshots__/string.test.js.snap +++ b/src/legacy/ui/public/field_editor/components/field_format_editor/editors/string/__snapshots__/string.test.tsx.snap @@ -5,7 +5,6 @@ exports[`StringFormatEditor should render normally 1`] = ` input => input.toUpperCase()), + getConverterFor: jest.fn().mockImplementation(() => (input: string) => input.toUpperCase()), getParamDefaults: jest.fn().mockImplementation(() => { return { transform: 'upper' }; }), @@ -37,7 +38,9 @@ const format = { ], }, }; -const formatParams = {}; +const formatParams = { + transform: '', +}; const onChange = jest.fn(); const onError = jest.fn(); @@ -49,8 +52,9 @@ describe('StringFormatEditor', () => { it('should render normally', async () => { const component = shallow( { + static formatId = 'string'; + state = { + ...defaultState, + sampleInputs: [ 'A Quick Brown Fox.', 'STAY CALM!', 'com.organizations.project.ClassName', 'hostname.net', 'SGVsbG8gd29ybGQ=', '%EC%95%88%EB%85%95%20%ED%82%A4%EB%B0%94%EB%82%98', - ]; - } + ], + }; render() { const { format, formatParams } = this.props; @@ -61,7 +68,7 @@ export class StringFormatEditor extends DefaultFormatEditor { { + options={format.type.transformOptions.map((option: TransformOptions) => { return { value: option.kind, text: option.text, diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/truncate/__snapshots__/truncate.test.js.snap b/src/legacy/ui/public/field_editor/components/field_format_editor/editors/truncate/__snapshots__/truncate.test.tsx.snap similarity index 98% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/truncate/__snapshots__/truncate.test.js.snap rename to src/legacy/ui/public/field_editor/components/field_format_editor/editors/truncate/__snapshots__/truncate.test.tsx.snap index 729487dfae5d79..f646d5b4afca80 100644 --- a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/truncate/__snapshots__/truncate.test.js.snap +++ b/src/legacy/ui/public/field_editor/components/field_format_editor/editors/truncate/__snapshots__/truncate.test.tsx.snap @@ -5,7 +5,6 @@ exports[`TruncateFormatEditor should render normally 1`] = ` input => input.substring(0, 10)), + getConverterFor: jest.fn().mockImplementation(() => (input: string) => input.substring(0, 10)), getParamDefaults: jest.fn().mockImplementation(() => { return { fieldLength: 10 }; }), }; -const formatParams = {}; +const formatParams = { + fieldLength: 5, +}; const onChange = jest.fn(); const onError = jest.fn(); @@ -47,8 +50,9 @@ describe('TruncateFormatEditor', () => { it('should render normally', async () => { const component = shallow( { it('should fire error, when input is invalid', async () => { const component = shallow( { validationMessage: 'Error!', }, }; - await input.invoke('onChange')(changeEvent); + + await input!.invoke('onChange')!((changeEvent as unknown) as ChangeEvent); expect(onError).toBeCalledWith(changeEvent.target.validationMessage); expect(onChange).not.toBeCalled(); @@ -85,8 +91,9 @@ describe('TruncateFormatEditor', () => { it('should fire change, when input changed and is valid', async () => { const component = shallow( { }, }; onError.mockClear(); - await input.invoke('onChange')(changeEvent); + await input!.invoke('onChange')!((changeEvent as unknown) as ChangeEvent); expect(onError).not.toBeCalled(); expect(onChange).toBeCalledWith({ fieldLength: 123 }); }); diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/truncate/truncate.js b/src/legacy/ui/public/field_editor/components/field_format_editor/editors/truncate/truncate.tsx similarity index 87% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/truncate/truncate.js rename to src/legacy/ui/public/field_editor/components/field_format_editor/editors/truncate/truncate.tsx index 9a9b6c954b78d0..9fd44c5f9655de 100644 --- a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/truncate/truncate.js +++ b/src/legacy/ui/public/field_editor/components/field_format_editor/editors/truncate/truncate.tsx @@ -21,21 +21,23 @@ import React, { Fragment } from 'react'; import { EuiFieldNumber, EuiFormRow } from '@elastic/eui'; -import { DefaultFormatEditor } from '../default'; +import { FormattedMessage } from '@kbn/i18n/react'; +import { DefaultFormatEditor, defaultState } from '../default'; import { FormatEditorSamples } from '../../samples'; import { sample } from './sample'; -import { FormattedMessage } from '@kbn/i18n/react'; +interface TruncateFormatEditorFormatParams { + fieldLength: number; +} -export class TruncateFormatEditor extends DefaultFormatEditor { +export class TruncateFormatEditor extends DefaultFormatEditor { static formatId = 'truncate'; - - constructor(props) { - super(props); - this.state.sampleInputs = [sample]; - } + state = { + ...defaultState, + sampleInputs: [sample], + }; render() { const { formatParams, onError } = this.props; diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/__snapshots__/label_template_flyout.test.js.snap b/src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/__snapshots__/label_template_flyout.test.tsx.snap similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/__snapshots__/label_template_flyout.test.js.snap rename to src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/__snapshots__/label_template_flyout.test.tsx.snap diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/__snapshots__/url.test.js.snap b/src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/__snapshots__/url.test.tsx.snap similarity index 98% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/__snapshots__/url.test.js.snap rename to src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/__snapshots__/url.test.tsx.snap index c727f54874db4d..a3418077ad2586 100644 --- a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/__snapshots__/url.test.js.snap +++ b/src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/__snapshots__/url.test.tsx.snap @@ -49,7 +49,6 @@ exports[`UrlFormatEditor should render label template help 1`] = ` ' + + i18n.translate('common.ui.fieldEditor.labelTemplate.example.output.idLabel', { + defaultMessage: 'User', + }) + + ' #1234', + }, + { + input: '/assets/main.css', + urlTemplate: 'http://site.com{{rawValue}}', + labelTemplate: i18n.translate('common.ui.fieldEditor.labelTemplate.example.pathLabel', { + defaultMessage: 'View Asset', + }), + output: + '' + + i18n.translate('common.ui.fieldEditor.labelTemplate.example.output.pathLabel', { + defaultMessage: 'View Asset', + }) + + '', + }, +]; + export const LabelTemplateFlyout = ({ isVisible = false, onClose = () => {} }) => { return isVisible ? ( @@ -66,40 +103,8 @@ export const LabelTemplateFlyout = ({ isVisible = false, onClose = () => {} }) = defaultMessage="Examples" /> - ' + - i18n.translate('common.ui.fieldEditor.labelTemplate.example.output.idLabel', { - defaultMessage: 'User', - }) + - ' #1234', - }, - { - input: '/assets/main.css', - urlTemplate: 'http://site.com{{rawValue}}', - labelTemplate: i18n.translate( - 'common.ui.fieldEditor.labelTemplate.example.pathLabel', - { defaultMessage: 'View Asset' } - ), - output: - '' + - i18n.translate('common.ui.fieldEditor.labelTemplate.example.output.pathLabel', { - defaultMessage: 'View Asset', - }) + - '', - }, - ]} + + items={items} columns={[ { field: 'input', @@ -125,14 +130,14 @@ export const LabelTemplateFlyout = ({ isVisible = false, onClose = () => {} }) = name: i18n.translate('common.ui.fieldEditor.labelTemplate.outputHeader', { defaultMessage: 'Output', }), - render: value => { + render: (value: LabelTemplateExampleItem['output']) => { return ( ); }, diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/url.test.js b/src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/url.test.tsx similarity index 78% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/url.test.js rename to src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/url.test.tsx index 1d732b50db3d00..4d09da84edfb63 100644 --- a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/url.test.js +++ b/src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/url.test.tsx @@ -19,12 +19,15 @@ import React from 'react'; import { shallow } from 'enzyme'; +import { FieldFormat } from 'src/plugins/data/public'; import { UrlFormatEditor } from './url'; const fieldType = 'string'; const format = { - getConverterFor: jest.fn().mockImplementation(() => input => `converted url for ${input}`), + getConverterFor: jest + .fn() + .mockImplementation(() => (input: string) => `converted url for ${input}`), type: { urlTypes: [ { kind: 'a', text: 'Link' }, @@ -33,7 +36,13 @@ const format = { ], }, }; -const formatParams = {}; +const formatParams = { + openLinkInCurrentTab: true, + urlTemplate: '', + labelTemplate: '', + width: '', + height: '', +}; const onChange = jest.fn(); const onError = jest.fn(); @@ -49,8 +58,9 @@ describe('UrlFormatEditor', () => { it('should render normally', async () => { const component = shallow( { it('should render url template help', async () => { const component = shallow( ); - component.instance().showUrlTemplateHelp(); + (component.instance() as UrlFormatEditor).showUrlTemplateHelp(); component.update(); expect(component).toMatchSnapshot(); }); @@ -79,15 +90,16 @@ describe('UrlFormatEditor', () => { it('should render label template help', async () => { const component = shallow( ); - component.instance().showLabelTemplateHelp(); + (component.instance() as UrlFormatEditor).showLabelTemplateHelp(); component.update(); expect(component).toMatchSnapshot(); }); @@ -95,8 +107,9 @@ describe('UrlFormatEditor', () => { it('should render width and height fields if image', async () => { const component = shallow( { static formatId = 'url'; + iconPattern: string; - constructor(props) { + constructor(props: FormatEditorProps) { super(props); - const bp = chrome.getBasePath(); - this.iconPattern = `${bp}/bundles/src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/icons/{{value}}.png`; + + this.iconPattern = `${props.basePath}/bundles/src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/icons/{{value}}.png`; this.state = { ...this.state, sampleInputsByType: { @@ -61,17 +88,17 @@ export class UrlFormatEditor extends DefaultFormatEditor { }; } - sanitizeNumericValue = val => { - const sanitizedValue = parseInt(val); + sanitizeNumericValue = (val: string) => { + const sanitizedValue = parseInt(val, 10); if (isNaN(sanitizedValue)) { return ''; } return sanitizedValue; }; - onTypeChange = newType => { + onTypeChange = (newType: string) => { const { urlTemplate, width, height } = this.props.formatParams; - const params = { + const params: OnChangeParam = { type: newType, }; if (newType === 'img') { @@ -81,7 +108,7 @@ export class UrlFormatEditor extends DefaultFormatEditor { params.urlTemplate = this.iconPattern; } } else if (newType !== 'img' && urlTemplate === this.iconPattern) { - params.urlTemplate = null; + params.urlTemplate = undefined; } this.onChange(params); }; @@ -169,7 +196,7 @@ export class UrlFormatEditor extends DefaultFormatEditor { { + options={format.type.urlTypes.map((type: UrlType) => { return { value: type.kind, text: type.text, diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/url_template_flyout.test.js b/src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/url_template_flyout.test.tsx similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/url_template_flyout.test.js rename to src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/url_template_flyout.test.tsx diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/url_template_flyout.js b/src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/url_template_flyout.tsx similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/url_template_flyout.js rename to src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/url_template_flyout.tsx diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/field_format_editor.test.js b/src/legacy/ui/public/field_editor/components/field_format_editor/field_format_editor.test.tsx similarity index 84% rename from src/legacy/ui/public/field_editor/components/field_format_editor/field_format_editor.test.js rename to src/legacy/ui/public/field_editor/components/field_format_editor/field_format_editor.test.tsx index 9e038413978723..f6e631c8b7ac05 100644 --- a/src/legacy/ui/public/field_editor/components/field_format_editor/field_format_editor.test.js +++ b/src/legacy/ui/public/field_editor/components/field_format_editor/field_format_editor.test.tsx @@ -21,6 +21,7 @@ import React, { PureComponent } from 'react'; import { shallow } from 'enzyme'; import { FieldFormatEditor } from './field_format_editor'; +import { DefaultFormatEditor } from './editors/default'; class TestEditor extends PureComponent { render() { @@ -31,19 +32,22 @@ class TestEditor extends PureComponent { } } +const formatEditors = { + byFormatId: { + ip: TestEditor, + number: TestEditor, + }, +}; + describe('FieldFormatEditor', () => { it('should render normally', async () => { const component = shallow( { - return TestEditor; - }, - }} + fieldFormatEditors={formatEditors} onChange={() => {}} onError={() => {}} /> @@ -56,14 +60,10 @@ describe('FieldFormatEditor', () => { const component = shallow( { - return null; - }, - }} + fieldFormatEditors={formatEditors} onChange={() => {}} onError={() => {}} /> diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/field_format_editor.js b/src/legacy/ui/public/field_editor/components/field_format_editor/field_format_editor.tsx similarity index 54% rename from src/legacy/ui/public/field_editor/components/field_format_editor/field_format_editor.js rename to src/legacy/ui/public/field_editor/components/field_format_editor/field_format_editor.tsx index 204554ad94644c..2de6dff5d251a3 100644 --- a/src/legacy/ui/public/field_editor/components/field_format_editor/field_format_editor.js +++ b/src/legacy/ui/public/field_editor/components/field_format_editor/field_format_editor.tsx @@ -18,29 +18,44 @@ */ import React, { PureComponent, Fragment } from 'react'; -import PropTypes from 'prop-types'; +import { DefaultFormatEditor } from '../../components/field_format_editor/editors/default'; -export class FieldFormatEditor extends PureComponent { - static propTypes = { - fieldType: PropTypes.string.isRequired, - fieldFormat: PropTypes.object.isRequired, - fieldFormatId: PropTypes.string.isRequired, - fieldFormatParams: PropTypes.object.isRequired, - fieldFormatEditors: PropTypes.object.isRequired, - onChange: PropTypes.func.isRequired, - onError: PropTypes.func.isRequired, - }; +export interface FieldFormatEditorProps { + fieldType: string; + fieldFormat: DefaultFormatEditor; + fieldFormatId: string; + fieldFormatParams: { [key: string]: unknown }; + fieldFormatEditors: any; + onChange: (change: { fieldType: string; [key: string]: any }) => void; + onError: (error?: string) => void; +} + +interface EditorComponentProps { + fieldType: FieldFormatEditorProps['fieldType']; + format: FieldFormatEditorProps['fieldFormat']; + formatParams: FieldFormatEditorProps['fieldFormatParams']; + onChange: FieldFormatEditorProps['onChange']; + onError: FieldFormatEditorProps['onError']; +} + +interface FieldFormatEditorState { + EditorComponent: React.FC; +} - constructor(props) { +export class FieldFormatEditor extends PureComponent< + FieldFormatEditorProps, + FieldFormatEditorState +> { + constructor(props: FieldFormatEditorProps) { super(props); this.state = { - EditorComponent: null, + EditorComponent: props.fieldFormatEditors.byFormatId[props.fieldFormatId], }; } - static getDerivedStateFromProps(nextProps) { + static getDerivedStateFromProps(nextProps: FieldFormatEditorProps) { return { - EditorComponent: nextProps.fieldFormatEditors.getEditor(nextProps.fieldFormatId) || null, + EditorComponent: nextProps.fieldFormatEditors.byFormatId[nextProps.fieldFormatId] || null, }; } diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/index.js b/src/legacy/ui/public/field_editor/components/field_format_editor/index.ts similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/index.js rename to src/legacy/ui/public/field_editor/components/field_format_editor/index.ts diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/register.js b/src/legacy/ui/public/field_editor/components/field_format_editor/register.ts similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/register.js rename to src/legacy/ui/public/field_editor/components/field_format_editor/register.ts diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/samples/__snapshots__/samples.test.js.snap b/src/legacy/ui/public/field_editor/components/field_format_editor/samples/__snapshots__/samples.test.tsx.snap similarity index 97% rename from src/legacy/ui/public/field_editor/components/field_format_editor/samples/__snapshots__/samples.test.js.snap rename to src/legacy/ui/public/field_editor/components/field_format_editor/samples/__snapshots__/samples.test.tsx.snap index 73a7c1141c6014..2883ffb6bc8a13 100644 --- a/src/legacy/ui/public/field_editor/components/field_format_editor/samples/__snapshots__/samples.test.js.snap +++ b/src/legacy/ui/public/field_editor/components/field_format_editor/samples/__snapshots__/samples.test.tsx.snap @@ -41,7 +41,7 @@ exports[`FormatEditorSamples should render normally 1`] = ` }, Object { "input": 123, - "output": 456, + "output": "456", }, Object { "input": Array [ diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/samples/index.js b/src/legacy/ui/public/field_editor/components/field_format_editor/samples/index.ts similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/samples/index.js rename to src/legacy/ui/public/field_editor/components/field_format_editor/samples/index.ts diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/samples/samples.test.js b/src/legacy/ui/public/field_editor/components/field_format_editor/samples/samples.test.tsx similarity index 97% rename from src/legacy/ui/public/field_editor/components/field_format_editor/samples/samples.test.js rename to src/legacy/ui/public/field_editor/components/field_format_editor/samples/samples.test.tsx index 8e18f1f5f4de8b..01f405e9aff1f0 100644 --- a/src/legacy/ui/public/field_editor/components/field_format_editor/samples/samples.test.js +++ b/src/legacy/ui/public/field_editor/components/field_format_editor/samples/samples.test.tsx @@ -28,7 +28,7 @@ describe('FormatEditorSamples', () => { foo, bar' }, ]} /> diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/samples/samples.js b/src/legacy/ui/public/field_editor/components/field_format_editor/samples/samples.tsx similarity index 81% rename from src/legacy/ui/public/field_editor/components/field_format_editor/samples/samples.js rename to src/legacy/ui/public/field_editor/components/field_format_editor/samples/samples.tsx index b3345f085882c4..d63674bf4d2053 100644 --- a/src/legacy/ui/public/field_editor/components/field_format_editor/samples/samples.js +++ b/src/legacy/ui/public/field_editor/components/field_format_editor/samples/samples.tsx @@ -18,26 +18,22 @@ */ import React, { PureComponent } from 'react'; -import PropTypes from 'prop-types'; import { EuiBasicTable, EuiFormRow } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; +import { Sample } from '../../../types'; -export class FormatEditorSamples extends PureComponent { +interface FormatEditorSamplesProps { + samples: Sample[]; + sampleType: string; +} + +export class FormatEditorSamples extends PureComponent { static defaultProps = { sampleType: 'text', }; - static propTypes = { - samples: PropTypes.arrayOf( - PropTypes.shape({ - input: PropTypes.any.isRequired, - output: PropTypes.any.isRequired, - }) - ).isRequired, - sampleType: PropTypes.oneOf(['html', 'text']), - }; render() { const { samples, sampleType } = this.props; @@ -48,7 +44,7 @@ export class FormatEditorSamples extends PureComponent { name: i18n.translate('common.ui.fieldEditor.samples.inputHeader', { defaultMessage: 'Input', }), - render: input => { + render: (input: {} | string) => { return typeof input === 'object' ? JSON.stringify(input) : input; }, }, @@ -57,14 +53,14 @@ export class FormatEditorSamples extends PureComponent { name: i18n.translate('common.ui.fieldEditor.samples.outputHeader', { defaultMessage: 'Output', }), - render: output => { + render: (output: string) => { return sampleType === 'html' ? (

) : (
{output}
@@ -79,7 +75,7 @@ export class FormatEditorSamples extends PureComponent { } > - className="kbnFieldFormatEditor__samples" compressed={true} items={samples} diff --git a/src/legacy/ui/public/field_editor/components/scripting_call_outs/__snapshots__/disabled_call_out.test.js.snap b/src/legacy/ui/public/field_editor/components/scripting_call_outs/__snapshots__/disabled_call_out.test.tsx.snap similarity index 100% rename from src/legacy/ui/public/field_editor/components/scripting_call_outs/__snapshots__/disabled_call_out.test.js.snap rename to src/legacy/ui/public/field_editor/components/scripting_call_outs/__snapshots__/disabled_call_out.test.tsx.snap diff --git a/src/legacy/ui/public/field_editor/components/scripting_call_outs/__snapshots__/warning_call_out.test.js.snap b/src/legacy/ui/public/field_editor/components/scripting_call_outs/__snapshots__/warning_call_out.test.tsx.snap similarity index 94% rename from src/legacy/ui/public/field_editor/components/scripting_call_outs/__snapshots__/warning_call_out.test.js.snap rename to src/legacy/ui/public/field_editor/components/scripting_call_outs/__snapshots__/warning_call_out.test.tsx.snap index f09ea05f6711a2..b331c1e38eb349 100644 --- a/src/legacy/ui/public/field_editor/components/scripting_call_outs/__snapshots__/warning_call_out.test.js.snap +++ b/src/legacy/ui/public/field_editor/components/scripting_call_outs/__snapshots__/warning_call_out.test.tsx.snap @@ -20,7 +20,6 @@ exports[`ScriptingWarningCallOut should render normally 1`] = ` values={ Object { "scripFields": , "scriptsInAggregation": ({ - getDocLink: doc => `(docLink for ${doc})`, -})); - -describe('ScriptingWarningCallOut', () => { - it('should render normally', async () => { - const component = shallow(); - - expect(component).toMatchSnapshot(); - }); - - it('should render nothing if not visible', async () => { - const component = shallow(); - - expect(component).toMatchSnapshot(); - }); -}); diff --git a/src/legacy/ui/public/field_editor/components/scripting_help/help_flyout.test.js b/src/legacy/ui/public/field_editor/components/scripting_call_outs/warning_call_out.test.tsx similarity index 67% rename from src/legacy/ui/public/field_editor/components/scripting_help/help_flyout.test.js rename to src/legacy/ui/public/field_editor/components/scripting_call_outs/warning_call_out.test.tsx index 2fac8c7641ddb8..8568c2c79816b5 100644 --- a/src/legacy/ui/public/field_editor/components/scripting_help/help_flyout.test.js +++ b/src/legacy/ui/public/field_editor/components/scripting_call_outs/warning_call_out.test.tsx @@ -20,28 +20,17 @@ import React from 'react'; import { shallow } from 'enzyme'; -import { ScriptingHelpFlyout } from './help_flyout'; +import { ScriptingWarningCallOut } from './warning_call_out'; +// eslint-disable-next-line +import { docLinksServiceMock } from '../../../../../../core/public/doc_links/doc_links_service.mock'; -jest.mock('ui/documentation_links', () => ({ - getDocLink: doc => `(docLink for ${doc})`, -})); - -jest.mock('./test_script', () => ({ - TestScript: () => { - return `
mockTestScript
`; - }, -})); - -const indexPatternMock = {}; - -describe('ScriptingHelpFlyout', () => { +describe('ScriptingWarningCallOut', () => { + const docLinksScriptedFields = docLinksServiceMock.createStartContract().links.scriptedFields; it('should render normally', async () => { const component = shallow( - {}} + docLinksScriptedFields={{} as typeof docLinksScriptedFields} /> ); @@ -50,10 +39,9 @@ describe('ScriptingHelpFlyout', () => { it('should render nothing if not visible', async () => { const component = shallow( - {}} + ); diff --git a/src/legacy/ui/public/field_editor/components/scripting_call_outs/warning_call_out.js b/src/legacy/ui/public/field_editor/components/scripting_call_outs/warning_call_out.tsx similarity index 85% rename from src/legacy/ui/public/field_editor/components/scripting_call_outs/warning_call_out.js rename to src/legacy/ui/public/field_editor/components/scripting_call_outs/warning_call_out.tsx index b810541d726977..7dac6681fa1ea8 100644 --- a/src/legacy/ui/public/field_editor/components/scripting_call_outs/warning_call_out.js +++ b/src/legacy/ui/public/field_editor/components/scripting_call_outs/warning_call_out.tsx @@ -18,13 +18,21 @@ */ import React, { Fragment } from 'react'; -import { getDocLink } from 'ui/documentation_links'; +import { DocLinksStart } from 'src/core/public'; import { EuiCallOut, EuiIcon, EuiLink, EuiSpacer } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n/react'; -export const ScriptingWarningCallOut = ({ isVisible = false }) => { +export interface ScriptingWarningCallOutProps { + isVisible: boolean; + docLinksScriptedFields: DocLinksStart['links']['scriptedFields']; +} + +export const ScriptingWarningCallOut = ({ + isVisible = false, + docLinksScriptedFields, +}: ScriptingWarningCallOutProps) => { return isVisible ? ( { defaultMessage="Please familiarize yourself with {scripFields} and with {scriptsInAggregation} before using scripted fields." values={{ scripFields: ( - + { ), scriptsInAggregation: ( - + - - , - "data-test-subj": "syntaxTab", - "id": "syntax", - "name": "Syntax", - } - } - tabs={ - Array [ - Object { - "content": , - "data-test-subj": "syntaxTab", - "id": "syntax", - "name": "Syntax", - }, - Object { - "content": , - "data-test-subj": "testTab", - "id": "test", - "name": "Preview results", - }, - ] - } - /> - - -`; - -exports[`ScriptingHelpFlyout should render nothing if not visible 1`] = `""`; diff --git a/src/legacy/ui/public/field_editor/components/scripting_help/__snapshots__/help_flyout.test.tsx.snap b/src/legacy/ui/public/field_editor/components/scripting_help/__snapshots__/help_flyout.test.tsx.snap new file mode 100644 index 00000000000000..282e8e311d984d --- /dev/null +++ b/src/legacy/ui/public/field_editor/components/scripting_help/__snapshots__/help_flyout.test.tsx.snap @@ -0,0 +1,103 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`ScriptingHelpFlyout should render normally 1`] = ` + + + , + "data-test-subj": "syntaxTab", + "id": "syntax", + "name": "Syntax", + } + } + tabs={ + Array [ + Object { + "content": , + "data-test-subj": "syntaxTab", + "id": "syntax", + "name": "Syntax", + }, + Object { + "content": , + "data-test-subj": "testTab", + "id": "test", + "name": "Preview results", + }, + ] + } + /> + + +`; + +exports[`ScriptingHelpFlyout should render nothing if not visible 1`] = ` + + + , + "data-test-subj": "syntaxTab", + "id": "syntax", + "name": "Syntax", + } + } + tabs={ + Array [ + Object { + "content": , + "data-test-subj": "syntaxTab", + "id": "syntax", + "name": "Syntax", + }, + Object { + "content": , + "data-test-subj": "testTab", + "id": "test", + "name": "Preview results", + }, + ] + } + /> + + +`; diff --git a/src/legacy/ui/public/field_editor/components/scripting_help/help_flyout.test.tsx b/src/legacy/ui/public/field_editor/components/scripting_help/help_flyout.test.tsx new file mode 100644 index 00000000000000..4106eb7b283eea --- /dev/null +++ b/src/legacy/ui/public/field_editor/components/scripting_help/help_flyout.test.tsx @@ -0,0 +1,74 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import React from 'react'; +import { shallow } from 'enzyme'; +import { HttpStart } from 'src/core/public'; +// eslint-disable-next-line +import { docLinksServiceMock } from '../../../../../../core/public/doc_links/doc_links_service.mock'; + +import { ScriptingHelpFlyout } from './help_flyout'; + +import { IndexPattern } from '../../../../../../plugins/data/public'; + +import { ExecuteScript } from '../../types'; + +jest.mock('./test_script', () => ({ + TestScript: () => { + return `
mockTestScript
`; + }, +})); + +const indexPatternMock = {} as IndexPattern; + +describe('ScriptingHelpFlyout', () => { + const docLinksScriptedFields = docLinksServiceMock.createStartContract().links.scriptedFields; + it('should render normally', async () => { + const component = shallow( + {}) as unknown) as ExecuteScript} + onClose={() => {}} + getHttpStart={() => (({} as unknown) as HttpStart)} + // docLinksScriptedFields={docLinksScriptedFields} + docLinksScriptedFields={{} as typeof docLinksScriptedFields} + /> + ); + + expect(component).toMatchSnapshot(); + }); + + it('should render nothing if not visible', async () => { + const component = shallow( + {}) as unknown) as ExecuteScript} + onClose={() => {}} + getHttpStart={() => (({} as unknown) as HttpStart)} + docLinksScriptedFields={{} as typeof docLinksScriptedFields} + /> + ); + + expect(component).toMatchSnapshot(); + }); +}); diff --git a/src/legacy/ui/public/field_editor/components/scripting_help/help_flyout.js b/src/legacy/ui/public/field_editor/components/scripting_help/help_flyout.tsx similarity index 72% rename from src/legacy/ui/public/field_editor/components/scripting_help/help_flyout.js rename to src/legacy/ui/public/field_editor/components/scripting_help/help_flyout.tsx index c512b5f5f2019c..6f51379c796d49 100644 --- a/src/legacy/ui/public/field_editor/components/scripting_help/help_flyout.js +++ b/src/legacy/ui/public/field_editor/components/scripting_help/help_flyout.tsx @@ -18,14 +18,29 @@ */ import React from 'react'; -import PropTypes from 'prop-types'; +import { HttpStart, DocLinksStart } from 'src/core/public'; import { EuiFlyout, EuiFlyoutBody, EuiTabbedContent } from '@elastic/eui'; import { ScriptingSyntax } from './scripting_syntax'; import { TestScript } from './test_script'; -export const ScriptingHelpFlyout = ({ +import { IndexPattern } from '../../../../../../plugins/data/public'; +import { ExecuteScript } from '../../types'; + +interface ScriptingHelpFlyoutProps { + indexPattern: IndexPattern; + lang: string; + name?: string; + script?: string; + executeScript: ExecuteScript; + isVisible: boolean; + onClose: () => void; + getHttpStart: () => HttpStart; + docLinksScriptedFields: DocLinksStart['links']['scriptedFields']; +} + +export const ScriptingHelpFlyout: React.FC = ({ isVisible = false, onClose = () => {}, indexPattern, @@ -33,13 +48,15 @@ export const ScriptingHelpFlyout = ({ name, script, executeScript, + getHttpStart, + docLinksScriptedFields, }) => { const tabs = [ { id: 'syntax', name: 'Syntax', ['data-test-subj']: 'syntaxTab', - content: , + content: , }, { id: 'test', @@ -52,6 +69,7 @@ export const ScriptingHelpFlyout = ({ name={name} script={script} executeScript={executeScript} + getHttpStart={getHttpStart} /> ), }, @@ -67,11 +85,3 @@ export const ScriptingHelpFlyout = ({ }; ScriptingHelpFlyout.displayName = 'ScriptingHelpFlyout'; - -ScriptingHelpFlyout.propTypes = { - indexPattern: PropTypes.object.isRequired, - lang: PropTypes.string.isRequired, - name: PropTypes.string, - script: PropTypes.string, - executeScript: PropTypes.func.isRequired, -}; diff --git a/src/legacy/ui/public/field_editor/components/scripting_help/index.js b/src/legacy/ui/public/field_editor/components/scripting_help/index.ts similarity index 100% rename from src/legacy/ui/public/field_editor/components/scripting_help/index.js rename to src/legacy/ui/public/field_editor/components/scripting_help/index.ts diff --git a/src/legacy/ui/public/field_editor/components/scripting_help/scripting_syntax.js b/src/legacy/ui/public/field_editor/components/scripting_help/scripting_syntax.tsx similarity index 92% rename from src/legacy/ui/public/field_editor/components/scripting_help/scripting_syntax.js rename to src/legacy/ui/public/field_editor/components/scripting_help/scripting_syntax.tsx index ba47b94aaea0c5..8158c6881acf9e 100644 --- a/src/legacy/ui/public/field_editor/components/scripting_help/scripting_syntax.js +++ b/src/legacy/ui/public/field_editor/components/scripting_help/scripting_syntax.tsx @@ -18,13 +18,17 @@ */ import React, { Fragment } from 'react'; -import { getDocLink } from 'ui/documentation_links'; +import { DocLinksStart } from 'src/core/public'; import { EuiCode, EuiIcon, EuiLink, EuiText, EuiSpacer } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n/react'; -export const ScriptingSyntax = () => ( +export interface ScriptingSyntaxProps { + docLinksScriptedFields: DocLinksStart['links']['scriptedFields']; +} + +export const ScriptingSyntax = ({ docLinksScriptedFields }: ScriptingSyntaxProps) => ( @@ -38,7 +42,7 @@ export const ScriptingSyntax = () => ( specifically for use with Elasticsearch, to access values in the document use the following format:" values={{ painless: ( - + ( you'll be up to speed in no time!" values={{ javaAPIs: ( - + ( ), syntax: ( - + ( are a lot like JavaScript, but limited to basic arithmetic, bitwise and comparison operations." values={{ lucene: ( - + HttpStart; +} + +interface AdditionalField { + value: string; + label: string; +} + +interface TestScriptState { + isLoading: boolean; + additionalFields: AdditionalField[]; + previewData?: Record; +} + +export class TestScript extends Component { + defaultProps = { + name: 'myScriptedField', + }; -export class TestScript extends Component { state = { isLoading: false, additionalFields: [], + previewData: undefined, }; componentDidMount() { @@ -52,8 +79,8 @@ export class TestScript extends Component { } } - previewScript = async searchContext => { - const { indexPattern, lang, name, script, executeScript } = this.props; + previewScript = async (searchContext?: { query?: Query | undefined }) => { + const { indexPattern, lang, name, script, executeScript, getHttpStart } = this.props; if (!script || script.length === 0) { return; @@ -68,21 +95,20 @@ export class TestScript extends Component { const esQueryConfigs = esQuery.getEsQueryConfig(uiSettings); query = esQuery.buildEsQuery( this.props.indexPattern, - searchContext.query, - null, + searchContext.query || [], + [], esQueryConfigs ); } const scriptResponse = await executeScript({ - name, + name: name as string, lang, script, indexPatternTitle: indexPattern.title, query, - additionalFields: this.state.additionalFields.map(option => { - return option.value; - }), + additionalFields: this.state.additionalFields.map((option: AdditionalField) => option.value), + getHttpStart, }); if (scriptResponse.status !== 200) { @@ -103,15 +129,13 @@ export class TestScript extends Component { }); }; - onAdditionalFieldsChange = selectedOptions => { + onAdditionalFieldsChange = (selectedOptions: AdditionalField[]) => { this.setState({ additionalFields: selectedOptions, }); }; - renderPreview() { - const { previewData } = this.state; - + renderPreview(previewData: { error: any } | undefined) { if (!previewData) { return null; } @@ -160,7 +184,7 @@ export class TestScript extends Component { renderToolbar() { const fieldsByTypeMap = new Map(); - const fields = []; + const fields: EuiComboBoxOptionOption[] = []; this.props.indexPattern.fields .filter(field => { @@ -180,7 +204,7 @@ export class TestScript extends Component { fieldsByTypeMap.forEach((fieldsList, fieldType) => { fields.push({ label: fieldType, - options: fieldsList.sort().map(fieldName => { + options: fieldsList.sort().map((fieldName: string) => { return { value: fieldName, label: fieldName }; }), }); @@ -206,7 +230,7 @@ export class TestScript extends Component { })} options={fields} selectedOptions={this.state.additionalFields} - onChange={this.onAdditionalFieldsChange} + onChange={selected => this.onAdditionalFieldsChange(selected as AdditionalField[])} data-test-subj="additionalFieldsSelect" fullWidth /> @@ -214,6 +238,7 @@ export class TestScript extends Component {
{this.renderToolbar()} - {this.renderPreview()} + {this.renderPreview(this.state.previewData)} ); } } - -TestScript.propTypes = { - indexPattern: PropTypes.object.isRequired, - lang: PropTypes.string.isRequired, - name: PropTypes.string, - script: PropTypes.string, - executeScript: PropTypes.func.isRequired, -}; - -TestScript.defaultProps = { - name: 'myScriptedField', -}; diff --git a/src/legacy/ui/public/field_editor/constants/index.js b/src/legacy/ui/public/field_editor/constants/index.ts similarity index 100% rename from src/legacy/ui/public/field_editor/constants/index.js rename to src/legacy/ui/public/field_editor/constants/index.ts diff --git a/src/legacy/ui/public/field_editor/field_editor.test.js b/src/legacy/ui/public/field_editor/field_editor.test.tsx similarity index 69% rename from src/legacy/ui/public/field_editor/field_editor.test.js rename to src/legacy/ui/public/field_editor/field_editor.test.tsx index cf61b6140f42cc..5716305b514830 100644 --- a/src/legacy/ui/public/field_editor/field_editor.test.js +++ b/src/legacy/ui/public/field_editor/field_editor.test.tsx @@ -17,12 +17,19 @@ * under the License. */ -jest.mock('ui/kfetch', () => ({})); - import React from 'react'; import { npStart } from 'ui/new_platform'; import { shallowWithI18nProvider } from 'test_utils/enzyme_helpers'; +import { + Field, + IndexPattern, + IndexPatternFieldList, + FieldFormatInstanceType, +} from 'src/plugins/data/public'; +import { HttpStart } from '../../../../core/public'; +// eslint-disable-next-line +import { docLinksServiceMock } from '../../../../core/public/doc_links/doc_links_service.mock'; jest.mock('brace/mode/groovy', () => ({})); jest.mock('ui/new_platform'); @@ -54,23 +61,11 @@ jest.mock('@elastic/eui', () => ({ })); jest.mock('ui/scripting_languages', () => ({ - GetEnabledScriptingLanguagesProvider: jest - .fn() - .mockImplementation(() => () => ['painless', 'testlang']), + getEnabledScriptingLanguages: () => ['painless', 'testlang'], getSupportedScriptingLanguages: () => ['painless'], getDeprecatedScriptingLanguages: () => ['testlang'], })); -jest.mock('ui/documentation_links', () => ({ - getDocLink: doc => `(docLink for ${doc})`, -})); - -jest.mock('ui/notify', () => ({ - toastNotifications: { - addSuccess: jest.fn(), - }, -})); - jest.mock('./components/scripting_call_outs', () => ({ ScriptingDisabledCallOut: 'scripting-disabled-callOut', ScriptingWarningCallOut: 'scripting-warning-callOut', @@ -81,18 +76,15 @@ jest.mock('./components/field_format_editor', () => ({ FieldFormatEditor: 'field-format-editor', })); -const fields = [ +const fields: Field[] = [ { name: 'foobar', - }, + } as Field, ]; -fields.getByName = name => { - const fields = { - foobar: { - name: 'foobar', - }, - }; - return fields[name]; + +// @ts-ignore +fields.getByName = (name: string) => { + return fields.find(field => field.name === name); }; class Format { @@ -111,30 +103,39 @@ const field = { const helpers = { Field: () => {}, getConfig: () => {}, - $http: () => {}, - fieldFormatEditors: {}, + getHttpStart: () => (({} as unknown) as HttpStart), + fieldFormatEditors: [], redirectAway: () => {}, + docLinksScriptedFields: docLinksServiceMock.createStartContract().links.scriptedFields, }; describe('FieldEditor', () => { - let indexPattern; + let indexPattern: IndexPattern; beforeEach(() => { - indexPattern = { - fields, - }; + indexPattern = ({ + fields: fields as IndexPatternFieldList, + } as unknown) as IndexPattern; - npStart.plugins.data.fieldFormats.getDefaultType = jest.fn(() => Format); + npStart.plugins.data.fieldFormats.getDefaultType = jest.fn( + () => (({} as unknown) as FieldFormatInstanceType) + ); npStart.plugins.data.fieldFormats.getByFieldType = jest.fn(fieldType => { if (fieldType === 'number') { - return [Format]; + return [({} as unknown) as FieldFormatInstanceType]; + } else { + return []; } }); }); it('should render create new scripted field correctly', async () => { const component = shallowWithI18nProvider( - + ); await new Promise(resolve => process.nextTick(resolve)); @@ -148,16 +149,20 @@ describe('FieldEditor', () => { name: 'test', script: 'doc.test.value', }; - indexPattern.fields.push(testField); + indexPattern.fields.push(testField as Field); indexPattern.fields.getByName = name => { - const fields = { + const flds = { [testField.name]: testField, }; - return fields[name]; + return flds[name] as Field; }; const component = shallowWithI18nProvider( - + ); await new Promise(resolve => process.nextTick(resolve)); @@ -172,16 +177,20 @@ describe('FieldEditor', () => { script: 'doc.test.value', lang: 'testlang', }; - indexPattern.fields.push(testField); + indexPattern.fields.push((testField as unknown) as Field); indexPattern.fields.getByName = name => { - const fields = { + const flds = { [testField.name]: testField, }; - return fields[name]; + return flds[name] as Field; }; const component = shallowWithI18nProvider( - + ); await new Promise(resolve => process.nextTick(resolve)); @@ -192,11 +201,15 @@ describe('FieldEditor', () => { it('should show conflict field warning', async () => { const testField = { ...field }; const component = shallowWithI18nProvider( - + ); await new Promise(resolve => process.nextTick(resolve)); - component.instance().onFieldChange('name', 'foobar'); + (component.instance() as FieldEditor).onFieldChange('name', 'foobar'); component.update(); expect(component).toMatchSnapshot(); }); @@ -211,11 +224,15 @@ describe('FieldEditor', () => { }, }; const component = shallowWithI18nProvider( - + ); await new Promise(resolve => process.nextTick(resolve)); - component.instance().onFieldChange('name', 'foobar'); + (component.instance() as FieldEditor).onFieldChange('name', 'foobar'); component.update(); expect(component).toMatchSnapshot(); }); diff --git a/src/legacy/ui/public/field_editor/field_editor.js b/src/legacy/ui/public/field_editor/field_editor.tsx similarity index 83% rename from src/legacy/ui/public/field_editor/field_editor.js rename to src/legacy/ui/public/field_editor/field_editor.tsx index e90cb110ac3048..aa62a53f2c32a1 100644 --- a/src/legacy/ui/public/field_editor/field_editor.js +++ b/src/legacy/ui/public/field_editor/field_editor.tsx @@ -18,19 +18,15 @@ */ import React, { PureComponent, Fragment } from 'react'; -import PropTypes from 'prop-types'; import { intersection, union, get } from 'lodash'; +import { HttpStart, DocLinksStart } from 'src/core/public'; import { - GetEnabledScriptingLanguagesProvider, + getEnabledScriptingLanguages, getDeprecatedScriptingLanguages, getSupportedScriptingLanguages, } from 'ui/scripting_languages'; -import { getDocLink } from 'ui/documentation_links'; - -import { toastNotifications } from 'ui/notify'; - import { npStart } from 'ui/new_platform'; import { @@ -56,6 +52,16 @@ import { EUI_MODAL_CONFIRM_BUTTON, } from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import { FormattedMessage } from '@kbn/i18n/react'; +import { + IndexPattern, + IFieldType, + KBN_FIELD_TYPES, + ES_FIELD_TYPES, +} from '../../../../plugins/data/public'; +import { FieldFormatInstanceType } from '../../../../plugins/data/common'; +import { Field } from '../../../../plugins/data/public'; import { ScriptingDisabledCallOut, ScriptingWarningCallOut, @@ -65,23 +71,27 @@ import { ScriptingHelpFlyout } from './components/scripting_help'; import { FieldFormatEditor } from './components/field_format_editor'; +import { DefaultFormatEditor } from './components/field_format_editor/editors/default'; + import { FIELD_TYPES_BY_LANG, DEFAULT_FIELD_TYPES } from './constants'; import { executeScript, isScriptValid } from './lib'; -import { i18n } from '@kbn/i18n'; -import { FormattedMessage } from '@kbn/i18n/react'; - // This loads Ace editor's "groovy" mode, used below to highlight the script. import 'brace/mode/groovy'; const getFieldFormats = () => npStart.plugins.data.fieldFormats; -const getFieldTypeFormatsList = (field, defaultFieldFormat) => { +const getFieldTypeFormatsList = ( + field: IFieldType, + defaultFieldFormat: FieldFormatInstanceType +) => { const fieldFormats = getFieldFormats(); - const formatsByType = fieldFormats.getByFieldType(field.type).map(({ id, title }) => ({ - id, - title, - })); + const formatsByType = fieldFormats + .getByFieldType(field.type as KBN_FIELD_TYPES) + .map(({ id, title }) => ({ + id, + title, + })); return [ { @@ -95,19 +105,54 @@ const getFieldTypeFormatsList = (field, defaultFieldFormat) => { ]; }; -export class FieldEditor extends PureComponent { - static propTypes = { - indexPattern: PropTypes.object.isRequired, - field: PropTypes.object.isRequired, - helpers: PropTypes.shape({ - getConfig: PropTypes.func.isRequired, - $http: PropTypes.func.isRequired, - fieldFormatEditors: PropTypes.object.isRequired, - redirectAway: PropTypes.func.isRequired, - }), +interface FieldTypeFormat { + id: string; + title: string; +} + +interface InitialFieldTypeFormat extends FieldTypeFormat { + defaultFieldFormat: FieldFormatInstanceType; +} + +interface FieldClone extends Field { + format: any; +} + +export interface FieldEditorState { + isReady: boolean; + isCreating: boolean; + isDeprecatedLang: boolean; + scriptingLangs: string[]; + fieldTypes: string[]; + fieldTypeFormats: FieldTypeFormat[]; + existingFieldNames: string[]; + field: FieldClone; + fieldFormatId?: string; + fieldFormatParams: { [key: string]: unknown }; + showScriptingHelp: boolean; + showDeleteModal: boolean; + hasFormatError: boolean; + hasScriptError: boolean; + isSaving: boolean; + errors?: string[]; +} + +export interface FieldEdiorProps { + indexPattern: IndexPattern; + field: Field; + helpers: { + getConfig: (key: string) => any; + getHttpStart: () => HttpStart; + fieldFormatEditors: DefaultFormatEditor[]; + redirectAway: () => void; + docLinksScriptedFields: DocLinksStart['links']['scriptedFields']; }; +} - constructor(props) { +export class FieldEditor extends PureComponent { + supportedLangs: string[] = []; + deprecatedLangs: string[] = []; + constructor(props: FieldEdiorProps) { super(props); const { field, indexPattern } = props; @@ -119,7 +164,7 @@ export class FieldEditor extends PureComponent { scriptingLangs: [], fieldTypes: [], fieldTypeFormats: [], - existingFieldNames: indexPattern.fields.map(f => f.name), + existingFieldNames: indexPattern.fields.map((f: IFieldType) => f.name), field: { ...field, format: field.format }, fieldFormatId: undefined, fieldFormatParams: {}, @@ -135,48 +180,53 @@ export class FieldEditor extends PureComponent { } async init() { - const { $http } = this.props.helpers; + const { getHttpStart } = this.props.helpers; const { field } = this.state; const { indexPattern } = this.props; - const getEnabledScriptingLanguages = new GetEnabledScriptingLanguagesProvider($http); - const enabledLangs = await getEnabledScriptingLanguages(); + const enabledLangs = await getEnabledScriptingLanguages(await getHttpStart()); const scriptingLangs = intersection( enabledLangs, union(this.supportedLangs, this.deprecatedLangs) ); - field.lang = scriptingLangs.includes(field.lang) ? field.lang : undefined; + field.lang = field.lang && scriptingLangs.includes(field.lang) ? field.lang : undefined; - const fieldTypes = get(FIELD_TYPES_BY_LANG, field.lang, DEFAULT_FIELD_TYPES); + const fieldTypes = get(FIELD_TYPES_BY_LANG, field.lang || '', DEFAULT_FIELD_TYPES); field.type = fieldTypes.includes(field.type) ? field.type : fieldTypes[0]; const fieldFormats = getFieldFormats(); - const DefaultFieldFormat = fieldFormats.getDefaultType(field.type, field.esTypes); + const DefaultFieldFormat = fieldFormats.getDefaultType( + field.type as KBN_FIELD_TYPES, + field.esTypes as ES_FIELD_TYPES[] + ); this.setState({ isReady: true, - isCreating: !indexPattern.fields.getByName(field.name), - isDeprecatedLang: this.deprecatedLangs.includes(field.lang), + isCreating: !indexPattern.fields.find(f => f.name === field.name), + isDeprecatedLang: this.deprecatedLangs.includes(field.lang || ''), errors: [], scriptingLangs, fieldTypes, - fieldTypeFormats: getFieldTypeFormatsList(field, DefaultFieldFormat), + fieldTypeFormats: getFieldTypeFormatsList( + field, + DefaultFieldFormat as FieldFormatInstanceType + ), fieldFormatId: get(indexPattern, ['fieldFormatMap', field.name, 'type', 'id']), fieldFormatParams: field.format.params(), }); } - onFieldChange = (fieldName, value) => { + onFieldChange = (fieldName: string, value: string | number) => { const { field } = this.state; - field[fieldName] = value; + (field as any)[fieldName] = value; this.forceUpdate(); }; - onTypeChange = type => { + onTypeChange = (type: KBN_FIELD_TYPES) => { const { getConfig } = this.props.helpers; const { field } = this.state; const fieldFormats = getFieldFormats(); - const DefaultFieldFormat = fieldFormats.getDefaultType(type); + const DefaultFieldFormat = fieldFormats.getDefaultType(type) as FieldFormatInstanceType; field.type = type; field.format = new DefaultFieldFormat(null, getConfig); @@ -188,7 +238,7 @@ export class FieldEditor extends PureComponent { }); }; - onLangChange = lang => { + onLangChange = (lang: string) => { const { field } = this.state; const fieldTypes = get(FIELD_TYPES_BY_LANG, lang, DEFAULT_FIELD_TYPES); field.lang = lang; @@ -199,12 +249,12 @@ export class FieldEditor extends PureComponent { }); }; - onFormatChange = (formatId, params) => { + onFormatChange = (formatId: string, params?: any) => { const fieldFormats = getFieldFormats(); const { field, fieldTypeFormats } = this.state; const FieldFormat = fieldFormats.getType( - formatId || fieldTypeFormats[0]?.defaultFieldFormat.id - ); + formatId || (fieldTypeFormats[0] as InitialFieldTypeFormat).defaultFieldFormat.id + ) as FieldFormatInstanceType; field.format = new FieldFormat(params, this.props.helpers.getConfig); @@ -214,12 +264,12 @@ export class FieldEditor extends PureComponent { }); }; - onFormatParamsChange = newParams => { + onFormatParamsChange = (newParams: { fieldType: string; [key: string]: any }) => { const { fieldFormatId } = this.state; - this.onFormatChange(fieldFormatId, newParams); + this.onFormatChange(fieldFormatId as string, newParams); }; - onFormatParamsError = error => { + onFormatParamsError = (error?: string) => { this.setState({ hasFormatError: !!error, }); @@ -312,7 +362,10 @@ export class FieldEditor extends PureComponent { values={{ language: {field.lang}, painlessLink: ( - + { - this.onTypeChange(e.target.value); + this.onTypeChange(e.target.value as KBN_FIELD_TYPES); }} /> @@ -366,7 +419,7 @@ export class FieldEditor extends PureComponent { * in case there are indices with different types */ renderTypeConflict() { - const { field = {} } = this.state; + const { field } = this.state; if (!field.conflictDescriptions || typeof field.conflictDescriptions !== 'object') { return null; } @@ -420,7 +473,7 @@ export class FieldEditor extends PureComponent { renderFormat() { const { field, fieldTypeFormats, fieldFormatId, fieldFormatParams } = this.state; const { fieldFormatEditors } = this.props.helpers; - const defaultFormat = fieldTypeFormats[0]?.defaultFieldFormat.title; + const defaultFormat = (fieldTypeFormats[0] as InitialFieldTypeFormat).defaultFieldFormat.title; const label = defaultFormat ? ( { + onScriptChange = (value: string) => { this.setState({ hasScriptError: false, }); @@ -690,15 +743,20 @@ export class FieldEditor extends PureComponent { return ( - + ); @@ -716,7 +774,7 @@ export class FieldEditor extends PureComponent { defaultMessage: "Deleted '{fieldName}'", values: { fieldName: field.name }, }); - toastNotifications.addSuccess(message); + npStart.core.notifications.toasts.addSuccess(message); redirectAway(); }); } else { @@ -736,9 +794,10 @@ export class FieldEditor extends PureComponent { const isValid = await isScriptValid({ name: field.name, - lang: field.lang, - script: field.script, + lang: field.lang as string, + script: field.script as string, indexPatternTitle: indexPattern.title, + getHttpStart: this.props.helpers.getHttpStart, }); if (!isValid) { @@ -751,7 +810,7 @@ export class FieldEditor extends PureComponent { } const { redirectAway } = this.props.helpers; - const index = indexPattern.fields.findIndex(f => f.name === field.name); + const index = indexPattern.fields.findIndex((f: IFieldType) => f.name === field.name); if (index > -1) { indexPattern.fields.update(field); @@ -770,7 +829,7 @@ export class FieldEditor extends PureComponent { defaultMessage: "Saved '{fieldName}'", values: { fieldName: field.name }, }); - toastNotifications.addSuccess(message); + npStart.core.notifications.toasts.addSuccess(message); redirectAway(); }); }; diff --git a/src/legacy/ui/public/field_editor/index.js b/src/legacy/ui/public/field_editor/index.ts similarity index 100% rename from src/legacy/ui/public/field_editor/index.js rename to src/legacy/ui/public/field_editor/index.ts diff --git a/src/legacy/ui/public/field_editor/lib/index.js b/src/legacy/ui/public/field_editor/lib/index.ts similarity index 100% rename from src/legacy/ui/public/field_editor/lib/index.js rename to src/legacy/ui/public/field_editor/lib/index.ts diff --git a/src/legacy/ui/public/field_editor/lib/validate_script.js b/src/legacy/ui/public/field_editor/lib/validate_script.ts similarity index 67% rename from src/legacy/ui/public/field_editor/lib/validate_script.js rename to src/legacy/ui/public/field_editor/lib/validate_script.ts index 47e2091565c30b..4db827a4229fd8 100644 --- a/src/legacy/ui/public/field_editor/lib/validate_script.js +++ b/src/legacy/ui/public/field_editor/lib/validate_script.ts @@ -17,7 +17,9 @@ * under the License. */ -import { kfetch } from 'ui/kfetch'; +import { Query } from 'src/plugins/data/public'; +import { HttpStart } from 'src/core/public'; +import { ExecuteScriptParams, ExecuteScriptResult } from '../types'; export const executeScript = async ({ name, @@ -26,7 +28,8 @@ export const executeScript = async ({ indexPatternTitle, query, additionalFields = [], -}) => { + getHttpStart, +}: ExecuteScriptParams): Promise => { // Using _msearch because _search with index name in path dorks everything up const header = { index: indexPatternTitle, @@ -36,7 +39,7 @@ export const executeScript = async ({ const search = { query: { match_all: {}, - }, + } as Query['query'], script_fields: { [name]: { script: { @@ -45,6 +48,7 @@ export const executeScript = async ({ }, }, }, + _source: undefined as string[] | undefined, size: 10, timeout: '30s', }; @@ -58,13 +62,32 @@ export const executeScript = async ({ } const body = `${JSON.stringify(header)}\n${JSON.stringify(search)}\n`; - const esResp = await kfetch({ method: 'POST', pathname: '/elasticsearch/_msearch', body }); + const http = await getHttpStart(); + const esResp = await http.fetch('/elasticsearch/_msearch', { method: 'POST', body }); // unwrap _msearch response return esResp.responses[0]; }; -export const isScriptValid = async ({ name, lang, script, indexPatternTitle }) => { - const scriptResponse = await executeScript({ name, lang, script, indexPatternTitle }); +export const isScriptValid = async ({ + name, + lang, + script, + indexPatternTitle, + getHttpStart, +}: { + name: string; + lang: string; + script: string; + indexPatternTitle: string; + getHttpStart: () => HttpStart; +}) => { + const scriptResponse = await executeScript({ + name, + lang, + script, + indexPatternTitle, + getHttpStart, + }); if (scriptResponse.status !== 200) { return false; diff --git a/src/legacy/ui/public/field_editor/types.ts b/src/legacy/ui/public/field_editor/types.ts new file mode 100644 index 00000000000000..174cb7da73cebe --- /dev/null +++ b/src/legacy/ui/public/field_editor/types.ts @@ -0,0 +1,45 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { ReactText } from 'react'; +import { Query } from 'src/plugins/data/public'; +import { HttpStart } from 'src/core/public'; + +export interface Sample { + input: ReactText | ReactText[]; + output: string; +} + +export interface ExecuteScriptParams { + name: string; + lang: string; + script: string; + indexPatternTitle: string; + query?: Query['query']; + additionalFields?: string[]; + getHttpStart: () => HttpStart; +} + +export interface ExecuteScriptResult { + status: number; + hits: { hits: any[] }; + error?: any; +} + +export type ExecuteScript = (params: ExecuteScriptParams) => Promise; diff --git a/src/legacy/ui/public/registry/field_format_editors.js b/src/legacy/ui/public/registry/field_format_editors.ts similarity index 88% rename from src/legacy/ui/public/registry/field_format_editors.js rename to src/legacy/ui/public/registry/field_format_editors.ts index 85850e56fdb865..5489ce9250e043 100644 --- a/src/legacy/ui/public/registry/field_format_editors.js +++ b/src/legacy/ui/public/registry/field_format_editors.ts @@ -22,9 +22,4 @@ import { uiRegistry } from './_registry'; export const RegistryFieldFormatEditorsProvider = uiRegistry({ name: 'fieldFormatEditors', index: ['formatId'], - constructor: function() { - this.getEditor = function(formatId) { - return this.byFormatId[formatId]; - }; - }, }); diff --git a/src/legacy/ui/public/scripting_languages/index.ts b/src/legacy/ui/public/scripting_languages/index.ts index 283a3273a2a5df..459e72c0c67c16 100644 --- a/src/legacy/ui/public/scripting_languages/index.ts +++ b/src/legacy/ui/public/scripting_languages/index.ts @@ -17,10 +17,8 @@ * under the License. */ -import { IHttpService } from 'angular'; import { i18n } from '@kbn/i18n'; - -import chrome from '../chrome'; +import { HttpStart } from 'src/core/public'; import { toastNotifications } from '../notify'; export function getSupportedScriptingLanguages(): string[] { @@ -31,18 +29,12 @@ export function getDeprecatedScriptingLanguages(): string[] { return []; } -export function GetEnabledScriptingLanguagesProvider($http: IHttpService) { - return () => { - return $http - .get(chrome.addBasePath('/api/kibana/scripts/languages')) - .then((res: any) => res.data) - .catch(() => { - toastNotifications.addDanger( - i18n.translate('common.ui.scriptingLanguages.errorFetchingToastDescription', { - defaultMessage: 'Error getting available scripting languages from Elasticsearch', - }) - ); - return []; - }); - }; -} +export const getEnabledScriptingLanguages = (http: HttpStart) => + http.get('/api/kibana/scripts/languages').catch(() => { + toastNotifications.addDanger( + i18n.translate('common.ui.scriptingLanguages.errorFetchingToastDescription', { + defaultMessage: 'Error getting available scripting languages from Elasticsearch', + }) + ); + return []; + }); diff --git a/src/plugins/data/common/field_formats/field_format.ts b/src/plugins/data/common/field_formats/field_format.ts index 96d0024dff2a29..26f07a12067ce5 100644 --- a/src/plugins/data/common/field_formats/field_format.ts +++ b/src/plugins/data/common/field_formats/field_format.ts @@ -127,12 +127,12 @@ export abstract class FieldFormat { */ getConverterFor( contentType: FieldFormatsContentType = DEFAULT_CONTEXT_TYPE - ): FieldFormatConvertFunction | null { + ): FieldFormatConvertFunction { if (!this.convertObject) { this.convertObject = this.setupContentType(); } - return this.convertObject[contentType] || null; + return this.convertObject[contentType]; } /** diff --git a/src/plugins/data/common/field_formats/field_formats_registry.ts b/src/plugins/data/common/field_formats/field_formats_registry.ts index b0a57ad6912a7f..2eb9a3e593d1a0 100644 --- a/src/plugins/data/common/field_formats/field_formats_registry.ts +++ b/src/plugins/data/common/field_formats/field_formats_registry.ts @@ -110,7 +110,7 @@ export class FieldFormatsRegistry { */ getDefaultType = ( fieldType: KBN_FIELD_TYPES, - esTypes: ES_FIELD_TYPES[] + esTypes?: ES_FIELD_TYPES[] ): FieldFormatInstanceType | undefined => { const config = this.getDefaultConfig(fieldType, esTypes); diff --git a/src/plugins/data/public/index.ts b/src/plugins/data/public/index.ts index e1e2576b2a0e73..60d8079b22347e 100644 --- a/src/plugins/data/public/index.ts +++ b/src/plugins/data/public/index.ts @@ -204,11 +204,13 @@ export const fieldFormats = { export { IFieldFormat, + FieldFormatInstanceType, IFieldFormatsRegistry, FieldFormatsContentType, FieldFormatsGetConfigFn, FieldFormatConfig, FieldFormatId, + FieldFormat, } from '../common'; /* @@ -255,6 +257,7 @@ export { AggregationRestrictions as IndexPatternAggRestrictions, // TODO: exported only in stub_index_pattern test. Move into data plugin and remove export. FieldList as IndexPatternFieldList, + Field, } from './index_patterns'; export { diff --git a/src/plugins/data/public/index_patterns/fields/field.ts b/src/plugins/data/public/index_patterns/fields/field.ts index 0fb92393d56f71..d83c0a7d3445eb 100644 --- a/src/plugins/data/public/index_patterns/fields/field.ts +++ b/src/plugins/data/public/index_patterns/fields/field.ts @@ -47,6 +47,7 @@ export class Field implements IFieldType { indexPattern?: IndexPattern; format: any; $$spec: FieldSpec; + conflictDescriptions?: Record; constructor( indexPattern: IndexPattern, diff --git a/src/plugins/data/public/index_patterns/fields/field_list.ts b/src/plugins/data/public/index_patterns/fields/field_list.ts index d6067280fd7b67..9772370199b24a 100644 --- a/src/plugins/data/public/index_patterns/fields/field_list.ts +++ b/src/plugins/data/public/index_patterns/fields/field_list.ts @@ -29,6 +29,7 @@ export interface IFieldList extends Array { getByType(type: Field['type']): Field[]; add(field: FieldSpec): void; remove(field: IFieldType): void; + update(field: FieldSpec): void; } export class FieldList extends Array implements IFieldList { diff --git a/src/plugins/data/public/public.api.md b/src/plugins/data/public/public.api.md index f5177df022ff2e..86560b3ccf7b12 100644 --- a/src/plugins/data/public/public.api.md +++ b/src/plugins/data/public/public.api.md @@ -451,6 +451,97 @@ export interface FetchOptions { searchStrategyId?: string; } +// Warning: (ae-missing-release-tag) "Field" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +class Field implements IFieldType { + // Warning: (ae-forgotten-export) The symbol "FieldSpec" needs to be exported by the entry point index.d.ts + // + // (undocumented) + $$spec: FieldSpec; + constructor(indexPattern: IndexPattern, spec: FieldSpec | Field, shortDotsEnable?: boolean); + // (undocumented) + aggregatable?: boolean; + // (undocumented) + conflictDescriptions?: Record; + // (undocumented) + count?: number; + // (undocumented) + displayName?: string; + // (undocumented) + esTypes?: string[]; + // (undocumented) + filterable?: boolean; + // (undocumented) + format: any; + // (undocumented) + indexPattern?: IndexPattern; + // (undocumented) + lang?: string; + // (undocumented) + name: string; + // (undocumented) + script?: string; + // (undocumented) + scripted?: boolean; + // (undocumented) + searchable?: boolean; + // (undocumented) + sortable?: boolean; + // (undocumented) + subType?: IFieldSubType; + // (undocumented) + type: string; + // (undocumented) + visualizable?: boolean; +} + +export { Field } + +export { Field as IndexPatternField } + +// Warning: (ae-missing-release-tag) "FieldFormat" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export abstract class FieldFormat { + // Warning: (ae-forgotten-export) The symbol "IFieldFormatMetaParams" needs to be exported by the entry point index.d.ts + constructor(_params?: IFieldFormatMetaParams, getConfig?: FieldFormatsGetConfigFn); + // Warning: (ae-forgotten-export) The symbol "HtmlContextTypeOptions" needs to be exported by the entry point index.d.ts + // Warning: (ae-forgotten-export) The symbol "TextContextTypeOptions" needs to be exported by the entry point index.d.ts + convert(value: any, contentType?: FieldFormatsContentType, options?: HtmlContextTypeOptions | TextContextTypeOptions): string; + // Warning: (ae-forgotten-export) The symbol "FieldFormatConvert" needs to be exported by the entry point index.d.ts + convertObject: FieldFormatConvert | undefined; + static fieldType: string | string[]; + // Warning: (ae-incompatible-release-tags) The symbol "from" is marked as @public, but its signature references "FieldFormatInstanceType" which is marked as @internal + // + // (undocumented) + static from(convertFn: FieldFormatConvertFunction): FieldFormatInstanceType; + // (undocumented) + protected getConfig: FieldFormatsGetConfigFn | undefined; + // Warning: (ae-forgotten-export) The symbol "FieldFormatConvertFunction" needs to be exported by the entry point index.d.ts + getConverterFor(contentType?: FieldFormatsContentType): FieldFormatConvertFunction; + getParamDefaults(): Record; + // Warning: (ae-forgotten-export) The symbol "HtmlContextTypeConvert" needs to be exported by the entry point index.d.ts + htmlConvert: HtmlContextTypeConvert | undefined; + static id: string; + // (undocumented) + static isInstanceOfFieldFormat(fieldFormat: any): fieldFormat is FieldFormat; + param(name: string): any; + params(): Record; + // (undocumented) + protected readonly _params: any; + // (undocumented) + setupContentType(): FieldFormatConvert; + // Warning: (ae-forgotten-export) The symbol "TextContextTypeConvert" needs to be exported by the entry point index.d.ts + textConvert: TextContextTypeConvert | undefined; + static title: string; + toJSON(): { + id: unknown; + params: _.Dictionary | undefined; + }; + type: any; +} + // Warning: (ae-missing-release-tag) "FieldFormatConfig" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) @@ -469,6 +560,13 @@ export interface FieldFormatConfig { // @public export type FieldFormatId = FIELD_FORMAT_IDS | string; +// @internal (undocumented) +export type FieldFormatInstanceType = (new (params?: any, getConfig?: FieldFormatsGetConfigFn) => FieldFormat) & { + id: FieldFormatId; + title: string; + fieldType: string | string[]; +}; + // Warning: (ae-missing-release-tag) "fieldFormats" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) @@ -825,17 +923,17 @@ export class IndexPattern implements IIndexPattern { }[]; }; // (undocumented) - getFieldByName(name: string): IndexPatternField | void; + getFieldByName(name: string): Field | void; // (undocumented) - getNonScriptedFields(): IndexPatternField[]; + getNonScriptedFields(): Field[]; // (undocumented) - getScriptedFields(): IndexPatternField[]; + getScriptedFields(): Field[]; // (undocumented) getSourceFiltering(): { excludes: any[]; }; // (undocumented) - getTimeField(): IndexPatternField | undefined; + getTimeField(): Field | undefined; // (undocumented) id?: string; // (undocumented) @@ -912,58 +1010,15 @@ export interface IndexPatternAttributes { typeMeta: string; } -// Warning: (ae-missing-release-tag) "Field" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export class IndexPatternField implements IFieldType { - // Warning: (ae-forgotten-export) The symbol "FieldSpec" needs to be exported by the entry point index.d.ts - // - // (undocumented) - $$spec: FieldSpec; - constructor(indexPattern: IndexPattern, spec: FieldSpec | IndexPatternField, shortDotsEnable?: boolean); - // (undocumented) - aggregatable?: boolean; - // (undocumented) - count?: number; - // (undocumented) - displayName?: string; - // (undocumented) - esTypes?: string[]; - // (undocumented) - filterable?: boolean; - // (undocumented) - format: any; - // (undocumented) - indexPattern?: IndexPattern; - // (undocumented) - lang?: string; - // (undocumented) - name: string; - // (undocumented) - script?: string; - // (undocumented) - scripted?: boolean; - // (undocumented) - searchable?: boolean; - // (undocumented) - sortable?: boolean; - // (undocumented) - subType?: IFieldSubType; - // (undocumented) - type: string; - // (undocumented) - visualizable?: boolean; -} - // Warning: (ae-missing-release-tag) "FieldList" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) -export class IndexPatternFieldList extends Array implements IFieldList { +export class IndexPatternFieldList extends Array implements IFieldList { constructor(indexPattern: IndexPattern, specs?: FieldSpec[], shortDotsEnable?: boolean); // (undocumented) add: (field: Record) => void; // (undocumented) - getByName: (name: string) => IndexPatternField | undefined; + getByName: (name: string) => Field | undefined; // (undocumented) getByType: (type: string) => any[]; // (undocumented) @@ -1788,7 +1843,6 @@ export type TSearchStrategyProvider = (context: ISearc // src/plugins/data/public/index.ts:135:21 - (ae-forgotten-export) The symbol "getEsQueryConfig" needs to be exported by the entry point index.d.ts // src/plugins/data/public/index.ts:135:21 - (ae-forgotten-export) The symbol "luceneStringToDsl" needs to be exported by the entry point index.d.ts // src/plugins/data/public/index.ts:135:21 - (ae-forgotten-export) The symbol "decorateQuery" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:177:26 - (ae-forgotten-export) The symbol "FieldFormat" needs to be exported by the entry point index.d.ts // src/plugins/data/public/index.ts:177:26 - (ae-forgotten-export) The symbol "FieldFormatsRegistry" needs to be exported by the entry point index.d.ts // src/plugins/data/public/index.ts:177:26 - (ae-forgotten-export) The symbol "BoolFormat" needs to be exported by the entry point index.d.ts // src/plugins/data/public/index.ts:177:26 - (ae-forgotten-export) The symbol "BytesFormat" needs to be exported by the entry point index.d.ts @@ -1804,28 +1858,28 @@ export type TSearchStrategyProvider = (context: ISearc // src/plugins/data/public/index.ts:177:26 - (ae-forgotten-export) The symbol "UrlFormat" needs to be exported by the entry point index.d.ts // src/plugins/data/public/index.ts:177:26 - (ae-forgotten-export) The symbol "StringFormat" needs to be exported by the entry point index.d.ts // src/plugins/data/public/index.ts:177:26 - (ae-forgotten-export) The symbol "TruncateFormat" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:234:27 - (ae-forgotten-export) The symbol "isFilterable" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:234:27 - (ae-forgotten-export) The symbol "isNestedField" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:234:27 - (ae-forgotten-export) The symbol "validateIndexPattern" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:234:27 - (ae-forgotten-export) The symbol "getFromSavedObject" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:234:27 - (ae-forgotten-export) The symbol "flattenHitWrapper" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:234:27 - (ae-forgotten-export) The symbol "getRoutes" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:234:27 - (ae-forgotten-export) The symbol "formatHitProvider" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:381:20 - (ae-forgotten-export) The symbol "getRequestInspectorStats" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:381:20 - (ae-forgotten-export) The symbol "getResponseInspectorStats" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:381:20 - (ae-forgotten-export) The symbol "tabifyAggResponse" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:381:20 - (ae-forgotten-export) The symbol "tabifyGetColumns" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:386:1 - (ae-forgotten-export) The symbol "CidrMask" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:387:1 - (ae-forgotten-export) The symbol "convertDateRangeToString" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:389:1 - (ae-forgotten-export) The symbol "dateHistogramInterval" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:398:1 - (ae-forgotten-export) The symbol "InvalidEsCalendarIntervalError" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:399:1 - (ae-forgotten-export) The symbol "InvalidEsIntervalFormatError" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:400:1 - (ae-forgotten-export) The symbol "isDateHistogramBucketAggConfig" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:404:1 - (ae-forgotten-export) The symbol "isValidEsInterval" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:405:1 - (ae-forgotten-export) The symbol "isValidInterval" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:408:1 - (ae-forgotten-export) The symbol "parseInterval" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:409:1 - (ae-forgotten-export) The symbol "propFilter" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:412:1 - (ae-forgotten-export) The symbol "toAbsoluteDates" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:236:27 - (ae-forgotten-export) The symbol "isFilterable" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:236:27 - (ae-forgotten-export) The symbol "isNestedField" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:236:27 - (ae-forgotten-export) The symbol "validateIndexPattern" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:236:27 - (ae-forgotten-export) The symbol "getFromSavedObject" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:236:27 - (ae-forgotten-export) The symbol "flattenHitWrapper" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:236:27 - (ae-forgotten-export) The symbol "getRoutes" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:236:27 - (ae-forgotten-export) The symbol "formatHitProvider" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:384:20 - (ae-forgotten-export) The symbol "getRequestInspectorStats" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:384:20 - (ae-forgotten-export) The symbol "getResponseInspectorStats" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:384:20 - (ae-forgotten-export) The symbol "tabifyAggResponse" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:384:20 - (ae-forgotten-export) The symbol "tabifyGetColumns" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:389:1 - (ae-forgotten-export) The symbol "CidrMask" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:390:1 - (ae-forgotten-export) The symbol "convertDateRangeToString" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:392:1 - (ae-forgotten-export) The symbol "dateHistogramInterval" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:401:1 - (ae-forgotten-export) The symbol "InvalidEsCalendarIntervalError" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:402:1 - (ae-forgotten-export) The symbol "InvalidEsIntervalFormatError" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:403:1 - (ae-forgotten-export) The symbol "isDateHistogramBucketAggConfig" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:407:1 - (ae-forgotten-export) The symbol "isValidEsInterval" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:408:1 - (ae-forgotten-export) The symbol "isValidInterval" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:411:1 - (ae-forgotten-export) The symbol "parseInterval" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:412:1 - (ae-forgotten-export) The symbol "propFilter" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:415:1 - (ae-forgotten-export) The symbol "toAbsoluteDates" needs to be exported by the entry point index.d.ts // src/plugins/data/public/query/state_sync/connect_to_query_state.ts:33:33 - (ae-forgotten-export) The symbol "FilterStateStore" needs to be exported by the entry point index.d.ts // src/plugins/data/public/query/state_sync/connect_to_query_state.ts:37:1 - (ae-forgotten-export) The symbol "QueryStateChange" needs to be exported by the entry point index.d.ts // src/plugins/data/public/types.ts:52:5 - (ae-forgotten-export) The symbol "createFiltersFromValueClickAction" needs to be exported by the entry point index.d.ts diff --git a/src/plugins/data/server/server.api.md b/src/plugins/data/server/server.api.md index 9b673de60ca65a..5d94b6516c2bab 100644 --- a/src/plugins/data/server/server.api.md +++ b/src/plugins/data/server/server.api.md @@ -609,7 +609,7 @@ export class Plugin implements Plugin_2 { // (undocumented) setup(core: CoreSetup, { usageCollection }: DataPluginSetupDependencies): { fieldFormats: { - register: (customFieldFormat: import("../common").FieldFormatInstanceType) => number; + register: (customFieldFormat: import("../public").FieldFormatInstanceType) => number; }; search: ISearchSetup; }; diff --git a/src/plugins/vis_type_vislib/kibana.json b/src/plugins/vis_type_vislib/kibana.json new file mode 100644 index 00000000000000..5b3088b399ebff --- /dev/null +++ b/src/plugins/vis_type_vislib/kibana.json @@ -0,0 +1,8 @@ +{ + "id": "visTypeVislib", + "version": "kibana", + "server": true, + "ui": true, + "requiredPlugins": ["charts", "data", "expressions", "visualizations"], + "optionalPlugins": ["visTypeXy"] +} diff --git a/src/legacy/core_plugins/vis_type_vislib/public/__snapshots__/pie_fn.test.ts.snap b/src/plugins/vis_type_vislib/public/__snapshots__/pie_fn.test.ts.snap similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/__snapshots__/pie_fn.test.ts.snap rename to src/plugins/vis_type_vislib/public/__snapshots__/pie_fn.test.ts.snap diff --git a/src/legacy/core_plugins/vis_type_vislib/public/area.ts b/src/plugins/vis_type_vislib/public/area.ts similarity index 96% rename from src/legacy/core_plugins/vis_type_vislib/public/area.ts rename to src/plugins/vis_type_vislib/public/area.ts index 8a196da64fc4bc..c42962ad50a4b0 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/area.ts +++ b/src/plugins/vis_type_vislib/public/area.ts @@ -23,8 +23,8 @@ import { palettes } from '@elastic/eui/lib/services'; // @ts-ignore import { euiPaletteColorBlind } from '@elastic/eui/lib/services'; -import { AggGroupNames } from '../../../../plugins/data/public'; -import { Schemas } from '../../../../plugins/vis_default_editor/public'; +import { AggGroupNames } from '../../data/public'; +import { Schemas } from '../../vis_default_editor/public'; import { Positions, ChartTypes, @@ -39,7 +39,7 @@ import { import { getAreaOptionTabs, countLabel } from './utils/common_config'; import { createVislibVisController } from './vis_controller'; import { VisTypeVislibDependencies } from './plugin'; -import { Rotates } from '../../../../plugins/charts/public'; +import { Rotates } from '../../charts/public'; export const createAreaVisTypeDefinition = (deps: VisTypeVislibDependencies) => ({ name: 'area', diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/common/index.ts b/src/plugins/vis_type_vislib/public/components/common/index.ts similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/components/common/index.ts rename to src/plugins/vis_type_vislib/public/components/common/index.ts diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/common/truncate_labels.tsx b/src/plugins/vis_type_vislib/public/components/common/truncate_labels.tsx similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/components/common/truncate_labels.tsx rename to src/plugins/vis_type_vislib/public/components/common/truncate_labels.tsx diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/common/validation_wrapper.tsx b/src/plugins/vis_type_vislib/public/components/common/validation_wrapper.tsx similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/components/common/validation_wrapper.tsx rename to src/plugins/vis_type_vislib/public/components/common/validation_wrapper.tsx diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/index.ts b/src/plugins/vis_type_vislib/public/components/index.ts similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/components/index.ts rename to src/plugins/vis_type_vislib/public/components/index.ts diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/options/gauge/index.tsx b/src/plugins/vis_type_vislib/public/components/options/gauge/index.tsx similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/components/options/gauge/index.tsx rename to src/plugins/vis_type_vislib/public/components/options/gauge/index.tsx diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/options/gauge/labels_panel.tsx b/src/plugins/vis_type_vislib/public/components/options/gauge/labels_panel.tsx similarity index 95% rename from src/legacy/core_plugins/vis_type_vislib/public/components/options/gauge/labels_panel.tsx rename to src/plugins/vis_type_vislib/public/components/options/gauge/labels_panel.tsx index 3fca9dc8adc08e..0bd5694f710213 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/components/options/gauge/labels_panel.tsx +++ b/src/plugins/vis_type_vislib/public/components/options/gauge/labels_panel.tsx @@ -22,8 +22,8 @@ import { EuiPanel, EuiSpacer, EuiTitle } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; -import { SwitchOption, TextInputOption } from '../../../../../../../plugins/charts/public'; -import { GaugeOptionsInternalProps } from '.'; +import { SwitchOption, TextInputOption } from '../../../../../charts/public'; +import { GaugeOptionsInternalProps } from '../gauge'; function LabelsPanel({ stateParams, setValue, setGaugeValue }: GaugeOptionsInternalProps) { return ( diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/options/gauge/ranges_panel.tsx b/src/plugins/vis_type_vislib/public/components/options/gauge/ranges_panel.tsx similarity index 97% rename from src/legacy/core_plugins/vis_type_vislib/public/components/options/gauge/ranges_panel.tsx rename to src/plugins/vis_type_vislib/public/components/options/gauge/ranges_panel.tsx index 433cc4edeb47b3..c297fb08e4b68b 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/components/options/gauge/ranges_panel.tsx +++ b/src/plugins/vis_type_vislib/public/components/options/gauge/ranges_panel.tsx @@ -29,8 +29,8 @@ import { SetColorRangeValue, SwitchOption, ColorSchemas, -} from '../../../../../../../plugins/charts/public'; -import { GaugeOptionsInternalProps } from '.'; +} from '../../../../../charts/public'; +import { GaugeOptionsInternalProps } from '../gauge'; import { Gauge } from '../../../gauge'; function RangesPanel({ diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/options/gauge/style_panel.tsx b/src/plugins/vis_type_vislib/public/components/options/gauge/style_panel.tsx similarity index 91% rename from src/legacy/core_plugins/vis_type_vislib/public/components/options/gauge/style_panel.tsx rename to src/plugins/vis_type_vislib/public/components/options/gauge/style_panel.tsx index 48711de7d171af..b299b2e86ca403 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/components/options/gauge/style_panel.tsx +++ b/src/plugins/vis_type_vislib/public/components/options/gauge/style_panel.tsx @@ -22,9 +22,9 @@ import { EuiPanel, EuiSpacer, EuiTitle } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; -import { SelectOption } from '../../../../../../../plugins/charts/public'; -import { GaugeOptionsInternalProps } from '.'; -import { AggGroupNames } from '../../../../../../../plugins/data/public'; +import { SelectOption } from '../../../../../charts/public'; +import { GaugeOptionsInternalProps } from '../gauge'; +import { AggGroupNames } from '../../../../../data/public'; function StylePanel({ aggs, setGaugeValue, stateParams, vis }: GaugeOptionsInternalProps) { const diasableAlignment = diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/options/heatmap/index.tsx b/src/plugins/vis_type_vislib/public/components/options/heatmap/index.tsx similarity index 99% rename from src/legacy/core_plugins/vis_type_vislib/public/components/options/heatmap/index.tsx rename to src/plugins/vis_type_vislib/public/components/options/heatmap/index.tsx index dc207ad89286f2..7a89496d9441e8 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/components/options/heatmap/index.tsx +++ b/src/plugins/vis_type_vislib/public/components/options/heatmap/index.tsx @@ -33,7 +33,7 @@ import { SwitchOption, SetColorSchemaOptionsValue, SetColorRangeValue, -} from '../../../../../../../plugins/charts/public'; +} from '../../../../../charts/public'; import { HeatmapVisParams } from '../../../heatmap'; import { ValueAxis } from '../../../types'; import { LabelsPanel } from './labels_panel'; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/options/heatmap/labels_panel.tsx b/src/plugins/vis_type_vislib/public/components/options/heatmap/labels_panel.tsx similarity index 98% rename from src/legacy/core_plugins/vis_type_vislib/public/components/options/heatmap/labels_panel.tsx rename to src/plugins/vis_type_vislib/public/components/options/heatmap/labels_panel.tsx index 3d1629740df2c8..8d5f529ce0fc76 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/components/options/heatmap/labels_panel.tsx +++ b/src/plugins/vis_type_vislib/public/components/options/heatmap/labels_panel.tsx @@ -26,7 +26,7 @@ import { FormattedMessage } from '@kbn/i18n/react'; import { VisOptionsProps } from 'src/plugins/vis_default_editor/public'; import { ValueAxis } from '../../../types'; import { HeatmapVisParams } from '../../../heatmap'; -import { SwitchOption } from '../../../../../../../plugins/charts/public'; +import { SwitchOption } from '../../../../../charts/public'; const VERTICAL_ROTATION = 270; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/options/index.ts b/src/plugins/vis_type_vislib/public/components/options/index.ts similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/components/options/index.ts rename to src/plugins/vis_type_vislib/public/components/options/index.ts diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/__snapshots__/category_axis_panel.test.tsx.snap b/src/plugins/vis_type_vislib/public/components/options/metrics_axes/__snapshots__/category_axis_panel.test.tsx.snap similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/__snapshots__/category_axis_panel.test.tsx.snap rename to src/plugins/vis_type_vislib/public/components/options/metrics_axes/__snapshots__/category_axis_panel.test.tsx.snap diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/__snapshots__/chart_options.test.tsx.snap b/src/plugins/vis_type_vislib/public/components/options/metrics_axes/__snapshots__/chart_options.test.tsx.snap similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/__snapshots__/chart_options.test.tsx.snap rename to src/plugins/vis_type_vislib/public/components/options/metrics_axes/__snapshots__/chart_options.test.tsx.snap diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/__snapshots__/custom_extents_options.test.tsx.snap b/src/plugins/vis_type_vislib/public/components/options/metrics_axes/__snapshots__/custom_extents_options.test.tsx.snap similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/__snapshots__/custom_extents_options.test.tsx.snap rename to src/plugins/vis_type_vislib/public/components/options/metrics_axes/__snapshots__/custom_extents_options.test.tsx.snap diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/__snapshots__/index.test.tsx.snap b/src/plugins/vis_type_vislib/public/components/options/metrics_axes/__snapshots__/index.test.tsx.snap similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/__snapshots__/index.test.tsx.snap rename to src/plugins/vis_type_vislib/public/components/options/metrics_axes/__snapshots__/index.test.tsx.snap diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/__snapshots__/label_options.test.tsx.snap b/src/plugins/vis_type_vislib/public/components/options/metrics_axes/__snapshots__/label_options.test.tsx.snap similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/__snapshots__/label_options.test.tsx.snap rename to src/plugins/vis_type_vislib/public/components/options/metrics_axes/__snapshots__/label_options.test.tsx.snap diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/__snapshots__/line_options.test.tsx.snap b/src/plugins/vis_type_vislib/public/components/options/metrics_axes/__snapshots__/line_options.test.tsx.snap similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/__snapshots__/line_options.test.tsx.snap rename to src/plugins/vis_type_vislib/public/components/options/metrics_axes/__snapshots__/line_options.test.tsx.snap diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/__snapshots__/value_axes_panel.test.tsx.snap b/src/plugins/vis_type_vislib/public/components/options/metrics_axes/__snapshots__/value_axes_panel.test.tsx.snap similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/__snapshots__/value_axes_panel.test.tsx.snap rename to src/plugins/vis_type_vislib/public/components/options/metrics_axes/__snapshots__/value_axes_panel.test.tsx.snap diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/__snapshots__/value_axis_options.test.tsx.snap b/src/plugins/vis_type_vislib/public/components/options/metrics_axes/__snapshots__/value_axis_options.test.tsx.snap similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/__snapshots__/value_axis_options.test.tsx.snap rename to src/plugins/vis_type_vislib/public/components/options/metrics_axes/__snapshots__/value_axis_options.test.tsx.snap diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/__snapshots__/y_extents.test.tsx.snap b/src/plugins/vis_type_vislib/public/components/options/metrics_axes/__snapshots__/y_extents.test.tsx.snap similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/__snapshots__/y_extents.test.tsx.snap rename to src/plugins/vis_type_vislib/public/components/options/metrics_axes/__snapshots__/y_extents.test.tsx.snap diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/category_axis_panel.test.tsx b/src/plugins/vis_type_vislib/public/components/options/metrics_axes/category_axis_panel.test.tsx similarity index 98% rename from src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/category_axis_panel.test.tsx rename to src/plugins/vis_type_vislib/public/components/options/metrics_axes/category_axis_panel.test.tsx index 91cdcd0f456b15..44ed0d5aeddabd 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/category_axis_panel.test.tsx +++ b/src/plugins/vis_type_vislib/public/components/options/metrics_axes/category_axis_panel.test.tsx @@ -25,8 +25,6 @@ import { Positions } from '../../../utils/collections'; import { LabelOptions } from './label_options'; import { categoryAxis, vis } from './mocks'; -jest.mock('ui/new_platform'); - describe('CategoryAxisPanel component', () => { let setCategoryAxis: jest.Mock; let onPositionChanged: jest.Mock; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/category_axis_panel.tsx b/src/plugins/vis_type_vislib/public/components/options/metrics_axes/category_axis_panel.tsx similarity index 97% rename from src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/category_axis_panel.tsx rename to src/plugins/vis_type_vislib/public/components/options/metrics_axes/category_axis_panel.tsx index 246c20a14807c5..468fb1f8c315af 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/category_axis_panel.tsx +++ b/src/plugins/vis_type_vislib/public/components/options/metrics_axes/category_axis_panel.tsx @@ -25,7 +25,7 @@ import { FormattedMessage } from '@kbn/i18n/react'; import { VisOptionsProps } from 'src/plugins/vis_default_editor/public'; import { Axis } from '../../../types'; -import { SelectOption, SwitchOption } from '../../../../../../../plugins/charts/public'; +import { SelectOption, SwitchOption } from '../../../../../charts/public'; import { LabelOptions, SetAxisLabel } from './label_options'; import { Positions } from '../../../utils/collections'; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/chart_options.test.tsx b/src/plugins/vis_type_vislib/public/components/options/metrics_axes/chart_options.test.tsx similarity index 98% rename from src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/chart_options.test.tsx rename to src/plugins/vis_type_vislib/public/components/options/metrics_axes/chart_options.test.tsx index c913fd4f35713d..e2d4a0db9f1f9c 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/chart_options.test.tsx +++ b/src/plugins/vis_type_vislib/public/components/options/metrics_axes/chart_options.test.tsx @@ -25,8 +25,6 @@ import { LineOptions } from './line_options'; import { ChartTypes, ChartModes } from '../../../utils/collections'; import { valueAxis, seriesParam, vis } from './mocks'; -jest.mock('ui/new_platform'); - describe('ChartOptions component', () => { let setParamByIndex: jest.Mock; let changeValueAxis: jest.Mock; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/chart_options.tsx b/src/plugins/vis_type_vislib/public/components/options/metrics_axes/chart_options.tsx similarity index 95% rename from src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/chart_options.tsx rename to src/plugins/vis_type_vislib/public/components/options/metrics_axes/chart_options.tsx index 89aab3a19c5897..623a8d1f348e93 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/chart_options.tsx +++ b/src/plugins/vis_type_vislib/public/components/options/metrics_axes/chart_options.tsx @@ -22,12 +22,12 @@ import React, { useMemo, useCallback } from 'react'; import { i18n } from '@kbn/i18n'; import { EuiFlexGroup, EuiFlexItem, EuiSpacer } from '@elastic/eui'; -import { Vis } from '../../../../../../../plugins/visualizations/public'; +import { Vis } from '../../../../../visualizations/public'; import { SeriesParam, ValueAxis } from '../../../types'; import { ChartTypes } from '../../../utils/collections'; -import { SelectOption } from '../../../../../../../plugins/charts/public'; +import { SelectOption } from '../../../../../charts/public'; import { LineOptions } from './line_options'; -import { SetParamByIndex, ChangeValueAxis } from './'; +import { SetParamByIndex, ChangeValueAxis } from '.'; export type SetChart = (paramName: T, value: SeriesParam[T]) => void; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/custom_extents_options.test.tsx b/src/plugins/vis_type_vislib/public/components/options/metrics_axes/custom_extents_options.test.tsx similarity index 99% rename from src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/custom_extents_options.test.tsx rename to src/plugins/vis_type_vislib/public/components/options/metrics_axes/custom_extents_options.test.tsx index a93ee454a7afd1..4798c67928f7f6 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/custom_extents_options.test.tsx +++ b/src/plugins/vis_type_vislib/public/components/options/metrics_axes/custom_extents_options.test.tsx @@ -28,8 +28,6 @@ const DEFAULT_Y_EXTENTS = 'defaultYExtents'; const SCALE = 'scale'; const SET_Y_EXTENTS = 'setYExtents'; -jest.mock('ui/new_platform'); - describe('CustomExtentsOptions component', () => { let setValueAxis: jest.Mock; let setValueAxisScale: jest.Mock; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/custom_extents_options.tsx b/src/plugins/vis_type_vislib/public/components/options/metrics_axes/custom_extents_options.tsx similarity index 99% rename from src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/custom_extents_options.tsx rename to src/plugins/vis_type_vislib/public/components/options/metrics_axes/custom_extents_options.tsx index a3a97df9e35ae2..634d6b3f0641cd 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/custom_extents_options.tsx +++ b/src/plugins/vis_type_vislib/public/components/options/metrics_axes/custom_extents_options.tsx @@ -21,7 +21,7 @@ import React, { useCallback, useEffect } from 'react'; import { i18n } from '@kbn/i18n'; import { ValueAxis } from '../../../types'; -import { NumberInputOption, SwitchOption } from '../../../../../../../plugins/charts/public'; +import { NumberInputOption, SwitchOption } from '../../../../../charts/public'; import { YExtents } from './y_extents'; import { SetScale } from './value_axis_options'; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/index.test.tsx b/src/plugins/vis_type_vislib/public/components/options/metrics_axes/index.test.tsx similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/index.test.tsx rename to src/plugins/vis_type_vislib/public/components/options/metrics_axes/index.test.tsx diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/index.tsx b/src/plugins/vis_type_vislib/public/components/options/metrics_axes/index.tsx similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/index.tsx rename to src/plugins/vis_type_vislib/public/components/options/metrics_axes/index.tsx diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/label_options.test.tsx b/src/plugins/vis_type_vislib/public/components/options/metrics_axes/label_options.test.tsx similarity index 98% rename from src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/label_options.test.tsx rename to src/plugins/vis_type_vislib/public/components/options/metrics_axes/label_options.test.tsx index 48fcbdf8f9082e..f500b7e58e9fdb 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/label_options.test.tsx +++ b/src/plugins/vis_type_vislib/public/components/options/metrics_axes/label_options.test.tsx @@ -23,8 +23,6 @@ import { LabelOptions, LabelOptionsProps } from './label_options'; import { TruncateLabelsOption } from '../../common'; import { valueAxis } from './mocks'; -jest.mock('ui/new_platform'); - const FILTER = 'filter'; const ROTATE = 'rotate'; const DISABLED = 'disabled'; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/label_options.tsx b/src/plugins/vis_type_vislib/public/components/options/metrics_axes/label_options.tsx similarity index 97% rename from src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/label_options.tsx rename to src/plugins/vis_type_vislib/public/components/options/metrics_axes/label_options.tsx index bc687e56646f63..14e1da6ebcc701 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/label_options.tsx +++ b/src/plugins/vis_type_vislib/public/components/options/metrics_axes/label_options.tsx @@ -26,7 +26,7 @@ import { FormattedMessage } from '@kbn/i18n/react'; import { Axis } from '../../../types'; import { TruncateLabelsOption } from '../../common'; import { getRotateOptions } from '../../../utils/collections'; -import { SelectOption, SwitchOption } from '../../../../../../../plugins/charts/public'; +import { SelectOption, SwitchOption } from '../../../../../charts/public'; export type SetAxisLabel = ( paramName: T, diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/line_options.test.tsx b/src/plugins/vis_type_vislib/public/components/options/metrics_axes/line_options.test.tsx similarity index 95% rename from src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/line_options.test.tsx rename to src/plugins/vis_type_vislib/public/components/options/metrics_axes/line_options.test.tsx index 5354bc9c033e6e..e90c96146ec2cd 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/line_options.test.tsx +++ b/src/plugins/vis_type_vislib/public/components/options/metrics_axes/line_options.test.tsx @@ -20,11 +20,9 @@ import React from 'react'; import { shallow } from 'enzyme'; import { LineOptions, LineOptionsParams } from './line_options'; -import { NumberInputOption } from '../../../../../../../plugins/charts/public'; +import { NumberInputOption } from '../../../../../charts/public'; import { seriesParam, vis } from './mocks'; -jest.mock('ui/new_platform'); - const LINE_WIDTH = 'lineWidth'; const DRAW_LINES = 'drawLinesBetweenPoints'; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/line_options.tsx b/src/plugins/vis_type_vislib/public/components/options/metrics_axes/line_options.tsx similarity index 94% rename from src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/line_options.tsx rename to src/plugins/vis_type_vislib/public/components/options/metrics_axes/line_options.tsx index 76f95bd93caf8c..4b0cce94267f12 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/line_options.tsx +++ b/src/plugins/vis_type_vislib/public/components/options/metrics_axes/line_options.tsx @@ -22,13 +22,9 @@ import React, { useCallback } from 'react'; import { i18n } from '@kbn/i18n'; import { EuiFlexGroup, EuiFlexItem, EuiSpacer } from '@elastic/eui'; -import { Vis } from '../../../../../../../plugins/visualizations/public'; +import { Vis } from '../../../../../visualizations/public'; import { SeriesParam } from '../../../types'; -import { - NumberInputOption, - SelectOption, - SwitchOption, -} from '../../../../../../../plugins/charts/public'; +import { NumberInputOption, SelectOption, SwitchOption } from '../../../../../charts/public'; import { SetChart } from './chart_options'; export interface LineOptionsParams { diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/mocks.ts b/src/plugins/vis_type_vislib/public/components/options/metrics_axes/mocks.ts similarity index 94% rename from src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/mocks.ts rename to src/plugins/vis_type_vislib/public/components/options/metrics_axes/mocks.ts index a296281375daca..277fcf0cdbc3de 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/mocks.ts +++ b/src/plugins/vis_type_vislib/public/components/options/metrics_axes/mocks.ts @@ -17,7 +17,7 @@ * under the License. */ -import { Vis } from '../../../../../../../plugins/visualizations/public'; +import { Vis } from '../../../../../visualizations/public'; import { Axis, ValueAxis, SeriesParam } from '../../../types'; import { ChartTypes, @@ -31,7 +31,7 @@ import { getPositions, getInterpolationModes, } from '../../../utils/collections'; -import { Style } from '../../../../../../../plugins/charts/public'; +import { Style } from '../../../../../charts/public'; const defaultValueAxisId = 'ValueAxis-1'; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/series_panel.tsx b/src/plugins/vis_type_vislib/public/components/options/metrics_axes/series_panel.tsx similarity index 95% rename from src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/series_panel.tsx rename to src/plugins/vis_type_vislib/public/components/options/metrics_axes/series_panel.tsx index 22a726b53363b0..27c423860972c0 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/series_panel.tsx +++ b/src/plugins/vis_type_vislib/public/components/options/metrics_axes/series_panel.tsx @@ -23,10 +23,10 @@ import { EuiPanel, EuiTitle, EuiSpacer, EuiAccordion } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; -import { Vis } from '../../../../../../../plugins/visualizations/public'; +import { Vis } from '../../../../../visualizations/public'; import { ValueAxis, SeriesParam } from '../../../types'; import { ChartOptions } from './chart_options'; -import { SetParamByIndex, ChangeValueAxis } from './'; +import { SetParamByIndex, ChangeValueAxis } from '.'; export interface SeriesPanelProps { changeValueAxis: ChangeValueAxis; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/utils.ts b/src/plugins/vis_type_vislib/public/components/options/metrics_axes/utils.ts similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/utils.ts rename to src/plugins/vis_type_vislib/public/components/options/metrics_axes/utils.ts diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/value_axes_panel.test.tsx b/src/plugins/vis_type_vislib/public/components/options/metrics_axes/value_axes_panel.test.tsx similarity index 99% rename from src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/value_axes_panel.test.tsx rename to src/plugins/vis_type_vislib/public/components/options/metrics_axes/value_axes_panel.test.tsx index 141273fa6bc3f8..2f7dd4071b52cd 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/value_axes_panel.test.tsx +++ b/src/plugins/vis_type_vislib/public/components/options/metrics_axes/value_axes_panel.test.tsx @@ -25,8 +25,6 @@ import { Positions } from '../../../utils/collections'; import { mountWithIntl } from 'test_utils/enzyme_helpers'; import { valueAxis, seriesParam, vis } from './mocks'; -jest.mock('ui/new_platform'); - describe('ValueAxesPanel component', () => { let setParamByIndex: jest.Mock; let onValueAxisPositionChanged: jest.Mock; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/value_axes_panel.tsx b/src/plugins/vis_type_vislib/public/components/options/metrics_axes/value_axes_panel.tsx similarity index 98% rename from src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/value_axes_panel.tsx rename to src/plugins/vis_type_vislib/public/components/options/metrics_axes/value_axes_panel.tsx index 912c3b904b110b..b17f67b81d2b04 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/value_axes_panel.tsx +++ b/src/plugins/vis_type_vislib/public/components/options/metrics_axes/value_axes_panel.tsx @@ -31,10 +31,10 @@ import { import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; -import { Vis } from '../../../../../../../plugins/visualizations/public'; +import { Vis } from '../../../../../visualizations/public'; import { SeriesParam, ValueAxis } from '../../../types'; import { ValueAxisOptions } from './value_axis_options'; -import { SetParamByIndex } from './'; +import { SetParamByIndex } from '.'; export interface ValueAxesPanelProps { isCategoryAxisHorizontal: boolean; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/value_axis_options.test.tsx b/src/plugins/vis_type_vislib/public/components/options/metrics_axes/value_axis_options.test.tsx similarity index 97% rename from src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/value_axis_options.test.tsx rename to src/plugins/vis_type_vislib/public/components/options/metrics_axes/value_axis_options.test.tsx index 876a6917ee0b4c..1977bdba6eadfc 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/value_axis_options.test.tsx +++ b/src/plugins/vis_type_vislib/public/components/options/metrics_axes/value_axis_options.test.tsx @@ -21,13 +21,11 @@ import React from 'react'; import { shallow } from 'enzyme'; import { ValueAxisOptions, ValueAxisOptionsParams } from './value_axis_options'; import { ValueAxis } from '../../../types'; -import { TextInputOption } from '../../../../../../../plugins/charts/public'; +import { TextInputOption } from '../../../../../charts/public'; import { LabelOptions } from './label_options'; import { ScaleTypes, Positions } from '../../../utils/collections'; import { valueAxis, vis } from './mocks'; -jest.mock('ui/new_platform'); - const POSITION = 'position'; interface PositionOption { diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/value_axis_options.tsx b/src/plugins/vis_type_vislib/public/components/options/metrics_axes/value_axis_options.tsx similarity index 96% rename from src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/value_axis_options.tsx rename to src/plugins/vis_type_vislib/public/components/options/metrics_axes/value_axis_options.tsx index 1b89a766d05913..52962fe813b446 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/value_axis_options.tsx +++ b/src/plugins/vis_type_vislib/public/components/options/metrics_axes/value_axis_options.tsx @@ -21,18 +21,14 @@ import React, { useCallback, useMemo } from 'react'; import { i18n } from '@kbn/i18n'; import { EuiSpacer, EuiAccordion, EuiHorizontalRule } from '@elastic/eui'; -import { Vis } from '../../../../../../../plugins/visualizations/public'; +import { Vis } from '../../../../../visualizations/public'; import { ValueAxis } from '../../../types'; import { Positions } from '../../../utils/collections'; -import { - SelectOption, - SwitchOption, - TextInputOption, -} from '../../../../../../../plugins/charts/public'; +import { SelectOption, SwitchOption, TextInputOption } from '../../../../../charts/public'; import { LabelOptions, SetAxisLabel } from './label_options'; import { CustomExtentsOptions } from './custom_extents_options'; import { isAxisHorizontal } from './utils'; -import { SetParamByIndex } from './'; +import { SetParamByIndex } from '.'; export type SetScale = ( paramName: T, diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/y_extents.test.tsx b/src/plugins/vis_type_vislib/public/components/options/metrics_axes/y_extents.test.tsx similarity index 96% rename from src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/y_extents.test.tsx rename to src/plugins/vis_type_vislib/public/components/options/metrics_axes/y_extents.test.tsx index b5ed475ca8e319..3bacb0be34d135 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/y_extents.test.tsx +++ b/src/plugins/vis_type_vislib/public/components/options/metrics_axes/y_extents.test.tsx @@ -21,9 +21,7 @@ import React from 'react'; import { mount, shallow } from 'enzyme'; import { YExtents, YExtentsProps } from './y_extents'; import { ScaleTypes } from '../../../utils/collections'; -import { NumberInputOption } from '../../../../../../../plugins/charts/public'; - -jest.mock('ui/new_platform'); +import { NumberInputOption } from '../../../../../charts/public'; describe('YExtents component', () => { let setMultipleValidity: jest.Mock; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/y_extents.tsx b/src/plugins/vis_type_vislib/public/components/options/metrics_axes/y_extents.tsx similarity index 97% rename from src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/y_extents.tsx rename to src/plugins/vis_type_vislib/public/components/options/metrics_axes/y_extents.tsx index faeb6069b51264..c2aa917dd3a6f6 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/components/options/metrics_axes/y_extents.tsx +++ b/src/plugins/vis_type_vislib/public/components/options/metrics_axes/y_extents.tsx @@ -23,7 +23,7 @@ import { i18n } from '@kbn/i18n'; import { Scale } from '../../../types'; import { ScaleTypes } from '../../../utils/collections'; -import { NumberInputOption } from '../../../../../../../plugins/charts/public'; +import { NumberInputOption } from '../../../../../charts/public'; import { SetScale } from './value_axis_options'; const rangeError = i18n.translate('visTypeVislib.controls.pointSeries.valueAxes.minErrorMessage', { diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/options/pie.tsx b/src/plugins/vis_type_vislib/public/components/options/pie.tsx similarity index 97% rename from src/legacy/core_plugins/vis_type_vislib/public/components/options/pie.tsx rename to src/plugins/vis_type_vislib/public/components/options/pie.tsx index f6be9cd0bd8fed..54ba307982967e 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/components/options/pie.tsx +++ b/src/plugins/vis_type_vislib/public/components/options/pie.tsx @@ -24,7 +24,7 @@ import { FormattedMessage } from '@kbn/i18n/react'; import { VisOptionsProps } from 'src/plugins/vis_default_editor/public'; import { TruncateLabelsOption } from '../common'; -import { BasicOptions, SwitchOption } from '../../../../../../plugins/charts/public'; +import { BasicOptions, SwitchOption } from '../../../../charts/public'; import { PieVisParams } from '../../pie'; function PieOptions(props: VisOptionsProps) { diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/options/point_series/grid_panel.tsx b/src/plugins/vis_type_vislib/public/components/options/point_series/grid_panel.tsx similarity index 97% rename from src/legacy/core_plugins/vis_type_vislib/public/components/options/point_series/grid_panel.tsx rename to src/plugins/vis_type_vislib/public/components/options/point_series/grid_panel.tsx index 392d180d2c5f26..0126dce37c9f24 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/components/options/point_series/grid_panel.tsx +++ b/src/plugins/vis_type_vislib/public/components/options/point_series/grid_panel.tsx @@ -23,7 +23,7 @@ import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; import { VisOptionsProps } from 'src/plugins/vis_default_editor/public'; -import { SelectOption, SwitchOption } from '../../../../../../../plugins/charts/public'; +import { SelectOption, SwitchOption } from '../../../../../charts/public'; import { BasicVislibParams, ValueAxis } from '../../../types'; function GridPanel({ stateParams, setValue, hasHistogramAgg }: VisOptionsProps) { diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/options/point_series/index.ts b/src/plugins/vis_type_vislib/public/components/options/point_series/index.ts similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/components/options/point_series/index.ts rename to src/plugins/vis_type_vislib/public/components/options/point_series/index.ts diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/options/point_series/point_series.tsx b/src/plugins/vis_type_vislib/public/components/options/point_series/point_series.tsx similarity index 97% rename from src/legacy/core_plugins/vis_type_vislib/public/components/options/point_series/point_series.tsx rename to src/plugins/vis_type_vislib/public/components/options/point_series/point_series.tsx index 903c1917751d9e..60458b1f5c41f0 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/components/options/point_series/point_series.tsx +++ b/src/plugins/vis_type_vislib/public/components/options/point_series/point_series.tsx @@ -22,7 +22,7 @@ import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; import { ValidationVisOptionsProps } from '../../common'; -import { BasicOptions, SwitchOption } from '../../../../../../../plugins/charts/public'; +import { BasicOptions, SwitchOption } from '../../../../../charts/public'; import { GridPanel } from './grid_panel'; import { ThresholdPanel } from './threshold_panel'; import { BasicVislibParams } from '../../../types'; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/components/options/point_series/threshold_panel.tsx b/src/plugins/vis_type_vislib/public/components/options/point_series/threshold_panel.tsx similarity index 98% rename from src/legacy/core_plugins/vis_type_vislib/public/components/options/point_series/threshold_panel.tsx rename to src/plugins/vis_type_vislib/public/components/options/point_series/threshold_panel.tsx index 12f058ec7dd1fc..08231803007563 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/components/options/point_series/threshold_panel.tsx +++ b/src/plugins/vis_type_vislib/public/components/options/point_series/threshold_panel.tsx @@ -26,7 +26,7 @@ import { SelectOption, SwitchOption, RequiredNumberInputOption, -} from '../../../../../../../plugins/charts/public'; +} from '../../../../../charts/public'; import { BasicVislibParams } from '../../../types'; function ThresholdPanel({ diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/dispatch_bar_chart_config_normal.json b/src/plugins/vis_type_vislib/public/fixtures/dispatch_bar_chart_config_normal.json similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/dispatch_bar_chart_config_normal.json rename to src/plugins/vis_type_vislib/public/fixtures/dispatch_bar_chart_config_normal.json diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/dispatch_bar_chart_config_percentage.json b/src/plugins/vis_type_vislib/public/fixtures/dispatch_bar_chart_config_percentage.json similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/dispatch_bar_chart_config_percentage.json rename to src/plugins/vis_type_vislib/public/fixtures/dispatch_bar_chart_config_percentage.json diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/dispatch_bar_chart_d3.json b/src/plugins/vis_type_vislib/public/fixtures/dispatch_bar_chart_d3.json similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/dispatch_bar_chart_d3.json rename to src/plugins/vis_type_vislib/public/fixtures/dispatch_bar_chart_d3.json diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/dispatch_bar_chart_data_point.json b/src/plugins/vis_type_vislib/public/fixtures/dispatch_bar_chart_data_point.json similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/dispatch_bar_chart_data_point.json rename to src/plugins/vis_type_vislib/public/fixtures/dispatch_bar_chart_data_point.json diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/dispatch_heatmap_config.json b/src/plugins/vis_type_vislib/public/fixtures/dispatch_heatmap_config.json similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/dispatch_heatmap_config.json rename to src/plugins/vis_type_vislib/public/fixtures/dispatch_heatmap_config.json diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/dispatch_heatmap_d3.json b/src/plugins/vis_type_vislib/public/fixtures/dispatch_heatmap_d3.json similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/dispatch_heatmap_d3.json rename to src/plugins/vis_type_vislib/public/fixtures/dispatch_heatmap_d3.json diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/dispatch_heatmap_data_point.json b/src/plugins/vis_type_vislib/public/fixtures/dispatch_heatmap_data_point.json similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/dispatch_heatmap_data_point.json rename to src/plugins/vis_type_vislib/public/fixtures/dispatch_heatmap_data_point.json diff --git a/src/plugins/vis_type_vislib/public/fixtures/mock_data/date_histogram/_columns.js b/src/plugins/vis_type_vislib/public/fixtures/mock_data/date_histogram/_columns.js new file mode 100644 index 00000000000000..ff8538021d2756 --- /dev/null +++ b/src/plugins/vis_type_vislib/public/fixtures/mock_data/date_histogram/_columns.js @@ -0,0 +1,319 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import moment from 'moment'; + +export default { + columns: [ + { + label: '200: response', + xAxisLabel: '@timestamp per 30 sec', + ordered: { + date: true, + interval: 30000, + min: 1415826608440, + max: 1415827508440, + }, + yAxisLabel: 'Count of documents', + xAxisFormatter: function(thing) { + return moment(thing); + }, + tooltipFormatter: function(d) { + return d; + }, + series: [ + { + label: 'Count', + values: [ + { + x: 1415826600000, + y: 4, + }, + { + x: 1415826630000, + y: 8, + }, + { + x: 1415826660000, + y: 7, + }, + { + x: 1415826690000, + y: 5, + }, + { + x: 1415826720000, + y: 5, + }, + { + x: 1415826750000, + y: 4, + }, + { + x: 1415826780000, + y: 10, + }, + { + x: 1415826810000, + y: 7, + }, + { + x: 1415826840000, + y: 9, + }, + { + x: 1415826870000, + y: 8, + }, + { + x: 1415826900000, + y: 9, + }, + { + x: 1415826930000, + y: 8, + }, + { + x: 1415826960000, + y: 3, + }, + { + x: 1415826990000, + y: 9, + }, + { + x: 1415827020000, + y: 6, + }, + { + x: 1415827050000, + y: 8, + }, + { + x: 1415827080000, + y: 7, + }, + { + x: 1415827110000, + y: 4, + }, + { + x: 1415827140000, + y: 6, + }, + { + x: 1415827170000, + y: 10, + }, + { + x: 1415827200000, + y: 2, + }, + { + x: 1415827230000, + y: 8, + }, + { + x: 1415827260000, + y: 5, + }, + { + x: 1415827290000, + y: 6, + }, + { + x: 1415827320000, + y: 6, + }, + { + x: 1415827350000, + y: 10, + }, + { + x: 1415827380000, + y: 6, + }, + { + x: 1415827410000, + y: 6, + }, + { + x: 1415827440000, + y: 12, + }, + { + x: 1415827470000, + y: 9, + }, + { + x: 1415827500000, + y: 1, + }, + ], + }, + ], + }, + { + label: '503: response', + xAxisLabel: '@timestamp per 30 sec', + ordered: { + date: true, + interval: 30000, + min: 1415826608440, + max: 1415827508440, + }, + yAxisLabel: 'Count of documents', + xAxisFormatter: function(thing) { + return moment(thing); + }, + tooltipFormatter: function(d) { + return d; + }, + series: [ + { + label: 'Count', + values: [ + { + x: 1415826630000, + y: 1, + }, + { + x: 1415826660000, + y: 1, + }, + { + x: 1415826720000, + y: 1, + }, + { + x: 1415826780000, + y: 1, + }, + { + x: 1415826900000, + y: 1, + }, + { + x: 1415827020000, + y: 1, + }, + { + x: 1415827080000, + y: 1, + }, + { + x: 1415827110000, + y: 2, + }, + ], + }, + ], + }, + { + label: '404: response', + xAxisLabel: '@timestamp per 30 sec', + ordered: { + date: true, + interval: 30000, + min: 1415826608440, + max: 1415827508440, + }, + yAxisLabel: 'Count of documents', + xAxisFormatter: function(thing) { + return moment(thing); + }, + tooltipFormatter: function(d) { + return d; + }, + series: [ + { + label: 'Count', + values: [ + { + x: 1415826660000, + y: 1, + }, + { + x: 1415826720000, + y: 1, + }, + { + x: 1415826810000, + y: 1, + }, + { + x: 1415826960000, + y: 1, + }, + { + x: 1415827050000, + y: 1, + }, + { + x: 1415827260000, + y: 1, + }, + { + x: 1415827380000, + y: 1, + }, + { + x: 1415827410000, + y: 1, + }, + ], + }, + ], + }, + ], + xAxisOrderedValues: [ + 1415826600000, + 1415826630000, + 1415826660000, + 1415826690000, + 1415826720000, + 1415826750000, + 1415826780000, + 1415826810000, + 1415826840000, + 1415826870000, + 1415826900000, + 1415826930000, + 1415826960000, + 1415826990000, + 1415827020000, + 1415827050000, + 1415827080000, + 1415827110000, + 1415827140000, + 1415827170000, + 1415827200000, + 1415827230000, + 1415827260000, + 1415827290000, + 1415827320000, + 1415827350000, + 1415827380000, + 1415827410000, + 1415827440000, + 1415827470000, + 1415827500000, + ], + hits: 225, +}; diff --git a/src/plugins/vis_type_vislib/public/fixtures/mock_data/date_histogram/_rows.js b/src/plugins/vis_type_vislib/public/fixtures/mock_data/date_histogram/_rows.js new file mode 100644 index 00000000000000..6367197acdecea --- /dev/null +++ b/src/plugins/vis_type_vislib/public/fixtures/mock_data/date_histogram/_rows.js @@ -0,0 +1,1697 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import moment from 'moment'; + +export default { + rows: [ + { + label: '0.0-1000.0: bytes', + xAxisLabel: '@timestamp per 30 sec', + ordered: { + date: true, + interval: 30000, + min: 1415826260456, + max: 1415827160456, + }, + yAxisLabel: 'Count of documents', + xAxisFormatter: function(thing) { + return moment(thing); + }, + tooltipFormatter: function(d) { + return d; + }, + series: [ + { + label: 'jpg', + values: [ + { + x: 1415826240000, + y: 0, + y0: 0, + }, + { + x: 1415826270000, + y: 0, + y0: 0, + }, + { + x: 1415826300000, + y: 0, + y0: 0, + }, + { + x: 1415826330000, + y: 1, + y0: 0, + }, + { + x: 1415826360000, + y: 0, + y0: 0, + }, + { + x: 1415826390000, + y: 0, + y0: 0, + }, + { + x: 1415826420000, + y: 0, + y0: 0, + }, + { + x: 1415826450000, + y: 0, + y0: 0, + }, + { + x: 1415826480000, + y: 0, + y0: 0, + }, + { + x: 1415826510000, + y: 0, + y0: 0, + }, + { + x: 1415826540000, + y: 0, + y0: 0, + }, + { + x: 1415826570000, + y: 0, + y0: 0, + }, + { + x: 1415826600000, + y: 0, + y0: 0, + }, + { + x: 1415826630000, + y: 1, + y0: 0, + }, + { + x: 1415826660000, + y: 0, + y0: 0, + }, + { + x: 1415826690000, + y: 0, + y0: 0, + }, + { + x: 1415826720000, + y: 0, + y0: 0, + }, + { + x: 1415826750000, + y: 0, + y0: 0, + }, + { + x: 1415826780000, + y: 1, + y0: 0, + }, + { + x: 1415826810000, + y: 0, + y0: 0, + }, + { + x: 1415826840000, + y: 0, + y0: 0, + }, + { + x: 1415826870000, + y: 0, + y0: 0, + }, + { + x: 1415826900000, + y: 1, + y0: 0, + }, + { + x: 1415826930000, + y: 0, + y0: 0, + }, + { + x: 1415826960000, + y: 0, + y0: 0, + }, + { + x: 1415826990000, + y: 0, + y0: 0, + }, + { + x: 1415827020000, + y: 1, + y0: 0, + }, + { + x: 1415827050000, + y: 0, + y0: 0, + }, + { + x: 1415827080000, + y: 0, + y0: 0, + }, + { + x: 1415827110000, + y: 1, + y0: 0, + }, + { + x: 1415827140000, + y: 0, + y0: 0, + }, + ], + }, + { + label: 'css', + values: [ + { + x: 1415826240000, + y: 0, + y0: 0, + }, + { + x: 1415826270000, + y: 0, + y0: 0, + }, + { + x: 1415826300000, + y: 0, + y0: 0, + }, + { + x: 1415826330000, + y: 0, + y0: 1, + }, + { + x: 1415826360000, + y: 0, + y0: 0, + }, + { + x: 1415826390000, + y: 0, + y0: 0, + }, + { + x: 1415826420000, + y: 0, + y0: 0, + }, + { + x: 1415826450000, + y: 0, + y0: 0, + }, + { + x: 1415826480000, + y: 0, + y0: 0, + }, + { + x: 1415826510000, + y: 0, + y0: 0, + }, + { + x: 1415826540000, + y: 0, + y0: 0, + }, + { + x: 1415826570000, + y: 0, + y0: 0, + }, + { + x: 1415826600000, + y: 0, + y0: 0, + }, + { + x: 1415826630000, + y: 0, + y0: 1, + }, + { + x: 1415826660000, + y: 0, + y0: 0, + }, + { + x: 1415826690000, + y: 0, + y0: 0, + }, + { + x: 1415826720000, + y: 0, + y0: 0, + }, + { + x: 1415826750000, + y: 0, + y0: 0, + }, + { + x: 1415826780000, + y: 0, + y0: 1, + }, + { + x: 1415826810000, + y: 0, + y0: 0, + }, + { + x: 1415826840000, + y: 0, + y0: 0, + }, + { + x: 1415826870000, + y: 0, + y0: 0, + }, + { + x: 1415826900000, + y: 0, + y0: 1, + }, + { + x: 1415826930000, + y: 0, + y0: 0, + }, + { + x: 1415826960000, + y: 0, + y0: 0, + }, + { + x: 1415826990000, + y: 0, + y0: 0, + }, + { + x: 1415827020000, + y: 0, + y0: 1, + }, + { + x: 1415827050000, + y: 0, + y0: 0, + }, + { + x: 1415827080000, + y: 1, + y0: 0, + }, + { + x: 1415827110000, + y: 0, + y0: 1, + }, + { + x: 1415827140000, + y: 0, + y0: 0, + }, + ], + }, + { + label: 'png', + values: [ + { + x: 1415826240000, + y: 0, + y0: 0, + }, + { + x: 1415826270000, + y: 0, + y0: 0, + }, + { + x: 1415826300000, + y: 0, + y0: 0, + }, + { + x: 1415826330000, + y: 0, + y0: 1, + }, + { + x: 1415826360000, + y: 0, + y0: 0, + }, + { + x: 1415826390000, + y: 0, + y0: 0, + }, + { + x: 1415826420000, + y: 0, + y0: 0, + }, + { + x: 1415826450000, + y: 0, + y0: 0, + }, + { + x: 1415826480000, + y: 0, + y0: 0, + }, + { + x: 1415826510000, + y: 0, + y0: 0, + }, + { + x: 1415826540000, + y: 0, + y0: 0, + }, + { + x: 1415826570000, + y: 0, + y0: 0, + }, + { + x: 1415826600000, + y: 0, + y0: 0, + }, + { + x: 1415826630000, + y: 0, + y0: 1, + }, + { + x: 1415826660000, + y: 0, + y0: 0, + }, + { + x: 1415826690000, + y: 0, + y0: 0, + }, + { + x: 1415826720000, + y: 0, + y0: 0, + }, + { + x: 1415826750000, + y: 0, + y0: 0, + }, + { + x: 1415826780000, + y: 0, + y0: 1, + }, + { + x: 1415826810000, + y: 0, + y0: 0, + }, + { + x: 1415826840000, + y: 0, + y0: 0, + }, + { + x: 1415826870000, + y: 0, + y0: 0, + }, + { + x: 1415826900000, + y: 0, + y0: 1, + }, + { + x: 1415826930000, + y: 0, + y0: 0, + }, + { + x: 1415826960000, + y: 0, + y0: 0, + }, + { + x: 1415826990000, + y: 0, + y0: 0, + }, + { + x: 1415827020000, + y: 0, + y0: 1, + }, + { + x: 1415827050000, + y: 0, + y0: 0, + }, + { + x: 1415827080000, + y: 0, + y0: 1, + }, + { + x: 1415827110000, + y: 1, + y0: 1, + }, + { + x: 1415827140000, + y: 0, + y0: 0, + }, + ], + }, + { + label: 'php', + values: [ + { + x: 1415826240000, + y: 0, + y0: 0, + }, + { + x: 1415826270000, + y: 0, + y0: 0, + }, + { + x: 1415826300000, + y: 1, + y0: 0, + }, + { + x: 1415826330000, + y: 0, + y0: 1, + }, + { + x: 1415826360000, + y: 0, + y0: 0, + }, + { + x: 1415826390000, + y: 0, + y0: 0, + }, + { + x: 1415826420000, + y: 0, + y0: 0, + }, + { + x: 1415826450000, + y: 0, + y0: 0, + }, + { + x: 1415826480000, + y: 0, + y0: 0, + }, + { + x: 1415826510000, + y: 0, + y0: 0, + }, + { + x: 1415826540000, + y: 0, + y0: 0, + }, + { + x: 1415826570000, + y: 0, + y0: 0, + }, + { + x: 1415826600000, + y: 0, + y0: 0, + }, + { + x: 1415826630000, + y: 0, + y0: 1, + }, + { + x: 1415826660000, + y: 0, + y0: 0, + }, + { + x: 1415826690000, + y: 0, + y0: 0, + }, + { + x: 1415826720000, + y: 0, + y0: 0, + }, + { + x: 1415826750000, + y: 0, + y0: 0, + }, + { + x: 1415826780000, + y: 0, + y0: 1, + }, + { + x: 1415826810000, + y: 0, + y0: 0, + }, + { + x: 1415826840000, + y: 0, + y0: 0, + }, + { + x: 1415826870000, + y: 0, + y0: 0, + }, + { + x: 1415826900000, + y: 0, + y0: 1, + }, + { + x: 1415826930000, + y: 0, + y0: 0, + }, + { + x: 1415826960000, + y: 0, + y0: 0, + }, + { + x: 1415826990000, + y: 0, + y0: 0, + }, + { + x: 1415827020000, + y: 0, + y0: 1, + }, + { + x: 1415827050000, + y: 0, + y0: 0, + }, + { + x: 1415827080000, + y: 0, + y0: 1, + }, + { + x: 1415827110000, + y: 0, + y0: 2, + }, + { + x: 1415827140000, + y: 0, + y0: 0, + }, + ], + }, + { + label: 'gif', + values: [ + { + x: 1415826240000, + y: 0, + y0: 0, + }, + { + x: 1415826270000, + y: 0, + y0: 0, + }, + { + x: 1415826300000, + y: 0, + y0: 1, + }, + { + x: 1415826330000, + y: 0, + y0: 1, + }, + { + x: 1415826360000, + y: 0, + y0: 0, + }, + { + x: 1415826390000, + y: 0, + y0: 0, + }, + { + x: 1415826420000, + y: 0, + y0: 0, + }, + { + x: 1415826450000, + y: 1, + y0: 0, + }, + { + x: 1415826480000, + y: 1, + y0: 0, + }, + { + x: 1415826510000, + y: 0, + y0: 0, + }, + { + x: 1415826540000, + y: 3, + y0: 0, + }, + { + x: 1415826570000, + y: 0, + y0: 0, + }, + { + x: 1415826600000, + y: 0, + y0: 0, + }, + { + x: 1415826630000, + y: 0, + y0: 1, + }, + { + x: 1415826660000, + y: 1, + y0: 0, + }, + { + x: 1415826690000, + y: 0, + y0: 0, + }, + { + x: 1415826720000, + y: 1, + y0: 0, + }, + { + x: 1415826750000, + y: 0, + y0: 0, + }, + { + x: 1415826780000, + y: 1, + y0: 1, + }, + { + x: 1415826810000, + y: 0, + y0: 0, + }, + { + x: 1415826840000, + y: 0, + y0: 0, + }, + { + x: 1415826870000, + y: 0, + y0: 0, + }, + { + x: 1415826900000, + y: 0, + y0: 1, + }, + { + x: 1415826930000, + y: 0, + y0: 0, + }, + { + x: 1415826960000, + y: 0, + y0: 0, + }, + { + x: 1415826990000, + y: 0, + y0: 0, + }, + { + x: 1415827020000, + y: 0, + y0: 1, + }, + { + x: 1415827050000, + y: 0, + y0: 0, + }, + { + x: 1415827080000, + y: 1, + y0: 1, + }, + { + x: 1415827110000, + y: 1, + y0: 2, + }, + { + x: 1415827140000, + y: 0, + y0: 0, + }, + ], + }, + ], + }, + { + label: '1000.0-2000.0: bytes', + xAxisLabel: '@timestamp per 30 sec', + ordered: { + date: true, + interval: 30000, + min: 1415826260457, + max: 1415827160457, + }, + yAxisLabel: 'Count of documents', + xAxisFormatter: function(thing) { + return moment(thing); + }, + tooltipFormatter: function(d) { + return d; + }, + series: [ + { + label: 'jpg', + values: [ + { + x: 1415826240000, + y: 0, + y0: 0, + }, + { + x: 1415826270000, + y: 0, + y0: 0, + }, + { + x: 1415826300000, + y: 0, + y0: 0, + }, + { + x: 1415826330000, + y: 0, + y0: 0, + }, + { + x: 1415826360000, + y: 0, + y0: 0, + }, + { + x: 1415826390000, + y: 0, + y0: 0, + }, + { + x: 1415826420000, + y: 0, + y0: 0, + }, + { + x: 1415826450000, + y: 0, + y0: 0, + }, + { + x: 1415826480000, + y: 0, + y0: 0, + }, + { + x: 1415826510000, + y: 0, + y0: 0, + }, + { + x: 1415826540000, + y: 0, + y0: 0, + }, + { + x: 1415826570000, + y: 1, + y0: 0, + }, + { + x: 1415826600000, + y: 0, + y0: 0, + }, + { + x: 1415826630000, + y: 0, + y0: 0, + }, + { + x: 1415826660000, + y: 1, + y0: 0, + }, + { + x: 1415826690000, + y: 0, + y0: 0, + }, + { + x: 1415826720000, + y: 0, + y0: 0, + }, + { + x: 1415826750000, + y: 0, + y0: 0, + }, + { + x: 1415826780000, + y: 0, + y0: 0, + }, + { + x: 1415826810000, + y: 2, + y0: 0, + }, + { + x: 1415826840000, + y: 1, + y0: 0, + }, + { + x: 1415826870000, + y: 0, + y0: 0, + }, + { + x: 1415826900000, + y: 1, + y0: 0, + }, + { + x: 1415826930000, + y: 0, + y0: 0, + }, + { + x: 1415826960000, + y: 0, + y0: 0, + }, + { + x: 1415826990000, + y: 0, + y0: 0, + }, + { + x: 1415827020000, + y: 1, + y0: 0, + }, + { + x: 1415827050000, + y: 0, + y0: 0, + }, + { + x: 1415827080000, + y: 0, + y0: 0, + }, + { + x: 1415827110000, + y: 1, + y0: 0, + }, + { + x: 1415827140000, + y: 0, + y0: 0, + }, + ], + }, + { + label: 'css', + values: [ + { + x: 1415826240000, + y: 0, + y0: 0, + }, + { + x: 1415826270000, + y: 0, + y0: 0, + }, + { + x: 1415826300000, + y: 0, + y0: 0, + }, + { + x: 1415826330000, + y: 0, + y0: 0, + }, + { + x: 1415826360000, + y: 0, + y0: 0, + }, + { + x: 1415826390000, + y: 0, + y0: 0, + }, + { + x: 1415826420000, + y: 0, + y0: 0, + }, + { + x: 1415826450000, + y: 0, + y0: 0, + }, + { + x: 1415826480000, + y: 0, + y0: 0, + }, + { + x: 1415826510000, + y: 0, + y0: 0, + }, + { + x: 1415826540000, + y: 0, + y0: 0, + }, + { + x: 1415826570000, + y: 0, + y0: 1, + }, + { + x: 1415826600000, + y: 0, + y0: 0, + }, + { + x: 1415826630000, + y: 0, + y0: 0, + }, + { + x: 1415826660000, + y: 0, + y0: 1, + }, + { + x: 1415826690000, + y: 0, + y0: 0, + }, + { + x: 1415826720000, + y: 0, + y0: 0, + }, + { + x: 1415826750000, + y: 0, + y0: 0, + }, + { + x: 1415826780000, + y: 0, + y0: 0, + }, + { + x: 1415826810000, + y: 0, + y0: 2, + }, + { + x: 1415826840000, + y: 0, + y0: 1, + }, + { + x: 1415826870000, + y: 0, + y0: 0, + }, + { + x: 1415826900000, + y: 0, + y0: 1, + }, + { + x: 1415826930000, + y: 0, + y0: 0, + }, + { + x: 1415826960000, + y: 0, + y0: 0, + }, + { + x: 1415826990000, + y: 0, + y0: 0, + }, + { + x: 1415827020000, + y: 0, + y0: 1, + }, + { + x: 1415827050000, + y: 0, + y0: 0, + }, + { + x: 1415827080000, + y: 0, + y0: 0, + }, + { + x: 1415827110000, + y: 0, + y0: 1, + }, + { + x: 1415827140000, + y: 0, + y0: 0, + }, + ], + }, + { + label: 'png', + values: [ + { + x: 1415826240000, + y: 0, + y0: 0, + }, + { + x: 1415826270000, + y: 0, + y0: 0, + }, + { + x: 1415826300000, + y: 0, + y0: 0, + }, + { + x: 1415826330000, + y: 0, + y0: 0, + }, + { + x: 1415826360000, + y: 0, + y0: 0, + }, + { + x: 1415826390000, + y: 0, + y0: 0, + }, + { + x: 1415826420000, + y: 0, + y0: 0, + }, + { + x: 1415826450000, + y: 0, + y0: 0, + }, + { + x: 1415826480000, + y: 0, + y0: 0, + }, + { + x: 1415826510000, + y: 0, + y0: 0, + }, + { + x: 1415826540000, + y: 0, + y0: 0, + }, + { + x: 1415826570000, + y: 0, + y0: 1, + }, + { + x: 1415826600000, + y: 0, + y0: 0, + }, + { + x: 1415826630000, + y: 0, + y0: 0, + }, + { + x: 1415826660000, + y: 0, + y0: 1, + }, + { + x: 1415826690000, + y: 0, + y0: 0, + }, + { + x: 1415826720000, + y: 0, + y0: 0, + }, + { + x: 1415826750000, + y: 0, + y0: 0, + }, + { + x: 1415826780000, + y: 0, + y0: 0, + }, + { + x: 1415826810000, + y: 0, + y0: 2, + }, + { + x: 1415826840000, + y: 0, + y0: 1, + }, + { + x: 1415826870000, + y: 0, + y0: 0, + }, + { + x: 1415826900000, + y: 0, + y0: 1, + }, + { + x: 1415826930000, + y: 0, + y0: 0, + }, + { + x: 1415826960000, + y: 0, + y0: 0, + }, + { + x: 1415826990000, + y: 1, + y0: 0, + }, + { + x: 1415827020000, + y: 0, + y0: 1, + }, + { + x: 1415827050000, + y: 0, + y0: 0, + }, + { + x: 1415827080000, + y: 0, + y0: 0, + }, + { + x: 1415827110000, + y: 0, + y0: 1, + }, + { + x: 1415827140000, + y: 0, + y0: 0, + }, + ], + }, + { + label: 'php', + values: [ + { + x: 1415826240000, + y: 0, + y0: 0, + }, + { + x: 1415826270000, + y: 0, + y0: 0, + }, + { + x: 1415826300000, + y: 0, + y0: 0, + }, + { + x: 1415826330000, + y: 0, + y0: 0, + }, + { + x: 1415826360000, + y: 0, + y0: 0, + }, + { + x: 1415826390000, + y: 0, + y0: 0, + }, + { + x: 1415826420000, + y: 0, + y0: 0, + }, + { + x: 1415826450000, + y: 1, + y0: 0, + }, + { + x: 1415826480000, + y: 0, + y0: 0, + }, + { + x: 1415826510000, + y: 0, + y0: 0, + }, + { + x: 1415826540000, + y: 0, + y0: 0, + }, + { + x: 1415826570000, + y: 0, + y0: 1, + }, + { + x: 1415826600000, + y: 0, + y0: 0, + }, + { + x: 1415826630000, + y: 0, + y0: 0, + }, + { + x: 1415826660000, + y: 0, + y0: 1, + }, + { + x: 1415826690000, + y: 0, + y0: 0, + }, + { + x: 1415826720000, + y: 0, + y0: 0, + }, + { + x: 1415826750000, + y: 0, + y0: 0, + }, + { + x: 1415826780000, + y: 0, + y0: 0, + }, + { + x: 1415826810000, + y: 0, + y0: 2, + }, + { + x: 1415826840000, + y: 0, + y0: 1, + }, + { + x: 1415826870000, + y: 0, + y0: 0, + }, + { + x: 1415826900000, + y: 0, + y0: 1, + }, + { + x: 1415826930000, + y: 0, + y0: 0, + }, + { + x: 1415826960000, + y: 0, + y0: 0, + }, + { + x: 1415826990000, + y: 0, + y0: 1, + }, + { + x: 1415827020000, + y: 0, + y0: 1, + }, + { + x: 1415827050000, + y: 0, + y0: 0, + }, + { + x: 1415827080000, + y: 0, + y0: 0, + }, + { + x: 1415827110000, + y: 0, + y0: 1, + }, + { + x: 1415827140000, + y: 0, + y0: 0, + }, + ], + }, + { + label: 'gif', + values: [ + { + x: 1415826240000, + y: 0, + y0: 0, + }, + { + x: 1415826270000, + y: 0, + y0: 0, + }, + { + x: 1415826300000, + y: 0, + y0: 0, + }, + { + x: 1415826330000, + y: 0, + y0: 0, + }, + { + x: 1415826360000, + y: 0, + y0: 0, + }, + { + x: 1415826390000, + y: 0, + y0: 0, + }, + { + x: 1415826420000, + y: 0, + y0: 0, + }, + { + x: 1415826450000, + y: 0, + y0: 1, + }, + { + x: 1415826480000, + y: 0, + y0: 0, + }, + { + x: 1415826510000, + y: 0, + y0: 0, + }, + { + x: 1415826540000, + y: 0, + y0: 0, + }, + { + x: 1415826570000, + y: 0, + y0: 1, + }, + { + x: 1415826600000, + y: 0, + y0: 0, + }, + { + x: 1415826630000, + y: 0, + y0: 0, + }, + { + x: 1415826660000, + y: 0, + y0: 1, + }, + { + x: 1415826690000, + y: 0, + y0: 0, + }, + { + x: 1415826720000, + y: 0, + y0: 0, + }, + { + x: 1415826750000, + y: 0, + y0: 0, + }, + { + x: 1415826780000, + y: 0, + y0: 0, + }, + { + x: 1415826810000, + y: 0, + y0: 2, + }, + { + x: 1415826840000, + y: 0, + y0: 1, + }, + { + x: 1415826870000, + y: 0, + y0: 0, + }, + { + x: 1415826900000, + y: 0, + y0: 1, + }, + { + x: 1415826930000, + y: 0, + y0: 0, + }, + { + x: 1415826960000, + y: 0, + y0: 0, + }, + { + x: 1415826990000, + y: 0, + y0: 1, + }, + { + x: 1415827020000, + y: 0, + y0: 1, + }, + { + x: 1415827050000, + y: 0, + y0: 0, + }, + { + x: 1415827080000, + y: 0, + y0: 0, + }, + { + x: 1415827110000, + y: 0, + y0: 1, + }, + { + x: 1415827140000, + y: 0, + y0: 0, + }, + ], + }, + ], + }, + ], + xAxisOrderedValues: [ + 1415826240000, + 1415826270000, + 1415826300000, + 1415826330000, + 1415826360000, + 1415826390000, + 1415826420000, + 1415826450000, + 1415826480000, + 1415826510000, + 1415826540000, + 1415826570000, + 1415826600000, + 1415826630000, + 1415826660000, + 1415826690000, + 1415826720000, + 1415826750000, + 1415826780000, + 1415826810000, + 1415826840000, + 1415826870000, + 1415826900000, + 1415826930000, + 1415826960000, + 1415826990000, + 1415827020000, + 1415827050000, + 1415827080000, + 1415827110000, + 1415827140000, + ], + hits: 236, +}; diff --git a/src/plugins/vis_type_vislib/public/fixtures/mock_data/date_histogram/_rows_series_with_holes.js b/src/plugins/vis_type_vislib/public/fixtures/mock_data/date_histogram/_rows_series_with_holes.js new file mode 100644 index 00000000000000..ba0d8bf251c6fa --- /dev/null +++ b/src/plugins/vis_type_vislib/public/fixtures/mock_data/date_histogram/_rows_series_with_holes.js @@ -0,0 +1,142 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import moment from 'moment'; + +export const rowsSeriesWithHoles = { + rows: [ + { + label: '', + xAxisLabel: '@timestamp per 30 sec', + ordered: { + date: true, + min: 1411761457636, + max: 1411762357636, + interval: 30000, + }, + yAxisLabel: 'Count of documents', + series: [ + { + label: 'Count', + values: [ + { + x: 1411761450000, + y: 41, + }, + { + x: 1411761510000, + y: 22, + }, + { + x: 1411761540000, + y: 17, + }, + { + x: 1411761840000, + y: 20, + }, + { + x: 1411761870000, + y: 20, + }, + { + x: 1411761900000, + y: 21, + }, + { + x: 1411761930000, + y: 17, + }, + { + x: 1411761960000, + y: 20, + }, + { + x: 1411761990000, + y: 13, + }, + { + x: 1411762020000, + y: 14, + }, + { + x: 1411762050000, + y: 25, + }, + { + x: 1411762080000, + y: 17, + }, + { + x: 1411762110000, + y: 14, + }, + { + x: 1411762140000, + y: 22, + }, + { + x: 1411762170000, + y: 14, + }, + { + x: 1411762200000, + y: 19, + }, + { + x: 1411762320000, + y: 15, + }, + { + x: 1411762350000, + y: 4, + }, + ], + }, + ], + hits: 533, + xAxisFormatter: function(thing) { + return moment(thing); + }, + tooltipFormatter: function(d) { + return d; + }, + }, + ], + xAxisOrderedValues: [ + 1411761450000, + 1411761510000, + 1411761540000, + 1411761840000, + 1411761870000, + 1411761900000, + 1411761930000, + 1411761960000, + 1411761990000, + 1411762020000, + 1411762050000, + 1411762080000, + 1411762110000, + 1411762140000, + 1411762170000, + 1411762200000, + 1411762320000, + 1411762350000, + ], +}; diff --git a/src/plugins/vis_type_vislib/public/fixtures/mock_data/date_histogram/_series.js b/src/plugins/vis_type_vislib/public/fixtures/mock_data/date_histogram/_series.js new file mode 100644 index 00000000000000..89e4f9a32cee16 --- /dev/null +++ b/src/plugins/vis_type_vislib/public/fixtures/mock_data/date_histogram/_series.js @@ -0,0 +1,203 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import moment from 'moment'; + +export default { + label: '', + xAxisLabel: '@timestamp per 30 sec', + ordered: { + date: true, + min: 1411761457636, + max: 1411762357636, + interval: 30000, + }, + yAxisLabel: 'Count of documents', + series: [ + { + label: 'Count', + values: [ + { + x: 1411761450000, + y: 41, + }, + { + x: 1411761480000, + y: 18, + }, + { + x: 1411761510000, + y: 22, + }, + { + x: 1411761540000, + y: 17, + }, + { + x: 1411761570000, + y: 17, + }, + { + x: 1411761600000, + y: 21, + }, + { + x: 1411761630000, + y: 16, + }, + { + x: 1411761660000, + y: 17, + }, + { + x: 1411761690000, + y: 15, + }, + { + x: 1411761720000, + y: 19, + }, + { + x: 1411761750000, + y: 11, + }, + { + x: 1411761780000, + y: 13, + }, + { + x: 1411761810000, + y: 24, + }, + { + x: 1411761840000, + y: 20, + }, + { + x: 1411761870000, + y: 20, + }, + { + x: 1411761900000, + y: 21, + }, + { + x: 1411761930000, + y: 17, + }, + { + x: 1411761960000, + y: 20, + }, + { + x: 1411761990000, + y: 13, + }, + { + x: 1411762020000, + y: 14, + }, + { + x: 1411762050000, + y: 25, + }, + { + x: 1411762080000, + y: 17, + }, + { + x: 1411762110000, + y: 14, + }, + { + x: 1411762140000, + y: 22, + }, + { + x: 1411762170000, + y: 14, + }, + { + x: 1411762200000, + y: 19, + }, + { + x: 1411762230000, + y: 22, + }, + { + x: 1411762260000, + y: 17, + }, + { + x: 1411762290000, + y: 8, + }, + { + x: 1411762320000, + y: 15, + }, + { + x: 1411762350000, + y: 4, + }, + ], + }, + ], + hits: 533, + xAxisOrderedValues: [ + 1411761450000, + 1411761480000, + 1411761510000, + 1411761540000, + 1411761570000, + 1411761600000, + 1411761630000, + 1411761660000, + 1411761690000, + 1411761720000, + 1411761750000, + 1411761780000, + 1411761810000, + 1411761840000, + 1411761870000, + 1411761900000, + 1411761930000, + 1411761960000, + 1411761990000, + 1411762020000, + 1411762050000, + 1411762080000, + 1411762110000, + 1411762140000, + 1411762170000, + 1411762200000, + 1411762230000, + 1411762260000, + 1411762290000, + 1411762320000, + 1411762350000, + ], + xAxisFormatter: function(thing) { + return moment(thing); + }, + tooltipFormatter: function(d) { + return d; + }, +}; diff --git a/src/plugins/vis_type_vislib/public/fixtures/mock_data/date_histogram/_series_monthly_interval.js b/src/plugins/vis_type_vislib/public/fixtures/mock_data/date_histogram/_series_monthly_interval.js new file mode 100644 index 00000000000000..85078a2ec15af2 --- /dev/null +++ b/src/plugins/vis_type_vislib/public/fixtures/mock_data/date_histogram/_series_monthly_interval.js @@ -0,0 +1,108 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import moment from 'moment'; + +export const seriesMonthlyInterval = { + label: '', + xAxisLabel: '@timestamp per month', + ordered: { + date: true, + min: 1451631600000, + max: 1483254000000, + interval: 2678000000, + }, + yAxisLabel: 'Count of documents', + series: [ + { + label: 'Count', + values: [ + { + x: 1451631600000, + y: 10220, + }, + { + x: 1454310000000, + y: 9997, + }, + { + x: 1456815600000, + y: 10792, + }, + { + x: 1459490400000, + y: 10262, + }, + { + x: 1462082400000, + y: 10080, + }, + { + x: 1464760800000, + y: 11161, + }, + { + x: 1467352800000, + y: 9933, + }, + { + x: 1470031200000, + y: 10342, + }, + { + x: 1472709600000, + y: 10887, + }, + { + x: 1475301600000, + y: 9666, + }, + { + x: 1477980000000, + y: 9556, + }, + { + x: 1480575600000, + y: 11644, + }, + ], + }, + ], + hits: 533, + xAxisOrderedValues: [ + 1451631600000, + 1454310000000, + 1456815600000, + 1459490400000, + 1462082400000, + 1464760800000, + 1467352800000, + 1470031200000, + 1472709600000, + 1475301600000, + 1477980000000, + 1480575600000, + ], + xAxisFormatter: function(thing) { + return moment(thing); + }, + tooltipFormatter: function(d) { + return d; + }, +}; diff --git a/src/plugins/vis_type_vislib/public/fixtures/mock_data/date_histogram/_series_neg.js b/src/plugins/vis_type_vislib/public/fixtures/mock_data/date_histogram/_series_neg.js new file mode 100644 index 00000000000000..821c04685d22e5 --- /dev/null +++ b/src/plugins/vis_type_vislib/public/fixtures/mock_data/date_histogram/_series_neg.js @@ -0,0 +1,203 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import moment from 'moment'; + +export default { + label: '', + xAxisLabel: '@timestamp per 30 sec', + ordered: { + date: true, + min: 1411761457636, + max: 1411762357636, + interval: 30000, + }, + yAxisLabel: 'Count of documents', + series: [ + { + label: 'Count', + values: [ + { + x: 1411761450000, + y: -41, + }, + { + x: 1411761480000, + y: -18, + }, + { + x: 1411761510000, + y: -22, + }, + { + x: 1411761540000, + y: -17, + }, + { + x: 1411761570000, + y: -17, + }, + { + x: 1411761600000, + y: -21, + }, + { + x: 1411761630000, + y: -16, + }, + { + x: 1411761660000, + y: -17, + }, + { + x: 1411761690000, + y: -15, + }, + { + x: 1411761720000, + y: -19, + }, + { + x: 1411761750000, + y: -11, + }, + { + x: 1411761780000, + y: -13, + }, + { + x: 1411761810000, + y: -24, + }, + { + x: 1411761840000, + y: -20, + }, + { + x: 1411761870000, + y: -20, + }, + { + x: 1411761900000, + y: -21, + }, + { + x: 1411761930000, + y: -17, + }, + { + x: 1411761960000, + y: -20, + }, + { + x: 1411761990000, + y: -13, + }, + { + x: 1411762020000, + y: -14, + }, + { + x: 1411762050000, + y: -25, + }, + { + x: 1411762080000, + y: -17, + }, + { + x: 1411762110000, + y: -14, + }, + { + x: 1411762140000, + y: -22, + }, + { + x: 1411762170000, + y: -14, + }, + { + x: 1411762200000, + y: -19, + }, + { + x: 1411762230000, + y: -22, + }, + { + x: 1411762260000, + y: -17, + }, + { + x: 1411762290000, + y: -8, + }, + { + x: 1411762320000, + y: -15, + }, + { + x: 1411762350000, + y: -4, + }, + ], + }, + ], + hits: 533, + xAxisOrderedValues: [ + 1411761450000, + 1411761480000, + 1411761510000, + 1411761540000, + 1411761570000, + 1411761600000, + 1411761630000, + 1411761660000, + 1411761690000, + 1411761720000, + 1411761750000, + 1411761780000, + 1411761810000, + 1411761840000, + 1411761870000, + 1411761900000, + 1411761930000, + 1411761960000, + 1411761990000, + 1411762020000, + 1411762050000, + 1411762080000, + 1411762110000, + 1411762140000, + 1411762170000, + 1411762200000, + 1411762230000, + 1411762260000, + 1411762290000, + 1411762320000, + 1411762350000, + ], + xAxisFormatter: function(thing) { + return moment(thing); + }, + tooltipFormatter: function(d) { + return d; + }, +}; diff --git a/src/plugins/vis_type_vislib/public/fixtures/mock_data/date_histogram/_series_pos_neg.js b/src/plugins/vis_type_vislib/public/fixtures/mock_data/date_histogram/_series_pos_neg.js new file mode 100644 index 00000000000000..65821ac58eb0db --- /dev/null +++ b/src/plugins/vis_type_vislib/public/fixtures/mock_data/date_histogram/_series_pos_neg.js @@ -0,0 +1,203 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import moment from 'moment'; + +export default { + label: '', + xAxisLabel: '@timestamp per 30 sec', + ordered: { + date: true, + min: 1411761457636, + max: 1411762357636, + interval: 30000, + }, + yAxisLabel: 'Count of documents', + series: [ + { + label: 'Count', + values: [ + { + x: 1411761450000, + y: 41, + }, + { + x: 1411761480000, + y: 18, + }, + { + x: 1411761510000, + y: -22, + }, + { + x: 1411761540000, + y: -17, + }, + { + x: 1411761570000, + y: -17, + }, + { + x: 1411761600000, + y: -21, + }, + { + x: 1411761630000, + y: -16, + }, + { + x: 1411761660000, + y: 17, + }, + { + x: 1411761690000, + y: 15, + }, + { + x: 1411761720000, + y: 19, + }, + { + x: 1411761750000, + y: 11, + }, + { + x: 1411761780000, + y: -13, + }, + { + x: 1411761810000, + y: -24, + }, + { + x: 1411761840000, + y: -20, + }, + { + x: 1411761870000, + y: -20, + }, + { + x: 1411761900000, + y: -21, + }, + { + x: 1411761930000, + y: 17, + }, + { + x: 1411761960000, + y: 20, + }, + { + x: 1411761990000, + y: -13, + }, + { + x: 1411762020000, + y: -14, + }, + { + x: 1411762050000, + y: 25, + }, + { + x: 1411762080000, + y: -17, + }, + { + x: 1411762110000, + y: -14, + }, + { + x: 1411762140000, + y: -22, + }, + { + x: 1411762170000, + y: -14, + }, + { + x: 1411762200000, + y: 19, + }, + { + x: 1411762230000, + y: 22, + }, + { + x: 1411762260000, + y: 17, + }, + { + x: 1411762290000, + y: 8, + }, + { + x: 1411762320000, + y: -15, + }, + { + x: 1411762350000, + y: -4, + }, + ], + }, + ], + hits: 533, + xAxisOrderedValues: [ + 1411761450000, + 1411761480000, + 1411761510000, + 1411761540000, + 1411761570000, + 1411761600000, + 1411761630000, + 1411761660000, + 1411761690000, + 1411761720000, + 1411761750000, + 1411761780000, + 1411761810000, + 1411761840000, + 1411761870000, + 1411761900000, + 1411761930000, + 1411761960000, + 1411761990000, + 1411762020000, + 1411762050000, + 1411762080000, + 1411762110000, + 1411762140000, + 1411762170000, + 1411762200000, + 1411762230000, + 1411762260000, + 1411762290000, + 1411762320000, + 1411762350000, + ], + xAxisFormatter: function(thing) { + return moment(thing); + }, + tooltipFormatter: function(d) { + return d; + }, +}; diff --git a/src/plugins/vis_type_vislib/public/fixtures/mock_data/date_histogram/_stacked_series.js b/src/plugins/vis_type_vislib/public/fixtures/mock_data/date_histogram/_stacked_series.js new file mode 100644 index 00000000000000..b6f731c9655d41 --- /dev/null +++ b/src/plugins/vis_type_vislib/public/fixtures/mock_data/date_histogram/_stacked_series.js @@ -0,0 +1,1576 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import moment from 'moment'; + +export default { + label: '', + xAxisLabel: '@timestamp per 10 min', + ordered: { + date: true, + min: 1413544140087, + max: 1413587340087, + interval: 600000, + }, + yAxisLabel: 'Count of documents', + series: [ + { + label: 'html', + values: [ + { + x: 1413543600000, + y: 140, + }, + { + x: 1413544200000, + y: 1388, + }, + { + x: 1413544800000, + y: 1308, + }, + { + x: 1413545400000, + y: 1356, + }, + { + x: 1413546000000, + y: 1314, + }, + { + x: 1413546600000, + y: 1343, + }, + { + x: 1413547200000, + y: 1353, + }, + { + x: 1413547800000, + y: 1353, + }, + { + x: 1413548400000, + y: 1334, + }, + { + x: 1413549000000, + y: 1433, + }, + { + x: 1413549600000, + y: 1331, + }, + { + x: 1413550200000, + y: 1349, + }, + { + x: 1413550800000, + y: 1323, + }, + { + x: 1413551400000, + y: 1203, + }, + { + x: 1413552000000, + y: 1231, + }, + { + x: 1413552600000, + y: 1227, + }, + { + x: 1413553200000, + y: 1187, + }, + { + x: 1413553800000, + y: 1119, + }, + { + x: 1413554400000, + y: 1159, + }, + { + x: 1413555000000, + y: 1117, + }, + { + x: 1413555600000, + y: 1152, + }, + { + x: 1413556200000, + y: 1057, + }, + { + x: 1413556800000, + y: 1009, + }, + { + x: 1413557400000, + y: 979, + }, + { + x: 1413558000000, + y: 975, + }, + { + x: 1413558600000, + y: 848, + }, + { + x: 1413559200000, + y: 873, + }, + { + x: 1413559800000, + y: 808, + }, + { + x: 1413560400000, + y: 784, + }, + { + x: 1413561000000, + y: 799, + }, + { + x: 1413561600000, + y: 684, + }, + { + x: 1413562200000, + y: 727, + }, + { + x: 1413562800000, + y: 621, + }, + { + x: 1413563400000, + y: 615, + }, + { + x: 1413564000000, + y: 569, + }, + { + x: 1413564600000, + y: 523, + }, + { + x: 1413565200000, + y: 474, + }, + { + x: 1413565800000, + y: 470, + }, + { + x: 1413566400000, + y: 466, + }, + { + x: 1413567000000, + y: 394, + }, + { + x: 1413567600000, + y: 404, + }, + { + x: 1413568200000, + y: 389, + }, + { + x: 1413568800000, + y: 312, + }, + { + x: 1413569400000, + y: 274, + }, + { + x: 1413570000000, + y: 285, + }, + { + x: 1413570600000, + y: 299, + }, + { + x: 1413571200000, + y: 207, + }, + { + x: 1413571800000, + y: 213, + }, + { + x: 1413572400000, + y: 119, + }, + { + x: 1413573600000, + y: 122, + }, + { + x: 1413574200000, + y: 169, + }, + { + x: 1413574800000, + y: 151, + }, + { + x: 1413575400000, + y: 152, + }, + { + x: 1413576000000, + y: 115, + }, + { + x: 1413576600000, + y: 117, + }, + { + x: 1413577200000, + y: 108, + }, + { + x: 1413577800000, + y: 100, + }, + { + x: 1413578400000, + y: 78, + }, + { + x: 1413579000000, + y: 88, + }, + { + x: 1413579600000, + y: 63, + }, + { + x: 1413580200000, + y: 58, + }, + { + x: 1413580800000, + y: 45, + }, + { + x: 1413581400000, + y: 57, + }, + { + x: 1413582000000, + y: 34, + }, + { + x: 1413582600000, + y: 41, + }, + { + x: 1413583200000, + y: 24, + }, + { + x: 1413583800000, + y: 27, + }, + { + x: 1413584400000, + y: 19, + }, + { + x: 1413585000000, + y: 24, + }, + { + x: 1413585600000, + y: 18, + }, + { + x: 1413586200000, + y: 17, + }, + { + x: 1413586800000, + y: 14, + }, + ], + }, + { + label: 'php', + values: [ + { + x: 1413543600000, + y: 90, + }, + { + x: 1413544200000, + y: 949, + }, + { + x: 1413544800000, + y: 1012, + }, + { + x: 1413545400000, + y: 1027, + }, + { + x: 1413546000000, + y: 1073, + }, + { + x: 1413546600000, + y: 992, + }, + { + x: 1413547200000, + y: 1005, + }, + { + x: 1413547800000, + y: 1014, + }, + { + x: 1413548400000, + y: 987, + }, + { + x: 1413549000000, + y: 982, + }, + { + x: 1413549600000, + y: 1086, + }, + { + x: 1413550200000, + y: 998, + }, + { + x: 1413550800000, + y: 935, + }, + { + x: 1413551400000, + y: 995, + }, + { + x: 1413552000000, + y: 926, + }, + { + x: 1413552600000, + y: 897, + }, + { + x: 1413553200000, + y: 873, + }, + { + x: 1413553800000, + y: 885, + }, + { + x: 1413554400000, + y: 859, + }, + { + x: 1413555000000, + y: 852, + }, + { + x: 1413555600000, + y: 779, + }, + { + x: 1413556200000, + y: 739, + }, + { + x: 1413556800000, + y: 783, + }, + { + x: 1413557400000, + y: 784, + }, + { + x: 1413558000000, + y: 687, + }, + { + x: 1413558600000, + y: 660, + }, + { + x: 1413559200000, + y: 672, + }, + { + x: 1413559800000, + y: 600, + }, + { + x: 1413560400000, + y: 659, + }, + { + x: 1413561000000, + y: 540, + }, + { + x: 1413561600000, + y: 539, + }, + { + x: 1413562200000, + y: 481, + }, + { + x: 1413562800000, + y: 498, + }, + { + x: 1413563400000, + y: 444, + }, + { + x: 1413564000000, + y: 452, + }, + { + x: 1413564600000, + y: 408, + }, + { + x: 1413565200000, + y: 358, + }, + { + x: 1413565800000, + y: 321, + }, + { + x: 1413566400000, + y: 305, + }, + { + x: 1413567000000, + y: 292, + }, + { + x: 1413567600000, + y: 289, + }, + { + x: 1413568200000, + y: 239, + }, + { + x: 1413568800000, + y: 256, + }, + { + x: 1413569400000, + y: 220, + }, + { + x: 1413570000000, + y: 205, + }, + { + x: 1413570600000, + y: 201, + }, + { + x: 1413571200000, + y: 183, + }, + { + x: 1413571800000, + y: 172, + }, + { + x: 1413572400000, + y: 73, + }, + { + x: 1413573600000, + y: 90, + }, + { + x: 1413574200000, + y: 130, + }, + { + x: 1413574800000, + y: 104, + }, + { + x: 1413575400000, + y: 108, + }, + { + x: 1413576000000, + y: 92, + }, + { + x: 1413576600000, + y: 79, + }, + { + x: 1413577200000, + y: 90, + }, + { + x: 1413577800000, + y: 72, + }, + { + x: 1413578400000, + y: 68, + }, + { + x: 1413579000000, + y: 52, + }, + { + x: 1413579600000, + y: 60, + }, + { + x: 1413580200000, + y: 51, + }, + { + x: 1413580800000, + y: 32, + }, + { + x: 1413581400000, + y: 37, + }, + { + x: 1413582000000, + y: 30, + }, + { + x: 1413582600000, + y: 29, + }, + { + x: 1413583200000, + y: 24, + }, + { + x: 1413583800000, + y: 16, + }, + { + x: 1413584400000, + y: 15, + }, + { + x: 1413585000000, + y: 15, + }, + { + x: 1413585600000, + y: 10, + }, + { + x: 1413586200000, + y: 9, + }, + { + x: 1413586800000, + y: 9, + }, + ], + }, + { + label: 'png', + values: [ + { + x: 1413543600000, + y: 44, + }, + { + x: 1413544200000, + y: 495, + }, + { + x: 1413544800000, + y: 489, + }, + { + x: 1413545400000, + y: 492, + }, + { + x: 1413546000000, + y: 556, + }, + { + x: 1413546600000, + y: 536, + }, + { + x: 1413547200000, + y: 511, + }, + { + x: 1413547800000, + y: 479, + }, + { + x: 1413548400000, + y: 544, + }, + { + x: 1413549000000, + y: 513, + }, + { + x: 1413549600000, + y: 501, + }, + { + x: 1413550200000, + y: 532, + }, + { + x: 1413550800000, + y: 440, + }, + { + x: 1413551400000, + y: 455, + }, + { + x: 1413552000000, + y: 455, + }, + { + x: 1413552600000, + y: 471, + }, + { + x: 1413553200000, + y: 428, + }, + { + x: 1413553800000, + y: 457, + }, + { + x: 1413554400000, + y: 450, + }, + { + x: 1413555000000, + y: 418, + }, + { + x: 1413555600000, + y: 398, + }, + { + x: 1413556200000, + y: 397, + }, + { + x: 1413556800000, + y: 359, + }, + { + x: 1413557400000, + y: 398, + }, + { + x: 1413558000000, + y: 339, + }, + { + x: 1413558600000, + y: 363, + }, + { + x: 1413559200000, + y: 297, + }, + { + x: 1413559800000, + y: 323, + }, + { + x: 1413560400000, + y: 302, + }, + { + x: 1413561000000, + y: 260, + }, + { + x: 1413561600000, + y: 276, + }, + { + x: 1413562200000, + y: 249, + }, + { + x: 1413562800000, + y: 248, + }, + { + x: 1413563400000, + y: 235, + }, + { + x: 1413564000000, + y: 234, + }, + { + x: 1413564600000, + y: 188, + }, + { + x: 1413565200000, + y: 192, + }, + { + x: 1413565800000, + y: 173, + }, + { + x: 1413566400000, + y: 160, + }, + { + x: 1413567000000, + y: 137, + }, + { + x: 1413567600000, + y: 158, + }, + { + x: 1413568200000, + y: 111, + }, + { + x: 1413568800000, + y: 145, + }, + { + x: 1413569400000, + y: 118, + }, + { + x: 1413570000000, + y: 104, + }, + { + x: 1413570600000, + y: 80, + }, + { + x: 1413571200000, + y: 79, + }, + { + x: 1413571800000, + y: 86, + }, + { + x: 1413572400000, + y: 47, + }, + { + x: 1413573600000, + y: 49, + }, + { + x: 1413574200000, + y: 68, + }, + { + x: 1413574800000, + y: 78, + }, + { + x: 1413575400000, + y: 77, + }, + { + x: 1413576000000, + y: 50, + }, + { + x: 1413576600000, + y: 51, + }, + { + x: 1413577200000, + y: 40, + }, + { + x: 1413577800000, + y: 42, + }, + { + x: 1413578400000, + y: 29, + }, + { + x: 1413579000000, + y: 24, + }, + { + x: 1413579600000, + y: 30, + }, + { + x: 1413580200000, + y: 18, + }, + { + x: 1413580800000, + y: 15, + }, + { + x: 1413581400000, + y: 19, + }, + { + x: 1413582000000, + y: 18, + }, + { + x: 1413582600000, + y: 13, + }, + { + x: 1413583200000, + y: 11, + }, + { + x: 1413583800000, + y: 11, + }, + { + x: 1413584400000, + y: 13, + }, + { + x: 1413585000000, + y: 9, + }, + { + x: 1413585600000, + y: 9, + }, + { + x: 1413586200000, + y: 9, + }, + { + x: 1413586800000, + y: 3, + }, + ], + }, + { + label: 'css', + values: [ + { + x: 1413543600000, + y: 35, + }, + { + x: 1413544200000, + y: 360, + }, + { + x: 1413544800000, + y: 343, + }, + { + x: 1413545400000, + y: 329, + }, + { + x: 1413546000000, + y: 345, + }, + { + x: 1413546600000, + y: 336, + }, + { + x: 1413547200000, + y: 330, + }, + { + x: 1413547800000, + y: 334, + }, + { + x: 1413548400000, + y: 326, + }, + { + x: 1413549000000, + y: 351, + }, + { + x: 1413549600000, + y: 334, + }, + { + x: 1413550200000, + y: 351, + }, + { + x: 1413550800000, + y: 337, + }, + { + x: 1413551400000, + y: 306, + }, + { + x: 1413552000000, + y: 346, + }, + { + x: 1413552600000, + y: 317, + }, + { + x: 1413553200000, + y: 298, + }, + { + x: 1413553800000, + y: 288, + }, + { + x: 1413554400000, + y: 283, + }, + { + x: 1413555000000, + y: 262, + }, + { + x: 1413555600000, + y: 245, + }, + { + x: 1413556200000, + y: 259, + }, + { + x: 1413556800000, + y: 267, + }, + { + x: 1413557400000, + y: 230, + }, + { + x: 1413558000000, + y: 218, + }, + { + x: 1413558600000, + y: 241, + }, + { + x: 1413559200000, + y: 213, + }, + { + x: 1413559800000, + y: 239, + }, + { + x: 1413560400000, + y: 208, + }, + { + x: 1413561000000, + y: 187, + }, + { + x: 1413561600000, + y: 166, + }, + { + x: 1413562200000, + y: 154, + }, + { + x: 1413562800000, + y: 184, + }, + { + x: 1413563400000, + y: 148, + }, + { + x: 1413564000000, + y: 153, + }, + { + x: 1413564600000, + y: 149, + }, + { + x: 1413565200000, + y: 102, + }, + { + x: 1413565800000, + y: 110, + }, + { + x: 1413566400000, + y: 121, + }, + { + x: 1413567000000, + y: 120, + }, + { + x: 1413567600000, + y: 86, + }, + { + x: 1413568200000, + y: 96, + }, + { + x: 1413568800000, + y: 71, + }, + { + x: 1413569400000, + y: 92, + }, + { + x: 1413570000000, + y: 65, + }, + { + x: 1413570600000, + y: 54, + }, + { + x: 1413571200000, + y: 68, + }, + { + x: 1413571800000, + y: 57, + }, + { + x: 1413572400000, + y: 33, + }, + { + x: 1413573600000, + y: 47, + }, + { + x: 1413574200000, + y: 42, + }, + { + x: 1413574800000, + y: 39, + }, + { + x: 1413575400000, + y: 25, + }, + { + x: 1413576000000, + y: 31, + }, + { + x: 1413576600000, + y: 37, + }, + { + x: 1413577200000, + y: 35, + }, + { + x: 1413577800000, + y: 19, + }, + { + x: 1413578400000, + y: 15, + }, + { + x: 1413579000000, + y: 21, + }, + { + x: 1413579600000, + y: 16, + }, + { + x: 1413580200000, + y: 18, + }, + { + x: 1413580800000, + y: 10, + }, + { + x: 1413581400000, + y: 13, + }, + { + x: 1413582000000, + y: 14, + }, + { + x: 1413582600000, + y: 11, + }, + { + x: 1413583200000, + y: 4, + }, + { + x: 1413583800000, + y: 6, + }, + { + x: 1413584400000, + y: 3, + }, + { + x: 1413585000000, + y: 6, + }, + { + x: 1413585600000, + y: 6, + }, + { + x: 1413586200000, + y: 2, + }, + { + x: 1413586800000, + y: 3, + }, + ], + }, + { + label: 'gif', + values: [ + { + x: 1413543600000, + y: 21, + }, + { + x: 1413544200000, + y: 191, + }, + { + x: 1413544800000, + y: 176, + }, + { + x: 1413545400000, + y: 166, + }, + { + x: 1413546000000, + y: 183, + }, + { + x: 1413546600000, + y: 170, + }, + { + x: 1413547200000, + y: 153, + }, + { + x: 1413547800000, + y: 202, + }, + { + x: 1413548400000, + y: 175, + }, + { + x: 1413549000000, + y: 161, + }, + { + x: 1413549600000, + y: 174, + }, + { + x: 1413550200000, + y: 167, + }, + { + x: 1413550800000, + y: 171, + }, + { + x: 1413551400000, + y: 176, + }, + { + x: 1413552000000, + y: 139, + }, + { + x: 1413552600000, + y: 145, + }, + { + x: 1413553200000, + y: 157, + }, + { + x: 1413553800000, + y: 148, + }, + { + x: 1413554400000, + y: 149, + }, + { + x: 1413555000000, + y: 135, + }, + { + x: 1413555600000, + y: 118, + }, + { + x: 1413556200000, + y: 142, + }, + { + x: 1413556800000, + y: 141, + }, + { + x: 1413557400000, + y: 146, + }, + { + x: 1413558000000, + y: 114, + }, + { + x: 1413558600000, + y: 115, + }, + { + x: 1413559200000, + y: 136, + }, + { + x: 1413559800000, + y: 106, + }, + { + x: 1413560400000, + y: 92, + }, + { + x: 1413561000000, + y: 97, + }, + { + x: 1413561600000, + y: 90, + }, + { + x: 1413562200000, + y: 69, + }, + { + x: 1413562800000, + y: 66, + }, + { + x: 1413563400000, + y: 93, + }, + { + x: 1413564000000, + y: 75, + }, + { + x: 1413564600000, + y: 68, + }, + { + x: 1413565200000, + y: 55, + }, + { + x: 1413565800000, + y: 73, + }, + { + x: 1413566400000, + y: 57, + }, + { + x: 1413567000000, + y: 48, + }, + { + x: 1413567600000, + y: 41, + }, + { + x: 1413568200000, + y: 39, + }, + { + x: 1413568800000, + y: 32, + }, + { + x: 1413569400000, + y: 33, + }, + { + x: 1413570000000, + y: 39, + }, + { + x: 1413570600000, + y: 35, + }, + { + x: 1413571200000, + y: 25, + }, + { + x: 1413571800000, + y: 28, + }, + { + x: 1413572400000, + y: 8, + }, + { + x: 1413573600000, + y: 13, + }, + { + x: 1413574200000, + y: 23, + }, + { + x: 1413574800000, + y: 19, + }, + { + x: 1413575400000, + y: 16, + }, + { + x: 1413576000000, + y: 22, + }, + { + x: 1413576600000, + y: 13, + }, + { + x: 1413577200000, + y: 21, + }, + { + x: 1413577800000, + y: 11, + }, + { + x: 1413578400000, + y: 12, + }, + { + x: 1413579000000, + y: 10, + }, + { + x: 1413579600000, + y: 7, + }, + { + x: 1413580200000, + y: 4, + }, + { + x: 1413580800000, + y: 5, + }, + { + x: 1413581400000, + y: 7, + }, + { + x: 1413582000000, + y: 9, + }, + { + x: 1413582600000, + y: 2, + }, + { + x: 1413583200000, + y: 2, + }, + { + x: 1413583800000, + y: 4, + }, + { + x: 1413584400000, + y: 6, + }, + { + x: 1413585600000, + y: 2, + }, + { + x: 1413586200000, + y: 4, + }, + { + x: 1413586800000, + y: 4, + }, + ], + }, + ], + hits: 108970, + xAxisOrderedValues: [ + 1413543600000, + 1413544200000, + 1413544800000, + 1413545400000, + 1413546000000, + 1413546600000, + 1413547200000, + 1413547800000, + 1413548400000, + 1413549000000, + 1413549600000, + 1413550200000, + 1413550800000, + 1413551400000, + 1413552000000, + 1413552600000, + 1413553200000, + 1413553800000, + 1413554400000, + 1413555000000, + 1413555600000, + 1413556200000, + 1413556800000, + 1413557400000, + 1413558000000, + 1413558600000, + 1413559200000, + 1413559800000, + 1413560400000, + 1413561000000, + 1413561600000, + 1413562200000, + 1413562800000, + 1413563400000, + 1413564000000, + 1413564600000, + 1413565200000, + 1413565800000, + 1413566400000, + 1413567000000, + 1413567600000, + 1413568200000, + 1413568800000, + 1413569400000, + 1413570000000, + 1413570600000, + 1413571200000, + 1413571800000, + 1413572400000, + 1413573600000, + 1413574200000, + 1413574800000, + 1413575400000, + 1413576000000, + 1413576600000, + 1413577200000, + 1413577800000, + 1413578400000, + 1413579000000, + 1413579600000, + 1413580200000, + 1413580800000, + 1413581400000, + 1413582000000, + 1413582600000, + 1413583200000, + 1413583800000, + 1413584400000, + 1413585000000, + 1413585600000, + 1413586200000, + 1413586800000, + ], + xAxisFormatter: function(thing) { + return moment(thing); + }, + tooltipFormatter: function(d) { + return d; + }, +}; diff --git a/src/plugins/vis_type_vislib/public/fixtures/mock_data/filters/_columns.js b/src/plugins/vis_type_vislib/public/fixtures/mock_data/filters/_columns.js new file mode 100644 index 00000000000000..8144a996e3424b --- /dev/null +++ b/src/plugins/vis_type_vislib/public/fixtures/mock_data/filters/_columns.js @@ -0,0 +1,127 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import _ from 'lodash'; + +export default { + columns: [ + { + label: 'Mozilla/5.0 (X11; Linux x86_64; rv:6.0a1) Gecko/20110421 Firefox/6.0a1: agent.raw', + xAxisLabel: 'filters', + yAxisLabel: 'Count of documents', + series: [ + { + label: 'Count', + values: [ + { + x: 'css', + y: 10379, + }, + { + x: 'png', + y: 6395, + }, + ], + }, + ], + xAxisOrderedValues: ['css', 'png'], + xAxisFormatter: function(val) { + if (_.isObject(val)) { + return JSON.stringify(val); + } else if (val == null) { + return ''; + } else { + return '' + val; + } + }, + tooltipFormatter: function(d) { + return d; + }, + }, + { + label: + 'Mozilla/5.0 (X11; Linux i686) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.50 Safari/534.24: agent.raw', + xAxisLabel: 'filters', + yAxisLabel: 'Count of documents', + series: [ + { + label: 'Count', + values: [ + { + x: 'css', + y: 9253, + }, + { + x: 'png', + y: 5571, + }, + ], + }, + ], + xAxisOrderedValues: ['css', 'png'], + xAxisFormatter: function(val) { + if (_.isObject(val)) { + return JSON.stringify(val); + } else if (val == null) { + return ''; + } else { + return '' + val; + } + }, + tooltipFormatter: function(d) { + return d; + }, + }, + { + label: + 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322): agent.raw', + xAxisLabel: 'filters', + yAxisLabel: 'Count of documents', + series: [ + { + label: 'Count', + values: [ + { + x: 'css', + y: 7740, + }, + { + x: 'png', + y: 4697, + }, + ], + }, + ], + xAxisOrderedValues: ['css', 'png'], + xAxisFormatter: function(val) { + if (_.isObject(val)) { + return JSON.stringify(val); + } else if (val == null) { + return ''; + } else { + return '' + val; + } + }, + tooltipFormatter: function(d) { + return d; + }, + }, + ], + hits: 171443, +}; diff --git a/src/plugins/vis_type_vislib/public/fixtures/mock_data/filters/_rows.js b/src/plugins/vis_type_vislib/public/fixtures/mock_data/filters/_rows.js new file mode 100644 index 00000000000000..e783246972e4a6 --- /dev/null +++ b/src/plugins/vis_type_vislib/public/fixtures/mock_data/filters/_rows.js @@ -0,0 +1,122 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import _ from 'lodash'; + +export default { + rows: [ + { + label: '200: response', + xAxisLabel: 'filters', + yAxisLabel: 'Count of documents', + series: [ + { + label: 'Count', + values: [ + { + x: 'css', + y: 25260, + }, + { + x: 'png', + y: 15311, + }, + ], + }, + ], + xAxisFormatter: function(val) { + if (_.isObject(val)) { + return JSON.stringify(val); + } else if (val == null) { + return ''; + } else { + return '' + val; + } + }, + tooltipFormatter: function(d) { + return d; + }, + }, + { + label: '404: response', + xAxisLabel: 'filters', + yAxisLabel: 'Count of documents', + series: [ + { + label: 'Count', + values: [ + { + x: 'css', + y: 1352, + }, + { + x: 'png', + y: 826, + }, + ], + }, + ], + xAxisFormatter: function(val) { + if (_.isObject(val)) { + return JSON.stringify(val); + } else if (val == null) { + return ''; + } else { + return '' + val; + } + }, + tooltipFormatter: function(d) { + return d; + }, + }, + { + label: '503: response', + xAxisLabel: 'filters', + yAxisLabel: 'Count of documents', + series: [ + { + label: 'Count', + values: [ + { + x: 'css', + y: 761, + }, + { + x: 'png', + y: 527, + }, + ], + }, + ], + xAxisFormatter: function(val) { + if (_.isObject(val)) { + return JSON.stringify(val); + } else if (val == null) { + return ''; + } else { + return '' + val; + } + }, + tooltipFormatter: function(d) { + return d; + }, + }, + ], + hits: 171443, +}; diff --git a/src/plugins/vis_type_vislib/public/fixtures/mock_data/filters/_series.js b/src/plugins/vis_type_vislib/public/fixtures/mock_data/filters/_series.js new file mode 100644 index 00000000000000..71ee039f989383 --- /dev/null +++ b/src/plugins/vis_type_vislib/public/fixtures/mock_data/filters/_series.js @@ -0,0 +1,59 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import _ from 'lodash'; + +export default { + label: '', + xAxisLabel: 'filters', + yAxisLabel: 'Count of documents', + series: [ + { + label: 'Count', + values: [ + { + x: 'css', + y: 27374, + }, + { + x: 'html', + y: 0, + }, + { + x: 'png', + y: 16663, + }, + ], + }, + ], + hits: 171454, + xAxisOrderedValues: ['css', 'html', 'png'], + xAxisFormatter: function(val) { + if (_.isObject(val)) { + return JSON.stringify(val); + } else if (val == null) { + return ''; + } else { + return '' + val; + } + }, + tooltipFormatter: function(d) { + return d; + }, +}; diff --git a/src/plugins/vis_type_vislib/public/fixtures/mock_data/geohash/_columns.js b/src/plugins/vis_type_vislib/public/fixtures/mock_data/geohash/_columns.js new file mode 100644 index 00000000000000..c1044160c0e7a6 --- /dev/null +++ b/src/plugins/vis_type_vislib/public/fixtures/mock_data/geohash/_columns.js @@ -0,0 +1,2918 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import _ from 'lodash'; + +export default { + columns: [ + { + title: 'Top 2 geo.dest: CN', + valueFormatter: _.identity, + geoJson: { + type: 'FeatureCollection', + features: [ + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [22.5, 22.5], + }, + properties: { + value: 42, + geohash: 's', + center: [22.5, 22.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'CN', + value: 'CN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: false, + }, + }, + type: 'bucket', + }, + key: 's', + value: 's', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 42, + value: 42, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [0, 0], + [45, 0], + [45, 45], + [0, 45], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [-67.5, 22.5], + }, + properties: { + value: 31, + geohash: 'd', + center: [-67.5, 22.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'CN', + value: 'CN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: false, + }, + }, + type: 'bucket', + }, + key: 'd', + value: 'd', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 31, + value: 31, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [-90, 0], + [-45, 0], + [-45, 45], + [-90, 45], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [112.5, 22.5], + }, + properties: { + value: 30, + geohash: 'w', + center: [112.5, 22.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'CN', + value: 'CN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: false, + }, + }, + type: 'bucket', + }, + key: 'w', + value: 'w', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 30, + value: 30, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [90, 0], + [135, 0], + [135, 45], + [90, 45], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [-112.5, 22.5], + }, + properties: { + value: 25, + geohash: '9', + center: [-112.5, 22.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'CN', + value: 'CN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: false, + }, + }, + type: 'bucket', + }, + key: '9', + value: '9', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 25, + value: 25, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [-135, 0], + [-90, 0], + [-90, 45], + [-135, 45], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [67.5, 22.5], + }, + properties: { + value: 22, + geohash: 't', + center: [67.5, 22.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'CN', + value: 'CN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: false, + }, + }, + type: 'bucket', + }, + key: 't', + value: 't', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 22, + value: 22, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [45, 0], + [90, 0], + [90, 45], + [45, 45], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [22.5, -22.5], + }, + properties: { + value: 22, + geohash: 'k', + center: [22.5, -22.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'CN', + value: 'CN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: false, + }, + }, + type: 'bucket', + }, + key: 'k', + value: 'k', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 22, + value: 22, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [0, -45], + [45, -45], + [45, 0], + [0, 0], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [-67.5, -22.5], + }, + properties: { + value: 21, + geohash: '6', + center: [-67.5, -22.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'CN', + value: 'CN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: false, + }, + }, + type: 'bucket', + }, + key: '6', + value: '6', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 21, + value: 21, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [-90, -45], + [-45, -45], + [-45, 0], + [-90, 0], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [22.5, 67.5], + }, + properties: { + value: 19, + geohash: 'u', + center: [22.5, 67.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'CN', + value: 'CN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: false, + }, + }, + type: 'bucket', + }, + key: 'u', + value: 'u', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 19, + value: 19, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [0, 45], + [45, 45], + [45, 90], + [0, 90], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [67.5, 67.5], + }, + properties: { + value: 18, + geohash: 'v', + center: [67.5, 67.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'CN', + value: 'CN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: false, + }, + }, + type: 'bucket', + }, + key: 'v', + value: 'v', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 18, + value: 18, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [45, 45], + [90, 45], + [90, 90], + [45, 90], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [-112.5, 67.5], + }, + properties: { + value: 11, + geohash: 'c', + center: [-112.5, 67.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'CN', + value: 'CN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: false, + }, + }, + type: 'bucket', + }, + key: 'c', + value: 'c', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 11, + value: 11, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [-135, 45], + [-90, 45], + [-90, 90], + [-135, 90], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [157.5, -22.5], + }, + properties: { + value: 10, + geohash: 'r', + center: [157.5, -22.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'CN', + value: 'CN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: false, + }, + }, + type: 'bucket', + }, + key: 'r', + value: 'r', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 10, + value: 10, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [135, -45], + [180, -45], + [180, 0], + [135, 0], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [112.5, 67.5], + }, + properties: { + value: 9, + geohash: 'y', + center: [112.5, 67.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'CN', + value: 'CN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: false, + }, + }, + type: 'bucket', + }, + key: 'y', + value: 'y', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 9, + value: 9, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [90, 45], + [135, 45], + [135, 90], + [90, 90], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [-22.5, 22.5], + }, + properties: { + value: 9, + geohash: 'e', + center: [-22.5, 22.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'CN', + value: 'CN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: false, + }, + }, + type: 'bucket', + }, + key: 'e', + value: 'e', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 9, + value: 9, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [-45, 0], + [0, 0], + [0, 45], + [-45, 45], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [-67.5, 67.5], + }, + properties: { + value: 8, + geohash: 'f', + center: [-67.5, 67.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'CN', + value: 'CN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: false, + }, + }, + type: 'bucket', + }, + key: 'f', + value: 'f', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 8, + value: 8, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [-90, 45], + [-45, 45], + [-45, 90], + [-90, 90], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [-22.5, -22.5], + }, + properties: { + value: 8, + geohash: '7', + center: [-22.5, -22.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'CN', + value: 'CN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: false, + }, + }, + type: 'bucket', + }, + key: '7', + value: '7', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 8, + value: 8, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [-45, -45], + [0, -45], + [0, 0], + [-45, 0], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [112.5, -22.5], + }, + properties: { + value: 6, + geohash: 'q', + center: [112.5, -22.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'CN', + value: 'CN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: false, + }, + }, + type: 'bucket', + }, + key: 'q', + value: 'q', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 6, + value: 6, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [90, -45], + [135, -45], + [135, 0], + [90, 0], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [-22.5, 67.5], + }, + properties: { + value: 6, + geohash: 'g', + center: [-22.5, 67.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'CN', + value: 'CN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: false, + }, + }, + type: 'bucket', + }, + key: 'g', + value: 'g', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 6, + value: 6, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [-45, 45], + [0, 45], + [0, 90], + [-45, 90], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [157.5, 22.5], + }, + properties: { + value: 4, + geohash: 'x', + center: [157.5, 22.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'CN', + value: 'CN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: false, + }, + }, + type: 'bucket', + }, + key: 'x', + value: 'x', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 4, + value: 4, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [135, 0], + [180, 0], + [180, 45], + [135, 45], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [-157.5, 67.5], + }, + properties: { + value: 3, + geohash: 'b', + center: [-157.5, 67.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'CN', + value: 'CN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: false, + }, + }, + type: 'bucket', + }, + key: 'b', + value: 'b', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 3, + value: 3, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [-180, 45], + [-135, 45], + [-135, 90], + [-180, 90], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [157.5, 67.5], + }, + properties: { + value: 2, + geohash: 'z', + center: [157.5, 67.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'CN', + value: 'CN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: false, + }, + }, + type: 'bucket', + }, + key: 'z', + value: 'z', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 2, + value: 2, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [135, 45], + [180, 45], + [180, 90], + [135, 90], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [67.5, -22.5], + }, + properties: { + value: 1, + geohash: 'm', + center: [67.5, -22.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'CN', + value: 'CN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: false, + }, + }, + type: 'bucket', + }, + key: 'm', + value: 'm', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 1, + value: 1, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [45, -45], + [90, -45], + [90, 0], + [45, 0], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [-22.5, -67.5], + }, + properties: { + value: 1, + geohash: '5', + center: [-22.5, -67.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'CN', + value: 'CN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: false, + }, + }, + type: 'bucket', + }, + key: '5', + value: '5', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 1, + value: 1, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [-45, -90], + [0, -90], + [0, -45], + [-45, -45], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [-67.5, -67.5], + }, + properties: { + value: 1, + geohash: '4', + center: [-67.5, -67.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'CN', + value: 'CN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: false, + }, + }, + type: 'bucket', + }, + key: '4', + value: '4', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 1, + value: 1, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [-90, -90], + [-45, -90], + [-45, -45], + [-90, -45], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [-112.5, -22.5], + }, + properties: { + value: 1, + geohash: '3', + center: [-112.5, -22.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'CN', + value: 'CN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: false, + }, + }, + type: 'bucket', + }, + key: '3', + value: '3', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 1, + value: 1, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [-135, -45], + [-90, -45], + [-90, 0], + [-135, 0], + ], + }, + }, + ], + properties: { + min: 1, + max: 42, + }, + }, + }, + { + label: 'Top 2 geo.dest: IN', + valueFormatter: _.identity, + geoJson: { + type: 'FeatureCollection', + features: [ + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [22.5, 22.5], + }, + properties: { + value: 32, + geohash: 's', + center: [22.5, 22.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'IN', + value: 'IN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: false, + }, + }, + type: 'bucket', + }, + key: 's', + value: 's', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 32, + value: 32, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [0, 0], + [45, 0], + [45, 45], + [0, 45], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [-67.5, -22.5], + }, + properties: { + value: 31, + geohash: '6', + center: [-67.5, -22.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'IN', + value: 'IN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: false, + }, + }, + type: 'bucket', + }, + key: '6', + value: '6', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 31, + value: 31, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [-90, -45], + [-45, -45], + [-45, 0], + [-90, 0], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [-67.5, 22.5], + }, + properties: { + value: 28, + geohash: 'd', + center: [-67.5, 22.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'IN', + value: 'IN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: false, + }, + }, + type: 'bucket', + }, + key: 'd', + value: 'd', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 28, + value: 28, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [-90, 0], + [-45, 0], + [-45, 45], + [-90, 45], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [112.5, 22.5], + }, + properties: { + value: 27, + geohash: 'w', + center: [112.5, 22.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'IN', + value: 'IN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: false, + }, + }, + type: 'bucket', + }, + key: 'w', + value: 'w', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 27, + value: 27, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [90, 0], + [135, 0], + [135, 45], + [90, 45], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [67.5, 22.5], + }, + properties: { + value: 24, + geohash: 't', + center: [67.5, 22.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'IN', + value: 'IN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: false, + }, + }, + type: 'bucket', + }, + key: 't', + value: 't', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 24, + value: 24, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [45, 0], + [90, 0], + [90, 45], + [45, 45], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [22.5, -22.5], + }, + properties: { + value: 23, + geohash: 'k', + center: [22.5, -22.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'IN', + value: 'IN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: false, + }, + }, + type: 'bucket', + }, + key: 'k', + value: 'k', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 23, + value: 23, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [0, -45], + [45, -45], + [45, 0], + [0, 0], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [22.5, 67.5], + }, + properties: { + value: 17, + geohash: 'u', + center: [22.5, 67.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'IN', + value: 'IN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: false, + }, + }, + type: 'bucket', + }, + key: 'u', + value: 'u', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 17, + value: 17, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [0, 45], + [45, 45], + [45, 90], + [0, 90], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [-112.5, 22.5], + }, + properties: { + value: 16, + geohash: '9', + center: [-112.5, 22.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'IN', + value: 'IN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: false, + }, + }, + type: 'bucket', + }, + key: '9', + value: '9', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 16, + value: 16, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [-135, 0], + [-90, 0], + [-90, 45], + [-135, 45], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [67.5, 67.5], + }, + properties: { + value: 14, + geohash: 'v', + center: [67.5, 67.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'IN', + value: 'IN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: false, + }, + }, + type: 'bucket', + }, + key: 'v', + value: 'v', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 14, + value: 14, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [45, 45], + [90, 45], + [90, 90], + [45, 90], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [-22.5, 22.5], + }, + properties: { + value: 13, + geohash: 'e', + center: [-22.5, 22.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'IN', + value: 'IN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: false, + }, + }, + type: 'bucket', + }, + key: 'e', + value: 'e', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 13, + value: 13, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [-45, 0], + [0, 0], + [0, 45], + [-45, 45], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [157.5, -22.5], + }, + properties: { + value: 9, + geohash: 'r', + center: [157.5, -22.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'IN', + value: 'IN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: false, + }, + }, + type: 'bucket', + }, + key: 'r', + value: 'r', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 9, + value: 9, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [135, -45], + [180, -45], + [180, 0], + [135, 0], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [112.5, 67.5], + }, + properties: { + value: 6, + geohash: 'y', + center: [112.5, 67.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'IN', + value: 'IN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: false, + }, + }, + type: 'bucket', + }, + key: 'y', + value: 'y', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 6, + value: 6, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [90, 45], + [135, 45], + [135, 90], + [90, 90], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [-22.5, 67.5], + }, + properties: { + value: 6, + geohash: 'g', + center: [-22.5, 67.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'IN', + value: 'IN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: false, + }, + }, + type: 'bucket', + }, + key: 'g', + value: 'g', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 6, + value: 6, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [-45, 45], + [0, 45], + [0, 90], + [-45, 90], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [-67.5, 67.5], + }, + properties: { + value: 6, + geohash: 'f', + center: [-67.5, 67.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'IN', + value: 'IN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: false, + }, + }, + type: 'bucket', + }, + key: 'f', + value: 'f', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 6, + value: 6, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [-90, 45], + [-45, 45], + [-45, 90], + [-90, 90], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [-112.5, 67.5], + }, + properties: { + value: 5, + geohash: 'c', + center: [-112.5, 67.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'IN', + value: 'IN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: false, + }, + }, + type: 'bucket', + }, + key: 'c', + value: 'c', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 5, + value: 5, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [-135, 45], + [-90, 45], + [-90, 90], + [-135, 90], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [-157.5, 67.5], + }, + properties: { + value: 4, + geohash: 'b', + center: [-157.5, 67.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'IN', + value: 'IN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: false, + }, + }, + type: 'bucket', + }, + key: 'b', + value: 'b', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 4, + value: 4, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [-180, 45], + [-135, 45], + [-135, 90], + [-180, 90], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [112.5, -22.5], + }, + properties: { + value: 3, + geohash: 'q', + center: [112.5, -22.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'IN', + value: 'IN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: false, + }, + }, + type: 'bucket', + }, + key: 'q', + value: 'q', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 3, + value: 3, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [90, -45], + [135, -45], + [135, 0], + [90, 0], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [-67.5, -67.5], + }, + properties: { + value: 2, + geohash: '4', + center: [-67.5, -67.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'IN', + value: 'IN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: false, + }, + }, + type: 'bucket', + }, + key: '4', + value: '4', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 2, + value: 2, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [-90, -90], + [-45, -90], + [-45, -45], + [-90, -45], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [157.5, 67.5], + }, + properties: { + value: 1, + geohash: 'z', + center: [157.5, 67.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'IN', + value: 'IN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: false, + }, + }, + type: 'bucket', + }, + key: 'z', + value: 'z', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 1, + value: 1, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [135, 45], + [180, 45], + [180, 90], + [135, 90], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [157.5, 22.5], + }, + properties: { + value: 1, + geohash: 'x', + center: [157.5, 22.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'IN', + value: 'IN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: false, + }, + }, + type: 'bucket', + }, + key: 'x', + value: 'x', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 1, + value: 1, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [135, 0], + [180, 0], + [180, 45], + [135, 45], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [157.5, -67.5], + }, + properties: { + value: 1, + geohash: 'p', + center: [157.5, -67.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'IN', + value: 'IN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: false, + }, + }, + type: 'bucket', + }, + key: 'p', + value: 'p', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 1, + value: 1, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [135, -90], + [180, -90], + [180, -45], + [135, -45], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [67.5, -22.5], + }, + properties: { + value: 1, + geohash: 'm', + center: [67.5, -22.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'IN', + value: 'IN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: false, + }, + }, + type: 'bucket', + }, + key: 'm', + value: 'm', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 1, + value: 1, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [45, -45], + [90, -45], + [90, 0], + [45, 0], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [-22.5, -22.5], + }, + properties: { + value: 1, + geohash: '7', + center: [-22.5, -22.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'IN', + value: 'IN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: false, + }, + }, + type: 'bucket', + }, + key: '7', + value: '7', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 1, + value: 1, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [-45, -45], + [0, -45], + [0, 0], + [-45, 0], + ], + }, + }, + ], + properties: { + min: 1, + max: 32, + }, + }, + }, + ], +}; diff --git a/src/plugins/vis_type_vislib/public/fixtures/mock_data/geohash/_geo_json.js b/src/plugins/vis_type_vislib/public/fixtures/mock_data/geohash/_geo_json.js new file mode 100644 index 00000000000000..a26dc9bd8b181c --- /dev/null +++ b/src/plugins/vis_type_vislib/public/fixtures/mock_data/geohash/_geo_json.js @@ -0,0 +1,1326 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import _ from 'lodash'; + +export default { + valueFormatter: _.identity, + geohashGridAgg: { vis: { params: {} } }, + geoJson: { + type: 'FeatureCollection', + features: [ + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [22.5, 22.5], + }, + properties: { + value: 608, + geohash: 's', + center: [22.5, 22.5], + aggConfigResult: { + $parent: { + key: 's', + value: 's', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 608, + value: 608, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [0, 0], + [0, 45], + [45, 45], + [45, 0], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [112.5, 22.5], + }, + properties: { + value: 522, + geohash: 'w', + center: [112.5, 22.5], + aggConfigResult: { + $parent: { + key: 'w', + value: 'w', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 522, + value: 522, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [0, 90], + [0, 135], + [45, 135], + [45, 90], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [-67.5, -22.5], + }, + properties: { + value: 517, + geohash: '6', + center: [-67.5, -22.5], + aggConfigResult: { + $parent: { + key: '6', + value: '6', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 517, + value: 517, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [-45, -90], + [-45, -45], + [0, -45], + [0, -90], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [-67.5, 22.5], + }, + properties: { + value: 446, + geohash: 'd', + center: [-67.5, 22.5], + aggConfigResult: { + $parent: { + key: 'd', + value: 'd', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 446, + value: 446, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [0, -90], + [0, -45], + [45, -45], + [45, -90], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [22.5, 67.5], + }, + properties: { + value: 426, + geohash: 'u', + center: [22.5, 67.5], + aggConfigResult: { + $parent: { + key: 'u', + value: 'u', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 426, + value: 426, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [45, 0], + [45, 45], + [90, 45], + [90, 0], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [67.5, 22.5], + }, + properties: { + value: 413, + geohash: 't', + center: [67.5, 22.5], + aggConfigResult: { + $parent: { + key: 't', + value: 't', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 413, + value: 413, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [0, 45], + [0, 90], + [45, 90], + [45, 45], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [22.5, -22.5], + }, + properties: { + value: 362, + geohash: 'k', + center: [22.5, -22.5], + aggConfigResult: { + $parent: { + key: 'k', + value: 'k', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 362, + value: 362, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [-45, 0], + [-45, 45], + [0, 45], + [0, 0], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [-112.5, 22.5], + }, + properties: { + value: 352, + geohash: '9', + center: [-112.5, 22.5], + aggConfigResult: { + $parent: { + key: '9', + value: '9', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 352, + value: 352, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [0, -135], + [0, -90], + [45, -90], + [45, -135], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [-22.5, 22.5], + }, + properties: { + value: 216, + geohash: 'e', + center: [-22.5, 22.5], + aggConfigResult: { + $parent: { + key: 'e', + value: 'e', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 216, + value: 216, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [0, -45], + [0, 0], + [45, 0], + [45, -45], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [67.5, 67.5], + }, + properties: { + value: 183, + geohash: 'v', + center: [67.5, 67.5], + aggConfigResult: { + $parent: { + key: 'v', + value: 'v', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 183, + value: 183, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [45, 45], + [45, 90], + [90, 90], + [90, 45], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [157.5, -22.5], + }, + properties: { + value: 158, + geohash: 'r', + center: [157.5, -22.5], + aggConfigResult: { + $parent: { + key: 'r', + value: 'r', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 158, + value: 158, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [-45, 135], + [-45, 180], + [0, 180], + [0, 135], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [112.5, 67.5], + }, + properties: { + value: 139, + geohash: 'y', + center: [112.5, 67.5], + aggConfigResult: { + $parent: { + key: 'y', + value: 'y', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 139, + value: 139, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [45, 90], + [45, 135], + [90, 135], + [90, 90], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [-112.5, 67.5], + }, + properties: { + value: 110, + geohash: 'c', + center: [-112.5, 67.5], + aggConfigResult: { + $parent: { + key: 'c', + value: 'c', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 110, + value: 110, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [45, -135], + [45, -90], + [90, -90], + [90, -135], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [112.5, -22.5], + }, + properties: { + value: 101, + geohash: 'q', + center: [112.5, -22.5], + aggConfigResult: { + $parent: { + key: 'q', + value: 'q', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 101, + value: 101, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [-45, 90], + [-45, 135], + [0, 135], + [0, 90], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [-22.5, -22.5], + }, + properties: { + value: 101, + geohash: '7', + center: [-22.5, -22.5], + aggConfigResult: { + $parent: { + key: '7', + value: '7', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 101, + value: 101, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [-45, -45], + [-45, 0], + [0, 0], + [0, -45], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [-67.5, 67.5], + }, + properties: { + value: 92, + geohash: 'f', + center: [-67.5, 67.5], + aggConfigResult: { + $parent: { + key: 'f', + value: 'f', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 92, + value: 92, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [45, -90], + [45, -45], + [90, -45], + [90, -90], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [-157.5, 67.5], + }, + properties: { + value: 75, + geohash: 'b', + center: [-157.5, 67.5], + aggConfigResult: { + $parent: { + key: 'b', + value: 'b', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 75, + value: 75, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [45, -180], + [45, -135], + [90, -135], + [90, -180], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [-22.5, 67.5], + }, + properties: { + value: 64, + geohash: 'g', + center: [-22.5, 67.5], + aggConfigResult: { + $parent: { + key: 'g', + value: 'g', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 64, + value: 64, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [45, -45], + [45, 0], + [90, 0], + [90, -45], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [157.5, 67.5], + }, + properties: { + value: 36, + geohash: 'z', + center: [157.5, 67.5], + aggConfigResult: { + $parent: { + key: 'z', + value: 'z', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 36, + value: 36, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [45, 135], + [45, 180], + [90, 180], + [90, 135], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [157.5, 22.5], + }, + properties: { + value: 34, + geohash: 'x', + center: [157.5, 22.5], + aggConfigResult: { + $parent: { + key: 'x', + value: 'x', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 34, + value: 34, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [0, 135], + [0, 180], + [45, 180], + [45, 135], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [-67.5, -67.5], + }, + properties: { + value: 30, + geohash: '4', + center: [-67.5, -67.5], + aggConfigResult: { + $parent: { + key: '4', + value: '4', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 30, + value: 30, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [-90, -90], + [-90, -45], + [-45, -45], + [-45, -90], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [67.5, -22.5], + }, + properties: { + value: 16, + geohash: 'm', + center: [67.5, -22.5], + aggConfigResult: { + $parent: { + key: 'm', + value: 'm', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 16, + value: 16, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [-45, 45], + [-45, 90], + [0, 90], + [0, 45], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [-22.5, -67.5], + }, + properties: { + value: 10, + geohash: '5', + center: [-22.5, -67.5], + aggConfigResult: { + $parent: { + key: '5', + value: '5', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 10, + value: 10, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [-90, -45], + [-90, 0], + [-45, 0], + [-45, -45], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [157.5, -67.5], + }, + properties: { + value: 6, + geohash: 'p', + center: [157.5, -67.5], + aggConfigResult: { + $parent: { + key: 'p', + value: 'p', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 6, + value: 6, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [-90, 135], + [-90, 180], + [-45, 180], + [-45, 135], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [-157.5, -22.5], + }, + properties: { + value: 6, + geohash: '2', + center: [-157.5, -22.5], + aggConfigResult: { + $parent: { + key: '2', + value: '2', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 6, + value: 6, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [-45, -180], + [-45, -135], + [0, -135], + [0, -180], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [22.5, -67.5], + }, + properties: { + value: 4, + geohash: 'h', + center: [22.5, -67.5], + aggConfigResult: { + $parent: { + key: 'h', + value: 'h', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 4, + value: 4, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [-90, 0], + [-90, 45], + [-45, 45], + [-45, 0], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [112.5, -67.5], + }, + properties: { + value: 2, + geohash: 'n', + center: [112.5, -67.5], + aggConfigResult: { + $parent: { + key: 'n', + value: 'n', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 2, + value: 2, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [-90, 90], + [-90, 135], + [-45, 135], + [-45, 90], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [67.5, -67.5], + }, + properties: { + value: 2, + geohash: 'j', + center: [67.5, -67.5], + aggConfigResult: { + $parent: { + key: 'j', + value: 'j', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 2, + value: 2, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [-90, 45], + [-90, 90], + [-45, 90], + [-45, 45], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [-112.5, -22.5], + }, + properties: { + value: 1, + geohash: '3', + center: [-112.5, -22.5], + aggConfigResult: { + $parent: { + key: '3', + value: '3', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 1, + value: 1, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [-45, -135], + [-45, -90], + [0, -90], + [0, -135], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [-112.5, -67.5], + }, + properties: { + value: 1, + geohash: '1', + center: [-112.5, -67.5], + aggConfigResult: { + $parent: { + key: '1', + value: '1', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 1, + value: 1, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [-90, -135], + [-90, -90], + [-45, -90], + [-45, -135], + ], + }, + }, + ], + properties: { + min: 1, + max: 608, + zoom: 2, + center: [5, 15], + }, + }, +}; diff --git a/src/plugins/vis_type_vislib/public/fixtures/mock_data/geohash/_rows.js b/src/plugins/vis_type_vislib/public/fixtures/mock_data/geohash/_rows.js new file mode 100644 index 00000000000000..ca4cb2a7feee1f --- /dev/null +++ b/src/plugins/vis_type_vislib/public/fixtures/mock_data/geohash/_rows.js @@ -0,0 +1,2858 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import _ from 'lodash'; + +export default { + rows: [ + { + title: 'Top 2 geo.dest: CN', + valueFormatter: _.identity, + geoJson: { + type: 'FeatureCollection', + features: [ + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [22.5, 22.5], + }, + properties: { + value: 39, + geohash: 's', + center: [22.5, 22.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'CN', + value: 'CN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: true, + }, + }, + type: 'bucket', + }, + key: 's', + value: 's', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 39, + value: 39, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [0, 0], + [45, 0], + [45, 45], + [0, 45], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [112.5, 22.5], + }, + properties: { + value: 31, + geohash: 'w', + center: [112.5, 22.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'CN', + value: 'CN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: true, + }, + }, + type: 'bucket', + }, + key: 'w', + value: 'w', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 31, + value: 31, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [90, 0], + [135, 0], + [135, 45], + [90, 45], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [-67.5, 22.5], + }, + properties: { + value: 30, + geohash: 'd', + center: [-67.5, 22.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'CN', + value: 'CN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: true, + }, + }, + type: 'bucket', + }, + key: 'd', + value: 'd', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 30, + value: 30, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [-90, 0], + [-45, 0], + [-45, 45], + [-90, 45], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [-112.5, 22.5], + }, + properties: { + value: 25, + geohash: '9', + center: [-112.5, 22.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'CN', + value: 'CN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: true, + }, + }, + type: 'bucket', + }, + key: '9', + value: '9', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 25, + value: 25, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [-135, 0], + [-90, 0], + [-90, 45], + [-135, 45], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [67.5, 22.5], + }, + properties: { + value: 23, + geohash: 't', + center: [67.5, 22.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'CN', + value: 'CN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: true, + }, + }, + type: 'bucket', + }, + key: 't', + value: 't', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 23, + value: 23, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [45, 0], + [90, 0], + [90, 45], + [45, 45], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [22.5, -22.5], + }, + properties: { + value: 23, + geohash: 'k', + center: [22.5, -22.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'CN', + value: 'CN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: true, + }, + }, + type: 'bucket', + }, + key: 'k', + value: 'k', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 23, + value: 23, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [0, -45], + [45, -45], + [45, 0], + [0, 0], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [-67.5, -22.5], + }, + properties: { + value: 22, + geohash: '6', + center: [-67.5, -22.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'CN', + value: 'CN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: true, + }, + }, + type: 'bucket', + }, + key: '6', + value: '6', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 22, + value: 22, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [-90, -45], + [-45, -45], + [-45, 0], + [-90, 0], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [22.5, 67.5], + }, + properties: { + value: 20, + geohash: 'u', + center: [22.5, 67.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'CN', + value: 'CN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: true, + }, + }, + type: 'bucket', + }, + key: 'u', + value: 'u', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 20, + value: 20, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [0, 45], + [45, 45], + [45, 90], + [0, 90], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [67.5, 67.5], + }, + properties: { + value: 18, + geohash: 'v', + center: [67.5, 67.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'CN', + value: 'CN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: true, + }, + }, + type: 'bucket', + }, + key: 'v', + value: 'v', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 18, + value: 18, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [45, 45], + [90, 45], + [90, 90], + [45, 90], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [157.5, -22.5], + }, + properties: { + value: 11, + geohash: 'r', + center: [157.5, -22.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'CN', + value: 'CN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: true, + }, + }, + type: 'bucket', + }, + key: 'r', + value: 'r', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 11, + value: 11, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [135, -45], + [180, -45], + [180, 0], + [135, 0], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [-22.5, 22.5], + }, + properties: { + value: 11, + geohash: 'e', + center: [-22.5, 22.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'CN', + value: 'CN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: true, + }, + }, + type: 'bucket', + }, + key: 'e', + value: 'e', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 11, + value: 11, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [-45, 0], + [0, 0], + [0, 45], + [-45, 45], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [112.5, 67.5], + }, + properties: { + value: 10, + geohash: 'y', + center: [112.5, 67.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'CN', + value: 'CN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: true, + }, + }, + type: 'bucket', + }, + key: 'y', + value: 'y', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 10, + value: 10, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [90, 45], + [135, 45], + [135, 90], + [90, 90], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [-112.5, 67.5], + }, + properties: { + value: 10, + geohash: 'c', + center: [-112.5, 67.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'CN', + value: 'CN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: true, + }, + }, + type: 'bucket', + }, + key: 'c', + value: 'c', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 10, + value: 10, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [-135, 45], + [-90, 45], + [-90, 90], + [-135, 90], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [-67.5, 67.5], + }, + properties: { + value: 8, + geohash: 'f', + center: [-67.5, 67.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'CN', + value: 'CN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: true, + }, + }, + type: 'bucket', + }, + key: 'f', + value: 'f', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 8, + value: 8, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [-90, 45], + [-45, 45], + [-45, 90], + [-90, 90], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [-22.5, -22.5], + }, + properties: { + value: 8, + geohash: '7', + center: [-22.5, -22.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'CN', + value: 'CN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: true, + }, + }, + type: 'bucket', + }, + key: '7', + value: '7', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 8, + value: 8, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [-45, -45], + [0, -45], + [0, 0], + [-45, 0], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [112.5, -22.5], + }, + properties: { + value: 6, + geohash: 'q', + center: [112.5, -22.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'CN', + value: 'CN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: true, + }, + }, + type: 'bucket', + }, + key: 'q', + value: 'q', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 6, + value: 6, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [90, -45], + [135, -45], + [135, 0], + [90, 0], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [-22.5, 67.5], + }, + properties: { + value: 6, + geohash: 'g', + center: [-22.5, 67.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'CN', + value: 'CN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: true, + }, + }, + type: 'bucket', + }, + key: 'g', + value: 'g', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 6, + value: 6, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [-45, 45], + [0, 45], + [0, 90], + [-45, 90], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [157.5, 22.5], + }, + properties: { + value: 4, + geohash: 'x', + center: [157.5, 22.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'CN', + value: 'CN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: true, + }, + }, + type: 'bucket', + }, + key: 'x', + value: 'x', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 4, + value: 4, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [135, 0], + [180, 0], + [180, 45], + [135, 45], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [-157.5, 67.5], + }, + properties: { + value: 3, + geohash: 'b', + center: [-157.5, 67.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'CN', + value: 'CN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: true, + }, + }, + type: 'bucket', + }, + key: 'b', + value: 'b', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 3, + value: 3, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [-180, 45], + [-135, 45], + [-135, 90], + [-180, 90], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [157.5, 67.5], + }, + properties: { + value: 2, + geohash: 'z', + center: [157.5, 67.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'CN', + value: 'CN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: true, + }, + }, + type: 'bucket', + }, + key: 'z', + value: 'z', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 2, + value: 2, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [135, 45], + [180, 45], + [180, 90], + [135, 90], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [-67.5, -67.5], + }, + properties: { + value: 2, + geohash: '4', + center: [-67.5, -67.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'CN', + value: 'CN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: true, + }, + }, + type: 'bucket', + }, + key: '4', + value: '4', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 2, + value: 2, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [-90, -90], + [-45, -90], + [-45, -45], + [-90, -45], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [-22.5, -67.5], + }, + properties: { + value: 1, + geohash: '5', + center: [-22.5, -67.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'CN', + value: 'CN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: true, + }, + }, + type: 'bucket', + }, + key: '5', + value: '5', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 1, + value: 1, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [-45, -90], + [0, -90], + [0, -45], + [-45, -45], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [-112.5, -22.5], + }, + properties: { + value: 1, + geohash: '3', + center: [-112.5, -22.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'CN', + value: 'CN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: true, + }, + }, + type: 'bucket', + }, + key: '3', + value: '3', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 1, + value: 1, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [-135, -45], + [-90, -45], + [-90, 0], + [-135, 0], + ], + }, + }, + ], + properties: { + min: 1, + max: 39, + }, + }, + }, + { + label: 'Top 2 geo.dest: IN', + valueFormatter: _.identity, + geoJson: { + type: 'FeatureCollection', + features: [ + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [-67.5, -22.5], + }, + properties: { + value: 31, + geohash: '6', + center: [-67.5, -22.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'IN', + value: 'IN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: true, + }, + }, + type: 'bucket', + }, + key: '6', + value: '6', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 31, + value: 31, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [-90, -45], + [-45, -45], + [-45, 0], + [-90, 0], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [22.5, 22.5], + }, + properties: { + value: 30, + geohash: 's', + center: [22.5, 22.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'IN', + value: 'IN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: true, + }, + }, + type: 'bucket', + }, + key: 's', + value: 's', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 30, + value: 30, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [0, 0], + [45, 0], + [45, 45], + [0, 45], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [112.5, 22.5], + }, + properties: { + value: 29, + geohash: 'w', + center: [112.5, 22.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'IN', + value: 'IN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: true, + }, + }, + type: 'bucket', + }, + key: 'w', + value: 'w', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 29, + value: 29, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [90, 0], + [135, 0], + [135, 45], + [90, 45], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [-67.5, 22.5], + }, + properties: { + value: 28, + geohash: 'd', + center: [-67.5, 22.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'IN', + value: 'IN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: true, + }, + }, + type: 'bucket', + }, + key: 'd', + value: 'd', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 28, + value: 28, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [-90, 0], + [-45, 0], + [-45, 45], + [-90, 45], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [67.5, 22.5], + }, + properties: { + value: 25, + geohash: 't', + center: [67.5, 22.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'IN', + value: 'IN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: true, + }, + }, + type: 'bucket', + }, + key: 't', + value: 't', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 25, + value: 25, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [45, 0], + [90, 0], + [90, 45], + [45, 45], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [22.5, -22.5], + }, + properties: { + value: 24, + geohash: 'k', + center: [22.5, -22.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'IN', + value: 'IN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: true, + }, + }, + type: 'bucket', + }, + key: 'k', + value: 'k', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 24, + value: 24, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [0, -45], + [45, -45], + [45, 0], + [0, 0], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [22.5, 67.5], + }, + properties: { + value: 20, + geohash: 'u', + center: [22.5, 67.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'IN', + value: 'IN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: true, + }, + }, + type: 'bucket', + }, + key: 'u', + value: 'u', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 20, + value: 20, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [0, 45], + [45, 45], + [45, 90], + [0, 90], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [-112.5, 22.5], + }, + properties: { + value: 18, + geohash: '9', + center: [-112.5, 22.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'IN', + value: 'IN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: true, + }, + }, + type: 'bucket', + }, + key: '9', + value: '9', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 18, + value: 18, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [-135, 0], + [-90, 0], + [-90, 45], + [-135, 45], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [67.5, 67.5], + }, + properties: { + value: 14, + geohash: 'v', + center: [67.5, 67.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'IN', + value: 'IN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: true, + }, + }, + type: 'bucket', + }, + key: 'v', + value: 'v', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 14, + value: 14, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [45, 45], + [90, 45], + [90, 90], + [45, 90], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [-22.5, 22.5], + }, + properties: { + value: 11, + geohash: 'e', + center: [-22.5, 22.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'IN', + value: 'IN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: true, + }, + }, + type: 'bucket', + }, + key: 'e', + value: 'e', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 11, + value: 11, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [-45, 0], + [0, 0], + [0, 45], + [-45, 45], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [157.5, -22.5], + }, + properties: { + value: 9, + geohash: 'r', + center: [157.5, -22.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'IN', + value: 'IN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: true, + }, + }, + type: 'bucket', + }, + key: 'r', + value: 'r', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 9, + value: 9, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [135, -45], + [180, -45], + [180, 0], + [135, 0], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [112.5, 67.5], + }, + properties: { + value: 6, + geohash: 'y', + center: [112.5, 67.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'IN', + value: 'IN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: true, + }, + }, + type: 'bucket', + }, + key: 'y', + value: 'y', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 6, + value: 6, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [90, 45], + [135, 45], + [135, 90], + [90, 90], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [-67.5, 67.5], + }, + properties: { + value: 6, + geohash: 'f', + center: [-67.5, 67.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'IN', + value: 'IN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: true, + }, + }, + type: 'bucket', + }, + key: 'f', + value: 'f', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 6, + value: 6, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [-90, 45], + [-45, 45], + [-45, 90], + [-90, 90], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [-22.5, 67.5], + }, + properties: { + value: 5, + geohash: 'g', + center: [-22.5, 67.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'IN', + value: 'IN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: true, + }, + }, + type: 'bucket', + }, + key: 'g', + value: 'g', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 5, + value: 5, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [-45, 45], + [0, 45], + [0, 90], + [-45, 90], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [-112.5, 67.5], + }, + properties: { + value: 5, + geohash: 'c', + center: [-112.5, 67.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'IN', + value: 'IN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: true, + }, + }, + type: 'bucket', + }, + key: 'c', + value: 'c', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 5, + value: 5, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [-135, 45], + [-90, 45], + [-90, 90], + [-135, 90], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [-157.5, 67.5], + }, + properties: { + value: 4, + geohash: 'b', + center: [-157.5, 67.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'IN', + value: 'IN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: true, + }, + }, + type: 'bucket', + }, + key: 'b', + value: 'b', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 4, + value: 4, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [-180, 45], + [-135, 45], + [-135, 90], + [-180, 90], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [112.5, -22.5], + }, + properties: { + value: 3, + geohash: 'q', + center: [112.5, -22.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'IN', + value: 'IN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: true, + }, + }, + type: 'bucket', + }, + key: 'q', + value: 'q', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 3, + value: 3, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [90, -45], + [135, -45], + [135, 0], + [90, 0], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [-67.5, -67.5], + }, + properties: { + value: 2, + geohash: '4', + center: [-67.5, -67.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'IN', + value: 'IN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: true, + }, + }, + type: 'bucket', + }, + key: '4', + value: '4', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 2, + value: 2, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [-90, -90], + [-45, -90], + [-45, -45], + [-90, -45], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [157.5, 67.5], + }, + properties: { + value: 1, + geohash: 'z', + center: [157.5, 67.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'IN', + value: 'IN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: true, + }, + }, + type: 'bucket', + }, + key: 'z', + value: 'z', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 1, + value: 1, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [135, 45], + [180, 45], + [180, 90], + [135, 90], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [157.5, 22.5], + }, + properties: { + value: 1, + geohash: 'x', + center: [157.5, 22.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'IN', + value: 'IN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: true, + }, + }, + type: 'bucket', + }, + key: 'x', + value: 'x', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 1, + value: 1, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [135, 0], + [180, 0], + [180, 45], + [135, 45], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [157.5, -67.5], + }, + properties: { + value: 1, + geohash: 'p', + center: [157.5, -67.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'IN', + value: 'IN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: true, + }, + }, + type: 'bucket', + }, + key: 'p', + value: 'p', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 1, + value: 1, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [135, -90], + [180, -90], + [180, -45], + [135, -45], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [67.5, -22.5], + }, + properties: { + value: 1, + geohash: 'm', + center: [67.5, -22.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'IN', + value: 'IN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: true, + }, + }, + type: 'bucket', + }, + key: 'm', + value: 'm', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 1, + value: 1, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [45, -45], + [90, -45], + [90, 0], + [45, 0], + ], + }, + }, + { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [-22.5, -22.5], + }, + properties: { + value: 1, + geohash: '7', + center: [-22.5, -22.5], + aggConfigResult: { + $parent: { + $parent: { + $parent: null, + key: 'IN', + value: 'IN', + aggConfig: { + id: '3', + type: 'terms', + schema: 'split', + params: { + field: 'geo.dest', + size: 2, + order: 'desc', + orderBy: '1', + row: true, + }, + }, + type: 'bucket', + }, + key: '7', + value: '7', + aggConfig: { + id: '2', + type: 'geohash_grid', + schema: 'segment', + params: { + field: 'geo.coordinates', + precision: 1, + }, + }, + type: 'bucket', + }, + key: 1, + value: 1, + aggConfig: { + id: '1', + type: 'count', + schema: 'metric', + params: {}, + }, + type: 'metric', + }, + rectangle: [ + [-45, -45], + [0, -45], + [0, 0], + [-45, 0], + ], + }, + }, + ], + properties: { + min: 1, + max: 31, + }, + }, + }, + ], + hits: 1639, +}; diff --git a/src/plugins/vis_type_vislib/public/fixtures/mock_data/histogram/_columns.js b/src/plugins/vis_type_vislib/public/fixtures/mock_data/histogram/_columns.js new file mode 100644 index 00000000000000..c93365234d1582 --- /dev/null +++ b/src/plugins/vis_type_vislib/public/fixtures/mock_data/histogram/_columns.js @@ -0,0 +1,381 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import _ from 'lodash'; + +export default { + columns: [ + { + label: '404: response', + xAxisLabel: 'machine.ram', + ordered: { + interval: 100, + }, + yAxisLabel: 'Count of documents', + series: [ + { + label: 'Count', + values: [ + { + x: 2147483600, + y: 1, + y0: 0, + }, + { + x: 3221225400, + y: 0, + y0: 0, + }, + { + x: 4294967200, + y: 0, + y0: 0, + }, + { + x: 5368709100, + y: 0, + y0: 0, + }, + { + x: 6442450900, + y: 0, + y0: 0, + }, + { + x: 7516192700, + y: 0, + y0: 0, + }, + { + x: 8589934500, + y: 0, + y0: 0, + }, + { + x: 10737418200, + y: 0, + y0: 0, + }, + { + x: 11811160000, + y: 0, + y0: 0, + }, + { + x: 12884901800, + y: 1, + y0: 0, + }, + { + x: 13958643700, + y: 0, + y0: 0, + }, + { + x: 15032385500, + y: 0, + y0: 0, + }, + { + x: 16106127300, + y: 0, + y0: 0, + }, + { + x: 18253611000, + y: 0, + y0: 0, + }, + { + x: 19327352800, + y: 0, + y0: 0, + }, + { + x: 20401094600, + y: 0, + y0: 0, + }, + { + x: 21474836400, + y: 0, + y0: 0, + }, + ], + }, + ], + xAxisFormatter: function(val) { + if (_.isObject(val)) { + return JSON.stringify(val); + } else if (val == null) { + return ''; + } else { + return '' + val; + } + }, + tooltipFormatter: function(d) { + return d; + }, + }, + { + label: '200: response', + xAxisLabel: 'machine.ram', + ordered: { + interval: 100, + }, + yAxisLabel: 'Count of documents', + series: [ + { + label: 'Count', + values: [ + { + x: 2147483600, + y: 0, + y0: 0, + }, + { + x: 3221225400, + y: 2, + y0: 0, + }, + { + x: 4294967200, + y: 3, + y0: 0, + }, + { + x: 5368709100, + y: 3, + y0: 0, + }, + { + x: 6442450900, + y: 1, + y0: 0, + }, + { + x: 7516192700, + y: 1, + y0: 0, + }, + { + x: 8589934500, + y: 4, + y0: 0, + }, + { + x: 10737418200, + y: 0, + y0: 0, + }, + { + x: 11811160000, + y: 1, + y0: 0, + }, + { + x: 12884901800, + y: 1, + y0: 0, + }, + { + x: 13958643700, + y: 1, + y0: 0, + }, + { + x: 15032385500, + y: 2, + y0: 0, + }, + { + x: 16106127300, + y: 3, + y0: 0, + }, + { + x: 18253611000, + y: 4, + y0: 0, + }, + { + x: 19327352800, + y: 5, + y0: 0, + }, + { + x: 20401094600, + y: 2, + y0: 0, + }, + { + x: 21474836400, + y: 2, + y0: 0, + }, + ], + }, + ], + xAxisFormatter: function(val) { + if (_.isObject(val)) { + return JSON.stringify(val); + } else if (val == null) { + return ''; + } else { + return '' + val; + } + }, + tooltipFormatter: function(d) { + return d; + }, + }, + { + label: '503: response', + xAxisLabel: 'machine.ram', + ordered: { + interval: 100, + }, + yAxisLabel: 'Count of documents', + series: [ + { + label: 'Count', + values: [ + { + x: 2147483600, + y: 0, + y0: 0, + }, + { + x: 3221225400, + y: 0, + y0: 0, + }, + { + x: 4294967200, + y: 0, + y0: 0, + }, + { + x: 5368709100, + y: 0, + y0: 0, + }, + { + x: 6442450900, + y: 0, + y0: 0, + }, + { + x: 7516192700, + y: 0, + y0: 0, + }, + { + x: 8589934500, + y: 0, + y0: 0, + }, + { + x: 10737418200, + y: 1, + y0: 0, + }, + { + x: 11811160000, + y: 0, + y0: 0, + }, + { + x: 12884901800, + y: 0, + y0: 0, + }, + { + x: 13958643700, + y: 0, + y0: 0, + }, + { + x: 15032385500, + y: 0, + y0: 0, + }, + { + x: 16106127300, + y: 0, + y0: 0, + }, + { + x: 18253611000, + y: 0, + y0: 0, + }, + { + x: 19327352800, + y: 0, + y0: 0, + }, + { + x: 20401094600, + y: 0, + y0: 0, + }, + { + x: 21474836400, + y: 0, + y0: 0, + }, + ], + }, + ], + xAxisFormatter: function(val) { + if (_.isObject(val)) { + return JSON.stringify(val); + } else if (val == null) { + return ''; + } else { + return '' + val; + } + }, + tooltipFormatter: function(d) { + return d; + }, + }, + ], + xAxisOrderedValues: [ + 2147483600, + 3221225400, + 4294967200, + 5368709100, + 6442450900, + 7516192700, + 8589934500, + 10737418200, + 11811160000, + 12884901800, + 13958643700, + 15032385500, + 16106127300, + 18253611000, + 19327352800, + 20401094600, + 21474836400, + ], + hits: 40, +}; diff --git a/src/plugins/vis_type_vislib/public/fixtures/mock_data/histogram/_rows.js b/src/plugins/vis_type_vislib/public/fixtures/mock_data/histogram/_rows.js new file mode 100644 index 00000000000000..d88197c3737e52 --- /dev/null +++ b/src/plugins/vis_type_vislib/public/fixtures/mock_data/histogram/_rows.js @@ -0,0 +1,225 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import _ from 'lodash'; + +export default { + rows: [ + { + label: '404: response', + xAxisLabel: 'machine.ram', + ordered: { + interval: 100, + }, + yAxisLabel: 'Count of documents', + series: [ + { + label: 'Count', + values: [ + { + x: 2147483600, + y: 1, + }, + { + x: 10737418200, + y: 1, + }, + { + x: 15032385500, + y: 2, + }, + { + x: 19327352800, + y: 1, + }, + { + x: 32212254700, + y: 1, + }, + ], + }, + ], + xAxisFormatter: function(val) { + if (_.isObject(val)) { + return JSON.stringify(val); + } else if (val == null) { + return ''; + } else { + return '' + val; + } + }, + tooltipFormatter: function(d) { + return d; + }, + }, + { + label: '200: response', + xAxisLabel: 'machine.ram', + ordered: { + interval: 100, + }, + yAxisLabel: 'Count of documents', + series: [ + { + label: 'Count', + values: [ + { + x: 3221225400, + y: 4, + }, + { + x: 4294967200, + y: 3, + }, + { + x: 5368709100, + y: 3, + }, + { + x: 6442450900, + y: 2, + }, + { + x: 7516192700, + y: 2, + }, + { + x: 8589934500, + y: 2, + }, + { + x: 9663676400, + y: 3, + }, + { + x: 11811160000, + y: 3, + }, + { + x: 12884901800, + y: 2, + }, + { + x: 13958643700, + y: 1, + }, + { + x: 15032385500, + y: 2, + }, + { + x: 16106127300, + y: 3, + }, + { + x: 17179869100, + y: 1, + }, + { + x: 18253611000, + y: 4, + }, + { + x: 19327352800, + y: 1, + }, + { + x: 20401094600, + y: 1, + }, + { + x: 21474836400, + y: 4, + }, + { + x: 32212254700, + y: 3, + }, + ], + }, + ], + xAxisFormatter: function(val) { + if (_.isObject(val)) { + return JSON.stringify(val); + } else if (val == null) { + return ''; + } else { + return '' + val; + } + }, + tooltipFormatter: function(d) { + return d; + }, + }, + { + label: '503: response', + xAxisLabel: 'machine.ram', + ordered: { + interval: 100, + }, + yAxisLabel: 'Count of documents', + series: [ + { + label: 'Count', + values: [ + { + x: 10737418200, + y: 1, + }, + ], + }, + ], + xAxisFormatter: function(val) { + if (_.isObject(val)) { + return JSON.stringify(val); + } else if (val == null) { + return ''; + } else { + return '' + val; + } + }, + tooltipFormatter: function(d) { + return d; + }, + }, + ], + xAxisOrderedValues: [ + 2147483600, + 3221225400, + 4294967200, + 5368709100, + 6442450900, + 7516192700, + 8589934500, + 9663676400, + 10737418200, + 11811160000, + 12884901800, + 13958643700, + 15032385500, + 16106127300, + 17179869100, + 18253611000, + 19327352800, + 20401094600, + 21474836400, + 32212254700, + ], + hits: 51, +}; diff --git a/src/plugins/vis_type_vislib/public/fixtures/mock_data/histogram/_series.js b/src/plugins/vis_type_vislib/public/fixtures/mock_data/histogram/_series.js new file mode 100644 index 00000000000000..99511e693ff023 --- /dev/null +++ b/src/plugins/vis_type_vislib/public/fixtures/mock_data/histogram/_series.js @@ -0,0 +1,141 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import _ from 'lodash'; + +export default { + label: '', + xAxisLabel: 'machine.ram', + ordered: { + interval: 100, + }, + yAxisLabel: 'Count of documents', + series: [ + { + label: 'Count', + values: [ + { + x: 3221225400, + y: 5, + }, + { + x: 4294967200, + y: 2, + }, + { + x: 5368709100, + y: 5, + }, + { + x: 6442450900, + y: 4, + }, + { + x: 7516192700, + y: 1, + }, + { + x: 9663676400, + y: 9, + }, + { + x: 10737418200, + y: 5, + }, + { + x: 11811160000, + y: 5, + }, + { + x: 12884901800, + y: 2, + }, + { + x: 13958643700, + y: 3, + }, + { + x: 15032385500, + y: 3, + }, + { + x: 16106127300, + y: 3, + }, + { + x: 17179869100, + y: 1, + }, + { + x: 18253611000, + y: 6, + }, + { + x: 19327352800, + y: 3, + }, + { + x: 20401094600, + y: 3, + }, + { + x: 21474836400, + y: 7, + }, + { + x: 32212254700, + y: 4, + }, + ], + }, + ], + hits: 71, + xAxisOrderedValues: [ + 3221225400, + 4294967200, + 5368709100, + 6442450900, + 7516192700, + 9663676400, + 10737418200, + 11811160000, + 12884901800, + 13958643700, + 15032385500, + 16106127300, + 17179869100, + 18253611000, + 19327352800, + 20401094600, + 21474836400, + 32212254700, + ], + xAxisFormatter: function(val) { + if (_.isObject(val)) { + return JSON.stringify(val); + } else if (val == null) { + return ''; + } else { + return '' + val; + } + }, + tooltipFormatter: function(d) { + return d; + }, +}; diff --git a/src/plugins/vis_type_vislib/public/fixtures/mock_data/histogram/_slices.js b/src/plugins/vis_type_vislib/public/fixtures/mock_data/histogram/_slices.js new file mode 100644 index 00000000000000..c23a89b755b5b3 --- /dev/null +++ b/src/plugins/vis_type_vislib/public/fixtures/mock_data/histogram/_slices.js @@ -0,0 +1,328 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import _ from 'lodash'; + +export default { + label: '', + slices: { + children: [ + { + name: 0, + size: 378611, + aggConfig: { + type: 'histogram', + schema: 'segment', + fieldFormatter: _.constant(String), + params: { + interval: 1000, + extended_bounds: {}, + }, + }, + }, + { + name: 1000, + size: 205997, + aggConfig: { + type: 'histogram', + schema: 'segment', + fieldFormatter: _.constant(String), + params: { + interval: 1000, + extended_bounds: {}, + }, + }, + }, + { + name: 2000, + size: 397189, + aggConfig: { + type: 'histogram', + schema: 'segment', + fieldFormatter: _.constant(String), + params: { + interval: 1000, + extended_bounds: {}, + }, + }, + }, + { + name: 3000, + size: 397195, + aggConfig: { + type: 'histogram', + schema: 'segment', + fieldFormatter: _.constant(String), + params: { + interval: 1000, + extended_bounds: {}, + }, + }, + }, + { + name: 4000, + size: 398429, + aggConfig: { + type: 'histogram', + schema: 'segment', + fieldFormatter: _.constant(String), + params: { + interval: 1000, + extended_bounds: {}, + }, + }, + }, + { + name: 5000, + size: 397843, + aggConfig: { + type: 'histogram', + schema: 'segment', + fieldFormatter: _.constant(String), + params: { + interval: 1000, + extended_bounds: {}, + }, + }, + }, + { + name: 6000, + size: 398140, + aggConfig: { + type: 'histogram', + schema: 'segment', + fieldFormatter: _.constant(String), + params: { + interval: 1000, + extended_bounds: {}, + }, + }, + }, + { + name: 7000, + size: 398076, + aggConfig: { + type: 'histogram', + schema: 'segment', + fieldFormatter: _.constant(String), + params: { + interval: 1000, + extended_bounds: {}, + }, + }, + }, + { + name: 8000, + size: 396746, + aggConfig: { + type: 'histogram', + schema: 'segment', + fieldFormatter: _.constant(String), + params: { + interval: 1000, + extended_bounds: {}, + }, + }, + }, + { + name: 9000, + size: 397418, + aggConfig: { + type: 'histogram', + schema: 'segment', + fieldFormatter: _.constant(String), + params: { + interval: 1000, + extended_bounds: {}, + }, + }, + }, + { + name: 10000, + size: 20222, + aggConfig: { + type: 'histogram', + schema: 'segment', + fieldFormatter: _.constant(String), + params: { + interval: 1000, + extended_bounds: {}, + }, + }, + }, + { + name: 11000, + size: 20173, + aggConfig: { + type: 'histogram', + schema: 'segment', + fieldFormatter: _.constant(String), + params: { + interval: 1000, + extended_bounds: {}, + }, + }, + }, + { + name: 12000, + size: 20026, + aggConfig: { + type: 'histogram', + schema: 'segment', + fieldFormatter: _.constant(String), + params: { + interval: 1000, + extended_bounds: {}, + }, + }, + }, + { + name: 13000, + size: 19986, + aggConfig: { + type: 'histogram', + schema: 'segment', + fieldFormatter: _.constant(String), + params: { + interval: 1000, + extended_bounds: {}, + }, + }, + }, + { + name: 14000, + size: 20091, + aggConfig: { + type: 'histogram', + schema: 'segment', + fieldFormatter: _.constant(String), + params: { + interval: 1000, + extended_bounds: {}, + }, + }, + }, + { + name: 15000, + size: 20052, + aggConfig: { + type: 'histogram', + schema: 'segment', + fieldFormatter: _.constant(String), + params: { + interval: 1000, + extended_bounds: {}, + }, + }, + }, + { + name: 16000, + size: 20349, + aggConfig: { + type: 'histogram', + schema: 'segment', + fieldFormatter: _.constant(String), + params: { + interval: 1000, + extended_bounds: {}, + }, + }, + }, + { + name: 17000, + size: 20290, + aggConfig: { + type: 'histogram', + schema: 'segment', + fieldFormatter: _.constant(String), + params: { + interval: 1000, + extended_bounds: {}, + }, + }, + }, + { + name: 18000, + size: 20399, + aggConfig: { + type: 'histogram', + schema: 'segment', + fieldFormatter: _.constant(String), + params: { + interval: 1000, + extended_bounds: {}, + }, + }, + }, + { + name: 19000, + size: 20133, + aggConfig: { + type: 'histogram', + schema: 'segment', + fieldFormatter: _.constant(String), + params: { + interval: 1000, + extended_bounds: {}, + }, + }, + }, + { + name: 20000, + size: 9, + aggConfig: { + type: 'histogram', + schema: 'segment', + fieldFormatter: _.constant(String), + params: { + interval: 1000, + extended_bounds: {}, + }, + }, + }, + ], + }, + names: [ + 0, + 1000, + 2000, + 3000, + 4000, + 5000, + 6000, + 7000, + 8000, + 9000, + 10000, + 11000, + 12000, + 13000, + 14000, + 15000, + 16000, + 17000, + 18000, + 19000, + 20000, + ], + hits: 3967374, + tooltipFormatter: function(event) { + return event.point; + }, +}; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/index.js b/src/plugins/vis_type_vislib/public/fixtures/mock_data/not_enough_data/_one_point.js similarity index 61% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/index.js rename to src/plugins/vis_type_vislib/public/fixtures/mock_data/not_enough_data/_one_point.js index 734c6d003278fd..df71f4efc58b55 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/index.js +++ b/src/plugins/vis_type_vislib/public/fixtures/mock_data/not_enough_data/_one_point.js @@ -18,22 +18,34 @@ */ import _ from 'lodash'; -import expect from '@kbn/expect'; -import VislibProvider from '..'; - -describe('Vislib Index Test Suite', function() { - let vislib; - - beforeEach(() => { - vislib = new VislibProvider(); - }); - - it('should return an object', function() { - expect(_.isObject(vislib)).to.be(true); - }); - - it('should return a Vis function', function() { - expect(_.isFunction(vislib.Vis)).to.be(true); - }); -}); +export default { + label: '', + xAxisLabel: '', + yAxisLabel: 'Count of documents', + series: [ + { + label: 'Count', + values: [ + { + x: '_all', + y: 274, + }, + ], + }, + ], + hits: 274, + xAxisOrderedValues: ['_all'], + xAxisFormatter: function(val) { + if (_.isObject(val)) { + return JSON.stringify(val); + } else if (val == null) { + return ''; + } else { + return '' + val; + } + }, + tooltipFormatter: function(d) { + return d; + }, +}; diff --git a/src/plugins/vis_type_vislib/public/fixtures/mock_data/range/_columns.js b/src/plugins/vis_type_vislib/public/fixtures/mock_data/range/_columns.js new file mode 100644 index 00000000000000..b5b931383f7321 --- /dev/null +++ b/src/plugins/vis_type_vislib/public/fixtures/mock_data/range/_columns.js @@ -0,0 +1,79 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import _ from 'lodash'; + +export default { + columns: [ + { + label: 'apache: _type', + xAxisLabel: 'bytes ranges', + yAxisLabel: 'Count of documents', + series: [ + { + label: 'Count', + values: [ + { + x: '0.0-1000.0', + y: 13309, + }, + { + x: '1000.0-2000.0', + y: 7196, + }, + ], + }, + ], + }, + { + label: 'nginx: _type', + xAxisLabel: 'bytes ranges', + yAxisLabel: 'Count of documents', + series: [ + { + label: 'Count', + values: [ + { + x: '0.0-1000.0', + y: 3278, + }, + { + x: '1000.0-2000.0', + y: 1804, + }, + ], + }, + ], + }, + ], + hits: 171499, + xAxisOrderedValues: ['0.0-1000.0', '1000.0-2000.0'], + xAxisFormatter: function(val) { + if (_.isObject(val)) { + return JSON.stringify(val); + } else if (val == null) { + return ''; + } else { + return '' + val; + } + }, + tooltipFormatter: function(d) { + return d; + }, +}; diff --git a/src/plugins/vis_type_vislib/public/fixtures/mock_data/range/_rows.js b/src/plugins/vis_type_vislib/public/fixtures/mock_data/range/_rows.js new file mode 100644 index 00000000000000..bc7e4c9f49625f --- /dev/null +++ b/src/plugins/vis_type_vislib/public/fixtures/mock_data/range/_rows.js @@ -0,0 +1,107 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import _ from 'lodash'; + +export default { + rows: [ + { + label: 'Mozilla/5.0 (X11; Linux x86_64; rv:6.0a1) Gecko/20110421 Firefox/6.0a1: agent.raw', + xAxisLabel: 'bytes ranges', + yAxisLabel: 'Count of documents', + series: [ + { + label: 'Count', + values: [ + { + x: '0.0-1000.0', + y: 6422, + y0: 0, + }, + { + x: '1000.0-2000.0', + y: 3446, + y0: 0, + }, + ], + }, + ], + }, + { + label: + 'Mozilla/5.0 (X11; Linux i686) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.50 Safari/534.24: agent.raw', + xAxisLabel: 'bytes ranges', + yAxisLabel: 'Count of documents', + series: [ + { + label: 'Count', + values: [ + { + x: '0.0-1000.0', + y: 5430, + y0: 0, + }, + { + x: '1000.0-2000.0', + y: 3010, + y0: 0, + }, + ], + }, + ], + }, + { + label: + 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322): agent.raw', + xAxisLabel: 'bytes ranges', + yAxisLabel: 'Count of documents', + series: [ + { + label: 'Count', + values: [ + { + x: '0.0-1000.0', + y: 4735, + y0: 0, + }, + { + x: '1000.0-2000.0', + y: 2542, + y0: 0, + }, + ], + }, + ], + }, + ], + hits: 171501, + xAxisOrderedValues: ['0.0-1000.0', '1000.0-2000.0'], + xAxisFormatter: function(val) { + if (_.isObject(val)) { + return JSON.stringify(val); + } else if (val == null) { + return ''; + } else { + return '' + val; + } + }, + tooltipFormatter: function(d) { + return d; + }, +}; diff --git a/src/plugins/vis_type_vislib/public/fixtures/mock_data/range/_series.js b/src/plugins/vis_type_vislib/public/fixtures/mock_data/range/_series.js new file mode 100644 index 00000000000000..40c14beeb4f3ef --- /dev/null +++ b/src/plugins/vis_type_vislib/public/fixtures/mock_data/range/_series.js @@ -0,0 +1,55 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import _ from 'lodash'; + +export default { + label: '', + xAxisLabel: 'bytes ranges', + yAxisLabel: 'Count of documents', + series: [ + { + label: 'Count', + values: [ + { + x: '0.0-1000.0', + y: 16576, + }, + { + x: '1000.0-2000.0', + y: 9005, + }, + ], + }, + ], + hits: 171500, + xAxisOrderedValues: ['0.0-1000.0', '1000.0-2000.0'], + xAxisFormatter: function(val) { + if (_.isObject(val)) { + return JSON.stringify(val); + } else if (val == null) { + return ''; + } else { + return '' + val; + } + }, + tooltipFormatter: function(d) { + return d; + }, +}; diff --git a/src/plugins/vis_type_vislib/public/fixtures/mock_data/significant_terms/_columns.js b/src/plugins/vis_type_vislib/public/fixtures/mock_data/significant_terms/_columns.js new file mode 100644 index 00000000000000..bf4fcb7e9e526a --- /dev/null +++ b/src/plugins/vis_type_vislib/public/fixtures/mock_data/significant_terms/_columns.js @@ -0,0 +1,251 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import _ from 'lodash'; + +export default { + columns: [ + { + label: 'http: links', + xAxisLabel: 'Top 5 unusual terms in @tags', + yAxisLabel: 'Count of documents', + series: [ + { + label: 'Count', + values: [ + { + x: 'success', + y: 144000, + }, + { + x: 'info', + y: 128237, + }, + { + x: 'security', + y: 34518, + }, + { + x: 'error', + y: 10258, + }, + { + x: 'warning', + y: 17188, + }, + ], + }, + ], + xAxisOrderedValues: ['success', 'info', 'security', 'error', 'warning'], + xAxisFormatter: function(val) { + if (_.isObject(val)) { + return JSON.stringify(val); + } else if (val == null) { + return ''; + } else { + return '' + val; + } + }, + tooltipFormatter: function(d) { + return d; + }, + }, + { + label: 'info: links', + xAxisLabel: 'Top 5 unusual terms in @tags', + yAxisLabel: 'Count of documents', + series: [ + { + label: 'Count', + values: [ + { + x: 'success', + y: 108148, + }, + { + x: 'info', + y: 96242, + }, + { + x: 'security', + y: 25889, + }, + { + x: 'error', + y: 7673, + }, + { + x: 'warning', + y: 12842, + }, + ], + }, + ], + xAxisOrderedValues: ['success', 'info', 'security', 'error', 'warning'], + xAxisFormatter: function(val) { + if (_.isObject(val)) { + return JSON.stringify(val); + } else if (val == null) { + return ''; + } else { + return '' + val; + } + }, + tooltipFormatter: function(d) { + return d; + }, + }, + { + label: 'www.slate.com: links', + xAxisLabel: 'Top 5 unusual terms in @tags', + yAxisLabel: 'Count of documents', + series: [ + { + label: 'Count', + values: [ + { + x: 'success', + y: 98056, + }, + { + x: 'info', + y: 87344, + }, + { + x: 'security', + y: 23577, + }, + { + x: 'error', + y: 7004, + }, + { + x: 'warning', + y: 11759, + }, + ], + }, + ], + xAxisOrderedValues: ['success', 'info', 'security', 'error', 'warning'], + xAxisFormatter: function(val) { + if (_.isObject(val)) { + return JSON.stringify(val); + } else if (val == null) { + return ''; + } else { + return '' + val; + } + }, + tooltipFormatter: function(d) { + return d; + }, + }, + { + label: 'twitter.com: links', + xAxisLabel: 'Top 5 unusual terms in @tags', + yAxisLabel: 'Count of documents', + series: [ + { + label: 'Count', + values: [ + { + x: 'success', + y: 74154, + }, + { + x: 'info', + y: 65963, + }, + { + x: 'security', + y: 17832, + }, + { + x: 'error', + y: 5258, + }, + { + x: 'warning', + y: 8906, + }, + ], + }, + ], + xAxisOrderedValues: ['success', 'info', 'security', 'error', 'warning'], + xAxisFormatter: function(val) { + if (_.isObject(val)) { + return JSON.stringify(val); + } else if (val == null) { + return ''; + } else { + return '' + val; + } + }, + tooltipFormatter: function(d) { + return d; + }, + }, + { + label: 'www.www.slate.com: links', + xAxisLabel: 'Top 5 unusual terms in @tags', + yAxisLabel: 'Count of documents', + series: [ + { + label: 'Count', + values: [ + { + x: 'success', + y: 62591, + }, + { + x: 'info', + y: 55822, + }, + { + x: 'security', + y: 15100, + }, + { + x: 'error', + y: 4564, + }, + { + x: 'warning', + y: 7498, + }, + ], + }, + ], + xAxisOrderedValues: ['success', 'info', 'security', 'error', 'warning'], + xAxisFormatter: function(val) { + if (_.isObject(val)) { + return JSON.stringify(val); + } else if (val == null) { + return ''; + } else { + return '' + val; + } + }, + tooltipFormatter: function(d) { + return d; + }, + }, + ], + hits: 171446, +}; diff --git a/src/plugins/vis_type_vislib/public/fixtures/mock_data/significant_terms/_rows.js b/src/plugins/vis_type_vislib/public/fixtures/mock_data/significant_terms/_rows.js new file mode 100644 index 00000000000000..5d737131dc9980 --- /dev/null +++ b/src/plugins/vis_type_vislib/public/fixtures/mock_data/significant_terms/_rows.js @@ -0,0 +1,251 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import _ from 'lodash'; + +export default { + rows: [ + { + label: 'h3: headings', + xAxisLabel: 'Top 5 unusual terms in @tags', + yAxisLabel: 'Count of documents', + series: [ + { + label: 'Count', + values: [ + { + x: 'success', + y: 144000, + }, + { + x: 'info', + y: 128235, + }, + { + x: 'security', + y: 34518, + }, + { + x: 'error', + y: 10257, + }, + { + x: 'warning', + y: 17188, + }, + ], + }, + ], + xAxisOrderedValues: ['success', 'info', 'security', 'error', 'warning'], + xAxisFormatter: function(val) { + if (_.isObject(val)) { + return JSON.stringify(val); + } else if (val == null) { + return ''; + } else { + return '' + val; + } + }, + tooltipFormatter: function(d) { + return d; + }, + }, + { + label: 'h5: headings', + xAxisLabel: 'Top 5 unusual terms in @tags', + yAxisLabel: 'Count of documents', + series: [ + { + label: 'Count', + values: [ + { + x: 'success', + y: 144000, + }, + { + x: 'info', + y: 128235, + }, + { + x: 'security', + y: 34518, + }, + { + x: 'error', + y: 10257, + }, + { + x: 'warning', + y: 17188, + }, + ], + }, + ], + xAxisOrderedValues: ['success', 'info', 'security', 'error', 'warning'], + xAxisFormatter: function(val) { + if (_.isObject(val)) { + return JSON.stringify(val); + } else if (val == null) { + return ''; + } else { + return '' + val; + } + }, + tooltipFormatter: function(d) { + return d; + }, + }, + { + label: 'http: headings', + xAxisLabel: 'Top 5 unusual terms in @tags', + yAxisLabel: 'Count of documents', + series: [ + { + label: 'Count', + values: [ + { + x: 'success', + y: 144000, + }, + { + x: 'info', + y: 128235, + }, + { + x: 'security', + y: 34518, + }, + { + x: 'error', + y: 10257, + }, + { + x: 'warning', + y: 17188, + }, + ], + }, + ], + xAxisOrderedValues: ['success', 'info', 'security', 'error', 'warning'], + xAxisFormatter: function(val) { + if (_.isObject(val)) { + return JSON.stringify(val); + } else if (val == null) { + return ''; + } else { + return '' + val; + } + }, + tooltipFormatter: function(d) { + return d; + }, + }, + { + label: 'success: headings', + xAxisLabel: 'Top 5 unusual terms in @tags', + yAxisLabel: 'Count of documents', + series: [ + { + label: 'Count', + values: [ + { + x: 'success', + y: 120689, + }, + { + x: 'info', + y: 107621, + }, + { + x: 'security', + y: 28916, + }, + { + x: 'error', + y: 8590, + }, + { + x: 'warning', + y: 14548, + }, + ], + }, + ], + xAxisOrderedValues: ['success', 'info', 'security', 'error', 'warning'], + xAxisFormatter: function(val) { + if (_.isObject(val)) { + return JSON.stringify(val); + } else if (val == null) { + return ''; + } else { + return '' + val; + } + }, + tooltipFormatter: function(d) { + return d; + }, + }, + { + label: 'www.slate.com: headings', + xAxisLabel: 'Top 5 unusual terms in @tags', + yAxisLabel: 'Count of documents', + series: [ + { + label: 'Count', + values: [ + { + x: 'success', + y: 62292, + }, + { + x: 'info', + y: 55646, + }, + { + x: 'security', + y: 14823, + }, + { + x: 'error', + y: 4441, + }, + { + x: 'warning', + y: 7539, + }, + ], + }, + ], + xAxisOrderedValues: ['success', 'info', 'security', 'error', 'warning'], + xAxisFormatter: function(val) { + if (_.isObject(val)) { + return JSON.stringify(val); + } else if (val == null) { + return ''; + } else { + return '' + val; + } + }, + tooltipFormatter: function(d) { + return d; + }, + }, + ], + hits: 171445, +}; diff --git a/src/plugins/vis_type_vislib/public/fixtures/mock_data/significant_terms/_series.js b/src/plugins/vis_type_vislib/public/fixtures/mock_data/significant_terms/_series.js new file mode 100644 index 00000000000000..36df8e091ba895 --- /dev/null +++ b/src/plugins/vis_type_vislib/public/fixtures/mock_data/significant_terms/_series.js @@ -0,0 +1,66 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import _ from 'lodash'; + +export default { + label: '', + xAxisLabel: 'Top 5 unusual terms in @tags', + yAxisLabel: 'Count of documents', + series: [ + { + label: 'Count', + values: [ + { + x: 'success', + y: 143995, + }, + { + x: 'info', + y: 128233, + }, + { + x: 'security', + y: 34515, + }, + { + x: 'error', + y: 10256, + }, + { + x: 'warning', + y: 17188, + }, + ], + }, + ], + hits: 171439, + xAxisFormatter: function(val) { + if (_.isObject(val)) { + return JSON.stringify(val); + } else if (val == null) { + return ''; + } else { + return '' + val; + } + }, + tooltipFormatter: function(d) { + return d; + }, +}; diff --git a/src/plugins/vis_type_vislib/public/fixtures/mock_data/stacked/_stacked.js b/src/plugins/vis_type_vislib/public/fixtures/mock_data/stacked/_stacked.js new file mode 100644 index 00000000000000..a914f20a7ffc6f --- /dev/null +++ b/src/plugins/vis_type_vislib/public/fixtures/mock_data/stacked/_stacked.js @@ -0,0 +1,1654 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import moment from 'moment'; + +export default { + label: '', + xAxisLabel: '@timestamp per 30 sec', + ordered: { + date: true, + interval: 30000, + min: 1416850340336, + max: 1416852140336, + }, + yAxisLabel: 'Count of documents', + xAxisOrderedValues: [ + 1416850320000, + 1416850350000, + 1416850380000, + 1416850410000, + 1416850440000, + 1416850470000, + 1416850500000, + 1416850530000, + 1416850560000, + 1416850590000, + 1416850620000, + 1416850650000, + 1416850680000, + 1416850710000, + 1416850740000, + 1416850770000, + 1416850800000, + 1416850830000, + 1416850860000, + 1416850890000, + 1416850920000, + 1416850950000, + 1416850980000, + 1416851010000, + 1416851040000, + 1416851070000, + 1416851100000, + 1416851130000, + 1416851160000, + 1416851190000, + 1416851220000, + 1416851250000, + 1416851280000, + 1416851310000, + 1416851340000, + 1416851370000, + 1416851400000, + 1416851430000, + 1416851460000, + 1416851490000, + 1416851520000, + 1416851550000, + 1416851580000, + 1416851610000, + 1416851640000, + 1416851670000, + 1416851700000, + 1416851730000, + 1416851760000, + 1416851790000, + 1416851820000, + 1416851850000, + 1416851880000, + 1416851910000, + 1416851940000, + 1416851970000, + 1416852000000, + 1416852030000, + 1416852060000, + 1416852090000, + 1416852120000, + ], + series: [ + { + label: 'jpg', + values: [ + { + x: 1416850320000, + y: 110, + y0: 0, + }, + { + x: 1416850350000, + y: 24, + y0: 0, + }, + { + x: 1416850380000, + y: 34, + y0: 0, + }, + { + x: 1416850410000, + y: 21, + y0: 0, + }, + { + x: 1416850440000, + y: 32, + y0: 0, + }, + { + x: 1416850470000, + y: 24, + y0: 0, + }, + { + x: 1416850500000, + y: 16, + y0: 0, + }, + { + x: 1416850530000, + y: 27, + y0: 0, + }, + { + x: 1416850560000, + y: 24, + y0: 0, + }, + { + x: 1416850590000, + y: 38, + y0: 0, + }, + { + x: 1416850620000, + y: 33, + y0: 0, + }, + { + x: 1416850650000, + y: 33, + y0: 0, + }, + { + x: 1416850680000, + y: 31, + y0: 0, + }, + { + x: 1416850710000, + y: 24, + y0: 0, + }, + { + x: 1416850740000, + y: 24, + y0: 0, + }, + { + x: 1416850770000, + y: 38, + y0: 0, + }, + { + x: 1416850800000, + y: 34, + y0: 0, + }, + { + x: 1416850830000, + y: 30, + y0: 0, + }, + { + x: 1416850860000, + y: 38, + y0: 0, + }, + { + x: 1416850890000, + y: 19, + y0: 0, + }, + { + x: 1416850920000, + y: 23, + y0: 0, + }, + { + x: 1416850950000, + y: 33, + y0: 0, + }, + { + x: 1416850980000, + y: 28, + y0: 0, + }, + { + x: 1416851010000, + y: 24, + y0: 0, + }, + { + x: 1416851040000, + y: 22, + y0: 0, + }, + { + x: 1416851070000, + y: 28, + y0: 0, + }, + { + x: 1416851100000, + y: 27, + y0: 0, + }, + { + x: 1416851130000, + y: 32, + y0: 0, + }, + { + x: 1416851160000, + y: 32, + y0: 0, + }, + { + x: 1416851190000, + y: 30, + y0: 0, + }, + { + x: 1416851220000, + y: 32, + y0: 0, + }, + { + x: 1416851250000, + y: 36, + y0: 0, + }, + { + x: 1416851280000, + y: 32, + y0: 0, + }, + { + x: 1416851310000, + y: 29, + y0: 0, + }, + { + x: 1416851340000, + y: 22, + y0: 0, + }, + { + x: 1416851370000, + y: 29, + y0: 0, + }, + { + x: 1416851400000, + y: 33, + y0: 0, + }, + { + x: 1416851430000, + y: 28, + y0: 0, + }, + { + x: 1416851460000, + y: 39, + y0: 0, + }, + { + x: 1416851490000, + y: 28, + y0: 0, + }, + { + x: 1416851520000, + y: 28, + y0: 0, + }, + { + x: 1416851550000, + y: 28, + y0: 0, + }, + { + x: 1416851580000, + y: 30, + y0: 0, + }, + { + x: 1416851610000, + y: 29, + y0: 0, + }, + { + x: 1416851640000, + y: 30, + y0: 0, + }, + { + x: 1416851670000, + y: 23, + y0: 0, + }, + { + x: 1416851700000, + y: 23, + y0: 0, + }, + { + x: 1416851730000, + y: 27, + y0: 0, + }, + { + x: 1416851760000, + y: 21, + y0: 0, + }, + { + x: 1416851790000, + y: 24, + y0: 0, + }, + { + x: 1416851820000, + y: 26, + y0: 0, + }, + { + x: 1416851850000, + y: 26, + y0: 0, + }, + { + x: 1416851880000, + y: 21, + y0: 0, + }, + { + x: 1416851910000, + y: 33, + y0: 0, + }, + { + x: 1416851940000, + y: 23, + y0: 0, + }, + { + x: 1416851970000, + y: 46, + y0: 0, + }, + { + x: 1416852000000, + y: 27, + y0: 0, + }, + { + x: 1416852030000, + y: 20, + y0: 0, + }, + { + x: 1416852060000, + y: 34, + y0: 0, + }, + { + x: 1416852090000, + y: 15, + y0: 0, + }, + { + x: 1416852120000, + y: 18, + y0: 0, + }, + ], + }, + { + label: 'css', + values: [ + { + x: 1416850320000, + y: 3, + y0: 11, + }, + { + x: 1416850350000, + y: 13, + y0: 24, + }, + { + x: 1416850380000, + y: 5, + y0: 34, + }, + { + x: 1416850410000, + y: 12, + y0: 21, + }, + { + x: 1416850440000, + y: 9, + y0: 32, + }, + { + x: 1416850470000, + y: 12, + y0: 24, + }, + { + x: 1416850500000, + y: 6, + y0: 16, + }, + { + x: 1416850530000, + y: 6, + y0: 27, + }, + { + x: 1416850560000, + y: 11, + y0: 24, + }, + { + x: 1416850590000, + y: 11, + y0: 38, + }, + { + x: 1416850620000, + y: 6, + y0: 33, + }, + { + x: 1416850650000, + y: 8, + y0: 33, + }, + { + x: 1416850680000, + y: 6, + y0: 31, + }, + { + x: 1416850710000, + y: 4, + y0: 24, + }, + { + x: 1416850740000, + y: 9, + y0: 24, + }, + { + x: 1416850770000, + y: 3, + y0: 38, + }, + { + x: 1416850800000, + y: 5, + y0: 34, + }, + { + x: 1416850830000, + y: 6, + y0: 30, + }, + { + x: 1416850860000, + y: 9, + y0: 38, + }, + { + x: 1416850890000, + y: 5, + y0: 19, + }, + { + x: 1416850920000, + y: 8, + y0: 23, + }, + { + x: 1416850950000, + y: 9, + y0: 33, + }, + { + x: 1416850980000, + y: 5, + y0: 28, + }, + { + x: 1416851010000, + y: 6, + y0: 24, + }, + { + x: 1416851040000, + y: 9, + y0: 22, + }, + { + x: 1416851070000, + y: 9, + y0: 28, + }, + { + x: 1416851100000, + y: 11, + y0: 27, + }, + { + x: 1416851130000, + y: 5, + y0: 32, + }, + { + x: 1416851160000, + y: 8, + y0: 32, + }, + { + x: 1416851190000, + y: 6, + y0: 30, + }, + { + x: 1416851220000, + y: 10, + y0: 32, + }, + { + x: 1416851250000, + y: 5, + y0: 36, + }, + { + x: 1416851280000, + y: 6, + y0: 32, + }, + { + x: 1416851310000, + y: 4, + y0: 29, + }, + { + x: 1416851340000, + y: 8, + y0: 22, + }, + { + x: 1416851370000, + y: 3, + y0: 29, + }, + { + x: 1416851400000, + y: 8, + y0: 33, + }, + { + x: 1416851430000, + y: 10, + y0: 28, + }, + { + x: 1416851460000, + y: 5, + y0: 39, + }, + { + x: 1416851490000, + y: 7, + y0: 28, + }, + { + x: 1416851520000, + y: 6, + y0: 28, + }, + { + x: 1416851550000, + y: 4, + y0: 28, + }, + { + x: 1416851580000, + y: 9, + y0: 30, + }, + { + x: 1416851610000, + y: 3, + y0: 29, + }, + { + x: 1416851640000, + y: 9, + y0: 30, + }, + { + x: 1416851670000, + y: 6, + y0: 23, + }, + { + x: 1416851700000, + y: 11, + y0: 23, + }, + { + x: 1416851730000, + y: 4, + y0: 27, + }, + { + x: 1416851760000, + y: 8, + y0: 21, + }, + { + x: 1416851790000, + y: 5, + y0: 24, + }, + { + x: 1416851820000, + y: 7, + y0: 26, + }, + { + x: 1416851850000, + y: 7, + y0: 26, + }, + { + x: 1416851880000, + y: 4, + y0: 21, + }, + { + x: 1416851910000, + y: 8, + y0: 33, + }, + { + x: 1416851940000, + y: 6, + y0: 23, + }, + { + x: 1416851970000, + y: 6, + y0: 46, + }, + { + x: 1416852000000, + y: 3, + y0: 27, + }, + { + x: 1416852030000, + y: 6, + y0: 20, + }, + { + x: 1416852060000, + y: 5, + y0: 34, + }, + { + x: 1416852090000, + y: 5, + y0: 15, + }, + { + x: 1416852120000, + y: 1, + y0: 18, + }, + ], + }, + { + label: 'gif', + values: [ + { + x: 1416850320000, + y: 1, + y0: 14, + }, + { + x: 1416850350000, + y: 2, + y0: 37, + }, + { + x: 1416850380000, + y: 4, + y0: 39, + }, + { + x: 1416850410000, + y: 2, + y0: 33, + }, + { + x: 1416850440000, + y: 3, + y0: 41, + }, + { + x: 1416850470000, + y: 1, + y0: 36, + }, + { + x: 1416850500000, + y: 1, + y0: 22, + }, + { + x: 1416850530000, + y: 1, + y0: 33, + }, + { + x: 1416850560000, + y: 2, + y0: 35, + }, + { + x: 1416850590000, + y: 5, + y0: 49, + }, + { + x: 1416850620000, + y: 1, + y0: 39, + }, + { + x: 1416850650000, + y: 1, + y0: 41, + }, + { + x: 1416850680000, + y: 4, + y0: 37, + }, + { + x: 1416850710000, + y: 1, + y0: 28, + }, + { + x: 1416850740000, + y: 3, + y0: 33, + }, + { + x: 1416850770000, + y: 2, + y0: 41, + }, + { + x: 1416850800000, + y: 2, + y0: 39, + }, + { + x: 1416850830000, + y: 5, + y0: 36, + }, + { + x: 1416850860000, + y: 3, + y0: 47, + }, + { + x: 1416850890000, + y: 1, + y0: 24, + }, + { + x: 1416850920000, + y: 3, + y0: 31, + }, + { + x: 1416850950000, + y: 4, + y0: 42, + }, + { + x: 1416850980000, + y: 3, + y0: 33, + }, + { + x: 1416851010000, + y: 5, + y0: 30, + }, + { + x: 1416851040000, + y: 2, + y0: 31, + }, + { + x: 1416851070000, + y: 3, + y0: 37, + }, + { + x: 1416851100000, + y: 5, + y0: 38, + }, + { + x: 1416851130000, + y: 3, + y0: 37, + }, + { + x: 1416851160000, + y: 4, + y0: 40, + }, + { + x: 1416851190000, + y: 9, + y0: 36, + }, + { + x: 1416851220000, + y: 7, + y0: 42, + }, + { + x: 1416851250000, + y: 2, + y0: 41, + }, + { + x: 1416851280000, + y: 1, + y0: 38, + }, + { + x: 1416851310000, + y: 2, + y0: 33, + }, + { + x: 1416851340000, + y: 5, + y0: 30, + }, + { + x: 1416851370000, + y: 3, + y0: 32, + }, + { + x: 1416851400000, + y: 5, + y0: 41, + }, + { + x: 1416851430000, + y: 4, + y0: 38, + }, + { + x: 1416851460000, + y: 5, + y0: 44, + }, + { + x: 1416851490000, + y: 2, + y0: 35, + }, + { + x: 1416851520000, + y: 2, + y0: 34, + }, + { + x: 1416851550000, + y: 4, + y0: 32, + }, + { + x: 1416851580000, + y: 3, + y0: 39, + }, + { + x: 1416851610000, + y: 4, + y0: 32, + }, + { + x: 1416851640000, + y: 0, + y0: 39, + }, + { + x: 1416851670000, + y: 2, + y0: 29, + }, + { + x: 1416851700000, + y: 1, + y0: 34, + }, + { + x: 1416851730000, + y: 3, + y0: 31, + }, + { + x: 1416851760000, + y: 0, + y0: 29, + }, + { + x: 1416851790000, + y: 4, + y0: 29, + }, + { + x: 1416851820000, + y: 3, + y0: 33, + }, + { + x: 1416851850000, + y: 3, + y0: 33, + }, + { + x: 1416851880000, + y: 0, + y0: 25, + }, + { + x: 1416851910000, + y: 0, + y0: 41, + }, + { + x: 1416851940000, + y: 3, + y0: 29, + }, + { + x: 1416851970000, + y: 3, + y0: 52, + }, + { + x: 1416852000000, + y: 1, + y0: 30, + }, + { + x: 1416852030000, + y: 5, + y0: 26, + }, + { + x: 1416852060000, + y: 3, + y0: 39, + }, + { + x: 1416852090000, + y: 1, + y0: 20, + }, + { + x: 1416852120000, + y: 2, + y0: 19, + }, + ], + }, + { + label: 'png', + values: [ + { + x: 1416850320000, + y: 1, + y0: 15, + }, + { + x: 1416850350000, + y: 6, + y0: 39, + }, + { + x: 1416850380000, + y: 6, + y0: 43, + }, + { + x: 1416850410000, + y: 5, + y0: 35, + }, + { + x: 1416850440000, + y: 3, + y0: 44, + }, + { + x: 1416850470000, + y: 5, + y0: 37, + }, + { + x: 1416850500000, + y: 6, + y0: 23, + }, + { + x: 1416850530000, + y: 1, + y0: 34, + }, + { + x: 1416850560000, + y: 3, + y0: 37, + }, + { + x: 1416850590000, + y: 2, + y0: 54, + }, + { + x: 1416850620000, + y: 1, + y0: 40, + }, + { + x: 1416850650000, + y: 1, + y0: 42, + }, + { + x: 1416850680000, + y: 2, + y0: 41, + }, + { + x: 1416850710000, + y: 5, + y0: 29, + }, + { + x: 1416850740000, + y: 7, + y0: 36, + }, + { + x: 1416850770000, + y: 2, + y0: 43, + }, + { + x: 1416850800000, + y: 3, + y0: 41, + }, + { + x: 1416850830000, + y: 6, + y0: 41, + }, + { + x: 1416850860000, + y: 2, + y0: 50, + }, + { + x: 1416850890000, + y: 4, + y0: 25, + }, + { + x: 1416850920000, + y: 2, + y0: 34, + }, + { + x: 1416850950000, + y: 3, + y0: 46, + }, + { + x: 1416850980000, + y: 8, + y0: 36, + }, + { + x: 1416851010000, + y: 4, + y0: 35, + }, + { + x: 1416851040000, + y: 4, + y0: 33, + }, + { + x: 1416851070000, + y: 1, + y0: 40, + }, + { + x: 1416851100000, + y: 2, + y0: 43, + }, + { + x: 1416851130000, + y: 4, + y0: 40, + }, + { + x: 1416851160000, + y: 3, + y0: 44, + }, + { + x: 1416851190000, + y: 4, + y0: 45, + }, + { + x: 1416851220000, + y: 2, + y0: 49, + }, + { + x: 1416851250000, + y: 4, + y0: 43, + }, + { + x: 1416851280000, + y: 8, + y0: 39, + }, + { + x: 1416851310000, + y: 4, + y0: 35, + }, + { + x: 1416851340000, + y: 4, + y0: 35, + }, + { + x: 1416851370000, + y: 7, + y0: 35, + }, + { + x: 1416851400000, + y: 2, + y0: 46, + }, + { + x: 1416851430000, + y: 3, + y0: 42, + }, + { + x: 1416851460000, + y: 3, + y0: 49, + }, + { + x: 1416851490000, + y: 3, + y0: 37, + }, + { + x: 1416851520000, + y: 4, + y0: 36, + }, + { + x: 1416851550000, + y: 3, + y0: 36, + }, + { + x: 1416851580000, + y: 4, + y0: 42, + }, + { + x: 1416851610000, + y: 5, + y0: 36, + }, + { + x: 1416851640000, + y: 3, + y0: 39, + }, + { + x: 1416851670000, + y: 3, + y0: 31, + }, + { + x: 1416851700000, + y: 2, + y0: 35, + }, + { + x: 1416851730000, + y: 5, + y0: 34, + }, + { + x: 1416851760000, + y: 4, + y0: 29, + }, + { + x: 1416851790000, + y: 5, + y0: 33, + }, + { + x: 1416851820000, + y: 1, + y0: 36, + }, + { + x: 1416851850000, + y: 3, + y0: 36, + }, + { + x: 1416851880000, + y: 6, + y0: 25, + }, + { + x: 1416851910000, + y: 4, + y0: 41, + }, + { + x: 1416851940000, + y: 7, + y0: 32, + }, + { + x: 1416851970000, + y: 5, + y0: 55, + }, + { + x: 1416852000000, + y: 2, + y0: 31, + }, + { + x: 1416852030000, + y: 2, + y0: 31, + }, + { + x: 1416852060000, + y: 4, + y0: 42, + }, + { + x: 1416852090000, + y: 6, + y0: 21, + }, + { + x: 1416852120000, + y: 2, + y0: 21, + }, + ], + }, + { + label: 'php', + values: [ + { + x: 1416850320000, + y: 0, + y0: 16, + }, + { + x: 1416850350000, + y: 1, + y0: 45, + }, + { + x: 1416850380000, + y: 0, + y0: 49, + }, + { + x: 1416850410000, + y: 2, + y0: 40, + }, + { + x: 1416850440000, + y: 0, + y0: 47, + }, + { + x: 1416850470000, + y: 0, + y0: 42, + }, + { + x: 1416850500000, + y: 3, + y0: 29, + }, + { + x: 1416850530000, + y: 1, + y0: 35, + }, + { + x: 1416850560000, + y: 3, + y0: 40, + }, + { + x: 1416850590000, + y: 2, + y0: 56, + }, + { + x: 1416850620000, + y: 2, + y0: 41, + }, + { + x: 1416850650000, + y: 5, + y0: 43, + }, + { + x: 1416850680000, + y: 2, + y0: 43, + }, + { + x: 1416850710000, + y: 1, + y0: 34, + }, + { + x: 1416850740000, + y: 2, + y0: 43, + }, + { + x: 1416850770000, + y: 2, + y0: 45, + }, + { + x: 1416850800000, + y: 1, + y0: 44, + }, + { + x: 1416850830000, + y: 1, + y0: 47, + }, + { + x: 1416850860000, + y: 1, + y0: 52, + }, + { + x: 1416850890000, + y: 1, + y0: 29, + }, + { + x: 1416850920000, + y: 2, + y0: 36, + }, + { + x: 1416850950000, + y: 2, + y0: 49, + }, + { + x: 1416850980000, + y: 0, + y0: 44, + }, + { + x: 1416851010000, + y: 3, + y0: 39, + }, + { + x: 1416851040000, + y: 2, + y0: 37, + }, + { + x: 1416851070000, + y: 2, + y0: 41, + }, + { + x: 1416851100000, + y: 2, + y0: 45, + }, + { + x: 1416851130000, + y: 0, + y0: 44, + }, + { + x: 1416851160000, + y: 1, + y0: 47, + }, + { + x: 1416851190000, + y: 2, + y0: 49, + }, + { + x: 1416851220000, + y: 4, + y0: 51, + }, + { + x: 1416851250000, + y: 0, + y0: 47, + }, + { + x: 1416851280000, + y: 3, + y0: 47, + }, + { + x: 1416851310000, + y: 3, + y0: 39, + }, + { + x: 1416851340000, + y: 2, + y0: 39, + }, + { + x: 1416851370000, + y: 2, + y0: 42, + }, + { + x: 1416851400000, + y: 3, + y0: 48, + }, + { + x: 1416851430000, + y: 1, + y0: 45, + }, + { + x: 1416851460000, + y: 0, + y0: 52, + }, + { + x: 1416851490000, + y: 2, + y0: 40, + }, + { + x: 1416851520000, + y: 1, + y0: 40, + }, + { + x: 1416851550000, + y: 3, + y0: 39, + }, + { + x: 1416851580000, + y: 1, + y0: 46, + }, + { + x: 1416851610000, + y: 2, + y0: 41, + }, + { + x: 1416851640000, + y: 1, + y0: 42, + }, + { + x: 1416851670000, + y: 2, + y0: 34, + }, + { + x: 1416851700000, + y: 3, + y0: 37, + }, + { + x: 1416851730000, + y: 1, + y0: 39, + }, + { + x: 1416851760000, + y: 1, + y0: 33, + }, + { + x: 1416851790000, + y: 1, + y0: 38, + }, + { + x: 1416851820000, + y: 1, + y0: 37, + }, + { + x: 1416851850000, + y: 1, + y0: 39, + }, + { + x: 1416851880000, + y: 1, + y0: 31, + }, + { + x: 1416851910000, + y: 2, + y0: 45, + }, + { + x: 1416851940000, + y: 0, + y0: 39, + }, + { + x: 1416851970000, + y: 0, + y0: 60, + }, + { + x: 1416852000000, + y: 1, + y0: 33, + }, + { + x: 1416852030000, + y: 2, + y0: 33, + }, + { + x: 1416852060000, + y: 1, + y0: 46, + }, + { + x: 1416852090000, + y: 1, + y0: 27, + }, + { + x: 1416852120000, + y: 0, + y0: 23, + }, + ], + }, + ], + hits: 2595, + xAxisFormatter: function(thing) { + return moment(thing); + }, + tooltipFormatter: function(d) { + return d; + }, +}; diff --git a/src/plugins/vis_type_vislib/public/fixtures/mock_data/terms/_columns.js b/src/plugins/vis_type_vislib/public/fixtures/mock_data/terms/_columns.js new file mode 100644 index 00000000000000..8891d9badb2be3 --- /dev/null +++ b/src/plugins/vis_type_vislib/public/fixtures/mock_data/terms/_columns.js @@ -0,0 +1,159 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import _ from 'lodash'; + +export default { + columns: [ + { + label: 'logstash: index', + xAxisLabel: 'Top 5 extension', + yAxisLabel: 'Count of documents', + series: [ + { + label: 'Count', + values: [ + { + x: 'jpg', + y: 110710, + }, + { + x: 'css', + y: 27376, + }, + { + x: 'png', + y: 16664, + }, + { + x: 'gif', + y: 11264, + }, + { + x: 'php', + y: 5448, + }, + ], + }, + ], + xAxisFormatter: function(val) { + if (_.isObject(val)) { + return JSON.stringify(val); + } else if (val == null) { + return ''; + } else { + return '' + val; + } + }, + tooltipFormatter: function(d) { + return d; + }, + }, + { + label: '2014.11.12: index', + xAxisLabel: 'Top 5 extension', + yAxisLabel: 'Count of documents', + series: [ + { + label: 'Count', + values: [ + { + x: 'jpg', + y: 110643, + }, + { + x: 'css', + y: 27350, + }, + { + x: 'png', + y: 16648, + }, + { + x: 'gif', + y: 11257, + }, + { + x: 'php', + y: 5440, + }, + ], + }, + ], + xAxisFormatter: function(val) { + if (_.isObject(val)) { + return JSON.stringify(val); + } else if (val == null) { + return ''; + } else { + return '' + val; + } + }, + tooltipFormatter: function(d) { + return d; + }, + }, + { + label: '2014.11.11: index', + xAxisLabel: 'Top 5 extension', + yAxisLabel: 'Count of documents', + series: [ + { + label: 'Count', + values: [ + { + x: 'jpg', + y: 67, + }, + { + x: 'css', + y: 26, + }, + { + x: 'png', + y: 16, + }, + { + x: 'gif', + y: 7, + }, + { + x: 'php', + y: 8, + }, + ], + }, + ], + xAxisFormatter: function(val) { + if (_.isObject(val)) { + return JSON.stringify(val); + } else if (val == null) { + return ''; + } else { + return '' + val; + } + }, + tooltipFormatter: function(d) { + return d; + }, + }, + ], + xAxisOrderedValues: ['jpg', 'css', 'png', 'gif', 'php'], + hits: 171462, +}; diff --git a/src/plugins/vis_type_vislib/public/fixtures/mock_data/terms/_rows.js b/src/plugins/vis_type_vislib/public/fixtures/mock_data/terms/_rows.js new file mode 100644 index 00000000000000..09a1c159897603 --- /dev/null +++ b/src/plugins/vis_type_vislib/public/fixtures/mock_data/terms/_rows.js @@ -0,0 +1,115 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import _ from 'lodash'; + +export default { + rows: [ + { + label: '0.0-1000.0: bytes', + xAxisLabel: 'Top 5 extension', + yAxisLabel: 'Count of documents', + series: [ + { + label: 'Count', + values: [ + { + x: 'jpg', + y: 3378, + }, + { + x: 'css', + y: 762, + }, + { + x: 'png', + y: 527, + }, + { + x: 'gif', + y: 11258, + }, + { + x: 'php', + y: 653, + }, + ], + }, + ], + xAxisFormatter: function(val) { + if (_.isObject(val)) { + return JSON.stringify(val); + } else if (val == null) { + return ''; + } else { + return '' + val; + } + }, + tooltipFormatter: function(d) { + return d; + }, + }, + { + label: '1000.0-2000.0: bytes', + xAxisLabel: 'Top 5 extension', + yAxisLabel: 'Count of documents', + series: [ + { + label: 'Count', + values: [ + { + x: 'jpg', + y: 6422, + }, + { + x: 'css', + y: 1591, + }, + { + x: 'png', + y: 430, + }, + { + x: 'gif', + y: 8, + }, + { + x: 'php', + y: 561, + }, + ], + }, + ], + xAxisFormatter: function(val) { + if (_.isObject(val)) { + return JSON.stringify(val); + } else if (val == null) { + return ''; + } else { + return '' + val; + } + }, + tooltipFormatter: function(d) { + return d; + }, + }, + ], + xAxisOrderedValues: ['jpg', 'css', 'png', 'gif', 'php'], + hits: 171458, +}; diff --git a/src/plugins/vis_type_vislib/public/fixtures/mock_data/terms/_series.js b/src/plugins/vis_type_vislib/public/fixtures/mock_data/terms/_series.js new file mode 100644 index 00000000000000..c55bff5631e888 --- /dev/null +++ b/src/plugins/vis_type_vislib/public/fixtures/mock_data/terms/_series.js @@ -0,0 +1,67 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import _ from 'lodash'; + +export default { + label: '', + xAxisLabel: 'Top 5 extension', + xAxisOrderedValues: ['jpg', 'css', 'png', 'gif', 'php'], + yAxisLabel: 'Count of documents', + series: [ + { + label: 'Count', + values: [ + { + x: 'jpg', + y: 110710, + }, + { + x: 'css', + y: 27389, + }, + { + x: 'png', + y: 16661, + }, + { + x: 'gif', + y: 11269, + }, + { + x: 'php', + y: 5447, + }, + ], + }, + ], + hits: 171476, + xAxisFormatter: function(val) { + if (_.isObject(val)) { + return JSON.stringify(val); + } else if (val == null) { + return ''; + } else { + return '' + val; + } + }, + tooltipFormatter: function(d) { + return d; + }, +}; diff --git a/src/plugins/vis_type_vislib/public/fixtures/mock_data/terms/_series_multiple.js b/src/plugins/vis_type_vislib/public/fixtures/mock_data/terms/_series_multiple.js new file mode 100644 index 00000000000000..372325120ee8ec --- /dev/null +++ b/src/plugins/vis_type_vislib/public/fixtures/mock_data/terms/_series_multiple.js @@ -0,0 +1,105 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import _ from 'lodash'; + +export default { + xAxisOrderedValues: ['_all'], + yAxisLabel: 'Count', + zAxisLabel: 'machine.os.raw: Descending', + yScale: null, + series: [ + { + label: 'ios', + id: '1', + yAxisFormatter: _.identity, + values: [ + { + x: '_all', + y: 2820, + series: 'ios', + }, + ], + }, + { + label: 'win 7', + aggId: '1', + yAxisFormatter: _.identity, + values: [ + { + x: '_all', + y: 2319, + series: 'win 7', + }, + ], + }, + { + label: 'win 8', + id: '1', + yAxisFormatter: _.identity, + values: [ + { + x: '_all', + y: 1835, + series: 'win 8', + }, + ], + }, + { + label: 'windows xp service pack 2 version 20123452', + id: '1', + yAxisFormatter: _.identity, + values: [ + { + x: '_all', + y: 734, + series: 'win xp', + }, + ], + }, + { + label: 'osx', + id: '1', + yAxisFormatter: _.identity, + values: [ + { + x: '_all', + y: 1352, + series: 'osx', + }, + ], + }, + ], + hits: 14005, + xAxisFormatter: function(val) { + if (_.isObject(val)) { + return JSON.stringify(val); + } else if (val == null) { + return ''; + } else { + return '' + val; + } + }, + yAxisFormatter: function(val) { + return val; + }, + tooltipFormatter: function(d) { + return d; + }, +}; diff --git a/src/plugins/vis_type_vislib/public/fixtures/mocks.js b/src/plugins/vis_type_vislib/public/fixtures/mocks.js new file mode 100644 index 00000000000000..60edf6c1ff05cc --- /dev/null +++ b/src/plugins/vis_type_vislib/public/fixtures/mocks.js @@ -0,0 +1,37 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { setFormatService } from '../services'; + +setFormatService({ + deserialize: () => ({ + convert: v => v, + }), +}); + +export const getMockUiState = () => { + const map = new Map(); + + return (() => ({ + get: (...args) => map.get(...args), + set: (...args) => map.set(...args), + setSilent: (...args) => map.set(...args), + on: () => undefined, + }))(); +}; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/gauge.ts b/src/plugins/vis_type_vislib/public/gauge.ts similarity index 93% rename from src/legacy/core_plugins/vis_type_vislib/public/gauge.ts rename to src/plugins/vis_type_vislib/public/gauge.ts index 5e0b2b8fbd36cb..561c45d26fa7f6 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/gauge.ts +++ b/src/plugins/vis_type_vislib/public/gauge.ts @@ -19,17 +19,11 @@ import { i18n } from '@kbn/i18n'; -import { RangeValues, Schemas } from '../../../../plugins/vis_default_editor/public'; -import { AggGroupNames } from '../../../../plugins/data/public'; +import { RangeValues, Schemas } from '../../vis_default_editor/public'; +import { AggGroupNames } from '../../data/public'; import { GaugeOptions } from './components/options'; import { getGaugeCollections, Alignments, GaugeTypes } from './utils/collections'; -import { - ColorModes, - ColorSchemas, - ColorSchemaParams, - Labels, - Style, -} from '../../../../plugins/charts/public'; +import { ColorModes, ColorSchemas, ColorSchemaParams, Labels, Style } from '../../charts/public'; import { createVislibVisController } from './vis_controller'; import { VisTypeVislibDependencies } from './plugin'; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/goal.ts b/src/plugins/vis_type_vislib/public/goal.ts similarity index 94% rename from src/legacy/core_plugins/vis_type_vislib/public/goal.ts rename to src/plugins/vis_type_vislib/public/goal.ts index 0f70dca69728d2..5f74698938a0b1 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/goal.ts +++ b/src/plugins/vis_type_vislib/public/goal.ts @@ -23,9 +23,9 @@ import { GaugeOptions } from './components/options'; import { getGaugeCollections, GaugeTypes } from './utils/collections'; import { createVislibVisController } from './vis_controller'; import { VisTypeVislibDependencies } from './plugin'; -import { ColorModes, ColorSchemas } from '../../../../plugins/charts/public'; -import { AggGroupNames } from '../../../../plugins/data/public'; -import { Schemas } from '../../../../plugins/vis_default_editor/public'; +import { ColorModes, ColorSchemas } from '../../charts/public'; +import { AggGroupNames } from '../../data/public'; +import { Schemas } from '../../vis_default_editor/public'; export const createGoalVisTypeDefinition = (deps: VisTypeVislibDependencies) => ({ name: 'goal', diff --git a/src/legacy/core_plugins/vis_type_vislib/public/heatmap.ts b/src/plugins/vis_type_vislib/public/heatmap.ts similarity index 94% rename from src/legacy/core_plugins/vis_type_vislib/public/heatmap.ts rename to src/plugins/vis_type_vislib/public/heatmap.ts index 9feed60b984bae..ced7a38568ffd0 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/heatmap.ts +++ b/src/plugins/vis_type_vislib/public/heatmap.ts @@ -19,15 +19,15 @@ import { i18n } from '@kbn/i18n'; -import { RangeValues, Schemas } from '../../../../plugins/vis_default_editor/public'; -import { AggGroupNames } from '../../../../plugins/data/public'; +import { RangeValues, Schemas } from '../../vis_default_editor/public'; +import { AggGroupNames } from '../../data/public'; import { AxisTypes, getHeatmapCollections, Positions, ScaleTypes } from './utils/collections'; import { HeatmapOptions } from './components/options'; import { createVislibVisController } from './vis_controller'; import { TimeMarker } from './vislib/visualizations/time_marker'; import { CommonVislibParams, ValueAxis } from './types'; import { VisTypeVislibDependencies } from './plugin'; -import { ColorSchemas, ColorSchemaParams } from '../../../../plugins/charts/public'; +import { ColorSchemas, ColorSchemaParams } from '../../charts/public'; export interface HeatmapVisParams extends CommonVislibParams, ColorSchemaParams { type: 'heatmap'; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/histogram.ts b/src/plugins/vis_type_vislib/public/histogram.ts similarity index 96% rename from src/legacy/core_plugins/vis_type_vislib/public/histogram.ts rename to src/plugins/vis_type_vislib/public/histogram.ts index 54ccf66f362ca3..52242ad11e8f58 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/histogram.ts +++ b/src/plugins/vis_type_vislib/public/histogram.ts @@ -23,8 +23,8 @@ import { palettes } from '@elastic/eui/lib/services'; // @ts-ignore import { euiPaletteColorBlind } from '@elastic/eui/lib/services'; -import { AggGroupNames } from '../../../../plugins/data/public'; -import { Schemas } from '../../../../plugins/vis_default_editor/public'; +import { AggGroupNames } from '../../data/public'; +import { Schemas } from '../../vis_default_editor/public'; import { Positions, ChartTypes, @@ -38,7 +38,7 @@ import { import { getAreaOptionTabs, countLabel } from './utils/common_config'; import { createVislibVisController } from './vis_controller'; import { VisTypeVislibDependencies } from './plugin'; -import { Rotates } from '../../../../plugins/charts/public'; +import { Rotates } from '../../charts/public'; export const createHistogramVisTypeDefinition = (deps: VisTypeVislibDependencies) => ({ name: 'histogram', diff --git a/src/legacy/core_plugins/vis_type_vislib/public/horizontal_bar.ts b/src/plugins/vis_type_vislib/public/horizontal_bar.ts similarity index 93% rename from src/legacy/core_plugins/vis_type_vislib/public/horizontal_bar.ts rename to src/plugins/vis_type_vislib/public/horizontal_bar.ts index 6f732717266601..a58c15f136431e 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/horizontal_bar.ts +++ b/src/plugins/vis_type_vislib/public/horizontal_bar.ts @@ -19,12 +19,10 @@ import { i18n } from '@kbn/i18n'; // @ts-ignore -import { palettes } from '@elastic/eui/lib/services'; -// @ts-ignore -import { euiPaletteColorBlind } from '@elastic/eui/lib/services'; +import { palettes, euiPaletteColorBlind } from '@elastic/eui/lib/services'; -import { AggGroupNames } from '../../../../plugins/data/public'; -import { Schemas } from '../../../../plugins/vis_default_editor/public'; +import { AggGroupNames } from '../../data/public'; +import { Schemas } from '../../vis_default_editor/public'; import { Positions, ChartTypes, @@ -38,7 +36,7 @@ import { import { getAreaOptionTabs, countLabel } from './utils/common_config'; import { createVislibVisController } from './vis_controller'; import { VisTypeVislibDependencies } from './plugin'; -import { Rotates } from '../../../../plugins/charts/public'; +import { Rotates } from '../../charts/public'; export const createHorizontalBarVisTypeDefinition = (deps: VisTypeVislibDependencies) => ({ name: 'horizontal_bar', diff --git a/src/legacy/core_plugins/vis_type_vislib/public/_index.scss b/src/plugins/vis_type_vislib/public/index.scss similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/_index.scss rename to src/plugins/vis_type_vislib/public/index.scss diff --git a/src/legacy/core_plugins/vis_type_vislib/public/index.ts b/src/plugins/vis_type_vislib/public/index.ts similarity index 93% rename from src/legacy/core_plugins/vis_type_vislib/public/index.ts rename to src/plugins/vis_type_vislib/public/index.ts index 4d7091ffb204be..665643a6763f6b 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/index.ts +++ b/src/plugins/vis_type_vislib/public/index.ts @@ -17,7 +17,7 @@ * under the License. */ -import { PluginInitializerContext } from '../../../../core/public'; +import { PluginInitializerContext } from '../../../core/public'; import { VisTypeVislibPlugin as Plugin } from './plugin'; export function plugin(initializerContext: PluginInitializerContext) { diff --git a/src/legacy/core_plugins/vis_type_vislib/public/line.ts b/src/plugins/vis_type_vislib/public/line.ts similarity index 93% rename from src/legacy/core_plugins/vis_type_vislib/public/line.ts rename to src/plugins/vis_type_vislib/public/line.ts index 1f9a8d77398e63..a94fd3f3945ab7 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/line.ts +++ b/src/plugins/vis_type_vislib/public/line.ts @@ -19,12 +19,10 @@ import { i18n } from '@kbn/i18n'; // @ts-ignore -import { palettes } from '@elastic/eui/lib/services'; -// @ts-ignore -import { euiPaletteColorBlind } from '@elastic/eui/lib/services'; +import { palettes, euiPaletteColorBlind } from '@elastic/eui/lib/services'; -import { AggGroupNames } from '../../../../plugins/data/public'; -import { Schemas } from '../../../../plugins/vis_default_editor/public'; +import { AggGroupNames } from '../../data/public'; +import { Schemas } from '../../vis_default_editor/public'; import { Positions, ChartTypes, @@ -39,7 +37,7 @@ import { import { getAreaOptionTabs, countLabel } from './utils/common_config'; import { createVislibVisController } from './vis_controller'; import { VisTypeVislibDependencies } from './plugin'; -import { Rotates } from '../../../../plugins/charts/public'; +import { Rotates } from '../../charts/public'; export const createLineVisTypeDefinition = (deps: VisTypeVislibDependencies) => ({ name: 'line', diff --git a/src/legacy/core_plugins/vis_type_vislib/public/pie.ts b/src/plugins/vis_type_vislib/public/pie.ts similarity index 95% rename from src/legacy/core_plugins/vis_type_vislib/public/pie.ts rename to src/plugins/vis_type_vislib/public/pie.ts index 2774836baa3817..a68bc5893406f5 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/pie.ts +++ b/src/plugins/vis_type_vislib/public/pie.ts @@ -19,8 +19,8 @@ import { i18n } from '@kbn/i18n'; -import { AggGroupNames } from '../../../../plugins/data/public'; -import { Schemas } from '../../../../plugins/vis_default_editor/public'; +import { AggGroupNames } from '../../data/public'; +import { Schemas } from '../../vis_default_editor/public'; import { PieOptions } from './components/options'; import { getPositions, Positions } from './utils/collections'; import { createVislibVisController } from './vis_controller'; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/pie_fn.test.ts b/src/plugins/vis_type_vislib/public/pie_fn.test.ts similarity index 94% rename from src/legacy/core_plugins/vis_type_vislib/public/pie_fn.test.ts rename to src/plugins/vis_type_vislib/public/pie_fn.test.ts index 15c80e47194872..a8c03eba2b4499 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/pie_fn.test.ts +++ b/src/plugins/vis_type_vislib/public/pie_fn.test.ts @@ -18,12 +18,11 @@ */ // eslint-disable-next-line -import { functionWrapper } from '../../../../plugins/expressions/common/expression_functions/specs/tests/utils'; +import { functionWrapper } from '../../expressions/common/expression_functions/specs/tests/utils'; import { createPieVisFn } from './pie_fn'; // @ts-ignore import { vislibSlicesResponseHandler } from './vislib/response_handler'; -jest.mock('ui/new_platform'); jest.mock('./vislib/response_handler', () => ({ vislibSlicesResponseHandler: jest.fn().mockReturnValue({ hits: 1, diff --git a/src/legacy/core_plugins/vis_type_vislib/public/pie_fn.ts b/src/plugins/vis_type_vislib/public/pie_fn.ts similarity index 94% rename from src/legacy/core_plugins/vis_type_vislib/public/pie_fn.ts rename to src/plugins/vis_type_vislib/public/pie_fn.ts index 452e0be0df3e4a..52da0f7ac14eca 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/pie_fn.ts +++ b/src/plugins/vis_type_vislib/public/pie_fn.ts @@ -18,11 +18,7 @@ */ import { i18n } from '@kbn/i18n'; -import { - ExpressionFunctionDefinition, - KibanaDatatable, - Render, -} from '../../../../plugins/expressions/public'; +import { ExpressionFunctionDefinition, KibanaDatatable, Render } from '../../expressions/public'; // @ts-ignore import { vislibSlicesResponseHandler } from './vislib/response_handler'; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/plugin.ts b/src/plugins/vis_type_vislib/public/plugin.ts similarity index 92% rename from src/legacy/core_plugins/vis_type_vislib/public/plugin.ts rename to src/plugins/vis_type_vislib/public/plugin.ts index 26800f8a1620ed..e19a2ec451f2b8 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/plugin.ts +++ b/src/plugins/vis_type_vislib/public/plugin.ts @@ -16,6 +16,9 @@ * specific language governing permissions and limitations * under the License. */ + +import './index.scss'; + import { CoreSetup, CoreStart, @@ -25,8 +28,8 @@ import { } from 'kibana/public'; import { VisTypeXyPluginSetup } from 'src/plugins/vis_type_xy/public'; -import { Plugin as ExpressionsPublicPlugin } from '../../../../plugins/expressions/public'; -import { VisualizationsSetup } from '../../../../plugins/visualizations/public'; +import { Plugin as ExpressionsPublicPlugin } from '../../expressions/public'; +import { VisualizationsSetup } from '../../visualizations/public'; import { createVisTypeVislibVisFn } from './vis_type_vislib_vis_fn'; import { createPieVisFn } from './pie_fn'; import { @@ -39,8 +42,8 @@ import { createGaugeVisTypeDefinition, createGoalVisTypeDefinition, } from './vis_type_vislib_vis_types'; -import { ChartsPluginSetup } from '../../../../plugins/charts/public'; -import { DataPublicPluginStart } from '../../../../plugins/data/public'; +import { ChartsPluginSetup } from '../../charts/public'; +import { DataPublicPluginStart } from '../../data/public'; import { setFormatService, setDataActions } from './services'; export interface VisTypeVislibDependencies { diff --git a/src/legacy/core_plugins/vis_type_vislib/public/services.ts b/src/plugins/vis_type_vislib/public/services.ts similarity index 87% rename from src/legacy/core_plugins/vis_type_vislib/public/services.ts rename to src/plugins/vis_type_vislib/public/services.ts index 0d6b1b5e8de589..633fae9c7f2a61 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/services.ts +++ b/src/plugins/vis_type_vislib/public/services.ts @@ -17,8 +17,8 @@ * under the License. */ -import { createGetterSetter } from '../../../../plugins/kibana_utils/public'; -import { DataPublicPluginStart } from '../../../../plugins/data/public'; +import { createGetterSetter } from '../../kibana_utils/public'; +import { DataPublicPluginStart } from '../../data/public'; export const [getDataActions, setDataActions] = createGetterSetter< DataPublicPluginStart['actions'] diff --git a/src/legacy/core_plugins/vis_type_vislib/public/types.ts b/src/plugins/vis_type_vislib/public/types.ts similarity index 97% rename from src/legacy/core_plugins/vis_type_vislib/public/types.ts rename to src/plugins/vis_type_vislib/public/types.ts index 25c6ae5439fe85..83d0b49b1c5518 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/types.ts +++ b/src/plugins/vis_type_vislib/public/types.ts @@ -28,7 +28,7 @@ import { ScaleTypes, ThresholdLineStyles, } from './utils/collections'; -import { Labels, Style } from '../../../../plugins/charts/public'; +import { Labels, Style } from '../../charts/public'; export interface CommonVislibParams { addTooltip: boolean; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/utils/collections.ts b/src/plugins/vis_type_vislib/public/utils/collections.ts similarity index 99% rename from src/legacy/core_plugins/vis_type_vislib/public/utils/collections.ts rename to src/plugins/vis_type_vislib/public/utils/collections.ts index 2024c43dd1c8b4..44df4864bfd68c 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/utils/collections.ts +++ b/src/plugins/vis_type_vislib/public/utils/collections.ts @@ -20,7 +20,7 @@ import { i18n } from '@kbn/i18n'; import { $Values } from '@kbn/utility-types'; -import { colorSchemas, Rotates } from '../../../../../plugins/charts/public'; +import { colorSchemas, Rotates } from '../../../charts/public'; export const Positions = Object.freeze({ RIGHT: 'right' as 'right', diff --git a/src/legacy/core_plugins/vis_type_vislib/public/utils/common_config.tsx b/src/plugins/vis_type_vislib/public/utils/common_config.tsx similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/utils/common_config.tsx rename to src/plugins/vis_type_vislib/public/utils/common_config.tsx diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vis_controller.tsx b/src/plugins/vis_type_vislib/public/vis_controller.tsx similarity index 96% rename from src/legacy/core_plugins/vis_type_vislib/public/vis_controller.tsx rename to src/plugins/vis_type_vislib/public/vis_controller.tsx index ec091e5d29cfdf..65acc08b58da02 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/vis_controller.tsx +++ b/src/plugins/vis_type_vislib/public/vis_controller.tsx @@ -24,9 +24,9 @@ import React, { RefObject } from 'react'; import { Vis as Vislib } from './vislib/vis'; import { Positions } from './utils/collections'; import { VisTypeVislibDependencies } from './plugin'; -import { mountReactNode } from '../../../../core/public/utils'; +import { mountReactNode } from '../../../core/public/utils'; import { VisLegend, CUSTOM_LEGEND_VIS_TYPES } from './vislib/components/legend'; -import { VisParams, ExprVis } from '../../../../plugins/visualizations/public'; +import { VisParams, ExprVis } from '../../visualizations/public'; const legendClassName = { top: 'visLib--legend-top', diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vis_type_vislib_vis_fn.ts b/src/plugins/vis_type_vislib/public/vis_type_vislib_vis_fn.ts similarity index 94% rename from src/legacy/core_plugins/vis_type_vislib/public/vis_type_vislib_vis_fn.ts rename to src/plugins/vis_type_vislib/public/vis_type_vislib_vis_fn.ts index 854b70b04e58a6..a4243c6d25c417 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/vis_type_vislib_vis_fn.ts +++ b/src/plugins/vis_type_vislib/public/vis_type_vislib_vis_fn.ts @@ -18,11 +18,7 @@ */ import { i18n } from '@kbn/i18n'; -import { - ExpressionFunctionDefinition, - KibanaDatatable, - Render, -} from '../../../../plugins/expressions/public'; +import { ExpressionFunctionDefinition, KibanaDatatable, Render } from '../../expressions/public'; // @ts-ignore import { vislibSeriesResponseHandler } from './vislib/response_handler'; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vis_type_vislib_vis_types.ts b/src/plugins/vis_type_vislib/public/vis_type_vislib_vis_types.ts similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vis_type_vislib_vis_types.ts rename to src/plugins/vis_type_vislib/public/vis_type_vislib_vis_types.ts diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/VISLIB.md b/src/plugins/vis_type_vislib/public/vislib/VISLIB.md similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/VISLIB.md rename to src/plugins/vis_type_vislib/public/vislib/VISLIB.md diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/_index.scss b/src/plugins/vis_type_vislib/public/vislib/_index.scss similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/_index.scss rename to src/plugins/vis_type_vislib/public/vislib/_index.scss diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/_variables.scss b/src/plugins/vis_type_vislib/public/vislib/_variables.scss similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/_variables.scss rename to src/plugins/vis_type_vislib/public/vislib/_variables.scss diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/_vislib_vis_type.scss b/src/plugins/vis_type_vislib/public/vislib/_vislib_vis_type.scss similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/_vislib_vis_type.scss rename to src/plugins/vis_type_vislib/public/vislib/_vislib_vis_type.scss diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/components/labels/data_array.js b/src/plugins/vis_type_vislib/public/vislib/components/labels/data_array.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/components/labels/data_array.js rename to src/plugins/vis_type_vislib/public/vislib/components/labels/data_array.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/components/labels/flatten_series.js b/src/plugins/vis_type_vislib/public/vislib/components/labels/flatten_series.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/components/labels/flatten_series.js rename to src/plugins/vis_type_vislib/public/vislib/components/labels/flatten_series.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/components/labels/index.js b/src/plugins/vis_type_vislib/public/vislib/components/labels/index.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/components/labels/index.js rename to src/plugins/vis_type_vislib/public/vislib/components/labels/index.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/components/labels/labels.js b/src/plugins/vis_type_vislib/public/vislib/components/labels/labels.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/components/labels/labels.js rename to src/plugins/vis_type_vislib/public/vislib/components/labels/labels.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/components/labels.js b/src/plugins/vis_type_vislib/public/vislib/components/labels/labels.test.js similarity index 80% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/components/labels.js rename to src/plugins/vis_type_vislib/public/vislib/components/labels/labels.test.js index db99b881a6e380..838275d44d2a1a 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/components/labels.js +++ b/src/plugins/vis_type_vislib/public/vislib/components/labels/labels.test.js @@ -18,12 +18,11 @@ */ import _ from 'lodash'; -import expect from '@kbn/expect'; -import { labels } from '../../components/labels/labels'; -import { dataArray } from '../../components/labels/data_array'; -import { uniqLabels } from '../../components/labels/uniq_labels'; -import { flattenSeries as getSeries } from '../../components/labels/flatten_series'; +import { labels } from './labels'; +import { dataArray } from './data_array'; +import { uniqLabels } from './uniq_labels'; +import { flattenSeries as getSeries } from './flatten_series'; let seriesLabels; let rowsLabels; @@ -175,27 +174,27 @@ describe('Vislib Labels Module Test Suite', function() { }); it('should be a function', function() { - expect(typeof labels).to.be('function'); + expect(typeof labels).toBe('function'); }); it('should return an array if input is data.series', function() { - expect(seriesArr).to.be(true); + expect(seriesArr).toBe(true); }); it('should return an array if input is data.rows', function() { - expect(rowsArr).to.be(true); + expect(rowsArr).toBe(true); }); it('should throw an error if input is not an object', function() { expect(function() { labels('string not object'); - }).to.throwError(); + }).toThrow(); }); it('should return unique label values', function() { - expect(rowsLabels[0]).to.equal(uniqSeriesLabels[0]); - expect(rowsLabels[1]).to.equal(uniqSeriesLabels[1]); - expect(rowsLabels[2]).to.equal(uniqSeriesLabels[2]); + expect(rowsLabels[0]).toEqual(uniqSeriesLabels[0]); + expect(rowsLabels[1]).toEqual(uniqSeriesLabels[1]); + expect(rowsLabels[2]).toEqual(uniqSeriesLabels[2]); }); }); @@ -231,27 +230,27 @@ describe('Vislib Labels Module Test Suite', function() { it('should throw an error if the input is not an object', function() { expect(function() { dataArray(string); - }).to.throwError(); + }).toThrow(); expect(function() { dataArray(number); - }).to.throwError(); + }).toThrow(); expect(function() { dataArray(boolean); - }).to.throwError(); + }).toThrow(); expect(function() { dataArray(emptyArray); - }).to.throwError(); + }).toThrow(); expect(function() { dataArray(nullValue); - }).to.throwError(); + }).toThrow(); expect(function() { dataArray(notAValue); - }).to.throwError(); + }).toThrow(); }); it( @@ -259,7 +258,7 @@ describe('Vislib Labels Module Test Suite', function() { function() { expect(function() { dataArray(childrenObject); - }).to.throwError(); + }).toThrow(); } ); @@ -268,42 +267,42 @@ describe('Vislib Labels Module Test Suite', function() { function() { expect(function() { dataArray(seriesObject); - }).to.not.throwError(); + }).not.toThrow(); expect(function() { dataArray(rowsObject); - }).to.not.throwError(); + }).not.toThrow(); expect(function() { dataArray(columnsObject); - }).to.not.throwError(); + }).not.toThrow(); } ); it('should be a function', function() { - expect(typeof dataArray).to.equal('function'); + expect(typeof dataArray).toEqual('function'); }); it('should return an array of objects if input is data.series', function() { - expect(testSeries).to.equal(true); + expect(testSeries).toEqual(true); }); it('should return an array of objects if input is data.rows', function() { - expect(testRows).to.equal(true); + expect(testRows).toEqual(true); }); it('should return an array of same length as input data.series', function() { - expect(seriesLabels.length).to.equal(seriesData.series.length); + expect(seriesLabels.length).toEqual(seriesData.series.length); }); it('should return an array of same length as input data.rows', function() { - expect(rowsLabels.length).to.equal(rowsData.rows.length); + expect(rowsLabels.length).toEqual(rowsData.rows.length); }); it('should return an array of objects with obj.labels and obj.values', function() { - expect(seriesLabels[0].label).to.equal('100'); - expect(seriesLabels[0].values[0].x).to.equal(0); - expect(seriesLabels[0].values[0].y).to.equal(1); + expect(seriesLabels[0].label).toEqual('100'); + expect(seriesLabels[0].values[0].x).toEqual(0); + expect(seriesLabels[0].values[0].y).toEqual(1); }); }); @@ -337,45 +336,45 @@ describe('Vislib Labels Module Test Suite', function() { it('should throw an error if input is not an array', function() { expect(function() { uniqLabels(string); - }).to.throwError(); + }).toThrow(); expect(function() { uniqLabels(number); - }).to.throwError(); + }).toThrow(); expect(function() { uniqLabels(boolean); - }).to.throwError(); + }).toThrow(); expect(function() { uniqLabels(nullValue); - }).to.throwError(); + }).toThrow(); expect(function() { uniqLabels(emptyObject); - }).to.throwError(); + }).toThrow(); expect(function() { uniqLabels(notAValue); - }).to.throwError(); + }).toThrow(); }); it('should not throw an error if the input is an array', function() { expect(function() { uniqLabels(emptyArray); - }).to.not.throwError(); + }).not.toThrow(); }); it('should be a function', function() { - expect(typeof uniqLabels).to.be('function'); + expect(typeof uniqLabels).toBe('function'); }); it('should return an array', function() { - expect(testArr).to.be(true); + expect(testArr).toBe(true); }); it('should return array of 5 unique values', function() { - expect(uniq.length).to.be(5); + expect(uniq.length).toBe(5); }); }); @@ -408,63 +407,63 @@ describe('Vislib Labels Module Test Suite', function() { it('should throw an error if input is not an object', function() { expect(function() { getSeries(string); - }).to.throwError(); + }).toThrow(); expect(function() { getSeries(number); - }).to.throwError(); + }).toThrow(); expect(function() { getSeries(boolean); - }).to.throwError(); + }).toThrow(); expect(function() { getSeries(nullValue); - }).to.throwError(); + }).toThrow(); expect(function() { getSeries(emptyArray); - }).to.throwError(); + }).toThrow(); expect(function() { getSeries(notAValue); - }).to.throwError(); + }).toThrow(); }); it('should throw an if property rows or columns is not set on the object', function() { expect(function() { getSeries(emptyObject); - }).to.throwError(); + }).toThrow(); }); it('should not throw an error if rows or columns set on object', function() { expect(function() { getSeries(rowsObject); - }).to.not.throwError(); + }).not.toThrow(); expect(function() { getSeries(columnsObject); - }).to.not.throwError(); + }).not.toThrow(); }); it('should be a function', function() { - expect(typeof getSeries).to.be('function'); + expect(typeof getSeries).toBe('function'); }); it('should return an array if input is data.columns', function() { - expect(columnsArr).to.be(true); + expect(columnsArr).toBe(true); }); it('should return an array if input is data.rows', function() { - expect(rowsArr).to.be(true); + expect(rowsArr).toBe(true); }); it('should return an array of the same length as as input data.columns', function() { - expect(columnsLabels.length).to.be(columnsData.columns.length); + expect(columnsLabels.length).toBe(columnsData.columns.length); }); it('should return an array of the same length as as input data.rows', function() { - expect(rowsLabels.length).to.be(rowsData.rows.length); + expect(rowsLabels.length).toBe(rowsData.rows.length); }); }); }); diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/components/labels/truncate_labels.js b/src/plugins/vis_type_vislib/public/vislib/components/labels/truncate_labels.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/components/labels/truncate_labels.js rename to src/plugins/vis_type_vislib/public/vislib/components/labels/truncate_labels.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/components/labels/uniq_labels.js b/src/plugins/vis_type_vislib/public/vislib/components/labels/uniq_labels.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/components/labels/uniq_labels.js rename to src/plugins/vis_type_vislib/public/vislib/components/labels/uniq_labels.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/components/legend/__snapshots__/legend.test.tsx.snap b/src/plugins/vis_type_vislib/public/vislib/components/legend/__snapshots__/legend.test.tsx.snap similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/components/legend/__snapshots__/legend.test.tsx.snap rename to src/plugins/vis_type_vislib/public/vislib/components/legend/__snapshots__/legend.test.tsx.snap diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/components/legend/_index.scss b/src/plugins/vis_type_vislib/public/vislib/components/legend/_index.scss similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/components/legend/_index.scss rename to src/plugins/vis_type_vislib/public/vislib/components/legend/_index.scss diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/components/legend/_legend.scss b/src/plugins/vis_type_vislib/public/vislib/components/legend/_legend.scss similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/components/legend/_legend.scss rename to src/plugins/vis_type_vislib/public/vislib/components/legend/_legend.scss diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/components/legend/index.ts b/src/plugins/vis_type_vislib/public/vislib/components/legend/index.ts similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/components/legend/index.ts rename to src/plugins/vis_type_vislib/public/vislib/components/legend/index.ts diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/components/legend/legend.test.tsx b/src/plugins/vis_type_vislib/public/vislib/components/legend/legend.test.tsx similarity index 98% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/components/legend/legend.test.tsx rename to src/plugins/vis_type_vislib/public/vislib/components/legend/legend.test.tsx index 6bf66c2bdd788b..c203642f353c53 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/components/legend/legend.test.tsx +++ b/src/plugins/vis_type_vislib/public/vislib/components/legend/legend.test.tsx @@ -31,10 +31,6 @@ jest.mock('@elastic/eui', () => ({ htmlIdGenerator: jest.fn().mockReturnValue(() => 'legendId'), })); -jest.mock('../../../legacy_imports', () => ({ - getTableAggs: jest.fn(), -})); - jest.mock('../../../services', () => ({ getDataActions: () => ({ createFiltersFromValueClickAction: jest.fn().mockResolvedValue(['yes']), diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/components/legend/legend.tsx b/src/plugins/vis_type_vislib/public/vislib/components/legend/legend.tsx similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/components/legend/legend.tsx rename to src/plugins/vis_type_vislib/public/vislib/components/legend/legend.tsx diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/components/legend/legend_item.tsx b/src/plugins/vis_type_vislib/public/vislib/components/legend/legend_item.tsx similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/components/legend/legend_item.tsx rename to src/plugins/vis_type_vislib/public/vislib/components/legend/legend_item.tsx diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/components/legend/models.ts b/src/plugins/vis_type_vislib/public/vislib/components/legend/models.ts similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/components/legend/models.ts rename to src/plugins/vis_type_vislib/public/vislib/components/legend/models.ts diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/components/legend/pie_utils.ts b/src/plugins/vis_type_vislib/public/vislib/components/legend/pie_utils.ts similarity index 97% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/components/legend/pie_utils.ts rename to src/plugins/vis_type_vislib/public/vislib/components/legend/pie_utils.ts index d9eea83d40b48c..0167a542c6372e 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/components/legend/pie_utils.ts +++ b/src/plugins/vis_type_vislib/public/vislib/components/legend/pie_utils.ts @@ -25,7 +25,7 @@ import _ from 'lodash'; * * > Duplicated utilty method from vislib Data class to decouple `vislib_vis_legend` from `vislib` * - * @see src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/data.js + * @see src/plugins/vis_type_vislib/public/vislib/lib/data.js * * @returns {Array} Array of unique names (strings) */ diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/components/tooltip/_collect_branch.js b/src/plugins/vis_type_vislib/public/vislib/components/tooltip/_collect_branch.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/components/tooltip/_collect_branch.js rename to src/plugins/vis_type_vislib/public/vislib/components/tooltip/_collect_branch.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/components/tooltip/_collect_branch.test.js b/src/plugins/vis_type_vislib/public/vislib/components/tooltip/_collect_branch.test.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/components/tooltip/_collect_branch.test.js rename to src/plugins/vis_type_vislib/public/vislib/components/tooltip/_collect_branch.test.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/components/tooltip/_hierarchical_tooltip_formatter.js b/src/plugins/vis_type_vislib/public/vislib/components/tooltip/_hierarchical_tooltip_formatter.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/components/tooltip/_hierarchical_tooltip_formatter.js rename to src/plugins/vis_type_vislib/public/vislib/components/tooltip/_hierarchical_tooltip_formatter.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/components/tooltip/_index.scss b/src/plugins/vis_type_vislib/public/vislib/components/tooltip/_index.scss similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/components/tooltip/_index.scss rename to src/plugins/vis_type_vislib/public/vislib/components/tooltip/_index.scss diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/components/tooltip/_pointseries_tooltip_formatter.js b/src/plugins/vis_type_vislib/public/vislib/components/tooltip/_pointseries_tooltip_formatter.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/components/tooltip/_pointseries_tooltip_formatter.js rename to src/plugins/vis_type_vislib/public/vislib/components/tooltip/_pointseries_tooltip_formatter.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/components/_tooltip_formatter.js b/src/plugins/vis_type_vislib/public/vislib/components/tooltip/_pointseries_tooltip_formatter.test.js similarity index 83% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/components/_tooltip_formatter.js rename to src/plugins/vis_type_vislib/public/vislib/components/tooltip/_pointseries_tooltip_formatter.test.js index a3aabcb90be624..953c115cc0d024 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/components/_tooltip_formatter.js +++ b/src/plugins/vis_type_vislib/public/vislib/components/tooltip/_pointseries_tooltip_formatter.test.js @@ -19,9 +19,8 @@ import _ from 'lodash'; import $ from 'jquery'; -import expect from '@kbn/expect'; -import { pointSeriesTooltipFormatter } from '../../components/tooltip'; +import { pointSeriesTooltipFormatter } from './_pointseries_tooltip_formatter'; describe('tooltipFormatter', function() { const tooltipFormatter = pointSeriesTooltipFormatter(); @@ -64,19 +63,19 @@ describe('tooltipFormatter', function() { const event = _.cloneDeep(baseEvent); const $el = $(tooltipFormatter(event)); const $rows = $el.find('tr'); - expect($rows.length).to.be(3); + expect($rows.length).toBe(3); const $row1 = $rows.eq(0).find('td'); - expect(cell($row1, 0)).to.be('inner'); - expect(cell($row1, 1)).to.be('3'); + expect(cell($row1, 0)).toBe('inner'); + expect(cell($row1, 1)).toBe('3'); const $row2 = $rows.eq(1).find('td'); - expect(cell($row2, 0)).to.be('middle'); - expect(cell($row2, 1)).to.be('2'); + expect(cell($row2, 0)).toBe('middle'); + expect(cell($row2, 1)).toBe('2'); const $row3 = $rows.eq(2).find('td'); - expect(cell($row3, 0)).to.be('top'); - expect(cell($row3, 1)).to.be('1'); + expect(cell($row3, 0)).toBe('top'); + expect(cell($row3, 1)).toBe('1'); }); it('renders correctly on missing extraMetrics in datum', function() { @@ -84,6 +83,6 @@ describe('tooltipFormatter', function() { delete event.datum.extraMetrics; const $el = $(tooltipFormatter(event)); const $rows = $el.find('tr'); - expect($rows.length).to.be(3); + expect($rows.length).toBe(3); }); }); diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/components/tooltip/_tooltip.scss b/src/plugins/vis_type_vislib/public/vislib/components/tooltip/_tooltip.scss similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/components/tooltip/_tooltip.scss rename to src/plugins/vis_type_vislib/public/vislib/components/tooltip/_tooltip.scss diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/components/tooltip/index.js b/src/plugins/vis_type_vislib/public/vislib/components/tooltip/index.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/components/tooltip/index.js rename to src/plugins/vis_type_vislib/public/vislib/components/tooltip/index.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/components/tooltip/position_tooltip.js b/src/plugins/vis_type_vislib/public/vislib/components/tooltip/position_tooltip.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/components/tooltip/position_tooltip.js rename to src/plugins/vis_type_vislib/public/vislib/components/tooltip/position_tooltip.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/components/positioning.js b/src/plugins/vis_type_vislib/public/vislib/components/tooltip/position_tooltip.test.js similarity index 82% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/components/positioning.js rename to src/plugins/vis_type_vislib/public/vislib/components/tooltip/position_tooltip.test.js index f1c80c99810204..c184d0e9fbcf7f 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/components/positioning.js +++ b/src/plugins/vis_type_vislib/public/vislib/components/tooltip/position_tooltip.test.js @@ -17,12 +17,11 @@ * under the License. */ -import expect from '@kbn/expect'; import $ from 'jquery'; import _ from 'lodash'; import sinon from 'sinon'; -import { positionTooltip } from '../../components/tooltip/position_tooltip'; +import { positionTooltip } from './position_tooltip'; describe('Tooltip Positioning', function() { const sandbox = sinon.createSandbox(); @@ -95,11 +94,11 @@ describe('Tooltip Positioning', function() { positionTooltip.getTtSize($tooltip.html(), $sizer); [w, h].forEach(function(spy) { - expect(spy).to.have.property('callCount', 1); + expect(spy).toHaveProperty('callCount', 1); const matchHtml = w.thisValues.filter(function($t) { return !$t.is($tooltip) && $t.html() === $tooltip.html(); }); - expect(matchHtml).to.have.length(1); + expect(matchHtml).toHaveLength(1); }); }); }); @@ -110,11 +109,11 @@ describe('Tooltip Positioning', function() { const pos = positionTooltip.getBasePosition(size, makeEvent()); positions.forEach(function(p) { - expect(pos).to.have.property(p); + expect(pos).toHaveProperty(p); }); - expect(pos.north).to.be.lessThan(pos.south); - expect(pos.east).to.be.greaterThan(pos.west); + expect(pos.north).toBeLessThan(pos.south); + expect(pos.east).toBeGreaterThan(pos.west); }); }); @@ -123,11 +122,11 @@ describe('Tooltip Positioning', function() { const cbounds = positionTooltip.getBounds($chart); bounds.forEach(function(b) { - expect(cbounds).to.have.property(b); + expect(cbounds).toHaveProperty(b); }); - expect(cbounds.top).to.be.lessThan(cbounds.bottom); - expect(cbounds.left).to.be.lessThan(cbounds.right); + expect(cbounds.top).toBeLessThan(cbounds.bottom); + expect(cbounds.left).toBeLessThan(cbounds.right); }); }); @@ -137,18 +136,18 @@ describe('Tooltip Positioning', function() { $tooltip.css({ width: 15, height: 15 }); $sizer.css({ width: 15, height: 15 }); const size = positionTooltip.getTtSize($tooltip.html(), $sizer); - expect(size).to.have.property('width', 15); - expect(size).to.have.property('height', 15); + expect(size).toHaveProperty('width', 15); + expect(size).toHaveProperty('height', 15); // position the element based on a mouse that is in the middle of the chart const pos = positionTooltip.getBasePosition(size, makeEvent(0.5, 0.5)); const overflow = positionTooltip.getOverflow(size, pos, [$chart, $window]); positions.forEach(function(p) { - expect(overflow).to.have.property(p); + expect(overflow).toHaveProperty(p); // all positions should be less than 0 because the tooltip is so much smaller than the chart - expect(overflow[p]).to.be.lessThan(0); + expect(overflow[p]).toBeLessThan(0); }); }); @@ -160,12 +159,12 @@ describe('Tooltip Positioning', function() { const overflow = positionTooltip.getOverflow(size, pos, [$chart, $window]); positions.forEach(function(p) { - expect(overflow).to.have.property(p); + expect(overflow).toHaveProperty(p); if (p === 'south' || p === 'east') { - expect(overflow[p]).to.be.greaterThan(0); + expect(overflow[p]).toBeGreaterThan(0); } else { - expect(overflow[p]).to.be.lessThan(0); + expect(overflow[p]).toBeLessThan(0); } }); }); @@ -176,10 +175,10 @@ describe('Tooltip Positioning', function() { $tooltip.css({ width: largeWidth }); $sizer.css({ width: largeWidth }); const size = positionTooltip.getTtSize($tooltip.html(), $sizer); - expect(size).to.have.property('width', largeWidth); + expect(size).toHaveProperty('width', largeWidth); // $chart is flush with the $window on the left side - expect(positionTooltip.getBounds($chart).left).to.be(0); + expect(positionTooltip.getBounds($chart).left).toBe(0); // Size $window large enough for tooltip on right side $window.css({ width: $chart.width() * 3 }); @@ -190,17 +189,17 @@ describe('Tooltip Positioning', function() { const overflow = positionTooltip.getOverflow(size, pos, [$chart, $window]); // no overflow on left (east) - expect(overflow.east).to.be.lessThan(0); + expect(overflow.east).toBeLessThan(0); // overflow on right (west) - expect(overflow.west).to.be.greaterThan(0); + expect(overflow.west).toBeGreaterThan(0); }); }); describe('positionTooltip() integration', function() { it('returns nothing if the $chart or $tooltip are not passed in', function() { - expect(positionTooltip() === void 0).to.be(true); - expect(positionTooltip(null, null, null) === void 0).to.be(true); - expect(positionTooltip(null, $(), $()) === void 0).to.be(true); + expect(positionTooltip() === void 0).toBe(true); + expect(positionTooltip(null, null, null) === void 0).toBe(true); + expect(positionTooltip(null, $(), $()) === void 0).toBe(true); }); function check(xPercent, yPercent /*, prev, directions... */) { @@ -215,23 +214,22 @@ describe('Tooltip Positioning', function() { prev: _.isObject(directions[0]) ? directions.shift() : null, }); - expect(placement) - .to.have.property('top') - .and.property('left'); + expect(placement).toHaveProperty('top'); + expect(placement).toHaveProperty('left'); directions.forEach(function(dir) { switch (dir) { case 'top': - expect(placement.top).to.be.lessThan(event.clientY); + expect(placement.top).toBeLessThan(event.clientY); return; case 'bottom': - expect(placement.top).to.be.greaterThan(event.clientY); + expect(placement.top).toBeGreaterThan(event.clientY); return; case 'right': - expect(placement.left).to.be.greaterThan(event.clientX); + expect(placement.left).toBeGreaterThan(event.clientX); return; case 'left': - expect(placement.left).to.be.lessThan(event.clientX); + expect(placement.left).toBeLessThan(event.clientX); return; } }); diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/components/tooltip/tooltip.js b/src/plugins/vis_type_vislib/public/vislib/components/tooltip/tooltip.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/components/tooltip/tooltip.js rename to src/plugins/vis_type_vislib/public/vislib/components/tooltip/tooltip.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/components/zero_injection/flatten_data.js b/src/plugins/vis_type_vislib/public/vislib/components/zero_injection/flatten_data.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/components/zero_injection/flatten_data.js rename to src/plugins/vis_type_vislib/public/vislib/components/zero_injection/flatten_data.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/components/zero_injection/inject_zeros.js b/src/plugins/vis_type_vislib/public/vislib/components/zero_injection/inject_zeros.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/components/zero_injection/inject_zeros.js rename to src/plugins/vis_type_vislib/public/vislib/components/zero_injection/inject_zeros.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/components/zero_injection/ordered_x_keys.js b/src/plugins/vis_type_vislib/public/vislib/components/zero_injection/ordered_x_keys.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/components/zero_injection/ordered_x_keys.js rename to src/plugins/vis_type_vislib/public/vislib/components/zero_injection/ordered_x_keys.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/components/zero_injection/uniq_keys.js b/src/plugins/vis_type_vislib/public/vislib/components/zero_injection/uniq_keys.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/components/zero_injection/uniq_keys.js rename to src/plugins/vis_type_vislib/public/vislib/components/zero_injection/uniq_keys.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/components/zero_injection/zero_fill_data_array.js b/src/plugins/vis_type_vislib/public/vislib/components/zero_injection/zero_fill_data_array.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/components/zero_injection/zero_fill_data_array.js rename to src/plugins/vis_type_vislib/public/vislib/components/zero_injection/zero_fill_data_array.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/components/zero_injection/zero_filled_array.js b/src/plugins/vis_type_vislib/public/vislib/components/zero_injection/zero_filled_array.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/components/zero_injection/zero_filled_array.js rename to src/plugins/vis_type_vislib/public/vislib/components/zero_injection/zero_filled_array.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/components/zero_injection/zero_injection.test.js b/src/plugins/vis_type_vislib/public/vislib/components/zero_injection/zero_injection.test.js similarity index 65% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/components/zero_injection/zero_injection.test.js rename to src/plugins/vis_type_vislib/public/vislib/components/zero_injection/zero_injection.test.js index 129006cdf0ca37..df502b7cde3dfb 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/components/zero_injection/zero_injection.test.js +++ b/src/plugins/vis_type_vislib/public/vislib/components/zero_injection/zero_injection.test.js @@ -18,7 +18,6 @@ */ import _ from 'lodash'; -import expect from '@kbn/expect'; import { injectZeros } from './inject_zeros'; import { orderXValues } from './ordered_x_keys'; import { getUniqKeys } from './uniq_keys'; @@ -159,45 +158,45 @@ describe('Vislib Zero Injection Module Test Suite', function() { }); it('should be a function', function() { - expect(_.isFunction(injectZeros)).to.be(true); + expect(_.isFunction(injectZeros)).toBe(true); }); it('should return an object with series[0].values', function() { - expect(_.isObject(sample1)).to.be(true); - expect(_.isObject(sample1[0].values)).to.be(true); + expect(_.isObject(sample1)).toBe(true); + expect(_.isObject(sample1[0].values)).toBe(true); }); it('should return the same array of objects when the length of the series array is 1', function() { - expect(sample1[0].values[0].x).to.be(seriesData[0].values[0].x); - expect(sample1[0].values[1].x).to.be(seriesData[0].values[1].x); - expect(sample1[0].values[2].x).to.be(seriesData[0].values[2].x); - expect(sample1[0].values[3].x).to.be(seriesData[0].values[3].x); - expect(sample1[0].values[4].x).to.be(seriesData[0].values[4].x); + expect(sample1[0].values[0].x).toBe(seriesData[0].values[0].x); + expect(sample1[0].values[1].x).toBe(seriesData[0].values[1].x); + expect(sample1[0].values[2].x).toBe(seriesData[0].values[2].x); + expect(sample1[0].values[3].x).toBe(seriesData[0].values[3].x); + expect(sample1[0].values[4].x).toBe(seriesData[0].values[4].x); }); it('should inject zeros in the input array', function() { - expect(sample2[1].values[1].y).to.be(0); - expect(sample2[2].values[0].y).to.be(0); - expect(sample2[2].values[1].y).to.be(0); - expect(sample2[2].values[4].y).to.be(0); - expect(sample3[1].values[1].y).to.be(0); - expect(sample3[2].values[0].y).to.be(0); - expect(sample3[2].values[1].y).to.be(0); - expect(sample3[2].values[4].y).to.be(0); + expect(sample2[1].values[1].y).toBe(0); + expect(sample2[2].values[0].y).toBe(0); + expect(sample2[2].values[1].y).toBe(0); + expect(sample2[2].values[4].y).toBe(0); + expect(sample3[1].values[1].y).toBe(0); + expect(sample3[2].values[0].y).toBe(0); + expect(sample3[2].values[1].y).toBe(0); + expect(sample3[2].values[4].y).toBe(0); }); it('should return values arrays with the same x values', function() { - expect(sample2[1].values[0].x).to.be(sample2[2].values[0].x); - expect(sample2[1].values[1].x).to.be(sample2[2].values[1].x); - expect(sample2[1].values[2].x).to.be(sample2[2].values[2].x); - expect(sample2[1].values[3].x).to.be(sample2[2].values[3].x); - expect(sample2[1].values[4].x).to.be(sample2[2].values[4].x); + expect(sample2[1].values[0].x).toBe(sample2[2].values[0].x); + expect(sample2[1].values[1].x).toBe(sample2[2].values[1].x); + expect(sample2[1].values[2].x).toBe(sample2[2].values[2].x); + expect(sample2[1].values[3].x).toBe(sample2[2].values[3].x); + expect(sample2[1].values[4].x).toBe(sample2[2].values[4].x); }); it('should return values arrays of the same length', function() { - expect(sample2[0].values.length).to.be(sample2[1].values.length); - expect(sample2[0].values.length).to.be(sample2[2].values.length); - expect(sample2[1].values.length).to.be(sample2[2].values.length); + expect(sample2[0].values.length).toBe(sample2[1].values.length); + expect(sample2[0].values.length).toBe(sample2[2].values.length); + expect(sample2[1].values.length).toBe(sample2[2].values.length); }); }); @@ -211,24 +210,24 @@ describe('Vislib Zero Injection Module Test Suite', function() { }); it('should return a function', function() { - expect(_.isFunction(orderXValues)).to.be(true); + expect(_.isFunction(orderXValues)).toBe(true); }); it('should return an array', function() { - expect(Array.isArray(results)).to.be(true); + expect(Array.isArray(results)).toBe(true); }); it('should return an array of values ordered by their index by default', function() { - expect(results[0]).to.be('1'); - expect(results[1]).to.be('2'); - expect(results[2]).to.be('3'); - expect(results[3]).to.be('4'); - expect(results[4]).to.be('5'); - expect(numberedResults[0]).to.be(1); - expect(numberedResults[1]).to.be(2); - expect(numberedResults[2]).to.be(3); - expect(numberedResults[3]).to.be(4); - expect(numberedResults[4]).to.be(5); + expect(results[0]).toBe('1'); + expect(results[1]).toBe('2'); + expect(results[2]).toBe('3'); + expect(results[3]).toBe('4'); + expect(results[4]).toBe('5'); + expect(numberedResults[0]).toBe(1); + expect(numberedResults[1]).toBe(2); + expect(numberedResults[2]).toBe(3); + expect(numberedResults[3]).toBe(4); + expect(numberedResults[4]).toBe(5); }); it('should return an array of values that preserve the index from xAxisOrderedValues', function() { @@ -257,7 +256,7 @@ describe('Vislib Zero Injection Module Test Suite', function() { ], }; const result = orderXValues(data); - expect(result).to.eql(['1', '2', '3', '4', '5']); + expect(result).toEqual(['1', '2', '3', '4', '5']); }); it('should return an array of values ordered by their sum when orderBucketsBySum is true', function() { @@ -265,16 +264,16 @@ describe('Vislib Zero Injection Module Test Suite', function() { results = orderXValues(multiSeriesDataObj, orderBucketsBySum); numberedResults = orderXValues(multiSeriesNumberedDataObj, orderBucketsBySum); - expect(results[0]).to.be('3'); - expect(results[1]).to.be('1'); - expect(results[2]).to.be('4'); - expect(results[3]).to.be('5'); - expect(results[4]).to.be('2'); - expect(numberedResults[0]).to.be(3); - expect(numberedResults[1]).to.be(1); - expect(numberedResults[2]).to.be(4); - expect(numberedResults[3]).to.be(5); - expect(numberedResults[4]).to.be(2); + expect(results[0]).toBe('3'); + expect(results[1]).toBe('1'); + expect(results[2]).toBe('4'); + expect(results[3]).toBe('5'); + expect(results[4]).toBe('2'); + expect(numberedResults[0]).toBe(3); + expect(numberedResults[1]).toBe(1); + expect(numberedResults[2]).toBe(4); + expect(numberedResults[3]).toBe(5); + expect(numberedResults[4]).toBe(2); }); }); @@ -288,39 +287,39 @@ describe('Vislib Zero Injection Module Test Suite', function() { it('should throw an error if input is not an object', function() { expect(function() { getUniqKeys(str); - }).to.throwError(); + }).toThrow(); expect(function() { getUniqKeys(number); - }).to.throwError(); + }).toThrow(); expect(function() { getUniqKeys(boolean); - }).to.throwError(); + }).toThrow(); expect(function() { getUniqKeys(nullValue); - }).to.throwError(); + }).toThrow(); expect(function() { getUniqKeys(emptyArray); - }).to.throwError(); + }).toThrow(); expect(function() { getUniqKeys(notAValue); - }).to.throwError(); + }).toThrow(); }); it('should return a function', function() { - expect(_.isFunction(getUniqKeys)).to.be(true); + expect(_.isFunction(getUniqKeys)).toBe(true); }); it('should return an object', function() { - expect(_.isObject(results)).to.be(true); + expect(_.isObject(results)).toBe(true); }); it('should return an object of unique keys', function() { - expect(_.uniq(_.keys(results)).length).to.be(_.keys(results).length); + expect(_.uniq(_.keys(results)).length).toBe(_.keys(results).length); }); }); @@ -332,17 +331,17 @@ describe('Vislib Zero Injection Module Test Suite', function() { }); it('should return a function', function() { - expect(_.isFunction(flattenData)).to.be(true); + expect(_.isFunction(flattenData)).toBe(true); }); it('should return an array', function() { - expect(Array.isArray(results)).to.be(true); + expect(Array.isArray(results)).toBe(true); }); it('should return an array of objects', function() { - expect(_.isObject(results[0])).to.be(true); - expect(_.isObject(results[1])).to.be(true); - expect(_.isObject(results[2])).to.be(true); + expect(_.isObject(results[0])).toBe(true); + expect(_.isObject(results[1])).toBe(true); + expect(_.isObject(results[2])).toBe(true); }); }); @@ -360,67 +359,67 @@ describe('Vislib Zero Injection Module Test Suite', function() { it('should throw an error if input is not an array', function() { expect(function() { createZeroFilledArray(str); - }).to.throwError(); + }).toThrow(); expect(function() { createZeroFilledArray(number); - }).to.throwError(); + }).toThrow(); expect(function() { createZeroFilledArray(boolean); - }).to.throwError(); + }).toThrow(); expect(function() { createZeroFilledArray(nullValue); - }).to.throwError(); + }).toThrow(); expect(function() { createZeroFilledArray(emptyObject); - }).to.throwError(); + }).toThrow(); expect(function() { createZeroFilledArray(notAValue); - }).to.throwError(); + }).toThrow(); }); it('should return a function', function() { - expect(_.isFunction(createZeroFilledArray)).to.be(true); + expect(_.isFunction(createZeroFilledArray)).toBe(true); }); it('should return an array', function() { - expect(Array.isArray(results1)).to.be(true); + expect(Array.isArray(results1)).toBe(true); }); it('should return an array of objects', function() { - expect(_.isObject(results1[0])).to.be(true); - expect(_.isObject(results1[1])).to.be(true); - expect(_.isObject(results1[2])).to.be(true); - expect(_.isObject(results1[3])).to.be(true); - expect(_.isObject(results1[4])).to.be(true); + expect(_.isObject(results1[0])).toBe(true); + expect(_.isObject(results1[1])).toBe(true); + expect(_.isObject(results1[2])).toBe(true); + expect(_.isObject(results1[3])).toBe(true); + expect(_.isObject(results1[4])).toBe(true); }); it('should return an array of objects where each y value is 0', function() { - expect(results1[0].y).to.be(0); - expect(results1[1].y).to.be(0); - expect(results1[2].y).to.be(0); - expect(results1[3].y).to.be(0); - expect(results1[4].y).to.be(0); + expect(results1[0].y).toBe(0); + expect(results1[1].y).toBe(0); + expect(results1[2].y).toBe(0); + expect(results1[3].y).toBe(0); + expect(results1[4].y).toBe(0); }); it('should return an array of objects where each x values are numbers', function() { - expect(_.isNumber(results1[0].x)).to.be(true); - expect(_.isNumber(results1[1].x)).to.be(true); - expect(_.isNumber(results1[2].x)).to.be(true); - expect(_.isNumber(results1[3].x)).to.be(true); - expect(_.isNumber(results1[4].x)).to.be(true); + expect(_.isNumber(results1[0].x)).toBe(true); + expect(_.isNumber(results1[1].x)).toBe(true); + expect(_.isNumber(results1[2].x)).toBe(true); + expect(_.isNumber(results1[3].x)).toBe(true); + expect(_.isNumber(results1[4].x)).toBe(true); }); it('should return an array of objects where each x values are strings', function() { - expect(_.isString(results2[0].x)).to.be(true); - expect(_.isString(results2[1].x)).to.be(true); - expect(_.isString(results2[2].x)).to.be(true); - expect(_.isString(results2[3].x)).to.be(true); - expect(_.isString(results2[4].x)).to.be(true); + expect(_.isString(results2[0].x)).toBe(true); + expect(_.isString(results2[1].x)).toBe(true); + expect(_.isString(results2[2].x)).toBe(true); + expect(_.isString(results2[3].x)).toBe(true); + expect(_.isString(results2[4].x)).toBe(true); }); }); @@ -439,48 +438,48 @@ describe('Vislib Zero Injection Module Test Suite', function() { it('should throw an error if input are not arrays', function() { expect(function() { zeroFillDataArray(str, str); - }).to.throwError(); + }).toThrow(); expect(function() { zeroFillDataArray(number, number); - }).to.throwError(); + }).toThrow(); expect(function() { zeroFillDataArray(boolean, boolean); - }).to.throwError(); + }).toThrow(); expect(function() { zeroFillDataArray(nullValue, nullValue); - }).to.throwError(); + }).toThrow(); expect(function() { zeroFillDataArray(emptyObject, emptyObject); - }).to.throwError(); + }).toThrow(); expect(function() { zeroFillDataArray(notAValue, notAValue); - }).to.throwError(); + }).toThrow(); }); it('should return a function', function() { - expect(_.isFunction(zeroFillDataArray)).to.be(true); + expect(_.isFunction(zeroFillDataArray)).toBe(true); }); it('should return an array', function() { - expect(Array.isArray(results)).to.be(true); + expect(Array.isArray(results)).toBe(true); }); it('should return an array of objects', function() { - expect(_.isObject(results[0])).to.be(true); - expect(_.isObject(results[1])).to.be(true); - expect(_.isObject(results[2])).to.be(true); + expect(_.isObject(results[0])).toBe(true); + expect(_.isObject(results[1])).toBe(true); + expect(_.isObject(results[2])).toBe(true); }); it('should return an array with zeros injected in the appropriate objects as y values', function() { - expect(results[0].y).to.be(0); - expect(results[1].y).to.be(0); - expect(results[3].y).to.be(0); - expect(results[4].y).to.be(0); + expect(results[0].y).toBe(0); + expect(results[1].y).toBe(0); + expect(results[3].y).toBe(0); + expect(results[4].y).toBe(0); }); }); @@ -493,18 +492,18 @@ describe('Vislib Zero Injection Module Test Suite', function() { it('should return an array of objects', function() { results.forEach(function(row) { - expect(Array.isArray(row.values)).to.be(true); + expect(Array.isArray(row.values)).toBe(true); }); }); it('should return ordered x values', function() { const values = results[0].values; - expect(values[0].x).to.be.lessThan(values[1].x); - expect(values[1].x).to.be.lessThan(values[2].x); - expect(values[2].x).to.be.lessThan(values[3].x); - expect(values[3].x).to.be.lessThan(values[4].x); - expect(values[4].x).to.be.lessThan(values[5].x); - expect(values[5].x).to.be.lessThan(values[6].x); + expect(values[0].x).toBeLessThan(values[1].x); + expect(values[1].x).toBeLessThan(values[2].x); + expect(values[2].x).toBeLessThan(values[3].x); + expect(values[3].x).toBeLessThan(values[4].x); + expect(values[4].x).toBeLessThan(values[5].x); + expect(values[5].x).toBeLessThan(values[6].x); }); }); }); diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/errors.ts b/src/plugins/vis_type_vislib/public/vislib/errors.ts similarity index 95% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/errors.ts rename to src/plugins/vis_type_vislib/public/vislib/errors.ts index 9014349c38d253..c2965e81657596 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/errors.ts +++ b/src/plugins/vis_type_vislib/public/vislib/errors.ts @@ -19,7 +19,7 @@ /* eslint-disable max-classes-per-file */ -import { KbnError } from '../../../../../plugins/kibana_utils/public'; +import { KbnError } from '../../../kibana_utils/public'; export class VislibError extends KbnError { constructor(message: string) { diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/helpers/hierarchical/build_hierarchical_data.test.ts b/src/plugins/vis_type_vislib/public/vislib/helpers/hierarchical/build_hierarchical_data.test.ts similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/helpers/hierarchical/build_hierarchical_data.test.ts rename to src/plugins/vis_type_vislib/public/vislib/helpers/hierarchical/build_hierarchical_data.test.ts diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/helpers/hierarchical/build_hierarchical_data.ts b/src/plugins/vis_type_vislib/public/vislib/helpers/hierarchical/build_hierarchical_data.ts similarity index 97% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/helpers/hierarchical/build_hierarchical_data.ts rename to src/plugins/vis_type_vislib/public/vislib/helpers/hierarchical/build_hierarchical_data.ts index 2c6d62ed084b57..c3b82f72af482e 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/helpers/hierarchical/build_hierarchical_data.ts +++ b/src/plugins/vis_type_vislib/public/vislib/helpers/hierarchical/build_hierarchical_data.ts @@ -18,7 +18,7 @@ */ import { toArray } from 'lodash'; -import { SerializedFieldFormat } from '../../../../../../../plugins/expressions/common/types'; +import { SerializedFieldFormat } from '../../../../../expressions/common/types'; import { getFormatService } from '../../../services'; import { Table } from '../../types'; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/helpers/index.ts b/src/plugins/vis_type_vislib/public/vislib/helpers/index.ts similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/helpers/index.ts rename to src/plugins/vis_type_vislib/public/vislib/helpers/index.ts diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/helpers/point_series/_add_to_siri.test.ts b/src/plugins/vis_type_vislib/public/vislib/helpers/point_series/_add_to_siri.test.ts similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/helpers/point_series/_add_to_siri.test.ts rename to src/plugins/vis_type_vislib/public/vislib/helpers/point_series/_add_to_siri.test.ts diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/helpers/point_series/_add_to_siri.ts b/src/plugins/vis_type_vislib/public/vislib/helpers/point_series/_add_to_siri.ts similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/helpers/point_series/_add_to_siri.ts rename to src/plugins/vis_type_vislib/public/vislib/helpers/point_series/_add_to_siri.ts diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/helpers/point_series/_fake_x_aspect.test.ts b/src/plugins/vis_type_vislib/public/vislib/helpers/point_series/_fake_x_aspect.test.ts similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/helpers/point_series/_fake_x_aspect.test.ts rename to src/plugins/vis_type_vislib/public/vislib/helpers/point_series/_fake_x_aspect.test.ts diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/helpers/point_series/_fake_x_aspect.ts b/src/plugins/vis_type_vislib/public/vislib/helpers/point_series/_fake_x_aspect.ts similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/helpers/point_series/_fake_x_aspect.ts rename to src/plugins/vis_type_vislib/public/vislib/helpers/point_series/_fake_x_aspect.ts diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/helpers/point_series/_get_aspects.test.ts b/src/plugins/vis_type_vislib/public/vislib/helpers/point_series/_get_aspects.test.ts similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/helpers/point_series/_get_aspects.test.ts rename to src/plugins/vis_type_vislib/public/vislib/helpers/point_series/_get_aspects.test.ts diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/helpers/point_series/_get_aspects.ts b/src/plugins/vis_type_vislib/public/vislib/helpers/point_series/_get_aspects.ts similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/helpers/point_series/_get_aspects.ts rename to src/plugins/vis_type_vislib/public/vislib/helpers/point_series/_get_aspects.ts diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/helpers/point_series/_get_point.test.ts b/src/plugins/vis_type_vislib/public/vislib/helpers/point_series/_get_point.test.ts similarity index 97% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/helpers/point_series/_get_point.test.ts rename to src/plugins/vis_type_vislib/public/vislib/helpers/point_series/_get_point.test.ts index 0c79c5b263ceac..dc10c9f4938a0e 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/helpers/point_series/_get_point.test.ts +++ b/src/plugins/vis_type_vislib/public/vislib/helpers/point_series/_get_point.test.ts @@ -17,7 +17,7 @@ * under the License. */ -import { IFieldFormatsRegistry } from '../../../../../../../plugins/data/common'; +import { IFieldFormatsRegistry } from '../../../../../data/common'; import { getPoint } from './_get_point'; import { setFormatService } from '../../../services'; import { Aspect } from './point_series'; diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/helpers/point_series/_get_point.ts b/src/plugins/vis_type_vislib/public/vislib/helpers/point_series/_get_point.ts similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/helpers/point_series/_get_point.ts rename to src/plugins/vis_type_vislib/public/vislib/helpers/point_series/_get_point.ts diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/helpers/point_series/_get_series.test.ts b/src/plugins/vis_type_vislib/public/vislib/helpers/point_series/_get_series.test.ts similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/helpers/point_series/_get_series.test.ts rename to src/plugins/vis_type_vislib/public/vislib/helpers/point_series/_get_series.test.ts diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/helpers/point_series/_get_series.ts b/src/plugins/vis_type_vislib/public/vislib/helpers/point_series/_get_series.ts similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/helpers/point_series/_get_series.ts rename to src/plugins/vis_type_vislib/public/vislib/helpers/point_series/_get_series.ts diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/helpers/point_series/_init_x_axis.test.ts b/src/plugins/vis_type_vislib/public/vislib/helpers/point_series/_init_x_axis.test.ts similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/helpers/point_series/_init_x_axis.test.ts rename to src/plugins/vis_type_vislib/public/vislib/helpers/point_series/_init_x_axis.test.ts diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/helpers/point_series/_init_x_axis.ts b/src/plugins/vis_type_vislib/public/vislib/helpers/point_series/_init_x_axis.ts similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/helpers/point_series/_init_x_axis.ts rename to src/plugins/vis_type_vislib/public/vislib/helpers/point_series/_init_x_axis.ts diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/helpers/point_series/_init_y_axis.test.ts b/src/plugins/vis_type_vislib/public/vislib/helpers/point_series/_init_y_axis.test.ts similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/helpers/point_series/_init_y_axis.test.ts rename to src/plugins/vis_type_vislib/public/vislib/helpers/point_series/_init_y_axis.test.ts diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/helpers/point_series/_init_y_axis.ts b/src/plugins/vis_type_vislib/public/vislib/helpers/point_series/_init_y_axis.ts similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/helpers/point_series/_init_y_axis.ts rename to src/plugins/vis_type_vislib/public/vislib/helpers/point_series/_init_y_axis.ts diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/helpers/point_series/_ordered_date_axis.test.ts b/src/plugins/vis_type_vislib/public/vislib/helpers/point_series/_ordered_date_axis.test.ts similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/helpers/point_series/_ordered_date_axis.test.ts rename to src/plugins/vis_type_vislib/public/vislib/helpers/point_series/_ordered_date_axis.test.ts diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/helpers/point_series/_ordered_date_axis.ts b/src/plugins/vis_type_vislib/public/vislib/helpers/point_series/_ordered_date_axis.ts similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/helpers/point_series/_ordered_date_axis.ts rename to src/plugins/vis_type_vislib/public/vislib/helpers/point_series/_ordered_date_axis.ts diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/helpers/point_series/index.ts b/src/plugins/vis_type_vislib/public/vislib/helpers/point_series/index.ts similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/helpers/point_series/index.ts rename to src/plugins/vis_type_vislib/public/vislib/helpers/point_series/index.ts diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/helpers/point_series/point_series.test.ts b/src/plugins/vis_type_vislib/public/vislib/helpers/point_series/point_series.test.ts similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/helpers/point_series/point_series.test.ts rename to src/plugins/vis_type_vislib/public/vislib/helpers/point_series/point_series.test.ts diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/helpers/point_series/point_series.ts b/src/plugins/vis_type_vislib/public/vislib/helpers/point_series/point_series.ts similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/helpers/point_series/point_series.ts rename to src/plugins/vis_type_vislib/public/vislib/helpers/point_series/point_series.ts diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/__snapshots__/dispatch_heatmap.test.js.snap b/src/plugins/vis_type_vislib/public/vislib/lib/__snapshots__/dispatch_heatmap.test.js.snap similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/__snapshots__/dispatch_heatmap.test.js.snap rename to src/plugins/vis_type_vislib/public/vislib/lib/__snapshots__/dispatch_heatmap.test.js.snap diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/_alerts.scss b/src/plugins/vis_type_vislib/public/vislib/lib/_alerts.scss similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/_alerts.scss rename to src/plugins/vis_type_vislib/public/vislib/lib/_alerts.scss diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/_data_label.js b/src/plugins/vis_type_vislib/public/vislib/lib/_data_label.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/_data_label.js rename to src/plugins/vis_type_vislib/public/vislib/lib/_data_label.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/_error_handler.js b/src/plugins/vis_type_vislib/public/vislib/lib/_error_handler.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/_error_handler.js rename to src/plugins/vis_type_vislib/public/vislib/lib/_error_handler.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/error_handler.js b/src/plugins/vis_type_vislib/public/vislib/lib/_error_handler.test.js similarity index 88% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/error_handler.js rename to src/plugins/vis_type_vislib/public/vislib/lib/_error_handler.test.js index 4523e70ccbb4cb..b7764b92b78059 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/error_handler.js +++ b/src/plugins/vis_type_vislib/public/vislib/lib/_error_handler.test.js @@ -17,9 +17,7 @@ * under the License. */ -import expect from '@kbn/expect'; - -import { ErrorHandler } from '../../lib/_error_handler'; +import { ErrorHandler } from './_error_handler'; describe('Vislib ErrorHandler Test Suite', function() { let errorHandler; @@ -32,19 +30,19 @@ describe('Vislib ErrorHandler Test Suite', function() { it('should throw an error when width and/or height is 0', function() { expect(function() { errorHandler.validateWidthandHeight(0, 200); - }).to.throwError(); + }).toThrow(); expect(function() { errorHandler.validateWidthandHeight(200, 0); - }).to.throwError(); + }).toThrow(); }); it('should throw an error when width and/or height is NaN', function() { expect(function() { errorHandler.validateWidthandHeight(null, 200); - }).to.throwError(); + }).toThrow(); expect(function() { errorHandler.validateWidthandHeight(200, null); - }).to.throwError(); + }).toThrow(); }); }); }); diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/_handler.scss b/src/plugins/vis_type_vislib/public/vislib/lib/_handler.scss similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/_handler.scss rename to src/plugins/vis_type_vislib/public/vislib/lib/_handler.scss diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/_index.scss b/src/plugins/vis_type_vislib/public/vislib/lib/_index.scss similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/_index.scss rename to src/plugins/vis_type_vislib/public/vislib/lib/_index.scss diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/alerts.js b/src/plugins/vis_type_vislib/public/vislib/lib/alerts.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/alerts.js rename to src/plugins/vis_type_vislib/public/vislib/lib/alerts.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/axis/axis.js b/src/plugins/vis_type_vislib/public/vislib/lib/axis/axis.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/axis/axis.js rename to src/plugins/vis_type_vislib/public/vislib/lib/axis/axis.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/axis/axis.js b/src/plugins/vis_type_vislib/public/vislib/lib/axis/axis.test.js similarity index 93% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/axis/axis.js rename to src/plugins/vis_type_vislib/public/vislib/lib/axis/axis.test.js index bc4a4f9925513c..dec7de5ceeda95 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/axis/axis.js +++ b/src/plugins/vis_type_vislib/public/vislib/lib/axis/axis.test.js @@ -19,12 +19,11 @@ import d3 from 'd3'; import _ from 'lodash'; -import expect from '@kbn/expect'; import $ from 'jquery'; -import { Axis } from '../../../lib/axis'; -import { VisConfig } from '../../../lib/vis_config'; -import { getMockUiState } from '../fixtures/_vis_fixture'; +import { Axis } from './axis'; +import { VisConfig } from '../vis_config'; +import { getMockUiState } from '../../../fixtures/mocks'; describe('Vislib Axis Class Test Suite', function() { let mockUiState; @@ -164,7 +163,7 @@ describe('Vislib Axis Class Test Suite', function() { }, ]; const stackedData = yAxis._stackNegAndPosVals(seriesData); - expect(stackedData[1]).to.eql(expectedResult); + expect(stackedData[1]).toEqual(expectedResult); }); it('should correctly stack pos and neg values', function() { @@ -200,7 +199,7 @@ describe('Vislib Axis Class Test Suite', function() { value.y = -value.y; }); const stackedData = yAxis._stackNegAndPosVals(dataClone); - expect(stackedData[1]).to.eql(expectedResult); + expect(stackedData[1]).toEqual(expectedResult); }); it('should correctly stack mixed pos and neg values', function() { @@ -236,7 +235,7 @@ describe('Vislib Axis Class Test Suite', function() { if (i % 2 === 1) value.y = -value.y; }); const stackedData = yAxis._stackNegAndPosVals(dataClone); - expect(stackedData[1]).to.eql(expectedResult); + expect(stackedData[1]).toEqual(expectedResult); }); }); }); diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/axis/axis_config.js b/src/plugins/vis_type_vislib/public/vislib/lib/axis/axis_config.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/axis/axis_config.js rename to src/plugins/vis_type_vislib/public/vislib/lib/axis/axis_config.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/axis/axis_labels.js b/src/plugins/vis_type_vislib/public/vislib/lib/axis/axis_labels.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/axis/axis_labels.js rename to src/plugins/vis_type_vislib/public/vislib/lib/axis/axis_labels.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/axis/axis_scale.js b/src/plugins/vis_type_vislib/public/vislib/lib/axis/axis_scale.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/axis/axis_scale.js rename to src/plugins/vis_type_vislib/public/vislib/lib/axis/axis_scale.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/axis/axis_title.js b/src/plugins/vis_type_vislib/public/vislib/lib/axis/axis_title.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/axis/axis_title.js rename to src/plugins/vis_type_vislib/public/vislib/lib/axis/axis_title.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/axis_title.js b/src/plugins/vis_type_vislib/public/vislib/lib/axis/axis_title.test.js similarity index 91% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/axis_title.js rename to src/plugins/vis_type_vislib/public/vislib/lib/axis/axis_title.test.js index fd25335dd2cd4c..7901919d306d27 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/axis_title.js +++ b/src/plugins/vis_type_vislib/public/vislib/lib/axis/axis_title.test.js @@ -20,13 +20,12 @@ import d3 from 'd3'; import _ from 'lodash'; import $ from 'jquery'; -import expect from '@kbn/expect'; -import { AxisTitle } from '../../lib/axis/axis_title'; -import { AxisConfig } from '../../lib/axis/axis_config'; -import { VisConfig } from '../../lib/vis_config'; -import { Data } from '../../lib/data'; -import { getMockUiState } from './fixtures/_vis_fixture'; +import { AxisTitle } from './axis_title'; +import { AxisConfig } from './axis_config'; +import { VisConfig } from '../vis_config'; +import { Data } from '../data'; +import { getMockUiState } from '../../../fixtures/mocks'; describe('Vislib AxisTitle Class Test Suite', function() { let el; @@ -159,7 +158,7 @@ describe('Vislib AxisTitle Class Test Suite', function() { $(el.node()) .find('.x-axis-title') .find('svg').length - ).to.be(0); + ).toBe(0); }); describe('render Method', function() { @@ -169,8 +168,8 @@ describe('Vislib AxisTitle Class Test Suite', function() { }); it('should append an svg to div', function() { - expect(el.select('.x-axis-title').selectAll('svg').length).to.be(1); - expect(el.select('.y-axis-title').selectAll('svg').length).to.be(1); + expect(el.select('.x-axis-title').selectAll('svg').length).toBe(1); + expect(el.select('.y-axis-title').selectAll('svg').length).toBe(1); }); it('should append a g element to the svg', function() { @@ -179,13 +178,13 @@ describe('Vislib AxisTitle Class Test Suite', function() { .select('.x-axis-title') .selectAll('svg') .select('g').length - ).to.be(1); + ).toBe(1); expect( el .select('.y-axis-title') .selectAll('svg') .select('g').length - ).to.be(1); + ).toBe(1); }); it('should append text', function() { @@ -194,19 +193,19 @@ describe('Vislib AxisTitle Class Test Suite', function() { .select('.x-axis-title') .selectAll('svg') .selectAll('text') - ).to.be(true); + ).toBe(true); expect( !!el .select('.y-axis-title') .selectAll('svg') .selectAll('text') - ).to.be(true); + ).toBe(true); }); }); describe('draw Method', function() { it('should be a function', function() { - expect(_.isFunction(xTitle.draw())).to.be(true); + expect(_.isFunction(xTitle.draw())).toBe(true); }); }); }); diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/axis/index.js b/src/plugins/vis_type_vislib/public/vislib/lib/axis/index.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/axis/index.js rename to src/plugins/vis_type_vislib/public/vislib/lib/axis/index.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/axis/scale_modes.js b/src/plugins/vis_type_vislib/public/vislib/lib/axis/scale_modes.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/axis/scale_modes.js rename to src/plugins/vis_type_vislib/public/vislib/lib/axis/scale_modes.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/axis/time_ticks.js b/src/plugins/vis_type_vislib/public/vislib/lib/axis/time_ticks.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/axis/time_ticks.js rename to src/plugins/vis_type_vislib/public/vislib/lib/axis/time_ticks.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/axis/time_ticks.test.js b/src/plugins/vis_type_vislib/public/vislib/lib/axis/time_ticks.test.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/axis/time_ticks.test.js rename to src/plugins/vis_type_vislib/public/vislib/lib/axis/time_ticks.test.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/x_axis.js b/src/plugins/vis_type_vislib/public/vislib/lib/axis/x_axis.test.js similarity index 79% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/x_axis.js rename to src/plugins/vis_type_vislib/public/vislib/lib/axis/x_axis.test.js index d42562a87b825a..d007a8a14de131 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/x_axis.js +++ b/src/plugins/vis_type_vislib/public/vislib/lib/axis/x_axis.test.js @@ -19,12 +19,11 @@ import d3 from 'd3'; import _ from 'lodash'; -import expect from '@kbn/expect'; import $ from 'jquery'; -import { Axis } from '../../lib/axis'; -import { VisConfig } from '../../lib/vis_config'; -import { getMockUiState } from './fixtures/_vis_fixture'; +import { Axis } from './axis'; +import { VisConfig } from '../vis_config'; +import { getMockUiState } from '../../../fixtures/mocks'; describe('Vislib xAxis Class Test Suite', function() { let mockUiState; @@ -141,15 +140,15 @@ describe('Vislib xAxis Class Test Suite', function() { }); it('should append an svg to div', function() { - expect(el.selectAll('svg').length).to.be(1); + expect(el.selectAll('svg').length).toBe(1); }); it('should append a g element to the svg', function() { - expect(el.selectAll('svg').select('g').length).to.be(1); + expect(el.selectAll('svg').select('g').length).toBe(1); }); it('should append ticks with text', function() { - expect(!!el.selectAll('svg').selectAll('.tick text')).to.be(true); + expect(!!el.selectAll('svg').selectAll('.tick text')).toBe(true); }); }); @@ -166,22 +165,22 @@ describe('Vislib xAxis Class Test Suite', function() { }); it('should return a function', function() { - expect(_.isFunction(timeScale)).to.be(true); + expect(_.isFunction(timeScale)).toBe(true); }); it('should return the correct domain', function() { - expect(_.isDate(timeScale.domain()[0])).to.be(true); - expect(_.isDate(timeScale.domain()[1])).to.be(true); + expect(_.isDate(timeScale.domain()[0])).toBe(true); + expect(_.isDate(timeScale.domain()[1])).toBe(true); }); it('should return the min and max dates', function() { - expect(timeScale.domain()[0].toDateString()).to.be(new Date(1408734060000).toDateString()); - expect(timeScale.domain()[1].toDateString()).to.be(new Date(1408734330000).toDateString()); + expect(timeScale.domain()[0].toDateString()).toBe(new Date(1408734060000).toDateString()); + expect(timeScale.domain()[1].toDateString()).toBe(new Date(1408734330000).toDateString()); }); it('should return the correct range', function() { - expect(range[0]).to.be(0); - expect(range[1]).to.be(width); + expect(range[0]).toBe(0); + expect(range[1]).toBe(width); }); }); @@ -200,12 +199,12 @@ describe('Vislib xAxis Class Test Suite', function() { }); it('should return an ordinal scale', function() { - expect(ordinalDomain.domain()[0]).to.be('this'); - expect(ordinalDomain.domain()[4]).to.be('array'); + expect(ordinalDomain.domain()[0]).toBe('this'); + expect(ordinalDomain.domain()[4]).toBe('array'); }); it('should return an array of values', function() { - expect(Array.isArray(ordinalDomain.domain())).to.be(true); + expect(Array.isArray(ordinalDomain.domain())).toBe(true); }); }); @@ -220,17 +219,17 @@ describe('Vislib xAxis Class Test Suite', function() { }); it('should return a function', function() { - expect(_.isFunction(xScale)).to.be(true); + expect(_.isFunction(xScale)).toBe(true); }); it('should return a domain', function() { - expect(_.isDate(xScale.domain()[0])).to.be(true); - expect(_.isDate(xScale.domain()[1])).to.be(true); + expect(_.isDate(xScale.domain()[0])).toBe(true); + expect(_.isDate(xScale.domain()[1])).toBe(true); }); it('should return a range', function() { - expect(xScale.range()[0]).to.be(0); - expect(xScale.range()[1]).to.be(width); + expect(xScale.range()[0]).toBe(0); + expect(xScale.range()[1]).toBe(width); }); }); @@ -243,13 +242,13 @@ describe('Vislib xAxis Class Test Suite', function() { }); it('should create an getScale function on the xAxis class', function() { - expect(_.isFunction(xAxis.getScale())).to.be(true); + expect(_.isFunction(xAxis.getScale())).toBe(true); }); }); describe('draw Method', function() { it('should be a function', function() { - expect(_.isFunction(xAxis.draw())).to.be(true); + expect(_.isFunction(xAxis.draw())).toBe(true); }); }); }); diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/y_axis.js b/src/plugins/vis_type_vislib/public/vislib/lib/axis/y_axis.test.js similarity index 83% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/y_axis.js rename to src/plugins/vis_type_vislib/public/vislib/lib/axis/y_axis.test.js index f73011d6616451..85378ff1a14e87 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/y_axis.js +++ b/src/plugins/vis_type_vislib/public/vislib/lib/axis/y_axis.test.js @@ -20,11 +20,10 @@ import _ from 'lodash'; import d3 from 'd3'; import $ from 'jquery'; -import expect from '@kbn/expect'; -import { Axis } from '../../lib/axis'; -import { VisConfig } from '../../lib/vis_config'; -import { getMockUiState } from './fixtures/_vis_fixture'; +import { Axis } from './axis'; +import { VisConfig } from '../vis_config'; +import { getMockUiState } from '../../../fixtures/mocks'; const YAxis = Axis; let mockUiState; @@ -123,7 +122,7 @@ function createData(seriesData) { describe('Vislib yAxis Class Test Suite', function() { beforeEach(() => { mockUiState = getMockUiState(); - expect($('.y-axis-wrapper')).to.have.length(0); + expect($('.y-axis-wrapper')).toHaveLength(0); }); afterEach(function() { @@ -140,15 +139,15 @@ describe('Vislib yAxis Class Test Suite', function() { }); it('should append an svg to div', function() { - expect(el.selectAll('svg').length).to.be(1); + expect(el.selectAll('svg').length).toBe(1); }); it('should append a g element to the svg', function() { - expect(el.selectAll('svg').select('g').length).to.be(1); + expect(el.selectAll('svg').select('g').length).toBe(1); }); it('should append ticks with text', function() { - expect(!!el.selectAll('svg').selectAll('.tick text')).to.be(true); + expect(!!el.selectAll('svg').selectAll('.tick text')).toBe(true); }); }); @@ -160,14 +159,14 @@ describe('Vislib yAxis Class Test Suite', function() { function checkDomain(min, max) { const domain = yScale.domain(); - expect(domain[0]).to.be.lessThan(min + 1); - expect(domain[1]).to.be.greaterThan(max - 1); + expect(domain[0]).toBeLessThan(min + 1); + expect(domain[1]).toBeGreaterThan(max - 1); return domain; } function checkRange() { - expect(yScale.range()[0]).to.be(height); - expect(yScale.range()[1]).to.be(0); + expect(yScale.range()[0]).toBe(height); + expect(yScale.range()[1]).toBe(0); } describe('API', function() { @@ -178,7 +177,7 @@ describe('Vislib yAxis Class Test Suite', function() { }); it('should return a function', function() { - expect(_.isFunction(yScale)).to.be(true); + expect(_.isFunction(yScale)).toBe(true); }); }); @@ -194,7 +193,7 @@ describe('Vislib yAxis Class Test Suite', function() { const min = 0; const max = _.max(_.flattenDeep(graphData)); const domain = checkDomain(min, max); - expect(domain[1]).to.be.greaterThan(0); + expect(domain[1]).toBeGreaterThan(0); checkRange(); }); }); @@ -214,7 +213,7 @@ describe('Vislib yAxis Class Test Suite', function() { const min = _.min(_.flattenDeep(graphData)); const max = 0; const domain = checkDomain(min, max); - expect(domain[0]).to.be.lessThan(0); + expect(domain[0]).toBeLessThan(0); checkRange(); }); }); @@ -234,8 +233,8 @@ describe('Vislib yAxis Class Test Suite', function() { const min = _.min(_.flattenDeep(graphData)); const max = _.max(_.flattenDeep(graphData)); const domain = checkDomain(min, max); - expect(domain[0]).to.be.lessThan(0); - expect(domain[1]).to.be.greaterThan(0); + expect(domain[0]).toBeLessThan(0); + expect(domain[1]).toBeGreaterThan(0); checkRange(); }); }); @@ -255,7 +254,7 @@ describe('Vislib yAxis Class Test Suite', function() { expect(function() { yAxis.axisScale.validateUserExtents(min, max); - }).to.throwError(); + }).toThrow(); }); it('should return a decimal value', function() { @@ -267,16 +266,16 @@ describe('Vislib yAxis Class Test Suite', function() { domain[1] = 80; const newDomain = yAxis.axisScale.validateUserExtents(domain); - expect(newDomain[0]).to.be(domain[0] / 100); - expect(newDomain[1]).to.be(domain[1] / 100); + expect(newDomain[0]).toBe(domain[0] / 100); + expect(newDomain[1]).toBe(domain[1] / 100); }); it('should return the user defined value', function() { domain = [20, 50]; const newDomain = yAxis.axisScale.validateUserExtents(domain); - expect(newDomain[0]).to.be(domain[0]); - expect(newDomain[1]).to.be(domain[1]); + expect(newDomain[0]).toBe(domain[0]); + expect(newDomain[1]).toBe(domain[1]); }); }); @@ -287,7 +286,7 @@ describe('Vislib yAxis Class Test Suite', function() { expect(function() { yAxis.axisScale.validateAxisExtents(min, max); - }).to.throwError(); + }).toThrow(); }); it('min > max', function() { @@ -296,7 +295,7 @@ describe('Vislib yAxis Class Test Suite', function() { expect(function() { yAxis.axisScale.validateAxisExtents(min, max); - }).to.throwError(); + }).toThrow(); }); }); }); @@ -306,17 +305,17 @@ describe('Vislib yAxis Class Test Suite', function() { it('should return a function', function() { fnNames.forEach(function(fnName) { - expect(yAxis.axisScale.getD3Scale(fnName)).to.be.a(Function); + expect(yAxis.axisScale.getD3Scale(fnName)).toEqual(expect.any(Function)); }); // if no value is provided to the function, scale should default to a linear scale - expect(yAxis.axisScale.getD3Scale()).to.be.a(Function); + expect(yAxis.axisScale.getD3Scale()).toEqual(expect.any(Function)); }); it('should throw an error if function name is undefined', function() { expect(function() { yAxis.axisScale.getD3Scale('square'); - }).to.throwError(); + }).toThrow(); }); }); @@ -324,18 +323,18 @@ describe('Vislib yAxis Class Test Suite', function() { it('should throw an error', function() { expect(function() { yAxis.axisScale.logDomain(-10, -5); - }).to.throwError(); + }).toThrow(); expect(function() { yAxis.axisScale.logDomain(-10, 5); - }).to.throwError(); + }).toThrow(); expect(function() { yAxis.axisScale.logDomain(0, -5); - }).to.throwError(); + }).toThrow(); }); it('should return a yMin value of 1', function() { const yMin = yAxis.axisScale.logDomain(0, 200)[0]; - expect(yMin).to.be(1); + expect(yMin).toBe(1); }); }); @@ -354,7 +353,7 @@ describe('Vislib yAxis Class Test Suite', function() { it('should use decimal format for small values', function() { yAxis.yMax = 1; const tickFormat = yAxis.getAxis().tickFormat(); - expect(tickFormat(0.8)).to.be('0.8'); + expect(tickFormat(0.8)).toBe('0.8'); }); }); @@ -364,7 +363,7 @@ describe('Vislib yAxis Class Test Suite', function() { }); it('should be a function', function() { - expect(_.isFunction(yAxis.draw())).to.be(true); + expect(_.isFunction(yAxis.draw())).toBe(true); }); }); @@ -374,9 +373,9 @@ describe('Vislib yAxis Class Test Suite', function() { }); it('should return the correct number of ticks', function() { - expect(yAxis.tickScale(1000)).to.be(11); - expect(yAxis.tickScale(40)).to.be(3); - expect(yAxis.tickScale(20)).to.be(0); + expect(yAxis.tickScale(1000)).toBe(11); + expect(yAxis.tickScale(40)).toBe(3); + expect(yAxis.tickScale(20)).toBe(0); }); }); }); diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/binder.ts b/src/plugins/vis_type_vislib/public/vislib/lib/binder.ts similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/binder.ts rename to src/plugins/vis_type_vislib/public/vislib/lib/binder.ts diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/chart_grid.js b/src/plugins/vis_type_vislib/public/vislib/lib/chart_grid.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/chart_grid.js rename to src/plugins/vis_type_vislib/public/vislib/lib/chart_grid.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/chart_title.js b/src/plugins/vis_type_vislib/public/vislib/lib/chart_title.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/chart_title.js rename to src/plugins/vis_type_vislib/public/vislib/lib/chart_title.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/data.js b/src/plugins/vis_type_vislib/public/vislib/lib/data.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/data.js rename to src/plugins/vis_type_vislib/public/vislib/lib/data.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/data.js b/src/plugins/vis_type_vislib/public/vislib/lib/data.test.js similarity index 91% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/data.js rename to src/plugins/vis_type_vislib/public/vislib/lib/data.test.js index d4ec6f363a75b0..b1a91979b3d9d8 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/data.js +++ b/src/plugins/vis_type_vislib/public/vislib/lib/data.test.js @@ -18,10 +18,9 @@ */ import _ from 'lodash'; -import expect from '@kbn/expect'; -import { Data } from '../../lib/data'; -import { getMockUiState } from './fixtures/_vis_fixture'; +import { Data } from './data'; +import { getMockUiState } from '../../fixtures/mocks'; const seriesData = { label: '', @@ -160,12 +159,12 @@ describe('Vislib Data Class Test Suite', function() { describe('Data Class (main)', function() { it('should be a function', function() { - expect(_.isFunction(Data)).to.be(true); + expect(_.isFunction(Data)).toBe(true); }); it('should return an object', function() { const rowIn = new Data(rowsData, mockUiState, () => undefined); - expect(_.isObject(rowIn)).to.be(true); + expect(_.isObject(rowIn)).toBe(true); }); }); @@ -183,7 +182,7 @@ describe('Vislib Data Class Test Suite', function() { it('should remove zero values', function() { const slices = data._removeZeroSlices(data.data.slices); - expect(slices.children.length).to.be(2); + expect(slices.children.length).toBe(2); }); }); @@ -197,7 +196,7 @@ describe('Vislib Data Class Test Suite', function() { }); it('should return an array of value objects from every series', function() { - expect(serOut.every(_.isObject)).to.be(true); + expect(serOut.every(_.isObject)).toBe(true); }); it('should return all points from every series', testLength(seriesData)); @@ -220,7 +219,7 @@ describe('Vislib Data Class Test Suite', function() { 0 ); - expect(data.flatten()).to.have.length(len); + expect(data.flatten()).toHaveLength(len); }; } }); @@ -268,15 +267,15 @@ describe('Vislib Data Class Test Suite', function() { describe('getVisData', function() { it('should return the rows property', function() { const visData = data.getVisData(); - expect(visData[0].title).to.eql(geohashGridData.rows[0].title); + expect(visData[0].title).toEqual(geohashGridData.rows[0].title); }); }); describe('getGeoExtents', function() { it('should return the min and max geoJson properties', function() { const minMax = data.getGeoExtents(); - expect(minMax.min).to.be(1); - expect(minMax.max).to.be(331); + expect(minMax.min).toBe(1); + expect(minMax.max).toBe(331); }); }); }); @@ -284,7 +283,7 @@ describe('Vislib Data Class Test Suite', function() { describe('null value check', function() { it('should return false', function() { const data = new Data(rowsData, mockUiState, () => undefined); - expect(data.hasNullValues()).to.be(false); + expect(data.hasNullValues()).toBe(false); }); it('should return true', function() { @@ -304,7 +303,7 @@ describe('Vislib Data Class Test Suite', function() { }); const data = new Data(nullRowData, mockUiState, () => undefined); - expect(data.hasNullValues()).to.be(true); + expect(data.hasNullValues()).toBe(true); }); }); }); diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/dispatch.js b/src/plugins/vis_type_vislib/public/vislib/lib/dispatch.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/dispatch.js rename to src/plugins/vis_type_vislib/public/vislib/lib/dispatch.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/dispatch_heatmap.test.js b/src/plugins/vis_type_vislib/public/vislib/lib/dispatch_heatmap.test.js similarity index 75% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/dispatch_heatmap.test.js rename to src/plugins/vis_type_vislib/public/vislib/lib/dispatch_heatmap.test.js index e22f19ea643fd3..4e650d4c20f977 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/dispatch_heatmap.test.js +++ b/src/plugins/vis_type_vislib/public/vislib/lib/dispatch_heatmap.test.js @@ -17,12 +17,11 @@ * under the License. */ -import mockDispatchDataD3 from './fixtures/dispatch_heatmap_d3.json'; -import { Dispatch } from '../../lib/dispatch'; -import mockdataPoint from './fixtures/dispatch_heatmap_data_point.json'; -import mockConfigPercentage from './fixtures/dispatch_heatmap_config.json'; +import mockDispatchDataD3 from '../../fixtures/dispatch_heatmap_d3.json'; +import { Dispatch } from './dispatch'; +import mockdataPoint from '../../fixtures/dispatch_heatmap_data_point.json'; +import mockConfigPercentage from '../../fixtures/dispatch_heatmap_config.json'; -jest.mock('ui/new_platform'); jest.mock('d3', () => ({ event: { target: { @@ -32,15 +31,6 @@ jest.mock('d3', () => ({ }, }, })); -jest.mock('../../../legacy_imports.ts', () => ({ - ...jest.requireActual('../../../legacy_imports.ts'), - chrome: { - getUiSettingsClient: () => ({ - get: () => '', - }), - addBasePath: () => {}, - }, -})); function getHandlerMock(config = {}, data = {}) { return { diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/dispatch_vertical_bar_chart.test.js b/src/plugins/vis_type_vislib/public/vislib/lib/dispatch_vertical_bar_chart.test.js similarity index 74% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/dispatch_vertical_bar_chart.test.js rename to src/plugins/vis_type_vislib/public/vislib/lib/dispatch_vertical_bar_chart.test.js index 8fe9ac24db77b5..a680788281fb16 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/dispatch_vertical_bar_chart.test.js +++ b/src/plugins/vis_type_vislib/public/vislib/lib/dispatch_vertical_bar_chart.test.js @@ -17,13 +17,12 @@ * under the License. */ -import mockDispatchDataD3 from './fixtures/dispatch_bar_chart_d3.json'; -import { Dispatch } from '../../lib/dispatch'; -import mockdataPoint from './fixtures/dispatch_bar_chart_data_point.json'; -import mockConfigPercentage from './fixtures/dispatch_bar_chart_config_percentage.json'; -import mockConfigNormal from './fixtures/dispatch_bar_chart_config_normal.json'; +import mockDispatchDataD3 from '../../fixtures/dispatch_bar_chart_d3.json'; +import { Dispatch } from './dispatch'; +import mockdataPoint from '../../fixtures/dispatch_bar_chart_data_point.json'; +import mockConfigPercentage from '../../fixtures/dispatch_bar_chart_config_percentage.json'; +import mockConfigNormal from '../../fixtures/dispatch_bar_chart_config_normal.json'; -jest.mock('ui/new_platform'); jest.mock('d3', () => ({ event: { target: { @@ -33,15 +32,6 @@ jest.mock('d3', () => ({ }, }, })); -jest.mock('../../../legacy_imports.ts', () => ({ - ...jest.requireActual('../../../legacy_imports.ts'), - chrome: { - getUiSettingsClient: () => ({ - get: () => '', - }), - addBasePath: () => {}, - }, -})); function getHandlerMock(config = {}, data = {}) { return { diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/handler.js b/src/plugins/vis_type_vislib/public/vislib/lib/handler.js similarity index 98% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/handler.js rename to src/plugins/vis_type_vislib/public/vislib/lib/handler.js index f33ce0395af1fd..f5b1c13f1a83f7 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/handler.js +++ b/src/plugins/vis_type_vislib/public/vislib/lib/handler.js @@ -29,7 +29,7 @@ import { Axis } from './axis/axis'; import { ChartGrid as Grid } from './chart_grid'; import { visTypes as chartTypes } from '../visualizations/vis_types'; import { Binder } from './binder'; -import { dispatchRenderComplete } from '../../../../../../plugins/kibana_utils/public'; +import { dispatchRenderComplete } from '../../../../kibana_utils/public'; const markdownIt = new MarkdownIt({ html: false, diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/layout/_index.scss b/src/plugins/vis_type_vislib/public/vislib/lib/layout/_index.scss similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/layout/_index.scss rename to src/plugins/vis_type_vislib/public/vislib/lib/layout/_index.scss diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/layout/_layout.scss b/src/plugins/vis_type_vislib/public/vislib/lib/layout/_layout.scss similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/layout/_layout.scss rename to src/plugins/vis_type_vislib/public/vislib/lib/layout/_layout.scss diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/layout/index.js b/src/plugins/vis_type_vislib/public/vislib/lib/layout/index.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/layout/index.js rename to src/plugins/vis_type_vislib/public/vislib/lib/layout/index.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/layout/layout.js b/src/plugins/vis_type_vislib/public/vislib/lib/layout/layout.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/layout/layout.js rename to src/plugins/vis_type_vislib/public/vislib/lib/layout/layout.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/layout/layout_types.js b/src/plugins/vis_type_vislib/public/vislib/lib/layout/layout_types.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/layout/layout_types.js rename to src/plugins/vis_type_vislib/public/vislib/lib/layout/layout_types.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/layout/layout_types.js b/src/plugins/vis_type_vislib/public/vislib/lib/layout/layout_types.test.js similarity index 83% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/layout/layout_types.js rename to src/plugins/vis_type_vislib/public/vislib/lib/layout/layout_types.test.js index cc6d33a2d98daf..0bc11e5124a077 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/layout/layout_types.js +++ b/src/plugins/vis_type_vislib/public/vislib/lib/layout/layout_types.test.js @@ -18,9 +18,8 @@ */ import _ from 'lodash'; -import expect from '@kbn/expect'; -import { layoutTypes as layoutType } from '../../../lib/layout/layout_types'; +import { layoutTypes as layoutType } from './layout_types'; describe('Vislib Layout Types Test Suite', function() { let layoutFunc; @@ -30,10 +29,10 @@ describe('Vislib Layout Types Test Suite', function() { }); it('should be an object', function() { - expect(_.isObject(layoutType)).to.be(true); + expect(_.isObject(layoutType)).toBe(true); }); it('should return a function', function() { - expect(typeof layoutFunc).to.be('function'); + expect(typeof layoutFunc).toBe('function'); }); }); diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/layout/splits/column_chart/chart_split.js b/src/plugins/vis_type_vislib/public/vislib/lib/layout/splits/column_chart/chart_split.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/layout/splits/column_chart/chart_split.js rename to src/plugins/vis_type_vislib/public/vislib/lib/layout/splits/column_chart/chart_split.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/layout/splits/column_chart/chart_title_split.js b/src/plugins/vis_type_vislib/public/vislib/lib/layout/splits/column_chart/chart_title_split.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/layout/splits/column_chart/chart_title_split.js rename to src/plugins/vis_type_vislib/public/vislib/lib/layout/splits/column_chart/chart_title_split.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/layout/splits/column_chart/splits.js b/src/plugins/vis_type_vislib/public/vislib/lib/layout/splits/column_chart/splits.test.js similarity index 89% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/layout/splits/column_chart/splits.js rename to src/plugins/vis_type_vislib/public/vislib/lib/layout/splits/column_chart/splits.test.js index 3942aa18891b84..117b346efda898 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/layout/splits/column_chart/splits.js +++ b/src/plugins/vis_type_vislib/public/vislib/lib/layout/splits/column_chart/splits.test.js @@ -18,13 +18,12 @@ */ import d3 from 'd3'; -import expect from '@kbn/expect'; import $ from 'jquery'; -import { chartSplit } from '../../../../../lib/layout/splits/column_chart/chart_split'; -import { chartTitleSplit } from '../../../../../lib/layout/splits/column_chart/chart_title_split'; -import { xAxisSplit } from '../../../../../lib/layout/splits/column_chart/x_axis_split'; -import { yAxisSplit } from '../../../../../lib/layout/splits/column_chart/y_axis_split'; +import { chartSplit } from './chart_split'; +import { chartTitleSplit } from './chart_title_split'; +import { xAxisSplit } from './x_axis_split'; +import { yAxisSplit } from './y_axis_split'; describe('Vislib Split Function Test Suite', function() { describe('Column Chart', function() { @@ -174,11 +173,11 @@ describe('Vislib Split Function Test Suite', function() { }); it('should append the correct number of divs', function() { - expect($('.chart').length).to.be(2); + expect($('.chart').length).toBe(2); }); it('should add the correct class name', function() { - expect(!!$('.visWrapper__splitCharts--row').length).to.be(true); + expect(!!$('.visWrapper__splitCharts--row').length).toBe(true); }); }); @@ -213,16 +212,16 @@ describe('Vislib Split Function Test Suite', function() { }); it('should append the correct number of divs', function() { - expect($('.chart-title').length).to.be(2); + expect($('.chart-title').length).toBe(2); }); it('should remove the correct div', function() { - expect($('.visAxis__splitTitles--y').length).to.be(1); - expect($('.visAxis__splitTitles--x').length).to.be(0); + expect($('.visAxis__splitTitles--y').length).toBe(1); + expect($('.visAxis__splitTitles--x').length).toBe(0); }); it('should remove all chart title divs when only one chart is rendered', function() { - expect(fixture).to.be(0); + expect(fixture).toBe(0); }); }); @@ -246,7 +245,7 @@ describe('Vislib Split Function Test Suite', function() { }); it('should append the correct number of divs', function() { - expect(divs.length).to.be(2); + expect(divs.length).toBe(2); }); }); @@ -272,7 +271,7 @@ describe('Vislib Split Function Test Suite', function() { }); it('should append the correct number of divs', function() { - expect(divs.length).to.be(2); + expect(divs.length).toBe(2); }); }); }); diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/layout/splits/column_chart/x_axis_split.js b/src/plugins/vis_type_vislib/public/vislib/lib/layout/splits/column_chart/x_axis_split.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/layout/splits/column_chart/x_axis_split.js rename to src/plugins/vis_type_vislib/public/vislib/lib/layout/splits/column_chart/x_axis_split.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/layout/splits/column_chart/y_axis_split.js b/src/plugins/vis_type_vislib/public/vislib/lib/layout/splits/column_chart/y_axis_split.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/layout/splits/column_chart/y_axis_split.js rename to src/plugins/vis_type_vislib/public/vislib/lib/layout/splits/column_chart/y_axis_split.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/layout/splits/gauge_chart/chart_split.js b/src/plugins/vis_type_vislib/public/vislib/lib/layout/splits/gauge_chart/chart_split.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/layout/splits/gauge_chart/chart_split.js rename to src/plugins/vis_type_vislib/public/vislib/lib/layout/splits/gauge_chart/chart_split.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/layout/splits/gauge_chart/chart_title_split.js b/src/plugins/vis_type_vislib/public/vislib/lib/layout/splits/gauge_chart/chart_title_split.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/layout/splits/gauge_chart/chart_title_split.js rename to src/plugins/vis_type_vislib/public/vislib/lib/layout/splits/gauge_chart/chart_title_split.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/layout/splits/gauge_chart/splits.js b/src/plugins/vis_type_vislib/public/vislib/lib/layout/splits/gauge_chart/splits.test.js similarity index 93% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/layout/splits/gauge_chart/splits.js rename to src/plugins/vis_type_vislib/public/vislib/lib/layout/splits/gauge_chart/splits.test.js index 8978f80f58dde8..05f6f72246d4a8 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/layout/splits/gauge_chart/splits.js +++ b/src/plugins/vis_type_vislib/public/vislib/lib/layout/splits/gauge_chart/splits.test.js @@ -18,11 +18,10 @@ */ import d3 from 'd3'; -import expect from '@kbn/expect'; import $ from 'jquery'; -import { chartSplit } from '../../../../../lib/layout/splits/gauge_chart/chart_split'; -import { chartTitleSplit } from '../../../../../lib/layout/splits/gauge_chart/chart_title_split'; +import { chartSplit } from './chart_split'; +import { chartTitleSplit } from './chart_title_split'; describe('Vislib Gauge Split Function Test Suite', function() { describe('Column Chart', function() { @@ -172,11 +171,11 @@ describe('Vislib Gauge Split Function Test Suite', function() { }); it('should append the correct number of divs', function() { - expect($('.chart').length).to.be(2); + expect($('.chart').length).toBe(2); }); it('should add the correct class name', function() { - expect(!!$('.visWrapper__splitCharts--row').length).to.be(true); + expect(!!$('.visWrapper__splitCharts--row').length).toBe(true); }); }); @@ -196,8 +195,8 @@ describe('Vislib Gauge Split Function Test Suite', function() { }); it('should append the correct number of divs', function() { - expect($('.visAxis__splitTitles--x .chart-title').length).to.be(2); - expect($('.visAxis__splitTitles--y .chart-title').length).to.be(2); + expect($('.visAxis__splitTitles--x .chart-title').length).toBe(2); + expect($('.visAxis__splitTitles--y .chart-title').length).toBe(2); }); }); }); diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/layout/splits/pie_chart/chart_split.js b/src/plugins/vis_type_vislib/public/vislib/lib/layout/splits/pie_chart/chart_split.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/layout/splits/pie_chart/chart_split.js rename to src/plugins/vis_type_vislib/public/vislib/lib/layout/splits/pie_chart/chart_split.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/layout/splits/pie_chart/chart_title_split.js b/src/plugins/vis_type_vislib/public/vislib/lib/layout/splits/pie_chart/chart_title_split.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/layout/splits/pie_chart/chart_title_split.js rename to src/plugins/vis_type_vislib/public/vislib/lib/layout/splits/pie_chart/chart_title_split.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/layout/types/column_layout.js b/src/plugins/vis_type_vislib/public/vislib/lib/layout/types/column_layout.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/layout/types/column_layout.js rename to src/plugins/vis_type_vislib/public/vislib/lib/layout/types/column_layout.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/layout/types/column_layout.js b/src/plugins/vis_type_vislib/public/vislib/lib/layout/types/column_layout.test.js similarity index 91% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/layout/types/column_layout.js rename to src/plugins/vis_type_vislib/public/vislib/lib/layout/types/column_layout.test.js index e9c2ff0d2fa078..a27ee57e64a5a9 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/layout/types/column_layout.js +++ b/src/plugins/vis_type_vislib/public/vislib/lib/layout/types/column_layout.test.js @@ -19,9 +19,8 @@ import d3 from 'd3'; import _ from 'lodash'; -import expect from '@kbn/expect'; -import { layoutTypes } from '../../../../lib/layout/layout_types'; +import { layoutTypes } from '../layout_types'; describe('Vislib Column Layout Test Suite', function() { let columnLayout; @@ -98,13 +97,13 @@ describe('Vislib Column Layout Test Suite', function() { }); it('should return an array of objects', function() { - expect(Array.isArray(columnLayout)).to.be(true); - expect(_.isObject(columnLayout[0])).to.be(true); + expect(Array.isArray(columnLayout)).toBe(true); + expect(_.isObject(columnLayout[0])).toBe(true); }); it('should throw an error when the wrong number or no arguments provided', function() { expect(function() { layoutTypes.point_series(el); - }).to.throwError(); + }).toThrow(); }); }); diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/layout/types/gauge_layout.js b/src/plugins/vis_type_vislib/public/vislib/lib/layout/types/gauge_layout.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/layout/types/gauge_layout.js rename to src/plugins/vis_type_vislib/public/vislib/lib/layout/types/gauge_layout.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/layout/types/pie_layout.js b/src/plugins/vis_type_vislib/public/vislib/lib/layout/types/pie_layout.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/layout/types/pie_layout.js rename to src/plugins/vis_type_vislib/public/vislib/lib/layout/types/pie_layout.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/types/gauge.js b/src/plugins/vis_type_vislib/public/vislib/lib/types/gauge.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/types/gauge.js rename to src/plugins/vis_type_vislib/public/vislib/lib/types/gauge.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/types/index.js b/src/plugins/vis_type_vislib/public/vislib/lib/types/index.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/types/index.js rename to src/plugins/vis_type_vislib/public/vislib/lib/types/index.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/types/pie.js b/src/plugins/vis_type_vislib/public/vislib/lib/types/pie.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/types/pie.js rename to src/plugins/vis_type_vislib/public/vislib/lib/types/pie.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/types/point_series.js b/src/plugins/vis_type_vislib/public/vislib/lib/types/point_series.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/types/point_series.js rename to src/plugins/vis_type_vislib/public/vislib/lib/types/point_series.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/types/point_series.test.js b/src/plugins/vis_type_vislib/public/vislib/lib/types/point_series.test.js similarity index 53% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/types/point_series.test.js rename to src/plugins/vis_type_vislib/public/vislib/lib/types/point_series.test.js index 38a6be548594f3..684d8f346744e2 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/types/point_series.test.js +++ b/src/plugins/vis_type_vislib/public/vislib/lib/types/point_series.test.js @@ -16,8 +16,57 @@ * specific language governing permissions and limitations * under the License. */ -import stackedSeries from '../../__tests__/lib/fixtures/mock_data/date_histogram/_stacked_series'; +import stackedSeries from '../../../fixtures/mock_data/date_histogram/_stacked_series'; import { vislibPointSeriesTypes } from './point_series'; +import percentileTestdata from './testdata_linechart_percentile.json'; +import percentileTestdataResult from './testdata_linechart_percentile_result.json'; + +const maxBucketData = { + get: prop => { + return maxBucketData[prop] || maxBucketData.data[prop] || null; + }, + getLabels: () => [], + data: { + hits: 621, + ordered: { + date: true, + interval: 30000, + max: 1408734982458, + min: 1408734082458, + }, + series: [ + { label: 's1', values: [{ x: 1408734060000, y: 8 }] }, + { label: 's2', values: [{ x: 1408734060000, y: 8 }] }, + { label: 's3', values: [{ x: 1408734060000, y: 8 }] }, + { label: 's4', values: [{ x: 1408734060000, y: 8 }] }, + { label: 's5', values: [{ x: 1408734060000, y: 8 }] }, + { label: 's6', values: [{ x: 1408734060000, y: 8 }] }, + { label: 's7', values: [{ x: 1408734060000, y: 8 }] }, + { label: 's8', values: [{ x: 1408734060000, y: 8 }] }, + { label: 's9', values: [{ x: 1408734060000, y: 8 }] }, + { label: 's10', values: [{ x: 1408734060000, y: 8 }] }, + { label: 's11', values: [{ x: 1408734060000, y: 8 }] }, + { label: 's12', values: [{ x: 1408734060000, y: 8 }] }, + { label: 's13', values: [{ x: 1408734060000, y: 8 }] }, + { label: 's14', values: [{ x: 1408734060000, y: 8 }] }, + { label: 's15', values: [{ x: 1408734060000, y: 8 }] }, + { label: 's16', values: [{ x: 1408734060000, y: 8 }] }, + { label: 's17', values: [{ x: 1408734060000, y: 8 }] }, + { label: 's18', values: [{ x: 1408734060000, y: 8 }] }, + { label: 's19', values: [{ x: 1408734060000, y: 8 }] }, + { label: 's20', values: [{ x: 1408734060000, y: 8 }] }, + { label: 's21', values: [{ x: 1408734060000, y: 8 }] }, + { label: 's22', values: [{ x: 1408734060000, y: 8 }] }, + { label: 's23', values: [{ x: 1408734060000, y: 8 }] }, + { label: 's24', values: [{ x: 1408734060000, y: 8 }] }, + { label: 's25', values: [{ x: 1408734060000, y: 8 }] }, + { label: 's26', values: [{ x: 1408734060000, y: 8 }] }, + ], + xAxisLabel: 'Date Histogram', + yAxisLabel: 'series', + yAxisFormatter: () => 'test', + }, +}; describe('vislibPointSeriesTypes', () => { const heatmapConfig = { @@ -41,53 +90,6 @@ describe('vislibPointSeriesTypes', () => { data: stackedSeries, }; - const maxBucketData = { - get: prop => { - return maxBucketData[prop] || maxBucketData.data[prop] || null; - }, - getLabels: () => [], - data: { - hits: 621, - ordered: { - date: true, - interval: 30000, - max: 1408734982458, - min: 1408734082458, - }, - series: [ - { label: 's1', values: [{ x: 1408734060000, y: 8 }] }, - { label: 's2', values: [{ x: 1408734060000, y: 8 }] }, - { label: 's3', values: [{ x: 1408734060000, y: 8 }] }, - { label: 's4', values: [{ x: 1408734060000, y: 8 }] }, - { label: 's5', values: [{ x: 1408734060000, y: 8 }] }, - { label: 's6', values: [{ x: 1408734060000, y: 8 }] }, - { label: 's7', values: [{ x: 1408734060000, y: 8 }] }, - { label: 's8', values: [{ x: 1408734060000, y: 8 }] }, - { label: 's9', values: [{ x: 1408734060000, y: 8 }] }, - { label: 's10', values: [{ x: 1408734060000, y: 8 }] }, - { label: 's11', values: [{ x: 1408734060000, y: 8 }] }, - { label: 's12', values: [{ x: 1408734060000, y: 8 }] }, - { label: 's13', values: [{ x: 1408734060000, y: 8 }] }, - { label: 's14', values: [{ x: 1408734060000, y: 8 }] }, - { label: 's15', values: [{ x: 1408734060000, y: 8 }] }, - { label: 's16', values: [{ x: 1408734060000, y: 8 }] }, - { label: 's17', values: [{ x: 1408734060000, y: 8 }] }, - { label: 's18', values: [{ x: 1408734060000, y: 8 }] }, - { label: 's19', values: [{ x: 1408734060000, y: 8 }] }, - { label: 's20', values: [{ x: 1408734060000, y: 8 }] }, - { label: 's21', values: [{ x: 1408734060000, y: 8 }] }, - { label: 's22', values: [{ x: 1408734060000, y: 8 }] }, - { label: 's23', values: [{ x: 1408734060000, y: 8 }] }, - { label: 's24', values: [{ x: 1408734060000, y: 8 }] }, - { label: 's25', values: [{ x: 1408734060000, y: 8 }] }, - { label: 's26', values: [{ x: 1408734060000, y: 8 }] }, - ], - xAxisLabel: 'Date Histogram', - yAxisLabel: 'series', - yAxisFormatter: () => 'test', - }, - }; - describe('axis formatters', () => { it('should create a value axis config with the default y axis formatter', () => { const parsedConfig = vislibPointSeriesTypes.line({}, maxBucketData); @@ -172,3 +174,59 @@ describe('vislibPointSeriesTypes', () => { }); }); }); + +describe('Point Series Config Type Class Test Suite', function() { + let parsedConfig; + const histogramConfig = { + type: 'histogram', + addLegend: true, + tooltip: { + show: true, + }, + categoryAxes: [ + { + id: 'CategoryAxis-1', + type: 'category', + title: {}, + }, + ], + valueAxes: [ + { + id: 'ValueAxis-1', + type: 'value', + labels: {}, + title: {}, + }, + ], + }; + + describe('histogram chart', function() { + beforeEach(function() { + parsedConfig = vislibPointSeriesTypes.column(histogramConfig, maxBucketData); + }); + it('should not throw an error when more than 25 series are provided', function() { + expect(parsedConfig.error).toBeUndefined(); + }); + + it('should set axis title and formatter from data', () => { + expect(parsedConfig.categoryAxes[0].title.text).toEqual(maxBucketData.data.xAxisLabel); + expect(parsedConfig.valueAxes[0].labels.axisFormatter).toBeDefined(); + }); + }); + + describe('line chart', function() { + beforeEach(function() { + const percentileDataObj = { + get: prop => { + return maxBucketData[prop] || maxBucketData.data[prop] || null; + }, + getLabels: () => [], + data: percentileTestdata.data, + }; + parsedConfig = vislibPointSeriesTypes.line(percentileTestdata.cfg, percentileDataObj); + }); + it('should render a percentile line chart', function() { + expect(JSON.stringify(parsedConfig)).toEqual(JSON.stringify(percentileTestdataResult)); + }); + }); +}); diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/types/testdata_linechart_percentile.json b/src/plugins/vis_type_vislib/public/vislib/lib/types/testdata_linechart_percentile.json similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/types/testdata_linechart_percentile.json rename to src/plugins/vis_type_vislib/public/vislib/lib/types/testdata_linechart_percentile.json diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/types/testdata_linechart_percentile_result.json b/src/plugins/vis_type_vislib/public/vislib/lib/types/testdata_linechart_percentile_result.json similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/types/testdata_linechart_percentile_result.json rename to src/plugins/vis_type_vislib/public/vislib/lib/types/testdata_linechart_percentile_result.json diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/vis_config.js b/src/plugins/vis_type_vislib/public/vislib/lib/vis_config.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/vis_config.js rename to src/plugins/vis_type_vislib/public/vislib/lib/vis_config.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/vis_config.js b/src/plugins/vis_type_vislib/public/vislib/lib/vis_config.test.js similarity index 86% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/vis_config.js rename to src/plugins/vis_type_vislib/public/vislib/lib/vis_config.test.js index 7dfd2ded36a667..1ba7d4aaa8a0c9 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/vis_config.js +++ b/src/plugins/vis_type_vislib/public/vislib/lib/vis_config.test.js @@ -18,10 +18,9 @@ */ import d3 from 'd3'; -import expect from '@kbn/expect'; -import { VisConfig } from '../../lib/vis_config'; -import { getMockUiState } from './fixtures/_vis_fixture'; +import { VisConfig } from './vis_config'; +import { getMockUiState } from '../../fixtures/mocks'; describe('Vislib VisConfig Class Test Suite', function() { let el; @@ -109,33 +108,33 @@ describe('Vislib VisConfig Class Test Suite', function() { describe('get Method', function() { it('should be a function', function() { - expect(typeof visConfig.get).to.be('function'); + expect(typeof visConfig.get).toBe('function'); }); it('should get the property', function() { - expect(visConfig.get('el')).to.be(el); - expect(visConfig.get('type')).to.be('point_series'); + expect(visConfig.get('el')).toBe(el); + expect(visConfig.get('type')).toBe('point_series'); }); it('should return defaults if property does not exist', function() { - expect(visConfig.get('this.does.not.exist', 'defaults')).to.be('defaults'); + expect(visConfig.get('this.does.not.exist', 'defaults')).toBe('defaults'); }); it('should throw an error if property does not exist and defaults were not provided', function() { expect(function() { visConfig.get('this.does.not.exist'); - }).to.throwError(); + }).toThrow(); }); }); describe('set Method', function() { it('should be a function', function() { - expect(typeof visConfig.set).to.be('function'); + expect(typeof visConfig.set).toBe('function'); }); it('should set a property', function() { visConfig.set('this.does.not.exist', 'it.does.now'); - expect(visConfig.get('this.does.not.exist')).to.be('it.does.now'); + expect(visConfig.get('this.does.not.exist')).toBe('it.does.now'); }); }); }); diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/partials/touchdown.tmpl.html b/src/plugins/vis_type_vislib/public/vislib/partials/touchdown.tmpl.html similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/partials/touchdown.tmpl.html rename to src/plugins/vis_type_vislib/public/vislib/partials/touchdown.tmpl.html diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/response_handler.js b/src/plugins/vis_type_vislib/public/vislib/response_handler.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/response_handler.js rename to src/plugins/vis_type_vislib/public/vislib/response_handler.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/response_handler.test.ts b/src/plugins/vis_type_vislib/public/vislib/response_handler.test.ts similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/response_handler.test.ts rename to src/plugins/vis_type_vislib/public/vislib/response_handler.test.ts diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/types.ts b/src/plugins/vis_type_vislib/public/vislib/types.ts similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/types.ts rename to src/plugins/vis_type_vislib/public/vislib/types.ts diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/vis.js b/src/plugins/vis_type_vislib/public/vislib/vis.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/vis.js rename to src/plugins/vis_type_vislib/public/vislib/vis.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/visualizations/_chart.js b/src/plugins/vis_type_vislib/public/vislib/visualizations/_chart.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/visualizations/_chart.js rename to src/plugins/vis_type_vislib/public/vislib/visualizations/_chart.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/visualizations/gauge_chart.js b/src/plugins/vis_type_vislib/public/vislib/visualizations/gauge_chart.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/visualizations/gauge_chart.js rename to src/plugins/vis_type_vislib/public/vislib/visualizations/gauge_chart.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/visualizations/gauges/_index.scss b/src/plugins/vis_type_vislib/public/vislib/visualizations/gauges/_index.scss similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/visualizations/gauges/_index.scss rename to src/plugins/vis_type_vislib/public/vislib/visualizations/gauges/_index.scss diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/visualizations/gauges/_meter.scss b/src/plugins/vis_type_vislib/public/vislib/visualizations/gauges/_meter.scss similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/visualizations/gauges/_meter.scss rename to src/plugins/vis_type_vislib/public/vislib/visualizations/gauges/_meter.scss diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/visualizations/gauges/gauge_types.js b/src/plugins/vis_type_vislib/public/vislib/visualizations/gauges/gauge_types.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/visualizations/gauges/gauge_types.js rename to src/plugins/vis_type_vislib/public/vislib/visualizations/gauges/gauge_types.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/visualizations/gauges/meter.js b/src/plugins/vis_type_vislib/public/vislib/visualizations/gauges/meter.js similarity index 99% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/visualizations/gauges/meter.js rename to src/plugins/vis_type_vislib/public/vislib/visualizations/gauges/meter.js index 62de6d84136641..deafe010b6773c 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/visualizations/gauges/meter.js +++ b/src/plugins/vis_type_vislib/public/vislib/visualizations/gauges/meter.js @@ -20,7 +20,7 @@ import d3 from 'd3'; import _ from 'lodash'; -import { getHeatmapColors } from '../../../../../../../plugins/charts/public'; +import { getHeatmapColors } from '../../../../../charts/public'; const arcAngles = { angleFactor: 0.75, diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/visualizations/pie_chart.js b/src/plugins/vis_type_vislib/public/vislib/visualizations/pie_chart.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/visualizations/pie_chart.js rename to src/plugins/vis_type_vislib/public/vislib/visualizations/pie_chart.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/visualizations/point_series.js b/src/plugins/vis_type_vislib/public/vislib/visualizations/point_series.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/visualizations/point_series.js rename to src/plugins/vis_type_vislib/public/vislib/visualizations/point_series.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/visualizations/point_series/_index.scss b/src/plugins/vis_type_vislib/public/vislib/visualizations/point_series/_index.scss similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/visualizations/point_series/_index.scss rename to src/plugins/vis_type_vislib/public/vislib/visualizations/point_series/_index.scss diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/visualizations/point_series/_labels.scss b/src/plugins/vis_type_vislib/public/vislib/visualizations/point_series/_labels.scss similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/visualizations/point_series/_labels.scss rename to src/plugins/vis_type_vislib/public/vislib/visualizations/point_series/_labels.scss diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/visualizations/point_series/_point_series.js b/src/plugins/vis_type_vislib/public/vislib/visualizations/point_series/_point_series.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/visualizations/point_series/_point_series.js rename to src/plugins/vis_type_vislib/public/vislib/visualizations/point_series/_point_series.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/visualizations/point_series/area_chart.js b/src/plugins/vis_type_vislib/public/vislib/visualizations/point_series/area_chart.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/visualizations/point_series/area_chart.js rename to src/plugins/vis_type_vislib/public/vislib/visualizations/point_series/area_chart.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/visualizations/point_series/column_chart.js b/src/plugins/vis_type_vislib/public/vislib/visualizations/point_series/column_chart.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/visualizations/point_series/column_chart.js rename to src/plugins/vis_type_vislib/public/vislib/visualizations/point_series/column_chart.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/visualizations/point_series/heatmap_chart.js b/src/plugins/vis_type_vislib/public/vislib/visualizations/point_series/heatmap_chart.js similarity index 99% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/visualizations/point_series/heatmap_chart.js rename to src/plugins/vis_type_vislib/public/vislib/visualizations/point_series/heatmap_chart.js index 9822932c6071b8..6f497ae057d726 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/visualizations/point_series/heatmap_chart.js +++ b/src/plugins/vis_type_vislib/public/vislib/visualizations/point_series/heatmap_chart.js @@ -23,7 +23,7 @@ import moment from 'moment'; import { isColorDark } from '@elastic/eui'; import { PointSeries } from './_point_series'; -import { getHeatmapColors } from '../../.../../../../../../../plugins/charts/public'; +import { getHeatmapColors } from '../../../../../../plugins/charts/public'; const defaults = { color: undefined, // todo diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/visualizations/point_series/line_chart.js b/src/plugins/vis_type_vislib/public/vislib/visualizations/point_series/line_chart.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/visualizations/point_series/line_chart.js rename to src/plugins/vis_type_vislib/public/vislib/visualizations/point_series/line_chart.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/visualizations/point_series/series_types.js b/src/plugins/vis_type_vislib/public/vislib/visualizations/point_series/series_types.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/visualizations/point_series/series_types.js rename to src/plugins/vis_type_vislib/public/vislib/visualizations/point_series/series_types.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/visualizations/time_marker.d.ts b/src/plugins/vis_type_vislib/public/vislib/visualizations/time_marker.d.ts similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/visualizations/time_marker.d.ts rename to src/plugins/vis_type_vislib/public/vislib/visualizations/time_marker.d.ts diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/visualizations/time_marker.js b/src/plugins/vis_type_vislib/public/vislib/visualizations/time_marker.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/visualizations/time_marker.js rename to src/plugins/vis_type_vislib/public/vislib/visualizations/time_marker.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/visualizations/time_marker.js b/src/plugins/vis_type_vislib/public/vislib/visualizations/time_marker.test.js similarity index 83% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/visualizations/time_marker.js rename to src/plugins/vis_type_vislib/public/vislib/visualizations/time_marker.test.js index d69f952325ed02..058bdb5de8785f 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/visualizations/time_marker.js +++ b/src/plugins/vis_type_vislib/public/vislib/visualizations/time_marker.test.js @@ -19,11 +19,10 @@ import d3 from 'd3'; import $ from 'jquery'; -import expect from '@kbn/expect'; -import series from '../lib/fixtures/mock_data/date_histogram/_series'; -import terms from '../lib/fixtures/mock_data/terms/_columns'; -import { TimeMarker } from '../../visualizations/time_marker'; +import series from '../../fixtures/mock_data/date_histogram/_series'; +import terms from '../../fixtures/mock_data/terms/_columns'; +import { TimeMarker } from './time_marker'; describe('Vislib Time Marker Test Suite', function() { const height = 50; @@ -87,13 +86,13 @@ describe('Vislib Time Marker Test Suite', function() { it('should return true when data is time based', function() { boolean = defaultMarker._isTimeBasedChart(selection); - expect(boolean).to.be(true); + expect(boolean).toBe(true); }); it('should return false when data is not time based', function() { newSelection = selection.datum(terms); boolean = defaultMarker._isTimeBasedChart(newSelection); - expect(boolean).to.be(false); + expect(boolean).toBe(false); }); }); @@ -107,34 +106,34 @@ describe('Vislib Time Marker Test Suite', function() { }); it('should render the default line', function() { - expect(!!$('line.time-marker').length).to.be(true); + expect(!!$('line.time-marker').length).toBe(true); }); it('should render the custom (user defined) lines', function() { - expect($('line.custom-time-marker').length).to.be(myTimes.length); + expect($('line.custom-time-marker').length).toBe(myTimes.length); }); it('should set the class', function() { Array.prototype.forEach.call(lineArray, function(line) { - expect(line.getAttribute('class')).to.be(customClass); + expect(line.getAttribute('class')).toBe(customClass); }); }); it('should set the stroke', function() { Array.prototype.forEach.call(lineArray, function(line) { - expect(line.getAttribute('stroke')).to.be(color); + expect(line.getAttribute('stroke')).toBe(color); }); }); it('should set the stroke-opacity', function() { Array.prototype.forEach.call(lineArray, function(line) { - expect(+line.getAttribute('stroke-opacity')).to.be(opacity); + expect(+line.getAttribute('stroke-opacity')).toBe(opacity); }); }); it('should set the stroke-width', function() { Array.prototype.forEach.call(lineArray, function(line) { - expect(+line.getAttribute('stroke-width')).to.be(width); + expect(+line.getAttribute('stroke-width')).toBe(width); }); }); }); diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/visualizations/vis_types.js b/src/plugins/vis_type_vislib/public/vislib/visualizations/vis_types.js similarity index 100% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/visualizations/vis_types.js rename to src/plugins/vis_type_vislib/public/vislib/visualizations/vis_types.js diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/visualizations/vis_types.js b/src/plugins/vis_type_vislib/public/vislib/visualizations/vis_types.test.js similarity index 85% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/visualizations/vis_types.js rename to src/plugins/vis_type_vislib/public/vislib/visualizations/vis_types.test.js index c8f0faf8dcca5d..df044f46460c87 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/visualizations/vis_types.js +++ b/src/plugins/vis_type_vislib/public/vislib/visualizations/vis_types.test.js @@ -18,9 +18,8 @@ */ import _ from 'lodash'; -import expect from '@kbn/expect'; -import { visTypes } from '../../visualizations/vis_types'; +import { visTypes } from './vis_types'; describe('Vislib Vis Types Test Suite', function() { let visFunc; @@ -30,10 +29,10 @@ describe('Vislib Vis Types Test Suite', function() { }); it('should be an object', function() { - expect(_.isObject(visTypes)).to.be(true); + expect(_.isObject(visTypes)).toBe(true); }); it('should return a function', function() { - expect(typeof visFunc).to.be('function'); + expect(typeof visFunc).toBe('function'); }); }); diff --git a/src/legacy/core_plugins/vis_type_vislib/public/vislib/index.js b/src/plugins/vis_type_vislib/server/index.ts similarity index 78% rename from src/legacy/core_plugins/vis_type_vislib/public/vislib/index.js rename to src/plugins/vis_type_vislib/server/index.ts index b2559c085aeab3..355c01d255ce77 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/vislib/index.js +++ b/src/plugins/vis_type_vislib/server/index.ts @@ -17,7 +17,13 @@ * under the License. */ -import { VislibProvider } from './vislib'; +import { schema } from '@kbn/config-schema'; -// eslint-disable-next-line import/no-default-export -export default VislibProvider; +export const config = { + schema: schema.object({ enabled: schema.boolean({ defaultValue: true }) }), +}; + +export const plugin = () => ({ + setup() {}, + start() {}, +}); diff --git a/vars/workers.groovy b/vars/workers.groovy index 1c55c676d94253..b4e4a115f20111 100644 --- a/vars/workers.groovy +++ b/vars/workers.groovy @@ -57,6 +57,26 @@ def base(Map params, Closure closure) { // Try to clone from Github up to 8 times, waiting 15 secs between attempts retryWithDelay(8, 15) { scmVars = checkout scm + + def mergeBase + if (env.ghprbTargetBranch) { + sh( + script: "cd kibana && git fetch origin ${env.ghprbTargetBranch}", + label: "update reference to target branch 'origin/${env.ghprbTargetBranch}'" + ) + mergeBase = sh( + script: "cd kibana && git merge-base HEAD FETCH_HEAD", + label: "determining merge point with target branch 'origin/${env.ghprbTargetBranch}'", + returnStdout: true + ).trim() + } + + ciStats.reportGitInfo( + env.ghprbSourceBranch ?: scmVars.GIT_LOCAL_BRANCH ?: scmVars.GIT_BRANCH, + scmVars.GIT_COMMIT, + env.ghprbTargetBranch, + mergeBase + ) } } diff --git a/x-pack/.i18nrc.json b/x-pack/.i18nrc.json index a8e50e017102f0..ae1a55254c702a 100644 --- a/x-pack/.i18nrc.json +++ b/x-pack/.i18nrc.json @@ -36,7 +36,7 @@ "xpack.searchProfiler": "plugins/searchprofiler", "xpack.security": ["legacy/plugins/security", "plugins/security"], "xpack.server": "legacy/server", - "xpack.siem": ["plugins/siem", "legacy/plugins/siem"], + "xpack.siem": "plugins/siem", "xpack.snapshotRestore": "plugins/snapshot_restore", "xpack.spaces": ["legacy/plugins/spaces", "plugins/spaces"], "xpack.taskManager": "legacy/plugins/task_manager", diff --git a/x-pack/index.js b/x-pack/index.js index e65f6cf60928e5..3761af5c1ca7a8 100644 --- a/x-pack/index.js +++ b/x-pack/index.js @@ -17,7 +17,6 @@ import { spaces } from './legacy/plugins/spaces'; import { canvas } from './legacy/plugins/canvas'; import { infra } from './legacy/plugins/infra'; import { taskManager } from './legacy/plugins/task_manager'; -import { siem } from './legacy/plugins/siem'; import { remoteClusters } from './legacy/plugins/remote_clusters'; import { upgradeAssistant } from './legacy/plugins/upgrade_assistant'; import { uptime } from './legacy/plugins/uptime'; @@ -42,7 +41,6 @@ module.exports = function(kibana) { indexManagement(kibana), infra(kibana), taskManager(kibana), - siem(kibana), remoteClusters(kibana), upgradeAssistant(kibana), uptime(kibana), diff --git a/x-pack/legacy/plugins/apm/public/components/app/ServiceMap/cytoscapeOptions.ts b/x-pack/legacy/plugins/apm/public/components/app/ServiceMap/cytoscapeOptions.ts index eb71994bd2e472..e9942a327b69ed 100644 --- a/x-pack/legacy/plugins/apm/public/components/app/ServiceMap/cytoscapeOptions.ts +++ b/x-pack/legacy/plugins/apm/public/components/app/ServiceMap/cytoscapeOptions.ts @@ -60,7 +60,10 @@ const style: cytoscape.Stylesheet[] = [ ? theme.euiColorPrimary : theme.euiColorMediumShade, 'border-width': 2, - color: theme.textColors.text, + color: (el: cytoscape.NodeSingular) => + el.hasClass('primary') || el.selected() + ? theme.euiColorPrimaryText + : theme.textColors.text, // theme.euiFontFamily doesn't work here for some reason, so we're just // specifying a subset of the fonts for the label text. 'font-family': 'Inter UI, Segoe UI, Helvetica, Arial, sans-serif', @@ -78,8 +81,9 @@ const style: cytoscape.Stylesheet[] = [ 'overlay-opacity': 0, shape: (el: cytoscape.NodeSingular) => isService(el) ? (isIE11 ? 'rectangle' : 'ellipse') : 'diamond', - 'text-background-color': theme.euiColorLightestShade, - 'text-background-opacity': 0, + 'text-background-color': theme.euiColorPrimary, + 'text-background-opacity': (el: cytoscape.NodeSingular) => + el.hasClass('primary') || el.selected() ? 0.1 : 0, 'text-background-padding': theme.paddingSizes.xs, 'text-background-shape': 'roundrectangle', 'text-margin-y': parseInt(theme.paddingSizes.s, 10), diff --git a/x-pack/legacy/plugins/canvas/public/components/workpad_header/element_menu/element_menu.tsx b/x-pack/legacy/plugins/canvas/public/components/workpad_header/element_menu/element_menu.tsx index a416adfe774697..5c420cf3a04c9c 100644 --- a/x-pack/legacy/plugins/canvas/public/components/workpad_header/element_menu/element_menu.tsx +++ b/x-pack/legacy/plugins/canvas/public/components/workpad_header/element_menu/element_menu.tsx @@ -93,8 +93,8 @@ export const ElementMenu: FunctionComponent = ({ const hideAssetModal = () => setAssetModalVisible(false); const showAssetModal = () => setAssetModalVisible(true); - const showEmbedPanel = () => setEmbedPanelVisible(false); const hideEmbedPanel = () => setEmbedPanelVisible(false); + const showEmbedPanel = () => setEmbedPanelVisible(true); const hideSavedElementsModal = () => setSavedElementsModalVisible(false); const showSavedElementsModal = () => setSavedElementsModalVisible(true); diff --git a/x-pack/legacy/plugins/reporting/export_types/common/lib/screenshots/index.ts b/x-pack/legacy/plugins/reporting/export_types/common/lib/screenshots/index.ts index 5a04f1a497abf6..0d75b067fbe630 100644 --- a/x-pack/legacy/plugins/reporting/export_types/common/lib/screenshots/index.ts +++ b/x-pack/legacy/plugins/reporting/export_types/common/lib/screenshots/index.ts @@ -4,4 +4,4 @@ * you may not use this file except in compliance with the Elastic License. */ -export { screenshotsObservableFactory } from './observable'; +export { screenshotsObservableFactory, ScreenshotsObservableFn } from './observable'; diff --git a/x-pack/legacy/plugins/reporting/export_types/common/lib/screenshots/observable.ts b/x-pack/legacy/plugins/reporting/export_types/common/lib/screenshots/observable.ts index 519a3289395b93..c6861ae1d17add 100644 --- a/x-pack/legacy/plugins/reporting/export_types/common/lib/screenshots/observable.ts +++ b/x-pack/legacy/plugins/reporting/export_types/common/lib/screenshots/observable.ts @@ -21,10 +21,18 @@ import { waitForVisualizations } from './wait_for_visualizations'; const DEFAULT_SCREENSHOT_CLIP_HEIGHT = 1200; const DEFAULT_SCREENSHOT_CLIP_WIDTH = 1800; +export type ScreenshotsObservableFn = ({ + logger, + urls, + conditionalHeaders, + layout, + browserTimezone, +}: ScreenshotObservableOpts) => Rx.Observable; + export function screenshotsObservableFactory( captureConfig: CaptureConfig, browserDriverFactory: HeadlessChromiumDriverFactory -) { +): ScreenshotsObservableFn { return function screenshotsObservable({ logger, urls, diff --git a/x-pack/legacy/plugins/reporting/export_types/png/server/execute_job/index.test.ts b/x-pack/legacy/plugins/reporting/export_types/png/server/execute_job/index.test.ts index c9cba64a732b6f..9d3deda5d98bec 100644 --- a/x-pack/legacy/plugins/reporting/export_types/png/server/execute_job/index.test.ts +++ b/x-pack/legacy/plugins/reporting/export_types/png/server/execute_job/index.test.ts @@ -5,14 +5,14 @@ */ import * as Rx from 'rxjs'; -import { createMockReportingCore, createMockBrowserDriverFactory } from '../../../../test_helpers'; -import { cryptoFactory } from '../../../../server/lib/crypto'; -import { executeJobFactory } from './index'; -import { generatePngObservableFactory } from '../lib/generate_png'; import { CancellationToken } from '../../../../common/cancellation_token'; +import { ReportingCore } from '../../../../server'; import { LevelLogger } from '../../../../server/lib'; -import { ReportingCore, CaptureConfig } from '../../../../server/types'; +import { cryptoFactory } from '../../../../server/lib/crypto'; +import { createMockReportingCore } from '../../../../test_helpers'; import { JobDocPayloadPNG } from '../../types'; +import { generatePngObservableFactory } from '../lib/generate_png'; +import { executeJobFactory } from './index'; jest.mock('../lib/generate_png', () => ({ generatePngObservableFactory: jest.fn() })); @@ -31,8 +31,6 @@ const mockLoggerFactory = { }; const getMockLogger = () => new LevelLogger(mockLoggerFactory); -const captureConfig = {} as CaptureConfig; - const mockEncryptionKey = 'abcabcsecuresecret'; const encryptHeaders = async (headers: Record) => { const crypto = cryptoFactory(mockEncryptionKey); @@ -46,10 +44,13 @@ beforeEach(async () => { 'server.basePath': '/sbp', }; const reportingConfig = { + index: '.reporting-2018.10.10', encryptionKey: mockEncryptionKey, 'kibanaServer.hostname': 'localhost', 'kibanaServer.port': 5601, 'kibanaServer.protocol': 'http', + 'queue.indexInterval': 'daily', + 'queue.timeout': Infinity, }; const mockReportingConfig = { get: (...keys: string[]) => (reportingConfig as any)[keys.join('.')], @@ -74,13 +75,8 @@ afterEach(() => (generatePngObservableFactory as jest.Mock).mockReset()); test(`passes browserTimezone to generatePng`, async () => { const encryptedHeaders = await encryptHeaders({}); - const mockBrowserDriverFactory = await createMockBrowserDriverFactory(getMockLogger()); - - const generatePngObservable = generatePngObservableFactory( - captureConfig, - mockBrowserDriverFactory - ); - (generatePngObservable as jest.Mock).mockReturnValue(Rx.of(Buffer.from(''))); + const generatePngObservable = (await generatePngObservableFactory(mockReporting)) as jest.Mock; + generatePngObservable.mockReturnValue(Rx.of(Buffer.from(''))); const executeJob = await executeJobFactory(mockReporting, getMockLogger()); const browserTimezone = 'UTC'; @@ -94,26 +90,43 @@ test(`passes browserTimezone to generatePng`, async () => { cancellationToken ); - expect(generatePngObservable).toBeCalledWith( - expect.any(LevelLogger), - 'http://localhost:5601/sbp/app/kibana#/something', - browserTimezone, - expect.anything(), - undefined - ); + expect(generatePngObservable.mock.calls).toMatchInlineSnapshot(` + Array [ + Array [ + LevelLogger { + "_logger": Object { + "get": [MockFunction], + }, + "_tags": Array [ + "PNG", + "execute", + "pngJobId", + ], + "warning": [Function], + }, + "http://localhost:5601/sbp/app/kibana#/something", + "UTC", + Object { + "conditions": Object { + "basePath": "/sbp", + "hostname": "localhost", + "port": 5601, + "protocol": "http", + }, + "headers": Object {}, + }, + undefined, + ], + ] + `); }); test(`returns content_type of application/png`, async () => { const executeJob = await executeJobFactory(mockReporting, getMockLogger()); const encryptedHeaders = await encryptHeaders({}); - const mockBrowserDriverFactory = await createMockBrowserDriverFactory(getMockLogger()); - - const generatePngObservable = generatePngObservableFactory( - captureConfig, - mockBrowserDriverFactory - ); - (generatePngObservable as jest.Mock).mockReturnValue(Rx.of(Buffer.from(''))); + const generatePngObservable = (await generatePngObservableFactory(mockReporting)) as jest.Mock; + generatePngObservable.mockReturnValue(Rx.of(Buffer.from(''))); const { content_type: contentType } = await executeJob( 'pngJobId', @@ -126,13 +139,8 @@ test(`returns content_type of application/png`, async () => { test(`returns content of generatePng getBuffer base64 encoded`, async () => { const testContent = 'test content'; - const mockBrowserDriverFactory = await createMockBrowserDriverFactory(getMockLogger()); - - const generatePngObservable = generatePngObservableFactory( - captureConfig, - mockBrowserDriverFactory - ); - (generatePngObservable as jest.Mock).mockReturnValue(Rx.of({ buffer: Buffer.from(testContent) })); + const generatePngObservable = (await generatePngObservableFactory(mockReporting)) as jest.Mock; + generatePngObservable.mockReturnValue(Rx.of({ buffer: Buffer.from(testContent) })); const executeJob = await executeJobFactory(mockReporting, getMockLogger()); const encryptedHeaders = await encryptHeaders({}); diff --git a/x-pack/legacy/plugins/reporting/export_types/png/server/execute_job/index.ts b/x-pack/legacy/plugins/reporting/export_types/png/server/execute_job/index.ts index 113da92d1862f0..0ffd42d0b52f9c 100644 --- a/x-pack/legacy/plugins/reporting/export_types/png/server/execute_job/index.ts +++ b/x-pack/legacy/plugins/reporting/export_types/png/server/execute_job/index.ts @@ -25,13 +25,11 @@ export const executeJobFactory: QueuedPngExecutorFactory = async function execut parentLogger: Logger ) { const config = reporting.getConfig(); - const captureConfig = config.get('capture'); const encryptionKey = config.get('encryptionKey'); const logger = parentLogger.clone([PNG_JOB_TYPE, 'execute']); return async function executeJob(jobId: string, job: JobDocPayloadPNG, cancellationToken: any) { - const browserDriverFactory = await reporting.getBrowserDriverFactory(); - const generatePngObservable = generatePngObservableFactory(captureConfig, browserDriverFactory); + const generatePngObservable = await generatePngObservableFactory(reporting); const jobLogger = logger.clone([jobId]); const process$: Rx.Observable = Rx.of(1).pipe( mergeMap(() => decryptJobHeaders({ encryptionKey, job, logger })), diff --git a/x-pack/legacy/plugins/reporting/export_types/png/server/lib/generate_png.ts b/x-pack/legacy/plugins/reporting/export_types/png/server/lib/generate_png.ts index a15541d99f6fb5..c03ea170f76eee 100644 --- a/x-pack/legacy/plugins/reporting/export_types/png/server/lib/generate_png.ts +++ b/x-pack/legacy/plugins/reporting/export_types/png/server/lib/generate_png.ts @@ -6,19 +6,15 @@ import * as Rx from 'rxjs'; import { map } from 'rxjs/operators'; +import { ReportingCore } from '../../../../server'; import { LevelLogger } from '../../../../server/lib'; -import { CaptureConfig } from '../../../../server/types'; -import { ConditionalHeaders, HeadlessChromiumDriverFactory } from '../../../../types'; +import { ConditionalHeaders } from '../../../../types'; import { LayoutParams } from '../../../common/layouts/layout'; import { PreserveLayout } from '../../../common/layouts/preserve_layout'; -import { screenshotsObservableFactory } from '../../../common/lib/screenshots'; import { ScreenshotResults } from '../../../common/lib/screenshots/types'; -export function generatePngObservableFactory( - captureConfig: CaptureConfig, - browserDriverFactory: HeadlessChromiumDriverFactory -) { - const screenshotsObservable = screenshotsObservableFactory(captureConfig, browserDriverFactory); +export async function generatePngObservableFactory(reporting: ReportingCore) { + const getScreenshots = await reporting.getScreenshotsObservable(); return function generatePngObservable( logger: LevelLogger, @@ -32,7 +28,7 @@ export function generatePngObservableFactory( } const layout = new PreserveLayout(layoutParams.dimensions); - const screenshots$ = screenshotsObservable({ + const screenshots$ = getScreenshots({ logger, urls: [url], conditionalHeaders, diff --git a/x-pack/legacy/plugins/reporting/export_types/printable_pdf/server/execute_job/index.test.ts b/x-pack/legacy/plugins/reporting/export_types/printable_pdf/server/execute_job/index.test.ts index c3c0d38584bc13..ae18c0f4f9f4ba 100644 --- a/x-pack/legacy/plugins/reporting/export_types/printable_pdf/server/execute_job/index.test.ts +++ b/x-pack/legacy/plugins/reporting/export_types/printable_pdf/server/execute_job/index.test.ts @@ -5,11 +5,11 @@ */ import * as Rx from 'rxjs'; -import { createMockReportingCore, createMockBrowserDriverFactory } from '../../../../test_helpers'; +import { createMockReportingCore } from '../../../../test_helpers'; import { cryptoFactory } from '../../../../server/lib/crypto'; import { LevelLogger } from '../../../../server/lib'; import { CancellationToken } from '../../../../types'; -import { ReportingCore, CaptureConfig } from '../../../../server/types'; +import { ReportingCore } from '../../../../server'; import { generatePdfObservableFactory } from '../lib/generate_pdf'; import { JobDocPayloadPDF } from '../../types'; import { executeJobFactory } from './index'; @@ -22,8 +22,6 @@ const cancellationToken = ({ on: jest.fn(), } as unknown) as CancellationToken; -const captureConfig = {} as CaptureConfig; - const mockLoggerFactory = { get: jest.fn().mockImplementation(() => ({ error: jest.fn(), @@ -72,16 +70,64 @@ beforeEach(async () => { afterEach(() => (generatePdfObservableFactory as jest.Mock).mockReset()); +test(`passes browserTimezone to generatePdf`, async () => { + const encryptedHeaders = await encryptHeaders({}); + const generatePdfObservable = (await generatePdfObservableFactory(mockReporting)) as jest.Mock; + generatePdfObservable.mockReturnValue(Rx.of(Buffer.from(''))); + + const executeJob = await executeJobFactory(mockReporting, getMockLogger()); + const browserTimezone = 'UTC'; + await executeJob( + 'pdfJobId', + getJobDocPayload({ + relativeUrl: '/app/kibana#/something', + browserTimezone, + headers: encryptedHeaders, + }), + cancellationToken + ); + + expect(generatePdfObservable.mock.calls).toMatchInlineSnapshot(` + Array [ + Array [ + LevelLogger { + "_logger": Object { + "get": [MockFunction], + }, + "_tags": Array [ + "printable_pdf", + "execute", + "pdfJobId", + ], + "warning": [Function], + }, + undefined, + Array [ + "http://localhost:5601/sbp/app/kibana#/something", + ], + "UTC", + Object { + "conditions": Object { + "basePath": "/sbp", + "hostname": "localhost", + "port": 5601, + "protocol": "http", + }, + "headers": Object {}, + }, + undefined, + false, + ], + ] + `); +}); + test(`returns content_type of application/pdf`, async () => { const logger = getMockLogger(); const executeJob = await executeJobFactory(mockReporting, logger); - const mockBrowserDriverFactory = await createMockBrowserDriverFactory(logger); const encryptedHeaders = await encryptHeaders({}); - const generatePdfObservable = generatePdfObservableFactory( - captureConfig, - mockBrowserDriverFactory - ); + const generatePdfObservable = await generatePdfObservableFactory(mockReporting); (generatePdfObservable as jest.Mock).mockReturnValue(Rx.of(Buffer.from(''))); const { content_type: contentType } = await executeJob( @@ -94,12 +140,7 @@ test(`returns content_type of application/pdf`, async () => { test(`returns content of generatePdf getBuffer base64 encoded`, async () => { const testContent = 'test content'; - const mockBrowserDriverFactory = await createMockBrowserDriverFactory(getMockLogger()); - - const generatePdfObservable = generatePdfObservableFactory( - captureConfig, - mockBrowserDriverFactory - ); + const generatePdfObservable = await generatePdfObservableFactory(mockReporting); (generatePdfObservable as jest.Mock).mockReturnValue(Rx.of({ buffer: Buffer.from(testContent) })); const executeJob = await executeJobFactory(mockReporting, getMockLogger()); diff --git a/x-pack/legacy/plugins/reporting/export_types/printable_pdf/server/execute_job/index.ts b/x-pack/legacy/plugins/reporting/export_types/printable_pdf/server/execute_job/index.ts index dbdccb6160a6e6..3d69042b6c7abe 100644 --- a/x-pack/legacy/plugins/reporting/export_types/printable_pdf/server/execute_job/index.ts +++ b/x-pack/legacy/plugins/reporting/export_types/printable_pdf/server/execute_job/index.ts @@ -26,14 +26,12 @@ export const executeJobFactory: QueuedPdfExecutorFactory = async function execut parentLogger: Logger ) { const config = reporting.getConfig(); - const captureConfig = config.get('capture'); const encryptionKey = config.get('encryptionKey'); const logger = parentLogger.clone([PDF_JOB_TYPE, 'execute']); return async function executeJob(jobId: string, job: JobDocPayloadPDF, cancellationToken: any) { - const browserDriverFactory = await reporting.getBrowserDriverFactory(); - const generatePdfObservable = generatePdfObservableFactory(captureConfig, browserDriverFactory); + const generatePdfObservable = await generatePdfObservableFactory(reporting); const jobLogger = logger.clone([jobId]); const process$: Rx.Observable = Rx.of(1).pipe( diff --git a/x-pack/legacy/plugins/reporting/export_types/printable_pdf/server/lib/generate_pdf.ts b/x-pack/legacy/plugins/reporting/export_types/printable_pdf/server/lib/generate_pdf.ts index a62b7ec7013a59..c882ef682f9529 100644 --- a/x-pack/legacy/plugins/reporting/export_types/printable_pdf/server/lib/generate_pdf.ts +++ b/x-pack/legacy/plugins/reporting/export_types/printable_pdf/server/lib/generate_pdf.ts @@ -7,12 +7,11 @@ import { groupBy } from 'lodash'; import * as Rx from 'rxjs'; import { mergeMap } from 'rxjs/operators'; +import { ReportingCore } from '../../../../server'; import { LevelLogger } from '../../../../server/lib'; -import { CaptureConfig } from '../../../../server/types'; -import { ConditionalHeaders, HeadlessChromiumDriverFactory } from '../../../../types'; +import { ConditionalHeaders } from '../../../../types'; import { createLayout } from '../../../common/layouts'; import { LayoutInstance, LayoutParams } from '../../../common/layouts/layout'; -import { screenshotsObservableFactory } from '../../../common/lib/screenshots'; import { ScreenshotResults } from '../../../common/lib/screenshots/types'; // @ts-ignore untyped module import { pdf } from './pdf'; @@ -27,11 +26,10 @@ const getTimeRange = (urlScreenshots: ScreenshotResults[]) => { return null; }; -export function generatePdfObservableFactory( - captureConfig: CaptureConfig, - browserDriverFactory: HeadlessChromiumDriverFactory -) { - const screenshotsObservable = screenshotsObservableFactory(captureConfig, browserDriverFactory); +export async function generatePdfObservableFactory(reporting: ReportingCore) { + const config = reporting.getConfig(); + const captureConfig = config.get('capture'); + const getScreenshots = await reporting.getScreenshotsObservable(); return function generatePdfObservable( logger: LevelLogger, @@ -43,7 +41,7 @@ export function generatePdfObservableFactory( logo?: string ): Rx.Observable<{ buffer: Buffer; warnings: string[] }> { const layout = createLayout(captureConfig, layoutParams) as LayoutInstance; - const screenshots$ = screenshotsObservable({ + const screenshots$ = getScreenshots({ logger, urls, conditionalHeaders, diff --git a/x-pack/legacy/plugins/reporting/server/core.ts b/x-pack/legacy/plugins/reporting/server/core.ts index 9be61d091b00e8..0b243f13adb80b 100644 --- a/x-pack/legacy/plugins/reporting/server/core.ts +++ b/x-pack/legacy/plugins/reporting/server/core.ts @@ -24,6 +24,10 @@ import { ReportingConfig, ReportingConfigType } from './config'; import { checkLicenseFactory, getExportTypesRegistry, LevelLogger } from './lib'; import { registerRoutes } from './routes'; import { ReportingSetupDeps } from './types'; +import { + screenshotsObservableFactory, + ScreenshotsObservableFn, +} from '../export_types/common/lib/screenshots'; interface ReportingInternalSetup { browserDriverFactory: HeadlessChromiumDriverFactory; @@ -95,13 +99,13 @@ export class ReportingCore { return (await this.getPluginStartDeps()).enqueueJob; } - public async getBrowserDriverFactory(): Promise { - return (await this.getPluginSetupDeps()).browserDriverFactory; - } - public getConfig(): ReportingConfig { return this.config; } + public async getScreenshotsObservable(): Promise { + const { browserDriverFactory } = await this.getPluginSetupDeps(); + return screenshotsObservableFactory(this.config.get('capture'), browserDriverFactory); + } /* * Outside dependencies diff --git a/x-pack/legacy/plugins/reporting/server/index.ts b/x-pack/legacy/plugins/reporting/server/index.ts index c564963e363cc2..4288a37fe6adc4 100644 --- a/x-pack/legacy/plugins/reporting/server/index.ts +++ b/x-pack/legacy/plugins/reporting/server/index.ts @@ -14,3 +14,5 @@ export const plugin = (context: PluginInitializerContext, config: ReportingConfi export { ReportingPlugin } from './plugin'; export { ReportingConfig, ReportingCore }; + +export { PreserveLayout, PrintLayout } from '../export_types/common/layouts'; diff --git a/x-pack/legacy/plugins/reporting/server/lib/create_queue.ts b/x-pack/legacy/plugins/reporting/server/lib/create_queue.ts index 8230ee889ae057..560cc943ed45e8 100644 --- a/x-pack/legacy/plugins/reporting/server/lib/create_queue.ts +++ b/x-pack/legacy/plugins/reporting/server/lib/create_queue.ts @@ -16,21 +16,23 @@ export async function createQueueFactory( logger: Logger ): Promise { const config = reporting.getConfig(); - const queueConfig = config.get('queue'); - const index = config.get('index'); - const elasticsearch = await reporting.getElasticsearchService(); + const queueIndexInterval = config.get('queue', 'indexInterval'); + const queueTimeout = config.get('queue', 'timeout'); + const queueIndex = config.get('index'); + const isPollingEnabled = config.get('queue', 'pollEnabled'); + const elasticsearch = await reporting.getElasticsearchService(); const queueOptions = { - interval: queueConfig.indexInterval, - timeout: queueConfig.timeout, + interval: queueIndexInterval, + timeout: queueTimeout, dateSeparator: '.', client: elasticsearch.dataClient, logger: createTaggedLogger(logger, ['esqueue', 'queue-worker']), }; - const queue: ESQueueInstance = new Esqueue(index, queueOptions); + const queue: ESQueueInstance = new Esqueue(queueIndex, queueOptions); - if (queueConfig.pollEnabled) { + if (isPollingEnabled) { // create workers to poll the index for idle jobs waiting to be claimed and executed const createWorker = createWorkerFactory(reporting, logger); await createWorker(queue); diff --git a/x-pack/legacy/plugins/reporting/server/lib/enqueue_job.ts b/x-pack/legacy/plugins/reporting/server/lib/enqueue_job.ts index 5a062a693b4681..3e87337dc43550 100644 --- a/x-pack/legacy/plugins/reporting/server/lib/enqueue_job.ts +++ b/x-pack/legacy/plugins/reporting/server/lib/enqueue_job.ts @@ -26,12 +26,12 @@ interface ConfirmedJob { } export function enqueueJobFactory(reporting: ReportingCore, parentLogger: Logger): EnqueueJobFn { - const logger = parentLogger.clone(['queue-job']); const config = reporting.getConfig(); - const captureConfig = config.get('capture'); - const queueConfig = config.get('queue'); - const browserType = captureConfig.browser.type; - const maxAttempts = captureConfig.maxAttempts; + const queueTimeout = config.get('queue', 'timeout'); + const browserType = config.get('capture', 'browser', 'type'); + const maxAttempts = config.get('capture', 'maxAttempts'); + + const logger = parentLogger.clone(['queue-job']); return async function enqueueJob( exportTypeId: string, @@ -53,7 +53,7 @@ export function enqueueJobFactory(reporting: ReportingCore, parentLogger: Logger const payload = await createJob(jobParams, headers, request); const options = { - timeout: queueConfig.timeout, + timeout: queueTimeout, created_by: get(user, 'username', false), browser_type: browserType, max_attempts: maxAttempts, diff --git a/x-pack/legacy/plugins/siem/.gitattributes b/x-pack/legacy/plugins/siem/.gitattributes deleted file mode 100644 index a4071d39e63c0f..00000000000000 --- a/x-pack/legacy/plugins/siem/.gitattributes +++ /dev/null @@ -1,5 +0,0 @@ -# Auto-collapse generated files in GitHub -# https://help.github.com/en/articles/customizing-how-changed-files-appear-on-github -x-pack/legacy/plugins/siem/public/graphql/types.ts linguist-generated=true -x-pack/legacy/plugins/siem/public/graphql/introspection.json linguist-generated=true - diff --git a/x-pack/legacy/plugins/siem/index.ts b/x-pack/legacy/plugins/siem/index.ts deleted file mode 100644 index d572561944a76d..00000000000000 --- a/x-pack/legacy/plugins/siem/index.ts +++ /dev/null @@ -1,56 +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. - */ - -import { i18n } from '@kbn/i18n'; -import { resolve } from 'path'; -import { Root } from 'joi'; - -import { APP_ID, APP_NAME } from '../../../plugins/siem/common/constants'; -import { DEFAULT_APP_CATEGORIES } from '../../../../src/core/utils'; - -// eslint-disable-next-line @typescript-eslint/no-explicit-any -export const siem = (kibana: any) => { - return new kibana.Plugin({ - id: APP_ID, - configPrefix: 'xpack.siem', - publicDir: resolve(__dirname, 'public'), - require: ['kibana', 'elasticsearch', 'alerting', 'actions', 'triggers_actions_ui'], - uiExports: { - app: { - description: i18n.translate('xpack.siem.securityDescription', { - defaultMessage: 'Explore your SIEM App', - }), - main: 'plugins/siem/legacy', - euiIconType: 'securityAnalyticsApp', - title: APP_NAME, - listed: false, - url: `/app/${APP_ID}`, - }, - home: ['plugins/siem/register_feature'], - links: [ - { - description: i18n.translate('xpack.siem.linkSecurityDescription', { - defaultMessage: 'Explore your SIEM App', - }), - euiIconType: 'securityAnalyticsApp', - id: 'siem', - order: 9000, - title: APP_NAME, - url: `/app/${APP_ID}`, - category: DEFAULT_APP_CATEGORIES.security, - }, - ], - }, - config(Joi: Root) { - return Joi.object() - .keys({ - enabled: Joi.boolean().default(true), - }) - .unknown(true) - .default(); - }, - }); -}; diff --git a/x-pack/legacy/plugins/siem/package.json b/x-pack/legacy/plugins/siem/package.json deleted file mode 100644 index c9b3f8a37a7ead..00000000000000 --- a/x-pack/legacy/plugins/siem/package.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "author": "Elastic", - "name": "siem-legacy-ui", - "version": "8.0.0", - "private": true, - "license": "Elastic-License", - "scripts": {}, - "devDependencies": { - "@types/lodash": "^4.14.110", - "@types/js-yaml": "^3.12.1" - }, - "dependencies": { - "lodash": "^4.17.15", - "react-markdown": "^4.0.6" - } -} diff --git a/x-pack/legacy/plugins/siem/public/legacy.ts b/x-pack/legacy/plugins/siem/public/legacy.ts deleted file mode 100644 index b3a06a170bb807..00000000000000 --- a/x-pack/legacy/plugins/siem/public/legacy.ts +++ /dev/null @@ -1,16 +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. - */ - -import { npSetup, npStart } from 'ui/new_platform'; - -import { PluginInitializerContext } from '../../../../../src/core/public'; -import { plugin } from './'; -import { SetupPlugins, StartPlugins } from './plugin'; - -const pluginInstance = plugin({} as PluginInitializerContext); - -pluginInstance.setup(npSetup.core, (npSetup.plugins as unknown) as SetupPlugins); -pluginInstance.start(npStart.core, (npStart.plugins as unknown) as StartPlugins); diff --git a/x-pack/legacy/plugins/siem/public/lib/kibana/services.ts b/x-pack/legacy/plugins/siem/public/lib/kibana/services.ts deleted file mode 100644 index 3a6a3f13dc5cec..00000000000000 --- a/x-pack/legacy/plugins/siem/public/lib/kibana/services.ts +++ /dev/null @@ -1,27 +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. - */ - -import { StartServices } from '../../plugin'; - -type GlobalServices = Pick; - -export class KibanaServices { - private static services?: GlobalServices; - - public static init({ http, uiSettings }: StartServices) { - this.services = { http, uiSettings }; - } - - public static get(): GlobalServices { - if (!this.services) { - throw new Error( - 'Kibana services not set - are you trying to import this module from outside of the SIEM app?' - ); - } - - return this.services; - } -} diff --git a/x-pack/legacy/plugins/siem/public/mock/kibana_core.ts b/x-pack/legacy/plugins/siem/public/mock/kibana_core.ts deleted file mode 100644 index cf3523a6260bbf..00000000000000 --- a/x-pack/legacy/plugins/siem/public/mock/kibana_core.ts +++ /dev/null @@ -1,13 +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. - */ - -import { createUiNewPlatformMock } from 'ui/new_platform/__mocks__/helpers'; - -export const createKibanaCoreSetupMock = () => createUiNewPlatformMock().npSetup.core; -export const createKibanaPluginsSetupMock = () => createUiNewPlatformMock().npSetup.plugins; - -export const createKibanaCoreStartMock = () => createUiNewPlatformMock().npStart.core; -export const createKibanaPluginsStartMock = () => createUiNewPlatformMock().npStart.plugins; diff --git a/x-pack/legacy/plugins/siem/public/plugin.tsx b/x-pack/legacy/plugins/siem/public/plugin.tsx deleted file mode 100644 index da4aad97e5b485..00000000000000 --- a/x-pack/legacy/plugins/siem/public/plugin.tsx +++ /dev/null @@ -1,93 +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. - */ - -import { - AppMountParameters, - CoreSetup, - CoreStart, - PluginInitializerContext, - Plugin as IPlugin, -} from '../../../../../src/core/public'; -import { HomePublicPluginSetup } from '../../../../../src/plugins/home/public'; -import { DataPublicPluginStart } from '../../../../../src/plugins/data/public'; -import { EmbeddableStart } from '../../../../../src/plugins/embeddable/public'; -import { Start as NewsfeedStart } from '../../../../../src/plugins/newsfeed/public'; -import { Start as InspectorStart } from '../../../../../src/plugins/inspector/public'; -import { UiActionsStart } from '../../../../../src/plugins/ui_actions/public'; -import { UsageCollectionSetup } from '../../../../../src/plugins/usage_collection/public'; -import { initTelemetry } from './lib/telemetry'; -import { KibanaServices } from './lib/kibana'; - -import { serviceNowActionType } from './lib/connectors'; - -import { - TriggersAndActionsUIPublicPluginSetup, - TriggersAndActionsUIPublicPluginStart, -} from '../../../../plugins/triggers_actions_ui/public'; -import { SecurityPluginSetup } from '../../../../plugins/security/public'; - -export { AppMountParameters, CoreSetup, CoreStart, PluginInitializerContext }; - -export interface SetupPlugins { - home: HomePublicPluginSetup; - security: SecurityPluginSetup; - triggers_actions_ui: TriggersAndActionsUIPublicPluginSetup; - usageCollection: UsageCollectionSetup; -} -export interface StartPlugins { - data: DataPublicPluginStart; - embeddable: EmbeddableStart; - inspector: InspectorStart; - newsfeed?: NewsfeedStart; - security: SecurityPluginSetup; - triggers_actions_ui: TriggersAndActionsUIPublicPluginStart; - uiActions: UiActionsStart; -} -export type StartServices = CoreStart & StartPlugins; - -export type Setup = ReturnType; -export type Start = ReturnType; - -export class Plugin implements IPlugin { - public id = 'siem'; - public name = 'SIEM'; - - constructor( - // @ts-ignore this is added to satisfy the New Platform typing constraint, - // but we're not leveraging any of its functionality yet. - private readonly initializerContext: PluginInitializerContext - ) {} - - public setup(core: CoreSetup, plugins: SetupPlugins) { - initTelemetry(plugins.usageCollection, this.id); - - const security = plugins.security; - - core.application.register({ - id: this.id, - title: this.name, - async mount(context, params) { - const [coreStart, startPlugins] = await core.getStartServices(); - const { renderApp } = await import('./app'); - - plugins.triggers_actions_ui.actionTypeRegistry.register(serviceNowActionType()); - return renderApp(coreStart, { ...startPlugins, security } as StartPlugins, params); - }, - }); - - return {}; - } - - public start(core: CoreStart, plugins: StartPlugins) { - KibanaServices.init({ ...core, ...plugins }); - - return {}; - } - - public stop() { - return {}; - } -} diff --git a/x-pack/legacy/plugins/siem/public/register_feature.ts b/x-pack/legacy/plugins/siem/public/register_feature.ts deleted file mode 100644 index b5e8f78ebc560f..00000000000000 --- a/x-pack/legacy/plugins/siem/public/register_feature.ts +++ /dev/null @@ -1,20 +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. - */ - -import { npSetup } from 'ui/new_platform'; -import { FeatureCatalogueCategory } from '../../../../../src/plugins/home/public'; -import { APP_ID } from '../../../../plugins/siem/common/constants'; - -// TODO(rylnd): move this into Plugin.setup once we're on NP -npSetup.plugins.home.featureCatalogue.register({ - id: APP_ID, - title: 'SIEM', - description: 'Explore security metrics and logs for events and alerts', - icon: 'securityAnalyticsApp', - path: `/app/${APP_ID}`, - showOnHomePage: true, - category: FeatureCatalogueCategory.DATA, -}); diff --git a/x-pack/legacy/plugins/siem/yarn.lock b/x-pack/legacy/plugins/siem/yarn.lock deleted file mode 120000 index 4b16253de2abe6..00000000000000 --- a/x-pack/legacy/plugins/siem/yarn.lock +++ /dev/null @@ -1 +0,0 @@ -../../../../yarn.lock \ No newline at end of file diff --git a/x-pack/package.json b/x-pack/package.json index ca73884b8c7c7c..604889c6094b9c 100644 --- a/x-pack/package.json +++ b/x-pack/package.json @@ -20,6 +20,11 @@ "build": { "intermediateBuildDirectory": "build/plugin/kibana/x-pack", "oss": false + }, + "clean": { + "extraPatterns": [ + "plugins/*/target" + ] } }, "resolutions": { diff --git a/x-pack/plugins/actions/server/lib/action_executor.ts b/x-pack/plugins/actions/server/lib/action_executor.ts index 59f8f3747273f8..101e18f2583e39 100644 --- a/x-pack/plugins/actions/server/lib/action_executor.ts +++ b/x-pack/plugins/actions/server/lib/action_executor.ts @@ -140,13 +140,18 @@ export class ActionExecutor { status: 'ok', }; + event.event = event.event || {}; + if (result.status === 'ok') { + event.event.outcome = 'success'; event.message = `action executed: ${actionLabel}`; } else if (result.status === 'error') { + event.event.outcome = 'failure'; event.message = `action execution failure: ${actionLabel}`; event.error = event.error || {}; event.error.message = actionErrorToMessage(result); } else { + event.event.outcome = 'failure'; event.message = `action execution returned unexpected result: ${actionLabel}`; event.error = event.error || {}; event.error.message = 'action execution returned unexpected result'; diff --git a/x-pack/plugins/alerting/server/task_runner/task_runner.test.ts b/x-pack/plugins/alerting/server/task_runner/task_runner.test.ts index 8b14199b7276af..26d8a1d1777c04 100644 --- a/x-pack/plugins/alerting/server/task_runner/task_runner.test.ts +++ b/x-pack/plugins/alerting/server/task_runner/task_runner.test.ts @@ -165,6 +165,7 @@ describe('Task Runner', () => { Object { "event": Object { "action": "execute", + "outcome": "success", }, "kibana": Object { "saved_objects": Array [ @@ -226,6 +227,7 @@ describe('Task Runner', () => { Object { "event": Object { "action": "execute", + "outcome": "success", }, "kibana": Object { "saved_objects": Array [ @@ -342,6 +344,7 @@ describe('Task Runner', () => { Object { "event": Object { "action": "execute", + "outcome": "success", }, "kibana": Object { "saved_objects": Array [ @@ -558,6 +561,7 @@ describe('Task Runner', () => { }, "event": Object { "action": "execute", + "outcome": "failure", }, "kibana": Object { "saved_objects": Array [ diff --git a/x-pack/plugins/alerting/server/task_runner/task_runner.ts b/x-pack/plugins/alerting/server/task_runner/task_runner.ts index 9c8cf4b1c968df..26970dc6b2b0d9 100644 --- a/x-pack/plugins/alerting/server/task_runner/task_runner.ts +++ b/x-pack/plugins/alerting/server/task_runner/task_runner.ts @@ -202,12 +202,16 @@ export class TaskRunner { event.message = `alert execution failure: ${alertLabel}`; event.error = event.error || {}; event.error.message = err.message; + event.event = event.event || {}; + event.event.outcome = 'failure'; eventLogger.logEvent(event); throw err; } eventLogger.stopTiming(event); event.message = `alert executed: ${alertLabel}`; + event.event = event.event || {}; + event.event.outcome = 'success'; eventLogger.logEvent(event); // Cleanup alert instances that are no longer scheduling actions to avoid over populating the alertInstances object diff --git a/x-pack/plugins/data_enhanced/public/search/async_search_strategy.test.ts b/x-pack/plugins/data_enhanced/public/search/async_search_strategy.test.ts index a7d6aa894d91db..6c635cc5b4489a 100644 --- a/x-pack/plugins/data_enhanced/public/search/async_search_strategy.test.ts +++ b/x-pack/plugins/data_enhanced/public/search/async_search_strategy.test.ts @@ -96,6 +96,34 @@ describe('Async search strategy', () => { }); }); + // For bug fixed in https://github.com/elastic/kibana/pull/64155 + it('Continues polling if no records are returned on first async request', async () => { + mockSearch + .mockReturnValueOnce(of({ id: 1, total: 0, loaded: 0, is_running: true, is_partial: true })) + .mockReturnValueOnce( + of({ id: 1, total: 2, loaded: 2, is_running: false, is_partial: false }) + ); + + const asyncSearch = asyncSearchStrategyProvider({ + core: mockCoreStart, + getSearchStrategy: jest.fn().mockImplementation(() => { + return () => { + return { + search: mockSearch, + }; + }; + }), + }); + + expect(mockSearch).toBeCalledTimes(0); + + await asyncSearch.search(mockRequest, mockOptions).toPromise(); + + expect(mockSearch).toBeCalledTimes(2); + expect(mockSearch.mock.calls[0][0]).toEqual(mockRequest); + expect(mockSearch.mock.calls[1][0]).toEqual({ id: 1, serverStrategy: 'foo' }); + }); + it('only sends the ID and server strategy after the first request', async () => { mockSearch .mockReturnValueOnce(of({ id: 1, total: 2, loaded: 1, is_running: true, is_partial: true })) diff --git a/x-pack/plugins/endpoint/public/applications/endpoint/store/hosts/index.test.ts b/x-pack/plugins/endpoint/public/applications/endpoint/store/hosts/index.test.ts index 515c54eab32806..863ffc50d0155e 100644 --- a/x-pack/plugins/endpoint/public/applications/endpoint/store/hosts/index.test.ts +++ b/x-pack/plugins/endpoint/public/applications/endpoint/store/hosts/index.test.ts @@ -57,7 +57,7 @@ describe('HostList store concerns', () => { }); const currentState = store.getState(); - expect(currentState.hosts).toEqual(payload.hosts.map(hostInfo => hostInfo.metadata)); + expect(currentState.hosts).toEqual(payload.hosts); expect(currentState.pageSize).toEqual(payload.request_page_size); expect(currentState.pageIndex).toEqual(payload.request_page_index); expect(currentState.total).toEqual(payload.total); diff --git a/x-pack/plugins/endpoint/public/applications/endpoint/store/hosts/middleware.test.ts b/x-pack/plugins/endpoint/public/applications/endpoint/store/hosts/middleware.test.ts index 1af83a975d1d87..2064c76f7dfb51 100644 --- a/x-pack/plugins/endpoint/public/applications/endpoint/store/hosts/middleware.test.ts +++ b/x-pack/plugins/endpoint/public/applications/endpoint/store/hosts/middleware.test.ts @@ -62,6 +62,6 @@ describe('host list middleware', () => { paging_properties: [{ page_index: '0' }, { page_size: '10' }], }), }); - expect(listData(getState())).toEqual(apiResponse.hosts.map(hostInfo => hostInfo.metadata)); + expect(listData(getState())).toEqual(apiResponse.hosts); }); }); diff --git a/x-pack/plugins/endpoint/public/applications/endpoint/store/hosts/reducer.ts b/x-pack/plugins/endpoint/public/applications/endpoint/store/hosts/reducer.ts index eb74c40ff36878..93e995194353b3 100644 --- a/x-pack/plugins/endpoint/public/applications/endpoint/store/hosts/reducer.ts +++ b/x-pack/plugins/endpoint/public/applications/endpoint/store/hosts/reducer.ts @@ -38,7 +38,7 @@ export const hostListReducer: ImmutableReducer = ( } = action.payload; return { ...state, - hosts: hosts.map(hostInfo => hostInfo.metadata), + hosts, total, pageSize, pageIndex, diff --git a/x-pack/plugins/endpoint/public/applications/endpoint/types.ts b/x-pack/plugins/endpoint/public/applications/endpoint/types.ts index 0598ce5f38efab..82b812b79670f7 100644 --- a/x-pack/plugins/endpoint/public/applications/endpoint/types.ts +++ b/x-pack/plugins/endpoint/public/applications/endpoint/types.ts @@ -23,6 +23,7 @@ import { UIPolicyConfig, PolicyData, HostPolicyResponse, + HostInfo, } from '../../../common/types'; import { EndpointPluginStartDependencies } from '../../plugin'; import { AppAction } from './store/action'; @@ -91,7 +92,7 @@ export type SubstateMiddlewareFactory = ( export interface HostState { /** list of host **/ - hosts: HostMetadata[]; + hosts: HostInfo[]; /** number of items per page */ pageSize: number; /** which page to show */ diff --git a/x-pack/plugins/endpoint/public/applications/endpoint/view/hosts/index.test.tsx b/x-pack/plugins/endpoint/public/applications/endpoint/view/hosts/index.test.tsx index 499efb4f4b8ed1..5a8765110c9097 100644 --- a/x-pack/plugins/endpoint/public/applications/endpoint/view/hosts/index.test.tsx +++ b/x-pack/plugins/endpoint/public/applications/endpoint/view/hosts/index.test.tsx @@ -14,7 +14,7 @@ import { mockHostResultList, } from '../../store/hosts/mock_host_result_list'; import { AppContextTestRender, createAppRootMockRenderer } from '../../mocks'; -import { HostInfo, HostPolicyResponseActionStatus } from '../../../../../common/types'; +import { HostInfo, HostStatus, HostPolicyResponseActionStatus } from '../../../../../common/types'; import { EndpointDocGenerator } from '../../../../../common/generate_data'; describe('when on the hosts page', () => { @@ -48,21 +48,50 @@ describe('when on the hosts page', () => { describe('when list data loads', () => { beforeEach(() => { reactTestingLibrary.act(() => { + const hostListData = mockHostResultList({ total: 3 }); + [HostStatus.ERROR, HostStatus.ONLINE, HostStatus.OFFLINE].forEach((status, index) => { + hostListData.hosts[index] = { + metadata: hostListData.hosts[index].metadata, + host_status: status, + }; + }); const action: AppAction = { type: 'serverReturnedHostList', - payload: mockHostResultList(), + payload: hostListData, }; store.dispatch(action); }); }); - it('should render the host summary row in the table', async () => { + it('should display rows in the table', async () => { const renderResult = render(); const rows = await renderResult.findAllByRole('row'); - expect(rows).toHaveLength(2); + expect(rows).toHaveLength(4); + }); + it('should show total', async () => { + const renderResult = render(); + const total = await renderResult.findByTestId('hostListTableTotal'); + expect(total.textContent).toEqual('3 Hosts'); + }); + it('should display correct status', async () => { + const renderResult = render(); + const hostStatuses = await renderResult.findAllByTestId('rowHostStatus'); + + expect(hostStatuses[0].textContent).toEqual('Error'); + expect(hostStatuses[0].querySelector('[data-euiicon-type][color="danger"]')).not.toBeNull(); + + expect(hostStatuses[1].textContent).toEqual('Online'); + expect( + hostStatuses[1].querySelector('[data-euiicon-type][color="success"]') + ).not.toBeNull(); + + expect(hostStatuses[2].textContent).toEqual('Offline'); + expect( + hostStatuses[2].querySelector('[data-euiicon-type][color="subdued"]') + ).not.toBeNull(); }); - describe('when the user clicks the hostname in the table', () => { + describe('when the user clicks the first hostname in the table', () => { let renderResult: reactTestingLibrary.RenderResult; beforeEach(async () => { const hostDetailsApiResponse = mockHostDetailsApiResult(); @@ -76,9 +105,9 @@ describe('when on the hosts page', () => { }); renderResult = render(); - const detailsLink = await renderResult.findByTestId('hostnameCellLink'); - if (detailsLink) { - reactTestingLibrary.fireEvent.click(detailsLink); + const hostNameLinks = await renderResult.findAllByTestId('hostnameCellLink'); + if (hostNameLinks.length) { + reactTestingLibrary.fireEvent.click(hostNameLinks[0]); } }); diff --git a/x-pack/plugins/endpoint/public/applications/endpoint/view/hosts/index.tsx b/x-pack/plugins/endpoint/public/applications/endpoint/view/hosts/index.tsx index 5c2922162ce0ca..026ba2ff151264 100644 --- a/x-pack/plugins/endpoint/public/applications/endpoint/view/hosts/index.tsx +++ b/x-pack/plugins/endpoint/public/applications/endpoint/view/hosts/index.tsx @@ -16,10 +16,20 @@ import * as selectors from '../../store/hosts/selectors'; import { useHostSelector } from './hooks'; import { CreateStructuredSelector } from '../../types'; import { urlFromQueryParams } from './url_from_query_params'; -import { HostMetadata, Immutable } from '../../../../../common/types'; +import { HostInfo, HostStatus, Immutable } from '../../../../../common/types'; import { PageView } from '../components/page_view'; import { useNavigateByRouterEventHandler } from '../hooks/use_navigate_by_router_event_handler'; +const HOST_STATUS_TO_HEALTH_COLOR = Object.freeze< + { + [key in HostStatus]: string; + } +>({ + [HostStatus.ERROR]: 'danger', + [HostStatus.ONLINE]: 'success', + [HostStatus.OFFLINE]: 'subdued', +}); + const HostLink = memo<{ name: string; href: string; @@ -73,20 +83,40 @@ export const HostList = () => { [history, queryParams] ); - const columns: Array>> = useMemo(() => { + const columns: Array>> = useMemo(() => { return [ { - field: '', + field: 'metadata.host', name: i18n.translate('xpack.endpoint.host.list.hostname', { defaultMessage: 'Hostname', }), - render: ({ host: { hostname, id } }: { host: { hostname: string; id: string } }) => { + render: ({ hostname, id }: HostInfo['metadata']['host']) => { const newQueryParams = urlFromQueryParams({ ...queryParams, selected_host: id }); return ( ); }, }, + { + field: 'host_status', + name: i18n.translate('xpack.endpoint.host.list.hostStatus', { + defaultMessage: 'Host Status', + }), + render: (hostStatus: HostInfo['host_status']) => { + return ( + + + + ); + }, + }, { field: '', name: i18n.translate('xpack.endpoint.host.list.policy', { @@ -117,26 +147,23 @@ export const HostList = () => { }, }, { - field: 'host.os.name', + field: 'metadata.host.os.name', name: i18n.translate('xpack.endpoint.host.list.os', { defaultMessage: 'Operating System', }), }, { - field: 'host.ip', + field: 'metadata.host.ip', name: i18n.translate('xpack.endpoint.host.list.ip', { defaultMessage: 'IP Address', }), truncateText: true, }, { - field: '', - name: i18n.translate('xpack.endpoint.host.list.sensorVersion', { - defaultMessage: 'Sensor Version', + field: 'metadata.agent.version', + name: i18n.translate('xpack.endpoint.host.list.endpointVersion', { + defaultMessage: 'Version', }), - render: () => { - return 'version'; - }, }, { field: '', @@ -158,7 +185,7 @@ export const HostList = () => { headerLeft={i18n.translate('xpack.endpoint.host.hosts', { defaultMessage: 'Hosts' })} > {hasSelectedHost && } - + ; + +/** + * response + */ + +export const getLogSourceConfigurationSuccessResponsePayloadRT = rt.intersection([ + rt.type({ + data: logSourceConfigurationRT, + }), + rt.partial({ + timing: routeTimingMetadataRT, + }), +]); + +export type GetLogSourceConfigurationSuccessResponsePayload = rt.TypeOf< + typeof getLogSourceConfigurationSuccessResponsePayloadRT +>; + +export const getLogSourceConfigurationErrorResponsePayloadRT = rt.union([ + badRequestErrorRT, + forbiddenErrorRT, +]); + +export type GetLogSourceConfigurationErrorReponsePayload = rt.TypeOf< + typeof getLogSourceConfigurationErrorResponsePayloadRT +>; + +export const getLogSourceConfigurationResponsePayloadRT = rt.union([ + getLogSourceConfigurationSuccessResponsePayloadRT, + getLogSourceConfigurationErrorResponsePayloadRT, +]); + +export type GetLogSourceConfigurationReponsePayload = rt.TypeOf< + typeof getLogSourceConfigurationResponsePayloadRT +>; diff --git a/x-pack/plugins/infra/common/http_api/log_sources/get_log_source_status.ts b/x-pack/plugins/infra/common/http_api/log_sources/get_log_source_status.ts new file mode 100644 index 00000000000000..ae872cee9aa56f --- /dev/null +++ b/x-pack/plugins/infra/common/http_api/log_sources/get_log_source_status.ts @@ -0,0 +1,61 @@ +/* + * 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. + */ + +import * as rt from 'io-ts'; +import { routeTimingMetadataRT } from '../shared'; +import { + getLogSourceConfigurationPath, + LOG_SOURCE_CONFIGURATION_PATH, +} from './log_source_configuration'; + +export const LOG_SOURCE_STATUS_PATH_SUFFIX = 'status'; +export const LOG_SOURCE_STATUS_PATH = `${LOG_SOURCE_CONFIGURATION_PATH}/${LOG_SOURCE_STATUS_PATH_SUFFIX}`; +export const getLogSourceStatusPath = (sourceId: string) => + `${getLogSourceConfigurationPath(sourceId)}/${LOG_SOURCE_STATUS_PATH_SUFFIX}`; + +/** + * request + */ + +export const getLogSourceStatusRequestParamsRT = rt.type({ + // the id of the source configuration + sourceId: rt.string, +}); + +export type GetLogSourceStatusRequestParams = rt.TypeOf; + +/** + * response + */ + +const logIndexFieldRT = rt.strict({ + name: rt.string, + type: rt.string, + searchable: rt.boolean, + aggregatable: rt.boolean, +}); + +export type LogIndexField = rt.TypeOf; + +const logSourceStatusRT = rt.strict({ + logIndexFields: rt.array(logIndexFieldRT), + logIndexNames: rt.array(rt.string), +}); + +export type LogSourceStatus = rt.TypeOf; + +export const getLogSourceStatusSuccessResponsePayloadRT = rt.intersection([ + rt.type({ + data: logSourceStatusRT, + }), + rt.partial({ + timing: routeTimingMetadataRT, + }), +]); + +export type GetLogSourceStatusSuccessResponsePayload = rt.TypeOf< + typeof getLogSourceStatusSuccessResponsePayloadRT +>; diff --git a/x-pack/plugins/infra/common/http_api/log_sources/index.ts b/x-pack/plugins/infra/common/http_api/log_sources/index.ts new file mode 100644 index 00000000000000..5fd1b5efec1775 --- /dev/null +++ b/x-pack/plugins/infra/common/http_api/log_sources/index.ts @@ -0,0 +1,10 @@ +/* + * 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 * from './get_log_source_configuration'; +export * from './get_log_source_status'; +export * from './log_source_configuration'; +export * from './patch_log_source_configuration'; diff --git a/x-pack/plugins/infra/common/http_api/log_sources/log_source_configuration.ts b/x-pack/plugins/infra/common/http_api/log_sources/log_source_configuration.ts new file mode 100644 index 00000000000000..e8bf63843c623d --- /dev/null +++ b/x-pack/plugins/infra/common/http_api/log_sources/log_source_configuration.ts @@ -0,0 +1,78 @@ +/* + * 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. + */ + +import * as rt from 'io-ts'; + +export const LOG_SOURCE_CONFIGURATION_PATH_PREFIX = '/api/infra/log_source_configurations'; +export const LOG_SOURCE_CONFIGURATION_PATH = `${LOG_SOURCE_CONFIGURATION_PATH_PREFIX}/{sourceId}`; +export const getLogSourceConfigurationPath = (sourceId: string) => + `${LOG_SOURCE_CONFIGURATION_PATH_PREFIX}/${sourceId}`; + +export const logSourceConfigurationOriginRT = rt.keyof({ + fallback: null, + internal: null, + stored: null, +}); + +export type LogSourceConfigurationOrigin = rt.TypeOf; + +const logSourceFieldsConfigurationRT = rt.strict({ + timestamp: rt.string, + tiebreaker: rt.string, +}); + +const logSourceCommonColumnConfigurationRT = rt.strict({ + id: rt.string, +}); + +const logSourceTimestampColumnConfigurationRT = rt.strict({ + timestampColumn: logSourceCommonColumnConfigurationRT, +}); + +const logSourceMessageColumnConfigurationRT = rt.strict({ + messageColumn: logSourceCommonColumnConfigurationRT, +}); + +const logSourceFieldColumnConfigurationRT = rt.strict({ + fieldColumn: rt.intersection([ + logSourceCommonColumnConfigurationRT, + rt.strict({ + field: rt.string, + }), + ]), +}); + +const logSourceColumnConfigurationRT = rt.union([ + logSourceTimestampColumnConfigurationRT, + logSourceMessageColumnConfigurationRT, + logSourceFieldColumnConfigurationRT, +]); + +export const logSourceConfigurationPropertiesRT = rt.strict({ + name: rt.string, + description: rt.string, + logAlias: rt.string, + fields: logSourceFieldsConfigurationRT, + logColumns: rt.array(logSourceColumnConfigurationRT), +}); + +export type LogSourceConfigurationProperties = rt.TypeOf; + +export const logSourceConfigurationRT = rt.exact( + rt.intersection([ + rt.type({ + id: rt.string, + origin: logSourceConfigurationOriginRT, + configuration: logSourceConfigurationPropertiesRT, + }), + rt.partial({ + updatedAt: rt.number, + version: rt.string, + }), + ]) +); + +export type LogSourceConfiguration = rt.TypeOf; diff --git a/x-pack/plugins/infra/common/http_api/log_sources/patch_log_source_configuration.ts b/x-pack/plugins/infra/common/http_api/log_sources/patch_log_source_configuration.ts new file mode 100644 index 00000000000000..fd312d7429b606 --- /dev/null +++ b/x-pack/plugins/infra/common/http_api/log_sources/patch_log_source_configuration.ts @@ -0,0 +1,60 @@ +/* + * 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. + */ + +import * as rt from 'io-ts'; +import { badRequestErrorRT, forbiddenErrorRT } from '../shared'; +import { getLogSourceConfigurationSuccessResponsePayloadRT } from './get_log_source_configuration'; +import { logSourceConfigurationPropertiesRT } from './log_source_configuration'; + +/** + * request + */ + +export const patchLogSourceConfigurationRequestParamsRT = rt.type({ + // the id of the source configuration + sourceId: rt.string, +}); + +export type PatchLogSourceConfigurationRequestParams = rt.TypeOf< + typeof patchLogSourceConfigurationRequestParamsRT +>; + +const logSourceConfigurationProperiesPatchRT = rt.partial({ + ...logSourceConfigurationPropertiesRT.type.props, + fields: rt.partial(logSourceConfigurationPropertiesRT.type.props.fields.type.props), +}); + +export type LogSourceConfigurationPropertiesPatch = rt.TypeOf< + typeof logSourceConfigurationProperiesPatchRT +>; + +export const patchLogSourceConfigurationRequestBodyRT = rt.type({ + data: logSourceConfigurationProperiesPatchRT, +}); + +export type PatchLogSourceConfigurationRequestBody = rt.TypeOf< + typeof patchLogSourceConfigurationRequestBodyRT +>; + +/** + * response + */ + +export const patchLogSourceConfigurationSuccessResponsePayloadRT = getLogSourceConfigurationSuccessResponsePayloadRT; + +export type PatchLogSourceConfigurationSuccessResponsePayload = rt.TypeOf< + typeof patchLogSourceConfigurationSuccessResponsePayloadRT +>; + +export const patchLogSourceConfigurationResponsePayloadRT = rt.union([ + patchLogSourceConfigurationSuccessResponsePayloadRT, + badRequestErrorRT, + forbiddenErrorRT, +]); + +export type PatchLogSourceConfigurationReponsePayload = rt.TypeOf< + typeof patchLogSourceConfigurationResponsePayloadRT +>; diff --git a/x-pack/plugins/infra/common/runtime_types.ts b/x-pack/plugins/infra/common/runtime_types.ts index d5b858df38def1..a8d5cd8693a3da 100644 --- a/x-pack/plugins/infra/common/runtime_types.ts +++ b/x-pack/plugins/infra/common/runtime_types.ts @@ -9,6 +9,7 @@ import { identity } from 'fp-ts/lib/function'; import { pipe } from 'fp-ts/lib/pipeable'; import { Errors, Type } from 'io-ts'; import { failure } from 'io-ts/lib/PathReporter'; +import { RouteValidationFunction } from 'kibana/server'; type ErrorFactory = (message: string) => Error; @@ -18,8 +19,21 @@ export const throwErrors = (createError: ErrorFactory) => (errors: Errors) => { throw createError(failure(errors).join('\n')); }; -export const decodeOrThrow = ( - runtimeType: Type, +export const decodeOrThrow = ( + runtimeType: Type, createError: ErrorFactory = createPlainError -) => (inputValue: I) => +) => (inputValue: InputValue) => pipe(runtimeType.decode(inputValue), fold(throwErrors(createError), identity)); + +type ValdidationResult = ReturnType>; + +export const createValidationFunction = ( + runtimeType: Type +): RouteValidationFunction => (inputValue, { badRequest, ok }) => + pipe( + runtimeType.decode(inputValue), + fold>( + (errors: Errors) => badRequest(failure(errors).join('\n')), + (result: DecodedValue) => ok(result) + ) + ); diff --git a/x-pack/plugins/infra/public/components/source_configuration/index.ts b/x-pack/plugins/infra/public/components/source_configuration/index.ts index 98825567cc204b..66f64aee24f6ee 100644 --- a/x-pack/plugins/infra/public/components/source_configuration/index.ts +++ b/x-pack/plugins/infra/public/components/source_configuration/index.ts @@ -4,5 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ +export * from './input_fields'; export { SourceConfigurationSettings } from './source_configuration_settings'; export { ViewSourceConfigurationButton } from './view_source_configuration_button'; diff --git a/x-pack/plugins/infra/public/containers/logs/log_flyout.tsx b/x-pack/plugins/infra/public/containers/logs/log_flyout.tsx index 267abe631c1423..b0981f9b3c41f2 100644 --- a/x-pack/plugins/infra/public/containers/logs/log_flyout.tsx +++ b/x-pack/plugins/infra/public/containers/logs/log_flyout.tsx @@ -8,11 +8,11 @@ import createContainer from 'constate'; import { isString } from 'lodash'; import React, { useContext, useEffect, useMemo, useState } from 'react'; +import { LogEntriesItem } from '../../../common/http_api'; import { UrlStateContainer } from '../../utils/url_state'; import { useTrackedPromise } from '../../utils/use_tracked_promise'; -import { Source } from '../source'; import { fetchLogEntriesItem } from './log_entries/api/fetch_log_entries_item'; -import { LogEntriesItem } from '../../../common/http_api'; +import { useLogSourceContext } from './log_source'; export enum FlyoutVisibility { hidden = 'hidden', @@ -26,7 +26,7 @@ export interface FlyoutOptionsUrlState { } export const useLogFlyout = () => { - const { sourceId } = useContext(Source.Context); + const { sourceId } = useLogSourceContext(); const [flyoutVisible, setFlyoutVisibility] = useState(false); const [flyoutId, setFlyoutId] = useState(null); const [flyoutItem, setFlyoutItem] = useState(null); diff --git a/x-pack/plugins/infra/public/containers/logs/log_source/api/fetch_log_source_configuration.ts b/x-pack/plugins/infra/public/containers/logs/log_source/api/fetch_log_source_configuration.ts new file mode 100644 index 00000000000000..786cb485b38dd5 --- /dev/null +++ b/x-pack/plugins/infra/public/containers/logs/log_source/api/fetch_log_source_configuration.ts @@ -0,0 +1,20 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import { + getLogSourceConfigurationPath, + getLogSourceConfigurationSuccessResponsePayloadRT, +} from '../../../../../common/http_api/log_sources'; +import { decodeOrThrow } from '../../../../../common/runtime_types'; +import { npStart } from '../../../../legacy_singletons'; + +export const callFetchLogSourceConfigurationAPI = async (sourceId: string) => { + const response = await npStart.http.fetch(getLogSourceConfigurationPath(sourceId), { + method: 'GET', + }); + + return decodeOrThrow(getLogSourceConfigurationSuccessResponsePayloadRT)(response); +}; diff --git a/x-pack/plugins/infra/public/containers/logs/log_source/api/fetch_log_source_status.ts b/x-pack/plugins/infra/public/containers/logs/log_source/api/fetch_log_source_status.ts new file mode 100644 index 00000000000000..2f1d15ffaf4d3d --- /dev/null +++ b/x-pack/plugins/infra/public/containers/logs/log_source/api/fetch_log_source_status.ts @@ -0,0 +1,20 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import { + getLogSourceStatusPath, + getLogSourceStatusSuccessResponsePayloadRT, +} from '../../../../../common/http_api/log_sources'; +import { decodeOrThrow } from '../../../../../common/runtime_types'; +import { npStart } from '../../../../legacy_singletons'; + +export const callFetchLogSourceStatusAPI = async (sourceId: string) => { + const response = await npStart.http.fetch(getLogSourceStatusPath(sourceId), { + method: 'GET', + }); + + return decodeOrThrow(getLogSourceStatusSuccessResponsePayloadRT)(response); +}; diff --git a/x-pack/plugins/infra/public/containers/logs/log_source/api/patch_log_source_configuration.ts b/x-pack/plugins/infra/public/containers/logs/log_source/api/patch_log_source_configuration.ts new file mode 100644 index 00000000000000..848801ab3c7ce7 --- /dev/null +++ b/x-pack/plugins/infra/public/containers/logs/log_source/api/patch_log_source_configuration.ts @@ -0,0 +1,30 @@ +/* + * 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. + */ + +import { + getLogSourceConfigurationPath, + patchLogSourceConfigurationSuccessResponsePayloadRT, + patchLogSourceConfigurationRequestBodyRT, + LogSourceConfigurationPropertiesPatch, +} from '../../../../../common/http_api/log_sources'; +import { decodeOrThrow } from '../../../../../common/runtime_types'; +import { npStart } from '../../../../legacy_singletons'; + +export const callPatchLogSourceConfigurationAPI = async ( + sourceId: string, + patchedProperties: LogSourceConfigurationPropertiesPatch +) => { + const response = await npStart.http.fetch(getLogSourceConfigurationPath(sourceId), { + method: 'PATCH', + body: JSON.stringify( + patchLogSourceConfigurationRequestBodyRT.encode({ + data: patchedProperties, + }) + ), + }); + + return decodeOrThrow(patchLogSourceConfigurationSuccessResponsePayloadRT)(response); +}; diff --git a/x-pack/test/reporting/functional/lib/index.js b/x-pack/plugins/infra/public/containers/logs/log_source/index.ts similarity index 82% rename from x-pack/test/reporting/functional/lib/index.js rename to x-pack/plugins/infra/public/containers/logs/log_source/index.ts index e7a08753b591f5..5d9c6373050a19 100644 --- a/x-pack/test/reporting/functional/lib/index.js +++ b/x-pack/plugins/infra/public/containers/logs/log_source/index.ts @@ -4,4 +4,4 @@ * you may not use this file except in compliance with the Elastic License. */ -export { checkIfPngsMatch } from './compare_pngs'; +export * from './log_source'; diff --git a/x-pack/plugins/infra/public/containers/logs/log_source/log_source.ts b/x-pack/plugins/infra/public/containers/logs/log_source/log_source.ts new file mode 100644 index 00000000000000..8332018fddf901 --- /dev/null +++ b/x-pack/plugins/infra/public/containers/logs/log_source/log_source.ts @@ -0,0 +1,157 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import createContainer from 'constate'; +import { useState, useMemo, useCallback } from 'react'; +import { + LogSourceConfiguration, + LogSourceStatus, + LogSourceConfigurationPropertiesPatch, + LogSourceConfigurationProperties, +} from '../../../../common/http_api/log_sources'; +import { useTrackedPromise } from '../../../utils/use_tracked_promise'; +import { callFetchLogSourceConfigurationAPI } from './api/fetch_log_source_configuration'; +import { callFetchLogSourceStatusAPI } from './api/fetch_log_source_status'; +import { callPatchLogSourceConfigurationAPI } from './api/patch_log_source_configuration'; + +export { + LogSourceConfiguration, + LogSourceConfigurationProperties, + LogSourceConfigurationPropertiesPatch, + LogSourceStatus, +}; + +export const useLogSource = ({ sourceId }: { sourceId: string }) => { + const [sourceConfiguration, setSourceConfiguration] = useState< + LogSourceConfiguration | undefined + >(undefined); + + const [sourceStatus, setSourceStatus] = useState(undefined); + + const [loadSourceConfigurationRequest, loadSourceConfiguration] = useTrackedPromise( + { + cancelPreviousOn: 'resolution', + createPromise: async () => { + return await callFetchLogSourceConfigurationAPI(sourceId); + }, + onResolve: ({ data }) => { + setSourceConfiguration(data); + }, + }, + [sourceId] + ); + + const [updateSourceConfigurationRequest, updateSourceConfiguration] = useTrackedPromise( + { + cancelPreviousOn: 'resolution', + createPromise: async (patchedProperties: LogSourceConfigurationPropertiesPatch) => { + return await callPatchLogSourceConfigurationAPI(sourceId, patchedProperties); + }, + onResolve: ({ data }) => { + setSourceConfiguration(data); + loadSourceStatus(); + }, + }, + [sourceId] + ); + + const [loadSourceStatusRequest, loadSourceStatus] = useTrackedPromise( + { + cancelPreviousOn: 'resolution', + createPromise: async () => { + return await callFetchLogSourceStatusAPI(sourceId); + }, + onResolve: ({ data }) => { + setSourceStatus(data); + }, + }, + [sourceId] + ); + + const logIndicesExist = useMemo(() => (sourceStatus?.logIndexNames?.length ?? 0) > 0, [ + sourceStatus, + ]); + + const derivedIndexPattern = useMemo( + () => ({ + fields: sourceStatus?.logIndexFields ?? [], + title: sourceConfiguration?.configuration.name ?? 'unknown', + }), + [sourceConfiguration, sourceStatus] + ); + + const isLoadingSourceConfiguration = useMemo( + () => loadSourceConfigurationRequest.state === 'pending', + [loadSourceConfigurationRequest.state] + ); + + const isUpdatingSourceConfiguration = useMemo( + () => updateSourceConfigurationRequest.state === 'pending', + [updateSourceConfigurationRequest.state] + ); + + const isLoadingSourceStatus = useMemo(() => loadSourceStatusRequest.state === 'pending', [ + loadSourceStatusRequest.state, + ]); + + const isLoading = useMemo( + () => isLoadingSourceConfiguration || isLoadingSourceStatus || isUpdatingSourceConfiguration, + [isLoadingSourceConfiguration, isLoadingSourceStatus, isUpdatingSourceConfiguration] + ); + + const isUninitialized = useMemo( + () => + loadSourceConfigurationRequest.state === 'uninitialized' || + loadSourceStatusRequest.state === 'uninitialized', + [loadSourceConfigurationRequest.state, loadSourceStatusRequest.state] + ); + + const hasFailedLoadingSource = useMemo( + () => loadSourceConfigurationRequest.state === 'rejected', + [loadSourceConfigurationRequest.state] + ); + + const loadSourceFailureMessage = useMemo( + () => + loadSourceConfigurationRequest.state === 'rejected' + ? `${loadSourceConfigurationRequest.value}` + : undefined, + [loadSourceConfigurationRequest] + ); + + const loadSource = useCallback(() => { + return Promise.all([loadSourceConfiguration(), loadSourceStatus()]); + }, [loadSourceConfiguration, loadSourceStatus]); + + const initialize = useCallback(async () => { + if (!isUninitialized) { + return; + } + + return await loadSource(); + }, [isUninitialized, loadSource]); + + return { + derivedIndexPattern, + hasFailedLoadingSource, + initialize, + isLoading, + isLoadingSourceConfiguration, + isLoadingSourceStatus, + isUninitialized, + loadSource, + loadSourceFailureMessage, + loadSourceConfiguration, + loadSourceStatus, + logIndicesExist, + sourceConfiguration, + sourceId, + sourceStatus, + updateSourceConfiguration, + }; +}; + +export const [LogSourceProvider, useLogSourceContext] = createContainer(useLogSource); diff --git a/x-pack/plugins/infra/public/containers/logs/log_summary/with_summary.ts b/x-pack/plugins/infra/public/containers/logs/log_summary/with_summary.ts index 14da2b47bcfa2d..625a1ead4d930f 100644 --- a/x-pack/plugins/infra/public/containers/logs/log_summary/with_summary.ts +++ b/x-pack/plugins/infra/public/containers/logs/log_summary/with_summary.ts @@ -8,10 +8,10 @@ import { useContext } from 'react'; import { useThrottle } from 'react-use'; import { RendererFunction } from '../../../utils/typed_react'; -import { Source } from '../../source'; import { LogSummaryBuckets, useLogSummary } from './log_summary'; import { LogFilterState } from '../log_filter'; import { LogPositionState } from '../log_position'; +import { useLogSourceContext } from '../log_source'; const FETCH_THROTTLE_INTERVAL = 3000; @@ -24,7 +24,7 @@ export const WithSummary = ({ end: number | null; }>; }) => { - const { sourceId } = useContext(Source.Context); + const { sourceId } = useLogSourceContext(); const { filterQuery } = useContext(LogFilterState.Context); const { startTimestamp, endTimestamp } = useContext(LogPositionState.Context); diff --git a/x-pack/plugins/infra/public/pages/logs/log_entry_categories/page_content.tsx b/x-pack/plugins/infra/public/pages/logs/log_entry_categories/page_content.tsx index ed1aa9e72ebaea..04b472ceb59c84 100644 --- a/x-pack/plugins/infra/public/pages/logs/log_entry_categories/page_content.tsx +++ b/x-pack/plugins/infra/public/pages/logs/log_entry_categories/page_content.tsx @@ -17,7 +17,7 @@ import { import { SourceErrorPage } from '../../../components/source_error_page'; import { SourceLoadingPage } from '../../../components/source_loading_page'; import { useLogAnalysisCapabilitiesContext } from '../../../containers/logs/log_analysis'; -import { useSourceContext } from '../../../containers/source'; +import { useLogSourceContext } from '../../../containers/logs/log_source'; import { LogEntryCategoriesResultsContent } from './page_results_content'; import { LogEntryCategoriesSetupContent } from './page_setup_content'; import { useLogEntryCategoriesModuleContext } from './use_log_entry_categories_module'; @@ -25,11 +25,11 @@ import { useLogEntryCategoriesModuleContext } from './use_log_entry_categories_m export const LogEntryCategoriesPageContent = () => { const { hasFailedLoadingSource, - isLoadingSource, + isLoading, isUninitialized, loadSource, loadSourceFailureMessage, - } = useSourceContext(); + } = useLogSourceContext(); const { hasLogAnalysisCapabilites, @@ -45,7 +45,7 @@ export const LogEntryCategoriesPageContent = () => { } }, [fetchJobStatus, hasLogAnalysisReadCapabilities]); - if (isLoadingSource || isUninitialized) { + if (isLoading || isUninitialized) { return ; } else if (hasFailedLoadingSource) { return ; diff --git a/x-pack/plugins/infra/public/pages/logs/log_entry_categories/page_providers.tsx b/x-pack/plugins/infra/public/pages/logs/log_entry_categories/page_providers.tsx index 619cea6eda8b7e..cecea733b49e4c 100644 --- a/x-pack/plugins/infra/public/pages/logs/log_entry_categories/page_providers.tsx +++ b/x-pack/plugins/infra/public/pages/logs/log_entry_categories/page_providers.tsx @@ -6,20 +6,20 @@ import React from 'react'; -import { useSourceContext } from '../../../containers/source'; +import { useLogSourceContext } from '../../../containers/logs/log_source'; import { useKibanaSpaceId } from '../../../utils/use_kibana_space_id'; import { LogEntryCategoriesModuleProvider } from './use_log_entry_categories_module'; export const LogEntryCategoriesPageProviders: React.FunctionComponent = ({ children }) => { - const { sourceId, source } = useSourceContext(); + const { sourceId, sourceConfiguration } = useLogSourceContext(); const spaceId = useKibanaSpaceId(); return ( {children} diff --git a/x-pack/plugins/infra/public/pages/logs/log_entry_rate/page_content.tsx b/x-pack/plugins/infra/public/pages/logs/log_entry_rate/page_content.tsx index 2f34e62d8e611a..fc07289f02fe7f 100644 --- a/x-pack/plugins/infra/public/pages/logs/log_entry_rate/page_content.tsx +++ b/x-pack/plugins/infra/public/pages/logs/log_entry_rate/page_content.tsx @@ -17,7 +17,7 @@ import { import { SourceErrorPage } from '../../../components/source_error_page'; import { SourceLoadingPage } from '../../../components/source_loading_page'; import { useLogAnalysisCapabilitiesContext } from '../../../containers/logs/log_analysis'; -import { useSourceContext } from '../../../containers/source'; +import { useLogSourceContext } from '../../../containers/logs/log_source'; import { LogEntryRateResultsContent } from './page_results_content'; import { LogEntryRateSetupContent } from './page_setup_content'; import { useLogEntryRateModuleContext } from './use_log_entry_rate_module'; @@ -25,11 +25,11 @@ import { useLogEntryRateModuleContext } from './use_log_entry_rate_module'; export const LogEntryRatePageContent = () => { const { hasFailedLoadingSource, - isLoadingSource, + isLoading, isUninitialized, loadSource, loadSourceFailureMessage, - } = useSourceContext(); + } = useLogSourceContext(); const { hasLogAnalysisCapabilites, @@ -45,7 +45,7 @@ export const LogEntryRatePageContent = () => { } }, [fetchJobStatus, hasLogAnalysisReadCapabilities]); - if (isLoadingSource || isUninitialized) { + if (isLoading || isUninitialized) { return ; } else if (hasFailedLoadingSource) { return ; diff --git a/x-pack/plugins/infra/public/pages/logs/log_entry_rate/page_providers.tsx b/x-pack/plugins/infra/public/pages/logs/log_entry_rate/page_providers.tsx index 67c8ea7660a260..e91ef87bdf34ae 100644 --- a/x-pack/plugins/infra/public/pages/logs/log_entry_rate/page_providers.tsx +++ b/x-pack/plugins/infra/public/pages/logs/log_entry_rate/page_providers.tsx @@ -6,20 +6,20 @@ import React from 'react'; -import { useSourceContext } from '../../../containers/source'; +import { useLogSourceContext } from '../../../containers/logs/log_source'; import { useKibanaSpaceId } from '../../../utils/use_kibana_space_id'; import { LogEntryRateModuleProvider } from './use_log_entry_rate_module'; export const LogEntryRatePageProviders: React.FunctionComponent = ({ children }) => { - const { sourceId, source } = useSourceContext(); + const { sourceId, sourceConfiguration } = useLogSourceContext(); const spaceId = useKibanaSpaceId(); return ( {children} diff --git a/x-pack/plugins/infra/public/pages/logs/page_content.tsx b/x-pack/plugins/infra/public/pages/logs/page_content.tsx index dc210406275d8d..2974939a83215c 100644 --- a/x-pack/plugins/infra/public/pages/logs/page_content.tsx +++ b/x-pack/plugins/infra/public/pages/logs/page_content.tsx @@ -8,6 +8,7 @@ import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; import { Route, Switch } from 'react-router-dom'; +import { useMount } from 'react-use'; import { useKibana } from '../../../../../../src/plugins/kibana_react/public'; import { DocumentTitle } from '../../components/document_title'; @@ -17,6 +18,7 @@ import { AppNavigation } from '../../components/navigation/app_navigation'; import { RoutedTabs } from '../../components/navigation/routed_tabs'; import { ColumnarPage } from '../../components/page'; import { useLogAnalysisCapabilitiesContext } from '../../containers/logs/log_analysis'; +import { useLogSourceContext } from '../../containers/logs/log_source'; import { RedirectWithQueryParams } from '../../utils/redirect_with_query_params'; import { LogEntryCategoriesPage } from './log_entry_categories'; import { LogEntryRatePage } from './log_entry_rate'; @@ -28,6 +30,12 @@ export const LogsPageContent: React.FunctionComponent = () => { const uiCapabilities = useKibana().services.application?.capabilities; const logAnalysisCapabilities = useLogAnalysisCapabilitiesContext(); + const { initialize } = useLogSourceContext(); + + useMount(() => { + initialize(); + }); + const streamTab = { app: 'logs', title: streamTabTitle, diff --git a/x-pack/plugins/infra/public/pages/logs/page_providers.tsx b/x-pack/plugins/infra/public/pages/logs/page_providers.tsx index 24c1598787a204..d2db5002f4aa22 100644 --- a/x-pack/plugins/infra/public/pages/logs/page_providers.tsx +++ b/x-pack/plugins/infra/public/pages/logs/page_providers.tsx @@ -6,15 +6,16 @@ import React from 'react'; import { LogAnalysisCapabilitiesProvider } from '../../containers/logs/log_analysis'; -import { SourceProvider } from '../../containers/source'; +import { LogSourceProvider } from '../../containers/logs/log_source'; +// import { SourceProvider } from '../../containers/source'; import { useSourceId } from '../../containers/source_id'; export const LogsPageProviders: React.FunctionComponent = ({ children }) => { const [sourceId] = useSourceId(); return ( - + {children} - + ); }; diff --git a/x-pack/plugins/infra/public/pages/logs/settings.tsx b/x-pack/plugins/infra/public/pages/logs/settings.tsx deleted file mode 100644 index faee7a643085a3..00000000000000 --- a/x-pack/plugins/infra/public/pages/logs/settings.tsx +++ /dev/null @@ -1,19 +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. - */ - -import React from 'react'; -import { SourceConfigurationSettings } from '../../components/source_configuration/source_configuration_settings'; -import { useKibana } from '../../../../../../src/plugins/kibana_react/public'; - -export const LogsSettingsPage = () => { - const uiCapabilities = useKibana().services.application?.capabilities; - return ( - - ); -}; diff --git a/x-pack/plugins/infra/public/pages/logs/settings/add_log_column_popover.tsx b/x-pack/plugins/infra/public/pages/logs/settings/add_log_column_popover.tsx new file mode 100644 index 00000000000000..6e68debceac701 --- /dev/null +++ b/x-pack/plugins/infra/public/pages/logs/settings/add_log_column_popover.tsx @@ -0,0 +1,166 @@ +/* + * 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. + */ + +import { + EuiBadge, + EuiButton, + EuiPopover, + EuiPopoverTitle, + EuiSelectable, + EuiSelectableOption, +} from '@elastic/eui'; +import { FormattedMessage } from '@kbn/i18n/react'; +import React, { useCallback, useMemo } from 'react'; +import { v4 as uuidv4 } from 'uuid'; +import { euiStyled } from '../../../../../observability/public'; +import { LogColumnConfiguration } from '../../../utils/source_configuration'; +import { useVisibilityState } from '../../../utils/use_visibility_state'; + +interface SelectableColumnOption { + optionProps: EuiSelectableOption; + columnConfiguration: LogColumnConfiguration; +} + +export const AddLogColumnButtonAndPopover: React.FunctionComponent<{ + addLogColumn: (logColumnConfiguration: LogColumnConfiguration) => void; + availableFields: string[]; + isDisabled?: boolean; +}> = ({ addLogColumn, availableFields, isDisabled }) => { + const { isVisible: isOpen, show: openPopover, hide: closePopover } = useVisibilityState(false); + + const availableColumnOptions = useMemo( + () => [ + { + optionProps: { + append: , + 'data-test-subj': 'addTimestampLogColumn', + // this key works around EuiSelectable using a lowercased label as + // key, which leads to conflicts with field names + key: 'timestamp', + label: 'Timestamp', + }, + columnConfiguration: { + timestampColumn: { + id: uuidv4(), + }, + }, + }, + { + optionProps: { + 'data-test-subj': 'addMessageLogColumn', + append: , + // this key works around EuiSelectable using a lowercased label as + // key, which leads to conflicts with field names + key: 'message', + label: 'Message', + }, + columnConfiguration: { + messageColumn: { + id: uuidv4(), + }, + }, + }, + ...availableFields.map(field => ({ + optionProps: { + 'data-test-subj': `addFieldLogColumn addFieldLogColumn:${field}`, + // this key works around EuiSelectable using a lowercased label as + // key, which leads to conflicts with fields that only differ in the + // case (e.g. the metricbeat mongodb module) + key: `field-${field}`, + label: field, + }, + columnConfiguration: { + fieldColumn: { + id: uuidv4(), + field, + }, + }, + })), + ], + [availableFields] + ); + + const availableOptions = useMemo( + () => availableColumnOptions.map(availableColumnOption => availableColumnOption.optionProps), + [availableColumnOptions] + ); + + const handleColumnSelection = useCallback( + (selectedOptions: EuiSelectableOption[]) => { + closePopover(); + + const selectedOptionIndex = selectedOptions.findIndex( + selectedOption => selectedOption.checked === 'on' + ); + const selectedOption = availableColumnOptions[selectedOptionIndex]; + + addLogColumn(selectedOption.columnConfiguration); + }, + [addLogColumn, availableColumnOptions, closePopover] + ); + + return ( + + + + } + closePopover={closePopover} + id="addLogColumn" + isOpen={isOpen} + ownFocus + panelPaddingSize="none" + > + + {(list, search) => ( + + {search} + {list} + + )} + + + ); +}; + +const searchProps = { + 'data-test-subj': 'fieldSearchInput', +}; + +const selectableListProps = { + showIcons: false, +}; + +const SystemColumnBadge: React.FunctionComponent = () => ( + + + +); + +const SelectableContent = euiStyled.div` + width: 400px; +`; diff --git a/x-pack/plugins/infra/public/pages/logs/settings/fields_configuration_panel.tsx b/x-pack/plugins/infra/public/pages/logs/settings/fields_configuration_panel.tsx new file mode 100644 index 00000000000000..ac3b75ad97bb2a --- /dev/null +++ b/x-pack/plugins/infra/public/pages/logs/settings/fields_configuration_panel.tsx @@ -0,0 +1,178 @@ +/* + * 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. + */ + +import { + EuiCallOut, + EuiCode, + EuiDescribedFormGroup, + EuiFieldText, + EuiForm, + EuiFormRow, + EuiLink, + EuiSpacer, + EuiTitle, +} from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import { FormattedMessage } from '@kbn/i18n/react'; +import React from 'react'; +import { InputFieldProps } from '../../../components/source_configuration'; + +interface FieldsConfigurationPanelProps { + isLoading: boolean; + readOnly: boolean; + tiebreakerFieldProps: InputFieldProps; + timestampFieldProps: InputFieldProps; +} + +export const FieldsConfigurationPanel = ({ + isLoading, + readOnly, + tiebreakerFieldProps, + timestampFieldProps, +}: FieldsConfigurationPanelProps) => { + const isTimestampValueDefault = timestampFieldProps.value === '@timestamp'; + const isTiebreakerValueDefault = tiebreakerFieldProps.value === '_doc'; + + return ( + + +

+ +

+
+ + +

+ + + + ), + ecsLink: ( + + ECS + + ), + }} + /> +

+
+ + + + + } + description={ + + } + > + @timestamp, + }} + /> + } + isInvalid={timestampFieldProps.isInvalid} + label={ + + } + > + + + + + + + } + description={ + + } + > + _doc, + }} + /> + } + isInvalid={tiebreakerFieldProps.isInvalid} + label={ + + } + > + + + +
+ ); +}; diff --git a/x-pack/test/reporting/functional/index.js b/x-pack/plugins/infra/public/pages/logs/settings/index.ts similarity index 58% rename from x-pack/test/reporting/functional/index.js rename to x-pack/plugins/infra/public/pages/logs/settings/index.ts index be3ac09bdec10b..ebdda7ebbd5873 100644 --- a/x-pack/test/reporting/functional/index.js +++ b/x-pack/plugins/infra/public/pages/logs/settings/index.ts @@ -4,9 +4,4 @@ * you may not use this file except in compliance with the Elastic License. */ -export default function({ loadTestFile }) { - describe('reporting app', function() { - this.tags('ciGroup6'); - loadTestFile(require.resolve('./reporting')); - }); -} +export * from './source_configuration_settings'; diff --git a/x-pack/plugins/infra/public/pages/logs/settings/indices_configuration_form_state.ts b/x-pack/plugins/infra/public/pages/logs/settings/indices_configuration_form_state.ts new file mode 100644 index 00000000000000..a97e38884a5bd0 --- /dev/null +++ b/x-pack/plugins/infra/public/pages/logs/settings/indices_configuration_form_state.ts @@ -0,0 +1,123 @@ +/* + * 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. + */ + +import { ReactNode, useCallback, useMemo, useState } from 'react'; +import { + createInputFieldProps, + validateInputFieldNotEmpty, +} from '../../../components/source_configuration/input_fields'; + +interface FormState { + name: string; + description: string; + logAlias: string; + tiebreakerField: string; + timestampField: string; +} + +type FormStateChanges = Partial; + +export const useLogIndicesConfigurationFormState = ({ + initialFormState = defaultFormState, +}: { + initialFormState?: FormState; +}) => { + const [formStateChanges, setFormStateChanges] = useState({}); + + const resetForm = useCallback(() => setFormStateChanges({}), []); + + const formState = useMemo( + () => ({ + ...initialFormState, + ...formStateChanges, + }), + [initialFormState, formStateChanges] + ); + + const nameFieldProps = useMemo( + () => + createInputFieldProps({ + errors: validateInputFieldNotEmpty(formState.name), + name: 'name', + onChange: name => setFormStateChanges(changes => ({ ...changes, name })), + value: formState.name, + }), + [formState.name] + ); + const logAliasFieldProps = useMemo( + () => + createInputFieldProps({ + errors: validateInputFieldNotEmpty(formState.logAlias), + name: 'logAlias', + onChange: logAlias => setFormStateChanges(changes => ({ ...changes, logAlias })), + value: formState.logAlias, + }), + [formState.logAlias] + ); + const tiebreakerFieldFieldProps = useMemo( + () => + createInputFieldProps({ + errors: validateInputFieldNotEmpty(formState.tiebreakerField), + name: `tiebreakerField`, + onChange: tiebreakerField => + setFormStateChanges(changes => ({ ...changes, tiebreakerField })), + value: formState.tiebreakerField, + }), + [formState.tiebreakerField] + ); + const timestampFieldFieldProps = useMemo( + () => + createInputFieldProps({ + errors: validateInputFieldNotEmpty(formState.timestampField), + name: `timestampField`, + onChange: timestampField => + setFormStateChanges(changes => ({ ...changes, timestampField })), + value: formState.timestampField, + }), + [formState.timestampField] + ); + + const fieldProps = useMemo( + () => ({ + name: nameFieldProps, + logAlias: logAliasFieldProps, + tiebreakerField: tiebreakerFieldFieldProps, + timestampField: timestampFieldFieldProps, + }), + [nameFieldProps, logAliasFieldProps, tiebreakerFieldFieldProps, timestampFieldFieldProps] + ); + + const errors = useMemo( + () => + Object.values(fieldProps).reduce( + (accumulatedErrors, { error }) => [...accumulatedErrors, ...error], + [] + ), + [fieldProps] + ); + + const isFormValid = useMemo(() => errors.length <= 0, [errors]); + + const isFormDirty = useMemo(() => Object.keys(formStateChanges).length > 0, [formStateChanges]); + + return { + errors, + fieldProps, + formState, + formStateChanges, + isFormDirty, + isFormValid, + resetForm, + }; +}; + +const defaultFormState: FormState = { + name: '', + description: '', + logAlias: '', + tiebreakerField: '', + timestampField: '', +}; diff --git a/x-pack/plugins/infra/public/pages/logs/settings/indices_configuration_panel.tsx b/x-pack/plugins/infra/public/pages/logs/settings/indices_configuration_panel.tsx new file mode 100644 index 00000000000000..83effaa3d51a55 --- /dev/null +++ b/x-pack/plugins/infra/public/pages/logs/settings/indices_configuration_panel.tsx @@ -0,0 +1,88 @@ +/* + * 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. + */ + +import { + EuiCode, + EuiDescribedFormGroup, + EuiFieldText, + EuiForm, + EuiFormRow, + EuiSpacer, + EuiTitle, +} from '@elastic/eui'; +import { FormattedMessage } from '@kbn/i18n/react'; +import React from 'react'; +import { InputFieldProps } from '../../../components/source_configuration'; + +interface IndicesConfigurationPanelProps { + isLoading: boolean; + readOnly: boolean; + logAliasFieldProps: InputFieldProps; +} + +export const IndicesConfigurationPanel = ({ + isLoading, + readOnly, + logAliasFieldProps, +}: IndicesConfigurationPanelProps) => ( + + +

+ +

+
+ + + + + } + description={ + + } + > + filebeat-*, + }} + /> + } + isInvalid={logAliasFieldProps.isInvalid} + label={ + + } + > + + + +
+); diff --git a/x-pack/plugins/infra/public/pages/logs/settings/log_columns_configuration_form_state.tsx b/x-pack/plugins/infra/public/pages/logs/settings/log_columns_configuration_form_state.tsx new file mode 100644 index 00000000000000..0beccffe5f4e8d --- /dev/null +++ b/x-pack/plugins/infra/public/pages/logs/settings/log_columns_configuration_form_state.tsx @@ -0,0 +1,153 @@ +/* + * 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. + */ + +import { FormattedMessage } from '@kbn/i18n/react'; +import React, { useCallback, useMemo, useState } from 'react'; +import { + FieldLogColumnConfiguration, + isMessageLogColumnConfiguration, + isTimestampLogColumnConfiguration, + LogColumnConfiguration, + MessageLogColumnConfiguration, + TimestampLogColumnConfiguration, +} from '../../../utils/source_configuration'; + +export interface TimestampLogColumnConfigurationProps { + logColumnConfiguration: TimestampLogColumnConfiguration['timestampColumn']; + remove: () => void; + type: 'timestamp'; +} + +export interface MessageLogColumnConfigurationProps { + logColumnConfiguration: MessageLogColumnConfiguration['messageColumn']; + remove: () => void; + type: 'message'; +} + +export interface FieldLogColumnConfigurationProps { + logColumnConfiguration: FieldLogColumnConfiguration['fieldColumn']; + remove: () => void; + type: 'field'; +} + +export type LogColumnConfigurationProps = + | TimestampLogColumnConfigurationProps + | MessageLogColumnConfigurationProps + | FieldLogColumnConfigurationProps; + +interface FormState { + logColumns: LogColumnConfiguration[]; +} + +type FormStateChanges = Partial; + +export const useLogColumnsConfigurationFormState = ({ + initialFormState = defaultFormState, +}: { + initialFormState?: FormState; +}) => { + const [formStateChanges, setFormStateChanges] = useState({}); + + const resetForm = useCallback(() => setFormStateChanges({}), []); + + const formState = useMemo( + () => ({ + ...initialFormState, + ...formStateChanges, + }), + [initialFormState, formStateChanges] + ); + + const logColumnConfigurationProps = useMemo( + () => + formState.logColumns.map( + (logColumn): LogColumnConfigurationProps => { + const remove = () => + setFormStateChanges(changes => ({ + ...changes, + logColumns: formState.logColumns.filter(item => item !== logColumn), + })); + + if (isTimestampLogColumnConfiguration(logColumn)) { + return { + logColumnConfiguration: logColumn.timestampColumn, + remove, + type: 'timestamp', + }; + } else if (isMessageLogColumnConfiguration(logColumn)) { + return { + logColumnConfiguration: logColumn.messageColumn, + remove, + type: 'message', + }; + } else { + return { + logColumnConfiguration: logColumn.fieldColumn, + remove, + type: 'field', + }; + } + } + ), + [formState.logColumns] + ); + + const addLogColumn = useCallback( + (logColumnConfiguration: LogColumnConfiguration) => + setFormStateChanges(changes => ({ + ...changes, + logColumns: [...formState.logColumns, logColumnConfiguration], + })), + [formState.logColumns] + ); + + const moveLogColumn = useCallback( + (sourceIndex, destinationIndex) => { + if (destinationIndex >= 0 && sourceIndex <= formState.logColumns.length - 1) { + const newLogColumns = [...formState.logColumns]; + newLogColumns.splice(destinationIndex, 0, newLogColumns.splice(sourceIndex, 1)[0]); + setFormStateChanges(changes => ({ + ...changes, + logColumns: newLogColumns, + })); + } + }, + [formState.logColumns] + ); + + const errors = useMemo( + () => + logColumnConfigurationProps.length <= 0 + ? [ + , + ] + : [], + [logColumnConfigurationProps] + ); + + const isFormValid = useMemo(() => (errors.length <= 0 ? true : false), [errors]); + + const isFormDirty = useMemo(() => Object.keys(formStateChanges).length > 0, [formStateChanges]); + + return { + addLogColumn, + moveLogColumn, + errors, + logColumnConfigurationProps, + formState, + formStateChanges, + isFormDirty, + isFormValid, + resetForm, + }; +}; + +const defaultFormState: FormState = { + logColumns: [], +}; diff --git a/x-pack/plugins/infra/public/pages/logs/settings/log_columns_configuration_panel.tsx b/x-pack/plugins/infra/public/pages/logs/settings/log_columns_configuration_panel.tsx new file mode 100644 index 00000000000000..777f611ef33f71 --- /dev/null +++ b/x-pack/plugins/infra/public/pages/logs/settings/log_columns_configuration_panel.tsx @@ -0,0 +1,276 @@ +/* + * 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. + */ + +import { + EuiButtonIcon, + EuiDragDropContext, + EuiDraggable, + EuiDroppable, + EuiEmptyPrompt, + EuiFlexGroup, + EuiFlexItem, + EuiForm, + EuiIcon, + EuiPanel, + EuiSpacer, + EuiText, + EuiTitle, +} from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import { FormattedMessage } from '@kbn/i18n/react'; +import React, { useCallback } from 'react'; +import { DragHandleProps, DropResult } from '../../../../../observability/public'; +import { LogColumnConfiguration } from '../../../utils/source_configuration'; +import { AddLogColumnButtonAndPopover } from './add_log_column_popover'; +import { + FieldLogColumnConfigurationProps, + LogColumnConfigurationProps, +} from './log_columns_configuration_form_state'; + +interface LogColumnsConfigurationPanelProps { + availableFields: string[]; + isLoading: boolean; + logColumnConfiguration: LogColumnConfigurationProps[]; + addLogColumn: (logColumn: LogColumnConfiguration) => void; + moveLogColumn: (sourceIndex: number, destinationIndex: number) => void; +} + +export const LogColumnsConfigurationPanel: React.FunctionComponent = ({ + addLogColumn, + moveLogColumn, + availableFields, + isLoading, + logColumnConfiguration, +}) => { + const onDragEnd = useCallback( + ({ source, destination }: DropResult) => + destination && moveLogColumn(source.index, destination.index), + [moveLogColumn] + ); + + return ( + + + + +

+ +

+
+
+ + + +
+ {logColumnConfiguration.length > 0 ? ( + + + <> + {/* Fragment here necessary for typechecking */} + {logColumnConfiguration.map((column, index) => ( + + {provided => ( + + )} + + ))} + + + + ) : ( + + )} +
+ ); +}; + +interface LogColumnConfigurationPanelProps { + logColumnConfigurationProps: LogColumnConfigurationProps; + dragHandleProps: DragHandleProps; +} + +const LogColumnConfigurationPanel: React.FunctionComponent = props => ( + <> + + {props.logColumnConfigurationProps.type === 'timestamp' ? ( + + ) : props.logColumnConfigurationProps.type === 'message' ? ( + + ) : ( + + )} + +); + +const TimestampLogColumnConfigurationPanel: React.FunctionComponent = ({ + logColumnConfigurationProps, + dragHandleProps, +}) => ( + timestamp, + }} + /> + } + removeColumn={logColumnConfigurationProps.remove} + dragHandleProps={dragHandleProps} + /> +); + +const MessageLogColumnConfigurationPanel: React.FunctionComponent = ({ + logColumnConfigurationProps, + dragHandleProps, +}) => ( + + } + removeColumn={logColumnConfigurationProps.remove} + dragHandleProps={dragHandleProps} + /> +); + +const FieldLogColumnConfigurationPanel: React.FunctionComponent<{ + logColumnConfigurationProps: FieldLogColumnConfigurationProps; + dragHandleProps: DragHandleProps; +}> = ({ + logColumnConfigurationProps: { + logColumnConfiguration: { field }, + remove, + }, + dragHandleProps, +}) => { + const fieldLogColumnTitle = i18n.translate( + 'xpack.infra.sourceConfiguration.fieldLogColumnTitle', + { + defaultMessage: 'Field', + } + ); + return ( + + + +
+ +
+
+ {fieldLogColumnTitle} + + {field} + + + + +
+
+ ); +}; + +const ExplainedLogColumnConfigurationPanel: React.FunctionComponent<{ + fieldName: React.ReactNode; + helpText: React.ReactNode; + removeColumn: () => void; + dragHandleProps: DragHandleProps; +}> = ({ fieldName, helpText, removeColumn, dragHandleProps }) => ( + + + +
+ +
+
+ {fieldName} + + + {helpText} + + + + + +
+
+); + +const RemoveLogColumnButton: React.FunctionComponent<{ + onClick?: () => void; + columnDescription: string; +}> = ({ onClick, columnDescription }) => { + const removeColumnLabel = i18n.translate( + 'xpack.infra.sourceConfiguration.removeLogColumnButtonLabel', + { + defaultMessage: 'Remove {columnDescription} column', + values: { columnDescription }, + } + ); + + return ( + + ); +}; + +const LogColumnConfigurationEmptyPrompt: React.FunctionComponent = () => ( + + + + } + body={ +

+ +

+ } + /> +); diff --git a/x-pack/plugins/infra/public/pages/logs/settings/source_configuration_form_state.tsx b/x-pack/plugins/infra/public/pages/logs/settings/source_configuration_form_state.tsx new file mode 100644 index 00000000000000..92d70955c678f1 --- /dev/null +++ b/x-pack/plugins/infra/public/pages/logs/settings/source_configuration_form_state.tsx @@ -0,0 +1,106 @@ +/* + * 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. + */ + +import { useCallback, useMemo } from 'react'; +import { LogSourceConfigurationProperties } from '../../../containers/logs/log_source'; +import { useLogIndicesConfigurationFormState } from './indices_configuration_form_state'; +import { useLogColumnsConfigurationFormState } from './log_columns_configuration_form_state'; + +export const useLogSourceConfigurationFormState = ( + configuration?: LogSourceConfigurationProperties +) => { + const indicesConfigurationFormState = useLogIndicesConfigurationFormState({ + initialFormState: useMemo( + () => + configuration + ? { + name: configuration.name, + description: configuration.description, + logAlias: configuration.logAlias, + tiebreakerField: configuration.fields.tiebreaker, + timestampField: configuration.fields.timestamp, + } + : undefined, + [configuration] + ), + }); + + const logColumnsConfigurationFormState = useLogColumnsConfigurationFormState({ + initialFormState: useMemo( + () => + configuration + ? { + logColumns: configuration.logColumns, + } + : undefined, + [configuration] + ), + }); + + const errors = useMemo( + () => [...indicesConfigurationFormState.errors, ...logColumnsConfigurationFormState.errors], + [indicesConfigurationFormState.errors, logColumnsConfigurationFormState.errors] + ); + + const resetForm = useCallback(() => { + indicesConfigurationFormState.resetForm(); + logColumnsConfigurationFormState.resetForm(); + }, [indicesConfigurationFormState, logColumnsConfigurationFormState]); + + const isFormDirty = useMemo( + () => indicesConfigurationFormState.isFormDirty || logColumnsConfigurationFormState.isFormDirty, + [indicesConfigurationFormState.isFormDirty, logColumnsConfigurationFormState.isFormDirty] + ); + + const isFormValid = useMemo( + () => indicesConfigurationFormState.isFormValid && logColumnsConfigurationFormState.isFormValid, + [indicesConfigurationFormState.isFormValid, logColumnsConfigurationFormState.isFormValid] + ); + + const formState = useMemo( + () => ({ + name: indicesConfigurationFormState.formState.name, + description: indicesConfigurationFormState.formState.description, + logAlias: indicesConfigurationFormState.formState.logAlias, + fields: { + tiebreaker: indicesConfigurationFormState.formState.tiebreakerField, + timestamp: indicesConfigurationFormState.formState.timestampField, + }, + logColumns: logColumnsConfigurationFormState.formState.logColumns, + }), + [indicesConfigurationFormState.formState, logColumnsConfigurationFormState.formState] + ); + + const formStateChanges = useMemo( + () => ({ + name: indicesConfigurationFormState.formStateChanges.name, + description: indicesConfigurationFormState.formStateChanges.description, + logAlias: indicesConfigurationFormState.formStateChanges.logAlias, + fields: { + tiebreaker: indicesConfigurationFormState.formStateChanges.tiebreakerField, + timestamp: indicesConfigurationFormState.formStateChanges.timestampField, + }, + logColumns: logColumnsConfigurationFormState.formStateChanges.logColumns, + }), + [ + indicesConfigurationFormState.formStateChanges, + logColumnsConfigurationFormState.formStateChanges, + ] + ); + + return { + addLogColumn: logColumnsConfigurationFormState.addLogColumn, + moveLogColumn: logColumnsConfigurationFormState.moveLogColumn, + errors, + formState, + formStateChanges, + isFormDirty, + isFormValid, + indicesConfigurationProps: indicesConfigurationFormState.fieldProps, + logColumnConfigurationProps: logColumnsConfigurationFormState.logColumnConfigurationProps, + resetForm, + }; +}; diff --git a/x-pack/plugins/infra/public/pages/logs/settings/source_configuration_settings.tsx b/x-pack/plugins/infra/public/pages/logs/settings/source_configuration_settings.tsx new file mode 100644 index 00000000000000..88b1441f0ba7c1 --- /dev/null +++ b/x-pack/plugins/infra/public/pages/logs/settings/source_configuration_settings.tsx @@ -0,0 +1,193 @@ +/* + * 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. + */ + +import { + EuiButton, + EuiCallOut, + EuiFlexGroup, + EuiFlexItem, + EuiPanel, + EuiSpacer, + EuiPage, + EuiPageBody, +} from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import { FormattedMessage } from '@kbn/i18n/react'; +import React, { useCallback, useMemo } from 'react'; +import { useKibana } from '../../../../../../../src/plugins/kibana_react/public'; +import { FieldsConfigurationPanel } from './fields_configuration_panel'; +import { IndicesConfigurationPanel } from './indices_configuration_panel'; +import { NameConfigurationPanel } from '../../../components/source_configuration/name_configuration_panel'; +import { LogColumnsConfigurationPanel } from './log_columns_configuration_panel'; +import { useLogSourceConfigurationFormState } from './source_configuration_form_state'; +import { useLogSourceContext } from '../../../containers/logs/log_source'; +import { SourceLoadingPage } from '../../../components/source_loading_page'; +import { Prompt } from '../../../utils/navigation_warning_prompt'; + +export const LogsSettingsPage = () => { + const uiCapabilities = useKibana().services.application?.capabilities; + const shouldAllowEdit = uiCapabilities?.logs?.configureSource === true; + + const { + sourceConfiguration: source, + sourceStatus, + isLoading, + isUninitialized, + updateSourceConfiguration, + } = useLogSourceContext(); + + const availableFields = useMemo( + () => sourceStatus?.logIndexFields.map(field => field.name) ?? [], + [sourceStatus] + ); + + const { + addLogColumn, + moveLogColumn, + indicesConfigurationProps, + logColumnConfigurationProps, + errors, + resetForm, + isFormDirty, + isFormValid, + formStateChanges, + } = useLogSourceConfigurationFormState(source?.configuration); + + const persistUpdates = useCallback(async () => { + await updateSourceConfiguration(formStateChanges); + resetForm(); + }, [updateSourceConfiguration, resetForm, formStateChanges]); + + const isWriteable = useMemo(() => shouldAllowEdit && source && source.origin !== 'internal', [ + shouldAllowEdit, + source, + ]); + + if ((isLoading || isUninitialized) && !source) { + return ; + } + if (!source?.configuration) { + return null; + } + + return ( + <> + + + + + + + + + + + + + + + + + + + {errors.length > 0 ? ( + <> + +
    + {errors.map((error, errorIndex) => ( +
  • {error}
  • + ))} +
+
+ + + ) : null} + + + {isWriteable && ( + + {isLoading ? ( + + + + Loading + + + + ) : ( + <> + + + { + resetForm(); + }} + > + + + + + + + + + + + )} + + )} + +
+
+ + ); +}; + +const unsavedFormPromptMessage = i18n.translate( + 'xpack.infra.logSourceConfiguration.unsavedFormPromptMessage', + { + defaultMessage: 'Are you sure you want to leave? Changes will be lost', + } +); diff --git a/x-pack/plugins/infra/public/pages/logs/stream/page.tsx b/x-pack/plugins/infra/public/pages/logs/stream/page.tsx index aff0ac27c36f86..712d625052140a 100644 --- a/x-pack/plugins/infra/public/pages/logs/stream/page.tsx +++ b/x-pack/plugins/infra/public/pages/logs/stream/page.tsx @@ -5,13 +5,11 @@ */ import React from 'react'; - +import { useTrackPageview } from '../../../../../observability/public'; import { ColumnarPage } from '../../../components/page'; import { StreamPageContent } from './page_content'; import { StreamPageHeader } from './page_header'; import { LogsPageProviders } from './page_providers'; -import { PageViewLogInContext } from './page_view_log_in_context'; -import { useTrackPageview } from '../../../../../observability/public'; export const StreamPage = () => { useTrackPageview({ app: 'infra_logs', path: 'stream' }); @@ -22,7 +20,6 @@ export const StreamPage = () => { - ); }; diff --git a/x-pack/plugins/infra/public/pages/logs/stream/page_content.tsx b/x-pack/plugins/infra/public/pages/logs/stream/page_content.tsx index 010a17dae4ebdf..40ac5c74a6836f 100644 --- a/x-pack/plugins/infra/public/pages/logs/stream/page_content.tsx +++ b/x-pack/plugins/infra/public/pages/logs/stream/page_content.tsx @@ -7,21 +7,21 @@ import React from 'react'; import { SourceErrorPage } from '../../../components/source_error_page'; import { SourceLoadingPage } from '../../../components/source_loading_page'; -import { useSourceContext } from '../../../containers/source'; import { LogsPageLogsContent } from './page_logs_content'; import { LogsPageNoIndicesContent } from './page_no_indices_content'; +import { useLogSourceContext } from '../../../containers/logs/log_source'; export const StreamPageContent: React.FunctionComponent = () => { const { hasFailedLoadingSource, - isLoadingSource, + isLoading, isUninitialized, loadSource, loadSourceFailureMessage, logIndicesExist, - } = useSourceContext(); + } = useLogSourceContext(); - if (isLoadingSource || isUninitialized) { + if (isLoading || isUninitialized) { return ; } else if (hasFailedLoadingSource) { return ; diff --git a/x-pack/plugins/infra/public/pages/logs/stream/page_logs_content.tsx b/x-pack/plugins/infra/public/pages/logs/stream/page_logs_content.tsx index 3208ea24029505..85781c48f95129 100644 --- a/x-pack/plugins/infra/public/pages/logs/stream/page_logs_content.tsx +++ b/x-pack/plugins/infra/public/pages/logs/stream/page_logs_content.tsx @@ -5,32 +5,30 @@ */ import React, { useContext } from 'react'; - import { euiStyled } from '../../../../../observability/public'; import { AutoSizer } from '../../../components/auto_sizer'; import { LogEntryFlyout } from '../../../components/logging/log_entry_flyout'; import { LogMinimap } from '../../../components/logging/log_minimap'; import { ScrollableLogTextStreamView } from '../../../components/logging/log_text_stream'; import { PageContent } from '../../../components/page'; - -import { WithSummary } from '../../../containers/logs/log_summary'; -import { LogViewConfiguration } from '../../../containers/logs/log_view_configuration'; import { LogFilterState } from '../../../containers/logs/log_filter'; import { LogFlyout as LogFlyoutState, WithFlyoutOptionsUrlState, } from '../../../containers/logs/log_flyout'; +import { LogHighlightsState } from '../../../containers/logs/log_highlights'; import { LogPositionState } from '../../../containers/logs/log_position'; +import { useLogSourceContext } from '../../../containers/logs/log_source'; +import { WithSummary } from '../../../containers/logs/log_summary'; +import { LogViewConfiguration } from '../../../containers/logs/log_view_configuration'; +import { ViewLogInContext } from '../../../containers/logs/view_log_in_context'; import { WithLogTextviewUrlState } from '../../../containers/logs/with_log_textview'; import { WithStreamItems } from '../../../containers/logs/with_stream_items'; -import { Source } from '../../../containers/source'; - import { LogsToolbar } from './page_toolbar'; -import { LogHighlightsState } from '../../../containers/logs/log_highlights'; -import { ViewLogInContext } from '../../../containers/logs/view_log_in_context'; +import { PageViewLogInContext } from './page_view_log_in_context'; export const LogsPageLogsContent: React.FunctionComponent = () => { - const { source, sourceId, version } = useContext(Source.Context); + const { sourceConfiguration, sourceId } = useLogSourceContext(); const { textScale, textWrap } = useContext(LogViewConfiguration.Context); const { setFlyoutVisibility, @@ -64,6 +62,7 @@ export const LogsPageLogsContent: React.FunctionComponent = () => { + {flyoutVisible ? ( { loading={isLoading} /> ) : null} - + {({ currentHighlightKey, @@ -91,7 +90,9 @@ export const LogsPageLogsContent: React.FunctionComponent = () => { checkForNewEntries, }) => ( { - const { createDerivedIndexPattern } = useContext(Source.Context); - const derivedIndexPattern = createDerivedIndexPattern('logs'); + const { derivedIndexPattern } = useLogSourceContext(); return ( @@ -29,7 +27,7 @@ const LogFilterStateProvider: React.FC = ({ children }) => { const ViewLogInContextProvider: React.FC = ({ children }) => { const { startTimestamp, endTimestamp } = useContext(LogPositionState.Context); - const { sourceId } = useContext(Source.Context); + const { sourceId } = useLogSourceContext(); if (!startTimestamp || !endTimestamp) { return null; @@ -47,7 +45,7 @@ const ViewLogInContextProvider: React.FC = ({ children }) => { }; const LogEntriesStateProvider: React.FC = ({ children }) => { - const { sourceId } = useContext(Source.Context); + const { sourceId } = useLogSourceContext(); const { startTimestamp, endTimestamp, @@ -89,13 +87,13 @@ const LogEntriesStateProvider: React.FC = ({ children }) => { }; const LogHighlightsStateProvider: React.FC = ({ children }) => { - const { sourceId, version } = useContext(Source.Context); + const { sourceId, sourceConfiguration } = useLogSourceContext(); const [{ topCursor, bottomCursor, centerCursor, entries }] = useContext(LogEntriesState.Context); const { filterQuery } = useContext(LogFilterState.Context); const highlightsProps = { sourceId, - sourceVersion: version, + sourceVersion: sourceConfiguration?.version, entriesStart: topCursor, entriesEnd: bottomCursor, centerCursor, @@ -106,6 +104,13 @@ const LogHighlightsStateProvider: React.FC = ({ children }) => { }; export const LogsPageProviders: React.FunctionComponent = ({ children }) => { + const { logIndicesExist } = useLogSourceContext(); + + // The providers assume the source is loaded, so short-circuit them otherwise + if (!logIndicesExist) { + return <>{children}; + } + return ( diff --git a/x-pack/plugins/infra/public/pages/logs/stream/page_toolbar.tsx b/x-pack/plugins/infra/public/pages/logs/stream/page_toolbar.tsx index 2f9a76fd47490b..9667272eb24179 100644 --- a/x-pack/plugins/infra/public/pages/logs/stream/page_toolbar.tsx +++ b/x-pack/plugins/infra/public/pages/logs/stream/page_toolbar.tsx @@ -19,13 +19,12 @@ import { LogFlyout } from '../../../containers/logs/log_flyout'; import { LogViewConfiguration } from '../../../containers/logs/log_view_configuration'; import { LogFilterState } from '../../../containers/logs/log_filter'; import { LogPositionState } from '../../../containers/logs/log_position'; -import { Source } from '../../../containers/source'; import { WithKueryAutocompletion } from '../../../containers/with_kuery_autocompletion'; import { LogDatepicker } from '../../../components/logging/log_datepicker'; +import { useLogSourceContext } from '../../../containers/logs/log_source'; export const LogsToolbar = () => { - const { createDerivedIndexPattern } = useContext(Source.Context); - const derivedIndexPattern = createDerivedIndexPattern('logs'); + const { derivedIndexPattern } = useLogSourceContext(); const { availableTextScales, setTextScale, setTextWrap, textScale, textWrap } = useContext( LogViewConfiguration.Context ); diff --git a/x-pack/plugins/infra/public/pages/logs/stream/page_view_log_in_context.tsx b/x-pack/plugins/infra/public/pages/logs/stream/page_view_log_in_context.tsx index fdfc16d6a9beff..9e0f7d5035aaf4 100644 --- a/x-pack/plugins/infra/public/pages/logs/stream/page_view_log_in_context.tsx +++ b/x-pack/plugins/infra/public/pages/logs/stream/page_view_log_in_context.tsx @@ -4,32 +4,32 @@ * you may not use this file except in compliance with the Elastic License. */ -import React, { useContext, useCallback, useMemo } from 'react'; -import { noop } from 'lodash'; import { - EuiOverlayMask, + EuiFlexGroup, + EuiFlexItem, EuiModal, EuiModalBody, + EuiOverlayMask, EuiText, EuiTextColor, - EuiFlexGroup, - EuiFlexItem, EuiToolTip, } from '@elastic/eui'; -import { ViewLogInContext } from '../../../containers/logs/view_log_in_context'; +import { noop } from 'lodash'; +import React, { useCallback, useContext, useMemo } from 'react'; import { LogEntry } from '../../../../common/http_api'; -import { Source } from '../../../containers/source'; -import { LogViewConfiguration } from '../../../containers/logs/log_view_configuration'; import { ScrollableLogTextStreamView } from '../../../components/logging/log_text_stream'; +import { useLogSourceContext } from '../../../containers/logs/log_source'; +import { LogViewConfiguration } from '../../../containers/logs/log_view_configuration'; +import { ViewLogInContext } from '../../../containers/logs/view_log_in_context'; import { useViewportDimensions } from '../../../utils/use_viewport_dimensions'; const MODAL_MARGIN = 25; export const PageViewLogInContext: React.FC = () => { - const { source } = useContext(Source.Context); + const { sourceConfiguration } = useLogSourceContext(); const { textScale, textWrap } = useContext(LogViewConfiguration.Context); - const columnConfigurations = useMemo(() => (source && source.configuration.logColumns) || [], [ - source, + const columnConfigurations = useMemo(() => sourceConfiguration?.configuration.logColumns ?? [], [ + sourceConfiguration, ]); const [{ contextEntry, entries, isLoading }, { setContextEntry }] = useContext( ViewLogInContext.Context diff --git a/x-pack/plugins/infra/server/infra_server.ts b/x-pack/plugins/infra/server/infra_server.ts index 88b78dfd3e41c3..4ed30380dc164d 100644 --- a/x-pack/plugins/infra/server/infra_server.ts +++ b/x-pack/plugins/infra/server/infra_server.ts @@ -29,6 +29,7 @@ import { initLogEntriesItemRoute, } from './routes/log_entries'; import { initInventoryMetaRoute } from './routes/inventory_metadata'; +import { initLogSourceConfigurationRoutes, initLogSourceStatusRoutes } from './routes/log_sources'; import { initSourceRoute } from './routes/source'; export const initInfraServer = (libs: InfraBackendLibs) => { @@ -59,4 +60,6 @@ export const initInfraServer = (libs: InfraBackendLibs) => { initMetricExplorerRoute(libs); initMetadataRoute(libs); initInventoryMetaRoute(libs); + initLogSourceConfigurationRoutes(libs); + initLogSourceStatusRoutes(libs); }; diff --git a/x-pack/plugins/infra/server/lib/adapters/framework/kibana_framework_adapter.ts b/x-pack/plugins/infra/server/lib/adapters/framework/kibana_framework_adapter.ts index eda1fbfa5f4ce1..eed7d39b8e74ae 100644 --- a/x-pack/plugins/infra/server/lib/adapters/framework/kibana_framework_adapter.ts +++ b/x-pack/plugins/infra/server/lib/adapters/framework/kibana_framework_adapter.ts @@ -70,6 +70,9 @@ export class KibanaFramework { case 'put': this.router.put(routeConfig, handler); break; + case 'patch': + this.router.patch(routeConfig, handler); + break; } } diff --git a/x-pack/plugins/infra/server/lib/domains/fields_domain.ts b/x-pack/plugins/infra/server/lib/domains/fields_domain.ts index b6837e5b769a6f..ecbc71f4895c79 100644 --- a/x-pack/plugins/infra/server/lib/domains/fields_domain.ts +++ b/x-pack/plugins/infra/server/lib/domains/fields_domain.ts @@ -29,9 +29,10 @@ export class InfraFieldsDomain { const fields = await this.adapter.getIndexFields( requestContext, - `${includeMetricIndices ? configuration.metricAlias : ''},${ - includeLogIndices ? configuration.logAlias : '' - }` + [ + ...(includeMetricIndices ? [configuration.metricAlias] : []), + ...(includeLogIndices ? [configuration.logAlias] : []), + ].join(',') ); return fields; diff --git a/x-pack/plugins/infra/server/routes/log_sources/configuration.ts b/x-pack/plugins/infra/server/routes/log_sources/configuration.ts new file mode 100644 index 00000000000000..0ce594675773c2 --- /dev/null +++ b/x-pack/plugins/infra/server/routes/log_sources/configuration.ts @@ -0,0 +1,114 @@ +/* + * 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. + */ + +import Boom from 'boom'; +import { + getLogSourceConfigurationRequestParamsRT, + getLogSourceConfigurationSuccessResponsePayloadRT, + LOG_SOURCE_CONFIGURATION_PATH, + patchLogSourceConfigurationRequestBodyRT, + patchLogSourceConfigurationRequestParamsRT, + patchLogSourceConfigurationSuccessResponsePayloadRT, +} from '../../../common/http_api/log_sources'; +import { createValidationFunction } from '../../../common/runtime_types'; +import { InfraBackendLibs } from '../../lib/infra_types'; + +export const initLogSourceConfigurationRoutes = ({ framework, sources }: InfraBackendLibs) => { + framework.registerRoute( + { + method: 'get', + path: LOG_SOURCE_CONFIGURATION_PATH, + validate: { + params: createValidationFunction(getLogSourceConfigurationRequestParamsRT), + }, + }, + framework.router.handleLegacyErrors(async (requestContext, request, response) => { + const { sourceId } = request.params; + + try { + const sourceConfiguration = await sources.getSourceConfiguration( + requestContext.core.savedObjects.client, + sourceId + ); + + return response.ok({ + body: getLogSourceConfigurationSuccessResponsePayloadRT.encode({ + data: sourceConfiguration, + }), + }); + } catch (error) { + if (Boom.isBoom(error)) { + throw error; + } + + return response.customError({ + statusCode: error.statusCode ?? 500, + body: { + message: error.message ?? 'An unexpected error occurred', + }, + }); + } + }) + ); + + framework.registerRoute( + { + method: 'patch', + path: LOG_SOURCE_CONFIGURATION_PATH, + validate: { + params: createValidationFunction(patchLogSourceConfigurationRequestParamsRT), + body: createValidationFunction(patchLogSourceConfigurationRequestBodyRT), + }, + }, + framework.router.handleLegacyErrors(async (requestContext, request, response) => { + const { sourceId } = request.params; + const { data: patchedSourceConfigurationProperties } = request.body; + + try { + const sourceConfiguration = await sources.getSourceConfiguration( + requestContext.core.savedObjects.client, + sourceId + ); + + if (sourceConfiguration.origin === 'internal') { + response.conflict({ + body: 'A conflicting read-only source configuration already exists.', + }); + } + + const sourceConfigurationExists = sourceConfiguration.origin === 'stored'; + const patchedSourceConfiguration = await (sourceConfigurationExists + ? sources.updateSourceConfiguration( + requestContext, + sourceId, + patchedSourceConfigurationProperties + ) + : sources.createSourceConfiguration( + requestContext, + sourceId, + patchedSourceConfigurationProperties + )); + + return response.ok({ + body: patchLogSourceConfigurationSuccessResponsePayloadRT.encode({ + data: patchedSourceConfiguration, + }), + }); + } catch (error) { + if (Boom.isBoom(error)) { + throw error; + } + + return response.customError({ + statusCode: error.statusCode ?? 500, + body: { + message: error.message ?? 'An unexpected error occurred', + }, + }); + } + }) + ); +}; diff --git a/x-pack/plugins/infra/server/routes/log_sources/index.ts b/x-pack/plugins/infra/server/routes/log_sources/index.ts new file mode 100644 index 00000000000000..5b68152b329efc --- /dev/null +++ b/x-pack/plugins/infra/server/routes/log_sources/index.ts @@ -0,0 +1,8 @@ +/* + * 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 * from './configuration'; +export * from './status'; diff --git a/x-pack/plugins/infra/server/routes/log_sources/status.ts b/x-pack/plugins/infra/server/routes/log_sources/status.ts new file mode 100644 index 00000000000000..cdd053d2bb10ae --- /dev/null +++ b/x-pack/plugins/infra/server/routes/log_sources/status.ts @@ -0,0 +1,62 @@ +/* + * 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. + */ + +import Boom from 'boom'; +import { + getLogSourceStatusRequestParamsRT, + getLogSourceStatusSuccessResponsePayloadRT, + LOG_SOURCE_STATUS_PATH, +} from '../../../common/http_api/log_sources'; +import { createValidationFunction } from '../../../common/runtime_types'; +import { InfraIndexType } from '../../graphql/types'; +import { InfraBackendLibs } from '../../lib/infra_types'; + +export const initLogSourceStatusRoutes = ({ + framework, + sourceStatus, + fields, +}: InfraBackendLibs) => { + framework.registerRoute( + { + method: 'get', + path: LOG_SOURCE_STATUS_PATH, + validate: { + params: createValidationFunction(getLogSourceStatusRequestParamsRT), + }, + }, + framework.router.handleLegacyErrors(async (requestContext, request, response) => { + const { sourceId } = request.params; + + try { + const logIndexNames = await sourceStatus.getLogIndexNames(requestContext, sourceId); + const logIndexFields = + logIndexNames.length > 0 + ? await fields.getFields(requestContext, sourceId, InfraIndexType.LOGS) + : []; + + return response.ok({ + body: getLogSourceStatusSuccessResponsePayloadRT.encode({ + data: { + logIndexFields, + logIndexNames, + }, + }), + }); + } catch (error) { + if (Boom.isBoom(error)) { + throw error; + } + + return response.customError({ + statusCode: error.statusCode ?? 500, + body: { + message: error.message ?? 'An unexpected error occurred', + }, + }); + } + }) + ); +}; diff --git a/x-pack/plugins/ingest_manager/common/services/datasource_to_agent_datasource.test.ts b/x-pack/plugins/ingest_manager/common/services/datasource_to_agent_datasource.test.ts index 17509571f19853..a7d4e36d16f2ad 100644 --- a/x-pack/plugins/ingest_manager/common/services/datasource_to_agent_datasource.test.ts +++ b/x-pack/plugins/ingest_manager/common/services/datasource_to_agent_datasource.test.ts @@ -26,7 +26,7 @@ describe('Ingest Manager - storedDatasourceToAgentDatasource', () => { const mockInput: DatasourceInput = { type: 'test-logs', enabled: true, - config: { + vars: { inputVar: { value: 'input-value' }, inputVar2: { value: undefined }, inputVar3: { @@ -40,11 +40,11 @@ describe('Ingest Manager - storedDatasourceToAgentDatasource', () => { id: 'test-logs-foo', enabled: true, dataset: 'foo', - config: { + vars: { fooVar: { value: 'foo-value' }, fooVar2: { value: [1, 2] }, }, - pkg_stream: { + agent_stream: { fooKey: 'fooValue1', fooKey2: ['fooValue2'], }, @@ -53,7 +53,7 @@ describe('Ingest Manager - storedDatasourceToAgentDatasource', () => { id: 'test-logs-bar', enabled: true, dataset: 'bar', - config: { + vars: { barVar: { value: 'bar-value' }, barVar2: { value: [1, 2] }, barVar3: { diff --git a/x-pack/plugins/ingest_manager/common/services/datasource_to_agent_datasource.ts b/x-pack/plugins/ingest_manager/common/services/datasource_to_agent_datasource.ts index 9e09d3fa3153a0..5deb33ccf10f1b 100644 --- a/x-pack/plugins/ingest_manager/common/services/datasource_to_agent_datasource.ts +++ b/x-pack/plugins/ingest_manager/common/services/datasource_to_agent_datasource.ts @@ -22,18 +22,28 @@ export const storedDatasourceToAgentDatasource = ( .map(input => { const fullInput = { ...input, + ...Object.entries(input.config || {}).reduce((acc, [key, { value }]) => { + acc[key] = value; + return acc; + }, {} as { [k: string]: any }), streams: input.streams .filter(stream => stream.enabled) .map(stream => { const fullStream = { ...stream, - ...stream.pkg_stream, + ...stream.agent_stream, + ...Object.entries(stream.config || {}).reduce((acc, [key, { value }]) => { + acc[key] = value; + return acc; + }, {} as { [k: string]: any }), }; - delete fullStream.pkg_stream; + delete fullStream.agent_stream; + delete fullStream.vars; delete fullStream.config; return fullStream; }), }; + delete fullInput.vars; delete fullInput.config; return fullInput; }), diff --git a/x-pack/plugins/ingest_manager/common/services/package_to_config.test.ts b/x-pack/plugins/ingest_manager/common/services/package_to_config.test.ts index 5fa7af2dda79ab..cb290e61b17e51 100644 --- a/x-pack/plugins/ingest_manager/common/services/package_to_config.test.ts +++ b/x-pack/plugins/ingest_manager/common/services/package_to_config.test.ts @@ -132,7 +132,7 @@ describe('Ingest Manager - packageToConfig', () => { id: 'foo-foo', enabled: true, dataset: 'foo', - config: { 'var-name': { value: 'foo-var-value' } }, + vars: { 'var-name': { value: 'foo-var-value' } }, }, ], }, @@ -144,13 +144,13 @@ describe('Ingest Manager - packageToConfig', () => { id: 'bar-bar', enabled: true, dataset: 'bar', - config: { 'var-name': { type: 'text', value: 'bar-var-value' } }, + vars: { 'var-name': { type: 'text', value: 'bar-var-value' } }, }, { id: 'bar-bar2', enabled: true, dataset: 'bar2', - config: { 'var-name': { type: 'yaml', value: 'bar2-var-value' } }, + vars: { 'var-name': { type: 'yaml', value: 'bar2-var-value' } }, }, ], }, @@ -205,7 +205,7 @@ describe('Ingest Manager - packageToConfig', () => { { type: 'foo', enabled: true, - config: { + vars: { 'foo-input-var-name': { value: 'foo-input-var-value' }, 'foo-input2-var-name': { value: 'foo-input2-var-value' }, 'foo-input3-var-name': { value: undefined }, @@ -215,7 +215,7 @@ describe('Ingest Manager - packageToConfig', () => { id: 'foo-foo', enabled: true, dataset: 'foo', - config: { + vars: { 'var-name': { value: 'foo-var-value' }, }, }, @@ -224,7 +224,7 @@ describe('Ingest Manager - packageToConfig', () => { { type: 'bar', enabled: true, - config: { + vars: { 'bar-input-var-name': { value: ['value1', 'value2'] }, 'bar-input2-var-name': { value: 123456 }, }, @@ -233,7 +233,7 @@ describe('Ingest Manager - packageToConfig', () => { id: 'bar-bar', enabled: true, dataset: 'bar', - config: { + vars: { 'var-name': { value: 'bar-var-value' }, }, }, @@ -241,7 +241,7 @@ describe('Ingest Manager - packageToConfig', () => { id: 'bar-bar2', enabled: true, dataset: 'bar2', - config: { + vars: { 'var-name': { value: 'bar2-var-value' }, }, }, @@ -255,7 +255,7 @@ describe('Ingest Manager - packageToConfig', () => { id: 'with-disabled-streams-disabled', enabled: false, dataset: 'disabled', - config: { + vars: { 'var-name': { value: [] }, }, }, diff --git a/x-pack/plugins/ingest_manager/common/services/package_to_config.ts b/x-pack/plugins/ingest_manager/common/services/package_to_config.ts index fa3479a69e39d9..e7a912ddf1741d 100644 --- a/x-pack/plugins/ingest_manager/common/services/package_to_config.ts +++ b/x-pack/plugins/ingest_manager/common/services/package_to_config.ts @@ -53,7 +53,7 @@ export const packageToConfigDatasourceInputs = (packageInfo: PackageInfo): Datas dataset: packageStream.dataset, }; if (packageStream.vars && packageStream.vars.length) { - stream.config = packageStream.vars.reduce(varsReducer, {}); + stream.vars = packageStream.vars.reduce(varsReducer, {}); } return stream; }) @@ -66,7 +66,7 @@ export const packageToConfigDatasourceInputs = (packageInfo: PackageInfo): Datas }; if (packageInput.vars && packageInput.vars.length) { - input.config = packageInput.vars.reduce(varsReducer, {}); + input.vars = packageInput.vars.reduce(varsReducer, {}); } inputs.push(input); diff --git a/x-pack/plugins/ingest_manager/common/types/models/datasource.ts b/x-pack/plugins/ingest_manager/common/types/models/datasource.ts index 48243a12120f98..885e0a9316d793 100644 --- a/x-pack/plugins/ingest_manager/common/types/models/datasource.ts +++ b/x-pack/plugins/ingest_manager/common/types/models/datasource.ts @@ -23,7 +23,8 @@ export interface DatasourceInputStream { dataset: string; processors?: string[]; config?: DatasourceConfigRecord; - pkg_stream?: any; + vars?: DatasourceConfigRecord; + agent_stream?: any; } export interface DatasourceInput { @@ -31,6 +32,7 @@ export interface DatasourceInput { enabled: boolean; processors?: string[]; config?: DatasourceConfigRecord; + vars?: DatasourceConfigRecord; streams: DatasourceInputStream[]; } diff --git a/x-pack/plugins/ingest_manager/common/types/models/epm.ts b/x-pack/plugins/ingest_manager/common/types/models/epm.ts index c750aa99204fa9..fb6bf235d1e26b 100644 --- a/x-pack/plugins/ingest_manager/common/types/models/epm.ts +++ b/x-pack/plugins/ingest_manager/common/types/models/epm.ts @@ -32,6 +32,7 @@ export enum KibanaAssetType { } export enum ElasticsearchAssetType { + componentTemplate = 'component-template', ingestPipeline = 'ingest-pipeline', indexTemplate = 'index-template', ilmPolicy = 'ilm-policy', @@ -246,6 +247,7 @@ export enum IngestAssetType { DataFrameTransform = 'data-frame-transform', IlmPolicy = 'ilm-policy', IndexTemplate = 'index-template', + ComponentTemplate = 'component-template', IngestPipeline = 'ingest-pipeline', MlJob = 'ml-job', RollupJob = 'rollup-job', @@ -261,12 +263,17 @@ export interface IndexTemplateMappings { properties: any; } +// This is an index template v2, see https://github.com/elastic/elasticsearch/issues/53101 +// until "proper" documentation of the new format is available. +// Ingest Manager does not use nor support the legacy index template v1 format at all export interface IndexTemplate { - order: number; + priority: number; index_patterns: string[]; - settings: any; - mappings: object; - aliases: object; + template: { + settings: any; + mappings: object; + aliases: object; + }; } export interface TemplateRef { diff --git a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/agent_config/create_datasource_page/components/datasource_input_config.tsx b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/agent_config/create_datasource_page/components/datasource_input_config.tsx index 0e8763cb2d4c09..36e987d0076797 100644 --- a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/agent_config/create_datasource_page/components/datasource_input_config.tsx +++ b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/agent_config/create_datasource_page/components/datasource_input_config.tsx @@ -97,7 +97,7 @@ export const DatasourceInputConfig: React.FunctionComponent<{ {requiredVars.map(varDef => { const { name: varName, type: varType } = varDef; - const value = datasourceInput.config![varName].value; + const value = datasourceInput.vars![varName].value; return ( { updateDatasourceInput({ - config: { - ...datasourceInput.config, + vars: { + ...datasourceInput.vars, [varName]: { type: varType, value: newValue, @@ -114,7 +114,7 @@ export const DatasourceInputConfig: React.FunctionComponent<{ }, }); }} - errors={inputVarsValidationResults.config![varName]} + errors={inputVarsValidationResults.vars![varName]} forceShowErrors={forceShowErrors} /> @@ -141,7 +141,7 @@ export const DatasourceInputConfig: React.FunctionComponent<{ {isShowingAdvanced ? advancedVars.map(varDef => { const { name: varName, type: varType } = varDef; - const value = datasourceInput.config![varName].value; + const value = datasourceInput.vars![varName].value; return ( { updateDatasourceInput({ - config: { - ...datasourceInput.config, + vars: { + ...datasourceInput.vars, [varName]: { type: varType, value: newValue, @@ -158,7 +158,7 @@ export const DatasourceInputConfig: React.FunctionComponent<{ }, }); }} - errors={inputVarsValidationResults.config![varName]} + errors={inputVarsValidationResults.vars![varName]} forceShowErrors={forceShowErrors} /> diff --git a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/agent_config/create_datasource_page/components/datasource_input_panel.tsx b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/agent_config/create_datasource_page/components/datasource_input_panel.tsx index 6b0c68ccb7d3fa..586fc6b1d41389 100644 --- a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/agent_config/create_datasource_page/components/datasource_input_panel.tsx +++ b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/agent_config/create_datasource_page/components/datasource_input_panel.tsx @@ -158,7 +158,7 @@ export const DatasourceInputPanel: React.FunctionComponent<{ packageInputVars={packageInput.vars} datasourceInput={datasourceInput} updateDatasourceInput={updateDatasourceInput} - inputVarsValidationResults={{ config: inputValidationResults.config }} + inputVarsValidationResults={{ vars: inputValidationResults.vars }} forceShowErrors={forceShowErrors} /> diff --git a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/agent_config/create_datasource_page/components/datasource_input_stream_config.tsx b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/agent_config/create_datasource_page/components/datasource_input_stream_config.tsx index 43e8f5a2c060db..7e32936a6fffa0 100644 --- a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/agent_config/create_datasource_page/components/datasource_input_stream_config.tsx +++ b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/agent_config/create_datasource_page/components/datasource_input_stream_config.tsx @@ -101,7 +101,7 @@ export const DatasourceInputStreamConfig: React.FunctionComponent<{ {requiredVars.map(varDef => { const { name: varName, type: varType } = varDef; - const value = datasourceInputStream.config![varName].value; + const value = datasourceInputStream.vars![varName].value; return ( { updateDatasourceInputStream({ - config: { - ...datasourceInputStream.config, + vars: { + ...datasourceInputStream.vars, [varName]: { type: varType, value: newValue, @@ -118,7 +118,7 @@ export const DatasourceInputStreamConfig: React.FunctionComponent<{ }, }); }} - errors={inputStreamValidationResults.config![varName]} + errors={inputStreamValidationResults.vars![varName]} forceShowErrors={forceShowErrors} /> @@ -145,7 +145,7 @@ export const DatasourceInputStreamConfig: React.FunctionComponent<{ {isShowingAdvanced ? advancedVars.map(varDef => { const { name: varName, type: varType } = varDef; - const value = datasourceInputStream.config![varName].value; + const value = datasourceInputStream.vars![varName].value; return ( { updateDatasourceInputStream({ - config: { - ...datasourceInputStream.config, + vars: { + ...datasourceInputStream.vars, [varName]: { type: varType, value: newValue, @@ -162,7 +162,7 @@ export const DatasourceInputStreamConfig: React.FunctionComponent<{ }, }); }} - errors={inputStreamValidationResults.config![varName]} + errors={inputStreamValidationResults.vars![varName]} forceShowErrors={forceShowErrors} /> diff --git a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/agent_config/create_datasource_page/services/validate_datasource.test.ts b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/agent_config/create_datasource_page/services/validate_datasource.test.ts index a45fabeb5ed6a3..b970a7d2220019 100644 --- a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/agent_config/create_datasource_page/services/validate_datasource.test.ts +++ b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/agent_config/create_datasource_page/services/validate_datasource.test.ts @@ -120,7 +120,7 @@ describe('Ingest Manager - validateDatasource()', () => { { type: 'foo', enabled: true, - config: { + vars: { 'foo-input-var-name': { value: 'foo-input-var-value', type: 'text' }, 'foo-input2-var-name': { value: 'foo-input2-var-value', type: 'text' }, 'foo-input3-var-name': { value: ['test'], type: 'text' }, @@ -130,14 +130,14 @@ describe('Ingest Manager - validateDatasource()', () => { id: 'foo-foo', dataset: 'foo', enabled: true, - config: { 'var-name': { value: 'test_yaml: value', type: 'yaml' } }, + vars: { 'var-name': { value: 'test_yaml: value', type: 'yaml' } }, }, ], }, { type: 'bar', enabled: true, - config: { + vars: { 'bar-input-var-name': { value: ['value1', 'value2'], type: 'text' }, 'bar-input2-var-name': { value: 'test', type: 'text' }, }, @@ -146,13 +146,13 @@ describe('Ingest Manager - validateDatasource()', () => { id: 'bar-bar', dataset: 'bar', enabled: true, - config: { 'var-name': { value: 'test_yaml: value', type: 'yaml' } }, + vars: { 'var-name': { value: 'test_yaml: value', type: 'yaml' } }, }, { id: 'bar-bar2', dataset: 'bar2', enabled: true, - config: { 'var-name': { value: undefined, type: 'text' } }, + vars: { 'var-name': { value: undefined, type: 'text' } }, }, ], }, @@ -169,7 +169,7 @@ describe('Ingest Manager - validateDatasource()', () => { id: 'with-disabled-streams-disabled', dataset: 'disabled', enabled: false, - config: { 'var-name': { value: undefined, type: 'text' } }, + vars: { 'var-name': { value: undefined, type: 'text' } }, }, { id: 'with-disabled-streams-disabled2', @@ -188,7 +188,7 @@ describe('Ingest Manager - validateDatasource()', () => { { type: 'foo', enabled: true, - config: { + vars: { 'foo-input-var-name': { value: undefined, type: 'text' }, 'foo-input2-var-name': { value: '', type: 'text' }, 'foo-input3-var-name': { value: [], type: 'text' }, @@ -198,14 +198,14 @@ describe('Ingest Manager - validateDatasource()', () => { id: 'foo-foo', dataset: 'foo', enabled: true, - config: { 'var-name': { value: 'invalidyaml: test\n foo bar:', type: 'yaml' } }, + vars: { 'var-name': { value: 'invalidyaml: test\n foo bar:', type: 'yaml' } }, }, ], }, { type: 'bar', enabled: true, - config: { + vars: { 'bar-input-var-name': { value: 'invalid value for multi', type: 'text' }, 'bar-input2-var-name': { value: undefined, type: 'text' }, }, @@ -214,13 +214,13 @@ describe('Ingest Manager - validateDatasource()', () => { id: 'bar-bar', dataset: 'bar', enabled: true, - config: { 'var-name': { value: ' \n\n', type: 'yaml' } }, + vars: { 'var-name': { value: ' \n\n', type: 'yaml' } }, }, { id: 'bar-bar2', dataset: 'bar2', enabled: true, - config: { 'var-name': { value: undefined, type: 'text' } }, + vars: { 'var-name': { value: undefined, type: 'text' } }, }, ], }, @@ -237,7 +237,7 @@ describe('Ingest Manager - validateDatasource()', () => { id: 'with-disabled-streams-disabled', dataset: 'disabled', enabled: false, - config: { + vars: { 'var-name': { value: 'invalid value but not checked due to not enabled', type: 'text', @@ -259,22 +259,22 @@ describe('Ingest Manager - validateDatasource()', () => { description: null, inputs: { foo: { - config: { + vars: { 'foo-input-var-name': null, 'foo-input2-var-name': null, 'foo-input3-var-name': null, }, - streams: { 'foo-foo': { config: { 'var-name': null } } }, + streams: { 'foo-foo': { vars: { 'var-name': null } } }, }, bar: { - config: { 'bar-input-var-name': null, 'bar-input2-var-name': null }, + vars: { 'bar-input-var-name': null, 'bar-input2-var-name': null }, streams: { - 'bar-bar': { config: { 'var-name': null } }, - 'bar-bar2': { config: { 'var-name': null } }, + 'bar-bar': { vars: { 'var-name': null } }, + 'bar-bar2': { vars: { 'var-name': null } }, }, }, 'with-disabled-streams': { - streams: { 'with-disabled-streams-disabled': { config: { 'var-name': null } } }, + streams: { 'with-disabled-streams-disabled': { vars: { 'var-name': null } } }, }, }, }; @@ -289,25 +289,25 @@ describe('Ingest Manager - validateDatasource()', () => { description: null, inputs: { foo: { - config: { + vars: { 'foo-input-var-name': null, 'foo-input2-var-name': ['foo-input2-var-name is required'], 'foo-input3-var-name': ['foo-input3-var-name is required'], }, - streams: { 'foo-foo': { config: { 'var-name': ['Invalid YAML format'] } } }, + streams: { 'foo-foo': { vars: { 'var-name': ['Invalid YAML format'] } } }, }, bar: { - config: { + vars: { 'bar-input-var-name': ['Invalid format'], 'bar-input2-var-name': ['bar-input2-var-name is required'], }, streams: { - 'bar-bar': { config: { 'var-name': ['var-name is required'] } }, - 'bar-bar2': { config: { 'var-name': null } }, + 'bar-bar': { vars: { 'var-name': ['var-name is required'] } }, + 'bar-bar2': { vars: { 'var-name': null } }, }, }, 'with-disabled-streams': { - streams: { 'with-disabled-streams-disabled': { config: { 'var-name': null } } }, + streams: { 'with-disabled-streams-disabled': { vars: { 'var-name': null } } }, }, }, }); @@ -336,25 +336,25 @@ describe('Ingest Manager - validateDatasource()', () => { description: null, inputs: { foo: { - config: { + vars: { 'foo-input-var-name': null, 'foo-input2-var-name': ['foo-input2-var-name is required'], 'foo-input3-var-name': ['foo-input3-var-name is required'], }, - streams: { 'foo-foo': { config: { 'var-name': null } } }, + streams: { 'foo-foo': { vars: { 'var-name': null } } }, }, bar: { - config: { + vars: { 'bar-input-var-name': ['Invalid format'], 'bar-input2-var-name': ['bar-input2-var-name is required'], }, streams: { - 'bar-bar': { config: { 'var-name': null } }, - 'bar-bar2': { config: { 'var-name': null } }, + 'bar-bar': { vars: { 'var-name': null } }, + 'bar-bar2': { vars: { 'var-name': null } }, }, }, 'with-disabled-streams': { - streams: { 'with-disabled-streams-disabled': { config: { 'var-name': null } } }, + streams: { 'with-disabled-streams-disabled': { vars: { 'var-name': null } } }, }, }, }); @@ -411,7 +411,7 @@ describe('Ingest Manager - validationHasErrors()', () => { it('returns true for stream validation results with errors', () => { expect( validationHasErrors({ - config: { foo: ['foo error'], bar: null }, + vars: { foo: ['foo error'], bar: null }, }) ).toBe(true); }); @@ -419,7 +419,7 @@ describe('Ingest Manager - validationHasErrors()', () => { it('returns false for stream validation results with no errors', () => { expect( validationHasErrors({ - config: { foo: null, bar: null }, + vars: { foo: null, bar: null }, }) ).toBe(false); }); @@ -427,14 +427,14 @@ describe('Ingest Manager - validationHasErrors()', () => { it('returns true for input validation results with errors', () => { expect( validationHasErrors({ - config: { foo: ['foo error'], bar: null }, - streams: { stream1: { config: { foo: null, bar: null } } }, + vars: { foo: ['foo error'], bar: null }, + streams: { stream1: { vars: { foo: null, bar: null } } }, }) ).toBe(true); expect( validationHasErrors({ - config: { foo: null, bar: null }, - streams: { stream1: { config: { foo: ['foo error'], bar: null } } }, + vars: { foo: null, bar: null }, + streams: { stream1: { vars: { foo: ['foo error'], bar: null } } }, }) ).toBe(true); }); @@ -442,8 +442,8 @@ describe('Ingest Manager - validationHasErrors()', () => { it('returns false for input validation results with no errors', () => { expect( validationHasErrors({ - config: { foo: null, bar: null }, - streams: { stream1: { config: { foo: null, bar: null } } }, + vars: { foo: null, bar: null }, + streams: { stream1: { vars: { foo: null, bar: null } } }, }) ).toBe(false); }); @@ -455,8 +455,8 @@ describe('Ingest Manager - validationHasErrors()', () => { description: null, inputs: { input1: { - config: { foo: null, bar: null }, - streams: { stream1: { config: { foo: null, bar: null } } }, + vars: { foo: null, bar: null }, + streams: { stream1: { vars: { foo: null, bar: null } } }, }, }, }) @@ -467,8 +467,8 @@ describe('Ingest Manager - validationHasErrors()', () => { description: null, inputs: { input1: { - config: { foo: ['foo error'], bar: null }, - streams: { stream1: { config: { foo: null, bar: null } } }, + vars: { foo: ['foo error'], bar: null }, + streams: { stream1: { vars: { foo: null, bar: null } } }, }, }, }) @@ -479,8 +479,8 @@ describe('Ingest Manager - validationHasErrors()', () => { description: null, inputs: { input1: { - config: { foo: null, bar: null }, - streams: { stream1: { config: { foo: ['foo error'], bar: null } } }, + vars: { foo: null, bar: null }, + streams: { stream1: { vars: { foo: ['foo error'], bar: null } } }, }, }, }) @@ -494,8 +494,8 @@ describe('Ingest Manager - validationHasErrors()', () => { description: null, inputs: { input1: { - config: { foo: null, bar: null }, - streams: { stream1: { config: { foo: null, bar: null } } }, + vars: { foo: null, bar: null }, + streams: { stream1: { vars: { foo: null, bar: null } } }, }, }, }) diff --git a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/agent_config/create_datasource_page/services/validate_datasource.ts b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/agent_config/create_datasource_page/services/validate_datasource.ts index 518e2bfc1af07a..3a712b072dac11 100644 --- a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/agent_config/create_datasource_page/services/validate_datasource.ts +++ b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/agent_config/create_datasource_page/services/validate_datasource.ts @@ -21,7 +21,7 @@ type Errors = string[] | null; type ValidationEntry = Record; export interface DatasourceConfigValidationResults { - config?: ValidationEntry; + vars?: ValidationEntry; } export type DatasourceInputValidationResults = DatasourceConfigValidationResults & { @@ -77,12 +77,12 @@ export const validateDatasource = ( // Validate each datasource input with either its own config fields or streams datasource.inputs.forEach(input => { - if (!input.config && !input.streams) { + if (!input.vars && !input.streams) { return; } const inputValidationResults: DatasourceInputValidationResults = { - config: undefined, + vars: undefined, streams: {}, }; @@ -95,27 +95,27 @@ export const validateDatasource = ( ); // Validate input-level config fields - const inputConfigs = Object.entries(input.config || {}); + const inputConfigs = Object.entries(input.vars || {}); if (inputConfigs.length) { - inputValidationResults.config = inputConfigs.reduce((results, [name, configEntry]) => { + inputValidationResults.vars = inputConfigs.reduce((results, [name, configEntry]) => { results[name] = input.enabled ? validateDatasourceConfig(configEntry, inputVarsByName[name]) : null; return results; }, {} as ValidationEntry); } else { - delete inputValidationResults.config; + delete inputValidationResults.vars; } // Validate each input stream with config fields if (input.streams.length) { input.streams.forEach(stream => { - if (!stream.config) { + if (!stream.vars) { return; } const streamValidationResults: DatasourceConfigValidationResults = { - config: undefined, + vars: undefined, }; const streamVarsByName = ( @@ -130,7 +130,7 @@ export const validateDatasource = ( }, {} as Record); // Validate stream-level config fields - streamValidationResults.config = Object.entries(stream.config).reduce( + streamValidationResults.vars = Object.entries(stream.vars).reduce( (results, [name, configEntry]) => { results[name] = input.enabled && stream.enabled @@ -147,7 +147,7 @@ export const validateDatasource = ( delete inputValidationResults.streams; } - if (inputValidationResults.config || inputValidationResults.streams) { + if (inputValidationResults.vars || inputValidationResults.streams) { validationResults.inputs![input.type] = inputValidationResults; } }); diff --git a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/epm/constants.tsx b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/epm/constants.tsx index 685199245df18f..54cb5171f5a3e3 100644 --- a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/epm/constants.tsx +++ b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/epm/constants.tsx @@ -21,6 +21,7 @@ export const AssetTitleMap: Record = { 'ingest-pipeline': 'Ingest Pipeline', 'index-pattern': 'Index Pattern', 'index-template': 'Index Template', + 'component-template': 'Component Template', search: 'Saved Search', visualization: 'Visualization', input: 'Agent input', diff --git a/x-pack/plugins/ingest_manager/server/saved_objects.ts b/x-pack/plugins/ingest_manager/server/saved_objects.ts index 0b130e7b701018..882258e859555b 100644 --- a/x-pack/plugins/ingest_manager/server/saved_objects.ts +++ b/x-pack/plugins/ingest_manager/server/saved_objects.ts @@ -201,6 +201,7 @@ const savedObjectTypes: { [key: string]: SavedObjectsType } = { enabled: { type: 'boolean' }, processors: { type: 'keyword' }, config: { type: 'flattened' }, + vars: { type: 'flattened' }, streams: { type: 'nested', properties: { @@ -209,7 +210,8 @@ const savedObjectTypes: { [key: string]: SavedObjectsType } = { dataset: { type: 'keyword' }, processors: { type: 'keyword' }, config: { type: 'flattened' }, - pkg_stream: { type: 'flattened' }, + agent_stream: { type: 'flattened' }, + vars: { type: 'flattened' }, }, }, }, diff --git a/x-pack/plugins/ingest_manager/server/services/datasource.test.ts b/x-pack/plugins/ingest_manager/server/services/datasource.test.ts index 09c59998388d16..4cbbadce7f5bb9 100644 --- a/x-pack/plugins/ingest_manager/server/services/datasource.test.ts +++ b/x-pack/plugins/ingest_manager/server/services/datasource.test.ts @@ -47,7 +47,7 @@ describe('Datasource service', () => { id: 'dataset01', dataset: 'package.dataset1', enabled: true, - config: { + vars: { paths: { value: ['/var/log/set.log'], }, @@ -67,12 +67,12 @@ describe('Datasource service', () => { id: 'dataset01', dataset: 'package.dataset1', enabled: true, - config: { + vars: { paths: { value: ['/var/log/set.log'], }, }, - pkg_stream: { + agent_stream: { metricset: ['dataset1'], paths: ['/var/log/set.log'], type: 'log', @@ -93,7 +93,7 @@ describe('Datasource service', () => { { type: 'log', enabled: true, - config: { + vars: { paths: { value: ['/var/log/set.log'], }, @@ -113,7 +113,7 @@ describe('Datasource service', () => { { type: 'log', enabled: true, - config: { + vars: { paths: { value: ['/var/log/set.log'], }, @@ -123,7 +123,7 @@ describe('Datasource service', () => { id: 'dataset01', dataset: 'package.dataset1', enabled: true, - pkg_stream: { + agent_stream: { metricset: ['dataset1'], paths: ['/var/log/set.log'], type: 'log', diff --git a/x-pack/plugins/ingest_manager/server/services/datasource.ts b/x-pack/plugins/ingest_manager/server/services/datasource.ts index f27252aaa9a84f..804039cf508ba3 100644 --- a/x-pack/plugins/ingest_manager/server/services/datasource.ts +++ b/x-pack/plugins/ingest_manager/server/services/datasource.ts @@ -229,7 +229,7 @@ async function _assignPackageStreamToStream( stream: DatasourceInputStream ) { if (!stream.enabled) { - return { ...stream, pkg_stream: undefined }; + return { ...stream, agent_stream: undefined }; } const dataset = getDataset(stream.dataset); const assetsData = await getAssetsDataForPackageKey(pkgInfo, _isAgentStream, dataset); @@ -241,18 +241,18 @@ async function _assignPackageStreamToStream( // Populate template variables from input config and stream config const data: { [k: string]: string | string[] } = {}; - if (input.config) { - for (const key of Object.keys(input.config)) { - data[key] = input.config[key].value; + if (input.vars) { + for (const key of Object.keys(input.vars)) { + data[key] = input.vars[key].value; } } - if (stream.config) { - for (const key of Object.keys(stream.config)) { - data[key] = stream.config[key].value; + if (stream.vars) { + for (const key of Object.keys(stream.vars)) { + data[key] = stream.vars[key].value; } } const yaml = safeLoad(createStream(data, pkgStream.buffer.toString())); - stream.pkg_stream = yaml; + stream.agent_stream = yaml; return { ...stream }; } diff --git a/x-pack/plugins/ingest_manager/server/services/epm/elasticsearch/template/__snapshots__/template.test.ts.snap b/x-pack/plugins/ingest_manager/server/services/epm/elasticsearch/template/__snapshots__/template.test.ts.snap index 5cf1f241a709fe..440060aff96169 100644 --- a/x-pack/plugins/ingest_manager/server/services/epm/elasticsearch/template/__snapshots__/template.test.ts.snap +++ b/x-pack/plugins/ingest_manager/server/services/epm/elasticsearch/template/__snapshots__/template.test.ts.snap @@ -2,850 +2,856 @@ exports[`tests loading base.yml: base.yml 1`] = ` { - "order": 1, + "priority": 1, "index_patterns": [ "foo-*" ], - "settings": { - "index": { - "lifecycle": { - "name": "logs-default" - }, - "codec": "best_compression", - "mapping": { - "total_fields": { - "limit": "10000" - } - }, - "refresh_interval": "5s", - "number_of_shards": "1", - "query": { - "default_field": [ - "message" - ] - }, - "number_of_routing_shards": "30" - } - }, - "mappings": { - "dynamic_templates": [ - { - "strings_as_keyword": { - "mapping": { - "ignore_above": 1024, - "type": "keyword" - }, - "match_mapping_type": "string" - } + "template": { + "settings": { + "index": { + "lifecycle": { + "name": "logs-default" + }, + "codec": "best_compression", + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "refresh_interval": "5s", + "number_of_shards": "1", + "query": { + "default_field": [ + "message" + ] + }, + "number_of_routing_shards": "30" } - ], - "date_detection": false, - "properties": { - "user": { - "properties": { - "auid": { - "ignore_above": 1024, - "type": "keyword" - }, - "euid": { - "ignore_above": 1024, - "type": "keyword" + }, + "mappings": { + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" } } - }, - "long": { - "properties": { - "nested": { - "properties": { - "foo": { - "type": "text" - }, - "bar": { - "type": "long" + ], + "date_detection": false, + "properties": { + "user": { + "properties": { + "auid": { + "ignore_above": 1024, + "type": "keyword" + }, + "euid": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "long": { + "properties": { + "nested": { + "properties": { + "foo": { + "type": "text" + }, + "bar": { + "type": "long" + } } } } - } - }, - "nested": { - "properties": { - "bar": { - "ignore_above": 1024, - "type": "keyword" - }, - "baz": { - "ignore_above": 1024, - "type": "keyword" + }, + "nested": { + "properties": { + "bar": { + "ignore_above": 1024, + "type": "keyword" + }, + "baz": { + "ignore_above": 1024, + "type": "keyword" + } } + }, + "myalias": { + "type": "alias", + "path": "user.euid" + }, + "validarray": { + "type": "integer" } - }, - "myalias": { - "type": "alias", - "path": "user.euid" - }, - "validarray": { - "type": "integer" } - } - }, - "aliases": {} + }, + "aliases": {} + } } `; exports[`tests loading coredns.logs.yml: coredns.logs.yml 1`] = ` { - "order": 1, + "priority": 1, "index_patterns": [ "foo-*" ], - "settings": { - "index": { - "lifecycle": { - "name": "logs-default" - }, - "codec": "best_compression", - "mapping": { - "total_fields": { - "limit": "10000" - } - }, - "refresh_interval": "5s", - "number_of_shards": "1", - "query": { - "default_field": [ - "message" - ] - }, - "number_of_routing_shards": "30" - } - }, - "mappings": { - "dynamic_templates": [ - { - "strings_as_keyword": { - "mapping": { - "ignore_above": 1024, - "type": "keyword" - }, - "match_mapping_type": "string" - } + "template": { + "settings": { + "index": { + "lifecycle": { + "name": "logs-default" + }, + "codec": "best_compression", + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "refresh_interval": "5s", + "number_of_shards": "1", + "query": { + "default_field": [ + "message" + ] + }, + "number_of_routing_shards": "30" } - ], - "date_detection": false, - "properties": { - "coredns": { - "properties": { - "id": { - "ignore_above": 1024, - "type": "keyword" - }, - "query": { - "properties": { - "size": { - "type": "long" - }, - "class": { - "ignore_above": 1024, - "type": "keyword" - }, - "name": { - "ignore_above": 1024, - "type": "keyword" - }, - "type": { - "ignore_above": 1024, - "type": "keyword" + }, + "mappings": { + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "date_detection": false, + "properties": { + "coredns": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "query": { + "properties": { + "size": { + "type": "long" + }, + "class": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } } - } - }, - "response": { - "properties": { - "code": { - "ignore_above": 1024, - "type": "keyword" - }, - "flags": { - "ignore_above": 1024, - "type": "keyword" - }, - "size": { - "type": "long" + }, + "response": { + "properties": { + "code": { + "ignore_above": 1024, + "type": "keyword" + }, + "flags": { + "ignore_above": 1024, + "type": "keyword" + }, + "size": { + "type": "long" + } } + }, + "dnssec_ok": { + "type": "boolean" } - }, - "dnssec_ok": { - "type": "boolean" } } } - } - }, - "aliases": {} + }, + "aliases": {} + } } `; exports[`tests loading system.yml: system.yml 1`] = ` { - "order": 1, + "priority": 1, "index_patterns": [ "whatsthis-*" ], - "settings": { - "index": { - "lifecycle": { - "name": "metrics-default" - }, - "codec": "best_compression", - "mapping": { - "total_fields": { - "limit": "10000" - } - }, - "refresh_interval": "5s", - "number_of_shards": "1", - "query": { - "default_field": [ - "message" - ] - }, - "number_of_routing_shards": "30" - } - }, - "mappings": { - "dynamic_templates": [ - { - "strings_as_keyword": { - "mapping": { - "ignore_above": 1024, - "type": "keyword" - }, - "match_mapping_type": "string" - } + "template": { + "settings": { + "index": { + "lifecycle": { + "name": "metrics-default" + }, + "codec": "best_compression", + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "refresh_interval": "5s", + "number_of_shards": "1", + "query": { + "default_field": [ + "message" + ] + }, + "number_of_routing_shards": "30" } - ], - "date_detection": false, - "properties": { - "system": { - "properties": { - "core": { - "properties": { - "id": { - "type": "long" - }, - "user": { - "properties": { - "pct": { - "type": "scaled_float", - "scaling_factor": 1000 - }, - "ticks": { - "type": "long" + }, + "mappings": { + "dynamic_templates": [ + { + "strings_as_keyword": { + "mapping": { + "ignore_above": 1024, + "type": "keyword" + }, + "match_mapping_type": "string" + } + } + ], + "date_detection": false, + "properties": { + "system": { + "properties": { + "core": { + "properties": { + "id": { + "type": "long" + }, + "user": { + "properties": { + "pct": { + "type": "scaled_float", + "scaling_factor": 1000 + }, + "ticks": { + "type": "long" + } } - } - }, - "system": { - "properties": { - "pct": { - "type": "scaled_float", - "scaling_factor": 1000 - }, - "ticks": { - "type": "long" + }, + "system": { + "properties": { + "pct": { + "type": "scaled_float", + "scaling_factor": 1000 + }, + "ticks": { + "type": "long" + } } - } - }, - "nice": { - "properties": { - "pct": { - "type": "scaled_float", - "scaling_factor": 1000 - }, - "ticks": { - "type": "long" + }, + "nice": { + "properties": { + "pct": { + "type": "scaled_float", + "scaling_factor": 1000 + }, + "ticks": { + "type": "long" + } } - } - }, - "idle": { - "properties": { - "pct": { - "type": "scaled_float", - "scaling_factor": 1000 - }, - "ticks": { - "type": "long" + }, + "idle": { + "properties": { + "pct": { + "type": "scaled_float", + "scaling_factor": 1000 + }, + "ticks": { + "type": "long" + } } - } - }, - "iowait": { - "properties": { - "pct": { - "type": "scaled_float", - "scaling_factor": 1000 - }, - "ticks": { - "type": "long" + }, + "iowait": { + "properties": { + "pct": { + "type": "scaled_float", + "scaling_factor": 1000 + }, + "ticks": { + "type": "long" + } } - } - }, - "irq": { - "properties": { - "pct": { - "type": "scaled_float", - "scaling_factor": 1000 - }, - "ticks": { - "type": "long" + }, + "irq": { + "properties": { + "pct": { + "type": "scaled_float", + "scaling_factor": 1000 + }, + "ticks": { + "type": "long" + } } - } - }, - "softirq": { - "properties": { - "pct": { - "type": "scaled_float", - "scaling_factor": 1000 - }, - "ticks": { - "type": "long" + }, + "softirq": { + "properties": { + "pct": { + "type": "scaled_float", + "scaling_factor": 1000 + }, + "ticks": { + "type": "long" + } } - } - }, - "steal": { - "properties": { - "pct": { - "type": "scaled_float", - "scaling_factor": 1000 - }, - "ticks": { - "type": "long" + }, + "steal": { + "properties": { + "pct": { + "type": "scaled_float", + "scaling_factor": 1000 + }, + "ticks": { + "type": "long" + } } } } - } - }, - "cpu": { - "properties": { - "cores": { - "type": "long" - }, - "user": { - "properties": { - "pct": { - "type": "scaled_float", - "scaling_factor": 1000 - }, - "norm": { - "properties": { - "pct": { - "type": "scaled_float", - "scaling_factor": 1000 + }, + "cpu": { + "properties": { + "cores": { + "type": "long" + }, + "user": { + "properties": { + "pct": { + "type": "scaled_float", + "scaling_factor": 1000 + }, + "norm": { + "properties": { + "pct": { + "type": "scaled_float", + "scaling_factor": 1000 + } } + }, + "ticks": { + "type": "long" } - }, - "ticks": { - "type": "long" } - } - }, - "system": { - "properties": { - "pct": { - "type": "scaled_float", - "scaling_factor": 1000 - }, - "norm": { - "properties": { - "pct": { - "type": "scaled_float", - "scaling_factor": 1000 + }, + "system": { + "properties": { + "pct": { + "type": "scaled_float", + "scaling_factor": 1000 + }, + "norm": { + "properties": { + "pct": { + "type": "scaled_float", + "scaling_factor": 1000 + } } + }, + "ticks": { + "type": "long" } - }, - "ticks": { - "type": "long" } - } - }, - "nice": { - "properties": { - "pct": { - "type": "scaled_float", - "scaling_factor": 1000 - }, - "norm": { - "properties": { - "pct": { - "type": "scaled_float", - "scaling_factor": 1000 + }, + "nice": { + "properties": { + "pct": { + "type": "scaled_float", + "scaling_factor": 1000 + }, + "norm": { + "properties": { + "pct": { + "type": "scaled_float", + "scaling_factor": 1000 + } } + }, + "ticks": { + "type": "long" } - }, - "ticks": { - "type": "long" } - } - }, - "idle": { - "properties": { - "pct": { - "type": "scaled_float", - "scaling_factor": 1000 - }, - "norm": { - "properties": { - "pct": { - "type": "scaled_float", - "scaling_factor": 1000 + }, + "idle": { + "properties": { + "pct": { + "type": "scaled_float", + "scaling_factor": 1000 + }, + "norm": { + "properties": { + "pct": { + "type": "scaled_float", + "scaling_factor": 1000 + } } + }, + "ticks": { + "type": "long" } - }, - "ticks": { - "type": "long" } - } - }, - "iowait": { - "properties": { - "pct": { - "type": "scaled_float", - "scaling_factor": 1000 - }, - "norm": { - "properties": { - "pct": { - "type": "scaled_float", - "scaling_factor": 1000 + }, + "iowait": { + "properties": { + "pct": { + "type": "scaled_float", + "scaling_factor": 1000 + }, + "norm": { + "properties": { + "pct": { + "type": "scaled_float", + "scaling_factor": 1000 + } } + }, + "ticks": { + "type": "long" } - }, - "ticks": { - "type": "long" } - } - }, - "irq": { - "properties": { - "pct": { - "type": "scaled_float", - "scaling_factor": 1000 - }, - "norm": { - "properties": { - "pct": { - "type": "scaled_float", - "scaling_factor": 1000 + }, + "irq": { + "properties": { + "pct": { + "type": "scaled_float", + "scaling_factor": 1000 + }, + "norm": { + "properties": { + "pct": { + "type": "scaled_float", + "scaling_factor": 1000 + } } + }, + "ticks": { + "type": "long" } - }, - "ticks": { - "type": "long" } - } - }, - "softirq": { - "properties": { - "pct": { - "type": "scaled_float", - "scaling_factor": 1000 - }, - "norm": { - "properties": { - "pct": { - "type": "scaled_float", - "scaling_factor": 1000 + }, + "softirq": { + "properties": { + "pct": { + "type": "scaled_float", + "scaling_factor": 1000 + }, + "norm": { + "properties": { + "pct": { + "type": "scaled_float", + "scaling_factor": 1000 + } } + }, + "ticks": { + "type": "long" } - }, - "ticks": { - "type": "long" } - } - }, - "steal": { - "properties": { - "pct": { - "type": "scaled_float", - "scaling_factor": 1000 - }, - "norm": { - "properties": { - "pct": { - "type": "scaled_float", - "scaling_factor": 1000 + }, + "steal": { + "properties": { + "pct": { + "type": "scaled_float", + "scaling_factor": 1000 + }, + "norm": { + "properties": { + "pct": { + "type": "scaled_float", + "scaling_factor": 1000 + } } + }, + "ticks": { + "type": "long" } - }, - "ticks": { - "type": "long" } - } - }, - "total": { - "properties": { - "pct": { - "type": "scaled_float", - "scaling_factor": 1000 - }, - "norm": { - "properties": { - "pct": { - "type": "scaled_float", - "scaling_factor": 1000 + }, + "total": { + "properties": { + "pct": { + "type": "scaled_float", + "scaling_factor": 1000 + }, + "norm": { + "properties": { + "pct": { + "type": "scaled_float", + "scaling_factor": 1000 + } } } } } } - } - }, - "diskio": { - "properties": { - "name": { - "ignore_above": 1024, - "type": "keyword" - }, - "serial_number": { - "ignore_above": 1024, - "type": "keyword" - }, - "read": { - "properties": { - "count": { - "type": "long" - }, - "bytes": { - "type": "long" - }, - "time": { - "type": "long" + }, + "diskio": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "serial_number": { + "ignore_above": 1024, + "type": "keyword" + }, + "read": { + "properties": { + "count": { + "type": "long" + }, + "bytes": { + "type": "long" + }, + "time": { + "type": "long" + } } - } - }, - "write": { - "properties": { - "count": { - "type": "long" - }, - "bytes": { - "type": "long" - }, - "time": { - "type": "long" + }, + "write": { + "properties": { + "count": { + "type": "long" + }, + "bytes": { + "type": "long" + }, + "time": { + "type": "long" + } } - } - }, - "io": { - "properties": { - "time": { - "type": "long" + }, + "io": { + "properties": { + "time": { + "type": "long" + } } - } - }, - "iostat": { - "properties": { - "read": { - "properties": { - "request": { - "properties": { - "merges_per_sec": { - "type": "float" - }, - "per_sec": { - "type": "float" + }, + "iostat": { + "properties": { + "read": { + "properties": { + "request": { + "properties": { + "merges_per_sec": { + "type": "float" + }, + "per_sec": { + "type": "float" + } } - } - }, - "per_sec": { - "properties": { - "bytes": { - "type": "float" + }, + "per_sec": { + "properties": { + "bytes": { + "type": "float" + } } + }, + "await": { + "type": "float" } - }, - "await": { - "type": "float" } - } - }, - "write": { - "properties": { - "request": { - "properties": { - "merges_per_sec": { - "type": "float" - }, - "per_sec": { - "type": "float" + }, + "write": { + "properties": { + "request": { + "properties": { + "merges_per_sec": { + "type": "float" + }, + "per_sec": { + "type": "float" + } } - } - }, - "per_sec": { - "properties": { - "bytes": { - "type": "float" + }, + "per_sec": { + "properties": { + "bytes": { + "type": "float" + } } + }, + "await": { + "type": "float" } - }, - "await": { - "type": "float" } - } - }, - "request": { - "properties": { - "avg_size": { - "type": "float" + }, + "request": { + "properties": { + "avg_size": { + "type": "float" + } } - } - }, - "queue": { - "properties": { - "avg_size": { - "type": "float" + }, + "queue": { + "properties": { + "avg_size": { + "type": "float" + } } + }, + "await": { + "type": "float" + }, + "service_time": { + "type": "float" + }, + "busy": { + "type": "float" } - }, - "await": { - "type": "float" - }, - "service_time": { - "type": "float" - }, - "busy": { - "type": "float" } } } - } - }, - "entropy": { - "properties": { - "available_bits": { - "type": "long" - }, - "pct": { - "type": "scaled_float", - "scaling_factor": 1000 + }, + "entropy": { + "properties": { + "available_bits": { + "type": "long" + }, + "pct": { + "type": "scaled_float", + "scaling_factor": 1000 + } } - } - }, - "filesystem": { - "properties": { - "available": { - "type": "long" - }, - "device_name": { - "ignore_above": 1024, - "type": "keyword" - }, - "type": { - "ignore_above": 1024, - "type": "keyword" - }, - "mount_point": { - "ignore_above": 1024, - "type": "keyword" - }, - "files": { - "type": "long" - }, - "free": { - "type": "long" - }, - "free_files": { - "type": "long" - }, - "total": { - "type": "long" - }, - "used": { - "properties": { - "bytes": { - "type": "long" - }, - "pct": { - "type": "scaled_float", - "scaling_factor": 1000 + }, + "filesystem": { + "properties": { + "available": { + "type": "long" + }, + "device_name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "mount_point": { + "ignore_above": 1024, + "type": "keyword" + }, + "files": { + "type": "long" + }, + "free": { + "type": "long" + }, + "free_files": { + "type": "long" + }, + "total": { + "type": "long" + }, + "used": { + "properties": { + "bytes": { + "type": "long" + }, + "pct": { + "type": "scaled_float", + "scaling_factor": 1000 + } } } } - } - }, - "fsstat": { - "properties": { - "count": { - "type": "long" - }, - "total_files": { - "type": "long" - }, - "total_size": { - "properties": { - "free": { - "type": "long" - }, - "used": { - "type": "long" - }, - "total": { - "type": "long" + }, + "fsstat": { + "properties": { + "count": { + "type": "long" + }, + "total_files": { + "type": "long" + }, + "total_size": { + "properties": { + "free": { + "type": "long" + }, + "used": { + "type": "long" + }, + "total": { + "type": "long" + } } } } - } - }, - "load": { - "properties": { - "1": { - "type": "scaled_float", - "scaling_factor": 100 - }, - "5": { - "type": "scaled_float", - "scaling_factor": 100 - }, - "15": { - "type": "scaled_float", - "scaling_factor": 100 - }, - "norm": { - "properties": { - "1": { - "type": "scaled_float", - "scaling_factor": 100 - }, - "5": { - "type": "scaled_float", - "scaling_factor": 100 - }, - "15": { - "type": "scaled_float", - "scaling_factor": 100 + }, + "load": { + "properties": { + "1": { + "type": "scaled_float", + "scaling_factor": 100 + }, + "5": { + "type": "scaled_float", + "scaling_factor": 100 + }, + "15": { + "type": "scaled_float", + "scaling_factor": 100 + }, + "norm": { + "properties": { + "1": { + "type": "scaled_float", + "scaling_factor": 100 + }, + "5": { + "type": "scaled_float", + "scaling_factor": 100 + }, + "15": { + "type": "scaled_float", + "scaling_factor": 100 + } } + }, + "cores": { + "type": "long" } - }, - "cores": { - "type": "long" } - } - }, - "memory": { - "properties": { - "total": { - "type": "long" - }, - "used": { - "properties": { - "bytes": { - "type": "long" - }, - "pct": { - "type": "scaled_float", - "scaling_factor": 1000 + }, + "memory": { + "properties": { + "total": { + "type": "long" + }, + "used": { + "properties": { + "bytes": { + "type": "long" + }, + "pct": { + "type": "scaled_float", + "scaling_factor": 1000 + } } - } - }, - "free": { - "type": "long" - }, - "actual": { - "properties": { - "used": { - "properties": { - "bytes": { - "type": "long" - }, - "pct": { - "type": "scaled_float", - "scaling_factor": 1000 + }, + "free": { + "type": "long" + }, + "actual": { + "properties": { + "used": { + "properties": { + "bytes": { + "type": "long" + }, + "pct": { + "type": "scaled_float", + "scaling_factor": 1000 + } } + }, + "free": { + "type": "long" } - }, - "free": { - "type": "long" } - } - }, - "swap": { - "properties": { - "total": { - "type": "long" - }, - "used": { - "properties": { - "bytes": { - "type": "long" - }, - "pct": { - "type": "scaled_float", - "scaling_factor": 1000 + }, + "swap": { + "properties": { + "total": { + "type": "long" + }, + "used": { + "properties": { + "bytes": { + "type": "long" + }, + "pct": { + "type": "scaled_float", + "scaling_factor": 1000 + } } - } - }, - "free": { - "type": "long" - }, - "out": { - "properties": { - "pages": { - "type": "long" + }, + "free": { + "type": "long" + }, + "out": { + "properties": { + "pages": { + "type": "long" + } } - } - }, - "in": { - "properties": { - "pages": { - "type": "long" + }, + "in": { + "properties": { + "pages": { + "type": "long" + } } - } - }, - "readahead": { - "properties": { - "pages": { - "type": "long" - }, - "cached": { - "type": "long" + }, + "readahead": { + "properties": { + "pages": { + "type": "long" + }, + "cached": { + "type": "long" + } } } } - } - }, - "hugepages": { - "properties": { - "total": { - "type": "long" - }, - "used": { - "properties": { - "bytes": { - "type": "long" - }, - "pct": { - "type": "long" + }, + "hugepages": { + "properties": { + "total": { + "type": "long" + }, + "used": { + "properties": { + "bytes": { + "type": "long" + }, + "pct": { + "type": "long" + } } - } - }, - "free": { - "type": "long" - }, - "reserved": { - "type": "long" - }, - "surplus": { - "type": "long" - }, - "default_size": { - "type": "long" - }, - "swap": { - "properties": { - "out": { - "properties": { - "pages": { - "type": "long" - }, - "fallback": { - "type": "long" + }, + "free": { + "type": "long" + }, + "reserved": { + "type": "long" + }, + "surplus": { + "type": "long" + }, + "default_size": { + "type": "long" + }, + "swap": { + "properties": { + "out": { + "properties": { + "pages": { + "type": "long" + }, + "fallback": { + "type": "long" + } } } } @@ -853,743 +859,743 @@ exports[`tests loading system.yml: system.yml 1`] = ` } } } - } - }, - "network": { - "properties": { - "name": { - "ignore_above": 1024, - "type": "keyword" - }, - "out": { - "properties": { - "bytes": { - "type": "long" - }, - "packets": { - "type": "long" - }, - "errors": { - "type": "long" - }, - "dropped": { - "type": "long" + }, + "network": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "out": { + "properties": { + "bytes": { + "type": "long" + }, + "packets": { + "type": "long" + }, + "errors": { + "type": "long" + }, + "dropped": { + "type": "long" + } } - } - }, - "in": { - "properties": { - "bytes": { - "type": "long" - }, - "packets": { - "type": "long" - }, - "errors": { - "type": "long" - }, - "dropped": { - "type": "long" + }, + "in": { + "properties": { + "bytes": { + "type": "long" + }, + "packets": { + "type": "long" + }, + "errors": { + "type": "long" + }, + "dropped": { + "type": "long" + } } } } - } - }, - "network_summary": { - "properties": { - "ip": { - "properties": { - "*": { - "type": "object" + }, + "network_summary": { + "properties": { + "ip": { + "properties": { + "*": { + "type": "object" + } } - } - }, - "tcp": { - "properties": { - "*": { - "type": "object" + }, + "tcp": { + "properties": { + "*": { + "type": "object" + } } - } - }, - "udp": { - "properties": { - "*": { - "type": "object" + }, + "udp": { + "properties": { + "*": { + "type": "object" + } } - } - }, - "udp_lite": { - "properties": { - "*": { - "type": "object" + }, + "udp_lite": { + "properties": { + "*": { + "type": "object" + } } - } - }, - "icmp": { - "properties": { - "*": { - "type": "object" + }, + "icmp": { + "properties": { + "*": { + "type": "object" + } } } } - } - }, - "process": { - "properties": { - "state": { - "ignore_above": 1024, - "type": "keyword" - }, - "cmdline": { - "ignore_above": 2048, - "type": "keyword" - }, - "env": { - "type": "object" - }, - "cpu": { - "properties": { - "user": { - "properties": { - "ticks": { - "type": "long" + }, + "process": { + "properties": { + "state": { + "ignore_above": 1024, + "type": "keyword" + }, + "cmdline": { + "ignore_above": 2048, + "type": "keyword" + }, + "env": { + "type": "object" + }, + "cpu": { + "properties": { + "user": { + "properties": { + "ticks": { + "type": "long" + } } - } - }, - "total": { - "properties": { - "value": { - "type": "long" - }, - "pct": { - "type": "scaled_float", - "scaling_factor": 1000 - }, - "norm": { - "properties": { - "pct": { - "type": "scaled_float", - "scaling_factor": 1000 + }, + "total": { + "properties": { + "value": { + "type": "long" + }, + "pct": { + "type": "scaled_float", + "scaling_factor": 1000 + }, + "norm": { + "properties": { + "pct": { + "type": "scaled_float", + "scaling_factor": 1000 + } } + }, + "ticks": { + "type": "long" } - }, - "ticks": { - "type": "long" } - } - }, - "system": { - "properties": { - "ticks": { - "type": "long" + }, + "system": { + "properties": { + "ticks": { + "type": "long" + } } + }, + "start_time": { + "type": "date" } - }, - "start_time": { - "type": "date" } - } - }, - "memory": { - "properties": { - "size": { - "type": "long" - }, - "rss": { - "properties": { - "bytes": { - "type": "long" - }, - "pct": { - "type": "scaled_float", - "scaling_factor": 1000 + }, + "memory": { + "properties": { + "size": { + "type": "long" + }, + "rss": { + "properties": { + "bytes": { + "type": "long" + }, + "pct": { + "type": "scaled_float", + "scaling_factor": 1000 + } } + }, + "share": { + "type": "long" } - }, - "share": { - "type": "long" } - } - }, - "fd": { - "properties": { - "open": { - "type": "long" - }, - "limit": { - "properties": { - "soft": { - "type": "long" - }, - "hard": { - "type": "long" + }, + "fd": { + "properties": { + "open": { + "type": "long" + }, + "limit": { + "properties": { + "soft": { + "type": "long" + }, + "hard": { + "type": "long" + } } } } - } - }, - "cgroup": { - "properties": { - "id": { - "ignore_above": 1024, - "type": "keyword" - }, - "path": { - "ignore_above": 1024, - "type": "keyword" - }, - "cpu": { - "properties": { - "id": { - "ignore_above": 1024, - "type": "keyword" - }, - "path": { - "ignore_above": 1024, - "type": "keyword" - }, - "cfs": { - "properties": { - "period": { - "properties": { - "us": { - "type": "long" + }, + "cgroup": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "path": { + "ignore_above": 1024, + "type": "keyword" + }, + "cpu": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "path": { + "ignore_above": 1024, + "type": "keyword" + }, + "cfs": { + "properties": { + "period": { + "properties": { + "us": { + "type": "long" + } } - } - }, - "quota": { - "properties": { - "us": { - "type": "long" + }, + "quota": { + "properties": { + "us": { + "type": "long" + } } + }, + "shares": { + "type": "long" } - }, - "shares": { - "type": "long" } - } - }, - "rt": { - "properties": { - "period": { - "properties": { - "us": { - "type": "long" + }, + "rt": { + "properties": { + "period": { + "properties": { + "us": { + "type": "long" + } } - } - }, - "runtime": { - "properties": { - "us": { - "type": "long" + }, + "runtime": { + "properties": { + "us": { + "type": "long" + } } } } - } - }, - "stats": { - "properties": { - "periods": { - "type": "long" - }, - "throttled": { - "properties": { - "periods": { - "type": "long" - }, - "ns": { - "type": "long" + }, + "stats": { + "properties": { + "periods": { + "type": "long" + }, + "throttled": { + "properties": { + "periods": { + "type": "long" + }, + "ns": { + "type": "long" + } } } } } } - } - }, - "cpuacct": { - "properties": { - "id": { - "ignore_above": 1024, - "type": "keyword" - }, - "path": { - "ignore_above": 1024, - "type": "keyword" - }, - "total": { - "properties": { - "ns": { - "type": "long" + }, + "cpuacct": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "path": { + "ignore_above": 1024, + "type": "keyword" + }, + "total": { + "properties": { + "ns": { + "type": "long" + } } - } - }, - "stats": { - "properties": { - "user": { - "properties": { - "ns": { - "type": "long" + }, + "stats": { + "properties": { + "user": { + "properties": { + "ns": { + "type": "long" + } } - } - }, - "system": { - "properties": { - "ns": { - "type": "long" + }, + "system": { + "properties": { + "ns": { + "type": "long" + } } } } + }, + "percpu": { + "type": "object" } - }, - "percpu": { - "type": "object" } - } - }, - "memory": { - "properties": { - "id": { - "ignore_above": 1024, - "type": "keyword" - }, - "path": { - "ignore_above": 1024, - "type": "keyword" - }, - "mem": { - "properties": { - "usage": { - "properties": { - "bytes": { - "type": "long" - }, - "max": { - "properties": { - "bytes": { - "type": "long" + }, + "memory": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "path": { + "ignore_above": 1024, + "type": "keyword" + }, + "mem": { + "properties": { + "usage": { + "properties": { + "bytes": { + "type": "long" + }, + "max": { + "properties": { + "bytes": { + "type": "long" + } } } } - } - }, - "limit": { - "properties": { - "bytes": { - "type": "long" + }, + "limit": { + "properties": { + "bytes": { + "type": "long" + } } + }, + "failures": { + "type": "long" } - }, - "failures": { - "type": "long" } - } - }, - "memsw": { - "properties": { - "usage": { - "properties": { - "bytes": { - "type": "long" - }, - "max": { - "properties": { - "bytes": { - "type": "long" + }, + "memsw": { + "properties": { + "usage": { + "properties": { + "bytes": { + "type": "long" + }, + "max": { + "properties": { + "bytes": { + "type": "long" + } } } } - } - }, - "limit": { - "properties": { - "bytes": { - "type": "long" + }, + "limit": { + "properties": { + "bytes": { + "type": "long" + } } + }, + "failures": { + "type": "long" } - }, - "failures": { - "type": "long" } - } - }, - "kmem": { - "properties": { - "usage": { - "properties": { - "bytes": { - "type": "long" - }, - "max": { - "properties": { - "bytes": { - "type": "long" + }, + "kmem": { + "properties": { + "usage": { + "properties": { + "bytes": { + "type": "long" + }, + "max": { + "properties": { + "bytes": { + "type": "long" + } } } } - } - }, - "limit": { - "properties": { - "bytes": { - "type": "long" + }, + "limit": { + "properties": { + "bytes": { + "type": "long" + } } + }, + "failures": { + "type": "long" } - }, - "failures": { - "type": "long" } - } - }, - "kmem_tcp": { - "properties": { - "usage": { - "properties": { - "bytes": { - "type": "long" - }, - "max": { - "properties": { - "bytes": { - "type": "long" + }, + "kmem_tcp": { + "properties": { + "usage": { + "properties": { + "bytes": { + "type": "long" + }, + "max": { + "properties": { + "bytes": { + "type": "long" + } } } } - } - }, - "limit": { - "properties": { - "bytes": { - "type": "long" + }, + "limit": { + "properties": { + "bytes": { + "type": "long" + } } + }, + "failures": { + "type": "long" } - }, - "failures": { - "type": "long" } - } - }, - "stats": { - "properties": { - "active_anon": { - "properties": { - "bytes": { - "type": "long" + }, + "stats": { + "properties": { + "active_anon": { + "properties": { + "bytes": { + "type": "long" + } } - } - }, - "active_file": { - "properties": { - "bytes": { - "type": "long" + }, + "active_file": { + "properties": { + "bytes": { + "type": "long" + } } - } - }, - "cache": { - "properties": { - "bytes": { - "type": "long" + }, + "cache": { + "properties": { + "bytes": { + "type": "long" + } } - } - }, - "hierarchical_memory_limit": { - "properties": { - "bytes": { - "type": "long" + }, + "hierarchical_memory_limit": { + "properties": { + "bytes": { + "type": "long" + } } - } - }, - "hierarchical_memsw_limit": { - "properties": { - "bytes": { - "type": "long" + }, + "hierarchical_memsw_limit": { + "properties": { + "bytes": { + "type": "long" + } } - } - }, - "inactive_anon": { - "properties": { - "bytes": { - "type": "long" + }, + "inactive_anon": { + "properties": { + "bytes": { + "type": "long" + } } - } - }, - "inactive_file": { - "properties": { - "bytes": { - "type": "long" + }, + "inactive_file": { + "properties": { + "bytes": { + "type": "long" + } } - } - }, - "mapped_file": { - "properties": { - "bytes": { - "type": "long" + }, + "mapped_file": { + "properties": { + "bytes": { + "type": "long" + } } - } - }, - "page_faults": { - "type": "long" - }, - "major_page_faults": { - "type": "long" - }, - "pages_in": { - "type": "long" - }, - "pages_out": { - "type": "long" - }, - "rss": { - "properties": { - "bytes": { - "type": "long" + }, + "page_faults": { + "type": "long" + }, + "major_page_faults": { + "type": "long" + }, + "pages_in": { + "type": "long" + }, + "pages_out": { + "type": "long" + }, + "rss": { + "properties": { + "bytes": { + "type": "long" + } } - } - }, - "rss_huge": { - "properties": { - "bytes": { - "type": "long" + }, + "rss_huge": { + "properties": { + "bytes": { + "type": "long" + } } - } - }, - "swap": { - "properties": { - "bytes": { - "type": "long" + }, + "swap": { + "properties": { + "bytes": { + "type": "long" + } } - } - }, - "unevictable": { - "properties": { - "bytes": { - "type": "long" + }, + "unevictable": { + "properties": { + "bytes": { + "type": "long" + } } } } } } - } - }, - "blkio": { - "properties": { - "id": { - "ignore_above": 1024, - "type": "keyword" - }, - "path": { - "ignore_above": 1024, - "type": "keyword" - }, - "total": { - "properties": { - "bytes": { - "type": "long" - }, - "ios": { - "type": "long" + }, + "blkio": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "path": { + "ignore_above": 1024, + "type": "keyword" + }, + "total": { + "properties": { + "bytes": { + "type": "long" + }, + "ios": { + "type": "long" + } } } } } } - } - }, - "summary": { - "properties": { - "total": { - "type": "long" - }, - "running": { - "type": "long" - }, - "idle": { - "type": "long" - }, - "sleeping": { - "type": "long" - }, - "stopped": { - "type": "long" - }, - "zombie": { - "type": "long" - }, - "dead": { - "type": "long" - }, - "unknown": { - "type": "long" + }, + "summary": { + "properties": { + "total": { + "type": "long" + }, + "running": { + "type": "long" + }, + "idle": { + "type": "long" + }, + "sleeping": { + "type": "long" + }, + "stopped": { + "type": "long" + }, + "zombie": { + "type": "long" + }, + "dead": { + "type": "long" + }, + "unknown": { + "type": "long" + } } } } - } - }, - "raid": { - "properties": { - "name": { - "ignore_above": 1024, - "type": "keyword" - }, - "status": { - "ignore_above": 1024, - "type": "keyword" - }, - "level": { - "ignore_above": 1024, - "type": "keyword" - }, - "sync_action": { - "ignore_above": 1024, - "type": "keyword" - }, - "disks": { - "properties": { - "active": { - "type": "long" - }, - "total": { - "type": "long" - }, - "spare": { - "type": "long" - }, - "failed": { - "type": "long" - }, - "states": { - "properties": { - "*": { - "type": "object" + }, + "raid": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "status": { + "ignore_above": 1024, + "type": "keyword" + }, + "level": { + "ignore_above": 1024, + "type": "keyword" + }, + "sync_action": { + "ignore_above": 1024, + "type": "keyword" + }, + "disks": { + "properties": { + "active": { + "type": "long" + }, + "total": { + "type": "long" + }, + "spare": { + "type": "long" + }, + "failed": { + "type": "long" + }, + "states": { + "properties": { + "*": { + "type": "object" + } } } } - } - }, - "blocks": { - "properties": { - "total": { - "type": "long" - }, - "synced": { - "type": "long" + }, + "blocks": { + "properties": { + "total": { + "type": "long" + }, + "synced": { + "type": "long" + } } } } - } - }, - "socket": { - "properties": { - "local": { - "properties": { - "ip": { - "type": "ip" - }, - "port": { - "type": "long" + }, + "socket": { + "properties": { + "local": { + "properties": { + "ip": { + "type": "ip" + }, + "port": { + "type": "long" + } } - } - }, - "remote": { - "properties": { - "ip": { - "type": "ip" - }, - "port": { - "type": "long" - }, - "host": { - "ignore_above": 1024, - "type": "keyword" - }, - "etld_plus_one": { - "ignore_above": 1024, - "type": "keyword" - }, - "host_error": { - "ignore_above": 1024, - "type": "keyword" + }, + "remote": { + "properties": { + "ip": { + "type": "ip" + }, + "port": { + "type": "long" + }, + "host": { + "ignore_above": 1024, + "type": "keyword" + }, + "etld_plus_one": { + "ignore_above": 1024, + "type": "keyword" + }, + "host_error": { + "ignore_above": 1024, + "type": "keyword" + } } - } - }, - "process": { - "properties": { - "cmdline": { - "ignore_above": 1024, - "type": "keyword" + }, + "process": { + "properties": { + "cmdline": { + "ignore_above": 1024, + "type": "keyword" + } } - } - }, - "user": { - "properties": {} - }, - "summary": { - "properties": { - "all": { - "properties": { - "count": { - "type": "long" - }, - "listening": { - "type": "long" + }, + "user": { + "properties": {} + }, + "summary": { + "properties": { + "all": { + "properties": { + "count": { + "type": "long" + }, + "listening": { + "type": "long" + } } - } - }, - "tcp": { - "properties": { - "memory": { - "type": "long" - }, - "all": { - "properties": { - "orphan": { - "type": "long" - }, - "count": { - "type": "long" - }, - "listening": { - "type": "long" - }, - "established": { - "type": "long" - }, - "close_wait": { - "type": "long" - }, - "time_wait": { - "type": "long" - }, - "syn_sent": { - "type": "long" - }, - "syn_recv": { - "type": "long" - }, - "fin_wait1": { - "type": "long" - }, - "fin_wait2": { - "type": "long" - }, - "last_ack": { - "type": "long" - }, - "closing": { - "type": "long" + }, + "tcp": { + "properties": { + "memory": { + "type": "long" + }, + "all": { + "properties": { + "orphan": { + "type": "long" + }, + "count": { + "type": "long" + }, + "listening": { + "type": "long" + }, + "established": { + "type": "long" + }, + "close_wait": { + "type": "long" + }, + "time_wait": { + "type": "long" + }, + "syn_sent": { + "type": "long" + }, + "syn_recv": { + "type": "long" + }, + "fin_wait1": { + "type": "long" + }, + "fin_wait2": { + "type": "long" + }, + "last_ack": { + "type": "long" + }, + "closing": { + "type": "long" + } } } } - } - }, - "udp": { - "properties": { - "memory": { - "type": "long" - }, - "all": { - "properties": { - "count": { - "type": "long" + }, + "udp": { + "properties": { + "memory": { + "type": "long" + }, + "all": { + "properties": { + "count": { + "type": "long" + } } } } @@ -1597,65 +1603,65 @@ exports[`tests loading system.yml: system.yml 1`] = ` } } } - } - }, - "uptime": { - "properties": { - "duration": { - "properties": { - "ms": { - "type": "long" + }, + "uptime": { + "properties": { + "duration": { + "properties": { + "ms": { + "type": "long" + } } } } - } - }, - "users": { - "properties": { - "id": { - "ignore_above": 1024, - "type": "keyword" - }, - "seat": { - "ignore_above": 1024, - "type": "keyword" - }, - "path": { - "ignore_above": 1024, - "type": "keyword" - }, - "type": { - "ignore_above": 1024, - "type": "keyword" - }, - "service": { - "ignore_above": 1024, - "type": "keyword" - }, - "remote": { - "type": "boolean" - }, - "state": { - "ignore_above": 1024, - "type": "keyword" - }, - "scope": { - "ignore_above": 1024, - "type": "keyword" - }, - "leader": { - "type": "long" - }, - "remote_host": { - "ignore_above": 1024, - "type": "keyword" + }, + "users": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "seat": { + "ignore_above": 1024, + "type": "keyword" + }, + "path": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "service": { + "ignore_above": 1024, + "type": "keyword" + }, + "remote": { + "type": "boolean" + }, + "state": { + "ignore_above": 1024, + "type": "keyword" + }, + "scope": { + "ignore_above": 1024, + "type": "keyword" + }, + "leader": { + "type": "long" + }, + "remote_host": { + "ignore_above": 1024, + "type": "keyword" + } } } } } } - } - }, - "aliases": {} + }, + "aliases": {} + } } `; diff --git a/x-pack/plugins/ingest_manager/server/services/epm/elasticsearch/template/install.ts b/x-pack/plugins/ingest_manager/server/services/epm/elasticsearch/template/install.ts index 4df626259ece76..6ef6f863753b55 100644 --- a/x-pack/plugins/ingest_manager/server/services/epm/elasticsearch/template/install.ts +++ b/x-pack/plugins/ingest_manager/server/services/epm/elasticsearch/template/install.ts @@ -18,7 +18,9 @@ export const installTemplates = async ( pkgVersion: string ): Promise => { // install any pre-built index template assets, - // atm, this is only the base package's global template + // atm, this is only the base package's global index templates + // Install component templates first, as they are used by the index templates + installPreBuiltComponentTemplates(pkgName, pkgVersion, callCluster); installPreBuiltTemplates(pkgName, pkgVersion, callCluster); // build templates per dataset from yml files @@ -41,7 +43,6 @@ export const installTemplates = async ( return []; }; -// this is temporary until we update the registry to use index templates v2 structure const installPreBuiltTemplates = async ( pkgName: string, pkgVersion: string, @@ -52,20 +53,91 @@ const installPreBuiltTemplates = async ( pkgVersion, (entry: Registry.ArchiveEntry) => isTemplate(entry) ); + // templatePaths.forEach(async path => { + // const { file } = Registry.pathParts(path); + // const templateName = file.substr(0, file.lastIndexOf('.')); + // const content = JSON.parse(Registry.getAsset(path).toString('utf8')); + // await callCluster('indices.putTemplate', { + // name: templateName, + // body: content, + // }); + // }); templatePaths.forEach(async path => { const { file } = Registry.pathParts(path); const templateName = file.substr(0, file.lastIndexOf('.')); const content = JSON.parse(Registry.getAsset(path).toString('utf8')); - await callCluster('indices.putTemplate', { - name: templateName, + let templateAPIPath = '_template'; + + // v2 index templates need to be installed through the new API endpoint. + // Checking for 'template' and 'composed_of' should catch them all. + // For the new v2 format, see https://github.com/elastic/elasticsearch/issues/53101 + if (content.hasOwnProperty('template') || content.hasOwnProperty('composed_of')) { + templateAPIPath = '_index_template'; + } + + const callClusterParams: { + method: string; + path: string; + ignore: number[]; + body: any; + } = { + method: 'PUT', + path: `/${templateAPIPath}/${templateName}`, + ignore: [404], body: content, - }); + }; + // This uses the catch-all endpoint 'transport.request' because there is no + // convenience endpoint using the new _index_template API yet. + // The existing convenience endpoint `indices.putTemplate` only sends to _template, + // which does not support v2 templates. + // See src/core/server/elasticsearch/api_types.ts for available endpoints. + await callCluster('transport.request', callClusterParams); }); }; + +const installPreBuiltComponentTemplates = async ( + pkgName: string, + pkgVersion: string, + callCluster: CallESAsCurrentUser +) => { + const templatePaths = await Registry.getArchiveInfo( + pkgName, + pkgVersion, + (entry: Registry.ArchiveEntry) => isComponentTemplate(entry) + ); + templatePaths.forEach(async path => { + const { file } = Registry.pathParts(path); + const templateName = file.substr(0, file.lastIndexOf('.')); + const content = JSON.parse(Registry.getAsset(path).toString('utf8')); + + const callClusterParams: { + method: string; + path: string; + ignore: number[]; + body: any; + } = { + method: 'PUT', + path: `/_component_template/${templateName}`, + ignore: [404], + body: content, + }; + // This uses the catch-all endpoint 'transport.request' because there is no + // convenience endpoint for component templates yet. + // See src/core/server/elasticsearch/api_types.ts for available endpoints. + await callCluster('transport.request', callClusterParams); + }); +}; + const isTemplate = ({ path }: Registry.ArchiveEntry) => { const pathParts = Registry.pathParts(path); return pathParts.type === ElasticsearchAssetType.indexTemplate; }; + +const isComponentTemplate = ({ path }: Registry.ArchiveEntry) => { + const pathParts = Registry.pathParts(path); + return pathParts.type === ElasticsearchAssetType.componentTemplate; +}; + /** * installTemplatesForDataset installs one template for each dataset * @@ -113,10 +185,23 @@ export async function installTemplate({ } const template = getTemplate(dataset.type, templateName, mappings, pipelineName); // TODO: Check return values for errors - await callCluster('indices.putTemplate', { - name: templateName, + const callClusterParams: { + method: string; + path: string; + ignore: number[]; + body: any; + } = { + method: 'PUT', + path: `/_index_template/${templateName}`, + ignore: [404], body: template, - }); + }; + // This uses the catch-all endpoint 'transport.request' because there is no + // convenience endpoint using the new _index_template API yet. + // The existing convenience endpoint `indices.putTemplate` only sends to _template, + // which does not support v2 templates. + // See src/core/server/elasticsearch/api_types.ts for available endpoints. + await callCluster('transport.request', callClusterParams); return { templateName, diff --git a/x-pack/plugins/ingest_manager/server/services/epm/elasticsearch/template/template.ts b/x-pack/plugins/ingest_manager/server/services/epm/elasticsearch/template/template.ts index 46b6923962462e..9736f6d1cbd3cd 100644 --- a/x-pack/plugins/ingest_manager/server/services/epm/elasticsearch/template/template.ts +++ b/x-pack/plugins/ingest_manager/server/services/epm/elasticsearch/template/template.ts @@ -45,7 +45,7 @@ export function getTemplate( ): IndexTemplate { const template = getBaseTemplate(type, templateName, mappings); if (pipelineName) { - template.settings.index.default_pipeline = pipelineName; + template.template.settings.index.default_pipeline = pipelineName; } return template; } @@ -212,59 +212,61 @@ function getBaseTemplate( mappings: IndexTemplateMappings ): IndexTemplate { return { - // We need to decide which order we use for the templates - order: 1, + // This takes precedence over all index templates installed with the 'base' package + priority: 1, // To be completed with the correct index patterns index_patterns: [`${templateName}-*`], - settings: { - index: { - // ILM Policy must be added here, for now point to the default global ILM policy name - lifecycle: { - name: `${type}-default`, - }, - // What should be our default for the compression? - codec: 'best_compression', - // W - mapping: { - total_fields: { - limit: '10000', + template: { + settings: { + index: { + // ILM Policy must be added here, for now point to the default global ILM policy name + lifecycle: { + name: `${type}-default`, }, + // What should be our default for the compression? + codec: 'best_compression', + // W + mapping: { + total_fields: { + limit: '10000', + }, + }, + // This is the default from Beats? So far seems to be a good value + refresh_interval: '5s', + // Default in the stack now, still good to have it in + number_of_shards: '1', + // All the default fields which should be queried have to be added here. + // So far we add all keyword and text fields here. + query: { + default_field: ['message'], + }, + // We are setting 30 because it can be devided by several numbers. Useful when shrinking. + number_of_routing_shards: '30', }, - // This is the default from Beats? So far seems to be a good value - refresh_interval: '5s', - // Default in the stack now, still good to have it in - number_of_shards: '1', - // All the default fields which should be queried have to be added here. - // So far we add all keyword and text fields here. - query: { - default_field: ['message'], - }, - // We are setting 30 because it can be devided by several numbers. Useful when shrinking. - number_of_routing_shards: '30', }, - }, - mappings: { - // All the dynamic field mappings - dynamic_templates: [ - // This makes sure all mappings are keywords by default - { - strings_as_keyword: { - mapping: { - ignore_above: 1024, - type: 'keyword', + mappings: { + // All the dynamic field mappings + dynamic_templates: [ + // This makes sure all mappings are keywords by default + { + strings_as_keyword: { + mapping: { + ignore_above: 1024, + type: 'keyword', + }, + match_mapping_type: 'string', }, - match_mapping_type: 'string', }, - }, - ], - // As we define fields ahead, we don't need any automatic field detection - // This makes sure all the fields are mapped to keyword by default to prevent mapping conflicts - date_detection: false, - // All the properties we know from the fields.yml file - properties: mappings.properties, + ], + // As we define fields ahead, we don't need any automatic field detection + // This makes sure all the fields are mapped to keyword by default to prevent mapping conflicts + date_detection: false, + // All the properties we know from the fields.yml file + properties: mappings.properties, + }, + // To be filled with the aliases that we need + aliases: {}, }, - // To be filled with the aliases that we need - aliases: {}, }; } @@ -322,7 +324,7 @@ const updateExistingIndex = async ({ callCluster: CallESAsCurrentUser; indexTemplate: IndexTemplate; }) => { - const { settings, mappings } = indexTemplate; + const { settings, mappings } = indexTemplate.template; // try to update the mappings first // for now we assume updates are compatible try { diff --git a/x-pack/plugins/ingest_manager/server/services/epm/packages/remove.ts b/x-pack/plugins/ingest_manager/server/services/epm/packages/remove.ts index 498796438c6c8e..ac2c869f3b9e9f 100644 --- a/x-pack/plugins/ingest_manager/server/services/epm/packages/remove.ts +++ b/x-pack/plugins/ingest_manager/server/services/epm/packages/remove.ts @@ -74,7 +74,21 @@ async function deleteTemplate(callCluster: CallESAsCurrentUser, name: string): P // '*' shouldn't ever appear here, but it still would delete all templates if (name && name !== '*') { try { - await callCluster('indices.deleteTemplate', { name }); + const callClusterParams: { + method: string; + path: string; + ignore: number[]; + } = { + method: 'DELETE', + path: `/_index_template/${name}`, + ignore: [404], + }; + // This uses the catch-all endpoint 'transport.request' because there is no + // convenience endpoint using the new _index_template API yet. + // The existing convenience endpoint `indices.putTemplate` only sends to _template, + // which does not support v2 templates. + // See src/core/server/elasticsearch/api_types.ts for available endpoints. + await callCluster('transport.request', callClusterParams); } catch { throw new Error(`error deleting template ${name}`); } diff --git a/x-pack/plugins/ingest_manager/server/types/models/datasource.ts b/x-pack/plugins/ingest_manager/server/types/models/datasource.ts index c0cfee8f231c9d..e71016560f60c7 100644 --- a/x-pack/plugins/ingest_manager/server/types/models/datasource.ts +++ b/x-pack/plugins/ingest_manager/server/types/models/datasource.ts @@ -6,6 +6,14 @@ import { schema } from '@kbn/config-schema'; export { Datasource, NewDatasource } from '../../../common'; +const ConfigRecordSchema = schema.recordOf( + schema.string(), + schema.object({ + type: schema.maybe(schema.string()), + value: schema.maybe(schema.any()), + }) +); + const DatasourceBaseSchema = { name: schema.string(), description: schema.maybe(schema.string()), @@ -25,6 +33,7 @@ const DatasourceBaseSchema = { type: schema.string(), enabled: schema.boolean(), processors: schema.maybe(schema.arrayOf(schema.string())), + vars: schema.maybe(ConfigRecordSchema), config: schema.maybe( schema.recordOf( schema.string(), @@ -40,6 +49,7 @@ const DatasourceBaseSchema = { enabled: schema.boolean(), dataset: schema.string(), processors: schema.maybe(schema.arrayOf(schema.string())), + vars: schema.maybe(ConfigRecordSchema), config: schema.maybe( schema.recordOf( schema.string(), diff --git a/x-pack/plugins/licensing/server/mocks.ts b/x-pack/plugins/licensing/server/mocks.ts index d622e3f71eff54..154692a2fd1979 100644 --- a/x-pack/plugins/licensing/server/mocks.ts +++ b/x-pack/plugins/licensing/server/mocks.ts @@ -4,15 +4,17 @@ * you may not use this file except in compliance with the Elastic License. */ import { BehaviorSubject } from 'rxjs'; -import { LicensingPluginSetup } from './types'; +import { LicensingPluginSetup, LicensingPluginStart } from './types'; import { licenseMock } from '../common/licensing.mock'; +import { featureUsageMock } from './services/feature_usage_service.mock'; -const createSetupMock = () => { +const createSetupMock = (): jest.Mocked => { const license = licenseMock.createLicense(); - const mock: jest.Mocked = { + const mock = { license$: new BehaviorSubject(license), refresh: jest.fn(), createLicensePoller: jest.fn(), + featureUsage: featureUsageMock.createSetup(), }; mock.refresh.mockResolvedValue(license); mock.createLicensePoller.mockReturnValue({ @@ -23,7 +25,16 @@ const createSetupMock = () => { return mock; }; +const createStartMock = (): jest.Mocked => { + const mock = { + featureUsage: featureUsageMock.createStart(), + }; + + return mock; +}; + export const licensingMock = { createSetup: createSetupMock, + createStart: createStartMock, ...licenseMock, }; diff --git a/x-pack/plugins/licensing/server/plugin.ts b/x-pack/plugins/licensing/server/plugin.ts index 383245e6f4ee8a..ee43ac0ce233cd 100644 --- a/x-pack/plugins/licensing/server/plugin.ts +++ b/x-pack/plugins/licensing/server/plugin.ts @@ -20,12 +20,13 @@ import { } from 'src/core/server'; import { ILicense, PublicLicense, PublicFeatures } from '../common/types'; -import { LicensingPluginSetup } from './types'; +import { LicensingPluginSetup, LicensingPluginStart } from './types'; import { License } from '../common/license'; import { createLicenseUpdate } from '../common/license_update'; import { ElasticsearchError, RawLicense, RawFeatures } from './types'; import { registerRoutes } from './routes'; +import { FeatureUsageService } from './services'; import { LicenseConfigType } from './licensing_config'; import { createRouteHandlerContext } from './licensing_route_handler_context'; @@ -77,18 +78,19 @@ function sign({ * A plugin for fetching, refreshing, and receiving information about the license for the * current Kibana instance. */ -export class LicensingPlugin implements Plugin { +export class LicensingPlugin implements Plugin { private stop$ = new Subject(); private readonly logger: Logger; private readonly config$: Observable; private loggingSubscription?: Subscription; + private featureUsage = new FeatureUsageService(); constructor(private readonly context: PluginInitializerContext) { this.logger = this.context.logger.get(); this.config$ = this.context.config.create(); } - public async setup(core: CoreSetup) { + public async setup(core: CoreSetup<{}, LicensingPluginStart>) { this.logger.debug('Setting up Licensing plugin'); const config = await this.config$.pipe(take(1)).toPromise(); const pollingFrequency = config.api_polling_frequency; @@ -101,13 +103,14 @@ export class LicensingPlugin implements Plugin { core.http.registerRouteHandlerContext('licensing', createRouteHandlerContext(license$)); - registerRoutes(core.http.createRouter()); + registerRoutes(core.http.createRouter(), core.getStartServices); core.http.registerOnPreResponse(createOnPreResponseHandler(refresh, license$)); return { refresh, license$, createLicensePoller: this.createLicensePoller.bind(this), + featureUsage: this.featureUsage.setup(), }; } @@ -186,7 +189,11 @@ export class LicensingPlugin implements Plugin { return error.message; } - public async start(core: CoreStart) {} + public async start(core: CoreStart) { + return { + featureUsage: this.featureUsage.start(), + }; + } public stop() { this.stop$.next(); diff --git a/x-pack/plugins/licensing/server/routes/feature_usage.ts b/x-pack/plugins/licensing/server/routes/feature_usage.ts new file mode 100644 index 00000000000000..5fbfbc3f577b81 --- /dev/null +++ b/x-pack/plugins/licensing/server/routes/feature_usage.ts @@ -0,0 +1,30 @@ +/* + * 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. + */ +import { IRouter, StartServicesAccessor } from 'src/core/server'; +import { LicensingPluginStart } from '../types'; + +export function registerFeatureUsageRoute( + router: IRouter, + getStartServices: StartServicesAccessor<{}, LicensingPluginStart> +) { + router.get( + { path: '/api/licensing/feature_usage', validate: false }, + async (context, request, response) => { + const [, , { featureUsage }] = await getStartServices(); + return response.ok({ + body: [...featureUsage.getLastUsages().entries()].reduce( + (res, [featureName, lastUsage]) => { + return { + ...res, + [featureName]: new Date(lastUsage).toISOString(), + }; + }, + {} + ), + }); + } + ); +} diff --git a/x-pack/plugins/licensing/server/routes/index.ts b/x-pack/plugins/licensing/server/routes/index.ts index 26b3bc6292dd62..2d073a92e507e9 100644 --- a/x-pack/plugins/licensing/server/routes/index.ts +++ b/x-pack/plugins/licensing/server/routes/index.ts @@ -3,9 +3,16 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -import { IRouter } from 'src/core/server'; + +import { IRouter, StartServicesAccessor } from 'src/core/server'; +import { LicensingPluginStart } from '../types'; import { registerInfoRoute } from './info'; +import { registerFeatureUsageRoute } from './feature_usage'; -export function registerRoutes(router: IRouter) { +export function registerRoutes( + router: IRouter, + getStartServices: StartServicesAccessor<{}, LicensingPluginStart> +) { registerInfoRoute(router); + registerFeatureUsageRoute(router, getStartServices); } diff --git a/x-pack/plugins/licensing/server/services/feature_usage_service.mock.ts b/x-pack/plugins/licensing/server/services/feature_usage_service.mock.ts new file mode 100644 index 00000000000000..f247c6ffcb526c --- /dev/null +++ b/x-pack/plugins/licensing/server/services/feature_usage_service.mock.ts @@ -0,0 +1,43 @@ +/* + * 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. + */ + +import { + FeatureUsageService, + FeatureUsageServiceSetup, + FeatureUsageServiceStart, +} from './feature_usage_service'; + +const createSetupMock = (): jest.Mocked => { + const mock = { + register: jest.fn(), + }; + + return mock; +}; + +const createStartMock = (): jest.Mocked => { + const mock = { + notifyUsage: jest.fn(), + getLastUsages: jest.fn(), + }; + + return mock; +}; + +const createServiceMock = (): jest.Mocked> => { + const mock = { + setup: jest.fn(() => createSetupMock()), + start: jest.fn(() => createStartMock()), + }; + + return mock; +}; + +export const featureUsageMock = { + create: createServiceMock, + createSetup: createSetupMock, + createStart: createStartMock, +}; diff --git a/x-pack/plugins/licensing/server/services/feature_usage_service.test.ts b/x-pack/plugins/licensing/server/services/feature_usage_service.test.ts new file mode 100644 index 00000000000000..f0ef0dbec0b220 --- /dev/null +++ b/x-pack/plugins/licensing/server/services/feature_usage_service.test.ts @@ -0,0 +1,116 @@ +/* + * 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. + */ + +import { FeatureUsageService } from './feature_usage_service'; + +describe('FeatureUsageService', () => { + let service: FeatureUsageService; + + beforeEach(() => { + service = new FeatureUsageService(); + }); + + afterEach(() => { + jest.restoreAllMocks(); + }); + + const toObj = (map: ReadonlyMap): Record => + Object.fromEntries(map.entries()); + + describe('#setup', () => { + describe('#register', () => { + it('throws when registering the same feature twice', () => { + const setup = service.setup(); + setup.register('foo'); + expect(() => { + setup.register('foo'); + }).toThrowErrorMatchingInlineSnapshot(`"Feature 'foo' has already been registered."`); + }); + }); + }); + + describe('#start', () => { + describe('#notifyUsage', () => { + it('allows to notify a feature usage', () => { + const setup = service.setup(); + setup.register('feature'); + const start = service.start(); + start.notifyUsage('feature', 127001); + + expect(start.getLastUsages().get('feature')).toBe(127001); + }); + + it('can receive a Date object', () => { + const setup = service.setup(); + setup.register('feature'); + const start = service.start(); + + const usageTime = new Date(2015, 9, 21, 17, 54, 12); + start.notifyUsage('feature', usageTime); + expect(start.getLastUsages().get('feature')).toBe(usageTime.getTime()); + }); + + it('uses the current time when `usedAt` is unspecified', () => { + jest.spyOn(Date, 'now').mockReturnValue(42); + + const setup = service.setup(); + setup.register('feature'); + const start = service.start(); + start.notifyUsage('feature'); + + expect(start.getLastUsages().get('feature')).toBe(42); + }); + + it('throws when notifying for an unregistered feature', () => { + service.setup(); + const start = service.start(); + expect(() => { + start.notifyUsage('unregistered'); + }).toThrowErrorMatchingInlineSnapshot(`"Feature 'unregistered' is not registered."`); + }); + }); + + describe('#getLastUsages', () => { + it('returns the last usage for all used features', () => { + const setup = service.setup(); + setup.register('featureA'); + setup.register('featureB'); + const start = service.start(); + start.notifyUsage('featureA', 127001); + start.notifyUsage('featureB', 6666); + + expect(toObj(start.getLastUsages())).toEqual({ + featureA: 127001, + featureB: 6666, + }); + }); + + it('returns the last usage even after notifying for an older usage', () => { + const setup = service.setup(); + setup.register('featureA'); + const start = service.start(); + start.notifyUsage('featureA', 1000); + start.notifyUsage('featureA', 500); + + expect(toObj(start.getLastUsages())).toEqual({ + featureA: 1000, + }); + }); + + it('does not return entries for unused registered features', () => { + const setup = service.setup(); + setup.register('featureA'); + setup.register('featureB'); + const start = service.start(); + start.notifyUsage('featureA', 127001); + + expect(toObj(start.getLastUsages())).toEqual({ + featureA: 127001, + }); + }); + }); + }); +}); diff --git a/x-pack/plugins/licensing/server/services/feature_usage_service.ts b/x-pack/plugins/licensing/server/services/feature_usage_service.ts new file mode 100644 index 00000000000000..47ffe3a3d9f54f --- /dev/null +++ b/x-pack/plugins/licensing/server/services/feature_usage_service.ts @@ -0,0 +1,63 @@ +/* + * 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. + */ + +import { isDate } from 'lodash'; + +/** @public */ +export interface FeatureUsageServiceSetup { + /** + * Register a feature to be able to notify of it's usages using the {@link FeatureUsageServiceStart | service start contract}. + */ + register(featureName: string): void; +} + +/** @public */ +export interface FeatureUsageServiceStart { + /** + * Notify of a registered feature usage at given time. + * + * @param featureName - the name of the feature to notify usage of + * @param usedAt - Either a `Date` or an unix timestamp with ms. If not specified, it will be set to the current time. + */ + notifyUsage(featureName: string, usedAt?: Date | number): void; + /** + * Return a map containing last usage timestamp for all features. + * Features that were not used yet do not appear in the map. + */ + getLastUsages(): ReadonlyMap; +} + +export class FeatureUsageService { + private readonly features: string[] = []; + private readonly lastUsages = new Map(); + + public setup(): FeatureUsageServiceSetup { + return { + register: featureName => { + if (this.features.includes(featureName)) { + throw new Error(`Feature '${featureName}' has already been registered.`); + } + this.features.push(featureName); + }, + }; + } + + public start(): FeatureUsageServiceStart { + return { + notifyUsage: (featureName, usedAt = Date.now()) => { + if (!this.features.includes(featureName)) { + throw new Error(`Feature '${featureName}' is not registered.`); + } + if (isDate(usedAt)) { + usedAt = usedAt.getTime(); + } + const currentValue = this.lastUsages.get(featureName) ?? 0; + this.lastUsages.set(featureName, Math.max(usedAt, currentValue)); + }, + getLastUsages: () => new Map(this.lastUsages.entries()), + }; + } +} diff --git a/x-pack/plugins/licensing/server/services/index.ts b/x-pack/plugins/licensing/server/services/index.ts new file mode 100644 index 00000000000000..fc890dd3c927d6 --- /dev/null +++ b/x-pack/plugins/licensing/server/services/index.ts @@ -0,0 +1,11 @@ +/* + * 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 { + FeatureUsageService, + FeatureUsageServiceSetup, + FeatureUsageServiceStart, +} from './feature_usage_service'; diff --git a/x-pack/plugins/licensing/server/types.ts b/x-pack/plugins/licensing/server/types.ts index f46167a0d0a42f..f11d9d5e69a585 100644 --- a/x-pack/plugins/licensing/server/types.ts +++ b/x-pack/plugins/licensing/server/types.ts @@ -6,6 +6,7 @@ import { Observable } from 'rxjs'; import { IClusterClient } from 'src/core/server'; import { ILicense, LicenseStatus, LicenseType } from '../common/types'; +import { FeatureUsageServiceSetup, FeatureUsageServiceStart } from './services'; export interface ElasticsearchError extends Error { status?: number; @@ -57,7 +58,6 @@ export interface LicensingPluginSetup { * Triggers licensing information re-fetch. */ refresh(): Promise; - /** * Creates a license poller to retrieve a license data with. * Allows a plugin to configure a cluster to retrieve data from at @@ -67,4 +67,16 @@ export interface LicensingPluginSetup { clusterClient: IClusterClient, pollingFrequency: number ) => { license$: Observable; refresh(): Promise }; + /** + * APIs to register licensed feature usage. + */ + featureUsage: FeatureUsageServiceSetup; +} + +/** @public */ +export interface LicensingPluginStart { + /** + * APIs to manage licensed feature usage. + */ + featureUsage: FeatureUsageServiceStart; } diff --git a/x-pack/plugins/maps/public/layers/sources/es_source/es_source.js b/x-pack/plugins/maps/public/layers/sources/es_source/es_source.js index ccd8bc4a859dbc..87733e347aa2a3 100644 --- a/x-pack/plugins/maps/public/layers/sources/es_source/es_source.js +++ b/x-pack/plugins/maps/public/layers/sources/es_source/es_source.js @@ -18,7 +18,6 @@ import { i18n } from '@kbn/i18n'; import uuid from 'uuid/v4'; import { copyPersistentState } from '../../../reducers/util'; -import { ES_GEO_FIELD_TYPE } from '../../../../common/constants'; import { DataRequestAbortError } from '../../util/data_request'; import { expandToTileBoundaries } from '../es_geo_grid_source/geo_tile_utils'; @@ -176,9 +175,11 @@ export class AbstractESSource extends AbstractVectorSource { }; } + const minLon = esBounds.top_left.lon; + const maxLon = esBounds.bottom_right.lon; return { - minLon: esBounds.top_left.lon, - maxLon: esBounds.bottom_right.lon, + minLon: minLon > maxLon ? minLon - 360 : minLon, + maxLon, minLat: esBounds.bottom_right.lat, maxLat: esBounds.top_left.lat, }; @@ -223,9 +224,7 @@ export class AbstractESSource extends AbstractVectorSource { async supportsFitToBounds() { try { const geoField = await this._getGeoField(); - // geo_bounds aggregation only supports geo_point - // there is currently no backend support for getting bounding box of geo_shape field - return geoField.type !== ES_GEO_FIELD_TYPE.GEO_SHAPE; + return geoField.aggregatable; } catch (error) { return false; } diff --git a/x-pack/plugins/maps/public/layers/util/can_skip_fetch.test.js b/x-pack/plugins/maps/public/layers/util/can_skip_fetch.test.js index 2a4843c78635f8..bf1f9de6b2d2be 100644 --- a/x-pack/plugins/maps/public/layers/util/can_skip_fetch.test.js +++ b/x-pack/plugins/maps/public/layers/util/can_skip_fetch.test.js @@ -8,101 +8,74 @@ import { canSkipSourceUpdate, updateDueToExtent } from './can_skip_fetch'; import { DataRequest } from './data_request'; describe('updateDueToExtent', () => { - it('should be false when the source is not extent aware', async () => { - const sourceMock = { - isFilterByMapBounds: () => { - return false; - }, + it('should be false when buffers are the same', async () => { + const oldBuffer = { + maxLat: 12.5, + maxLon: 102.5, + minLat: 2.5, + minLon: 92.5, }; - expect(updateDueToExtent(sourceMock)).toBe(false); + const newBuffer = { + maxLat: 12.5, + maxLon: 102.5, + minLat: 2.5, + minLon: 92.5, + }; + expect(updateDueToExtent({ buffer: oldBuffer }, { buffer: newBuffer })).toBe(false); }); - describe('source is extent aware', () => { - const sourceMock = { - isFilterByMapBounds: () => { - return true; - }, + it('should be false when the new buffer is contained in the old buffer', async () => { + const oldBuffer = { + maxLat: 12.5, + maxLon: 102.5, + minLat: 2.5, + minLon: 92.5, }; + const newBuffer = { + maxLat: 10, + maxLon: 100, + minLat: 5, + minLon: 95, + }; + expect(updateDueToExtent({ buffer: oldBuffer }, { buffer: newBuffer })).toBe(false); + }); - it('should be false when buffers are the same', async () => { - const oldBuffer = { - maxLat: 12.5, - maxLon: 102.5, - minLat: 2.5, - minLon: 92.5, - }; - const newBuffer = { - maxLat: 12.5, - maxLon: 102.5, - minLat: 2.5, - minLon: 92.5, - }; - expect(updateDueToExtent(sourceMock, { buffer: oldBuffer }, { buffer: newBuffer })).toBe( - false - ); - }); - - it('should be false when the new buffer is contained in the old buffer', async () => { - const oldBuffer = { - maxLat: 12.5, - maxLon: 102.5, - minLat: 2.5, - minLon: 92.5, - }; - const newBuffer = { - maxLat: 10, - maxLon: 100, - minLat: 5, - minLon: 95, - }; - expect(updateDueToExtent(sourceMock, { buffer: oldBuffer }, { buffer: newBuffer })).toBe( - false - ); - }); - - it('should be true when the new buffer is contained in the old buffer and the past results were truncated', async () => { - const oldBuffer = { - maxLat: 12.5, - maxLon: 102.5, - minLat: 2.5, - minLon: 92.5, - }; - const newBuffer = { - maxLat: 10, - maxLon: 100, - minLat: 5, - minLon: 95, - }; - expect( - updateDueToExtent( - sourceMock, - { buffer: oldBuffer, areResultsTrimmed: true }, - { buffer: newBuffer } - ) - ).toBe(true); - }); + it('should be true when the new buffer is contained in the old buffer and the past results were truncated', async () => { + const oldBuffer = { + maxLat: 12.5, + maxLon: 102.5, + minLat: 2.5, + minLon: 92.5, + }; + const newBuffer = { + maxLat: 10, + maxLon: 100, + minLat: 5, + minLon: 95, + }; + expect( + updateDueToExtent({ buffer: oldBuffer, areResultsTrimmed: true }, { buffer: newBuffer }) + ).toBe(true); + }); - it('should be true when meta has no old buffer', async () => { - expect(updateDueToExtent(sourceMock)).toBe(true); - }); + it('should be true when meta has no old buffer', async () => { + expect(updateDueToExtent()).toBe(true); + }); - it('should be true when the new buffer is not contained in the old buffer', async () => { - const oldBuffer = { - maxLat: 12.5, - maxLon: 102.5, - minLat: 2.5, - minLon: 92.5, - }; - const newBuffer = { - maxLat: 7.5, - maxLon: 92.5, - minLat: -2.5, - minLon: 82.5, - }; - expect(updateDueToExtent(sourceMock, { buffer: oldBuffer }, { buffer: newBuffer })).toBe( - true - ); - }); + it('should be true when the new buffer is not contained in the old buffer', async () => { + const oldBuffer = { + maxLat: 12.5, + maxLon: 102.5, + minLat: 2.5, + minLon: 92.5, + }; + const newBuffer = { + maxLat: 7.5, + maxLon: 92.5, + minLat: -2.5, + minLon: 82.5, + }; + expect(updateDueToExtent({ buffer: oldBuffer }, { buffer: newBuffer })).toBe(true); }); }); diff --git a/x-pack/plugins/maps/public/layers/util/can_skip_fetch.ts b/x-pack/plugins/maps/public/layers/util/can_skip_fetch.ts index 758cc35f41fbb7..8398bd7af39adc 100644 --- a/x-pack/plugins/maps/public/layers/util/can_skip_fetch.ts +++ b/x-pack/plugins/maps/public/layers/util/can_skip_fetch.ts @@ -15,16 +15,7 @@ import { DataRequest } from './data_request'; const SOURCE_UPDATE_REQUIRED = true; const NO_SOURCE_UPDATE_REQUIRED = false; -export function updateDueToExtent( - source: ISource, - prevMeta: DataMeta = {}, - nextMeta: DataMeta = {} -) { - const extentAware = source.isFilterByMapBounds(); - if (!extentAware) { - return NO_SOURCE_UPDATE_REQUIRED; - } - +export function updateDueToExtent(prevMeta: DataMeta = {}, nextMeta: DataMeta = {}) { const { buffer: previousBuffer } = prevMeta; const { buffer: newBuffer } = nextMeta; @@ -134,7 +125,10 @@ export async function canSkipSourceUpdate({ updateDueToPrecisionChange = !_.isEqual(prevMeta.geogridPrecision, nextMeta.geogridPrecision); } - const updateDueToExtentChange = updateDueToExtent(source, prevMeta, nextMeta); + let updateDueToExtentChange = false; + if (extentAware) { + updateDueToExtentChange = updateDueToExtent(prevMeta, nextMeta); + } const updateDueToSourceMetaChange = !_.isEqual(prevMeta.sourceMeta, nextMeta.sourceMeta); diff --git a/x-pack/plugins/maps/public/layers/vector_layer.js b/x-pack/plugins/maps/public/layers/vector_layer.js index 17b7f8152d76da..582e34bce2e985 100644 --- a/x-pack/plugins/maps/public/layers/vector_layer.js +++ b/x-pack/plugins/maps/public/layers/vector_layer.js @@ -175,8 +175,7 @@ export class VectorLayer extends AbstractLayer { } async getBounds(dataFilters) { - const isStaticLayer = - !this.getSource().isBoundsAware() || !this.getSource().isFilterByMapBounds(); + const isStaticLayer = !this.getSource().isBoundsAware(); if (isStaticLayer) { return this._getBoundsBasedOnData(); } diff --git a/x-pack/plugins/ml/common/constants/settings.ts b/x-pack/plugins/ml/common/constants/settings.ts new file mode 100644 index 00000000000000..2df2ecd22e0788 --- /dev/null +++ b/x-pack/plugins/ml/common/constants/settings.ts @@ -0,0 +1,7 @@ +/* + * 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 FILE_DATA_VISUALIZER_MAX_FILE_SIZE = 'ml:fileDataVisualizerMaxFileSize'; diff --git a/x-pack/plugins/ml/common/types/ml_config.ts b/x-pack/plugins/ml/common/types/ml_config.ts deleted file mode 100644 index f2ddadccb21703..00000000000000 --- a/x-pack/plugins/ml/common/types/ml_config.ts +++ /dev/null @@ -1,16 +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. - */ - -import { schema, TypeOf } from '@kbn/config-schema'; -import { MAX_FILE_SIZE } from '../constants/file_datavisualizer'; - -export const configSchema = schema.object({ - file_data_visualizer: schema.object({ - max_file_size: schema.string({ defaultValue: MAX_FILE_SIZE }), - }), -}); - -export type MlConfigType = TypeOf; diff --git a/x-pack/plugins/ml/public/application/app.tsx b/x-pack/plugins/ml/public/application/app.tsx index f1facd18b9da5b..e9796fcbb0fe44 100644 --- a/x-pack/plugins/ml/public/application/app.tsx +++ b/x-pack/plugins/ml/public/application/app.tsx @@ -15,14 +15,10 @@ import { KibanaContextProvider } from '../../../../../src/plugins/kibana_react/p import { setDependencyCache, clearCache } from './util/dependency_cache'; import { setLicenseCache } from './license'; import { MlSetupDependencies, MlStartDependencies } from '../plugin'; -import { MlConfigType } from '../../common/types/ml_config'; import { MlRouter } from './routing'; -type MlDependencies = MlSetupDependencies & - MlStartDependencies & { - mlConfig: MlConfigType; - }; +type MlDependencies = MlSetupDependencies & MlStartDependencies; interface AppProps { coreStart: CoreStart; @@ -78,7 +74,6 @@ export const renderApp = ( http: coreStart.http, security: deps.security, urlGenerators: deps.share.urlGenerators, - mlConfig: deps.mlConfig, }); const mlLicense = setLicenseCache(deps.licensing); diff --git a/x-pack/plugins/ml/public/application/datavisualizer/file_based/components/utils/utils.ts b/x-pack/plugins/ml/public/application/datavisualizer/file_based/components/utils/utils.ts index 7b6464570e55c0..7d966949624c1f 100644 --- a/x-pack/plugins/ml/public/application/datavisualizer/file_based/components/utils/utils.ts +++ b/x-pack/plugins/ml/public/application/datavisualizer/file_based/components/utils/utils.ts @@ -9,11 +9,13 @@ import numeral from '@elastic/numeral'; import { ml } from '../../../../services/ml_api_service'; import { AnalysisResult, InputOverrides } from '../../../../../../common/types/file_datavisualizer'; import { + MAX_FILE_SIZE, MAX_FILE_SIZE_BYTES, ABSOLUTE_MAX_FILE_SIZE_BYTES, FILE_SIZE_DISPLAY_FORMAT, } from '../../../../../../common/constants/file_datavisualizer'; -import { getMlConfig } from '../../../../util/dependency_cache'; +import { getUiSettings } from '../../../../util/dependency_cache'; +import { FILE_DATA_VISUALIZER_MAX_FILE_SIZE } from '../../../../../../common/constants/settings'; const DEFAULT_LINES_TO_SAMPLE = 1000; const UPLOAD_SIZE_MB = 5; @@ -62,13 +64,13 @@ export function readFile(file: File) { } export function getMaxBytes() { - const maxFileSize = getMlConfig().file_data_visualizer.max_file_size; + const maxFileSize = getUiSettings().get(FILE_DATA_VISUALIZER_MAX_FILE_SIZE, MAX_FILE_SIZE); // @ts-ignore const maxBytes = numeral(maxFileSize.toUpperCase()).value(); if (maxBytes < MAX_FILE_SIZE_BYTES) { return MAX_FILE_SIZE_BYTES; } - return maxBytes < ABSOLUTE_MAX_FILE_SIZE_BYTES ? maxBytes : ABSOLUTE_MAX_FILE_SIZE_BYTES; + return maxBytes <= ABSOLUTE_MAX_FILE_SIZE_BYTES ? maxBytes : ABSOLUTE_MAX_FILE_SIZE_BYTES; } export function getMaxBytesFormatted() { diff --git a/x-pack/plugins/ml/public/application/util/chart_utils.js b/x-pack/plugins/ml/public/application/util/chart_utils.js index 3fd228377c57e4..5a062320ca6c5c 100644 --- a/x-pack/plugins/ml/public/application/util/chart_utils.js +++ b/x-pack/plugins/ml/public/application/util/chart_utils.js @@ -107,7 +107,7 @@ export function drawLineChartDots(data, lineChartGroup, lineChartValuesLine, rad } // this replicates Kibana's filterAxisLabels() behavior -// which can be found in src/legacy/core_plugins/vis_type_vislib/public/vislib/lib/axis/axis_labels.js +// which can be found in src/plugins/vis_type_vislib/public/vislib/lib/axis/axis_labels.js // axis labels which overflow the chart's boundaries will be removed export function filterAxisLabels(selection, chartWidth) { if (selection === undefined || selection.selectAll === undefined) { diff --git a/x-pack/plugins/ml/public/application/util/dependency_cache.ts b/x-pack/plugins/ml/public/application/util/dependency_cache.ts index f8dd2a37dd589e..356da38d5ad08b 100644 --- a/x-pack/plugins/ml/public/application/util/dependency_cache.ts +++ b/x-pack/plugins/ml/public/application/util/dependency_cache.ts @@ -23,7 +23,6 @@ import { } from 'kibana/public'; import { SharePluginStart } from 'src/plugins/share/public'; import { SecurityPluginSetup } from '../../../../security/public'; -import { MlConfigType } from '../../../common/types/ml_config'; export interface DependencyCache { timefilter: DataPublicPluginSetup['query']['timefilter'] | null; @@ -43,7 +42,6 @@ export interface DependencyCache { security: SecurityPluginSetup | undefined | null; i18n: I18nStart | null; urlGenerators: SharePluginStart['urlGenerators'] | null; - mlConfig: MlConfigType | null; } const cache: DependencyCache = { @@ -64,7 +62,6 @@ const cache: DependencyCache = { security: null, i18n: null, urlGenerators: null, - mlConfig: null, }; export function setDependencyCache(deps: Partial) { @@ -85,7 +82,6 @@ export function setDependencyCache(deps: Partial) { cache.security = deps.security || null; cache.i18n = deps.i18n || null; cache.urlGenerators = deps.urlGenerators || null; - cache.mlConfig = deps.mlConfig || null; } export function getTimefilter() { @@ -206,13 +202,6 @@ export function getGetUrlGenerator() { return cache.urlGenerators.getUrlGenerator; } -export function getMlConfig() { - if (cache.mlConfig === null) { - throw new Error("mlConfig hasn't been initialized"); - } - return cache.mlConfig; -} - export function clearCache() { console.log('clearing dependency cache'); // eslint-disable-line no-console Object.keys(cache).forEach(k => { diff --git a/x-pack/plugins/ml/public/index.ts b/x-pack/plugins/ml/public/index.ts index 4697496270edf2..8070f94a1264dd 100755 --- a/x-pack/plugins/ml/public/index.ts +++ b/x-pack/plugins/ml/public/index.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { PluginInitializer, PluginInitializerContext } from 'kibana/public'; +import { PluginInitializer } from 'kibana/public'; import './index.scss'; import { MlPlugin, @@ -19,6 +19,6 @@ export const plugin: PluginInitializer< MlPluginStart, MlSetupDependencies, MlStartDependencies -> = (context: PluginInitializerContext) => new MlPlugin(context); +> = () => new MlPlugin(); export { MlPluginSetup, MlPluginStart }; diff --git a/x-pack/plugins/ml/public/plugin.ts b/x-pack/plugins/ml/public/plugin.ts index e3b8441db432e3..d37d1fd815eb57 100644 --- a/x-pack/plugins/ml/public/plugin.ts +++ b/x-pack/plugins/ml/public/plugin.ts @@ -5,13 +5,7 @@ */ import { i18n } from '@kbn/i18n'; -import { - Plugin, - CoreStart, - CoreSetup, - AppMountParameters, - PluginInitializerContext, -} from 'kibana/public'; +import { Plugin, CoreStart, CoreSetup, AppMountParameters } from 'kibana/public'; import { ManagementSetup } from 'src/plugins/management/public'; import { SharePluginStart } from 'src/plugins/share/public'; import { UsageCollectionSetup } from 'src/plugins/usage_collection/server'; @@ -25,7 +19,6 @@ import { LicenseManagementUIPluginSetup } from '../../license_management/public' import { setDependencyCache } from './application/util/dependency_cache'; import { PLUGIN_ID, PLUGIN_ICON } from '../common/constants/app'; import { registerFeature } from './register_feature'; -import { MlConfigType } from '../common/types/ml_config'; export interface MlStartDependencies { data: DataPublicPluginStart; @@ -41,10 +34,7 @@ export interface MlSetupDependencies { } export class MlPlugin implements Plugin { - constructor(private readonly initializerContext: PluginInitializerContext) {} - setup(core: CoreSetup, pluginsSetup: MlSetupDependencies) { - const mlConfig = this.initializerContext.config.get(); core.application.register({ id: PLUGIN_ID, title: i18n.translate('xpack.ml.plugin.title', { @@ -67,7 +57,6 @@ export class MlPlugin implements Plugin { usageCollection: pluginsSetup.usageCollection, licenseManagement: pluginsSetup.licenseManagement, home: pluginsSetup.home, - mlConfig, }, { element: params.element, diff --git a/x-pack/plugins/ml/server/config.ts b/x-pack/plugins/ml/server/config.ts deleted file mode 100644 index 7cef6f17bbefb4..00000000000000 --- a/x-pack/plugins/ml/server/config.ts +++ /dev/null @@ -1,15 +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. - */ - -import { PluginConfigDescriptor } from 'kibana/server'; -import { MlConfigType, configSchema } from '../common/types/ml_config'; - -export const config: PluginConfigDescriptor = { - exposeToBrowser: { - file_data_visualizer: true, - }, - schema: configSchema, -}; diff --git a/x-pack/plugins/ml/server/index.ts b/x-pack/plugins/ml/server/index.ts index 6e638d647a3875..175c20bf49c947 100644 --- a/x-pack/plugins/ml/server/index.ts +++ b/x-pack/plugins/ml/server/index.ts @@ -9,5 +9,3 @@ import { MlServerPlugin } from './plugin'; export { MlPluginSetup, MlPluginStart } from './plugin'; export const plugin = (ctx: PluginInitializerContext) => new MlServerPlugin(ctx); - -export { config } from './config'; diff --git a/x-pack/plugins/ml/server/lib/register_settings.ts b/x-pack/plugins/ml/server/lib/register_settings.ts new file mode 100644 index 00000000000000..38b1f5e3fc0834 --- /dev/null +++ b/x-pack/plugins/ml/server/lib/register_settings.ts @@ -0,0 +1,34 @@ +/* + * 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. + */ + +import { CoreSetup } from 'kibana/server'; +import { i18n } from '@kbn/i18n'; +import { schema } from '@kbn/config-schema'; +import { FILE_DATA_VISUALIZER_MAX_FILE_SIZE } from '../../common/constants/settings'; +import { MAX_FILE_SIZE } from '../../common/constants/file_datavisualizer'; + +export function registerKibanaSettings(coreSetup: CoreSetup) { + coreSetup.uiSettings.register({ + [FILE_DATA_VISUALIZER_MAX_FILE_SIZE]: { + name: i18n.translate('xpack.ml.maxFileSizeSettingsName', { + defaultMessage: 'File Data Visualizer maximum file upload size', + }), + value: MAX_FILE_SIZE, + description: i18n.translate('xpack.ml.maxFileSizeSettingsDescription', { + defaultMessage: + 'Sets the file size limit when importing data in the File Data Visualizer. The highest supported value for this setting is 1GB.', + }), + category: ['Machine Learning'], + schema: schema.string(), + validation: { + regexString: '\\d+[mMgG][bB]', + message: i18n.translate('xpack.ml.maxFileSizeSettingsError', { + defaultMessage: 'Should be a valid data size. e.g. 200MB, 1GB', + }), + }, + }, + }); +} diff --git a/x-pack/plugins/ml/server/plugin.ts b/x-pack/plugins/ml/server/plugin.ts index 67e80a3bc44c05..64f8eb4b0acd3a 100644 --- a/x-pack/plugins/ml/server/plugin.ts +++ b/x-pack/plugins/ml/server/plugin.ts @@ -47,6 +47,7 @@ import { MlServerLicense } from './lib/license'; import { createSharedServices, SharedServices } from './shared_services'; import { userMlCapabilities, adminMlCapabilities } from '../common/types/capabilities'; import { setupCapabilitiesSwitcher } from './lib/capabilities'; +import { registerKibanaSettings } from './lib/register_settings'; declare module 'kibana/server' { interface RequestHandlerContext { @@ -122,6 +123,8 @@ export class MlServerPlugin implements Plugin initSampleDataSets(mlLicense, plugins), ]); diff --git a/x-pack/plugins/security/common/login_state.ts b/x-pack/plugins/security/common/login_state.ts index 4342e82d2f90b1..fd2b1cb8d1cf7e 100644 --- a/x-pack/plugins/security/common/login_state.ts +++ b/x-pack/plugins/security/common/login_state.ts @@ -6,15 +6,24 @@ import { LoginLayout } from './licensing'; +export interface LoginSelectorProvider { + type: string; + name: string; + usesLoginForm: boolean; + description?: string; + hint?: string; + icon?: string; +} + export interface LoginSelector { enabled: boolean; - providers: Array<{ type: string; name: string; description?: string }>; + providers: LoginSelectorProvider[]; } export interface LoginState { layout: LoginLayout; allowLogin: boolean; - showLoginForm: boolean; requiresSecureConnection: boolean; + loginHelp?: string; selector: LoginSelector; } diff --git a/x-pack/plugins/security/public/authentication/_index.scss b/x-pack/plugins/security/public/authentication/_index.scss deleted file mode 100644 index 0a423c00f0218a..00000000000000 --- a/x-pack/plugins/security/public/authentication/_index.scss +++ /dev/null @@ -1,5 +0,0 @@ -// Component styles -@import './components/index'; - -// Login styles -@import './login/index'; diff --git a/x-pack/plugins/security/public/authentication/components/_index.scss b/x-pack/plugins/security/public/authentication/components/_index.scss deleted file mode 100644 index dfa258d523c5a4..00000000000000 --- a/x-pack/plugins/security/public/authentication/components/_index.scss +++ /dev/null @@ -1 +0,0 @@ -@import './authentication_state_page/index'; diff --git a/x-pack/plugins/security/public/authentication/components/authentication_state_page/_index.scss b/x-pack/plugins/security/public/authentication/components/authentication_state_page/_index.scss deleted file mode 100644 index f7cdd751437919..00000000000000 --- a/x-pack/plugins/security/public/authentication/components/authentication_state_page/_index.scss +++ /dev/null @@ -1 +0,0 @@ -@import './authentication_state_page'; diff --git a/x-pack/plugins/security/public/authentication/components/authentication_state_page/authentication_state_page.tsx b/x-pack/plugins/security/public/authentication/components/authentication_state_page/authentication_state_page.tsx index aa306611299783..66176129407cd0 100644 --- a/x-pack/plugins/security/public/authentication/components/authentication_state_page/authentication_state_page.tsx +++ b/x-pack/plugins/security/public/authentication/components/authentication_state_page/authentication_state_page.tsx @@ -4,6 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ +import './_authentication_state_page.scss'; + import { EuiIcon, EuiSpacer, EuiTitle } from '@elastic/eui'; import React from 'react'; diff --git a/x-pack/plugins/security/public/authentication/login/__snapshots__/login_page.test.tsx.snap b/x-pack/plugins/security/public/authentication/login/__snapshots__/login_page.test.tsx.snap index ecbdfedac1dd38..bbc6bfa1faddc7 100644 --- a/x-pack/plugins/security/public/authentication/login/__snapshots__/login_page.test.tsx.snap +++ b/x-pack/plugins/security/public/authentication/login/__snapshots__/login_page.test.tsx.snap @@ -121,10 +121,15 @@ exports[`LoginPage enabled form state renders as expected 1`] = ` selector={ Object { "enabled": false, - "providers": Array [], + "providers": Array [ + Object { + "name": "basic1", + "type": "basic", + "usesLoginForm": true, + }, + ], } } - showLoginForm={true} /> `; @@ -155,10 +160,15 @@ exports[`LoginPage enabled form state renders as expected when info message is s selector={ Object { "enabled": false, - "providers": Array [], + "providers": Array [ + Object { + "name": "basic1", + "type": "basic", + "usesLoginForm": true, + }, + ], } } - showLoginForm={true} /> `; @@ -189,10 +199,55 @@ exports[`LoginPage enabled form state renders as expected when loginAssistanceMe selector={ Object { "enabled": false, - "providers": Array [], + "providers": Array [ + Object { + "name": "basic1", + "type": "basic", + "usesLoginForm": true, + }, + ], + } + } +/> +`; + +exports[`LoginPage enabled form state renders as expected when loginHelp is set 1`] = ` + `; @@ -279,10 +334,15 @@ exports[`LoginPage page renders as expected 1`] = ` selector={ Object { "enabled": false, - "providers": Array [], + "providers": Array [ + Object { + "name": "basic1", + "type": "basic", + "usesLoginForm": true, + }, + ], } } - showLoginForm={true} /> diff --git a/x-pack/plugins/security/public/authentication/login/_index.scss b/x-pack/plugins/security/public/authentication/login/_index.scss deleted file mode 100644 index 4dd2c0cabfb5e8..00000000000000 --- a/x-pack/plugins/security/public/authentication/login/_index.scss +++ /dev/null @@ -1 +0,0 @@ -@import './login_page'; diff --git a/x-pack/plugins/security/public/authentication/login/components/login_form/__snapshots__/login_form.test.tsx.snap b/x-pack/plugins/security/public/authentication/login/components/login_form/__snapshots__/login_form.test.tsx.snap index 7b8283b7bec0e6..072a025aa06a07 100644 --- a/x-pack/plugins/security/public/authentication/login/components/login_form/__snapshots__/login_form.test.tsx.snap +++ b/x-pack/plugins/security/public/authentication/login/components/login_form/__snapshots__/login_form.test.tsx.snap @@ -1,170 +1,91 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`LoginForm login selector renders as expected with login form 1`] = ` - - - Login w/SAML - - - - Login w/PKI - - - login help and back: Login Help 1`] = ` + +
- ―――   - -   ――― - - - -
- - } - labelType="label" + - - - - } - labelType="label" - > - - - - - - -
- + some help + +

+
+
`; -exports[`LoginForm login selector renders as expected without login form for providers with and without description 1`] = ` - - +
- Login w/SAML - - - + + some help + +

+
+ +`; + +exports[`LoginForm properly switches to login help: Login Help 1`] = ` + +
- - - - +

+ + some help + +

+
+
`; exports[`LoginForm renders as expected 1`] = ` - +
@@ -227,21 +148,32 @@ exports[`LoginForm renders as expected 1`] = ` value="" /> - + - - + + + + + +
diff --git a/x-pack/plugins/security/public/authentication/login/components/login_form/login_form.scss b/x-pack/plugins/security/public/authentication/login/components/login_form/login_form.scss new file mode 100644 index 00000000000000..6784052ef4337e --- /dev/null +++ b/x-pack/plugins/security/public/authentication/login/components/login_form/login_form.scss @@ -0,0 +1,55 @@ +.secLoginCard { + display: block; + box-shadow: none; + padding: $euiSize; + text-align: left; + width: 100%; + + &:hover { + .secLoginCard__title { + text-decoration: underline; + } + } + + &:disabled { + pointer-events: none; + } + + &:not(.secLoginCard-isLoading):disabled { + .secLoginCard__title, + .secLoginCard__hint { + color: $euiColorMediumShade; + } + } + + &:focus { + border-color: transparent; + border-radius: $euiBorderRadius; + @include euiFocusRing; + + .secLoginCard__title { + text-decoration: underline; + } + + // Make the focus ring clean and without borders + + .secLoginCard { + border-color: transparent; + } + } + + + .secLoginCard { + border-top: $euiBorderThin; + } +} + +.secLoginCard__hint { + @include euiFontSizeXS; + color: $euiColorDarkShade; + margin-top: $euiSizeXS; +} + +.secLoginAssistanceMessage { + // This tightens up the layout if message is present + margin-top: -($euiSizeXXL + $euiSizeS); + padding: 0 $euiSize; +} diff --git a/x-pack/plugins/security/public/authentication/login/components/login_form/login_form.test.tsx b/x-pack/plugins/security/public/authentication/login/components/login_form/login_form.test.tsx index c17c10a2c51484..4e172cdde0eeda 100644 --- a/x-pack/plugins/security/public/authentication/login/components/login_form/login_form.test.tsx +++ b/x-pack/plugins/security/public/authentication/login/components/login_form/login_form.test.tsx @@ -5,12 +5,39 @@ */ import React from 'react'; +import ReactMarkdown from 'react-markdown'; import { act } from '@testing-library/react'; -import { EuiButton, EuiCallOut } from '@elastic/eui'; +import { EuiButton, EuiCallOut, EuiIcon } from '@elastic/eui'; import { mountWithIntl, nextTick, shallowWithIntl } from 'test_utils/enzyme_helpers'; -import { LoginForm } from './login_form'; +import { findTestSubject } from 'test_utils/find_test_subject'; +import { LoginForm, PageMode } from './login_form'; import { coreMock } from '../../../../../../../../src/core/public/mocks'; +import { ReactWrapper } from 'enzyme'; + +function expectPageMode(wrapper: ReactWrapper, mode: PageMode) { + const assertions: Array<[string, boolean]> = + mode === PageMode.Form + ? [ + ['loginForm', true], + ['loginSelector', false], + ['loginHelp', false], + ] + : mode === PageMode.Selector + ? [ + ['loginForm', false], + ['loginSelector', true], + ['loginHelp', false], + ] + : [ + ['loginForm', false], + ['loginSelector', false], + ['loginHelp', true], + ]; + for (const [selector, exists] of assertions) { + expect(findTestSubject(wrapper, selector).exists()).toBe(exists); + } +} describe('LoginForm', () => { beforeAll(() => { @@ -32,8 +59,10 @@ describe('LoginForm', () => { http={coreStartMock.http} notifications={coreStartMock.notifications} loginAssistanceMessage="" - showLoginForm={true} - selector={{ enabled: false, providers: [] }} + selector={{ + enabled: false, + providers: [{ type: 'basic', name: 'basic', usesLoginForm: true }], + }} /> ) ).toMatchSnapshot(); @@ -41,20 +70,44 @@ describe('LoginForm', () => { it('renders an info message when provided.', () => { const coreStartMock = coreMock.createStart(); - const wrapper = shallowWithIntl( + const wrapper = mountWithIntl( ); + expectPageMode(wrapper, PageMode.Form); + expect(wrapper.find(EuiCallOut).props().title).toEqual('Hey this is an info message'); }); + it('renders `Need help?` link if login help text is provided.', () => { + const coreStartMock = coreMock.createStart(); + const wrapper = mountWithIntl( + + ); + + expectPageMode(wrapper, PageMode.Form); + + expect(findTestSubject(wrapper, 'loginHelpLink').text()).toEqual('Need help?'); + }); + it('renders an invalid credentials message', async () => { const coreStartMock = coreMock.createStart({ basePath: '/some-base-path' }); coreStartMock.http.post.mockRejectedValue({ response: { status: 401 } }); @@ -64,11 +117,15 @@ describe('LoginForm', () => { http={coreStartMock.http} notifications={coreStartMock.notifications} loginAssistanceMessage="" - showLoginForm={true} - selector={{ enabled: false, providers: [] }} + selector={{ + enabled: false, + providers: [{ type: 'basic', name: 'basic', usesLoginForm: true }], + }} /> ); + expectPageMode(wrapper, PageMode.Form); + wrapper.find('input[name="username"]').simulate('change', { target: { value: 'username' } }); wrapper.find('input[name="password"]').simulate('change', { target: { value: 'password' } }); wrapper.find(EuiButton).simulate('click'); @@ -92,11 +149,15 @@ describe('LoginForm', () => { http={coreStartMock.http} notifications={coreStartMock.notifications} loginAssistanceMessage="" - showLoginForm={true} - selector={{ enabled: false, providers: [] }} + selector={{ + enabled: false, + providers: [{ type: 'basic', name: 'basic', usesLoginForm: true }], + }} /> ); + expectPageMode(wrapper, PageMode.Form); + wrapper.find('input[name="username"]').simulate('change', { target: { value: 'username' } }); wrapper.find('input[name="password"]').simulate('change', { target: { value: 'password' } }); wrapper.find(EuiButton).simulate('click'); @@ -121,11 +182,15 @@ describe('LoginForm', () => { http={coreStartMock.http} notifications={coreStartMock.notifications} loginAssistanceMessage="" - showLoginForm={true} - selector={{ enabled: false, providers: [] }} + selector={{ + enabled: false, + providers: [{ type: 'basic', name: 'basic', usesLoginForm: true }], + }} /> ); + expectPageMode(wrapper, PageMode.Form); + wrapper.find('input[name="username"]').simulate('change', { target: { value: 'username1' } }); wrapper.find('input[name="password"]').simulate('change', { target: { value: 'password1' } }); wrapper.find(EuiButton).simulate('click'); @@ -144,47 +209,125 @@ describe('LoginForm', () => { expect(wrapper.find(EuiCallOut).exists()).toBe(false); }); + it('properly switches to login help', async () => { + const coreStartMock = coreMock.createStart({ basePath: '/some-base-path' }); + const wrapper = mountWithIntl( + + ); + + expectPageMode(wrapper, PageMode.Form); + expect(findTestSubject(wrapper, 'loginBackToSelector').exists()).toBe(false); + + // Going to login help. + findTestSubject(wrapper, 'loginHelpLink').simulate('click'); + wrapper.update(); + expectPageMode(wrapper, PageMode.LoginHelp); + + expect(findTestSubject(wrapper, 'loginHelp').find(ReactMarkdown)).toMatchSnapshot('Login Help'); + + // Going back to login form. + findTestSubject(wrapper, 'loginBackToLoginLink').simulate('click'); + wrapper.update(); + expectPageMode(wrapper, PageMode.Form); + expect(findTestSubject(wrapper, 'loginBackToSelector').exists()).toBe(false); + }); + describe('login selector', () => { - it('renders as expected with login form', async () => { + it('renders as expected with providers that use login form', async () => { const coreStartMock = coreMock.createStart(); + const wrapper = mountWithIntl( + + ); + + expectPageMode(wrapper, PageMode.Selector); + expect( - shallowWithIntl( - - ) - ).toMatchSnapshot(); + wrapper.find('.secLoginCard').map(card => { + const hint = card.find('.secLoginCard__hint'); + return { + title: card.find('p.secLoginCard__title').text(), + hint: hint.exists() ? hint.text() : '', + icon: card.find(EuiIcon).props().type, + }; + }) + ).toEqual([ + { title: 'Log in with basic/basic', hint: 'Basic hint', icon: 'logoElastic' }, + { title: 'Log in w/SAML', hint: '', icon: 'empty' }, + { title: 'Log in w/PKI', hint: 'PKI hint', icon: 'empty' }, + ]); }); - it('renders as expected without login form for providers with and without description', async () => { + it('renders as expected without providers that use login form', async () => { const coreStartMock = coreMock.createStart(); + const wrapper = mountWithIntl( + + ); + + expectPageMode(wrapper, PageMode.Selector); + expect( - shallowWithIntl( - - ) - ).toMatchSnapshot(); + wrapper.find('.secLoginCard').map(card => { + const hint = card.find('.secLoginCard__hint'); + return { + title: card.find('p.secLoginCard__title').text(), + hint: hint.exists() ? hint.text() : '', + icon: card.find(EuiIcon).props().type, + }; + }) + ).toEqual([ + { title: 'Login w/SAML', hint: 'SAML hint', icon: 'empty' }, + { title: 'Log in with pki/pki1', hint: '', icon: 'some-icon' }, + ]); }); it('properly redirects after successful login', async () => { @@ -203,17 +346,19 @@ describe('LoginForm', () => { http={coreStartMock.http} notifications={coreStartMock.notifications} loginAssistanceMessage="" - showLoginForm={true} selector={{ enabled: true, providers: [ - { type: 'saml', name: 'saml1', description: 'Login w/SAML' }, - { type: 'pki', name: 'pki1', description: 'Login w/PKI' }, + { type: 'basic', name: 'basic', usesLoginForm: true }, + { type: 'saml', name: 'saml1', description: 'Login w/SAML', usesLoginForm: false }, + { type: 'pki', name: 'pki1', description: 'Login w/PKI', usesLoginForm: false }, ], }} /> ); + expectPageMode(wrapper, PageMode.Selector); + wrapper.findWhere(node => node.key() === 'saml1').simulate('click'); await act(async () => { @@ -246,11 +391,18 @@ describe('LoginForm', () => { http={coreStartMock.http} notifications={coreStartMock.notifications} loginAssistanceMessage="" - showLoginForm={true} - selector={{ enabled: true, providers: [{ type: 'saml', name: 'saml1' }] }} + selector={{ + enabled: true, + providers: [ + { type: 'basic', name: 'basic', usesLoginForm: true }, + { type: 'saml', name: 'saml1', usesLoginForm: false }, + ], + }} /> ); + expectPageMode(wrapper, PageMode.Selector); + wrapper.findWhere(node => node.key() === 'saml1').simulate('click'); await act(async () => { @@ -268,5 +420,123 @@ describe('LoginForm', () => { title: 'Could not perform login.', }); }); + + it('properly switches to login form', async () => { + const currentURL = `https://some-host/login?next=${encodeURIComponent( + '/some-base-path/app/kibana#/home?_g=()' + )}`; + + const coreStartMock = coreMock.createStart({ basePath: '/some-base-path' }); + window.location.href = currentURL; + const wrapper = mountWithIntl( + + ); + + expectPageMode(wrapper, PageMode.Selector); + + wrapper.findWhere(node => node.key() === 'basic').simulate('click'); + wrapper.update(); + expectPageMode(wrapper, PageMode.Form); + + expect(coreStartMock.http.post).not.toHaveBeenCalled(); + expect(coreStartMock.notifications.toasts.addError).not.toHaveBeenCalled(); + expect(window.location.href).toBe(currentURL); + }); + + it('properly switches to login help', async () => { + const coreStartMock = coreMock.createStart({ basePath: '/some-base-path' }); + const wrapper = mountWithIntl( + + ); + + expectPageMode(wrapper, PageMode.Selector); + + findTestSubject(wrapper, 'loginHelpLink').simulate('click'); + wrapper.update(); + expectPageMode(wrapper, PageMode.LoginHelp); + + expect(findTestSubject(wrapper, 'loginHelp').find(ReactMarkdown)).toMatchSnapshot( + 'Login Help' + ); + + // Going back to login selector. + findTestSubject(wrapper, 'loginBackToLoginLink').simulate('click'); + wrapper.update(); + expectPageMode(wrapper, PageMode.Selector); + + expect(coreStartMock.http.post).not.toHaveBeenCalled(); + expect(coreStartMock.notifications.toasts.addError).not.toHaveBeenCalled(); + }); + + it('properly switches to login form -> login help and back', async () => { + const coreStartMock = coreMock.createStart({ basePath: '/some-base-path' }); + const wrapper = mountWithIntl( + + ); + + expectPageMode(wrapper, PageMode.Selector); + + // Going to login form. + wrapper.findWhere(node => node.key() === 'basic').simulate('click'); + wrapper.update(); + expectPageMode(wrapper, PageMode.Form); + + // Going to login help. + findTestSubject(wrapper, 'loginHelpLink').simulate('click'); + wrapper.update(); + expectPageMode(wrapper, PageMode.LoginHelp); + + expect(findTestSubject(wrapper, 'loginHelp').find(ReactMarkdown)).toMatchSnapshot( + 'Login Help' + ); + + // Going back to login form. + findTestSubject(wrapper, 'loginBackToLoginLink').simulate('click'); + wrapper.update(); + expectPageMode(wrapper, PageMode.Form); + + // Going back to login selector. + findTestSubject(wrapper, 'loginBackToSelector').simulate('click'); + wrapper.update(); + expectPageMode(wrapper, PageMode.Selector); + + expect(coreStartMock.http.post).not.toHaveBeenCalled(); + expect(coreStartMock.notifications.toasts.addError).not.toHaveBeenCalled(); + }); }); }); diff --git a/x-pack/plugins/security/public/authentication/login/components/login_form/login_form.tsx b/x-pack/plugins/security/public/authentication/login/components/login_form/login_form.tsx index 01f5c40a69aebd..460c6550085a45 100644 --- a/x-pack/plugins/security/public/authentication/login/components/login_form/login_form.tsx +++ b/x-pack/plugins/security/public/authentication/login/components/login_form/login_form.tsx @@ -4,10 +4,13 @@ * you may not use this file except in compliance with the Elastic License. */ +import './login_form.scss'; + import React, { ChangeEvent, Component, FormEvent, Fragment, MouseEvent } from 'react'; import ReactMarkdown from 'react-markdown'; import { EuiButton, + EuiIcon, EuiCallOut, EuiFieldPassword, EuiFieldText, @@ -15,21 +18,28 @@ import { EuiPanel, EuiSpacer, EuiText, + EuiButtonEmpty, + EuiFlexGroup, + EuiFlexItem, + EuiTitle, + EuiLoadingSpinner, + EuiLink, + EuiHorizontalRule, } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; import { HttpStart, IHttpFetchError, NotificationsStart } from 'src/core/public'; -import { LoginValidator, LoginValidationResult } from './validate_login'; import { parseNext } from '../../../../../common/parse_next'; import { LoginSelector } from '../../../../../common/login_state'; +import { LoginValidator } from './validate_login'; interface Props { http: HttpStart; notifications: NotificationsStart; selector: LoginSelector; - showLoginForm: boolean; infoMessage?: string; loginAssistanceMessage: string; + loginHelp?: string; } interface State { @@ -42,7 +52,8 @@ interface State { message: | { type: MessageType.None } | { type: MessageType.Danger | MessageType.Info; content: string }; - formError: LoginValidationResult | null; + mode: PageMode; + previousMode: PageMode; } enum LoadingStateType { @@ -57,12 +68,21 @@ enum MessageType { Danger, } +export enum PageMode { + Selector, + Form, + LoginHelp, +} + export class LoginForm extends Component { private readonly validator: LoginValidator; constructor(props: Props) { super(props); this.validator = new LoginValidator({ shouldValidate: false }); + + const mode = this.showLoginSelector() ? PageMode.Selector : PageMode.Form; + this.state = { loadingState: { type: LoadingStateType.None }, username: '', @@ -70,7 +90,8 @@ export class LoginForm extends Component { message: this.props.infoMessage ? { type: MessageType.Info, content: this.props.infoMessage } : { type: MessageType.None }, - formError: null, + mode, + previousMode: mode, }; } @@ -79,19 +100,91 @@ export class LoginForm extends Component { {this.renderLoginAssistanceMessage()} {this.renderMessage()} - {this.renderSelector()} - {this.renderLoginForm()} + {this.renderContent()} + {this.renderPageModeSwitchLink()} ); } - private renderLoginForm = () => { - if (!this.props.showLoginForm) { + private renderLoginAssistanceMessage = () => { + if (!this.props.loginAssistanceMessage) { return null; } return ( - +
+ + + {this.props.loginAssistanceMessage} + +
+ ); + }; + + private renderMessage = () => { + const { message } = this.state; + if (message.type === MessageType.Danger) { + return ( + + + + + ); + } + + if (message.type === MessageType.Info) { + return ( + + + + + ); + } + + return null; + }; + + public renderContent() { + switch (this.state.mode) { + case PageMode.Form: + return this.renderLoginForm(); + case PageMode.Selector: + return this.renderSelector(); + case PageMode.LoginHelp: + return this.renderLoginHelp(); + } + } + + private renderLoginForm = () => { + const loginSelectorLink = this.showLoginSelector() ? ( + + this.onPageModeChange(PageMode.Selector)} + > + + + + ) : null; + + return ( +
{ /> - - - + + + + + + + + + {loginSelectorLink} +
); }; - private renderLoginAssistanceMessage = () => { - if (!this.props.loginAssistanceMessage) { - return null; - } + private renderSelector = () => { + return ( + + {this.props.selector.providers.map(provider => ( + + ))} + + ); + }; + private renderLoginHelp = () => { return ( - - - {this.props.loginAssistanceMessage} + + + {this.props.loginHelp || ''} - +
); }; - private renderMessage = () => { - const { message } = this.state; - if (message.type === MessageType.Danger) { + private renderPageModeSwitchLink = () => { + if (this.state.mode === PageMode.LoginHelp) { return ( - - + + + this.onPageModeChange(this.state.previousMode)} + > + + + ); } - if (message.type === MessageType.Info) { + if (this.props.loginHelp) { return ( - - + + + this.onPageModeChange(PageMode.LoginHelp)} + > + + + ); } @@ -205,60 +359,16 @@ export class LoginForm extends Component { return null; }; - private renderSelector = () => { - const showLoginSelector = - this.props.selector.enabled && this.props.selector.providers.length > 0; - if (!showLoginSelector) { - return null; - } - - const loginSelectorAndLoginFormSeparator = showLoginSelector && this.props.showLoginForm && ( - <> - - ―――   - -   ――― - - - - ); - - return ( - <> - {this.props.selector.providers.map((provider, index) => ( - - this.loginWithSelector(provider.type, provider.name)} - > - {provider.description ?? ( - - )} - - - - ))} - {loginSelectorAndLoginFormSeparator} - - ); - }; - private setUsernameInputRef(ref: HTMLInputElement) { if (ref) { ref.focus(); } } + private onPageModeChange = (mode: PageMode) => { + this.setState({ message: { type: MessageType.None }, mode, previousMode: this.state.mode }); + }; + private onUsernameChange = (e: ChangeEvent) => { this.setState({ username: e.target.value, @@ -279,12 +389,10 @@ export class LoginForm extends Component { this.validator.enableValidation(); const { username, password } = this.state; - const result = this.validator.validateForLogin(username, password); - if (result.isInvalid) { - this.setState({ formError: result }); - return; - } else { - this.setState({ formError: null }); + if (this.validator.validateForLogin(username, password).isInvalid) { + // Since validation is enabled now, we should ask React to re-render form and display + // validation error messages if any. + return this.forceUpdate(); } this.setState({ @@ -351,4 +459,11 @@ export class LoginForm extends Component { loadingState.type !== LoadingStateType.Selector || loadingState.providerName === providerName ); } + + private showLoginSelector() { + return ( + this.props.selector.enabled && + this.props.selector.providers.some(provider => !provider.usesLoginForm) + ); + } } diff --git a/x-pack/plugins/security/public/authentication/login/login_page.test.tsx b/x-pack/plugins/security/public/authentication/login/login_page.test.tsx index c4be57d8d7db7d..ab107e46dfff61 100644 --- a/x-pack/plugins/security/public/authentication/login/login_page.test.tsx +++ b/x-pack/plugins/security/public/authentication/login/login_page.test.tsx @@ -18,8 +18,10 @@ const createLoginState = (options?: Partial) => { allowLogin: true, layout: 'form', requiresSecureConnection: false, - showLoginForm: true, - selector: { enabled: false, providers: [] }, + selector: { + enabled: false, + providers: [{ type: 'basic', name: 'basic1', usesLoginForm: true }], + }, ...options, } as LoginState; }; @@ -163,7 +165,9 @@ describe('LoginPage', () => { it('renders as expected when login is not enabled', async () => { const coreStartMock = coreMock.createStart(); - httpMock.get.mockResolvedValue(createLoginState({ showLoginForm: false })); + httpMock.get.mockResolvedValue( + createLoginState({ selector: { enabled: false, providers: [] } }) + ); const wrapper = shallow( { expect(wrapper.find(LoginForm)).toMatchSnapshot(); }); + + it('renders as expected when loginHelp is set', async () => { + const coreStartMock = coreMock.createStart(); + httpMock.get.mockResolvedValue(createLoginState({ loginHelp: '**some-help**' })); + + const wrapper = shallow( + + ); + + await act(async () => { + await nextTick(); + wrapper.update(); + resetHttpMock(); // so the calls don't show in the BasicLoginForm snapshot + }); + + expect(wrapper.find(LoginForm)).toMatchSnapshot(); + }); }); describe('API calls', () => { diff --git a/x-pack/plugins/security/public/authentication/login/login_page.tsx b/x-pack/plugins/security/public/authentication/login/login_page.tsx index 70f8f76ee0a9c0..b7ac70f2aaf89e 100644 --- a/x-pack/plugins/security/public/authentication/login/login_page.tsx +++ b/x-pack/plugins/security/public/authentication/login/login_page.tsx @@ -4,6 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ +import './_login_page.scss'; + import React, { Component } from 'react'; import ReactDOM from 'react-dom'; import classNames from 'classnames'; @@ -120,10 +122,9 @@ export class LoginPage extends Component { requiresSecureConnection, isSecureConnection, selector, - showLoginForm, + loginHelp, }: LoginState & { isSecureConnection: boolean }) => { - const isLoginExplicitlyDisabled = - !showLoginForm && (!selector.enabled || selector.providers.length === 0); + const isLoginExplicitlyDisabled = selector.providers.length === 0; if (isLoginExplicitlyDisabled) { return ( { ); }; diff --git a/x-pack/plugins/security/public/index.scss b/x-pack/plugins/security/public/index.scss index 999639ba22eb78..1bdb8cc178fdf8 100644 --- a/x-pack/plugins/security/public/index.scss +++ b/x-pack/plugins/security/public/index.scss @@ -1,7 +1,4 @@ $secFormWidth: 460px; -// Authentication styles -@import './authentication/index'; - // Management styles @import './management/index'; diff --git a/x-pack/plugins/security/server/config.test.ts b/x-pack/plugins/security/server/config.test.ts index 46a7ee79ee60c5..9899cd688d6ddb 100644 --- a/x-pack/plugins/security/server/config.test.ts +++ b/x-pack/plugins/security/server/config.test.ts @@ -29,6 +29,8 @@ describe('config schema', () => { "basic": Object { "description": undefined, "enabled": true, + "hint": undefined, + "icon": undefined, "order": 0, "showInSelector": true, }, @@ -71,6 +73,8 @@ describe('config schema', () => { "basic": Object { "description": undefined, "enabled": true, + "hint": undefined, + "icon": undefined, "order": 0, "showInSelector": true, }, @@ -113,6 +117,8 @@ describe('config schema', () => { "basic": Object { "description": undefined, "enabled": true, + "hint": undefined, + "icon": undefined, "order": 0, "showInSelector": true, }, @@ -361,20 +367,6 @@ describe('config schema', () => { `); }); - it('does not allow custom description', () => { - expect(() => - ConfigSchema.validate({ - authc: { - providers: { basic: { basic1: { order: 0, description: 'Some description' } } }, - }, - }) - ).toThrowErrorMatchingInlineSnapshot(` -"[authc.providers]: types that failed validation: -- [authc.providers.0]: expected value of type [array] but got [Object] -- [authc.providers.1.basic.basic1.description]: \`basic\` provider does not support custom description." -`); - }); - it('cannot be hidden from selector', () => { expect(() => ConfigSchema.validate({ @@ -410,7 +402,9 @@ describe('config schema', () => { Object { "basic": Object { "basic1": Object { + "description": "Log in with Elasticsearch", "enabled": true, + "icon": "logoElastic", "order": 0, "showInSelector": true, }, @@ -433,20 +427,6 @@ describe('config schema', () => { `); }); - it('does not allow custom description', () => { - expect(() => - ConfigSchema.validate({ - authc: { - providers: { token: { token1: { order: 0, description: 'Some description' } } }, - }, - }) - ).toThrowErrorMatchingInlineSnapshot(` -"[authc.providers]: types that failed validation: -- [authc.providers.0]: expected value of type [array] but got [Object] -- [authc.providers.1.token.token1.description]: \`token\` provider does not support custom description." -`); - }); - it('cannot be hidden from selector', () => { expect(() => ConfigSchema.validate({ @@ -482,7 +462,9 @@ describe('config schema', () => { Object { "token": Object { "token1": Object { + "description": "Log in with Elasticsearch", "enabled": true, + "icon": "logoElastic", "order": 0, "showInSelector": true, }, @@ -759,12 +741,16 @@ describe('config schema', () => { Object { "basic": Object { "basic1": Object { + "description": "Log in with Elasticsearch", "enabled": true, + "icon": "logoElastic", "order": 0, "showInSelector": true, }, "basic2": Object { + "description": "Log in with Elasticsearch", "enabled": false, + "icon": "logoElastic", "order": 1, "showInSelector": true, }, @@ -1043,7 +1029,7 @@ describe('createConfig()', () => { Object { "name": "basic1", "options": Object { - "description": undefined, + "description": "Log in with Elasticsearch", "order": 3, "showInSelector": true, }, diff --git a/x-pack/plugins/security/server/config.ts b/x-pack/plugins/security/server/config.ts index 97ff7d00a43362..7fe38b05f72d60 100644 --- a/x-pack/plugins/security/server/config.ts +++ b/x-pack/plugins/security/server/config.ts @@ -6,6 +6,7 @@ import crypto from 'crypto'; import { schema, Type, TypeOf } from '@kbn/config-schema'; +import { i18n } from '@kbn/i18n'; import { Logger } from '../../../../src/core/server'; export type ConfigType = ReturnType; @@ -21,7 +22,7 @@ const providerOptionsSchema = (providerType: string, optionsSchema: Type) = ); type ProvidersCommonConfigType = Record< - 'enabled' | 'showInSelector' | 'order' | 'description', + 'enabled' | 'showInSelector' | 'order' | 'description' | 'hint' | 'icon', Type >; function getCommonProviderSchemaProperties(overrides: Partial = {}) { @@ -30,6 +31,8 @@ function getCommonProviderSchemaProperties(overrides: Partial; const providersConfigSchema = schema.object( { basic: getUniqueProviderSchema('basic', { - description: schema.maybe( - schema.any({ - validate: () => '`basic` provider does not support custom description.', - }) - ), + description: schema.string({ + defaultValue: i18n.translate('xpack.security.loginWithElasticsearchLabel', { + defaultMessage: 'Log in with Elasticsearch', + }), + }), + icon: schema.string({ defaultValue: 'logoElastic' }), showInSelector: schema.boolean({ defaultValue: true, validate: value => { @@ -68,11 +72,12 @@ const providersConfigSchema = schema.object( }), }), token: getUniqueProviderSchema('token', { - description: schema.maybe( - schema.any({ - validate: () => '`token` provider does not support custom description.', - }) - ), + description: schema.string({ + defaultValue: i18n.translate('xpack.security.loginWithElasticsearchLabel', { + defaultMessage: 'Log in with Elasticsearch', + }), + }), + icon: schema.string({ defaultValue: 'logoElastic' }), showInSelector: schema.boolean({ defaultValue: true, validate: value => { @@ -131,6 +136,7 @@ const providersConfigSchema = schema.object( export const ConfigSchema = schema.object({ enabled: schema.boolean({ defaultValue: true }), loginAssistanceMessage: schema.string({ defaultValue: '' }), + loginHelp: schema.maybe(schema.string()), cookieName: schema.string({ defaultValue: 'sid' }), encryptionKey: schema.conditional( schema.contextRef('dist'), @@ -147,7 +153,16 @@ export const ConfigSchema = schema.object({ selector: schema.object({ enabled: schema.maybe(schema.boolean()) }), providers: schema.oneOf([schema.arrayOf(schema.string()), providersConfigSchema], { defaultValue: { - basic: { basic: { enabled: true, showInSelector: true, order: 0, description: undefined } }, + basic: { + basic: { + enabled: true, + showInSelector: true, + order: 0, + description: undefined, + hint: undefined, + icon: undefined, + }, + }, token: undefined, saml: undefined, oidc: undefined, diff --git a/x-pack/plugins/security/server/routes/views/login.test.ts b/x-pack/plugins/security/server/routes/views/login.test.ts index d43319efbdfb9f..8bc2bb32325fc0 100644 --- a/x-pack/plugins/security/server/routes/views/login.test.ts +++ b/x-pack/plugins/security/server/routes/views/login.test.ts @@ -15,7 +15,7 @@ import { RouteConfig, } from '../../../../../../src/core/server'; import { SecurityLicense } from '../../../common/licensing'; -import { LoginState } from '../../../common/login_state'; +import { LoginSelectorProvider } from '../../../common/login_state'; import { ConfigType } from '../../config'; import { defineLoginRoutes } from './login'; @@ -141,6 +141,10 @@ describe('Login view routes', () => { }); describe('Login state route', () => { + function getAuthcConfig(authcConfig: Record = {}) { + return routeDefinitionParamsMock.create({ authc: { ...authcConfig } }).config.authc; + } + let routeHandler: RequestHandler; let routeConfig: RouteConfig; beforeEach(() => { @@ -176,9 +180,11 @@ describe('Login view routes', () => { const expectedPayload = { allowLogin: true, layout: 'error-es-unavailable', - showLoginForm: true, requiresSecureConnection: false, - selector: { enabled: false, providers: [] }, + selector: { + enabled: false, + providers: [{ name: 'basic', type: 'basic', usesLoginForm: true }], + }, }; await expect( routeHandler({ core: contextMock } as any, request, kibanaResponseFactory) @@ -198,9 +204,11 @@ describe('Login view routes', () => { const expectedPayload = { allowLogin: true, layout: 'form', - showLoginForm: true, requiresSecureConnection: false, - selector: { enabled: false, providers: [] }, + selector: { + enabled: false, + providers: [{ name: 'basic', type: 'basic', usesLoginForm: true }], + }, }; await expect( routeHandler({ core: contextMock } as any, request, kibanaResponseFactory) @@ -229,22 +237,46 @@ describe('Login view routes', () => { }); }); - it('returns `showLoginForm: true` only if either `basic` or `token` provider is enabled.', async () => { + it('returns `useLoginForm: true` for `basic` and `token` providers.', async () => { license.getFeatures.mockReturnValue({ allowLogin: true, showLogin: true } as any); const request = httpServerMock.createKibanaRequest(); const contextMock = coreMock.createRequestHandlerContext(); - const cases: Array<[boolean, ConfigType['authc']['sortedProviders']]> = [ - [false, []], - [true, [{ type: 'basic', name: 'basic1', options: { order: 0, showInSelector: true } }]], - [true, [{ type: 'token', name: 'token1', options: { order: 0, showInSelector: true } }]], + const cases: Array<[LoginSelectorProvider[], ConfigType['authc']]> = [ + [[], getAuthcConfig({ providers: { basic: { basic1: { order: 0, enabled: false } } } })], + [ + [ + { + name: 'basic1', + type: 'basic', + usesLoginForm: true, + icon: 'logoElastic', + description: 'Log in with Elasticsearch', + }, + ], + getAuthcConfig({ providers: { basic: { basic1: { order: 0 } } } }), + ], + [ + [ + { + name: 'token1', + type: 'token', + usesLoginForm: true, + icon: 'logoElastic', + description: 'Log in with Elasticsearch', + }, + ], + getAuthcConfig({ providers: { token: { token1: { order: 0 } } } }), + ], ]; - for (const [showLoginForm, sortedProviders] of cases) { - config.authc.sortedProviders = sortedProviders; + for (const [providers, authcConfig] of cases) { + config.authc = authcConfig; - const expectedPayload = expect.objectContaining({ showLoginForm }); + const expectedPayload = expect.objectContaining({ + selector: { enabled: false, providers }, + }); await expect( routeHandler({ core: contextMock } as any, request, kibanaResponseFactory) ).resolves.toEqual({ @@ -261,81 +293,142 @@ describe('Login view routes', () => { const request = httpServerMock.createKibanaRequest(); const contextMock = coreMock.createRequestHandlerContext(); - const cases: Array<[ - boolean, - ConfigType['authc']['sortedProviders'], - LoginState['selector']['providers'] - ]> = [ - // selector is disabled, providers shouldn't be returned. + const cases: Array<[ConfigType['authc'], LoginSelectorProvider[]]> = [ + // selector is disabled, multiple providers, but only basic provider should be returned. [ - false, + getAuthcConfig({ + selector: { enabled: false }, + providers: { + basic: { basic1: { order: 0 } }, + saml: { saml1: { order: 1, realm: 'realm1' } }, + }, + }), [ - { type: 'basic', name: 'basic1', options: { order: 0, showInSelector: true } }, - { type: 'saml', name: 'saml1', options: { order: 1, showInSelector: true } }, + { + name: 'basic1', + type: 'basic', + usesLoginForm: true, + icon: 'logoElastic', + description: 'Log in with Elasticsearch', + }, ], - [], ], - // selector is enabled, but only basic/token is available, providers shouldn't be returned. + // selector is enabled, but only basic/token is available and should be returned. [ - true, - [{ type: 'basic', name: 'basic1', options: { order: 0, showInSelector: true } }], - [], + getAuthcConfig({ + selector: { enabled: true }, + providers: { basic: { basic1: { order: 0 } } }, + }), + [ + { + name: 'basic1', + type: 'basic', + usesLoginForm: true, + icon: 'logoElastic', + description: 'Log in with Elasticsearch', + }, + ], ], - // selector is enabled, non-basic/token providers should be returned + // selector is enabled, all providers should be returned [ - true, + getAuthcConfig({ + selector: { enabled: true }, + providers: { + basic: { + basic1: { + order: 0, + description: 'some-desc1', + hint: 'some-hint1', + icon: 'logoElastic', + }, + }, + saml: { + saml1: { order: 1, description: 'some-desc2', realm: 'realm1', icon: 'some-icon2' }, + saml2: { order: 2, description: 'some-desc3', hint: 'some-hint3', realm: 'realm2' }, + }, + }, + }), [ { type: 'basic', name: 'basic1', - options: { order: 0, showInSelector: true, description: 'some-desc1' }, + description: 'some-desc1', + hint: 'some-hint1', + icon: 'logoElastic', + usesLoginForm: true, }, { type: 'saml', name: 'saml1', - options: { order: 1, showInSelector: true, description: 'some-desc2' }, + description: 'some-desc2', + icon: 'some-icon2', + usesLoginForm: false, }, { type: 'saml', name: 'saml2', - options: { order: 2, showInSelector: true, description: 'some-desc3' }, + description: 'some-desc3', + hint: 'some-hint3', + usesLoginForm: false, }, ], - [ - { type: 'saml', name: 'saml1', description: 'some-desc2' }, - { type: 'saml', name: 'saml2', description: 'some-desc3' }, - ], ], - // selector is enabled, only non-basic/token providers that are enabled in selector should be returned. + // selector is enabled, only providers that are enabled should be returned. [ - true, + getAuthcConfig({ + selector: { enabled: true }, + providers: { + basic: { + basic1: { + order: 0, + description: 'some-desc1', + hint: 'some-hint1', + icon: 'some-icon1', + }, + }, + saml: { + saml1: { + order: 1, + description: 'some-desc2', + realm: 'realm1', + showInSelector: false, + }, + saml2: { + order: 2, + description: 'some-desc3', + hint: 'some-hint3', + icon: 'some-icon3', + realm: 'realm2', + }, + }, + }, + }), [ { type: 'basic', name: 'basic1', - options: { order: 0, showInSelector: true, description: 'some-desc1' }, - }, - { - type: 'saml', - name: 'saml1', - options: { order: 1, showInSelector: false, description: 'some-desc2' }, + description: 'some-desc1', + hint: 'some-hint1', + icon: 'some-icon1', + usesLoginForm: true, }, { type: 'saml', name: 'saml2', - options: { order: 2, showInSelector: true, description: 'some-desc3' }, + description: 'some-desc3', + hint: 'some-hint3', + icon: 'some-icon3', + usesLoginForm: false, }, ], - [{ type: 'saml', name: 'saml2', description: 'some-desc3' }], ], ]; - for (const [selectorEnabled, sortedProviders, expectedProviders] of cases) { - config.authc.selector.enabled = selectorEnabled; - config.authc.sortedProviders = sortedProviders; + for (const [authcConfig, expectedProviders] of cases) { + config.authc = authcConfig; const expectedPayload = expect.objectContaining({ - selector: { enabled: selectorEnabled, providers: expectedProviders }, + selector: { enabled: authcConfig.selector.enabled, providers: expectedProviders }, }); await expect( routeHandler({ core: contextMock } as any, request, kibanaResponseFactory) diff --git a/x-pack/plugins/security/server/routes/views/login.ts b/x-pack/plugins/security/server/routes/views/login.ts index 4d6747de713f76..f72facb2e24cc9 100644 --- a/x-pack/plugins/security/server/routes/views/login.ts +++ b/x-pack/plugins/security/server/routes/views/login.ts @@ -55,15 +55,16 @@ export function defineLoginRoutes({ const { allowLogin, layout = 'form' } = license.getFeatures(); const { sortedProviders, selector } = config.authc; - let showLoginForm = false; const providers = []; - for (const { type, name, options } of sortedProviders) { - if (options.showInSelector) { - if (type === 'basic' || type === 'token') { - showLoginForm = true; - } else if (selector.enabled) { - providers.push({ type, name, description: options.description }); - } + for (const { type, name } of sortedProviders) { + // Since `config.authc.sortedProviders` is based on `config.authc.providers` config we can + // be sure that config is present for every provider in `config.authc.sortedProviders`. + const { showInSelector, description, hint, icon } = config.authc.providers[type]?.[name]!; + + // Include provider into the list if either selector is enabled or provider uses login form. + const usesLoginForm = type === 'basic' || type === 'token'; + if (showInSelector && (usesLoginForm || selector.enabled)) { + providers.push({ type, name, usesLoginForm, description, hint, icon }); } } @@ -71,7 +72,7 @@ export function defineLoginRoutes({ allowLogin, layout, requiresSecureConnection: config.secureCookies, - showLoginForm, + loginHelp: config.loginHelp, selector: { enabled: selector.enabled, providers }, }; diff --git a/x-pack/plugins/siem/.gitattributes b/x-pack/plugins/siem/.gitattributes index 96ab5dadbda10d..8dc2df600b2114 100644 --- a/x-pack/plugins/siem/.gitattributes +++ b/x-pack/plugins/siem/.gitattributes @@ -1,4 +1,6 @@ # Auto-collapse generated files in GitHub # https://help.github.com/en/articles/customizing-how-changed-files-appear-on-github x-pack/plugins/siem/server/graphql/types.ts linguist-generated=true +x-pack/plugins/siem/public/graphql/types.ts linguist-generated=true +x-pack/plugins/siem/public/graphql/introspection.json linguist-generated=true diff --git a/x-pack/plugins/siem/common/constants.ts b/x-pack/plugins/siem/common/constants.ts index edde5c6b8fa0d0..bcf5c78be36445 100644 --- a/x-pack/plugins/siem/common/constants.ts +++ b/x-pack/plugins/siem/common/constants.ts @@ -6,6 +6,8 @@ export const APP_ID = 'siem'; export const APP_NAME = 'SIEM'; +export const APP_ICON = 'securityAnalyticsApp'; +export const APP_PATH = `/app/${APP_ID}`; export const DEFAULT_BYTES_FORMAT = 'format:bytes:defaultPattern'; export const DEFAULT_DATE_FORMAT = 'dateFormat'; export const DEFAULT_DATE_FORMAT_TZ = 'dateFormat:tz'; diff --git a/x-pack/plugins/siem/kibana.json b/x-pack/plugins/siem/kibana.json index 1eb1a7dbde8761..e0ff82eb10eb22 100644 --- a/x-pack/plugins/siem/kibana.json +++ b/x-pack/plugins/siem/kibana.json @@ -3,8 +3,23 @@ "version": "8.0.0", "kibanaVersion": "kibana", "configPath": ["xpack", "siem"], - "requiredPlugins": ["actions", "alerting", "features", "licensing"], - "optionalPlugins": ["encryptedSavedObjects", "ml", "security", "spaces"], + "requiredPlugins": [ + "actions", + "alerting", + "data", + "embeddable", + "esUiShared", + "features", + "home", + "inspector", + "kibanaUtils", + "licensing", + "maps", + "triggers_actions_ui", + "uiActions", + "usageCollection" + ], + "optionalPlugins": ["encryptedSavedObjects", "ml", "newsfeed", "security", "spaces"], "server": true, - "ui": false + "ui": true } diff --git a/x-pack/plugins/siem/package.json b/x-pack/plugins/siem/package.json index 31c930dce71c06..829332918d3c48 100644 --- a/x-pack/plugins/siem/package.json +++ b/x-pack/plugins/siem/package.json @@ -5,7 +5,7 @@ "private": true, "license": "Elastic-License", "scripts": { - "extract-mitre-attacks": "node scripts/extract_tactics_techniques_mitre.js && node ../../../scripts/eslint ../../legacy/plugins/siem/public/pages/detection_engine/mitre/mitre_tactics_techniques.ts --fix", + "extract-mitre-attacks": "node scripts/extract_tactics_techniques_mitre.js && node ../../../scripts/eslint ./public/pages/detection_engine/mitre/mitre_tactics_techniques.ts --fix", "build-graphql-types": "node scripts/generate_types_from_graphql.js", "cypress:open": "cypress open --config-file ./cypress/cypress.json", "cypress:run": "cypress run --spec ./cypress/integration/**/*.spec.ts --config-file ./cypress/cypress.json --reporter ../../node_modules/cypress-multi-reporters --reporter-options configFile=./cypress/reporter_config.json; status=$?; ../../node_modules/.bin/mochawesome-merge --reportDir ../../../target/kibana-siem/cypress/results > ../../../target/kibana-siem/cypress/results/output.json; ../../../node_modules/.bin/marge ../../../target/kibana-siem/cypress/results/output.json --reportDir ../../../target/kibana-siem/cypress/results; mkdir -p ../../../target/junit && cp ../../../target/kibana-siem/cypress/results/*.xml ../../../target/junit/ && exit $status;", @@ -15,6 +15,7 @@ "@types/lodash": "^4.14.110" }, "dependencies": { - "lodash": "^4.17.15" + "lodash": "^4.17.15", + "react-markdown": "^4.0.6" } } diff --git a/x-pack/legacy/plugins/siem/public/app/app.tsx b/x-pack/plugins/siem/public/app/app.tsx similarity index 88% rename from x-pack/legacy/plugins/siem/public/app/app.tsx rename to x-pack/plugins/siem/public/app/app.tsx index 44c1c923cd6eea..6e2a4642f99a46 100644 --- a/x-pack/legacy/plugins/siem/public/app/app.tsx +++ b/x-pack/plugins/siem/public/app/app.tsx @@ -18,13 +18,13 @@ import { BehaviorSubject } from 'rxjs'; import { pluck } from 'rxjs/operators'; import { KibanaContextProvider, useKibana, useUiSetting$ } from '../lib/kibana'; -import { Storage } from '../../../../../../src/plugins/kibana_utils/public'; +import { Storage } from '../../../../../src/plugins/kibana_utils/public'; -import { DEFAULT_DARK_MODE } from '../../../../../plugins/siem/common/constants'; +import { DEFAULT_DARK_MODE } from '../../common/constants'; import { ErrorToastDispatcher } from '../components/error_toast_dispatcher'; import { compose } from '../lib/compose/kibana_compose'; import { AppFrontendLibs, AppApolloClient } from '../lib/lib'; -import { CoreStart, StartPlugins } from '../plugin'; +import { StartServices } from '../plugin'; import { PageRouter } from '../routes'; import { createStore, createInitialState } from '../store'; import { GlobalToaster, ManageGlobalToaster } from '../components/toasters'; @@ -95,21 +95,18 @@ const StartAppComponent: FC = libs => { const StartApp = memo(StartAppComponent); interface SiemAppComponentProps { - core: CoreStart; - plugins: StartPlugins; + services: StartServices; } -const SiemAppComponent: React.FC = ({ core, plugins }) => ( +const SiemAppComponent: React.FC = ({ services }) => ( - + ); diff --git a/x-pack/legacy/plugins/siem/public/app/index.tsx b/x-pack/plugins/siem/public/app/index.tsx similarity index 62% rename from x-pack/legacy/plugins/siem/public/app/index.tsx rename to x-pack/plugins/siem/public/app/index.tsx index 01175a98d1e44e..7275a718564eff 100644 --- a/x-pack/legacy/plugins/siem/public/app/index.tsx +++ b/x-pack/plugins/siem/public/app/index.tsx @@ -7,14 +7,11 @@ import React from 'react'; import { render, unmountComponentAtNode } from 'react-dom'; -import { CoreStart, StartPlugins, AppMountParameters } from '../plugin'; +import { AppMountParameters } from '../../../../../src/core/public'; +import { StartServices } from '../plugin'; import { SiemApp } from './app'; -export const renderApp = ( - core: CoreStart, - plugins: StartPlugins, - { element }: AppMountParameters -) => { - render(, element); +export const renderApp = (services: StartServices, { element }: AppMountParameters) => { + render(, element); return () => unmountComponentAtNode(element); }; diff --git a/x-pack/legacy/plugins/siem/public/components/alerts_viewer/alerts_table.tsx b/x-pack/plugins/siem/public/components/alerts_viewer/alerts_table.tsx similarity index 96% rename from x-pack/legacy/plugins/siem/public/components/alerts_viewer/alerts_table.tsx rename to x-pack/plugins/siem/public/components/alerts_viewer/alerts_table.tsx index dd608babef48fc..d545a071c3ea68 100644 --- a/x-pack/legacy/plugins/siem/public/components/alerts_viewer/alerts_table.tsx +++ b/x-pack/plugins/siem/public/components/alerts_viewer/alerts_table.tsx @@ -6,7 +6,7 @@ import React, { useMemo } from 'react'; -import { Filter } from '../../../../../../../src/plugins/data/public'; +import { Filter } from '../../../../../../src/plugins/data/public'; import { StatefulEventsViewer } from '../events_viewer'; import * as i18n from './translations'; import { alertsDefaultModel } from './default_headers'; diff --git a/x-pack/legacy/plugins/siem/public/components/alerts_viewer/default_headers.ts b/x-pack/plugins/siem/public/components/alerts_viewer/default_headers.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/alerts_viewer/default_headers.ts rename to x-pack/plugins/siem/public/components/alerts_viewer/default_headers.ts diff --git a/x-pack/legacy/plugins/siem/public/components/alerts_viewer/histogram_configs.ts b/x-pack/plugins/siem/public/components/alerts_viewer/histogram_configs.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/alerts_viewer/histogram_configs.ts rename to x-pack/plugins/siem/public/components/alerts_viewer/histogram_configs.ts diff --git a/x-pack/legacy/plugins/siem/public/components/alerts_viewer/index.tsx b/x-pack/plugins/siem/public/components/alerts_viewer/index.tsx similarity index 95% rename from x-pack/legacy/plugins/siem/public/components/alerts_viewer/index.tsx rename to x-pack/plugins/siem/public/components/alerts_viewer/index.tsx index 778adc708d9012..957feb6244792a 100644 --- a/x-pack/legacy/plugins/siem/public/components/alerts_viewer/index.tsx +++ b/x-pack/plugins/siem/public/components/alerts_viewer/index.tsx @@ -6,7 +6,7 @@ import React, { useEffect, useCallback, useMemo } from 'react'; import numeral from '@elastic/numeral'; -import { DEFAULT_NUMBER_FORMAT } from '../../../../../../plugins/siem/common/constants'; +import { DEFAULT_NUMBER_FORMAT } from '../../../common/constants'; import { AlertsComponentsQueryProps } from './types'; import { AlertsTable } from './alerts_table'; import * as i18n from './translations'; diff --git a/x-pack/legacy/plugins/siem/public/components/alerts_viewer/translations.ts b/x-pack/plugins/siem/public/components/alerts_viewer/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/alerts_viewer/translations.ts rename to x-pack/plugins/siem/public/components/alerts_viewer/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/alerts_viewer/types.ts b/x-pack/plugins/siem/public/components/alerts_viewer/types.ts similarity index 92% rename from x-pack/legacy/plugins/siem/public/components/alerts_viewer/types.ts rename to x-pack/plugins/siem/public/components/alerts_viewer/types.ts index a24c66e31e6708..321f7214c8fef9 100644 --- a/x-pack/legacy/plugins/siem/public/components/alerts_viewer/types.ts +++ b/x-pack/plugins/siem/public/components/alerts_viewer/types.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { Filter } from '../../../../../../../src/plugins/data/public'; +import { Filter } from '../../../../../../src/plugins/data/public'; import { HostsComponentsQueryProps } from '../../pages/hosts/navigation/types'; import { NetworkComponentQueryProps } from '../../pages/network/navigation/types'; import { MatrixHistogramOption } from '../matrix_histogram/types'; diff --git a/x-pack/legacy/plugins/siem/public/components/and_or_badge/__examples__/index.stories.tsx b/x-pack/plugins/siem/public/components/and_or_badge/__examples__/index.stories.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/and_or_badge/__examples__/index.stories.tsx rename to x-pack/plugins/siem/public/components/and_or_badge/__examples__/index.stories.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/and_or_badge/index.tsx b/x-pack/plugins/siem/public/components/and_or_badge/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/and_or_badge/index.tsx rename to x-pack/plugins/siem/public/components/and_or_badge/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/and_or_badge/translations.ts b/x-pack/plugins/siem/public/components/and_or_badge/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/and_or_badge/translations.ts rename to x-pack/plugins/siem/public/components/and_or_badge/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/arrows/__snapshots__/index.test.tsx.snap b/x-pack/plugins/siem/public/components/arrows/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/arrows/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/siem/public/components/arrows/__snapshots__/index.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/arrows/helpers.test.ts b/x-pack/plugins/siem/public/components/arrows/helpers.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/arrows/helpers.test.ts rename to x-pack/plugins/siem/public/components/arrows/helpers.test.ts diff --git a/x-pack/legacy/plugins/siem/public/components/arrows/helpers.ts b/x-pack/plugins/siem/public/components/arrows/helpers.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/arrows/helpers.ts rename to x-pack/plugins/siem/public/components/arrows/helpers.ts diff --git a/x-pack/legacy/plugins/siem/public/components/arrows/index.test.tsx b/x-pack/plugins/siem/public/components/arrows/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/arrows/index.test.tsx rename to x-pack/plugins/siem/public/components/arrows/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/arrows/index.tsx b/x-pack/plugins/siem/public/components/arrows/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/arrows/index.tsx rename to x-pack/plugins/siem/public/components/arrows/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/autocomplete_field/__examples__/index.stories.tsx b/x-pack/plugins/siem/public/components/autocomplete_field/__examples__/index.stories.tsx similarity index 94% rename from x-pack/legacy/plugins/siem/public/components/autocomplete_field/__examples__/index.stories.tsx rename to x-pack/plugins/siem/public/components/autocomplete_field/__examples__/index.stories.tsx index 8f261da629f949..dccc156ff6e447 100644 --- a/x-pack/legacy/plugins/siem/public/components/autocomplete_field/__examples__/index.stories.tsx +++ b/x-pack/plugins/siem/public/components/autocomplete_field/__examples__/index.stories.tsx @@ -11,7 +11,7 @@ import euiLightVars from '@elastic/eui/dist/eui_theme_light.json'; import { QuerySuggestion, QuerySuggestionTypes, -} from '../../../../../../../../src/plugins/data/public'; +} from '../../../../../../../src/plugins/data/public'; import { SuggestionItem } from '../suggestion_item'; const suggestion: QuerySuggestion = { diff --git a/x-pack/legacy/plugins/siem/public/components/autocomplete_field/__snapshots__/index.test.tsx.snap b/x-pack/plugins/siem/public/components/autocomplete_field/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/autocomplete_field/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/siem/public/components/autocomplete_field/__snapshots__/index.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/autocomplete_field/index.test.tsx b/x-pack/plugins/siem/public/components/autocomplete_field/index.test.tsx similarity index 99% rename from x-pack/legacy/plugins/siem/public/components/autocomplete_field/index.test.tsx rename to x-pack/plugins/siem/public/components/autocomplete_field/index.test.tsx index 55e114818ffea1..72236d799f995c 100644 --- a/x-pack/legacy/plugins/siem/public/components/autocomplete_field/index.test.tsx +++ b/x-pack/plugins/siem/public/components/autocomplete_field/index.test.tsx @@ -10,10 +10,7 @@ import { mount, shallow } from 'enzyme'; import { noop } from 'lodash/fp'; import React from 'react'; import { ThemeProvider } from 'styled-components'; -import { - QuerySuggestion, - QuerySuggestionTypes, -} from '../../../../../../../src/plugins/data/public'; +import { QuerySuggestion, QuerySuggestionTypes } from '../../../../../../src/plugins/data/public'; import { TestProviders } from '../../mock'; diff --git a/x-pack/legacy/plugins/siem/public/components/autocomplete_field/index.tsx b/x-pack/plugins/siem/public/components/autocomplete_field/index.tsx similarity index 98% rename from x-pack/legacy/plugins/siem/public/components/autocomplete_field/index.tsx rename to x-pack/plugins/siem/public/components/autocomplete_field/index.tsx index f051e18f8acab6..9821bb6048b513 100644 --- a/x-pack/legacy/plugins/siem/public/components/autocomplete_field/index.tsx +++ b/x-pack/plugins/siem/public/components/autocomplete_field/index.tsx @@ -11,9 +11,9 @@ import { EuiPanel, } from '@elastic/eui'; import React from 'react'; -import { QuerySuggestion } from '../../../../../../../src/plugins/data/public'; +import { QuerySuggestion } from '../../../../../../src/plugins/data/public'; -import euiStyled from '../../../../../common/eui_styled_components'; +import euiStyled from '../../../../../legacy/common/eui_styled_components'; import { SuggestionItem } from './suggestion_item'; diff --git a/x-pack/legacy/plugins/siem/public/components/autocomplete_field/suggestion_item.tsx b/x-pack/plugins/siem/public/components/autocomplete_field/suggestion_item.tsx similarity index 96% rename from x-pack/legacy/plugins/siem/public/components/autocomplete_field/suggestion_item.tsx rename to x-pack/plugins/siem/public/components/autocomplete_field/suggestion_item.tsx index f99a545d558f76..be9a9817265b0a 100644 --- a/x-pack/legacy/plugins/siem/public/components/autocomplete_field/suggestion_item.tsx +++ b/x-pack/plugins/siem/public/components/autocomplete_field/suggestion_item.tsx @@ -8,8 +8,8 @@ import { EuiIcon } from '@elastic/eui'; import { transparentize } from 'polished'; import React from 'react'; import styled from 'styled-components'; -import euiStyled from '../../../../../common/eui_styled_components'; -import { QuerySuggestion } from '../../../../../../../src/plugins/data/public'; +import euiStyled from '../../../../../legacy/common/eui_styled_components'; +import { QuerySuggestion } from '../../../../../../src/plugins/data/public'; interface SuggestionItemProps { isSelected?: boolean; diff --git a/x-pack/legacy/plugins/siem/public/components/bytes/index.test.tsx b/x-pack/plugins/siem/public/components/bytes/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/bytes/index.test.tsx rename to x-pack/plugins/siem/public/components/bytes/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/bytes/index.tsx b/x-pack/plugins/siem/public/components/bytes/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/bytes/index.tsx rename to x-pack/plugins/siem/public/components/bytes/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/certificate_fingerprint/index.test.tsx b/x-pack/plugins/siem/public/components/certificate_fingerprint/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/certificate_fingerprint/index.test.tsx rename to x-pack/plugins/siem/public/components/certificate_fingerprint/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/certificate_fingerprint/index.tsx b/x-pack/plugins/siem/public/components/certificate_fingerprint/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/certificate_fingerprint/index.tsx rename to x-pack/plugins/siem/public/components/certificate_fingerprint/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/certificate_fingerprint/translations.ts b/x-pack/plugins/siem/public/components/certificate_fingerprint/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/certificate_fingerprint/translations.ts rename to x-pack/plugins/siem/public/components/certificate_fingerprint/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/charts/__snapshots__/areachart.test.tsx.snap b/x-pack/plugins/siem/public/components/charts/__snapshots__/areachart.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/charts/__snapshots__/areachart.test.tsx.snap rename to x-pack/plugins/siem/public/components/charts/__snapshots__/areachart.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/charts/__snapshots__/barchart.test.tsx.snap b/x-pack/plugins/siem/public/components/charts/__snapshots__/barchart.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/charts/__snapshots__/barchart.test.tsx.snap rename to x-pack/plugins/siem/public/components/charts/__snapshots__/barchart.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/charts/areachart.test.tsx b/x-pack/plugins/siem/public/components/charts/areachart.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/charts/areachart.test.tsx rename to x-pack/plugins/siem/public/components/charts/areachart.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/charts/areachart.tsx b/x-pack/plugins/siem/public/components/charts/areachart.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/charts/areachart.tsx rename to x-pack/plugins/siem/public/components/charts/areachart.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/charts/barchart.test.tsx b/x-pack/plugins/siem/public/components/charts/barchart.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/charts/barchart.test.tsx rename to x-pack/plugins/siem/public/components/charts/barchart.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/charts/barchart.tsx b/x-pack/plugins/siem/public/components/charts/barchart.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/charts/barchart.tsx rename to x-pack/plugins/siem/public/components/charts/barchart.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/charts/chart_place_holder.test.tsx b/x-pack/plugins/siem/public/components/charts/chart_place_holder.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/charts/chart_place_holder.test.tsx rename to x-pack/plugins/siem/public/components/charts/chart_place_holder.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/charts/chart_place_holder.tsx b/x-pack/plugins/siem/public/components/charts/chart_place_holder.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/charts/chart_place_holder.tsx rename to x-pack/plugins/siem/public/components/charts/chart_place_holder.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/charts/common.test.tsx b/x-pack/plugins/siem/public/components/charts/common.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/charts/common.test.tsx rename to x-pack/plugins/siem/public/components/charts/common.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/charts/common.tsx b/x-pack/plugins/siem/public/components/charts/common.tsx similarity index 97% rename from x-pack/legacy/plugins/siem/public/components/charts/common.tsx rename to x-pack/plugins/siem/public/components/charts/common.tsx index c7b40c50ffde89..74d728e65f0189 100644 --- a/x-pack/legacy/plugins/siem/public/components/charts/common.tsx +++ b/x-pack/plugins/siem/public/components/charts/common.tsx @@ -19,7 +19,7 @@ import { import React, { useMemo } from 'react'; import styled from 'styled-components'; -import { DEFAULT_DARK_MODE } from '../../../../../../plugins/siem/common/constants'; +import { DEFAULT_DARK_MODE } from '../../../common/constants'; import { useUiSetting } from '../../lib/kibana'; export const defaultChartHeight = '100%'; diff --git a/x-pack/legacy/plugins/siem/public/components/charts/draggable_legend.test.tsx b/x-pack/plugins/siem/public/components/charts/draggable_legend.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/charts/draggable_legend.test.tsx rename to x-pack/plugins/siem/public/components/charts/draggable_legend.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/charts/draggable_legend.tsx b/x-pack/plugins/siem/public/components/charts/draggable_legend.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/charts/draggable_legend.tsx rename to x-pack/plugins/siem/public/components/charts/draggable_legend.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/charts/draggable_legend_item.test.tsx b/x-pack/plugins/siem/public/components/charts/draggable_legend_item.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/charts/draggable_legend_item.test.tsx rename to x-pack/plugins/siem/public/components/charts/draggable_legend_item.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/charts/draggable_legend_item.tsx b/x-pack/plugins/siem/public/components/charts/draggable_legend_item.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/charts/draggable_legend_item.tsx rename to x-pack/plugins/siem/public/components/charts/draggable_legend_item.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/charts/translation.ts b/x-pack/plugins/siem/public/components/charts/translation.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/charts/translation.ts rename to x-pack/plugins/siem/public/components/charts/translation.ts diff --git a/x-pack/legacy/plugins/siem/public/components/direction/direction.test.tsx b/x-pack/plugins/siem/public/components/direction/direction.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/direction/direction.test.tsx rename to x-pack/plugins/siem/public/components/direction/direction.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/direction/index.tsx b/x-pack/plugins/siem/public/components/direction/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/direction/index.tsx rename to x-pack/plugins/siem/public/components/direction/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/drag_and_drop/__snapshots__/drag_drop_context_wrapper.test.tsx.snap b/x-pack/plugins/siem/public/components/drag_and_drop/__snapshots__/drag_drop_context_wrapper.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/drag_and_drop/__snapshots__/drag_drop_context_wrapper.test.tsx.snap rename to x-pack/plugins/siem/public/components/drag_and_drop/__snapshots__/drag_drop_context_wrapper.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/drag_and_drop/__snapshots__/draggable_wrapper.test.tsx.snap b/x-pack/plugins/siem/public/components/drag_and_drop/__snapshots__/draggable_wrapper.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/drag_and_drop/__snapshots__/draggable_wrapper.test.tsx.snap rename to x-pack/plugins/siem/public/components/drag_and_drop/__snapshots__/draggable_wrapper.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/drag_and_drop/__snapshots__/droppable_wrapper.test.tsx.snap b/x-pack/plugins/siem/public/components/drag_and_drop/__snapshots__/droppable_wrapper.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/drag_and_drop/__snapshots__/droppable_wrapper.test.tsx.snap rename to x-pack/plugins/siem/public/components/drag_and_drop/__snapshots__/droppable_wrapper.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/drag_and_drop/drag_drop_context.tsx b/x-pack/plugins/siem/public/components/drag_and_drop/drag_drop_context.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/drag_and_drop/drag_drop_context.tsx rename to x-pack/plugins/siem/public/components/drag_and_drop/drag_drop_context.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/drag_and_drop/drag_drop_context_wrapper.test.tsx b/x-pack/plugins/siem/public/components/drag_and_drop/drag_drop_context_wrapper.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/drag_and_drop/drag_drop_context_wrapper.test.tsx rename to x-pack/plugins/siem/public/components/drag_and_drop/drag_drop_context_wrapper.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/drag_and_drop/drag_drop_context_wrapper.tsx b/x-pack/plugins/siem/public/components/drag_and_drop/drag_drop_context_wrapper.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/drag_and_drop/drag_drop_context_wrapper.tsx rename to x-pack/plugins/siem/public/components/drag_and_drop/drag_drop_context_wrapper.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/drag_and_drop/draggable_wrapper.test.tsx b/x-pack/plugins/siem/public/components/drag_and_drop/draggable_wrapper.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/drag_and_drop/draggable_wrapper.test.tsx rename to x-pack/plugins/siem/public/components/drag_and_drop/draggable_wrapper.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/drag_and_drop/draggable_wrapper.tsx b/x-pack/plugins/siem/public/components/drag_and_drop/draggable_wrapper.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/drag_and_drop/draggable_wrapper.tsx rename to x-pack/plugins/siem/public/components/drag_and_drop/draggable_wrapper.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/drag_and_drop/draggable_wrapper_hover_content.test.tsx b/x-pack/plugins/siem/public/components/drag_and_drop/draggable_wrapper_hover_content.test.tsx similarity index 99% rename from x-pack/legacy/plugins/siem/public/components/drag_and_drop/draggable_wrapper_hover_content.test.tsx rename to x-pack/plugins/siem/public/components/drag_and_drop/draggable_wrapper_hover_content.test.tsx index f8b5eb7209ff4b..1d9508fc28f3d9 100644 --- a/x-pack/legacy/plugins/siem/public/components/drag_and_drop/draggable_wrapper_hover_content.test.tsx +++ b/x-pack/plugins/siem/public/components/drag_and_drop/draggable_wrapper_hover_content.test.tsx @@ -13,7 +13,7 @@ import { wait } from '../../lib/helpers'; import { useKibana } from '../../lib/kibana'; import { TestProviders } from '../../mock'; import { createKibanaCoreStartMock } from '../../mock/kibana_core'; -import { FilterManager } from '../../../../../../../src/plugins/data/public'; +import { FilterManager } from '../../../../../../src/plugins/data/public'; import { TimelineContext } from '../timeline/timeline_context'; import { DraggableWrapperHoverContent } from './draggable_wrapper_hover_content'; diff --git a/x-pack/legacy/plugins/siem/public/components/drag_and_drop/draggable_wrapper_hover_content.tsx b/x-pack/plugins/siem/public/components/drag_and_drop/draggable_wrapper_hover_content.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/drag_and_drop/draggable_wrapper_hover_content.tsx rename to x-pack/plugins/siem/public/components/drag_and_drop/draggable_wrapper_hover_content.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/drag_and_drop/droppable_wrapper.test.tsx b/x-pack/plugins/siem/public/components/drag_and_drop/droppable_wrapper.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/drag_and_drop/droppable_wrapper.test.tsx rename to x-pack/plugins/siem/public/components/drag_and_drop/droppable_wrapper.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/drag_and_drop/droppable_wrapper.tsx b/x-pack/plugins/siem/public/components/drag_and_drop/droppable_wrapper.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/drag_and_drop/droppable_wrapper.tsx rename to x-pack/plugins/siem/public/components/drag_and_drop/droppable_wrapper.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/drag_and_drop/helpers.test.ts b/x-pack/plugins/siem/public/components/drag_and_drop/helpers.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/drag_and_drop/helpers.test.ts rename to x-pack/plugins/siem/public/components/drag_and_drop/helpers.test.ts diff --git a/x-pack/legacy/plugins/siem/public/components/drag_and_drop/helpers.ts b/x-pack/plugins/siem/public/components/drag_and_drop/helpers.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/drag_and_drop/helpers.ts rename to x-pack/plugins/siem/public/components/drag_and_drop/helpers.ts diff --git a/x-pack/legacy/plugins/siem/public/components/drag_and_drop/provider_container.tsx b/x-pack/plugins/siem/public/components/drag_and_drop/provider_container.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/drag_and_drop/provider_container.tsx rename to x-pack/plugins/siem/public/components/drag_and_drop/provider_container.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/drag_and_drop/translations.ts b/x-pack/plugins/siem/public/components/drag_and_drop/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/drag_and_drop/translations.ts rename to x-pack/plugins/siem/public/components/drag_and_drop/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/draggables/__snapshots__/index.test.tsx.snap b/x-pack/plugins/siem/public/components/draggables/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/draggables/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/siem/public/components/draggables/__snapshots__/index.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/draggables/field_badge/index.tsx b/x-pack/plugins/siem/public/components/draggables/field_badge/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/draggables/field_badge/index.tsx rename to x-pack/plugins/siem/public/components/draggables/field_badge/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/draggables/field_badge/translations.ts b/x-pack/plugins/siem/public/components/draggables/field_badge/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/draggables/field_badge/translations.ts rename to x-pack/plugins/siem/public/components/draggables/field_badge/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/draggables/index.test.tsx b/x-pack/plugins/siem/public/components/draggables/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/draggables/index.test.tsx rename to x-pack/plugins/siem/public/components/draggables/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/draggables/index.tsx b/x-pack/plugins/siem/public/components/draggables/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/draggables/index.tsx rename to x-pack/plugins/siem/public/components/draggables/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/duration/index.test.tsx b/x-pack/plugins/siem/public/components/duration/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/duration/index.test.tsx rename to x-pack/plugins/siem/public/components/duration/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/duration/index.tsx b/x-pack/plugins/siem/public/components/duration/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/duration/index.tsx rename to x-pack/plugins/siem/public/components/duration/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/edit_data_provider/helpers.test.tsx b/x-pack/plugins/siem/public/components/edit_data_provider/helpers.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/edit_data_provider/helpers.test.tsx rename to x-pack/plugins/siem/public/components/edit_data_provider/helpers.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/edit_data_provider/helpers.tsx b/x-pack/plugins/siem/public/components/edit_data_provider/helpers.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/edit_data_provider/helpers.tsx rename to x-pack/plugins/siem/public/components/edit_data_provider/helpers.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/edit_data_provider/index.test.tsx b/x-pack/plugins/siem/public/components/edit_data_provider/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/edit_data_provider/index.test.tsx rename to x-pack/plugins/siem/public/components/edit_data_provider/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/edit_data_provider/index.tsx b/x-pack/plugins/siem/public/components/edit_data_provider/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/edit_data_provider/index.tsx rename to x-pack/plugins/siem/public/components/edit_data_provider/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/edit_data_provider/translations.ts b/x-pack/plugins/siem/public/components/edit_data_provider/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/edit_data_provider/translations.ts rename to x-pack/plugins/siem/public/components/edit_data_provider/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/embeddables/__mocks__/mock.ts b/x-pack/plugins/siem/public/components/embeddables/__mocks__/mock.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/embeddables/__mocks__/mock.ts rename to x-pack/plugins/siem/public/components/embeddables/__mocks__/mock.ts diff --git a/x-pack/legacy/plugins/siem/public/components/embeddables/__snapshots__/embeddable.test.tsx.snap b/x-pack/plugins/siem/public/components/embeddables/__snapshots__/embeddable.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/embeddables/__snapshots__/embeddable.test.tsx.snap rename to x-pack/plugins/siem/public/components/embeddables/__snapshots__/embeddable.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/embeddables/__snapshots__/embeddable_header.test.tsx.snap b/x-pack/plugins/siem/public/components/embeddables/__snapshots__/embeddable_header.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/embeddables/__snapshots__/embeddable_header.test.tsx.snap rename to x-pack/plugins/siem/public/components/embeddables/__snapshots__/embeddable_header.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/embeddables/__snapshots__/embedded_map.test.tsx.snap b/x-pack/plugins/siem/public/components/embeddables/__snapshots__/embedded_map.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/embeddables/__snapshots__/embedded_map.test.tsx.snap rename to x-pack/plugins/siem/public/components/embeddables/__snapshots__/embedded_map.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/embeddables/__snapshots__/index_patterns_missing_prompt.test.tsx.snap b/x-pack/plugins/siem/public/components/embeddables/__snapshots__/index_patterns_missing_prompt.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/embeddables/__snapshots__/index_patterns_missing_prompt.test.tsx.snap rename to x-pack/plugins/siem/public/components/embeddables/__snapshots__/index_patterns_missing_prompt.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/embeddables/embeddable.test.tsx b/x-pack/plugins/siem/public/components/embeddables/embeddable.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/embeddables/embeddable.test.tsx rename to x-pack/plugins/siem/public/components/embeddables/embeddable.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/embeddables/embeddable.tsx b/x-pack/plugins/siem/public/components/embeddables/embeddable.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/embeddables/embeddable.tsx rename to x-pack/plugins/siem/public/components/embeddables/embeddable.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/embeddables/embeddable_header.test.tsx b/x-pack/plugins/siem/public/components/embeddables/embeddable_header.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/embeddables/embeddable_header.test.tsx rename to x-pack/plugins/siem/public/components/embeddables/embeddable_header.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/embeddables/embeddable_header.tsx b/x-pack/plugins/siem/public/components/embeddables/embeddable_header.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/embeddables/embeddable_header.tsx rename to x-pack/plugins/siem/public/components/embeddables/embeddable_header.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/embeddables/embedded_map.test.tsx b/x-pack/plugins/siem/public/components/embeddables/embedded_map.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/embeddables/embedded_map.test.tsx rename to x-pack/plugins/siem/public/components/embeddables/embedded_map.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/embeddables/embedded_map.tsx b/x-pack/plugins/siem/public/components/embeddables/embedded_map.tsx similarity index 91% rename from x-pack/legacy/plugins/siem/public/components/embeddables/embedded_map.tsx rename to x-pack/plugins/siem/public/components/embeddables/embedded_map.tsx index e18f9b0d346ad4..d2dd3e54293414 100644 --- a/x-pack/legacy/plugins/siem/public/components/embeddables/embedded_map.tsx +++ b/x-pack/plugins/siem/public/components/embeddables/embedded_map.tsx @@ -8,13 +8,9 @@ import { EuiLink, EuiText } from '@elastic/eui'; import React, { useEffect, useState } from 'react'; import { createPortalNode, InPortal } from 'react-reverse-portal'; import styled, { css } from 'styled-components'; -import { npStart } from 'ui/new_platform'; -import { - EmbeddablePanel, - ErrorEmbeddable, -} from '../../../../../../../src/plugins/embeddable/public'; -import { DEFAULT_INDEX_KEY } from '../../../../../../plugins/siem/common/constants'; +import { EmbeddablePanel, ErrorEmbeddable } from '../../../../../../src/plugins/embeddable/public'; +import { DEFAULT_INDEX_KEY } from '../../../common/constants'; import { getIndexPatternTitleIdMapping } from '../../hooks/api/helpers'; import { useIndexPatterns } from '../../hooks/use_index_patterns'; import { Loader } from '../loader'; @@ -26,10 +22,10 @@ import { IndexPatternsMissingPrompt } from './index_patterns_missing_prompt'; import { MapToolTip } from './map_tool_tip/map_tool_tip'; import * as i18n from './translations'; import { SetQuery } from './types'; -import { MapEmbeddable } from '../../../../../plugins/maps/public'; -import { Query, Filter } from '../../../../../../../src/plugins/data/public'; +import { MapEmbeddable } from '../../../../../legacy/plugins/maps/public'; +import { Query, Filter } from '../../../../../../src/plugins/data/public'; import { useKibana, useUiSetting$ } from '../../lib/kibana'; -import { getSavedObjectFinder } from '../../../../../../../src/plugins/saved_objects/public'; +import { getSavedObjectFinder } from '../../../../../../src/plugins/saved_objects/public'; interface EmbeddableMapProps { maintainRatio?: boolean; @@ -203,8 +199,8 @@ export const EmbeddedMapComponent = ({ data-test-subj="embeddable-panel" embeddable={embeddable} getActions={services.uiActions.getTriggerCompatibleActions} - getEmbeddableFactory={npStart.plugins.embeddable.getEmbeddableFactory} - getAllEmbeddableFactories={npStart.plugins.embeddable.getEmbeddableFactories} + getEmbeddableFactory={services.embeddable.getEmbeddableFactory} + getAllEmbeddableFactories={services.embeddable.getEmbeddableFactories} notifications={services.notifications} overlays={services.overlays} inspector={services.inspector} diff --git a/x-pack/legacy/plugins/siem/public/components/embeddables/embedded_map_helpers.test.tsx b/x-pack/plugins/siem/public/components/embeddables/embedded_map_helpers.test.tsx similarity index 92% rename from x-pack/legacy/plugins/siem/public/components/embeddables/embedded_map_helpers.test.tsx rename to x-pack/plugins/siem/public/components/embeddables/embedded_map_helpers.test.tsx index f4e6ee5f878a63..aaae43d9684af0 100644 --- a/x-pack/legacy/plugins/siem/public/components/embeddables/embedded_map_helpers.test.tsx +++ b/x-pack/plugins/siem/public/components/embeddables/embedded_map_helpers.test.tsx @@ -4,8 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ +import { embeddablePluginMock } from '../../../../../../src/plugins/embeddable/public/mocks'; import { createEmbeddable, findMatchingIndexPatterns } from './embedded_map_helpers'; -import { createUiNewPlatformMock } from 'ui/new_platform/__mocks__/helpers'; import { createPortalNode } from 'react-reverse-portal'; import { mockAPMIndexPattern, @@ -16,10 +16,9 @@ import { mockGlobIndexPattern, } from './__mocks__/mock'; -jest.mock('ui/new_platform'); +const mockEmbeddable = embeddablePluginMock.createStartContract(); -const { npStart } = createUiNewPlatformMock(); -npStart.plugins.embeddable.getEmbeddableFactory = jest.fn().mockImplementation(() => ({ +mockEmbeddable.getEmbeddableFactory = jest.fn().mockImplementation(() => ({ create: () => ({ reload: jest.fn(), setRenderTooltipContent: jest.fn(), @@ -39,7 +38,7 @@ describe('embedded_map_helpers', () => { 0, setQueryMock, createPortalNode(), - npStart.plugins.embeddable + mockEmbeddable ); expect(setQueryMock).toHaveBeenCalledTimes(1); }); @@ -54,7 +53,7 @@ describe('embedded_map_helpers', () => { 0, setQueryMock, createPortalNode(), - npStart.plugins.embeddable + mockEmbeddable ); expect(setQueryMock.mock.calls[0][0].refetch).not.toBe(embeddable.reload); setQueryMock.mock.results[0].value(); diff --git a/x-pack/legacy/plugins/siem/public/components/embeddables/embedded_map_helpers.tsx b/x-pack/plugins/siem/public/components/embeddables/embedded_map_helpers.tsx similarity index 92% rename from x-pack/legacy/plugins/siem/public/components/embeddables/embedded_map_helpers.tsx rename to x-pack/plugins/siem/public/components/embeddables/embedded_map_helpers.tsx index 0c7a1212ba280f..dd7e1cd6ea9bac 100644 --- a/x-pack/legacy/plugins/siem/public/components/embeddables/embedded_map_helpers.tsx +++ b/x-pack/plugins/siem/public/components/embeddables/embedded_map_helpers.tsx @@ -10,21 +10,21 @@ import { OutPortal, PortalNode } from 'react-reverse-portal'; import minimatch from 'minimatch'; import { IndexPatternMapping, SetQuery } from './types'; import { getLayerList } from './map_config'; -import { MAP_SAVED_OBJECT_TYPE } from '../../../../../../plugins/maps/public'; +import { MAP_SAVED_OBJECT_TYPE } from '../../../../maps/public'; import { MapEmbeddable, RenderTooltipContentParams, MapEmbeddableInput, -} from '../../../../maps/public'; +} from '../../../../../legacy/plugins/maps/public'; import * as i18n from './translations'; -import { Query, Filter } from '../../../../../../../src/plugins/data/public'; +import { Query, Filter } from '../../../../../../src/plugins/data/public'; import { EmbeddableStart, isErrorEmbeddable, EmbeddableOutput, ViewMode, ErrorEmbeddable, -} from '../../../../../../../src/plugins/embeddable/public'; +} from '../../../../../../src/plugins/embeddable/public'; import { IndexPatternSavedObject } from '../../hooks/types'; /** @@ -109,7 +109,7 @@ export const createEmbeddable = async ( if (!isErrorEmbeddable(embeddableObject)) { embeddableObject.setRenderTooltipContent(renderTooltipContent); - embeddableObject.setLayerList(getLayerList(indexPatterns)); + await embeddableObject.setLayerList(getLayerList(indexPatterns)); } // Wire up to app refresh action diff --git a/x-pack/legacy/plugins/siem/public/components/embeddables/index_patterns_missing_prompt.test.tsx b/x-pack/plugins/siem/public/components/embeddables/index_patterns_missing_prompt.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/embeddables/index_patterns_missing_prompt.test.tsx rename to x-pack/plugins/siem/public/components/embeddables/index_patterns_missing_prompt.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/embeddables/index_patterns_missing_prompt.tsx b/x-pack/plugins/siem/public/components/embeddables/index_patterns_missing_prompt.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/embeddables/index_patterns_missing_prompt.tsx rename to x-pack/plugins/siem/public/components/embeddables/index_patterns_missing_prompt.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/embeddables/map_config.test.ts b/x-pack/plugins/siem/public/components/embeddables/map_config.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/embeddables/map_config.test.ts rename to x-pack/plugins/siem/public/components/embeddables/map_config.test.ts diff --git a/x-pack/legacy/plugins/siem/public/components/embeddables/map_config.ts b/x-pack/plugins/siem/public/components/embeddables/map_config.ts similarity index 99% rename from x-pack/legacy/plugins/siem/public/components/embeddables/map_config.ts rename to x-pack/plugins/siem/public/components/embeddables/map_config.ts index 8c96e0b75a1365..0d1cd515820c58 100644 --- a/x-pack/legacy/plugins/siem/public/components/embeddables/map_config.ts +++ b/x-pack/plugins/siem/public/components/embeddables/map_config.ts @@ -13,7 +13,7 @@ import { LayerMappingDetails, } from './types'; import * as i18n from './translations'; -import { SOURCE_TYPES } from '../../../../../../plugins/maps/common/constants'; +import { SOURCE_TYPES } from '../../../../maps/common/constants'; const euiVisColorPalette = euiPaletteColorBlind(); // Update field mappings to modify what fields will be returned to map tooltip diff --git a/x-pack/legacy/plugins/siem/public/components/embeddables/map_tool_tip/__snapshots__/line_tool_tip_content.test.tsx.snap b/x-pack/plugins/siem/public/components/embeddables/map_tool_tip/__snapshots__/line_tool_tip_content.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/embeddables/map_tool_tip/__snapshots__/line_tool_tip_content.test.tsx.snap rename to x-pack/plugins/siem/public/components/embeddables/map_tool_tip/__snapshots__/line_tool_tip_content.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/embeddables/map_tool_tip/__snapshots__/map_tool_tip.test.tsx.snap b/x-pack/plugins/siem/public/components/embeddables/map_tool_tip/__snapshots__/map_tool_tip.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/embeddables/map_tool_tip/__snapshots__/map_tool_tip.test.tsx.snap rename to x-pack/plugins/siem/public/components/embeddables/map_tool_tip/__snapshots__/map_tool_tip.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/embeddables/map_tool_tip/__snapshots__/point_tool_tip_content.test.tsx.snap b/x-pack/plugins/siem/public/components/embeddables/map_tool_tip/__snapshots__/point_tool_tip_content.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/embeddables/map_tool_tip/__snapshots__/point_tool_tip_content.test.tsx.snap rename to x-pack/plugins/siem/public/components/embeddables/map_tool_tip/__snapshots__/point_tool_tip_content.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/embeddables/map_tool_tip/__snapshots__/tooltip_footer.test.tsx.snap b/x-pack/plugins/siem/public/components/embeddables/map_tool_tip/__snapshots__/tooltip_footer.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/embeddables/map_tool_tip/__snapshots__/tooltip_footer.test.tsx.snap rename to x-pack/plugins/siem/public/components/embeddables/map_tool_tip/__snapshots__/tooltip_footer.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/embeddables/map_tool_tip/line_tool_tip_content.test.tsx b/x-pack/plugins/siem/public/components/embeddables/map_tool_tip/line_tool_tip_content.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/embeddables/map_tool_tip/line_tool_tip_content.test.tsx rename to x-pack/plugins/siem/public/components/embeddables/map_tool_tip/line_tool_tip_content.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/embeddables/map_tool_tip/line_tool_tip_content.tsx b/x-pack/plugins/siem/public/components/embeddables/map_tool_tip/line_tool_tip_content.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/embeddables/map_tool_tip/line_tool_tip_content.tsx rename to x-pack/plugins/siem/public/components/embeddables/map_tool_tip/line_tool_tip_content.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/embeddables/map_tool_tip/map_tool_tip.test.tsx b/x-pack/plugins/siem/public/components/embeddables/map_tool_tip/map_tool_tip.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/embeddables/map_tool_tip/map_tool_tip.test.tsx rename to x-pack/plugins/siem/public/components/embeddables/map_tool_tip/map_tool_tip.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/embeddables/map_tool_tip/map_tool_tip.tsx b/x-pack/plugins/siem/public/components/embeddables/map_tool_tip/map_tool_tip.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/embeddables/map_tool_tip/map_tool_tip.tsx rename to x-pack/plugins/siem/public/components/embeddables/map_tool_tip/map_tool_tip.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/embeddables/map_tool_tip/point_tool_tip_content.test.tsx b/x-pack/plugins/siem/public/components/embeddables/map_tool_tip/point_tool_tip_content.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/embeddables/map_tool_tip/point_tool_tip_content.test.tsx rename to x-pack/plugins/siem/public/components/embeddables/map_tool_tip/point_tool_tip_content.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/embeddables/map_tool_tip/point_tool_tip_content.tsx b/x-pack/plugins/siem/public/components/embeddables/map_tool_tip/point_tool_tip_content.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/embeddables/map_tool_tip/point_tool_tip_content.tsx rename to x-pack/plugins/siem/public/components/embeddables/map_tool_tip/point_tool_tip_content.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/embeddables/map_tool_tip/tooltip_footer.test.tsx b/x-pack/plugins/siem/public/components/embeddables/map_tool_tip/tooltip_footer.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/embeddables/map_tool_tip/tooltip_footer.test.tsx rename to x-pack/plugins/siem/public/components/embeddables/map_tool_tip/tooltip_footer.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/embeddables/map_tool_tip/tooltip_footer.tsx b/x-pack/plugins/siem/public/components/embeddables/map_tool_tip/tooltip_footer.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/embeddables/map_tool_tip/tooltip_footer.tsx rename to x-pack/plugins/siem/public/components/embeddables/map_tool_tip/tooltip_footer.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/embeddables/translations.ts b/x-pack/plugins/siem/public/components/embeddables/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/embeddables/translations.ts rename to x-pack/plugins/siem/public/components/embeddables/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/embeddables/types.ts b/x-pack/plugins/siem/public/components/embeddables/types.ts similarity index 93% rename from x-pack/legacy/plugins/siem/public/components/embeddables/types.ts rename to x-pack/plugins/siem/public/components/embeddables/types.ts index 216fe9105327ca..d8e20c7f47b4ed 100644 --- a/x-pack/legacy/plugins/siem/public/components/embeddables/types.ts +++ b/x-pack/plugins/siem/public/components/embeddables/types.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { RenderTooltipContentParams } from '../../../../maps/public'; +import { RenderTooltipContentParams } from '../../../../../legacy/plugins/maps/public'; import { inputsModel } from '../../store/inputs'; export interface IndexPatternMapping { diff --git a/x-pack/legacy/plugins/siem/public/components/empty_page/__snapshots__/index.test.tsx.snap b/x-pack/plugins/siem/public/components/empty_page/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/empty_page/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/siem/public/components/empty_page/__snapshots__/index.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/empty_page/index.test.tsx b/x-pack/plugins/siem/public/components/empty_page/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/empty_page/index.test.tsx rename to x-pack/plugins/siem/public/components/empty_page/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/empty_page/index.tsx b/x-pack/plugins/siem/public/components/empty_page/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/empty_page/index.tsx rename to x-pack/plugins/siem/public/components/empty_page/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/empty_value/__snapshots__/empty_value.test.tsx.snap b/x-pack/plugins/siem/public/components/empty_value/__snapshots__/empty_value.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/empty_value/__snapshots__/empty_value.test.tsx.snap rename to x-pack/plugins/siem/public/components/empty_value/__snapshots__/empty_value.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/empty_value/empty_value.test.tsx b/x-pack/plugins/siem/public/components/empty_value/empty_value.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/empty_value/empty_value.test.tsx rename to x-pack/plugins/siem/public/components/empty_value/empty_value.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/empty_value/index.tsx b/x-pack/plugins/siem/public/components/empty_value/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/empty_value/index.tsx rename to x-pack/plugins/siem/public/components/empty_value/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/empty_value/translations.ts b/x-pack/plugins/siem/public/components/empty_value/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/empty_value/translations.ts rename to x-pack/plugins/siem/public/components/empty_value/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/error_toast_dispatcher/__snapshots__/index.test.tsx.snap b/x-pack/plugins/siem/public/components/error_toast_dispatcher/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/error_toast_dispatcher/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/siem/public/components/error_toast_dispatcher/__snapshots__/index.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/error_toast_dispatcher/index.test.tsx b/x-pack/plugins/siem/public/components/error_toast_dispatcher/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/error_toast_dispatcher/index.test.tsx rename to x-pack/plugins/siem/public/components/error_toast_dispatcher/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/error_toast_dispatcher/index.tsx b/x-pack/plugins/siem/public/components/error_toast_dispatcher/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/error_toast_dispatcher/index.tsx rename to x-pack/plugins/siem/public/components/error_toast_dispatcher/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/event_details/__snapshots__/event_details.test.tsx.snap b/x-pack/plugins/siem/public/components/event_details/__snapshots__/event_details.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/event_details/__snapshots__/event_details.test.tsx.snap rename to x-pack/plugins/siem/public/components/event_details/__snapshots__/event_details.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/event_details/__snapshots__/json_view.test.tsx.snap b/x-pack/plugins/siem/public/components/event_details/__snapshots__/json_view.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/event_details/__snapshots__/json_view.test.tsx.snap rename to x-pack/plugins/siem/public/components/event_details/__snapshots__/json_view.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/event_details/columns.tsx b/x-pack/plugins/siem/public/components/event_details/columns.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/event_details/columns.tsx rename to x-pack/plugins/siem/public/components/event_details/columns.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/event_details/event_details.test.tsx b/x-pack/plugins/siem/public/components/event_details/event_details.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/event_details/event_details.test.tsx rename to x-pack/plugins/siem/public/components/event_details/event_details.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/event_details/event_details.tsx b/x-pack/plugins/siem/public/components/event_details/event_details.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/event_details/event_details.tsx rename to x-pack/plugins/siem/public/components/event_details/event_details.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/event_details/event_fields_browser.test.tsx b/x-pack/plugins/siem/public/components/event_details/event_fields_browser.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/event_details/event_fields_browser.test.tsx rename to x-pack/plugins/siem/public/components/event_details/event_fields_browser.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/event_details/event_fields_browser.tsx b/x-pack/plugins/siem/public/components/event_details/event_fields_browser.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/event_details/event_fields_browser.tsx rename to x-pack/plugins/siem/public/components/event_details/event_fields_browser.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/event_details/event_id.ts b/x-pack/plugins/siem/public/components/event_details/event_id.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/event_details/event_id.ts rename to x-pack/plugins/siem/public/components/event_details/event_id.ts diff --git a/x-pack/legacy/plugins/siem/public/components/event_details/helpers.test.tsx b/x-pack/plugins/siem/public/components/event_details/helpers.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/event_details/helpers.test.tsx rename to x-pack/plugins/siem/public/components/event_details/helpers.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/event_details/helpers.tsx b/x-pack/plugins/siem/public/components/event_details/helpers.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/event_details/helpers.tsx rename to x-pack/plugins/siem/public/components/event_details/helpers.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/event_details/json_view.test.tsx b/x-pack/plugins/siem/public/components/event_details/json_view.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/event_details/json_view.test.tsx rename to x-pack/plugins/siem/public/components/event_details/json_view.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/event_details/json_view.tsx b/x-pack/plugins/siem/public/components/event_details/json_view.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/event_details/json_view.tsx rename to x-pack/plugins/siem/public/components/event_details/json_view.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/event_details/stateful_event_details.tsx b/x-pack/plugins/siem/public/components/event_details/stateful_event_details.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/event_details/stateful_event_details.tsx rename to x-pack/plugins/siem/public/components/event_details/stateful_event_details.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/event_details/translations.ts b/x-pack/plugins/siem/public/components/event_details/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/event_details/translations.ts rename to x-pack/plugins/siem/public/components/event_details/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/event_details/types.ts b/x-pack/plugins/siem/public/components/event_details/types.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/event_details/types.ts rename to x-pack/plugins/siem/public/components/event_details/types.ts diff --git a/x-pack/legacy/plugins/siem/public/components/events_viewer/default_headers.tsx b/x-pack/plugins/siem/public/components/events_viewer/default_headers.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/events_viewer/default_headers.tsx rename to x-pack/plugins/siem/public/components/events_viewer/default_headers.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/events_viewer/default_model.tsx b/x-pack/plugins/siem/public/components/events_viewer/default_model.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/events_viewer/default_model.tsx rename to x-pack/plugins/siem/public/components/events_viewer/default_model.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/events_viewer/event_details_width_context.tsx b/x-pack/plugins/siem/public/components/events_viewer/event_details_width_context.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/events_viewer/event_details_width_context.tsx rename to x-pack/plugins/siem/public/components/events_viewer/event_details_width_context.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/events_viewer/events_viewer.test.tsx b/x-pack/plugins/siem/public/components/events_viewer/events_viewer.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/events_viewer/events_viewer.test.tsx rename to x-pack/plugins/siem/public/components/events_viewer/events_viewer.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/events_viewer/events_viewer.tsx b/x-pack/plugins/siem/public/components/events_viewer/events_viewer.tsx similarity index 98% rename from x-pack/legacy/plugins/siem/public/components/events_viewer/events_viewer.tsx rename to x-pack/plugins/siem/public/components/events_viewer/events_viewer.tsx index d210c749dae9c7..aff66396af39d3 100644 --- a/x-pack/legacy/plugins/siem/public/components/events_viewer/events_viewer.tsx +++ b/x-pack/plugins/siem/public/components/events_viewer/events_viewer.tsx @@ -27,12 +27,7 @@ import { TimelineRefetch } from '../timeline/refetch_timeline'; import { ManageTimelineContext, TimelineTypeContextProps } from '../timeline/timeline_context'; import { EventDetailsWidthProvider } from './event_details_width_context'; import * as i18n from './translations'; -import { - Filter, - esQuery, - IIndexPattern, - Query, -} from '../../../../../../../src/plugins/data/public'; +import { Filter, esQuery, IIndexPattern, Query } from '../../../../../../src/plugins/data/public'; import { inputsModel } from '../../store'; const DEFAULT_EVENTS_VIEWER_HEIGHT = 500; diff --git a/x-pack/legacy/plugins/siem/public/components/events_viewer/index.test.tsx b/x-pack/plugins/siem/public/components/events_viewer/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/events_viewer/index.test.tsx rename to x-pack/plugins/siem/public/components/events_viewer/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/events_viewer/index.tsx b/x-pack/plugins/siem/public/components/events_viewer/index.tsx similarity index 97% rename from x-pack/legacy/plugins/siem/public/components/events_viewer/index.tsx rename to x-pack/plugins/siem/public/components/events_viewer/index.tsx index c6d9dbc2fcfc89..bc6a1b3b77bfa9 100644 --- a/x-pack/legacy/plugins/siem/public/components/events_viewer/index.tsx +++ b/x-pack/plugins/siem/public/components/events_viewer/index.tsx @@ -8,7 +8,7 @@ import React, { useCallback, useMemo, useEffect } from 'react'; import { connect, ConnectedProps } from 'react-redux'; import deepEqual from 'fast-deep-equal'; -import { DEFAULT_INDEX_KEY } from '../../../../../../plugins/siem/common/constants'; +import { DEFAULT_INDEX_KEY } from '../../../common/constants'; import { inputsModel, inputsSelectors, State, timelineSelectors } from '../../store'; import { inputsActions, timelineActions } from '../../store/actions'; import { @@ -17,7 +17,7 @@ import { TimelineModel, } from '../../store/timeline/model'; import { OnChangeItemsPerPage } from '../timeline/events'; -import { Filter } from '../../../../../../../src/plugins/data/public'; +import { Filter } from '../../../../../../src/plugins/data/public'; import { useUiSetting } from '../../lib/kibana'; import { EventsViewer } from './events_viewer'; import { useFetchIndexPatterns } from '../../containers/detection_engine/rules/fetch_index_patterns'; diff --git a/x-pack/legacy/plugins/siem/public/components/events_viewer/mock.ts b/x-pack/plugins/siem/public/components/events_viewer/mock.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/events_viewer/mock.ts rename to x-pack/plugins/siem/public/components/events_viewer/mock.ts diff --git a/x-pack/legacy/plugins/siem/public/components/events_viewer/translations.ts b/x-pack/plugins/siem/public/components/events_viewer/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/events_viewer/translations.ts rename to x-pack/plugins/siem/public/components/events_viewer/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/external_link_icon/index.test.tsx b/x-pack/plugins/siem/public/components/external_link_icon/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/external_link_icon/index.test.tsx rename to x-pack/plugins/siem/public/components/external_link_icon/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/external_link_icon/index.tsx b/x-pack/plugins/siem/public/components/external_link_icon/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/external_link_icon/index.tsx rename to x-pack/plugins/siem/public/components/external_link_icon/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/field_renderers/__snapshots__/field_renderers.test.tsx.snap b/x-pack/plugins/siem/public/components/field_renderers/__snapshots__/field_renderers.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/field_renderers/__snapshots__/field_renderers.test.tsx.snap rename to x-pack/plugins/siem/public/components/field_renderers/__snapshots__/field_renderers.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/field_renderers/field_renderers.test.tsx b/x-pack/plugins/siem/public/components/field_renderers/field_renderers.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/field_renderers/field_renderers.test.tsx rename to x-pack/plugins/siem/public/components/field_renderers/field_renderers.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/field_renderers/field_renderers.tsx b/x-pack/plugins/siem/public/components/field_renderers/field_renderers.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/field_renderers/field_renderers.tsx rename to x-pack/plugins/siem/public/components/field_renderers/field_renderers.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/fields_browser/categories_pane.test.tsx b/x-pack/plugins/siem/public/components/fields_browser/categories_pane.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/fields_browser/categories_pane.test.tsx rename to x-pack/plugins/siem/public/components/fields_browser/categories_pane.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/fields_browser/categories_pane.tsx b/x-pack/plugins/siem/public/components/fields_browser/categories_pane.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/fields_browser/categories_pane.tsx rename to x-pack/plugins/siem/public/components/fields_browser/categories_pane.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/fields_browser/category.test.tsx b/x-pack/plugins/siem/public/components/fields_browser/category.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/fields_browser/category.test.tsx rename to x-pack/plugins/siem/public/components/fields_browser/category.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/fields_browser/category.tsx b/x-pack/plugins/siem/public/components/fields_browser/category.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/fields_browser/category.tsx rename to x-pack/plugins/siem/public/components/fields_browser/category.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/fields_browser/category_columns.test.tsx b/x-pack/plugins/siem/public/components/fields_browser/category_columns.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/fields_browser/category_columns.test.tsx rename to x-pack/plugins/siem/public/components/fields_browser/category_columns.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/fields_browser/category_columns.tsx b/x-pack/plugins/siem/public/components/fields_browser/category_columns.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/fields_browser/category_columns.tsx rename to x-pack/plugins/siem/public/components/fields_browser/category_columns.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/fields_browser/category_title.test.tsx b/x-pack/plugins/siem/public/components/fields_browser/category_title.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/fields_browser/category_title.test.tsx rename to x-pack/plugins/siem/public/components/fields_browser/category_title.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/fields_browser/category_title.tsx b/x-pack/plugins/siem/public/components/fields_browser/category_title.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/fields_browser/category_title.tsx rename to x-pack/plugins/siem/public/components/fields_browser/category_title.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/fields_browser/field_browser.test.tsx b/x-pack/plugins/siem/public/components/fields_browser/field_browser.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/fields_browser/field_browser.test.tsx rename to x-pack/plugins/siem/public/components/fields_browser/field_browser.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/fields_browser/field_browser.tsx b/x-pack/plugins/siem/public/components/fields_browser/field_browser.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/fields_browser/field_browser.tsx rename to x-pack/plugins/siem/public/components/fields_browser/field_browser.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/fields_browser/field_items.test.tsx b/x-pack/plugins/siem/public/components/fields_browser/field_items.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/fields_browser/field_items.test.tsx rename to x-pack/plugins/siem/public/components/fields_browser/field_items.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/fields_browser/field_items.tsx b/x-pack/plugins/siem/public/components/fields_browser/field_items.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/fields_browser/field_items.tsx rename to x-pack/plugins/siem/public/components/fields_browser/field_items.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/fields_browser/field_name.test.tsx b/x-pack/plugins/siem/public/components/fields_browser/field_name.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/fields_browser/field_name.test.tsx rename to x-pack/plugins/siem/public/components/fields_browser/field_name.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/fields_browser/field_name.tsx b/x-pack/plugins/siem/public/components/fields_browser/field_name.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/fields_browser/field_name.tsx rename to x-pack/plugins/siem/public/components/fields_browser/field_name.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/fields_browser/fields_pane.test.tsx b/x-pack/plugins/siem/public/components/fields_browser/fields_pane.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/fields_browser/fields_pane.test.tsx rename to x-pack/plugins/siem/public/components/fields_browser/fields_pane.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/fields_browser/fields_pane.tsx b/x-pack/plugins/siem/public/components/fields_browser/fields_pane.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/fields_browser/fields_pane.tsx rename to x-pack/plugins/siem/public/components/fields_browser/fields_pane.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/fields_browser/header.test.tsx b/x-pack/plugins/siem/public/components/fields_browser/header.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/fields_browser/header.test.tsx rename to x-pack/plugins/siem/public/components/fields_browser/header.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/fields_browser/header.tsx b/x-pack/plugins/siem/public/components/fields_browser/header.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/fields_browser/header.tsx rename to x-pack/plugins/siem/public/components/fields_browser/header.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/fields_browser/helpers.test.tsx b/x-pack/plugins/siem/public/components/fields_browser/helpers.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/fields_browser/helpers.test.tsx rename to x-pack/plugins/siem/public/components/fields_browser/helpers.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/fields_browser/helpers.tsx b/x-pack/plugins/siem/public/components/fields_browser/helpers.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/fields_browser/helpers.tsx rename to x-pack/plugins/siem/public/components/fields_browser/helpers.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/fields_browser/index.test.tsx b/x-pack/plugins/siem/public/components/fields_browser/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/fields_browser/index.test.tsx rename to x-pack/plugins/siem/public/components/fields_browser/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/fields_browser/index.tsx b/x-pack/plugins/siem/public/components/fields_browser/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/fields_browser/index.tsx rename to x-pack/plugins/siem/public/components/fields_browser/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/fields_browser/translations.ts b/x-pack/plugins/siem/public/components/fields_browser/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/fields_browser/translations.ts rename to x-pack/plugins/siem/public/components/fields_browser/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/fields_browser/types.ts b/x-pack/plugins/siem/public/components/fields_browser/types.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/fields_browser/types.ts rename to x-pack/plugins/siem/public/components/fields_browser/types.ts diff --git a/x-pack/legacy/plugins/siem/public/components/filter_popover/index.tsx b/x-pack/plugins/siem/public/components/filter_popover/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/filter_popover/index.tsx rename to x-pack/plugins/siem/public/components/filter_popover/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/filters_global/__snapshots__/filters_global.test.tsx.snap b/x-pack/plugins/siem/public/components/filters_global/__snapshots__/filters_global.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/filters_global/__snapshots__/filters_global.test.tsx.snap rename to x-pack/plugins/siem/public/components/filters_global/__snapshots__/filters_global.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/filters_global/filters_global.test.tsx b/x-pack/plugins/siem/public/components/filters_global/filters_global.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/filters_global/filters_global.test.tsx rename to x-pack/plugins/siem/public/components/filters_global/filters_global.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/filters_global/filters_global.tsx b/x-pack/plugins/siem/public/components/filters_global/filters_global.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/filters_global/filters_global.tsx rename to x-pack/plugins/siem/public/components/filters_global/filters_global.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/filters_global/index.tsx b/x-pack/plugins/siem/public/components/filters_global/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/filters_global/index.tsx rename to x-pack/plugins/siem/public/components/filters_global/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/flow_controls/__snapshots__/flow_direction_select.test.tsx.snap b/x-pack/plugins/siem/public/components/flow_controls/__snapshots__/flow_direction_select.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/flow_controls/__snapshots__/flow_direction_select.test.tsx.snap rename to x-pack/plugins/siem/public/components/flow_controls/__snapshots__/flow_direction_select.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/flow_controls/__snapshots__/flow_target_select.test.tsx.snap b/x-pack/plugins/siem/public/components/flow_controls/__snapshots__/flow_target_select.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/flow_controls/__snapshots__/flow_target_select.test.tsx.snap rename to x-pack/plugins/siem/public/components/flow_controls/__snapshots__/flow_target_select.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/flow_controls/flow_direction_select.test.tsx b/x-pack/plugins/siem/public/components/flow_controls/flow_direction_select.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/flow_controls/flow_direction_select.test.tsx rename to x-pack/plugins/siem/public/components/flow_controls/flow_direction_select.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/flow_controls/flow_direction_select.tsx b/x-pack/plugins/siem/public/components/flow_controls/flow_direction_select.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/flow_controls/flow_direction_select.tsx rename to x-pack/plugins/siem/public/components/flow_controls/flow_direction_select.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/flow_controls/flow_target_select.test.tsx b/x-pack/plugins/siem/public/components/flow_controls/flow_target_select.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/flow_controls/flow_target_select.test.tsx rename to x-pack/plugins/siem/public/components/flow_controls/flow_target_select.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/flow_controls/flow_target_select.tsx b/x-pack/plugins/siem/public/components/flow_controls/flow_target_select.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/flow_controls/flow_target_select.tsx rename to x-pack/plugins/siem/public/components/flow_controls/flow_target_select.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/flow_controls/translations.ts b/x-pack/plugins/siem/public/components/flow_controls/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/flow_controls/translations.ts rename to x-pack/plugins/siem/public/components/flow_controls/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/flyout/__snapshots__/index.test.tsx.snap b/x-pack/plugins/siem/public/components/flyout/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/flyout/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/siem/public/components/flyout/__snapshots__/index.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/flyout/button/index.tsx b/x-pack/plugins/siem/public/components/flyout/button/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/flyout/button/index.tsx rename to x-pack/plugins/siem/public/components/flyout/button/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/flyout/button/translations.ts b/x-pack/plugins/siem/public/components/flyout/button/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/flyout/button/translations.ts rename to x-pack/plugins/siem/public/components/flyout/button/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/flyout/header/index.tsx b/x-pack/plugins/siem/public/components/flyout/header/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/flyout/header/index.tsx rename to x-pack/plugins/siem/public/components/flyout/header/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/flyout/header_with_close_button/__snapshots__/index.test.tsx.snap b/x-pack/plugins/siem/public/components/flyout/header_with_close_button/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/flyout/header_with_close_button/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/siem/public/components/flyout/header_with_close_button/__snapshots__/index.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/flyout/header_with_close_button/index.test.tsx b/x-pack/plugins/siem/public/components/flyout/header_with_close_button/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/flyout/header_with_close_button/index.test.tsx rename to x-pack/plugins/siem/public/components/flyout/header_with_close_button/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/flyout/header_with_close_button/index.tsx b/x-pack/plugins/siem/public/components/flyout/header_with_close_button/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/flyout/header_with_close_button/index.tsx rename to x-pack/plugins/siem/public/components/flyout/header_with_close_button/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/flyout/header_with_close_button/translations.ts b/x-pack/plugins/siem/public/components/flyout/header_with_close_button/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/flyout/header_with_close_button/translations.ts rename to x-pack/plugins/siem/public/components/flyout/header_with_close_button/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/flyout/index.test.tsx b/x-pack/plugins/siem/public/components/flyout/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/flyout/index.test.tsx rename to x-pack/plugins/siem/public/components/flyout/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/flyout/index.tsx b/x-pack/plugins/siem/public/components/flyout/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/flyout/index.tsx rename to x-pack/plugins/siem/public/components/flyout/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/flyout/pane/__snapshots__/index.test.tsx.snap b/x-pack/plugins/siem/public/components/flyout/pane/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/flyout/pane/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/siem/public/components/flyout/pane/__snapshots__/index.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/flyout/pane/index.test.tsx b/x-pack/plugins/siem/public/components/flyout/pane/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/flyout/pane/index.test.tsx rename to x-pack/plugins/siem/public/components/flyout/pane/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/flyout/pane/index.tsx b/x-pack/plugins/siem/public/components/flyout/pane/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/flyout/pane/index.tsx rename to x-pack/plugins/siem/public/components/flyout/pane/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/flyout/pane/timeline_resize_handle.tsx b/x-pack/plugins/siem/public/components/flyout/pane/timeline_resize_handle.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/flyout/pane/timeline_resize_handle.tsx rename to x-pack/plugins/siem/public/components/flyout/pane/timeline_resize_handle.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/flyout/pane/translations.ts b/x-pack/plugins/siem/public/components/flyout/pane/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/flyout/pane/translations.ts rename to x-pack/plugins/siem/public/components/flyout/pane/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/formatted_bytes/__snapshots__/index.test.tsx.snap b/x-pack/plugins/siem/public/components/formatted_bytes/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/formatted_bytes/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/siem/public/components/formatted_bytes/__snapshots__/index.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/formatted_bytes/index.test.tsx b/x-pack/plugins/siem/public/components/formatted_bytes/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/formatted_bytes/index.test.tsx rename to x-pack/plugins/siem/public/components/formatted_bytes/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/formatted_bytes/index.tsx b/x-pack/plugins/siem/public/components/formatted_bytes/index.tsx similarity index 92% rename from x-pack/legacy/plugins/siem/public/components/formatted_bytes/index.tsx rename to x-pack/plugins/siem/public/components/formatted_bytes/index.tsx index abde602c1bdacc..98a1acf471629e 100644 --- a/x-pack/legacy/plugins/siem/public/components/formatted_bytes/index.tsx +++ b/x-pack/plugins/siem/public/components/formatted_bytes/index.tsx @@ -7,7 +7,7 @@ import React from 'react'; import numeral from '@elastic/numeral'; -import { DEFAULT_BYTES_FORMAT } from '../../../../../../plugins/siem/common/constants'; +import { DEFAULT_BYTES_FORMAT } from '../../../common/constants'; import { useUiSetting$ } from '../../lib/kibana'; type Bytes = string | number; diff --git a/x-pack/legacy/plugins/siem/public/components/formatted_date/__snapshots__/index.test.tsx.snap b/x-pack/plugins/siem/public/components/formatted_date/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/formatted_date/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/siem/public/components/formatted_date/__snapshots__/index.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/formatted_date/index.test.tsx b/x-pack/plugins/siem/public/components/formatted_date/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/formatted_date/index.test.tsx rename to x-pack/plugins/siem/public/components/formatted_date/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/formatted_date/index.tsx b/x-pack/plugins/siem/public/components/formatted_date/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/formatted_date/index.tsx rename to x-pack/plugins/siem/public/components/formatted_date/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/formatted_date/maybe_date.test.ts b/x-pack/plugins/siem/public/components/formatted_date/maybe_date.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/formatted_date/maybe_date.test.ts rename to x-pack/plugins/siem/public/components/formatted_date/maybe_date.test.ts diff --git a/x-pack/legacy/plugins/siem/public/components/formatted_date/maybe_date.ts b/x-pack/plugins/siem/public/components/formatted_date/maybe_date.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/formatted_date/maybe_date.ts rename to x-pack/plugins/siem/public/components/formatted_date/maybe_date.ts diff --git a/x-pack/legacy/plugins/siem/public/components/formatted_duration/helpers.test.ts b/x-pack/plugins/siem/public/components/formatted_duration/helpers.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/formatted_duration/helpers.test.ts rename to x-pack/plugins/siem/public/components/formatted_duration/helpers.test.ts diff --git a/x-pack/legacy/plugins/siem/public/components/formatted_duration/helpers.tsx b/x-pack/plugins/siem/public/components/formatted_duration/helpers.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/formatted_duration/helpers.tsx rename to x-pack/plugins/siem/public/components/formatted_duration/helpers.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/formatted_duration/index.tsx b/x-pack/plugins/siem/public/components/formatted_duration/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/formatted_duration/index.tsx rename to x-pack/plugins/siem/public/components/formatted_duration/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/formatted_duration/tooltip/index.tsx b/x-pack/plugins/siem/public/components/formatted_duration/tooltip/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/formatted_duration/tooltip/index.tsx rename to x-pack/plugins/siem/public/components/formatted_duration/tooltip/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/formatted_duration/translations.ts b/x-pack/plugins/siem/public/components/formatted_duration/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/formatted_duration/translations.ts rename to x-pack/plugins/siem/public/components/formatted_duration/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/formatted_ip/index.tsx b/x-pack/plugins/siem/public/components/formatted_ip/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/formatted_ip/index.tsx rename to x-pack/plugins/siem/public/components/formatted_ip/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/generic_downloader/__snapshots__/index.test.tsx.snap b/x-pack/plugins/siem/public/components/generic_downloader/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/generic_downloader/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/siem/public/components/generic_downloader/__snapshots__/index.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/generic_downloader/index.test.tsx b/x-pack/plugins/siem/public/components/generic_downloader/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/generic_downloader/index.test.tsx rename to x-pack/plugins/siem/public/components/generic_downloader/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/generic_downloader/index.tsx b/x-pack/plugins/siem/public/components/generic_downloader/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/generic_downloader/index.tsx rename to x-pack/plugins/siem/public/components/generic_downloader/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/generic_downloader/translations.ts b/x-pack/plugins/siem/public/components/generic_downloader/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/generic_downloader/translations.ts rename to x-pack/plugins/siem/public/components/generic_downloader/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/header_global/__snapshots__/index.test.tsx.snap b/x-pack/plugins/siem/public/components/header_global/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/header_global/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/siem/public/components/header_global/__snapshots__/index.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/header_global/index.test.tsx b/x-pack/plugins/siem/public/components/header_global/index.test.tsx similarity index 96% rename from x-pack/legacy/plugins/siem/public/components/header_global/index.test.tsx rename to x-pack/plugins/siem/public/components/header_global/index.test.tsx index 56fa0d56f3c3a1..0f6c5c2e139a7e 100644 --- a/x-pack/legacy/plugins/siem/public/components/header_global/index.test.tsx +++ b/x-pack/plugins/siem/public/components/header_global/index.test.tsx @@ -20,8 +20,6 @@ jest.mock('react-router-dom', () => ({ withRouter: () => jest.fn(), })); -jest.mock('ui/new_platform'); - // Test will fail because we will to need to mock some core services to make the test work // For now let's forget about SiemSearchBar jest.mock('../search_bar', () => ({ diff --git a/x-pack/legacy/plugins/siem/public/components/header_global/index.tsx b/x-pack/plugins/siem/public/components/header_global/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/header_global/index.tsx rename to x-pack/plugins/siem/public/components/header_global/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/header_global/translations.ts b/x-pack/plugins/siem/public/components/header_global/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/header_global/translations.ts rename to x-pack/plugins/siem/public/components/header_global/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/header_page/__snapshots__/editable_title.test.tsx.snap b/x-pack/plugins/siem/public/components/header_page/__snapshots__/editable_title.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/header_page/__snapshots__/editable_title.test.tsx.snap rename to x-pack/plugins/siem/public/components/header_page/__snapshots__/editable_title.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/header_page/__snapshots__/index.test.tsx.snap b/x-pack/plugins/siem/public/components/header_page/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/header_page/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/siem/public/components/header_page/__snapshots__/index.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/header_page/__snapshots__/title.test.tsx.snap b/x-pack/plugins/siem/public/components/header_page/__snapshots__/title.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/header_page/__snapshots__/title.test.tsx.snap rename to x-pack/plugins/siem/public/components/header_page/__snapshots__/title.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/header_page/editable_title.test.tsx b/x-pack/plugins/siem/public/components/header_page/editable_title.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/header_page/editable_title.test.tsx rename to x-pack/plugins/siem/public/components/header_page/editable_title.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/header_page/editable_title.tsx b/x-pack/plugins/siem/public/components/header_page/editable_title.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/header_page/editable_title.tsx rename to x-pack/plugins/siem/public/components/header_page/editable_title.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/header_page/index.test.tsx b/x-pack/plugins/siem/public/components/header_page/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/header_page/index.test.tsx rename to x-pack/plugins/siem/public/components/header_page/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/header_page/index.tsx b/x-pack/plugins/siem/public/components/header_page/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/header_page/index.tsx rename to x-pack/plugins/siem/public/components/header_page/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/header_page/title.test.tsx b/x-pack/plugins/siem/public/components/header_page/title.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/header_page/title.test.tsx rename to x-pack/plugins/siem/public/components/header_page/title.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/header_page/title.tsx b/x-pack/plugins/siem/public/components/header_page/title.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/header_page/title.tsx rename to x-pack/plugins/siem/public/components/header_page/title.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/header_page/translations.ts b/x-pack/plugins/siem/public/components/header_page/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/header_page/translations.ts rename to x-pack/plugins/siem/public/components/header_page/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/header_page/types.ts b/x-pack/plugins/siem/public/components/header_page/types.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/header_page/types.ts rename to x-pack/plugins/siem/public/components/header_page/types.ts diff --git a/x-pack/legacy/plugins/siem/public/components/header_section/__snapshots__/index.test.tsx.snap b/x-pack/plugins/siem/public/components/header_section/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/header_section/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/siem/public/components/header_section/__snapshots__/index.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/header_section/index.test.tsx b/x-pack/plugins/siem/public/components/header_section/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/header_section/index.test.tsx rename to x-pack/plugins/siem/public/components/header_section/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/header_section/index.tsx b/x-pack/plugins/siem/public/components/header_section/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/header_section/index.tsx rename to x-pack/plugins/siem/public/components/header_section/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/help_menu/index.tsx b/x-pack/plugins/siem/public/components/help_menu/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/help_menu/index.tsx rename to x-pack/plugins/siem/public/components/help_menu/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/import_data_modal/__snapshots__/index.test.tsx.snap b/x-pack/plugins/siem/public/components/import_data_modal/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/import_data_modal/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/siem/public/components/import_data_modal/__snapshots__/index.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/import_data_modal/index.test.tsx b/x-pack/plugins/siem/public/components/import_data_modal/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/import_data_modal/index.test.tsx rename to x-pack/plugins/siem/public/components/import_data_modal/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/import_data_modal/index.tsx b/x-pack/plugins/siem/public/components/import_data_modal/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/import_data_modal/index.tsx rename to x-pack/plugins/siem/public/components/import_data_modal/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/import_data_modal/translations.ts b/x-pack/plugins/siem/public/components/import_data_modal/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/import_data_modal/translations.ts rename to x-pack/plugins/siem/public/components/import_data_modal/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/inspect/index.test.tsx b/x-pack/plugins/siem/public/components/inspect/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/inspect/index.test.tsx rename to x-pack/plugins/siem/public/components/inspect/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/inspect/index.tsx b/x-pack/plugins/siem/public/components/inspect/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/inspect/index.tsx rename to x-pack/plugins/siem/public/components/inspect/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/inspect/modal.test.tsx b/x-pack/plugins/siem/public/components/inspect/modal.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/inspect/modal.test.tsx rename to x-pack/plugins/siem/public/components/inspect/modal.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/inspect/modal.tsx b/x-pack/plugins/siem/public/components/inspect/modal.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/inspect/modal.tsx rename to x-pack/plugins/siem/public/components/inspect/modal.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/inspect/translations.ts b/x-pack/plugins/siem/public/components/inspect/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/inspect/translations.ts rename to x-pack/plugins/siem/public/components/inspect/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ip/__snapshots__/index.test.tsx.snap b/x-pack/plugins/siem/public/components/ip/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ip/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/siem/public/components/ip/__snapshots__/index.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/ip/index.test.tsx b/x-pack/plugins/siem/public/components/ip/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ip/index.test.tsx rename to x-pack/plugins/siem/public/components/ip/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/ip/index.tsx b/x-pack/plugins/siem/public/components/ip/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ip/index.tsx rename to x-pack/plugins/siem/public/components/ip/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/ja3_fingerprint/index.test.tsx b/x-pack/plugins/siem/public/components/ja3_fingerprint/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ja3_fingerprint/index.test.tsx rename to x-pack/plugins/siem/public/components/ja3_fingerprint/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/ja3_fingerprint/index.tsx b/x-pack/plugins/siem/public/components/ja3_fingerprint/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ja3_fingerprint/index.tsx rename to x-pack/plugins/siem/public/components/ja3_fingerprint/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/ja3_fingerprint/translations.ts b/x-pack/plugins/siem/public/components/ja3_fingerprint/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ja3_fingerprint/translations.ts rename to x-pack/plugins/siem/public/components/ja3_fingerprint/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/last_event_time/index.test.tsx b/x-pack/plugins/siem/public/components/last_event_time/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/last_event_time/index.test.tsx rename to x-pack/plugins/siem/public/components/last_event_time/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/last_event_time/index.tsx b/x-pack/plugins/siem/public/components/last_event_time/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/last_event_time/index.tsx rename to x-pack/plugins/siem/public/components/last_event_time/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/lazy_accordion/index.tsx b/x-pack/plugins/siem/public/components/lazy_accordion/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/lazy_accordion/index.tsx rename to x-pack/plugins/siem/public/components/lazy_accordion/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/link_icon/__snapshots__/index.test.tsx.snap b/x-pack/plugins/siem/public/components/link_icon/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/link_icon/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/siem/public/components/link_icon/__snapshots__/index.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/link_icon/index.test.tsx b/x-pack/plugins/siem/public/components/link_icon/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/link_icon/index.test.tsx rename to x-pack/plugins/siem/public/components/link_icon/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/link_icon/index.tsx b/x-pack/plugins/siem/public/components/link_icon/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/link_icon/index.tsx rename to x-pack/plugins/siem/public/components/link_icon/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/link_to/helpers.test.ts b/x-pack/plugins/siem/public/components/link_to/helpers.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/link_to/helpers.test.ts rename to x-pack/plugins/siem/public/components/link_to/helpers.test.ts diff --git a/x-pack/legacy/plugins/siem/public/components/link_to/helpers.ts b/x-pack/plugins/siem/public/components/link_to/helpers.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/link_to/helpers.ts rename to x-pack/plugins/siem/public/components/link_to/helpers.ts diff --git a/x-pack/legacy/plugins/siem/public/components/link_to/index.ts b/x-pack/plugins/siem/public/components/link_to/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/link_to/index.ts rename to x-pack/plugins/siem/public/components/link_to/index.ts diff --git a/x-pack/legacy/plugins/siem/public/components/link_to/link_to.tsx b/x-pack/plugins/siem/public/components/link_to/link_to.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/link_to/link_to.tsx rename to x-pack/plugins/siem/public/components/link_to/link_to.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/link_to/redirect_to_case.tsx b/x-pack/plugins/siem/public/components/link_to/redirect_to_case.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/link_to/redirect_to_case.tsx rename to x-pack/plugins/siem/public/components/link_to/redirect_to_case.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/link_to/redirect_to_detection_engine.tsx b/x-pack/plugins/siem/public/components/link_to/redirect_to_detection_engine.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/link_to/redirect_to_detection_engine.tsx rename to x-pack/plugins/siem/public/components/link_to/redirect_to_detection_engine.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/link_to/redirect_to_hosts.tsx b/x-pack/plugins/siem/public/components/link_to/redirect_to_hosts.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/link_to/redirect_to_hosts.tsx rename to x-pack/plugins/siem/public/components/link_to/redirect_to_hosts.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/link_to/redirect_to_network.tsx b/x-pack/plugins/siem/public/components/link_to/redirect_to_network.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/link_to/redirect_to_network.tsx rename to x-pack/plugins/siem/public/components/link_to/redirect_to_network.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/link_to/redirect_to_overview.tsx b/x-pack/plugins/siem/public/components/link_to/redirect_to_overview.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/link_to/redirect_to_overview.tsx rename to x-pack/plugins/siem/public/components/link_to/redirect_to_overview.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/link_to/redirect_to_timelines.tsx b/x-pack/plugins/siem/public/components/link_to/redirect_to_timelines.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/link_to/redirect_to_timelines.tsx rename to x-pack/plugins/siem/public/components/link_to/redirect_to_timelines.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/link_to/redirect_wrapper.tsx b/x-pack/plugins/siem/public/components/link_to/redirect_wrapper.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/link_to/redirect_wrapper.tsx rename to x-pack/plugins/siem/public/components/link_to/redirect_wrapper.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/links/index.test.tsx b/x-pack/plugins/siem/public/components/links/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/links/index.test.tsx rename to x-pack/plugins/siem/public/components/links/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/links/index.tsx b/x-pack/plugins/siem/public/components/links/index.tsx similarity index 99% rename from x-pack/legacy/plugins/siem/public/components/links/index.tsx rename to x-pack/plugins/siem/public/components/links/index.tsx index 45225e31e9ac82..6d473f47217105 100644 --- a/x-pack/legacy/plugins/siem/public/components/links/index.tsx +++ b/x-pack/plugins/siem/public/components/links/index.tsx @@ -9,7 +9,7 @@ import React, { useMemo } from 'react'; import { isNil } from 'lodash/fp'; import styled from 'styled-components'; -import { IP_REPUTATION_LINKS_SETTING } from '../../../../../../plugins/siem/common/constants'; +import { IP_REPUTATION_LINKS_SETTING } from '../../../common/constants'; import { DefaultFieldRendererOverflow, DEFAULT_MORE_MAX_HEIGHT, diff --git a/x-pack/legacy/plugins/siem/public/components/links/translations.ts b/x-pack/plugins/siem/public/components/links/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/links/translations.ts rename to x-pack/plugins/siem/public/components/links/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/loader/__snapshots__/index.test.tsx.snap b/x-pack/plugins/siem/public/components/loader/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/loader/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/siem/public/components/loader/__snapshots__/index.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/loader/index.test.tsx b/x-pack/plugins/siem/public/components/loader/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/loader/index.test.tsx rename to x-pack/plugins/siem/public/components/loader/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/loader/index.tsx b/x-pack/plugins/siem/public/components/loader/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/loader/index.tsx rename to x-pack/plugins/siem/public/components/loader/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/loading/index.tsx b/x-pack/plugins/siem/public/components/loading/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/loading/index.tsx rename to x-pack/plugins/siem/public/components/loading/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/localized_date_tooltip/index.test.tsx b/x-pack/plugins/siem/public/components/localized_date_tooltip/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/localized_date_tooltip/index.test.tsx rename to x-pack/plugins/siem/public/components/localized_date_tooltip/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/localized_date_tooltip/index.tsx b/x-pack/plugins/siem/public/components/localized_date_tooltip/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/localized_date_tooltip/index.tsx rename to x-pack/plugins/siem/public/components/localized_date_tooltip/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/markdown/__snapshots__/index.test.tsx.snap b/x-pack/plugins/siem/public/components/markdown/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/markdown/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/siem/public/components/markdown/__snapshots__/index.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/markdown/__snapshots__/markdown_hint.test.tsx.snap b/x-pack/plugins/siem/public/components/markdown/__snapshots__/markdown_hint.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/markdown/__snapshots__/markdown_hint.test.tsx.snap rename to x-pack/plugins/siem/public/components/markdown/__snapshots__/markdown_hint.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/markdown/index.test.tsx b/x-pack/plugins/siem/public/components/markdown/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/markdown/index.test.tsx rename to x-pack/plugins/siem/public/components/markdown/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/markdown/index.tsx b/x-pack/plugins/siem/public/components/markdown/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/markdown/index.tsx rename to x-pack/plugins/siem/public/components/markdown/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/markdown/markdown_hint.test.tsx b/x-pack/plugins/siem/public/components/markdown/markdown_hint.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/markdown/markdown_hint.test.tsx rename to x-pack/plugins/siem/public/components/markdown/markdown_hint.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/markdown/markdown_hint.tsx b/x-pack/plugins/siem/public/components/markdown/markdown_hint.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/markdown/markdown_hint.tsx rename to x-pack/plugins/siem/public/components/markdown/markdown_hint.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/markdown/translations.ts b/x-pack/plugins/siem/public/components/markdown/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/markdown/translations.ts rename to x-pack/plugins/siem/public/components/markdown/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/markdown_editor/constants.ts b/x-pack/plugins/siem/public/components/markdown_editor/constants.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/markdown_editor/constants.ts rename to x-pack/plugins/siem/public/components/markdown_editor/constants.ts diff --git a/x-pack/legacy/plugins/siem/public/components/markdown_editor/form.tsx b/x-pack/plugins/siem/public/components/markdown_editor/form.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/markdown_editor/form.tsx rename to x-pack/plugins/siem/public/components/markdown_editor/form.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/markdown_editor/index.tsx b/x-pack/plugins/siem/public/components/markdown_editor/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/markdown_editor/index.tsx rename to x-pack/plugins/siem/public/components/markdown_editor/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/markdown_editor/translations.ts b/x-pack/plugins/siem/public/components/markdown_editor/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/markdown_editor/translations.ts rename to x-pack/plugins/siem/public/components/markdown_editor/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/matrix_histogram/__snapshots__/index.test.tsx.snap b/x-pack/plugins/siem/public/components/matrix_histogram/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/matrix_histogram/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/siem/public/components/matrix_histogram/__snapshots__/index.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/matrix_histogram/index.test.tsx b/x-pack/plugins/siem/public/components/matrix_histogram/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/matrix_histogram/index.test.tsx rename to x-pack/plugins/siem/public/components/matrix_histogram/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/matrix_histogram/index.tsx b/x-pack/plugins/siem/public/components/matrix_histogram/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/matrix_histogram/index.tsx rename to x-pack/plugins/siem/public/components/matrix_histogram/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/matrix_histogram/matrix_loader.tsx b/x-pack/plugins/siem/public/components/matrix_histogram/matrix_loader.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/matrix_histogram/matrix_loader.tsx rename to x-pack/plugins/siem/public/components/matrix_histogram/matrix_loader.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/matrix_histogram/translations.ts b/x-pack/plugins/siem/public/components/matrix_histogram/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/matrix_histogram/translations.ts rename to x-pack/plugins/siem/public/components/matrix_histogram/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/matrix_histogram/types.ts b/x-pack/plugins/siem/public/components/matrix_histogram/types.ts similarity index 97% rename from x-pack/legacy/plugins/siem/public/components/matrix_histogram/types.ts rename to x-pack/plugins/siem/public/components/matrix_histogram/types.ts index 98437845a3ab7d..c59775ad325d07 100644 --- a/x-pack/legacy/plugins/siem/public/components/matrix_histogram/types.ts +++ b/x-pack/plugins/siem/public/components/matrix_histogram/types.ts @@ -7,7 +7,7 @@ import { EuiTitleSize } from '@elastic/eui'; import { ScaleType, Position, TickFormatter } from '@elastic/charts'; import { ActionCreator } from 'redux'; -import { ESQuery } from '../../../../../../plugins/siem/common/typed_json'; +import { ESQuery } from '../../../common/typed_json'; import { SetQuery } from '../../pages/hosts/navigation/types'; import { InputsModelId } from '../../store/inputs/constants'; import { HistogramType } from '../../graphql/types'; diff --git a/x-pack/legacy/plugins/siem/public/components/matrix_histogram/utils.test.ts b/x-pack/plugins/siem/public/components/matrix_histogram/utils.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/matrix_histogram/utils.test.ts rename to x-pack/plugins/siem/public/components/matrix_histogram/utils.test.ts diff --git a/x-pack/legacy/plugins/siem/public/components/matrix_histogram/utils.ts b/x-pack/plugins/siem/public/components/matrix_histogram/utils.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/matrix_histogram/utils.ts rename to x-pack/plugins/siem/public/components/matrix_histogram/utils.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/__snapshots__/entity_draggable.test.tsx.snap b/x-pack/plugins/siem/public/components/ml/__snapshots__/entity_draggable.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/__snapshots__/entity_draggable.test.tsx.snap rename to x-pack/plugins/siem/public/components/ml/__snapshots__/entity_draggable.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/ml/anomaly/anomaly_table_provider.tsx b/x-pack/plugins/siem/public/components/ml/anomaly/anomaly_table_provider.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/anomaly/anomaly_table_provider.tsx rename to x-pack/plugins/siem/public/components/ml/anomaly/anomaly_table_provider.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/ml/anomaly/get_interval_from_anomalies.test.ts b/x-pack/plugins/siem/public/components/ml/anomaly/get_interval_from_anomalies.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/anomaly/get_interval_from_anomalies.test.ts rename to x-pack/plugins/siem/public/components/ml/anomaly/get_interval_from_anomalies.test.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/anomaly/get_interval_from_anomalies.ts b/x-pack/plugins/siem/public/components/ml/anomaly/get_interval_from_anomalies.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/anomaly/get_interval_from_anomalies.ts rename to x-pack/plugins/siem/public/components/ml/anomaly/get_interval_from_anomalies.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/anomaly/translations.ts b/x-pack/plugins/siem/public/components/ml/anomaly/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/anomaly/translations.ts rename to x-pack/plugins/siem/public/components/ml/anomaly/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/anomaly/use_anomalies_table_data.test.ts b/x-pack/plugins/siem/public/components/ml/anomaly/use_anomalies_table_data.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/anomaly/use_anomalies_table_data.test.ts rename to x-pack/plugins/siem/public/components/ml/anomaly/use_anomalies_table_data.test.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/anomaly/use_anomalies_table_data.ts b/x-pack/plugins/siem/public/components/ml/anomaly/use_anomalies_table_data.ts similarity index 97% rename from x-pack/legacy/plugins/siem/public/components/ml/anomaly/use_anomalies_table_data.ts rename to x-pack/plugins/siem/public/components/ml/anomaly/use_anomalies_table_data.ts index cebfc172ee6fff..d64bd3a64e941f 100644 --- a/x-pack/legacy/plugins/siem/public/components/ml/anomaly/use_anomalies_table_data.ts +++ b/x-pack/plugins/siem/public/components/ml/anomaly/use_anomalies_table_data.ts @@ -6,7 +6,7 @@ import { useState, useEffect } from 'react'; -import { DEFAULT_ANOMALY_SCORE } from '../../../../../../../plugins/siem/common/constants'; +import { DEFAULT_ANOMALY_SCORE } from '../../../../common/constants'; import { anomaliesTableData } from '../api/anomalies_table_data'; import { InfluencerInput, Anomalies, CriteriaFields } from '../types'; import { hasMlUserPermissions } from '../permissions/has_ml_user_permissions'; diff --git a/x-pack/legacy/plugins/siem/public/components/ml/api/anomalies_table_data.ts b/x-pack/plugins/siem/public/components/ml/api/anomalies_table_data.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/api/anomalies_table_data.ts rename to x-pack/plugins/siem/public/components/ml/api/anomalies_table_data.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/api/errors.ts b/x-pack/plugins/siem/public/components/ml/api/errors.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/api/errors.ts rename to x-pack/plugins/siem/public/components/ml/api/errors.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/api/get_ml_capabilities.ts b/x-pack/plugins/siem/public/components/ml/api/get_ml_capabilities.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/api/get_ml_capabilities.ts rename to x-pack/plugins/siem/public/components/ml/api/get_ml_capabilities.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/api/throw_if_not_ok.test.ts b/x-pack/plugins/siem/public/components/ml/api/throw_if_not_ok.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/api/throw_if_not_ok.test.ts rename to x-pack/plugins/siem/public/components/ml/api/throw_if_not_ok.test.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/api/throw_if_not_ok.ts b/x-pack/plugins/siem/public/components/ml/api/throw_if_not_ok.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/api/throw_if_not_ok.ts rename to x-pack/plugins/siem/public/components/ml/api/throw_if_not_ok.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/api/translations.ts b/x-pack/plugins/siem/public/components/ml/api/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/api/translations.ts rename to x-pack/plugins/siem/public/components/ml/api/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/conditional_links/add_entities_to_kql.test.ts b/x-pack/plugins/siem/public/components/ml/conditional_links/add_entities_to_kql.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/conditional_links/add_entities_to_kql.test.ts rename to x-pack/plugins/siem/public/components/ml/conditional_links/add_entities_to_kql.test.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/conditional_links/add_entities_to_kql.ts b/x-pack/plugins/siem/public/components/ml/conditional_links/add_entities_to_kql.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/conditional_links/add_entities_to_kql.ts rename to x-pack/plugins/siem/public/components/ml/conditional_links/add_entities_to_kql.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/conditional_links/entity_helpers.test.ts b/x-pack/plugins/siem/public/components/ml/conditional_links/entity_helpers.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/conditional_links/entity_helpers.test.ts rename to x-pack/plugins/siem/public/components/ml/conditional_links/entity_helpers.test.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/conditional_links/entity_helpers.ts b/x-pack/plugins/siem/public/components/ml/conditional_links/entity_helpers.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/conditional_links/entity_helpers.ts rename to x-pack/plugins/siem/public/components/ml/conditional_links/entity_helpers.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/conditional_links/ml_host_conditional_container.tsx b/x-pack/plugins/siem/public/components/ml/conditional_links/ml_host_conditional_container.tsx similarity index 97% rename from x-pack/legacy/plugins/siem/public/components/ml/conditional_links/ml_host_conditional_container.tsx rename to x-pack/plugins/siem/public/components/ml/conditional_links/ml_host_conditional_container.tsx index b5aacdf664c67a..b7c544273ae927 100644 --- a/x-pack/legacy/plugins/siem/public/components/ml/conditional_links/ml_host_conditional_container.tsx +++ b/x-pack/plugins/siem/public/components/ml/conditional_links/ml_host_conditional_container.tsx @@ -14,7 +14,7 @@ import { emptyEntity, multipleEntities, getMultipleEntities } from './entity_hel import { SiemPageName } from '../../../pages/home/types'; import { HostsTableType } from '../../../store/hosts/model'; -import { url as urlUtils } from '../../../../../../../../src/plugins/kibana_utils/public'; +import { url as urlUtils } from '../../../../../../../src/plugins/kibana_utils/public'; interface QueryStringType { '?_g': string; diff --git a/x-pack/legacy/plugins/siem/public/components/ml/conditional_links/ml_network_conditional_container.tsx b/x-pack/plugins/siem/public/components/ml/conditional_links/ml_network_conditional_container.tsx similarity index 97% rename from x-pack/legacy/plugins/siem/public/components/ml/conditional_links/ml_network_conditional_container.tsx rename to x-pack/plugins/siem/public/components/ml/conditional_links/ml_network_conditional_container.tsx index e27e9dc084c573..54773e3ab6dda7 100644 --- a/x-pack/legacy/plugins/siem/public/components/ml/conditional_links/ml_network_conditional_container.tsx +++ b/x-pack/plugins/siem/public/components/ml/conditional_links/ml_network_conditional_container.tsx @@ -13,7 +13,7 @@ import { replaceKQLParts } from './replace_kql_parts'; import { emptyEntity, getMultipleEntities, multipleEntities } from './entity_helpers'; import { SiemPageName } from '../../../pages/home/types'; -import { url as urlUtils } from '../../../../../../../../src/plugins/kibana_utils/public'; +import { url as urlUtils } from '../../../../../../../src/plugins/kibana_utils/public'; interface QueryStringType { '?_g': string; diff --git a/x-pack/legacy/plugins/siem/public/components/ml/conditional_links/remove_kql_variables.test.ts b/x-pack/plugins/siem/public/components/ml/conditional_links/remove_kql_variables.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/conditional_links/remove_kql_variables.test.ts rename to x-pack/plugins/siem/public/components/ml/conditional_links/remove_kql_variables.test.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/conditional_links/remove_kql_variables.ts b/x-pack/plugins/siem/public/components/ml/conditional_links/remove_kql_variables.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/conditional_links/remove_kql_variables.ts rename to x-pack/plugins/siem/public/components/ml/conditional_links/remove_kql_variables.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/conditional_links/replace_kql_commas_with_or.test.ts b/x-pack/plugins/siem/public/components/ml/conditional_links/replace_kql_commas_with_or.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/conditional_links/replace_kql_commas_with_or.test.ts rename to x-pack/plugins/siem/public/components/ml/conditional_links/replace_kql_commas_with_or.test.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/conditional_links/replace_kql_commas_with_or.ts b/x-pack/plugins/siem/public/components/ml/conditional_links/replace_kql_commas_with_or.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/conditional_links/replace_kql_commas_with_or.ts rename to x-pack/plugins/siem/public/components/ml/conditional_links/replace_kql_commas_with_or.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/conditional_links/replace_kql_parts.test.ts b/x-pack/plugins/siem/public/components/ml/conditional_links/replace_kql_parts.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/conditional_links/replace_kql_parts.test.ts rename to x-pack/plugins/siem/public/components/ml/conditional_links/replace_kql_parts.test.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/conditional_links/replace_kql_parts.ts b/x-pack/plugins/siem/public/components/ml/conditional_links/replace_kql_parts.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/conditional_links/replace_kql_parts.ts rename to x-pack/plugins/siem/public/components/ml/conditional_links/replace_kql_parts.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/conditional_links/rison_helpers.test.ts b/x-pack/plugins/siem/public/components/ml/conditional_links/rison_helpers.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/conditional_links/rison_helpers.test.ts rename to x-pack/plugins/siem/public/components/ml/conditional_links/rison_helpers.test.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/conditional_links/rison_helpers.ts b/x-pack/plugins/siem/public/components/ml/conditional_links/rison_helpers.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/conditional_links/rison_helpers.ts rename to x-pack/plugins/siem/public/components/ml/conditional_links/rison_helpers.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/criteria/get_criteria_from_host_type.test.ts b/x-pack/plugins/siem/public/components/ml/criteria/get_criteria_from_host_type.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/criteria/get_criteria_from_host_type.test.ts rename to x-pack/plugins/siem/public/components/ml/criteria/get_criteria_from_host_type.test.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/criteria/get_criteria_from_host_type.ts b/x-pack/plugins/siem/public/components/ml/criteria/get_criteria_from_host_type.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/criteria/get_criteria_from_host_type.ts rename to x-pack/plugins/siem/public/components/ml/criteria/get_criteria_from_host_type.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/criteria/get_criteria_from_network_type.test.ts b/x-pack/plugins/siem/public/components/ml/criteria/get_criteria_from_network_type.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/criteria/get_criteria_from_network_type.test.ts rename to x-pack/plugins/siem/public/components/ml/criteria/get_criteria_from_network_type.test.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/criteria/get_criteria_from_network_type.ts b/x-pack/plugins/siem/public/components/ml/criteria/get_criteria_from_network_type.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/criteria/get_criteria_from_network_type.ts rename to x-pack/plugins/siem/public/components/ml/criteria/get_criteria_from_network_type.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/criteria/host_to_criteria.test.ts b/x-pack/plugins/siem/public/components/ml/criteria/host_to_criteria.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/criteria/host_to_criteria.test.ts rename to x-pack/plugins/siem/public/components/ml/criteria/host_to_criteria.test.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/criteria/host_to_criteria.ts b/x-pack/plugins/siem/public/components/ml/criteria/host_to_criteria.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/criteria/host_to_criteria.ts rename to x-pack/plugins/siem/public/components/ml/criteria/host_to_criteria.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/criteria/network_to_criteria.test.ts b/x-pack/plugins/siem/public/components/ml/criteria/network_to_criteria.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/criteria/network_to_criteria.test.ts rename to x-pack/plugins/siem/public/components/ml/criteria/network_to_criteria.test.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/criteria/network_to_criteria.ts b/x-pack/plugins/siem/public/components/ml/criteria/network_to_criteria.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/criteria/network_to_criteria.ts rename to x-pack/plugins/siem/public/components/ml/criteria/network_to_criteria.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/empty_ml_capabilities.ts b/x-pack/plugins/siem/public/components/ml/empty_ml_capabilities.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/empty_ml_capabilities.ts rename to x-pack/plugins/siem/public/components/ml/empty_ml_capabilities.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/entity_draggable.test.tsx b/x-pack/plugins/siem/public/components/ml/entity_draggable.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/entity_draggable.test.tsx rename to x-pack/plugins/siem/public/components/ml/entity_draggable.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/ml/entity_draggable.tsx b/x-pack/plugins/siem/public/components/ml/entity_draggable.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/entity_draggable.tsx rename to x-pack/plugins/siem/public/components/ml/entity_draggable.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/ml/get_entries.test.ts b/x-pack/plugins/siem/public/components/ml/get_entries.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/get_entries.test.ts rename to x-pack/plugins/siem/public/components/ml/get_entries.test.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/get_entries.ts b/x-pack/plugins/siem/public/components/ml/get_entries.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/get_entries.ts rename to x-pack/plugins/siem/public/components/ml/get_entries.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/influencers/__snapshots__/create_influencers.test.tsx.snap b/x-pack/plugins/siem/public/components/ml/influencers/__snapshots__/create_influencers.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/influencers/__snapshots__/create_influencers.test.tsx.snap rename to x-pack/plugins/siem/public/components/ml/influencers/__snapshots__/create_influencers.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/ml/influencers/create_influencers.test.tsx b/x-pack/plugins/siem/public/components/ml/influencers/create_influencers.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/influencers/create_influencers.test.tsx rename to x-pack/plugins/siem/public/components/ml/influencers/create_influencers.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/ml/influencers/create_influencers.tsx b/x-pack/plugins/siem/public/components/ml/influencers/create_influencers.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/influencers/create_influencers.tsx rename to x-pack/plugins/siem/public/components/ml/influencers/create_influencers.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/ml/influencers/get_host_name_from_influencers.test.ts b/x-pack/plugins/siem/public/components/ml/influencers/get_host_name_from_influencers.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/influencers/get_host_name_from_influencers.test.ts rename to x-pack/plugins/siem/public/components/ml/influencers/get_host_name_from_influencers.test.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/influencers/get_host_name_from_influencers.ts b/x-pack/plugins/siem/public/components/ml/influencers/get_host_name_from_influencers.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/influencers/get_host_name_from_influencers.ts rename to x-pack/plugins/siem/public/components/ml/influencers/get_host_name_from_influencers.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/influencers/get_network_from_influencers.test.ts b/x-pack/plugins/siem/public/components/ml/influencers/get_network_from_influencers.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/influencers/get_network_from_influencers.test.ts rename to x-pack/plugins/siem/public/components/ml/influencers/get_network_from_influencers.test.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/influencers/get_network_from_influencers.ts b/x-pack/plugins/siem/public/components/ml/influencers/get_network_from_influencers.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/influencers/get_network_from_influencers.ts rename to x-pack/plugins/siem/public/components/ml/influencers/get_network_from_influencers.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/influencers/host_to_influencers.test.ts b/x-pack/plugins/siem/public/components/ml/influencers/host_to_influencers.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/influencers/host_to_influencers.test.ts rename to x-pack/plugins/siem/public/components/ml/influencers/host_to_influencers.test.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/influencers/host_to_influencers.ts b/x-pack/plugins/siem/public/components/ml/influencers/host_to_influencers.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/influencers/host_to_influencers.ts rename to x-pack/plugins/siem/public/components/ml/influencers/host_to_influencers.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/influencers/network_to_influencers.test.ts b/x-pack/plugins/siem/public/components/ml/influencers/network_to_influencers.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/influencers/network_to_influencers.test.ts rename to x-pack/plugins/siem/public/components/ml/influencers/network_to_influencers.test.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/influencers/network_to_influencers.ts b/x-pack/plugins/siem/public/components/ml/influencers/network_to_influencers.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/influencers/network_to_influencers.ts rename to x-pack/plugins/siem/public/components/ml/influencers/network_to_influencers.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/links/create_explorer_link.test.ts b/x-pack/plugins/siem/public/components/ml/links/create_explorer_link.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/links/create_explorer_link.test.ts rename to x-pack/plugins/siem/public/components/ml/links/create_explorer_link.test.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/links/create_explorer_link.ts b/x-pack/plugins/siem/public/components/ml/links/create_explorer_link.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/links/create_explorer_link.ts rename to x-pack/plugins/siem/public/components/ml/links/create_explorer_link.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/links/create_series_link.test.ts b/x-pack/plugins/siem/public/components/ml/links/create_series_link.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/links/create_series_link.test.ts rename to x-pack/plugins/siem/public/components/ml/links/create_series_link.test.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/links/create_series_link.ts b/x-pack/plugins/siem/public/components/ml/links/create_series_link.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/links/create_series_link.ts rename to x-pack/plugins/siem/public/components/ml/links/create_series_link.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/mock.ts b/x-pack/plugins/siem/public/components/ml/mock.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/mock.ts rename to x-pack/plugins/siem/public/components/ml/mock.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/permissions/has_ml_admin_permissions.test.ts b/x-pack/plugins/siem/public/components/ml/permissions/has_ml_admin_permissions.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/permissions/has_ml_admin_permissions.test.ts rename to x-pack/plugins/siem/public/components/ml/permissions/has_ml_admin_permissions.test.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/permissions/has_ml_admin_permissions.ts b/x-pack/plugins/siem/public/components/ml/permissions/has_ml_admin_permissions.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/permissions/has_ml_admin_permissions.ts rename to x-pack/plugins/siem/public/components/ml/permissions/has_ml_admin_permissions.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/permissions/has_ml_user_permissions.test.ts b/x-pack/plugins/siem/public/components/ml/permissions/has_ml_user_permissions.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/permissions/has_ml_user_permissions.test.ts rename to x-pack/plugins/siem/public/components/ml/permissions/has_ml_user_permissions.test.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/permissions/has_ml_user_permissions.ts b/x-pack/plugins/siem/public/components/ml/permissions/has_ml_user_permissions.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/permissions/has_ml_user_permissions.ts rename to x-pack/plugins/siem/public/components/ml/permissions/has_ml_user_permissions.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/permissions/ml_capabilities_provider.tsx b/x-pack/plugins/siem/public/components/ml/permissions/ml_capabilities_provider.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/permissions/ml_capabilities_provider.tsx rename to x-pack/plugins/siem/public/components/ml/permissions/ml_capabilities_provider.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/ml/permissions/translations.ts b/x-pack/plugins/siem/public/components/ml/permissions/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/permissions/translations.ts rename to x-pack/plugins/siem/public/components/ml/permissions/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/score/__snapshots__/anomaly_score.test.tsx.snap b/x-pack/plugins/siem/public/components/ml/score/__snapshots__/anomaly_score.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/score/__snapshots__/anomaly_score.test.tsx.snap rename to x-pack/plugins/siem/public/components/ml/score/__snapshots__/anomaly_score.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/ml/score/__snapshots__/anomaly_scores.test.tsx.snap b/x-pack/plugins/siem/public/components/ml/score/__snapshots__/anomaly_scores.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/score/__snapshots__/anomaly_scores.test.tsx.snap rename to x-pack/plugins/siem/public/components/ml/score/__snapshots__/anomaly_scores.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/ml/score/__snapshots__/create_descriptions_list.test.tsx.snap b/x-pack/plugins/siem/public/components/ml/score/__snapshots__/create_descriptions_list.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/score/__snapshots__/create_descriptions_list.test.tsx.snap rename to x-pack/plugins/siem/public/components/ml/score/__snapshots__/create_descriptions_list.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/ml/score/__snapshots__/draggable_score.test.tsx.snap b/x-pack/plugins/siem/public/components/ml/score/__snapshots__/draggable_score.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/score/__snapshots__/draggable_score.test.tsx.snap rename to x-pack/plugins/siem/public/components/ml/score/__snapshots__/draggable_score.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/ml/score/anomaly_score.test.tsx b/x-pack/plugins/siem/public/components/ml/score/anomaly_score.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/score/anomaly_score.test.tsx rename to x-pack/plugins/siem/public/components/ml/score/anomaly_score.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/ml/score/anomaly_score.tsx b/x-pack/plugins/siem/public/components/ml/score/anomaly_score.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/score/anomaly_score.tsx rename to x-pack/plugins/siem/public/components/ml/score/anomaly_score.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/ml/score/anomaly_scores.test.tsx b/x-pack/plugins/siem/public/components/ml/score/anomaly_scores.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/score/anomaly_scores.test.tsx rename to x-pack/plugins/siem/public/components/ml/score/anomaly_scores.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/ml/score/anomaly_scores.tsx b/x-pack/plugins/siem/public/components/ml/score/anomaly_scores.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/score/anomaly_scores.tsx rename to x-pack/plugins/siem/public/components/ml/score/anomaly_scores.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/ml/score/create_description_list.tsx b/x-pack/plugins/siem/public/components/ml/score/create_description_list.tsx similarity index 97% rename from x-pack/legacy/plugins/siem/public/components/ml/score/create_description_list.tsx rename to x-pack/plugins/siem/public/components/ml/score/create_description_list.tsx index 24f203a3682d56..e7615bf3b89ba8 100644 --- a/x-pack/legacy/plugins/siem/public/components/ml/score/create_description_list.tsx +++ b/x-pack/plugins/siem/public/components/ml/score/create_description_list.tsx @@ -8,7 +8,7 @@ import { EuiText, EuiSpacer, EuiFlexGroup, EuiFlexItem, EuiLink } from '@elastic import React from 'react'; import styled from 'styled-components'; -import { DescriptionList } from '../../../../../../../plugins/siem/common/utility_types'; +import { DescriptionList } from '../../../../common/utility_types'; import { Anomaly, NarrowDateRange } from '../types'; import { getScoreString } from './score_health'; import { PreferenceFormattedDate } from '../../formatted_date'; diff --git a/x-pack/legacy/plugins/siem/public/components/ml/score/create_descriptions_list.test.tsx b/x-pack/plugins/siem/public/components/ml/score/create_descriptions_list.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/score/create_descriptions_list.test.tsx rename to x-pack/plugins/siem/public/components/ml/score/create_descriptions_list.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/ml/score/create_entities_from_score.test.ts b/x-pack/plugins/siem/public/components/ml/score/create_entities_from_score.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/score/create_entities_from_score.test.ts rename to x-pack/plugins/siem/public/components/ml/score/create_entities_from_score.test.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/score/create_entities_from_score.ts b/x-pack/plugins/siem/public/components/ml/score/create_entities_from_score.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/score/create_entities_from_score.ts rename to x-pack/plugins/siem/public/components/ml/score/create_entities_from_score.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/score/draggable_score.test.tsx b/x-pack/plugins/siem/public/components/ml/score/draggable_score.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/score/draggable_score.test.tsx rename to x-pack/plugins/siem/public/components/ml/score/draggable_score.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/ml/score/draggable_score.tsx b/x-pack/plugins/siem/public/components/ml/score/draggable_score.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/score/draggable_score.tsx rename to x-pack/plugins/siem/public/components/ml/score/draggable_score.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/ml/score/get_score_string.test.ts b/x-pack/plugins/siem/public/components/ml/score/get_score_string.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/score/get_score_string.test.ts rename to x-pack/plugins/siem/public/components/ml/score/get_score_string.test.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/score/get_top_severity.test.ts b/x-pack/plugins/siem/public/components/ml/score/get_top_severity.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/score/get_top_severity.test.ts rename to x-pack/plugins/siem/public/components/ml/score/get_top_severity.test.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/score/get_top_severity.ts b/x-pack/plugins/siem/public/components/ml/score/get_top_severity.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/score/get_top_severity.ts rename to x-pack/plugins/siem/public/components/ml/score/get_top_severity.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/score/score_health.tsx b/x-pack/plugins/siem/public/components/ml/score/score_health.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/score/score_health.tsx rename to x-pack/plugins/siem/public/components/ml/score/score_health.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/ml/score/score_interval_to_datetime.test.ts b/x-pack/plugins/siem/public/components/ml/score/score_interval_to_datetime.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/score/score_interval_to_datetime.test.ts rename to x-pack/plugins/siem/public/components/ml/score/score_interval_to_datetime.test.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/score/score_interval_to_datetime.ts b/x-pack/plugins/siem/public/components/ml/score/score_interval_to_datetime.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/score/score_interval_to_datetime.ts rename to x-pack/plugins/siem/public/components/ml/score/score_interval_to_datetime.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/score/translations.ts b/x-pack/plugins/siem/public/components/ml/score/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/score/translations.ts rename to x-pack/plugins/siem/public/components/ml/score/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/tables/anomalies_host_table.tsx b/x-pack/plugins/siem/public/components/ml/tables/anomalies_host_table.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/tables/anomalies_host_table.tsx rename to x-pack/plugins/siem/public/components/ml/tables/anomalies_host_table.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/ml/tables/anomalies_network_table.tsx b/x-pack/plugins/siem/public/components/ml/tables/anomalies_network_table.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/tables/anomalies_network_table.tsx rename to x-pack/plugins/siem/public/components/ml/tables/anomalies_network_table.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/ml/tables/basic_table.tsx b/x-pack/plugins/siem/public/components/ml/tables/basic_table.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/tables/basic_table.tsx rename to x-pack/plugins/siem/public/components/ml/tables/basic_table.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/ml/tables/convert_anomalies_to_hosts.test.ts b/x-pack/plugins/siem/public/components/ml/tables/convert_anomalies_to_hosts.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/tables/convert_anomalies_to_hosts.test.ts rename to x-pack/plugins/siem/public/components/ml/tables/convert_anomalies_to_hosts.test.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/tables/convert_anomalies_to_hosts.ts b/x-pack/plugins/siem/public/components/ml/tables/convert_anomalies_to_hosts.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/tables/convert_anomalies_to_hosts.ts rename to x-pack/plugins/siem/public/components/ml/tables/convert_anomalies_to_hosts.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/tables/convert_anomalies_to_network.test.ts b/x-pack/plugins/siem/public/components/ml/tables/convert_anomalies_to_network.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/tables/convert_anomalies_to_network.test.ts rename to x-pack/plugins/siem/public/components/ml/tables/convert_anomalies_to_network.test.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/tables/convert_anomalies_to_network.ts b/x-pack/plugins/siem/public/components/ml/tables/convert_anomalies_to_network.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/tables/convert_anomalies_to_network.ts rename to x-pack/plugins/siem/public/components/ml/tables/convert_anomalies_to_network.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/tables/create_compound_key.test.ts b/x-pack/plugins/siem/public/components/ml/tables/create_compound_key.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/tables/create_compound_key.test.ts rename to x-pack/plugins/siem/public/components/ml/tables/create_compound_key.test.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/tables/create_compound_key.ts b/x-pack/plugins/siem/public/components/ml/tables/create_compound_key.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/tables/create_compound_key.ts rename to x-pack/plugins/siem/public/components/ml/tables/create_compound_key.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/tables/get_anomalies_host_table_columns.test.tsx b/x-pack/plugins/siem/public/components/ml/tables/get_anomalies_host_table_columns.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/tables/get_anomalies_host_table_columns.test.tsx rename to x-pack/plugins/siem/public/components/ml/tables/get_anomalies_host_table_columns.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/ml/tables/get_anomalies_host_table_columns.tsx b/x-pack/plugins/siem/public/components/ml/tables/get_anomalies_host_table_columns.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/tables/get_anomalies_host_table_columns.tsx rename to x-pack/plugins/siem/public/components/ml/tables/get_anomalies_host_table_columns.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/ml/tables/get_anomalies_network_table_columns.test.tsx b/x-pack/plugins/siem/public/components/ml/tables/get_anomalies_network_table_columns.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/tables/get_anomalies_network_table_columns.test.tsx rename to x-pack/plugins/siem/public/components/ml/tables/get_anomalies_network_table_columns.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/ml/tables/get_anomalies_network_table_columns.tsx b/x-pack/plugins/siem/public/components/ml/tables/get_anomalies_network_table_columns.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/tables/get_anomalies_network_table_columns.tsx rename to x-pack/plugins/siem/public/components/ml/tables/get_anomalies_network_table_columns.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/ml/tables/host_equality.test.ts b/x-pack/plugins/siem/public/components/ml/tables/host_equality.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/tables/host_equality.test.ts rename to x-pack/plugins/siem/public/components/ml/tables/host_equality.test.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/tables/host_equality.ts b/x-pack/plugins/siem/public/components/ml/tables/host_equality.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/tables/host_equality.ts rename to x-pack/plugins/siem/public/components/ml/tables/host_equality.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/tables/network_equality.test.ts b/x-pack/plugins/siem/public/components/ml/tables/network_equality.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/tables/network_equality.test.ts rename to x-pack/plugins/siem/public/components/ml/tables/network_equality.test.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/tables/network_equality.ts b/x-pack/plugins/siem/public/components/ml/tables/network_equality.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/tables/network_equality.ts rename to x-pack/plugins/siem/public/components/ml/tables/network_equality.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/tables/translations.ts b/x-pack/plugins/siem/public/components/ml/tables/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/tables/translations.ts rename to x-pack/plugins/siem/public/components/ml/tables/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/types.test.ts b/x-pack/plugins/siem/public/components/ml/types.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/types.test.ts rename to x-pack/plugins/siem/public/components/ml/types.test.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml/types.ts b/x-pack/plugins/siem/public/components/ml/types.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml/types.ts rename to x-pack/plugins/siem/public/components/ml/types.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml_popover/__mocks__/api.tsx b/x-pack/plugins/siem/public/components/ml_popover/__mocks__/api.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml_popover/__mocks__/api.tsx rename to x-pack/plugins/siem/public/components/ml_popover/__mocks__/api.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/ml_popover/__snapshots__/popover_description.test.tsx.snap b/x-pack/plugins/siem/public/components/ml_popover/__snapshots__/popover_description.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml_popover/__snapshots__/popover_description.test.tsx.snap rename to x-pack/plugins/siem/public/components/ml_popover/__snapshots__/popover_description.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/ml_popover/__snapshots__/upgrade_contents.test.tsx.snap b/x-pack/plugins/siem/public/components/ml_popover/__snapshots__/upgrade_contents.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml_popover/__snapshots__/upgrade_contents.test.tsx.snap rename to x-pack/plugins/siem/public/components/ml_popover/__snapshots__/upgrade_contents.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/ml_popover/api.tsx b/x-pack/plugins/siem/public/components/ml_popover/api.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml_popover/api.tsx rename to x-pack/plugins/siem/public/components/ml_popover/api.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/ml_popover/helpers.test.tsx b/x-pack/plugins/siem/public/components/ml_popover/helpers.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml_popover/helpers.test.tsx rename to x-pack/plugins/siem/public/components/ml_popover/helpers.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/ml_popover/helpers.tsx b/x-pack/plugins/siem/public/components/ml_popover/helpers.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml_popover/helpers.tsx rename to x-pack/plugins/siem/public/components/ml_popover/helpers.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/ml_popover/hooks/translations.ts b/x-pack/plugins/siem/public/components/ml_popover/hooks/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml_popover/hooks/translations.ts rename to x-pack/plugins/siem/public/components/ml_popover/hooks/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml_popover/hooks/use_ml_capabilities.tsx b/x-pack/plugins/siem/public/components/ml_popover/hooks/use_ml_capabilities.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml_popover/hooks/use_ml_capabilities.tsx rename to x-pack/plugins/siem/public/components/ml_popover/hooks/use_ml_capabilities.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/ml_popover/hooks/use_siem_jobs.tsx b/x-pack/plugins/siem/public/components/ml_popover/hooks/use_siem_jobs.tsx similarity index 97% rename from x-pack/legacy/plugins/siem/public/components/ml_popover/hooks/use_siem_jobs.tsx rename to x-pack/plugins/siem/public/components/ml_popover/hooks/use_siem_jobs.tsx index bc488ee00988b2..7bcbf4afa10cc4 100644 --- a/x-pack/legacy/plugins/siem/public/components/ml_popover/hooks/use_siem_jobs.tsx +++ b/x-pack/plugins/siem/public/components/ml_popover/hooks/use_siem_jobs.tsx @@ -6,7 +6,7 @@ import { useEffect, useState } from 'react'; -import { DEFAULT_INDEX_KEY } from '../../../../../../../plugins/siem/common/constants'; +import { DEFAULT_INDEX_KEY } from '../../../../common/constants'; import { checkRecognizer, getJobsSummary, getModules } from '../api'; import { SiemJob } from '../types'; import { hasMlUserPermissions } from '../../ml/permissions/has_ml_user_permissions'; diff --git a/x-pack/legacy/plugins/siem/public/components/ml_popover/hooks/use_siem_jobs_helpers.test.tsx b/x-pack/plugins/siem/public/components/ml_popover/hooks/use_siem_jobs_helpers.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml_popover/hooks/use_siem_jobs_helpers.test.tsx rename to x-pack/plugins/siem/public/components/ml_popover/hooks/use_siem_jobs_helpers.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/ml_popover/hooks/use_siem_jobs_helpers.tsx b/x-pack/plugins/siem/public/components/ml_popover/hooks/use_siem_jobs_helpers.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml_popover/hooks/use_siem_jobs_helpers.tsx rename to x-pack/plugins/siem/public/components/ml_popover/hooks/use_siem_jobs_helpers.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/ml_popover/jobs_table/__snapshots__/job_switch.test.tsx.snap b/x-pack/plugins/siem/public/components/ml_popover/jobs_table/__snapshots__/job_switch.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml_popover/jobs_table/__snapshots__/job_switch.test.tsx.snap rename to x-pack/plugins/siem/public/components/ml_popover/jobs_table/__snapshots__/job_switch.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/ml_popover/jobs_table/__snapshots__/jobs_table.test.tsx.snap b/x-pack/plugins/siem/public/components/ml_popover/jobs_table/__snapshots__/jobs_table.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml_popover/jobs_table/__snapshots__/jobs_table.test.tsx.snap rename to x-pack/plugins/siem/public/components/ml_popover/jobs_table/__snapshots__/jobs_table.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/ml_popover/jobs_table/__snapshots__/showing_count.test.tsx.snap b/x-pack/plugins/siem/public/components/ml_popover/jobs_table/__snapshots__/showing_count.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml_popover/jobs_table/__snapshots__/showing_count.test.tsx.snap rename to x-pack/plugins/siem/public/components/ml_popover/jobs_table/__snapshots__/showing_count.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/ml_popover/jobs_table/filters/__snapshots__/groups_filter_popover.test.tsx.snap b/x-pack/plugins/siem/public/components/ml_popover/jobs_table/filters/__snapshots__/groups_filter_popover.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml_popover/jobs_table/filters/__snapshots__/groups_filter_popover.test.tsx.snap rename to x-pack/plugins/siem/public/components/ml_popover/jobs_table/filters/__snapshots__/groups_filter_popover.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/ml_popover/jobs_table/filters/__snapshots__/jobs_table_filters.test.tsx.snap b/x-pack/plugins/siem/public/components/ml_popover/jobs_table/filters/__snapshots__/jobs_table_filters.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml_popover/jobs_table/filters/__snapshots__/jobs_table_filters.test.tsx.snap rename to x-pack/plugins/siem/public/components/ml_popover/jobs_table/filters/__snapshots__/jobs_table_filters.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/ml_popover/jobs_table/filters/groups_filter_popover.test.tsx b/x-pack/plugins/siem/public/components/ml_popover/jobs_table/filters/groups_filter_popover.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml_popover/jobs_table/filters/groups_filter_popover.test.tsx rename to x-pack/plugins/siem/public/components/ml_popover/jobs_table/filters/groups_filter_popover.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/ml_popover/jobs_table/filters/groups_filter_popover.tsx b/x-pack/plugins/siem/public/components/ml_popover/jobs_table/filters/groups_filter_popover.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml_popover/jobs_table/filters/groups_filter_popover.tsx rename to x-pack/plugins/siem/public/components/ml_popover/jobs_table/filters/groups_filter_popover.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/ml_popover/jobs_table/filters/jobs_table_filters.test.tsx b/x-pack/plugins/siem/public/components/ml_popover/jobs_table/filters/jobs_table_filters.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml_popover/jobs_table/filters/jobs_table_filters.test.tsx rename to x-pack/plugins/siem/public/components/ml_popover/jobs_table/filters/jobs_table_filters.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/ml_popover/jobs_table/filters/jobs_table_filters.tsx b/x-pack/plugins/siem/public/components/ml_popover/jobs_table/filters/jobs_table_filters.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml_popover/jobs_table/filters/jobs_table_filters.tsx rename to x-pack/plugins/siem/public/components/ml_popover/jobs_table/filters/jobs_table_filters.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/ml_popover/jobs_table/filters/toggle_selected_group.test.tsx b/x-pack/plugins/siem/public/components/ml_popover/jobs_table/filters/toggle_selected_group.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml_popover/jobs_table/filters/toggle_selected_group.test.tsx rename to x-pack/plugins/siem/public/components/ml_popover/jobs_table/filters/toggle_selected_group.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/ml_popover/jobs_table/filters/toggle_selected_group.tsx b/x-pack/plugins/siem/public/components/ml_popover/jobs_table/filters/toggle_selected_group.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml_popover/jobs_table/filters/toggle_selected_group.tsx rename to x-pack/plugins/siem/public/components/ml_popover/jobs_table/filters/toggle_selected_group.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/ml_popover/jobs_table/filters/translations.ts b/x-pack/plugins/siem/public/components/ml_popover/jobs_table/filters/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml_popover/jobs_table/filters/translations.ts rename to x-pack/plugins/siem/public/components/ml_popover/jobs_table/filters/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml_popover/jobs_table/job_switch.test.tsx b/x-pack/plugins/siem/public/components/ml_popover/jobs_table/job_switch.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml_popover/jobs_table/job_switch.test.tsx rename to x-pack/plugins/siem/public/components/ml_popover/jobs_table/job_switch.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/ml_popover/jobs_table/job_switch.tsx b/x-pack/plugins/siem/public/components/ml_popover/jobs_table/job_switch.tsx similarity index 96% rename from x-pack/legacy/plugins/siem/public/components/ml_popover/jobs_table/job_switch.tsx rename to x-pack/plugins/siem/public/components/ml_popover/jobs_table/job_switch.tsx index a0343608dc67a8..e7b14f2e80bf24 100644 --- a/x-pack/legacy/plugins/siem/public/components/ml_popover/jobs_table/job_switch.tsx +++ b/x-pack/plugins/siem/public/components/ml_popover/jobs_table/job_switch.tsx @@ -11,7 +11,7 @@ import { isJobLoading, isJobFailed, isJobStarted, -} from '../../../../../../../plugins/siem/common/detection_engine/ml_helpers'; +} from '../../../../common/detection_engine/ml_helpers'; import { SiemJob } from '../types'; const StaticSwitch = styled(EuiSwitch)` diff --git a/x-pack/legacy/plugins/siem/public/components/ml_popover/jobs_table/jobs_table.test.tsx b/x-pack/plugins/siem/public/components/ml_popover/jobs_table/jobs_table.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml_popover/jobs_table/jobs_table.test.tsx rename to x-pack/plugins/siem/public/components/ml_popover/jobs_table/jobs_table.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/ml_popover/jobs_table/jobs_table.tsx b/x-pack/plugins/siem/public/components/ml_popover/jobs_table/jobs_table.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml_popover/jobs_table/jobs_table.tsx rename to x-pack/plugins/siem/public/components/ml_popover/jobs_table/jobs_table.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/ml_popover/jobs_table/showing_count.test.tsx b/x-pack/plugins/siem/public/components/ml_popover/jobs_table/showing_count.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml_popover/jobs_table/showing_count.test.tsx rename to x-pack/plugins/siem/public/components/ml_popover/jobs_table/showing_count.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/ml_popover/jobs_table/showing_count.tsx b/x-pack/plugins/siem/public/components/ml_popover/jobs_table/showing_count.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml_popover/jobs_table/showing_count.tsx rename to x-pack/plugins/siem/public/components/ml_popover/jobs_table/showing_count.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/ml_popover/jobs_table/translations.ts b/x-pack/plugins/siem/public/components/ml_popover/jobs_table/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml_popover/jobs_table/translations.ts rename to x-pack/plugins/siem/public/components/ml_popover/jobs_table/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml_popover/ml_modules.tsx b/x-pack/plugins/siem/public/components/ml_popover/ml_modules.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml_popover/ml_modules.tsx rename to x-pack/plugins/siem/public/components/ml_popover/ml_modules.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/ml_popover/ml_popover.test.tsx b/x-pack/plugins/siem/public/components/ml_popover/ml_popover.test.tsx similarity index 96% rename from x-pack/legacy/plugins/siem/public/components/ml_popover/ml_popover.test.tsx rename to x-pack/plugins/siem/public/components/ml_popover/ml_popover.test.tsx index bd7d696757ca6d..3c93e1c195cd7a 100644 --- a/x-pack/legacy/plugins/siem/public/components/ml_popover/ml_popover.test.tsx +++ b/x-pack/plugins/siem/public/components/ml_popover/ml_popover.test.tsx @@ -9,7 +9,6 @@ import { mountWithIntl } from 'test_utils/enzyme_helpers'; import { MlPopover } from './ml_popover'; -jest.mock('ui/new_platform'); jest.mock('../../lib/kibana'); jest.mock('../ml/permissions/has_ml_admin_permissions', () => ({ diff --git a/x-pack/legacy/plugins/siem/public/components/ml_popover/ml_popover.tsx b/x-pack/plugins/siem/public/components/ml_popover/ml_popover.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml_popover/ml_popover.tsx rename to x-pack/plugins/siem/public/components/ml_popover/ml_popover.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/ml_popover/popover_description.test.tsx b/x-pack/plugins/siem/public/components/ml_popover/popover_description.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml_popover/popover_description.test.tsx rename to x-pack/plugins/siem/public/components/ml_popover/popover_description.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/ml_popover/popover_description.tsx b/x-pack/plugins/siem/public/components/ml_popover/popover_description.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml_popover/popover_description.tsx rename to x-pack/plugins/siem/public/components/ml_popover/popover_description.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/ml_popover/translations.ts b/x-pack/plugins/siem/public/components/ml_popover/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml_popover/translations.ts rename to x-pack/plugins/siem/public/components/ml_popover/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/ml_popover/types.ts b/x-pack/plugins/siem/public/components/ml_popover/types.ts similarity index 97% rename from x-pack/legacy/plugins/siem/public/components/ml_popover/types.ts rename to x-pack/plugins/siem/public/components/ml_popover/types.ts index 991c82cf701e89..58d40c298b3294 100644 --- a/x-pack/legacy/plugins/siem/public/components/ml_popover/types.ts +++ b/x-pack/plugins/siem/public/components/ml_popover/types.ts @@ -4,8 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ +import { AuditMessageBase } from '../../../../ml/common/types/audit_message'; import { MlError } from '../ml/types'; -import { AuditMessageBase } from '../../../../../../plugins/ml/common/types/audit_message'; export interface Group { id: string; diff --git a/x-pack/legacy/plugins/siem/public/components/ml_popover/upgrade_contents.test.tsx b/x-pack/plugins/siem/public/components/ml_popover/upgrade_contents.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml_popover/upgrade_contents.test.tsx rename to x-pack/plugins/siem/public/components/ml_popover/upgrade_contents.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/ml_popover/upgrade_contents.tsx b/x-pack/plugins/siem/public/components/ml_popover/upgrade_contents.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/ml_popover/upgrade_contents.tsx rename to x-pack/plugins/siem/public/components/ml_popover/upgrade_contents.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/navigation/breadcrumbs/index.test.ts b/x-pack/plugins/siem/public/components/navigation/breadcrumbs/index.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/navigation/breadcrumbs/index.test.ts rename to x-pack/plugins/siem/public/components/navigation/breadcrumbs/index.test.ts diff --git a/x-pack/legacy/plugins/siem/public/components/navigation/breadcrumbs/index.ts b/x-pack/plugins/siem/public/components/navigation/breadcrumbs/index.ts similarity index 96% rename from x-pack/legacy/plugins/siem/public/components/navigation/breadcrumbs/index.ts rename to x-pack/plugins/siem/public/components/navigation/breadcrumbs/index.ts index 5407eba8b5b29d..85d77485830a52 100644 --- a/x-pack/legacy/plugins/siem/public/components/navigation/breadcrumbs/index.ts +++ b/x-pack/plugins/siem/public/components/navigation/breadcrumbs/index.ts @@ -6,8 +6,8 @@ import { getOr, omit } from 'lodash/fp'; -import { ChromeBreadcrumb } from '../../../../../../../../src/core/public'; -import { APP_NAME } from '../../../../../../../plugins/siem/common/constants'; +import { ChromeBreadcrumb } from '../../../../../../../src/core/public'; +import { APP_NAME } from '../../../../common/constants'; import { StartServices } from '../../../plugin'; import { getBreadcrumbs as getHostDetailsBreadcrumbs } from '../../../pages/hosts/details/utils'; import { getBreadcrumbs as getIPDetailsBreadcrumbs } from '../../../pages/network/ip_details'; diff --git a/x-pack/legacy/plugins/siem/public/components/navigation/helpers.ts b/x-pack/plugins/siem/public/components/navigation/helpers.ts similarity index 96% rename from x-pack/legacy/plugins/siem/public/components/navigation/helpers.ts rename to x-pack/plugins/siem/public/components/navigation/helpers.ts index 899d108fe246d1..291cb90098f78e 100644 --- a/x-pack/legacy/plugins/siem/public/components/navigation/helpers.ts +++ b/x-pack/plugins/siem/public/components/navigation/helpers.ts @@ -16,7 +16,7 @@ import { replaceStateKeyInQueryString, getQueryStringFromLocation, } from '../url_state/helpers'; -import { Query, Filter } from '../../../../../../../src/plugins/data/public'; +import { Query, Filter } from '../../../../../../src/plugins/data/public'; import { SearchNavTab } from './types'; diff --git a/x-pack/legacy/plugins/siem/public/components/navigation/index.test.tsx b/x-pack/plugins/siem/public/components/navigation/index.test.tsx similarity index 99% rename from x-pack/legacy/plugins/siem/public/components/navigation/index.test.tsx rename to x-pack/plugins/siem/public/components/navigation/index.test.tsx index a821d310344d8d..d8b62029138c82 100644 --- a/x-pack/legacy/plugins/siem/public/components/navigation/index.test.tsx +++ b/x-pack/plugins/siem/public/components/navigation/index.test.tsx @@ -15,7 +15,6 @@ import { HostsTableType } from '../../store/hosts/model'; import { RouteSpyState } from '../../utils/route/types'; import { SiemNavigationProps, SiemNavigationComponentProps } from './types'; -jest.mock('ui/new_platform'); jest.mock('./breadcrumbs', () => ({ setBreadcrumbs: jest.fn(), })); diff --git a/x-pack/legacy/plugins/siem/public/components/navigation/index.tsx b/x-pack/plugins/siem/public/components/navigation/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/navigation/index.tsx rename to x-pack/plugins/siem/public/components/navigation/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/navigation/tab_navigation/index.test.tsx b/x-pack/plugins/siem/public/components/navigation/tab_navigation/index.test.tsx similarity index 99% rename from x-pack/legacy/plugins/siem/public/components/navigation/tab_navigation/index.test.tsx rename to x-pack/plugins/siem/public/components/navigation/tab_navigation/index.test.tsx index b9563b60f301bb..99ded06cfdcc86 100644 --- a/x-pack/legacy/plugins/siem/public/components/navigation/tab_navigation/index.test.tsx +++ b/x-pack/plugins/siem/public/components/navigation/tab_navigation/index.test.tsx @@ -16,8 +16,6 @@ import { CONSTANTS } from '../../url_state/constants'; import { TabNavigationComponent } from './'; import { TabNavigationProps } from './types'; -jest.mock('ui/new_platform'); - describe('Tab Navigation', () => { const pageName = SiemPageName.hosts; const hostName = 'siem-window'; diff --git a/x-pack/legacy/plugins/siem/public/components/navigation/tab_navigation/index.tsx b/x-pack/plugins/siem/public/components/navigation/tab_navigation/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/navigation/tab_navigation/index.tsx rename to x-pack/plugins/siem/public/components/navigation/tab_navigation/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/navigation/tab_navigation/types.ts b/x-pack/plugins/siem/public/components/navigation/tab_navigation/types.ts similarity index 92% rename from x-pack/legacy/plugins/siem/public/components/navigation/tab_navigation/types.ts rename to x-pack/plugins/siem/public/components/navigation/tab_navigation/types.ts index fe701ad115d17a..2e2dea09f8c38b 100644 --- a/x-pack/legacy/plugins/siem/public/components/navigation/tab_navigation/types.ts +++ b/x-pack/plugins/siem/public/components/navigation/tab_navigation/types.ts @@ -8,7 +8,7 @@ import { UrlInputsModel } from '../../../store/inputs/model'; import { CONSTANTS } from '../../url_state/constants'; import { HostsTableType } from '../../../store/hosts/model'; import { TimelineUrl } from '../../../store/timeline/model'; -import { Filter, Query } from '../../../../../../../../src/plugins/data/public'; +import { Filter, Query } from '../../../../../../../src/plugins/data/public'; import { SiemNavigationProps } from '../types'; diff --git a/x-pack/legacy/plugins/siem/public/components/navigation/types.ts b/x-pack/plugins/siem/public/components/navigation/types.ts similarity index 93% rename from x-pack/legacy/plugins/siem/public/components/navigation/types.ts rename to x-pack/plugins/siem/public/components/navigation/types.ts index 96a70e0bc70cc1..e8a2865938062b 100644 --- a/x-pack/legacy/plugins/siem/public/components/navigation/types.ts +++ b/x-pack/plugins/siem/public/components/navigation/types.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { Filter, Query } from '../../../../../../../src/plugins/data/public'; +import { Filter, Query } from '../../../../../../src/plugins/data/public'; import { HostsTableType } from '../../store/hosts/model'; import { UrlInputsModel } from '../../store/inputs/model'; import { TimelineUrl } from '../../store/timeline/model'; diff --git a/x-pack/legacy/plugins/siem/public/components/navigation/use_get_url_search.tsx b/x-pack/plugins/siem/public/components/navigation/use_get_url_search.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/navigation/use_get_url_search.tsx rename to x-pack/plugins/siem/public/components/navigation/use_get_url_search.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/netflow/__snapshots__/index.test.tsx.snap b/x-pack/plugins/siem/public/components/netflow/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/netflow/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/siem/public/components/netflow/__snapshots__/index.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/netflow/fingerprints/index.tsx b/x-pack/plugins/siem/public/components/netflow/fingerprints/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/netflow/fingerprints/index.tsx rename to x-pack/plugins/siem/public/components/netflow/fingerprints/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/netflow/index.test.tsx b/x-pack/plugins/siem/public/components/netflow/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/netflow/index.test.tsx rename to x-pack/plugins/siem/public/components/netflow/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/netflow/index.tsx b/x-pack/plugins/siem/public/components/netflow/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/netflow/index.tsx rename to x-pack/plugins/siem/public/components/netflow/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/netflow/netflow_columns/duration_event_start_end.tsx b/x-pack/plugins/siem/public/components/netflow/netflow_columns/duration_event_start_end.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/netflow/netflow_columns/duration_event_start_end.tsx rename to x-pack/plugins/siem/public/components/netflow/netflow_columns/duration_event_start_end.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/netflow/netflow_columns/index.tsx b/x-pack/plugins/siem/public/components/netflow/netflow_columns/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/netflow/netflow_columns/index.tsx rename to x-pack/plugins/siem/public/components/netflow/netflow_columns/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/netflow/netflow_columns/types.ts b/x-pack/plugins/siem/public/components/netflow/netflow_columns/types.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/netflow/netflow_columns/types.ts rename to x-pack/plugins/siem/public/components/netflow/netflow_columns/types.ts diff --git a/x-pack/legacy/plugins/siem/public/components/netflow/netflow_columns/user_process.tsx b/x-pack/plugins/siem/public/components/netflow/netflow_columns/user_process.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/netflow/netflow_columns/user_process.tsx rename to x-pack/plugins/siem/public/components/netflow/netflow_columns/user_process.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/netflow/types.ts b/x-pack/plugins/siem/public/components/netflow/types.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/netflow/types.ts rename to x-pack/plugins/siem/public/components/netflow/types.ts diff --git a/x-pack/legacy/plugins/siem/public/components/news_feed/helpers.test.ts b/x-pack/plugins/siem/public/components/news_feed/helpers.test.ts similarity index 99% rename from x-pack/legacy/plugins/siem/public/components/news_feed/helpers.test.ts rename to x-pack/plugins/siem/public/components/news_feed/helpers.test.ts index 686ec4e86e7852..96bd9b08bf8bf0 100644 --- a/x-pack/legacy/plugins/siem/public/components/news_feed/helpers.test.ts +++ b/x-pack/plugins/siem/public/components/news_feed/helpers.test.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { NEWS_FEED_URL_SETTING_DEFAULT } from '../../../../../../plugins/siem/common/constants'; +import { NEWS_FEED_URL_SETTING_DEFAULT } from '../../../common/constants'; import { KibanaServices } from '../../lib/kibana'; import { rawNewsApiResponse } from '../../mock/news'; import { rawNewsJSON } from '../../mock/raw_news'; diff --git a/x-pack/legacy/plugins/siem/public/components/news_feed/helpers.ts b/x-pack/plugins/siem/public/components/news_feed/helpers.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/news_feed/helpers.ts rename to x-pack/plugins/siem/public/components/news_feed/helpers.ts diff --git a/x-pack/legacy/plugins/siem/public/components/news_feed/index.tsx b/x-pack/plugins/siem/public/components/news_feed/index.tsx similarity index 92% rename from x-pack/legacy/plugins/siem/public/components/news_feed/index.tsx rename to x-pack/plugins/siem/public/components/news_feed/index.tsx index 6a5e08b287f96c..ae41737c5bcad3 100644 --- a/x-pack/legacy/plugins/siem/public/components/news_feed/index.tsx +++ b/x-pack/plugins/siem/public/components/news_feed/index.tsx @@ -5,10 +5,9 @@ */ import React, { useEffect, useState } from 'react'; -import chrome from 'ui/chrome'; import { fetchNews, getNewsFeedUrl, getNewsItemsFromApiResponse } from './helpers'; -import { useKibana, useUiSetting$ } from '../../lib/kibana'; +import { useKibana, useUiSetting$, KibanaServices } from '../../lib/kibana'; import { NewsFeed } from './news_feed'; import { NewsItem } from './types'; @@ -26,7 +25,7 @@ export const StatefulNewsFeed = React.memo<{ const newsFeedUrl = getNewsFeedUrl({ newsFeedUrlSetting, - getKibanaVersion: chrome.getKibanaVersion, + getKibanaVersion: () => KibanaServices.getKibanaVersion(), }); useEffect(() => { diff --git a/x-pack/legacy/plugins/siem/public/components/news_feed/news_feed.tsx b/x-pack/plugins/siem/public/components/news_feed/news_feed.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/news_feed/news_feed.tsx rename to x-pack/plugins/siem/public/components/news_feed/news_feed.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/news_feed/news_link/index.tsx b/x-pack/plugins/siem/public/components/news_feed/news_link/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/news_feed/news_link/index.tsx rename to x-pack/plugins/siem/public/components/news_feed/news_link/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/news_feed/no_news/index.tsx b/x-pack/plugins/siem/public/components/news_feed/no_news/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/news_feed/no_news/index.tsx rename to x-pack/plugins/siem/public/components/news_feed/no_news/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/news_feed/post/index.tsx b/x-pack/plugins/siem/public/components/news_feed/post/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/news_feed/post/index.tsx rename to x-pack/plugins/siem/public/components/news_feed/post/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/news_feed/translations.ts b/x-pack/plugins/siem/public/components/news_feed/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/news_feed/translations.ts rename to x-pack/plugins/siem/public/components/news_feed/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/news_feed/types.ts b/x-pack/plugins/siem/public/components/news_feed/types.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/news_feed/types.ts rename to x-pack/plugins/siem/public/components/news_feed/types.ts diff --git a/x-pack/legacy/plugins/siem/public/components/notes/add_note/__snapshots__/index.test.tsx.snap b/x-pack/plugins/siem/public/components/notes/add_note/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/notes/add_note/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/siem/public/components/notes/add_note/__snapshots__/index.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/notes/add_note/__snapshots__/new_note.test.tsx.snap b/x-pack/plugins/siem/public/components/notes/add_note/__snapshots__/new_note.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/notes/add_note/__snapshots__/new_note.test.tsx.snap rename to x-pack/plugins/siem/public/components/notes/add_note/__snapshots__/new_note.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/notes/add_note/index.test.tsx b/x-pack/plugins/siem/public/components/notes/add_note/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/notes/add_note/index.test.tsx rename to x-pack/plugins/siem/public/components/notes/add_note/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/notes/add_note/index.tsx b/x-pack/plugins/siem/public/components/notes/add_note/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/notes/add_note/index.tsx rename to x-pack/plugins/siem/public/components/notes/add_note/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/notes/add_note/new_note.test.tsx b/x-pack/plugins/siem/public/components/notes/add_note/new_note.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/notes/add_note/new_note.test.tsx rename to x-pack/plugins/siem/public/components/notes/add_note/new_note.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/notes/add_note/new_note.tsx b/x-pack/plugins/siem/public/components/notes/add_note/new_note.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/notes/add_note/new_note.tsx rename to x-pack/plugins/siem/public/components/notes/add_note/new_note.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/notes/columns.tsx b/x-pack/plugins/siem/public/components/notes/columns.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/notes/columns.tsx rename to x-pack/plugins/siem/public/components/notes/columns.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/notes/helpers.tsx b/x-pack/plugins/siem/public/components/notes/helpers.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/notes/helpers.tsx rename to x-pack/plugins/siem/public/components/notes/helpers.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/notes/index.tsx b/x-pack/plugins/siem/public/components/notes/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/notes/index.tsx rename to x-pack/plugins/siem/public/components/notes/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/notes/note_card/__snapshots__/note_card_body.test.tsx.snap b/x-pack/plugins/siem/public/components/notes/note_card/__snapshots__/note_card_body.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/notes/note_card/__snapshots__/note_card_body.test.tsx.snap rename to x-pack/plugins/siem/public/components/notes/note_card/__snapshots__/note_card_body.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/notes/note_card/index.test.tsx b/x-pack/plugins/siem/public/components/notes/note_card/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/notes/note_card/index.test.tsx rename to x-pack/plugins/siem/public/components/notes/note_card/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/notes/note_card/index.tsx b/x-pack/plugins/siem/public/components/notes/note_card/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/notes/note_card/index.tsx rename to x-pack/plugins/siem/public/components/notes/note_card/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/notes/note_card/note_card_body.test.tsx b/x-pack/plugins/siem/public/components/notes/note_card/note_card_body.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/notes/note_card/note_card_body.test.tsx rename to x-pack/plugins/siem/public/components/notes/note_card/note_card_body.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/notes/note_card/note_card_body.tsx b/x-pack/plugins/siem/public/components/notes/note_card/note_card_body.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/notes/note_card/note_card_body.tsx rename to x-pack/plugins/siem/public/components/notes/note_card/note_card_body.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/notes/note_card/note_card_header.test.tsx b/x-pack/plugins/siem/public/components/notes/note_card/note_card_header.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/notes/note_card/note_card_header.test.tsx rename to x-pack/plugins/siem/public/components/notes/note_card/note_card_header.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/notes/note_card/note_card_header.tsx b/x-pack/plugins/siem/public/components/notes/note_card/note_card_header.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/notes/note_card/note_card_header.tsx rename to x-pack/plugins/siem/public/components/notes/note_card/note_card_header.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/notes/note_card/note_created.test.tsx b/x-pack/plugins/siem/public/components/notes/note_card/note_created.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/notes/note_card/note_created.test.tsx rename to x-pack/plugins/siem/public/components/notes/note_card/note_created.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/notes/note_card/note_created.tsx b/x-pack/plugins/siem/public/components/notes/note_card/note_created.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/notes/note_card/note_created.tsx rename to x-pack/plugins/siem/public/components/notes/note_card/note_created.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/notes/note_cards/index.test.tsx b/x-pack/plugins/siem/public/components/notes/note_cards/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/notes/note_cards/index.test.tsx rename to x-pack/plugins/siem/public/components/notes/note_cards/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/notes/note_cards/index.tsx b/x-pack/plugins/siem/public/components/notes/note_cards/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/notes/note_cards/index.tsx rename to x-pack/plugins/siem/public/components/notes/note_cards/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/notes/translations.ts b/x-pack/plugins/siem/public/components/notes/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/notes/translations.ts rename to x-pack/plugins/siem/public/components/notes/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/open_timeline/constants.ts b/x-pack/plugins/siem/public/components/open_timeline/constants.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/open_timeline/constants.ts rename to x-pack/plugins/siem/public/components/open_timeline/constants.ts diff --git a/x-pack/legacy/plugins/siem/public/components/open_timeline/delete_timeline_modal/delete_timeline_modal.test.tsx b/x-pack/plugins/siem/public/components/open_timeline/delete_timeline_modal/delete_timeline_modal.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/open_timeline/delete_timeline_modal/delete_timeline_modal.test.tsx rename to x-pack/plugins/siem/public/components/open_timeline/delete_timeline_modal/delete_timeline_modal.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/open_timeline/delete_timeline_modal/delete_timeline_modal.tsx b/x-pack/plugins/siem/public/components/open_timeline/delete_timeline_modal/delete_timeline_modal.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/open_timeline/delete_timeline_modal/delete_timeline_modal.tsx rename to x-pack/plugins/siem/public/components/open_timeline/delete_timeline_modal/delete_timeline_modal.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/open_timeline/delete_timeline_modal/index.test.tsx b/x-pack/plugins/siem/public/components/open_timeline/delete_timeline_modal/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/open_timeline/delete_timeline_modal/index.test.tsx rename to x-pack/plugins/siem/public/components/open_timeline/delete_timeline_modal/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/open_timeline/delete_timeline_modal/index.tsx b/x-pack/plugins/siem/public/components/open_timeline/delete_timeline_modal/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/open_timeline/delete_timeline_modal/index.tsx rename to x-pack/plugins/siem/public/components/open_timeline/delete_timeline_modal/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/open_timeline/edit_timeline_actions.tsx b/x-pack/plugins/siem/public/components/open_timeline/edit_timeline_actions.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/open_timeline/edit_timeline_actions.tsx rename to x-pack/plugins/siem/public/components/open_timeline/edit_timeline_actions.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/open_timeline/edit_timeline_batch_actions.tsx b/x-pack/plugins/siem/public/components/open_timeline/edit_timeline_batch_actions.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/open_timeline/edit_timeline_batch_actions.tsx rename to x-pack/plugins/siem/public/components/open_timeline/edit_timeline_batch_actions.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/open_timeline/export_timeline/export_timeline.test.tsx b/x-pack/plugins/siem/public/components/open_timeline/export_timeline/export_timeline.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/open_timeline/export_timeline/export_timeline.test.tsx rename to x-pack/plugins/siem/public/components/open_timeline/export_timeline/export_timeline.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/open_timeline/export_timeline/export_timeline.tsx b/x-pack/plugins/siem/public/components/open_timeline/export_timeline/export_timeline.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/open_timeline/export_timeline/export_timeline.tsx rename to x-pack/plugins/siem/public/components/open_timeline/export_timeline/export_timeline.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/open_timeline/export_timeline/index.test.tsx b/x-pack/plugins/siem/public/components/open_timeline/export_timeline/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/open_timeline/export_timeline/index.test.tsx rename to x-pack/plugins/siem/public/components/open_timeline/export_timeline/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/open_timeline/export_timeline/index.tsx b/x-pack/plugins/siem/public/components/open_timeline/export_timeline/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/open_timeline/export_timeline/index.tsx rename to x-pack/plugins/siem/public/components/open_timeline/export_timeline/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/open_timeline/export_timeline/mocks.ts b/x-pack/plugins/siem/public/components/open_timeline/export_timeline/mocks.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/open_timeline/export_timeline/mocks.ts rename to x-pack/plugins/siem/public/components/open_timeline/export_timeline/mocks.ts diff --git a/x-pack/legacy/plugins/siem/public/components/open_timeline/helpers.test.ts b/x-pack/plugins/siem/public/components/open_timeline/helpers.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/open_timeline/helpers.test.ts rename to x-pack/plugins/siem/public/components/open_timeline/helpers.test.ts diff --git a/x-pack/legacy/plugins/siem/public/components/open_timeline/helpers.ts b/x-pack/plugins/siem/public/components/open_timeline/helpers.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/open_timeline/helpers.ts rename to x-pack/plugins/siem/public/components/open_timeline/helpers.ts diff --git a/x-pack/legacy/plugins/siem/public/components/open_timeline/index.test.tsx b/x-pack/plugins/siem/public/components/open_timeline/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/open_timeline/index.test.tsx rename to x-pack/plugins/siem/public/components/open_timeline/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/open_timeline/index.tsx b/x-pack/plugins/siem/public/components/open_timeline/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/open_timeline/index.tsx rename to x-pack/plugins/siem/public/components/open_timeline/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/open_timeline/note_previews/index.test.tsx b/x-pack/plugins/siem/public/components/open_timeline/note_previews/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/open_timeline/note_previews/index.test.tsx rename to x-pack/plugins/siem/public/components/open_timeline/note_previews/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/open_timeline/note_previews/index.tsx b/x-pack/plugins/siem/public/components/open_timeline/note_previews/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/open_timeline/note_previews/index.tsx rename to x-pack/plugins/siem/public/components/open_timeline/note_previews/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/open_timeline/note_previews/note_preview.test.tsx b/x-pack/plugins/siem/public/components/open_timeline/note_previews/note_preview.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/open_timeline/note_previews/note_preview.test.tsx rename to x-pack/plugins/siem/public/components/open_timeline/note_previews/note_preview.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/open_timeline/note_previews/note_preview.tsx b/x-pack/plugins/siem/public/components/open_timeline/note_previews/note_preview.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/open_timeline/note_previews/note_preview.tsx rename to x-pack/plugins/siem/public/components/open_timeline/note_previews/note_preview.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/open_timeline/open_timeline.test.tsx b/x-pack/plugins/siem/public/components/open_timeline/open_timeline.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/open_timeline/open_timeline.test.tsx rename to x-pack/plugins/siem/public/components/open_timeline/open_timeline.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/open_timeline/open_timeline.tsx b/x-pack/plugins/siem/public/components/open_timeline/open_timeline.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/open_timeline/open_timeline.tsx rename to x-pack/plugins/siem/public/components/open_timeline/open_timeline.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/open_timeline/open_timeline_modal/index.test.tsx b/x-pack/plugins/siem/public/components/open_timeline/open_timeline_modal/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/open_timeline/open_timeline_modal/index.test.tsx rename to x-pack/plugins/siem/public/components/open_timeline/open_timeline_modal/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/open_timeline/open_timeline_modal/index.tsx b/x-pack/plugins/siem/public/components/open_timeline/open_timeline_modal/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/open_timeline/open_timeline_modal/index.tsx rename to x-pack/plugins/siem/public/components/open_timeline/open_timeline_modal/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/open_timeline/open_timeline_modal/open_timeline_modal_body.test.tsx b/x-pack/plugins/siem/public/components/open_timeline/open_timeline_modal/open_timeline_modal_body.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/open_timeline/open_timeline_modal/open_timeline_modal_body.test.tsx rename to x-pack/plugins/siem/public/components/open_timeline/open_timeline_modal/open_timeline_modal_body.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/open_timeline/open_timeline_modal/open_timeline_modal_body.tsx b/x-pack/plugins/siem/public/components/open_timeline/open_timeline_modal/open_timeline_modal_body.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/open_timeline/open_timeline_modal/open_timeline_modal_body.tsx rename to x-pack/plugins/siem/public/components/open_timeline/open_timeline_modal/open_timeline_modal_body.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/open_timeline/open_timeline_modal/open_timeline_modal_button.test.tsx b/x-pack/plugins/siem/public/components/open_timeline/open_timeline_modal/open_timeline_modal_button.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/open_timeline/open_timeline_modal/open_timeline_modal_button.test.tsx rename to x-pack/plugins/siem/public/components/open_timeline/open_timeline_modal/open_timeline_modal_button.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/open_timeline/open_timeline_modal/open_timeline_modal_button.tsx b/x-pack/plugins/siem/public/components/open_timeline/open_timeline_modal/open_timeline_modal_button.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/open_timeline/open_timeline_modal/open_timeline_modal_button.tsx rename to x-pack/plugins/siem/public/components/open_timeline/open_timeline_modal/open_timeline_modal_button.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/open_timeline/search_row/index.test.tsx b/x-pack/plugins/siem/public/components/open_timeline/search_row/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/open_timeline/search_row/index.test.tsx rename to x-pack/plugins/siem/public/components/open_timeline/search_row/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/open_timeline/search_row/index.tsx b/x-pack/plugins/siem/public/components/open_timeline/search_row/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/open_timeline/search_row/index.tsx rename to x-pack/plugins/siem/public/components/open_timeline/search_row/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/open_timeline/timelines_table/actions_columns.test.tsx b/x-pack/plugins/siem/public/components/open_timeline/timelines_table/actions_columns.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/open_timeline/timelines_table/actions_columns.test.tsx rename to x-pack/plugins/siem/public/components/open_timeline/timelines_table/actions_columns.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/open_timeline/timelines_table/actions_columns.tsx b/x-pack/plugins/siem/public/components/open_timeline/timelines_table/actions_columns.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/open_timeline/timelines_table/actions_columns.tsx rename to x-pack/plugins/siem/public/components/open_timeline/timelines_table/actions_columns.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/open_timeline/timelines_table/common_columns.test.tsx b/x-pack/plugins/siem/public/components/open_timeline/timelines_table/common_columns.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/open_timeline/timelines_table/common_columns.test.tsx rename to x-pack/plugins/siem/public/components/open_timeline/timelines_table/common_columns.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/open_timeline/timelines_table/common_columns.tsx b/x-pack/plugins/siem/public/components/open_timeline/timelines_table/common_columns.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/open_timeline/timelines_table/common_columns.tsx rename to x-pack/plugins/siem/public/components/open_timeline/timelines_table/common_columns.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/open_timeline/timelines_table/common_styles.ts b/x-pack/plugins/siem/public/components/open_timeline/timelines_table/common_styles.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/open_timeline/timelines_table/common_styles.ts rename to x-pack/plugins/siem/public/components/open_timeline/timelines_table/common_styles.ts diff --git a/x-pack/legacy/plugins/siem/public/components/open_timeline/timelines_table/extended_columns.test.tsx b/x-pack/plugins/siem/public/components/open_timeline/timelines_table/extended_columns.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/open_timeline/timelines_table/extended_columns.test.tsx rename to x-pack/plugins/siem/public/components/open_timeline/timelines_table/extended_columns.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/open_timeline/timelines_table/extended_columns.tsx b/x-pack/plugins/siem/public/components/open_timeline/timelines_table/extended_columns.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/open_timeline/timelines_table/extended_columns.tsx rename to x-pack/plugins/siem/public/components/open_timeline/timelines_table/extended_columns.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/open_timeline/timelines_table/icon_header_columns.test.tsx b/x-pack/plugins/siem/public/components/open_timeline/timelines_table/icon_header_columns.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/open_timeline/timelines_table/icon_header_columns.test.tsx rename to x-pack/plugins/siem/public/components/open_timeline/timelines_table/icon_header_columns.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/open_timeline/timelines_table/icon_header_columns.tsx b/x-pack/plugins/siem/public/components/open_timeline/timelines_table/icon_header_columns.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/open_timeline/timelines_table/icon_header_columns.tsx rename to x-pack/plugins/siem/public/components/open_timeline/timelines_table/icon_header_columns.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/open_timeline/timelines_table/index.test.tsx b/x-pack/plugins/siem/public/components/open_timeline/timelines_table/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/open_timeline/timelines_table/index.test.tsx rename to x-pack/plugins/siem/public/components/open_timeline/timelines_table/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/open_timeline/timelines_table/index.tsx b/x-pack/plugins/siem/public/components/open_timeline/timelines_table/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/open_timeline/timelines_table/index.tsx rename to x-pack/plugins/siem/public/components/open_timeline/timelines_table/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/open_timeline/timelines_table/mocks.ts b/x-pack/plugins/siem/public/components/open_timeline/timelines_table/mocks.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/open_timeline/timelines_table/mocks.ts rename to x-pack/plugins/siem/public/components/open_timeline/timelines_table/mocks.ts diff --git a/x-pack/legacy/plugins/siem/public/components/open_timeline/title_row/index.test.tsx b/x-pack/plugins/siem/public/components/open_timeline/title_row/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/open_timeline/title_row/index.test.tsx rename to x-pack/plugins/siem/public/components/open_timeline/title_row/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/open_timeline/title_row/index.tsx b/x-pack/plugins/siem/public/components/open_timeline/title_row/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/open_timeline/title_row/index.tsx rename to x-pack/plugins/siem/public/components/open_timeline/title_row/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/open_timeline/translations.ts b/x-pack/plugins/siem/public/components/open_timeline/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/open_timeline/translations.ts rename to x-pack/plugins/siem/public/components/open_timeline/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/open_timeline/types.ts b/x-pack/plugins/siem/public/components/open_timeline/types.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/open_timeline/types.ts rename to x-pack/plugins/siem/public/components/open_timeline/types.ts diff --git a/x-pack/legacy/plugins/siem/public/components/page/add_filter_to_global_search_bar/__snapshots__/index.test.tsx.snap b/x-pack/plugins/siem/public/components/page/add_filter_to_global_search_bar/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/add_filter_to_global_search_bar/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/siem/public/components/page/add_filter_to_global_search_bar/__snapshots__/index.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/page/add_filter_to_global_search_bar/helpers.test.tsx b/x-pack/plugins/siem/public/components/page/add_filter_to_global_search_bar/helpers.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/add_filter_to_global_search_bar/helpers.test.tsx rename to x-pack/plugins/siem/public/components/page/add_filter_to_global_search_bar/helpers.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/page/add_filter_to_global_search_bar/helpers.ts b/x-pack/plugins/siem/public/components/page/add_filter_to_global_search_bar/helpers.ts similarity index 94% rename from x-pack/legacy/plugins/siem/public/components/page/add_filter_to_global_search_bar/helpers.ts rename to x-pack/plugins/siem/public/components/page/add_filter_to_global_search_bar/helpers.ts index d88bc2bf3b7e6d..6573b6371e9a49 100644 --- a/x-pack/legacy/plugins/siem/public/components/page/add_filter_to_global_search_bar/helpers.ts +++ b/x-pack/plugins/siem/public/components/page/add_filter_to_global_search_bar/helpers.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { Filter } from '../../../../../../../../src/plugins/data/public'; +import { Filter } from '../../../../../../../src/plugins/data/public'; export const createFilter = ( key: string, diff --git a/x-pack/legacy/plugins/siem/public/components/page/add_filter_to_global_search_bar/index.test.tsx b/x-pack/plugins/siem/public/components/page/add_filter_to_global_search_bar/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/add_filter_to_global_search_bar/index.test.tsx rename to x-pack/plugins/siem/public/components/page/add_filter_to_global_search_bar/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/page/add_filter_to_global_search_bar/index.tsx b/x-pack/plugins/siem/public/components/page/add_filter_to_global_search_bar/index.tsx similarity index 96% rename from x-pack/legacy/plugins/siem/public/components/page/add_filter_to_global_search_bar/index.tsx rename to x-pack/plugins/siem/public/components/page/add_filter_to_global_search_bar/index.tsx index 127eb3bae0284a..7aed36422bd2f5 100644 --- a/x-pack/legacy/plugins/siem/public/components/page/add_filter_to_global_search_bar/index.tsx +++ b/x-pack/plugins/siem/public/components/page/add_filter_to_global_search_bar/index.tsx @@ -7,7 +7,7 @@ import { EuiButtonIcon, EuiToolTip } from '@elastic/eui'; import React, { useCallback } from 'react'; -import { Filter } from '../../../../../../../../src/plugins/data/public'; +import { Filter } from '../../../../../../../src/plugins/data/public'; import { WithHoverActions } from '../../with_hover_actions'; import { useKibana } from '../../../lib/kibana'; diff --git a/x-pack/legacy/plugins/siem/public/components/page/add_filter_to_global_search_bar/translations.ts b/x-pack/plugins/siem/public/components/page/add_filter_to_global_search_bar/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/add_filter_to_global_search_bar/translations.ts rename to x-pack/plugins/siem/public/components/page/add_filter_to_global_search_bar/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/page/hosts/authentications_table/__snapshots__/index.test.tsx.snap b/x-pack/plugins/siem/public/components/page/hosts/authentications_table/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/hosts/authentications_table/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/siem/public/components/page/hosts/authentications_table/__snapshots__/index.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/page/hosts/authentications_table/index.test.tsx b/x-pack/plugins/siem/public/components/page/hosts/authentications_table/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/hosts/authentications_table/index.test.tsx rename to x-pack/plugins/siem/public/components/page/hosts/authentications_table/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/page/hosts/authentications_table/index.tsx b/x-pack/plugins/siem/public/components/page/hosts/authentications_table/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/hosts/authentications_table/index.tsx rename to x-pack/plugins/siem/public/components/page/hosts/authentications_table/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/page/hosts/authentications_table/mock.ts b/x-pack/plugins/siem/public/components/page/hosts/authentications_table/mock.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/hosts/authentications_table/mock.ts rename to x-pack/plugins/siem/public/components/page/hosts/authentications_table/mock.ts diff --git a/x-pack/legacy/plugins/siem/public/components/page/hosts/authentications_table/translations.ts b/x-pack/plugins/siem/public/components/page/hosts/authentications_table/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/hosts/authentications_table/translations.ts rename to x-pack/plugins/siem/public/components/page/hosts/authentications_table/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/page/hosts/first_last_seen_host/index.test.tsx b/x-pack/plugins/siem/public/components/page/hosts/first_last_seen_host/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/hosts/first_last_seen_host/index.test.tsx rename to x-pack/plugins/siem/public/components/page/hosts/first_last_seen_host/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/page/hosts/first_last_seen_host/index.tsx b/x-pack/plugins/siem/public/components/page/hosts/first_last_seen_host/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/hosts/first_last_seen_host/index.tsx rename to x-pack/plugins/siem/public/components/page/hosts/first_last_seen_host/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/page/hosts/host_overview/__snapshots__/index.test.tsx.snap b/x-pack/plugins/siem/public/components/page/hosts/host_overview/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/hosts/host_overview/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/siem/public/components/page/hosts/host_overview/__snapshots__/index.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/page/hosts/host_overview/index.test.tsx b/x-pack/plugins/siem/public/components/page/hosts/host_overview/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/hosts/host_overview/index.test.tsx rename to x-pack/plugins/siem/public/components/page/hosts/host_overview/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/page/hosts/host_overview/index.tsx b/x-pack/plugins/siem/public/components/page/hosts/host_overview/index.tsx similarity index 97% rename from x-pack/legacy/plugins/siem/public/components/page/hosts/host_overview/index.tsx rename to x-pack/plugins/siem/public/components/page/hosts/host_overview/index.tsx index a0ca5f855237c5..4d0e6a737d303f 100644 --- a/x-pack/legacy/plugins/siem/public/components/page/hosts/host_overview/index.tsx +++ b/x-pack/plugins/siem/public/components/page/hosts/host_overview/index.tsx @@ -10,8 +10,8 @@ import lightTheme from '@elastic/eui/dist/eui_theme_light.json'; import { getOr } from 'lodash/fp'; import React from 'react'; -import { DEFAULT_DARK_MODE } from '../../../../../../../../plugins/siem/common/constants'; -import { DescriptionList } from '../../../../../../../../plugins/siem/common/utility_types'; +import { DEFAULT_DARK_MODE } from '../../../../../common/constants'; +import { DescriptionList } from '../../../../../common/utility_types'; import { useUiSetting$ } from '../../../../lib/kibana'; import { getEmptyTagValue } from '../../../empty_value'; import { DefaultFieldRenderer, hostIdRenderer } from '../../../field_renderers/field_renderers'; diff --git a/x-pack/legacy/plugins/siem/public/components/page/hosts/host_overview/mock.ts b/x-pack/plugins/siem/public/components/page/hosts/host_overview/mock.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/hosts/host_overview/mock.ts rename to x-pack/plugins/siem/public/components/page/hosts/host_overview/mock.ts diff --git a/x-pack/legacy/plugins/siem/public/components/page/hosts/host_overview/translations.ts b/x-pack/plugins/siem/public/components/page/hosts/host_overview/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/hosts/host_overview/translations.ts rename to x-pack/plugins/siem/public/components/page/hosts/host_overview/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/page/hosts/hosts_table/__snapshots__/index.test.tsx.snap b/x-pack/plugins/siem/public/components/page/hosts/hosts_table/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/hosts/hosts_table/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/siem/public/components/page/hosts/hosts_table/__snapshots__/index.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/page/hosts/hosts_table/columns.tsx b/x-pack/plugins/siem/public/components/page/hosts/hosts_table/columns.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/hosts/hosts_table/columns.tsx rename to x-pack/plugins/siem/public/components/page/hosts/hosts_table/columns.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/page/hosts/hosts_table/index.test.tsx b/x-pack/plugins/siem/public/components/page/hosts/hosts_table/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/hosts/hosts_table/index.test.tsx rename to x-pack/plugins/siem/public/components/page/hosts/hosts_table/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/page/hosts/hosts_table/index.tsx b/x-pack/plugins/siem/public/components/page/hosts/hosts_table/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/hosts/hosts_table/index.tsx rename to x-pack/plugins/siem/public/components/page/hosts/hosts_table/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/page/hosts/hosts_table/mock.ts b/x-pack/plugins/siem/public/components/page/hosts/hosts_table/mock.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/hosts/hosts_table/mock.ts rename to x-pack/plugins/siem/public/components/page/hosts/hosts_table/mock.ts diff --git a/x-pack/legacy/plugins/siem/public/components/page/hosts/hosts_table/translations.ts b/x-pack/plugins/siem/public/components/page/hosts/hosts_table/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/hosts/hosts_table/translations.ts rename to x-pack/plugins/siem/public/components/page/hosts/hosts_table/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/page/hosts/index.tsx b/x-pack/plugins/siem/public/components/page/hosts/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/hosts/index.tsx rename to x-pack/plugins/siem/public/components/page/hosts/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/page/hosts/kpi_hosts/__snapshots__/index.test.tsx.snap b/x-pack/plugins/siem/public/components/page/hosts/kpi_hosts/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/hosts/kpi_hosts/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/siem/public/components/page/hosts/kpi_hosts/__snapshots__/index.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/page/hosts/kpi_hosts/index.test.tsx b/x-pack/plugins/siem/public/components/page/hosts/kpi_hosts/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/hosts/kpi_hosts/index.test.tsx rename to x-pack/plugins/siem/public/components/page/hosts/kpi_hosts/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/page/hosts/kpi_hosts/index.tsx b/x-pack/plugins/siem/public/components/page/hosts/kpi_hosts/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/hosts/kpi_hosts/index.tsx rename to x-pack/plugins/siem/public/components/page/hosts/kpi_hosts/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/page/hosts/kpi_hosts/kpi_host_details_mapping.ts b/x-pack/plugins/siem/public/components/page/hosts/kpi_hosts/kpi_host_details_mapping.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/hosts/kpi_hosts/kpi_host_details_mapping.ts rename to x-pack/plugins/siem/public/components/page/hosts/kpi_hosts/kpi_host_details_mapping.ts diff --git a/x-pack/legacy/plugins/siem/public/components/page/hosts/kpi_hosts/kpi_hosts_mapping.ts b/x-pack/plugins/siem/public/components/page/hosts/kpi_hosts/kpi_hosts_mapping.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/hosts/kpi_hosts/kpi_hosts_mapping.ts rename to x-pack/plugins/siem/public/components/page/hosts/kpi_hosts/kpi_hosts_mapping.ts diff --git a/x-pack/legacy/plugins/siem/public/components/page/hosts/kpi_hosts/mock.tsx b/x-pack/plugins/siem/public/components/page/hosts/kpi_hosts/mock.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/hosts/kpi_hosts/mock.tsx rename to x-pack/plugins/siem/public/components/page/hosts/kpi_hosts/mock.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/page/hosts/kpi_hosts/translations.ts b/x-pack/plugins/siem/public/components/page/hosts/kpi_hosts/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/hosts/kpi_hosts/translations.ts rename to x-pack/plugins/siem/public/components/page/hosts/kpi_hosts/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/page/hosts/kpi_hosts/types.ts b/x-pack/plugins/siem/public/components/page/hosts/kpi_hosts/types.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/hosts/kpi_hosts/types.ts rename to x-pack/plugins/siem/public/components/page/hosts/kpi_hosts/types.ts diff --git a/x-pack/legacy/plugins/siem/public/components/page/hosts/uncommon_process_table/__snapshots__/index.test.tsx.snap b/x-pack/plugins/siem/public/components/page/hosts/uncommon_process_table/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/hosts/uncommon_process_table/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/siem/public/components/page/hosts/uncommon_process_table/__snapshots__/index.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/page/hosts/uncommon_process_table/index.test.tsx b/x-pack/plugins/siem/public/components/page/hosts/uncommon_process_table/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/hosts/uncommon_process_table/index.test.tsx rename to x-pack/plugins/siem/public/components/page/hosts/uncommon_process_table/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/page/hosts/uncommon_process_table/index.tsx b/x-pack/plugins/siem/public/components/page/hosts/uncommon_process_table/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/hosts/uncommon_process_table/index.tsx rename to x-pack/plugins/siem/public/components/page/hosts/uncommon_process_table/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/page/hosts/uncommon_process_table/mock.ts b/x-pack/plugins/siem/public/components/page/hosts/uncommon_process_table/mock.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/hosts/uncommon_process_table/mock.ts rename to x-pack/plugins/siem/public/components/page/hosts/uncommon_process_table/mock.ts diff --git a/x-pack/legacy/plugins/siem/public/components/page/hosts/uncommon_process_table/translations.ts b/x-pack/plugins/siem/public/components/page/hosts/uncommon_process_table/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/hosts/uncommon_process_table/translations.ts rename to x-pack/plugins/siem/public/components/page/hosts/uncommon_process_table/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/page/index.tsx b/x-pack/plugins/siem/public/components/page/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/index.tsx rename to x-pack/plugins/siem/public/components/page/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/page/manage_query.tsx b/x-pack/plugins/siem/public/components/page/manage_query.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/manage_query.tsx rename to x-pack/plugins/siem/public/components/page/manage_query.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/page/network/flow_target_select_connected/index.test.tsx b/x-pack/plugins/siem/public/components/page/network/flow_target_select_connected/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/network/flow_target_select_connected/index.test.tsx rename to x-pack/plugins/siem/public/components/page/network/flow_target_select_connected/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/page/network/flow_target_select_connected/index.tsx b/x-pack/plugins/siem/public/components/page/network/flow_target_select_connected/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/network/flow_target_select_connected/index.tsx rename to x-pack/plugins/siem/public/components/page/network/flow_target_select_connected/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/page/network/index.tsx b/x-pack/plugins/siem/public/components/page/network/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/network/index.tsx rename to x-pack/plugins/siem/public/components/page/network/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/page/network/ip_overview/__snapshots__/index.test.tsx.snap b/x-pack/plugins/siem/public/components/page/network/ip_overview/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/network/ip_overview/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/siem/public/components/page/network/ip_overview/__snapshots__/index.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/page/network/ip_overview/index.test.tsx b/x-pack/plugins/siem/public/components/page/network/ip_overview/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/network/ip_overview/index.test.tsx rename to x-pack/plugins/siem/public/components/page/network/ip_overview/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/page/network/ip_overview/index.tsx b/x-pack/plugins/siem/public/components/page/network/ip_overview/index.tsx similarity index 96% rename from x-pack/legacy/plugins/siem/public/components/page/network/ip_overview/index.tsx rename to x-pack/plugins/siem/public/components/page/network/ip_overview/index.tsx index a652fef5508fca..56b59ca97156f6 100644 --- a/x-pack/legacy/plugins/siem/public/components/page/network/ip_overview/index.tsx +++ b/x-pack/plugins/siem/public/components/page/network/ip_overview/index.tsx @@ -9,8 +9,8 @@ import darkTheme from '@elastic/eui/dist/eui_theme_dark.json'; import lightTheme from '@elastic/eui/dist/eui_theme_light.json'; import React from 'react'; -import { DEFAULT_DARK_MODE } from '../../../../../../../../plugins/siem/common/constants'; -import { DescriptionList } from '../../../../../../../../plugins/siem/common/utility_types'; +import { DEFAULT_DARK_MODE } from '../../../../../common/constants'; +import { DescriptionList } from '../../../../../common/utility_types'; import { useUiSetting$ } from '../../../../lib/kibana'; import { FlowTarget, IpOverviewData, Overview } from '../../../../graphql/types'; import { networkModel } from '../../../../store'; diff --git a/x-pack/legacy/plugins/siem/public/components/page/network/ip_overview/mock.ts b/x-pack/plugins/siem/public/components/page/network/ip_overview/mock.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/network/ip_overview/mock.ts rename to x-pack/plugins/siem/public/components/page/network/ip_overview/mock.ts diff --git a/x-pack/legacy/plugins/siem/public/components/page/network/ip_overview/translations.ts b/x-pack/plugins/siem/public/components/page/network/ip_overview/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/network/ip_overview/translations.ts rename to x-pack/plugins/siem/public/components/page/network/ip_overview/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/page/network/kpi_network/__snapshots__/index.test.tsx.snap b/x-pack/plugins/siem/public/components/page/network/kpi_network/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/network/kpi_network/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/siem/public/components/page/network/kpi_network/__snapshots__/index.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/page/network/kpi_network/index.test.tsx b/x-pack/plugins/siem/public/components/page/network/kpi_network/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/network/kpi_network/index.test.tsx rename to x-pack/plugins/siem/public/components/page/network/kpi_network/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/page/network/kpi_network/index.tsx b/x-pack/plugins/siem/public/components/page/network/kpi_network/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/network/kpi_network/index.tsx rename to x-pack/plugins/siem/public/components/page/network/kpi_network/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/page/network/kpi_network/mock.ts b/x-pack/plugins/siem/public/components/page/network/kpi_network/mock.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/network/kpi_network/mock.ts rename to x-pack/plugins/siem/public/components/page/network/kpi_network/mock.ts diff --git a/x-pack/legacy/plugins/siem/public/components/page/network/kpi_network/translations.ts b/x-pack/plugins/siem/public/components/page/network/kpi_network/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/network/kpi_network/translations.ts rename to x-pack/plugins/siem/public/components/page/network/kpi_network/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/page/network/network_dns_table/__snapshots__/index.test.tsx.snap b/x-pack/plugins/siem/public/components/page/network/network_dns_table/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/network/network_dns_table/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/siem/public/components/page/network/network_dns_table/__snapshots__/index.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/page/network/network_dns_table/__snapshots__/is_ptr_included.test.tsx.snap b/x-pack/plugins/siem/public/components/page/network/network_dns_table/__snapshots__/is_ptr_included.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/network/network_dns_table/__snapshots__/is_ptr_included.test.tsx.snap rename to x-pack/plugins/siem/public/components/page/network/network_dns_table/__snapshots__/is_ptr_included.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/page/network/network_dns_table/columns.tsx b/x-pack/plugins/siem/public/components/page/network/network_dns_table/columns.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/network/network_dns_table/columns.tsx rename to x-pack/plugins/siem/public/components/page/network/network_dns_table/columns.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/page/network/network_dns_table/index.test.tsx b/x-pack/plugins/siem/public/components/page/network/network_dns_table/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/network/network_dns_table/index.test.tsx rename to x-pack/plugins/siem/public/components/page/network/network_dns_table/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/page/network/network_dns_table/index.tsx b/x-pack/plugins/siem/public/components/page/network/network_dns_table/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/network/network_dns_table/index.tsx rename to x-pack/plugins/siem/public/components/page/network/network_dns_table/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/page/network/network_dns_table/is_ptr_included.test.tsx b/x-pack/plugins/siem/public/components/page/network/network_dns_table/is_ptr_included.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/network/network_dns_table/is_ptr_included.test.tsx rename to x-pack/plugins/siem/public/components/page/network/network_dns_table/is_ptr_included.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/page/network/network_dns_table/is_ptr_included.tsx b/x-pack/plugins/siem/public/components/page/network/network_dns_table/is_ptr_included.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/network/network_dns_table/is_ptr_included.tsx rename to x-pack/plugins/siem/public/components/page/network/network_dns_table/is_ptr_included.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/page/network/network_dns_table/mock.ts b/x-pack/plugins/siem/public/components/page/network/network_dns_table/mock.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/network/network_dns_table/mock.ts rename to x-pack/plugins/siem/public/components/page/network/network_dns_table/mock.ts diff --git a/x-pack/legacy/plugins/siem/public/components/page/network/network_dns_table/translations.ts b/x-pack/plugins/siem/public/components/page/network/network_dns_table/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/network/network_dns_table/translations.ts rename to x-pack/plugins/siem/public/components/page/network/network_dns_table/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/page/network/network_http_table/__snapshots__/index.test.tsx.snap b/x-pack/plugins/siem/public/components/page/network/network_http_table/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/network/network_http_table/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/siem/public/components/page/network/network_http_table/__snapshots__/index.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/page/network/network_http_table/columns.tsx b/x-pack/plugins/siem/public/components/page/network/network_http_table/columns.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/network/network_http_table/columns.tsx rename to x-pack/plugins/siem/public/components/page/network/network_http_table/columns.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/page/network/network_http_table/index.test.tsx b/x-pack/plugins/siem/public/components/page/network/network_http_table/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/network/network_http_table/index.test.tsx rename to x-pack/plugins/siem/public/components/page/network/network_http_table/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/page/network/network_http_table/index.tsx b/x-pack/plugins/siem/public/components/page/network/network_http_table/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/network/network_http_table/index.tsx rename to x-pack/plugins/siem/public/components/page/network/network_http_table/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/page/network/network_http_table/mock.ts b/x-pack/plugins/siem/public/components/page/network/network_http_table/mock.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/network/network_http_table/mock.ts rename to x-pack/plugins/siem/public/components/page/network/network_http_table/mock.ts diff --git a/x-pack/legacy/plugins/siem/public/components/page/network/network_http_table/translations.ts b/x-pack/plugins/siem/public/components/page/network/network_http_table/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/network/network_http_table/translations.ts rename to x-pack/plugins/siem/public/components/page/network/network_http_table/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/page/network/network_top_countries_table/__snapshots__/index.test.tsx.snap b/x-pack/plugins/siem/public/components/page/network/network_top_countries_table/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/network/network_top_countries_table/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/siem/public/components/page/network/network_top_countries_table/__snapshots__/index.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/page/network/network_top_countries_table/columns.tsx b/x-pack/plugins/siem/public/components/page/network/network_top_countries_table/columns.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/network/network_top_countries_table/columns.tsx rename to x-pack/plugins/siem/public/components/page/network/network_top_countries_table/columns.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/page/network/network_top_countries_table/index.test.tsx b/x-pack/plugins/siem/public/components/page/network/network_top_countries_table/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/network/network_top_countries_table/index.test.tsx rename to x-pack/plugins/siem/public/components/page/network/network_top_countries_table/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/page/network/network_top_countries_table/index.tsx b/x-pack/plugins/siem/public/components/page/network/network_top_countries_table/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/network/network_top_countries_table/index.tsx rename to x-pack/plugins/siem/public/components/page/network/network_top_countries_table/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/page/network/network_top_countries_table/mock.ts b/x-pack/plugins/siem/public/components/page/network/network_top_countries_table/mock.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/network/network_top_countries_table/mock.ts rename to x-pack/plugins/siem/public/components/page/network/network_top_countries_table/mock.ts diff --git a/x-pack/legacy/plugins/siem/public/components/page/network/network_top_countries_table/translations.ts b/x-pack/plugins/siem/public/components/page/network/network_top_countries_table/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/network/network_top_countries_table/translations.ts rename to x-pack/plugins/siem/public/components/page/network/network_top_countries_table/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/page/network/network_top_n_flow_table/__snapshots__/index.test.tsx.snap b/x-pack/plugins/siem/public/components/page/network/network_top_n_flow_table/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/network/network_top_n_flow_table/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/siem/public/components/page/network/network_top_n_flow_table/__snapshots__/index.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/page/network/network_top_n_flow_table/columns.tsx b/x-pack/plugins/siem/public/components/page/network/network_top_n_flow_table/columns.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/network/network_top_n_flow_table/columns.tsx rename to x-pack/plugins/siem/public/components/page/network/network_top_n_flow_table/columns.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/page/network/network_top_n_flow_table/index.test.tsx b/x-pack/plugins/siem/public/components/page/network/network_top_n_flow_table/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/network/network_top_n_flow_table/index.test.tsx rename to x-pack/plugins/siem/public/components/page/network/network_top_n_flow_table/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/page/network/network_top_n_flow_table/index.tsx b/x-pack/plugins/siem/public/components/page/network/network_top_n_flow_table/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/network/network_top_n_flow_table/index.tsx rename to x-pack/plugins/siem/public/components/page/network/network_top_n_flow_table/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/page/network/network_top_n_flow_table/mock.ts b/x-pack/plugins/siem/public/components/page/network/network_top_n_flow_table/mock.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/network/network_top_n_flow_table/mock.ts rename to x-pack/plugins/siem/public/components/page/network/network_top_n_flow_table/mock.ts diff --git a/x-pack/legacy/plugins/siem/public/components/page/network/network_top_n_flow_table/translations.ts b/x-pack/plugins/siem/public/components/page/network/network_top_n_flow_table/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/network/network_top_n_flow_table/translations.ts rename to x-pack/plugins/siem/public/components/page/network/network_top_n_flow_table/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/page/network/tls_table/__snapshots__/index.test.tsx.snap b/x-pack/plugins/siem/public/components/page/network/tls_table/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/network/tls_table/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/siem/public/components/page/network/tls_table/__snapshots__/index.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/page/network/tls_table/columns.tsx b/x-pack/plugins/siem/public/components/page/network/tls_table/columns.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/network/tls_table/columns.tsx rename to x-pack/plugins/siem/public/components/page/network/tls_table/columns.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/page/network/tls_table/index.test.tsx b/x-pack/plugins/siem/public/components/page/network/tls_table/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/network/tls_table/index.test.tsx rename to x-pack/plugins/siem/public/components/page/network/tls_table/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/page/network/tls_table/index.tsx b/x-pack/plugins/siem/public/components/page/network/tls_table/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/network/tls_table/index.tsx rename to x-pack/plugins/siem/public/components/page/network/tls_table/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/page/network/tls_table/mock.ts b/x-pack/plugins/siem/public/components/page/network/tls_table/mock.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/network/tls_table/mock.ts rename to x-pack/plugins/siem/public/components/page/network/tls_table/mock.ts diff --git a/x-pack/legacy/plugins/siem/public/components/page/network/tls_table/translations.ts b/x-pack/plugins/siem/public/components/page/network/tls_table/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/network/tls_table/translations.ts rename to x-pack/plugins/siem/public/components/page/network/tls_table/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/page/network/users_table/__snapshots__/index.test.tsx.snap b/x-pack/plugins/siem/public/components/page/network/users_table/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/network/users_table/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/siem/public/components/page/network/users_table/__snapshots__/index.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/page/network/users_table/columns.tsx b/x-pack/plugins/siem/public/components/page/network/users_table/columns.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/network/users_table/columns.tsx rename to x-pack/plugins/siem/public/components/page/network/users_table/columns.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/page/network/users_table/index.test.tsx b/x-pack/plugins/siem/public/components/page/network/users_table/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/network/users_table/index.test.tsx rename to x-pack/plugins/siem/public/components/page/network/users_table/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/page/network/users_table/index.tsx b/x-pack/plugins/siem/public/components/page/network/users_table/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/network/users_table/index.tsx rename to x-pack/plugins/siem/public/components/page/network/users_table/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/page/network/users_table/mock.ts b/x-pack/plugins/siem/public/components/page/network/users_table/mock.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/network/users_table/mock.ts rename to x-pack/plugins/siem/public/components/page/network/users_table/mock.ts diff --git a/x-pack/legacy/plugins/siem/public/components/page/network/users_table/translations.ts b/x-pack/plugins/siem/public/components/page/network/users_table/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/network/users_table/translations.ts rename to x-pack/plugins/siem/public/components/page/network/users_table/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/page/overview/loading_placeholders/index.tsx b/x-pack/plugins/siem/public/components/page/overview/loading_placeholders/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/overview/loading_placeholders/index.tsx rename to x-pack/plugins/siem/public/components/page/overview/loading_placeholders/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/page/overview/overview_host/index.test.tsx b/x-pack/plugins/siem/public/components/page/overview/overview_host/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/overview/overview_host/index.test.tsx rename to x-pack/plugins/siem/public/components/page/overview/overview_host/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/page/overview/overview_host/index.tsx b/x-pack/plugins/siem/public/components/page/overview/overview_host/index.tsx similarity index 96% rename from x-pack/legacy/plugins/siem/public/components/page/overview/overview_host/index.tsx rename to x-pack/plugins/siem/public/components/page/overview/overview_host/index.tsx index b43efbbde51b33..52c142ceff4805 100644 --- a/x-pack/legacy/plugins/siem/public/components/page/overview/overview_host/index.tsx +++ b/x-pack/plugins/siem/public/components/page/overview/overview_host/index.tsx @@ -10,8 +10,8 @@ import numeral from '@elastic/numeral'; import { FormattedMessage } from '@kbn/i18n/react'; import React, { useMemo } from 'react'; -import { DEFAULT_NUMBER_FORMAT } from '../../../../../../../../plugins/siem/common/constants'; -import { ESQuery } from '../../../../../../../../plugins/siem/common/typed_json'; +import { DEFAULT_NUMBER_FORMAT } from '../../../../../common/constants'; +import { ESQuery } from '../../../../../common/typed_json'; import { ID as OverviewHostQueryId, OverviewHostQuery, diff --git a/x-pack/legacy/plugins/siem/public/components/page/overview/overview_host_stats/__snapshots__/index.test.tsx.snap b/x-pack/plugins/siem/public/components/page/overview/overview_host_stats/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/overview/overview_host_stats/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/siem/public/components/page/overview/overview_host_stats/__snapshots__/index.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/page/overview/overview_host_stats/index.test.tsx b/x-pack/plugins/siem/public/components/page/overview/overview_host_stats/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/overview/overview_host_stats/index.test.tsx rename to x-pack/plugins/siem/public/components/page/overview/overview_host_stats/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/page/overview/overview_host_stats/index.tsx b/x-pack/plugins/siem/public/components/page/overview/overview_host_stats/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/overview/overview_host_stats/index.tsx rename to x-pack/plugins/siem/public/components/page/overview/overview_host_stats/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/page/overview/overview_host_stats/mock.ts b/x-pack/plugins/siem/public/components/page/overview/overview_host_stats/mock.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/overview/overview_host_stats/mock.ts rename to x-pack/plugins/siem/public/components/page/overview/overview_host_stats/mock.ts diff --git a/x-pack/legacy/plugins/siem/public/components/page/overview/overview_network/index.test.tsx b/x-pack/plugins/siem/public/components/page/overview/overview_network/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/overview/overview_network/index.test.tsx rename to x-pack/plugins/siem/public/components/page/overview/overview_network/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/page/overview/overview_network/index.tsx b/x-pack/plugins/siem/public/components/page/overview/overview_network/index.tsx similarity index 96% rename from x-pack/legacy/plugins/siem/public/components/page/overview/overview_network/index.tsx rename to x-pack/plugins/siem/public/components/page/overview/overview_network/index.tsx index af50fa88e5fe8e..d649a0dd9e9237 100644 --- a/x-pack/legacy/plugins/siem/public/components/page/overview/overview_network/index.tsx +++ b/x-pack/plugins/siem/public/components/page/overview/overview_network/index.tsx @@ -10,8 +10,8 @@ import numeral from '@elastic/numeral'; import { FormattedMessage } from '@kbn/i18n/react'; import React, { useMemo } from 'react'; -import { DEFAULT_NUMBER_FORMAT } from '../../../../../../../../plugins/siem/common/constants'; -import { ESQuery } from '../../../../../../../../plugins/siem/common/typed_json'; +import { DEFAULT_NUMBER_FORMAT } from '../../../../../common/constants'; +import { ESQuery } from '../../../../../common/typed_json'; import { HeaderSection } from '../../../header_section'; import { useUiSetting$ } from '../../../../lib/kibana'; import { manageQuery } from '../../../page/manage_query'; diff --git a/x-pack/legacy/plugins/siem/public/components/page/overview/overview_network_stats/__snapshots__/index.test.tsx.snap b/x-pack/plugins/siem/public/components/page/overview/overview_network_stats/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/overview/overview_network_stats/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/siem/public/components/page/overview/overview_network_stats/__snapshots__/index.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/page/overview/overview_network_stats/index.test.tsx b/x-pack/plugins/siem/public/components/page/overview/overview_network_stats/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/overview/overview_network_stats/index.test.tsx rename to x-pack/plugins/siem/public/components/page/overview/overview_network_stats/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/page/overview/overview_network_stats/index.tsx b/x-pack/plugins/siem/public/components/page/overview/overview_network_stats/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/overview/overview_network_stats/index.tsx rename to x-pack/plugins/siem/public/components/page/overview/overview_network_stats/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/page/overview/overview_network_stats/mock.ts b/x-pack/plugins/siem/public/components/page/overview/overview_network_stats/mock.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/overview/overview_network_stats/mock.ts rename to x-pack/plugins/siem/public/components/page/overview/overview_network_stats/mock.ts diff --git a/x-pack/legacy/plugins/siem/public/components/page/overview/stat_value.tsx b/x-pack/plugins/siem/public/components/page/overview/stat_value.tsx similarity index 95% rename from x-pack/legacy/plugins/siem/public/components/page/overview/stat_value.tsx rename to x-pack/plugins/siem/public/components/page/overview/stat_value.tsx index cada0a9aff9390..7615001eec9da3 100644 --- a/x-pack/legacy/plugins/siem/public/components/page/overview/stat_value.tsx +++ b/x-pack/plugins/siem/public/components/page/overview/stat_value.tsx @@ -9,7 +9,7 @@ import numeral from '@elastic/numeral'; import React, { useEffect, useState } from 'react'; import styled from 'styled-components'; -import { DEFAULT_NUMBER_FORMAT } from '../../../../../../../plugins/siem/common/constants'; +import { DEFAULT_NUMBER_FORMAT } from '../../../../common/constants'; import { useUiSetting$ } from '../../../lib/kibana'; const ProgressContainer = styled.div` diff --git a/x-pack/legacy/plugins/siem/public/components/page/overview/types.ts b/x-pack/plugins/siem/public/components/page/overview/types.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/overview/types.ts rename to x-pack/plugins/siem/public/components/page/overview/types.ts diff --git a/x-pack/legacy/plugins/siem/public/components/page/translations.ts b/x-pack/plugins/siem/public/components/page/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page/translations.ts rename to x-pack/plugins/siem/public/components/page/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/page_route/index.tsx b/x-pack/plugins/siem/public/components/page_route/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page_route/index.tsx rename to x-pack/plugins/siem/public/components/page_route/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/page_route/pageroute.test.tsx b/x-pack/plugins/siem/public/components/page_route/pageroute.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page_route/pageroute.test.tsx rename to x-pack/plugins/siem/public/components/page_route/pageroute.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/page_route/pageroute.tsx b/x-pack/plugins/siem/public/components/page_route/pageroute.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/page_route/pageroute.tsx rename to x-pack/plugins/siem/public/components/page_route/pageroute.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/paginated_table/__snapshots__/index.test.tsx.snap b/x-pack/plugins/siem/public/components/paginated_table/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/paginated_table/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/siem/public/components/paginated_table/__snapshots__/index.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/paginated_table/helpers.test.ts b/x-pack/plugins/siem/public/components/paginated_table/helpers.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/paginated_table/helpers.test.ts rename to x-pack/plugins/siem/public/components/paginated_table/helpers.test.ts diff --git a/x-pack/legacy/plugins/siem/public/components/paginated_table/helpers.ts b/x-pack/plugins/siem/public/components/paginated_table/helpers.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/paginated_table/helpers.ts rename to x-pack/plugins/siem/public/components/paginated_table/helpers.ts diff --git a/x-pack/legacy/plugins/siem/public/components/paginated_table/index.mock.tsx b/x-pack/plugins/siem/public/components/paginated_table/index.mock.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/paginated_table/index.mock.tsx rename to x-pack/plugins/siem/public/components/paginated_table/index.mock.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/paginated_table/index.test.tsx b/x-pack/plugins/siem/public/components/paginated_table/index.test.tsx similarity index 99% rename from x-pack/legacy/plugins/siem/public/components/paginated_table/index.test.tsx rename to x-pack/plugins/siem/public/components/paginated_table/index.test.tsx index 2f743c33872090..94dac6607ce217 100644 --- a/x-pack/legacy/plugins/siem/public/components/paginated_table/index.test.tsx +++ b/x-pack/plugins/siem/public/components/paginated_table/index.test.tsx @@ -7,7 +7,7 @@ import { mount, shallow } from 'enzyme'; import React from 'react'; -import { DEFAULT_MAX_TABLE_QUERY_SIZE } from '../../../../../../plugins/siem/common/constants'; +import { DEFAULT_MAX_TABLE_QUERY_SIZE } from '../../../common/constants'; import { Direction } from '../../graphql/types'; import { BasicTableProps, PaginatedTable } from './index'; diff --git a/x-pack/legacy/plugins/siem/public/components/paginated_table/index.tsx b/x-pack/plugins/siem/public/components/paginated_table/index.tsx similarity index 99% rename from x-pack/legacy/plugins/siem/public/components/paginated_table/index.tsx rename to x-pack/plugins/siem/public/components/paginated_table/index.tsx index e481fe72452019..a815ecd1005180 100644 --- a/x-pack/legacy/plugins/siem/public/components/paginated_table/index.tsx +++ b/x-pack/plugins/siem/public/components/paginated_table/index.tsx @@ -22,7 +22,7 @@ import { noop } from 'lodash/fp'; import React, { FC, memo, useState, useEffect, ComponentType } from 'react'; import styled from 'styled-components'; -import { DEFAULT_MAX_TABLE_QUERY_SIZE } from '../../../../../../plugins/siem/common/constants'; +import { DEFAULT_MAX_TABLE_QUERY_SIZE } from '../../../common/constants'; import { AuthTableColumns } from '../page/hosts/authentications_table'; import { HostsTableColumns } from '../page/hosts/hosts_table'; import { NetworkDnsColumns } from '../page/network/network_dns_table/columns'; diff --git a/x-pack/legacy/plugins/siem/public/components/paginated_table/translations.ts b/x-pack/plugins/siem/public/components/paginated_table/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/paginated_table/translations.ts rename to x-pack/plugins/siem/public/components/paginated_table/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/panel/index.test.tsx b/x-pack/plugins/siem/public/components/panel/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/panel/index.test.tsx rename to x-pack/plugins/siem/public/components/panel/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/panel/index.tsx b/x-pack/plugins/siem/public/components/panel/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/panel/index.tsx rename to x-pack/plugins/siem/public/components/panel/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/pin/index.test.tsx b/x-pack/plugins/siem/public/components/pin/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/pin/index.test.tsx rename to x-pack/plugins/siem/public/components/pin/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/pin/index.tsx b/x-pack/plugins/siem/public/components/pin/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/pin/index.tsx rename to x-pack/plugins/siem/public/components/pin/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/port/__snapshots__/index.test.tsx.snap b/x-pack/plugins/siem/public/components/port/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/port/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/siem/public/components/port/__snapshots__/index.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/port/index.test.tsx b/x-pack/plugins/siem/public/components/port/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/port/index.test.tsx rename to x-pack/plugins/siem/public/components/port/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/port/index.tsx b/x-pack/plugins/siem/public/components/port/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/port/index.tsx rename to x-pack/plugins/siem/public/components/port/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/progress_inline/__snapshots__/index.test.tsx.snap b/x-pack/plugins/siem/public/components/progress_inline/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/progress_inline/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/siem/public/components/progress_inline/__snapshots__/index.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/progress_inline/index.test.tsx b/x-pack/plugins/siem/public/components/progress_inline/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/progress_inline/index.test.tsx rename to x-pack/plugins/siem/public/components/progress_inline/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/progress_inline/index.tsx b/x-pack/plugins/siem/public/components/progress_inline/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/progress_inline/index.tsx rename to x-pack/plugins/siem/public/components/progress_inline/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/query_bar/index.test.tsx b/x-pack/plugins/siem/public/components/query_bar/index.test.tsx similarity index 98% rename from x-pack/legacy/plugins/siem/public/components/query_bar/index.test.tsx rename to x-pack/plugins/siem/public/components/query_bar/index.test.tsx index 49afc8d5ef68b3..e27669b2b15be2 100644 --- a/x-pack/legacy/plugins/siem/public/components/query_bar/index.test.tsx +++ b/x-pack/plugins/siem/public/components/query_bar/index.test.tsx @@ -7,10 +7,10 @@ import { mount } from 'enzyme'; import React from 'react'; -import { DEFAULT_FROM, DEFAULT_TO } from '../../../../../../plugins/siem/common/constants'; +import { DEFAULT_FROM, DEFAULT_TO } from '../../../common/constants'; import { TestProviders, mockIndexPattern } from '../../mock'; import { createKibanaCoreStartMock } from '../../mock/kibana_core'; -import { FilterManager, SearchBar } from '../../../../../../../src/plugins/data/public'; +import { FilterManager, SearchBar } from '../../../../../../src/plugins/data/public'; import { QueryBar, QueryBarComponentProps } from '.'; import { createKibanaContextProviderMock } from '../../mock/kibana_react'; diff --git a/x-pack/legacy/plugins/siem/public/components/query_bar/index.tsx b/x-pack/plugins/siem/public/components/query_bar/index.tsx similarity index 96% rename from x-pack/legacy/plugins/siem/public/components/query_bar/index.tsx rename to x-pack/plugins/siem/public/components/query_bar/index.tsx index 557d389aefee92..1ad7bc16b901ee 100644 --- a/x-pack/legacy/plugins/siem/public/components/query_bar/index.tsx +++ b/x-pack/plugins/siem/public/components/query_bar/index.tsx @@ -17,8 +17,8 @@ import { SavedQuery, SearchBar, SavedQueryTimeFilter, -} from '../../../../../../../src/plugins/data/public'; -import { Storage } from '../../../../../../../src/plugins/kibana_utils/public'; +} from '../../../../../../src/plugins/data/public'; +import { Storage } from '../../../../../../src/plugins/kibana_utils/public'; export interface QueryBarComponentProps { dataTestSubj?: string; diff --git a/x-pack/legacy/plugins/siem/public/components/recent_cases/filters/index.tsx b/x-pack/plugins/siem/public/components/recent_cases/filters/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/recent_cases/filters/index.tsx rename to x-pack/plugins/siem/public/components/recent_cases/filters/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/recent_cases/index.tsx b/x-pack/plugins/siem/public/components/recent_cases/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/recent_cases/index.tsx rename to x-pack/plugins/siem/public/components/recent_cases/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/recent_cases/no_cases/index.tsx b/x-pack/plugins/siem/public/components/recent_cases/no_cases/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/recent_cases/no_cases/index.tsx rename to x-pack/plugins/siem/public/components/recent_cases/no_cases/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/recent_cases/recent_cases.tsx b/x-pack/plugins/siem/public/components/recent_cases/recent_cases.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/recent_cases/recent_cases.tsx rename to x-pack/plugins/siem/public/components/recent_cases/recent_cases.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/recent_cases/translations.ts b/x-pack/plugins/siem/public/components/recent_cases/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/recent_cases/translations.ts rename to x-pack/plugins/siem/public/components/recent_cases/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/recent_cases/types.ts b/x-pack/plugins/siem/public/components/recent_cases/types.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/recent_cases/types.ts rename to x-pack/plugins/siem/public/components/recent_cases/types.ts diff --git a/x-pack/legacy/plugins/siem/public/components/recent_timelines/counts/index.tsx b/x-pack/plugins/siem/public/components/recent_timelines/counts/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/recent_timelines/counts/index.tsx rename to x-pack/plugins/siem/public/components/recent_timelines/counts/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/recent_timelines/filters/index.tsx b/x-pack/plugins/siem/public/components/recent_timelines/filters/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/recent_timelines/filters/index.tsx rename to x-pack/plugins/siem/public/components/recent_timelines/filters/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/recent_timelines/header/index.tsx b/x-pack/plugins/siem/public/components/recent_timelines/header/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/recent_timelines/header/index.tsx rename to x-pack/plugins/siem/public/components/recent_timelines/header/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/recent_timelines/index.tsx b/x-pack/plugins/siem/public/components/recent_timelines/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/recent_timelines/index.tsx rename to x-pack/plugins/siem/public/components/recent_timelines/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/recent_timelines/recent_timelines.tsx b/x-pack/plugins/siem/public/components/recent_timelines/recent_timelines.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/recent_timelines/recent_timelines.tsx rename to x-pack/plugins/siem/public/components/recent_timelines/recent_timelines.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/recent_timelines/translations.ts b/x-pack/plugins/siem/public/components/recent_timelines/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/recent_timelines/translations.ts rename to x-pack/plugins/siem/public/components/recent_timelines/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/recent_timelines/types.ts b/x-pack/plugins/siem/public/components/recent_timelines/types.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/recent_timelines/types.ts rename to x-pack/plugins/siem/public/components/recent_timelines/types.ts diff --git a/x-pack/legacy/plugins/siem/public/components/scroll_to_top/index.test.tsx b/x-pack/plugins/siem/public/components/scroll_to_top/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/scroll_to_top/index.test.tsx rename to x-pack/plugins/siem/public/components/scroll_to_top/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/scroll_to_top/index.tsx b/x-pack/plugins/siem/public/components/scroll_to_top/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/scroll_to_top/index.tsx rename to x-pack/plugins/siem/public/components/scroll_to_top/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/search_bar/index.tsx b/x-pack/plugins/siem/public/components/search_bar/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/search_bar/index.tsx rename to x-pack/plugins/siem/public/components/search_bar/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/search_bar/selectors.ts b/x-pack/plugins/siem/public/components/search_bar/selectors.ts similarity index 91% rename from x-pack/legacy/plugins/siem/public/components/search_bar/selectors.ts rename to x-pack/plugins/siem/public/components/search_bar/selectors.ts index 793737a1ad754c..4e700a46ca0e2d 100644 --- a/x-pack/legacy/plugins/siem/public/components/search_bar/selectors.ts +++ b/x-pack/plugins/siem/public/components/search_bar/selectors.ts @@ -6,7 +6,7 @@ import { createSelector } from 'reselect'; import { InputsRange } from '../../store/inputs/model'; -import { Query, SavedQuery } from '../../../../../../../src/plugins/data/public'; +import { Query, SavedQuery } from '../../../../../../src/plugins/data/public'; export { endSelector, diff --git a/x-pack/legacy/plugins/siem/public/components/selectable_text/__snapshots__/index.test.tsx.snap b/x-pack/plugins/siem/public/components/selectable_text/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/selectable_text/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/siem/public/components/selectable_text/__snapshots__/index.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/selectable_text/index.test.tsx b/x-pack/plugins/siem/public/components/selectable_text/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/selectable_text/index.test.tsx rename to x-pack/plugins/siem/public/components/selectable_text/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/selectable_text/index.tsx b/x-pack/plugins/siem/public/components/selectable_text/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/selectable_text/index.tsx rename to x-pack/plugins/siem/public/components/selectable_text/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/sidebar_header/index.tsx b/x-pack/plugins/siem/public/components/sidebar_header/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/sidebar_header/index.tsx rename to x-pack/plugins/siem/public/components/sidebar_header/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/skeleton_row/__snapshots__/index.test.tsx.snap b/x-pack/plugins/siem/public/components/skeleton_row/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/skeleton_row/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/siem/public/components/skeleton_row/__snapshots__/index.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/skeleton_row/index.test.tsx b/x-pack/plugins/siem/public/components/skeleton_row/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/skeleton_row/index.test.tsx rename to x-pack/plugins/siem/public/components/skeleton_row/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/skeleton_row/index.tsx b/x-pack/plugins/siem/public/components/skeleton_row/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/skeleton_row/index.tsx rename to x-pack/plugins/siem/public/components/skeleton_row/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/source_destination/__snapshots__/index.test.tsx.snap b/x-pack/plugins/siem/public/components/source_destination/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/source_destination/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/siem/public/components/source_destination/__snapshots__/index.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/source_destination/country_flag.tsx b/x-pack/plugins/siem/public/components/source_destination/country_flag.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/source_destination/country_flag.tsx rename to x-pack/plugins/siem/public/components/source_destination/country_flag.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/source_destination/field_names.ts b/x-pack/plugins/siem/public/components/source_destination/field_names.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/source_destination/field_names.ts rename to x-pack/plugins/siem/public/components/source_destination/field_names.ts diff --git a/x-pack/legacy/plugins/siem/public/components/source_destination/geo_fields.tsx b/x-pack/plugins/siem/public/components/source_destination/geo_fields.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/source_destination/geo_fields.tsx rename to x-pack/plugins/siem/public/components/source_destination/geo_fields.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/source_destination/index.test.tsx b/x-pack/plugins/siem/public/components/source_destination/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/source_destination/index.test.tsx rename to x-pack/plugins/siem/public/components/source_destination/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/source_destination/index.tsx b/x-pack/plugins/siem/public/components/source_destination/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/source_destination/index.tsx rename to x-pack/plugins/siem/public/components/source_destination/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/source_destination/ip_with_port.tsx b/x-pack/plugins/siem/public/components/source_destination/ip_with_port.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/source_destination/ip_with_port.tsx rename to x-pack/plugins/siem/public/components/source_destination/ip_with_port.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/source_destination/label.tsx b/x-pack/plugins/siem/public/components/source_destination/label.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/source_destination/label.tsx rename to x-pack/plugins/siem/public/components/source_destination/label.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/source_destination/network.tsx b/x-pack/plugins/siem/public/components/source_destination/network.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/source_destination/network.tsx rename to x-pack/plugins/siem/public/components/source_destination/network.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/source_destination/source_destination_arrows.tsx b/x-pack/plugins/siem/public/components/source_destination/source_destination_arrows.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/source_destination/source_destination_arrows.tsx rename to x-pack/plugins/siem/public/components/source_destination/source_destination_arrows.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/source_destination/source_destination_ip.test.tsx b/x-pack/plugins/siem/public/components/source_destination/source_destination_ip.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/source_destination/source_destination_ip.test.tsx rename to x-pack/plugins/siem/public/components/source_destination/source_destination_ip.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/source_destination/source_destination_ip.tsx b/x-pack/plugins/siem/public/components/source_destination/source_destination_ip.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/source_destination/source_destination_ip.tsx rename to x-pack/plugins/siem/public/components/source_destination/source_destination_ip.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/source_destination/source_destination_with_arrows.tsx b/x-pack/plugins/siem/public/components/source_destination/source_destination_with_arrows.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/source_destination/source_destination_with_arrows.tsx rename to x-pack/plugins/siem/public/components/source_destination/source_destination_with_arrows.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/source_destination/translations.ts b/x-pack/plugins/siem/public/components/source_destination/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/source_destination/translations.ts rename to x-pack/plugins/siem/public/components/source_destination/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/source_destination/types.ts b/x-pack/plugins/siem/public/components/source_destination/types.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/source_destination/types.ts rename to x-pack/plugins/siem/public/components/source_destination/types.ts diff --git a/x-pack/legacy/plugins/siem/public/components/stat_items/__snapshots__/index.test.tsx.snap b/x-pack/plugins/siem/public/components/stat_items/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/stat_items/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/siem/public/components/stat_items/__snapshots__/index.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/stat_items/index.test.tsx b/x-pack/plugins/siem/public/components/stat_items/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/stat_items/index.test.tsx rename to x-pack/plugins/siem/public/components/stat_items/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/stat_items/index.tsx b/x-pack/plugins/siem/public/components/stat_items/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/stat_items/index.tsx rename to x-pack/plugins/siem/public/components/stat_items/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/subtitle/__snapshots__/index.test.tsx.snap b/x-pack/plugins/siem/public/components/subtitle/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/subtitle/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/siem/public/components/subtitle/__snapshots__/index.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/subtitle/index.test.tsx b/x-pack/plugins/siem/public/components/subtitle/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/subtitle/index.test.tsx rename to x-pack/plugins/siem/public/components/subtitle/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/subtitle/index.tsx b/x-pack/plugins/siem/public/components/subtitle/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/subtitle/index.tsx rename to x-pack/plugins/siem/public/components/subtitle/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/super_date_picker/index.test.tsx b/x-pack/plugins/siem/public/components/super_date_picker/index.test.tsx similarity index 99% rename from x-pack/legacy/plugins/siem/public/components/super_date_picker/index.test.tsx rename to x-pack/plugins/siem/public/components/super_date_picker/index.test.tsx index a2e75e965bc76d..b6b515ceeffa61 100644 --- a/x-pack/legacy/plugins/siem/public/components/super_date_picker/index.test.tsx +++ b/x-pack/plugins/siem/public/components/super_date_picker/index.test.tsx @@ -8,7 +8,7 @@ import { mount } from 'enzyme'; import React from 'react'; import { Provider as ReduxStoreProvider } from 'react-redux'; -import { DEFAULT_TIMEPICKER_QUICK_RANGES } from '../../../../../../plugins/siem/common/constants'; +import { DEFAULT_TIMEPICKER_QUICK_RANGES } from '../../../common/constants'; import { useUiSetting$ } from '../../lib/kibana'; import { apolloClientObservable, mockGlobalState } from '../../mock'; import { createUseUiSetting$Mock } from '../../mock/kibana_react'; diff --git a/x-pack/legacy/plugins/siem/public/components/super_date_picker/index.tsx b/x-pack/plugins/siem/public/components/super_date_picker/index.tsx similarity index 98% rename from x-pack/legacy/plugins/siem/public/components/super_date_picker/index.tsx rename to x-pack/plugins/siem/public/components/super_date_picker/index.tsx index cf350b3993a4b9..ad38a7d61bcba6 100644 --- a/x-pack/legacy/plugins/siem/public/components/super_date_picker/index.tsx +++ b/x-pack/plugins/siem/public/components/super_date_picker/index.tsx @@ -17,7 +17,7 @@ import React, { useState, useCallback } from 'react'; import { connect, ConnectedProps } from 'react-redux'; import { Dispatch } from 'redux'; -import { DEFAULT_TIMEPICKER_QUICK_RANGES } from '../../../../../../plugins/siem/common/constants'; +import { DEFAULT_TIMEPICKER_QUICK_RANGES } from '../../../common/constants'; import { useUiSetting$ } from '../../lib/kibana'; import { inputsModel, State } from '../../store'; import { inputsActions, timelineActions } from '../../store/actions'; diff --git a/x-pack/legacy/plugins/siem/public/components/super_date_picker/selectors.test.ts b/x-pack/plugins/siem/public/components/super_date_picker/selectors.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/super_date_picker/selectors.test.ts rename to x-pack/plugins/siem/public/components/super_date_picker/selectors.test.ts diff --git a/x-pack/legacy/plugins/siem/public/components/super_date_picker/selectors.ts b/x-pack/plugins/siem/public/components/super_date_picker/selectors.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/super_date_picker/selectors.ts rename to x-pack/plugins/siem/public/components/super_date_picker/selectors.ts diff --git a/x-pack/legacy/plugins/siem/public/components/tables/__snapshots__/helpers.test.tsx.snap b/x-pack/plugins/siem/public/components/tables/__snapshots__/helpers.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/tables/__snapshots__/helpers.test.tsx.snap rename to x-pack/plugins/siem/public/components/tables/__snapshots__/helpers.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/tables/helpers.test.tsx b/x-pack/plugins/siem/public/components/tables/helpers.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/tables/helpers.test.tsx rename to x-pack/plugins/siem/public/components/tables/helpers.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/tables/helpers.tsx b/x-pack/plugins/siem/public/components/tables/helpers.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/tables/helpers.tsx rename to x-pack/plugins/siem/public/components/tables/helpers.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/__snapshots__/timeline.test.tsx.snap b/x-pack/plugins/siem/public/components/timeline/__snapshots__/timeline.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/__snapshots__/timeline.test.tsx.snap rename to x-pack/plugins/siem/public/components/timeline/__snapshots__/timeline.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/auto_save_warning/index.tsx b/x-pack/plugins/siem/public/components/timeline/auto_save_warning/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/auto_save_warning/index.tsx rename to x-pack/plugins/siem/public/components/timeline/auto_save_warning/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/auto_save_warning/translations.ts b/x-pack/plugins/siem/public/components/timeline/auto_save_warning/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/auto_save_warning/translations.ts rename to x-pack/plugins/siem/public/components/timeline/auto_save_warning/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/actions/index.test.tsx b/x-pack/plugins/siem/public/components/timeline/body/actions/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/actions/index.test.tsx rename to x-pack/plugins/siem/public/components/timeline/body/actions/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/actions/index.tsx b/x-pack/plugins/siem/public/components/timeline/body/actions/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/actions/index.tsx rename to x-pack/plugins/siem/public/components/timeline/body/actions/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/__snapshots__/index.test.tsx.snap b/x-pack/plugins/siem/public/components/timeline/body/column_headers/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/siem/public/components/timeline/body/column_headers/__snapshots__/index.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/actions/index.tsx b/x-pack/plugins/siem/public/components/timeline/body/column_headers/actions/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/actions/index.tsx rename to x-pack/plugins/siem/public/components/timeline/body/column_headers/actions/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/column_header.tsx b/x-pack/plugins/siem/public/components/timeline/body/column_headers/column_header.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/column_header.tsx rename to x-pack/plugins/siem/public/components/timeline/body/column_headers/column_header.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/common/dragging_container.tsx b/x-pack/plugins/siem/public/components/timeline/body/column_headers/common/dragging_container.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/common/dragging_container.tsx rename to x-pack/plugins/siem/public/components/timeline/body/column_headers/common/dragging_container.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/common/styles.tsx b/x-pack/plugins/siem/public/components/timeline/body/column_headers/common/styles.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/common/styles.tsx rename to x-pack/plugins/siem/public/components/timeline/body/column_headers/common/styles.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/default_headers.ts b/x-pack/plugins/siem/public/components/timeline/body/column_headers/default_headers.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/default_headers.ts rename to x-pack/plugins/siem/public/components/timeline/body/column_headers/default_headers.ts diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/events_select/helpers.tsx b/x-pack/plugins/siem/public/components/timeline/body/column_headers/events_select/helpers.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/events_select/helpers.tsx rename to x-pack/plugins/siem/public/components/timeline/body/column_headers/events_select/helpers.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/events_select/index.tsx b/x-pack/plugins/siem/public/components/timeline/body/column_headers/events_select/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/events_select/index.tsx rename to x-pack/plugins/siem/public/components/timeline/body/column_headers/events_select/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/events_select/translations.ts b/x-pack/plugins/siem/public/components/timeline/body/column_headers/events_select/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/events_select/translations.ts rename to x-pack/plugins/siem/public/components/timeline/body/column_headers/events_select/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/filter/__snapshots__/index.test.tsx.snap b/x-pack/plugins/siem/public/components/timeline/body/column_headers/filter/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/filter/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/siem/public/components/timeline/body/column_headers/filter/__snapshots__/index.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/filter/index.test.tsx b/x-pack/plugins/siem/public/components/timeline/body/column_headers/filter/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/filter/index.test.tsx rename to x-pack/plugins/siem/public/components/timeline/body/column_headers/filter/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/filter/index.tsx b/x-pack/plugins/siem/public/components/timeline/body/column_headers/filter/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/filter/index.tsx rename to x-pack/plugins/siem/public/components/timeline/body/column_headers/filter/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/header/__snapshots__/index.test.tsx.snap b/x-pack/plugins/siem/public/components/timeline/body/column_headers/header/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/header/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/siem/public/components/timeline/body/column_headers/header/__snapshots__/index.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/header/header_content.tsx b/x-pack/plugins/siem/public/components/timeline/body/column_headers/header/header_content.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/header/header_content.tsx rename to x-pack/plugins/siem/public/components/timeline/body/column_headers/header/header_content.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/header/helpers.ts b/x-pack/plugins/siem/public/components/timeline/body/column_headers/header/helpers.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/header/helpers.ts rename to x-pack/plugins/siem/public/components/timeline/body/column_headers/header/helpers.ts diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/header/index.test.tsx b/x-pack/plugins/siem/public/components/timeline/body/column_headers/header/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/header/index.test.tsx rename to x-pack/plugins/siem/public/components/timeline/body/column_headers/header/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/header/index.tsx b/x-pack/plugins/siem/public/components/timeline/body/column_headers/header/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/header/index.tsx rename to x-pack/plugins/siem/public/components/timeline/body/column_headers/header/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/header_tooltip_content/__snapshots__/index.test.tsx.snap b/x-pack/plugins/siem/public/components/timeline/body/column_headers/header_tooltip_content/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/header_tooltip_content/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/siem/public/components/timeline/body/column_headers/header_tooltip_content/__snapshots__/index.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/header_tooltip_content/index.test.tsx b/x-pack/plugins/siem/public/components/timeline/body/column_headers/header_tooltip_content/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/header_tooltip_content/index.test.tsx rename to x-pack/plugins/siem/public/components/timeline/body/column_headers/header_tooltip_content/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/header_tooltip_content/index.tsx b/x-pack/plugins/siem/public/components/timeline/body/column_headers/header_tooltip_content/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/header_tooltip_content/index.tsx rename to x-pack/plugins/siem/public/components/timeline/body/column_headers/header_tooltip_content/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/helpers.test.ts b/x-pack/plugins/siem/public/components/timeline/body/column_headers/helpers.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/helpers.test.ts rename to x-pack/plugins/siem/public/components/timeline/body/column_headers/helpers.test.ts diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/helpers.ts b/x-pack/plugins/siem/public/components/timeline/body/column_headers/helpers.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/helpers.ts rename to x-pack/plugins/siem/public/components/timeline/body/column_headers/helpers.ts diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/index.test.tsx b/x-pack/plugins/siem/public/components/timeline/body/column_headers/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/index.test.tsx rename to x-pack/plugins/siem/public/components/timeline/body/column_headers/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/index.tsx b/x-pack/plugins/siem/public/components/timeline/body/column_headers/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/index.tsx rename to x-pack/plugins/siem/public/components/timeline/body/column_headers/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/range_picker/index.test.tsx b/x-pack/plugins/siem/public/components/timeline/body/column_headers/range_picker/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/range_picker/index.test.tsx rename to x-pack/plugins/siem/public/components/timeline/body/column_headers/range_picker/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/range_picker/index.tsx b/x-pack/plugins/siem/public/components/timeline/body/column_headers/range_picker/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/range_picker/index.tsx rename to x-pack/plugins/siem/public/components/timeline/body/column_headers/range_picker/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/range_picker/ranges.ts b/x-pack/plugins/siem/public/components/timeline/body/column_headers/range_picker/ranges.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/range_picker/ranges.ts rename to x-pack/plugins/siem/public/components/timeline/body/column_headers/range_picker/ranges.ts diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/range_picker/translations.ts b/x-pack/plugins/siem/public/components/timeline/body/column_headers/range_picker/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/range_picker/translations.ts rename to x-pack/plugins/siem/public/components/timeline/body/column_headers/range_picker/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/text_filter/__snapshots__/index.test.tsx.snap b/x-pack/plugins/siem/public/components/timeline/body/column_headers/text_filter/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/text_filter/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/siem/public/components/timeline/body/column_headers/text_filter/__snapshots__/index.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/text_filter/index.test.tsx b/x-pack/plugins/siem/public/components/timeline/body/column_headers/text_filter/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/text_filter/index.test.tsx rename to x-pack/plugins/siem/public/components/timeline/body/column_headers/text_filter/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/text_filter/index.tsx b/x-pack/plugins/siem/public/components/timeline/body/column_headers/text_filter/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/text_filter/index.tsx rename to x-pack/plugins/siem/public/components/timeline/body/column_headers/text_filter/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/translations.ts b/x-pack/plugins/siem/public/components/timeline/body/column_headers/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/translations.ts rename to x-pack/plugins/siem/public/components/timeline/body/column_headers/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/column_id.ts b/x-pack/plugins/siem/public/components/timeline/body/column_id.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/column_id.ts rename to x-pack/plugins/siem/public/components/timeline/body/column_id.ts diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/constants.ts b/x-pack/plugins/siem/public/components/timeline/body/constants.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/constants.ts rename to x-pack/plugins/siem/public/components/timeline/body/constants.ts diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/data_driven_columns/__snapshots__/index.test.tsx.snap b/x-pack/plugins/siem/public/components/timeline/body/data_driven_columns/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/data_driven_columns/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/siem/public/components/timeline/body/data_driven_columns/__snapshots__/index.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/data_driven_columns/index.test.tsx b/x-pack/plugins/siem/public/components/timeline/body/data_driven_columns/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/data_driven_columns/index.test.tsx rename to x-pack/plugins/siem/public/components/timeline/body/data_driven_columns/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/data_driven_columns/index.tsx b/x-pack/plugins/siem/public/components/timeline/body/data_driven_columns/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/data_driven_columns/index.tsx rename to x-pack/plugins/siem/public/components/timeline/body/data_driven_columns/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/events/event_column_view.tsx b/x-pack/plugins/siem/public/components/timeline/body/events/event_column_view.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/events/event_column_view.tsx rename to x-pack/plugins/siem/public/components/timeline/body/events/event_column_view.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/events/index.tsx b/x-pack/plugins/siem/public/components/timeline/body/events/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/events/index.tsx rename to x-pack/plugins/siem/public/components/timeline/body/events/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/events/stateful_event.tsx b/x-pack/plugins/siem/public/components/timeline/body/events/stateful_event.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/events/stateful_event.tsx rename to x-pack/plugins/siem/public/components/timeline/body/events/stateful_event.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/helpers.test.ts b/x-pack/plugins/siem/public/components/timeline/body/helpers.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/helpers.test.ts rename to x-pack/plugins/siem/public/components/timeline/body/helpers.test.ts diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/helpers.ts b/x-pack/plugins/siem/public/components/timeline/body/helpers.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/helpers.ts rename to x-pack/plugins/siem/public/components/timeline/body/helpers.ts diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/index.test.tsx b/x-pack/plugins/siem/public/components/timeline/body/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/index.test.tsx rename to x-pack/plugins/siem/public/components/timeline/body/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/index.tsx b/x-pack/plugins/siem/public/components/timeline/body/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/index.tsx rename to x-pack/plugins/siem/public/components/timeline/body/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/mini_map/date_ranges.test.ts b/x-pack/plugins/siem/public/components/timeline/body/mini_map/date_ranges.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/mini_map/date_ranges.test.ts rename to x-pack/plugins/siem/public/components/timeline/body/mini_map/date_ranges.test.ts diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/mini_map/date_ranges.ts b/x-pack/plugins/siem/public/components/timeline/body/mini_map/date_ranges.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/mini_map/date_ranges.ts rename to x-pack/plugins/siem/public/components/timeline/body/mini_map/date_ranges.ts diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/__snapshots__/args.test.tsx.snap b/x-pack/plugins/siem/public/components/timeline/body/renderers/__snapshots__/args.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/__snapshots__/args.test.tsx.snap rename to x-pack/plugins/siem/public/components/timeline/body/renderers/__snapshots__/args.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/__snapshots__/empty_column_renderer.test.tsx.snap b/x-pack/plugins/siem/public/components/timeline/body/renderers/__snapshots__/empty_column_renderer.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/__snapshots__/empty_column_renderer.test.tsx.snap rename to x-pack/plugins/siem/public/components/timeline/body/renderers/__snapshots__/empty_column_renderer.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/__snapshots__/formatted_field.test.tsx.snap b/x-pack/plugins/siem/public/components/timeline/body/renderers/__snapshots__/formatted_field.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/__snapshots__/formatted_field.test.tsx.snap rename to x-pack/plugins/siem/public/components/timeline/body/renderers/__snapshots__/formatted_field.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/__snapshots__/get_column_renderer.test.tsx.snap b/x-pack/plugins/siem/public/components/timeline/body/renderers/__snapshots__/get_column_renderer.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/__snapshots__/get_column_renderer.test.tsx.snap rename to x-pack/plugins/siem/public/components/timeline/body/renderers/__snapshots__/get_column_renderer.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/__snapshots__/get_row_renderer.test.tsx.snap b/x-pack/plugins/siem/public/components/timeline/body/renderers/__snapshots__/get_row_renderer.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/__snapshots__/get_row_renderer.test.tsx.snap rename to x-pack/plugins/siem/public/components/timeline/body/renderers/__snapshots__/get_row_renderer.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/__snapshots__/host_working_dir.test.tsx.snap b/x-pack/plugins/siem/public/components/timeline/body/renderers/__snapshots__/host_working_dir.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/__snapshots__/host_working_dir.test.tsx.snap rename to x-pack/plugins/siem/public/components/timeline/body/renderers/__snapshots__/host_working_dir.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/__snapshots__/plain_column_renderer.test.tsx.snap b/x-pack/plugins/siem/public/components/timeline/body/renderers/__snapshots__/plain_column_renderer.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/__snapshots__/plain_column_renderer.test.tsx.snap rename to x-pack/plugins/siem/public/components/timeline/body/renderers/__snapshots__/plain_column_renderer.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/__snapshots__/plain_row_renderer.test.tsx.snap b/x-pack/plugins/siem/public/components/timeline/body/renderers/__snapshots__/plain_row_renderer.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/__snapshots__/plain_row_renderer.test.tsx.snap rename to x-pack/plugins/siem/public/components/timeline/body/renderers/__snapshots__/plain_row_renderer.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/__snapshots__/process_draggable.test.tsx.snap b/x-pack/plugins/siem/public/components/timeline/body/renderers/__snapshots__/process_draggable.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/__snapshots__/process_draggable.test.tsx.snap rename to x-pack/plugins/siem/public/components/timeline/body/renderers/__snapshots__/process_draggable.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/__snapshots__/unknown_column_renderer.test.tsx.snap b/x-pack/plugins/siem/public/components/timeline/body/renderers/__snapshots__/unknown_column_renderer.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/__snapshots__/unknown_column_renderer.test.tsx.snap rename to x-pack/plugins/siem/public/components/timeline/body/renderers/__snapshots__/unknown_column_renderer.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/__snapshots__/user_host_working_dir.test.tsx.snap b/x-pack/plugins/siem/public/components/timeline/body/renderers/__snapshots__/user_host_working_dir.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/__snapshots__/user_host_working_dir.test.tsx.snap rename to x-pack/plugins/siem/public/components/timeline/body/renderers/__snapshots__/user_host_working_dir.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/args.test.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/args.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/args.test.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/args.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/args.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/args.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/args.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/args.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/auditd/__snapshots__/generic_details.test.tsx.snap b/x-pack/plugins/siem/public/components/timeline/body/renderers/auditd/__snapshots__/generic_details.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/auditd/__snapshots__/generic_details.test.tsx.snap rename to x-pack/plugins/siem/public/components/timeline/body/renderers/auditd/__snapshots__/generic_details.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/auditd/__snapshots__/generic_file_details.test.tsx.snap b/x-pack/plugins/siem/public/components/timeline/body/renderers/auditd/__snapshots__/generic_file_details.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/auditd/__snapshots__/generic_file_details.test.tsx.snap rename to x-pack/plugins/siem/public/components/timeline/body/renderers/auditd/__snapshots__/generic_file_details.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/auditd/__snapshots__/generic_row_renderer.test.tsx.snap b/x-pack/plugins/siem/public/components/timeline/body/renderers/auditd/__snapshots__/generic_row_renderer.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/auditd/__snapshots__/generic_row_renderer.test.tsx.snap rename to x-pack/plugins/siem/public/components/timeline/body/renderers/auditd/__snapshots__/generic_row_renderer.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/auditd/__snapshots__/primary_secondary_user_info.test.tsx.snap b/x-pack/plugins/siem/public/components/timeline/body/renderers/auditd/__snapshots__/primary_secondary_user_info.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/auditd/__snapshots__/primary_secondary_user_info.test.tsx.snap rename to x-pack/plugins/siem/public/components/timeline/body/renderers/auditd/__snapshots__/primary_secondary_user_info.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/auditd/__snapshots__/session_user_host_working_dir.test.tsx.snap b/x-pack/plugins/siem/public/components/timeline/body/renderers/auditd/__snapshots__/session_user_host_working_dir.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/auditd/__snapshots__/session_user_host_working_dir.test.tsx.snap rename to x-pack/plugins/siem/public/components/timeline/body/renderers/auditd/__snapshots__/session_user_host_working_dir.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/auditd/generic_details.test.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/auditd/generic_details.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/auditd/generic_details.test.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/auditd/generic_details.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/auditd/generic_details.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/auditd/generic_details.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/auditd/generic_details.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/auditd/generic_details.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/auditd/generic_file_details.test.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/auditd/generic_file_details.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/auditd/generic_file_details.test.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/auditd/generic_file_details.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/auditd/generic_file_details.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/auditd/generic_file_details.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/auditd/generic_file_details.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/auditd/generic_file_details.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/auditd/generic_row_renderer.test.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/auditd/generic_row_renderer.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/auditd/generic_row_renderer.test.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/auditd/generic_row_renderer.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/auditd/generic_row_renderer.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/auditd/generic_row_renderer.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/auditd/generic_row_renderer.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/auditd/generic_row_renderer.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/auditd/primary_secondary_user_info.test.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/auditd/primary_secondary_user_info.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/auditd/primary_secondary_user_info.test.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/auditd/primary_secondary_user_info.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/auditd/primary_secondary_user_info.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/auditd/primary_secondary_user_info.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/auditd/primary_secondary_user_info.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/auditd/primary_secondary_user_info.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/auditd/session_user_host_working_dir.test.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/auditd/session_user_host_working_dir.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/auditd/session_user_host_working_dir.test.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/auditd/session_user_host_working_dir.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/auditd/session_user_host_working_dir.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/auditd/session_user_host_working_dir.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/auditd/session_user_host_working_dir.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/auditd/session_user_host_working_dir.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/auditd/translations.ts b/x-pack/plugins/siem/public/components/timeline/body/renderers/auditd/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/auditd/translations.ts rename to x-pack/plugins/siem/public/components/timeline/body/renderers/auditd/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/column_renderer.ts b/x-pack/plugins/siem/public/components/timeline/body/renderers/column_renderer.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/column_renderer.ts rename to x-pack/plugins/siem/public/components/timeline/body/renderers/column_renderer.ts diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/constants.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/constants.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/constants.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/constants.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/dns/dns_request_event_details.test.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/dns/dns_request_event_details.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/dns/dns_request_event_details.test.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/dns/dns_request_event_details.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/dns/dns_request_event_details.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/dns/dns_request_event_details.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/dns/dns_request_event_details.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/dns/dns_request_event_details.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/dns/dns_request_event_details_line.test.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/dns/dns_request_event_details_line.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/dns/dns_request_event_details_line.test.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/dns/dns_request_event_details_line.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/dns/dns_request_event_details_line.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/dns/dns_request_event_details_line.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/dns/dns_request_event_details_line.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/dns/dns_request_event_details_line.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/dns/translations.ts b/x-pack/plugins/siem/public/components/timeline/body/renderers/dns/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/dns/translations.ts rename to x-pack/plugins/siem/public/components/timeline/body/renderers/dns/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/empty_column_renderer.test.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/empty_column_renderer.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/empty_column_renderer.test.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/empty_column_renderer.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/empty_column_renderer.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/empty_column_renderer.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/empty_column_renderer.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/empty_column_renderer.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/endgame/endgame_security_event_details.test.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/endgame/endgame_security_event_details.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/endgame/endgame_security_event_details.test.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/endgame/endgame_security_event_details.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/endgame/endgame_security_event_details.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/endgame/endgame_security_event_details.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/endgame/endgame_security_event_details.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/endgame/endgame_security_event_details.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/endgame/endgame_security_event_details_line.test.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/endgame/endgame_security_event_details_line.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/endgame/endgame_security_event_details_line.test.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/endgame/endgame_security_event_details_line.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/endgame/endgame_security_event_details_line.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/endgame/endgame_security_event_details_line.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/endgame/endgame_security_event_details_line.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/endgame/endgame_security_event_details_line.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/endgame/helpers.test.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/endgame/helpers.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/endgame/helpers.test.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/endgame/helpers.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/endgame/helpers.ts b/x-pack/plugins/siem/public/components/timeline/body/renderers/endgame/helpers.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/endgame/helpers.ts rename to x-pack/plugins/siem/public/components/timeline/body/renderers/endgame/helpers.ts diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/endgame/translations.ts b/x-pack/plugins/siem/public/components/timeline/body/renderers/endgame/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/endgame/translations.ts rename to x-pack/plugins/siem/public/components/timeline/body/renderers/endgame/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/exit_code_draggable.test.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/exit_code_draggable.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/exit_code_draggable.test.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/exit_code_draggable.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/exit_code_draggable.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/exit_code_draggable.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/exit_code_draggable.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/exit_code_draggable.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/file_draggable.test.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/file_draggable.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/file_draggable.test.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/file_draggable.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/file_draggable.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/file_draggable.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/file_draggable.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/file_draggable.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/formatted_field.test.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/formatted_field.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/formatted_field.test.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/formatted_field.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/formatted_field.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/formatted_field.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/formatted_field.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/formatted_field.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/formatted_field_helpers.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/formatted_field_helpers.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/formatted_field_helpers.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/formatted_field_helpers.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/get_column_renderer.test.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/get_column_renderer.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/get_column_renderer.test.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/get_column_renderer.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/get_column_renderer.ts b/x-pack/plugins/siem/public/components/timeline/body/renderers/get_column_renderer.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/get_column_renderer.ts rename to x-pack/plugins/siem/public/components/timeline/body/renderers/get_column_renderer.ts diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/get_row_renderer.test.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/get_row_renderer.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/get_row_renderer.test.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/get_row_renderer.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/get_row_renderer.ts b/x-pack/plugins/siem/public/components/timeline/body/renderers/get_row_renderer.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/get_row_renderer.ts rename to x-pack/plugins/siem/public/components/timeline/body/renderers/get_row_renderer.ts diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/helpers.test.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/helpers.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/helpers.test.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/helpers.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/helpers.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/helpers.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/helpers.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/helpers.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/host_working_dir.test.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/host_working_dir.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/host_working_dir.test.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/host_working_dir.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/host_working_dir.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/host_working_dir.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/host_working_dir.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/host_working_dir.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/index.ts b/x-pack/plugins/siem/public/components/timeline/body/renderers/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/index.ts rename to x-pack/plugins/siem/public/components/timeline/body/renderers/index.ts diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/netflow.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/netflow.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/netflow.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/netflow.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/netflow/__snapshots__/netflow_row_renderer.test.tsx.snap b/x-pack/plugins/siem/public/components/timeline/body/renderers/netflow/__snapshots__/netflow_row_renderer.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/netflow/__snapshots__/netflow_row_renderer.test.tsx.snap rename to x-pack/plugins/siem/public/components/timeline/body/renderers/netflow/__snapshots__/netflow_row_renderer.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/netflow/netflow_row_renderer.test.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/netflow/netflow_row_renderer.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/netflow/netflow_row_renderer.test.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/netflow/netflow_row_renderer.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/netflow/netflow_row_renderer.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/netflow/netflow_row_renderer.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/netflow/netflow_row_renderer.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/netflow/netflow_row_renderer.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/parent_process_draggable.test.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/parent_process_draggable.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/parent_process_draggable.test.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/parent_process_draggable.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/parent_process_draggable.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/parent_process_draggable.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/parent_process_draggable.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/parent_process_draggable.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/parse_query_value.test.ts b/x-pack/plugins/siem/public/components/timeline/body/renderers/parse_query_value.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/parse_query_value.test.ts rename to x-pack/plugins/siem/public/components/timeline/body/renderers/parse_query_value.test.ts diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/parse_query_value.ts b/x-pack/plugins/siem/public/components/timeline/body/renderers/parse_query_value.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/parse_query_value.ts rename to x-pack/plugins/siem/public/components/timeline/body/renderers/parse_query_value.ts diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/parse_value.test.ts b/x-pack/plugins/siem/public/components/timeline/body/renderers/parse_value.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/parse_value.test.ts rename to x-pack/plugins/siem/public/components/timeline/body/renderers/parse_value.test.ts diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/parse_value.ts b/x-pack/plugins/siem/public/components/timeline/body/renderers/parse_value.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/parse_value.ts rename to x-pack/plugins/siem/public/components/timeline/body/renderers/parse_value.ts diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/plain_column_renderer.test.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/plain_column_renderer.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/plain_column_renderer.test.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/plain_column_renderer.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/plain_column_renderer.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/plain_column_renderer.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/plain_column_renderer.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/plain_column_renderer.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/plain_row_renderer.test.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/plain_row_renderer.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/plain_row_renderer.test.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/plain_row_renderer.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/plain_row_renderer.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/plain_row_renderer.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/plain_row_renderer.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/plain_row_renderer.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/process_draggable.test.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/process_draggable.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/process_draggable.test.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/process_draggable.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/process_draggable.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/process_draggable.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/process_draggable.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/process_draggable.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/process_hash.test.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/process_hash.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/process_hash.test.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/process_hash.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/process_hash.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/process_hash.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/process_hash.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/process_hash.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/row_renderer.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/row_renderer.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/row_renderer.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/row_renderer.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/suricata/__snapshots__/suricata_details.test.tsx.snap b/x-pack/plugins/siem/public/components/timeline/body/renderers/suricata/__snapshots__/suricata_details.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/suricata/__snapshots__/suricata_details.test.tsx.snap rename to x-pack/plugins/siem/public/components/timeline/body/renderers/suricata/__snapshots__/suricata_details.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/suricata/__snapshots__/suricata_row_renderer.test.tsx.snap b/x-pack/plugins/siem/public/components/timeline/body/renderers/suricata/__snapshots__/suricata_row_renderer.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/suricata/__snapshots__/suricata_row_renderer.test.tsx.snap rename to x-pack/plugins/siem/public/components/timeline/body/renderers/suricata/__snapshots__/suricata_row_renderer.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/suricata/__snapshots__/suricata_signature.test.tsx.snap b/x-pack/plugins/siem/public/components/timeline/body/renderers/suricata/__snapshots__/suricata_signature.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/suricata/__snapshots__/suricata_signature.test.tsx.snap rename to x-pack/plugins/siem/public/components/timeline/body/renderers/suricata/__snapshots__/suricata_signature.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/suricata/suricata_details.test.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/suricata/suricata_details.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/suricata/suricata_details.test.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/suricata/suricata_details.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/suricata/suricata_details.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/suricata/suricata_details.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/suricata/suricata_details.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/suricata/suricata_details.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/suricata/suricata_links.test.ts b/x-pack/plugins/siem/public/components/timeline/body/renderers/suricata/suricata_links.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/suricata/suricata_links.test.ts rename to x-pack/plugins/siem/public/components/timeline/body/renderers/suricata/suricata_links.test.ts diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/suricata/suricata_links.ts b/x-pack/plugins/siem/public/components/timeline/body/renderers/suricata/suricata_links.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/suricata/suricata_links.ts rename to x-pack/plugins/siem/public/components/timeline/body/renderers/suricata/suricata_links.ts diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/suricata/suricata_refs.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/suricata/suricata_refs.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/suricata/suricata_refs.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/suricata/suricata_refs.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/suricata/suricata_row_renderer.test.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/suricata/suricata_row_renderer.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/suricata/suricata_row_renderer.test.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/suricata/suricata_row_renderer.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/suricata/suricata_row_renderer.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/suricata/suricata_row_renderer.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/suricata/suricata_row_renderer.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/suricata/suricata_row_renderer.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/suricata/suricata_signature.test.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/suricata/suricata_signature.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/suricata/suricata_signature.test.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/suricata/suricata_signature.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/suricata/suricata_signature.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/suricata/suricata_signature.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/suricata/suricata_signature.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/suricata/suricata_signature.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/system/__snapshots__/auth_ssh.test.tsx.snap b/x-pack/plugins/siem/public/components/timeline/body/renderers/system/__snapshots__/auth_ssh.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/system/__snapshots__/auth_ssh.test.tsx.snap rename to x-pack/plugins/siem/public/components/timeline/body/renderers/system/__snapshots__/auth_ssh.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/system/__snapshots__/generic_details.test.tsx.snap b/x-pack/plugins/siem/public/components/timeline/body/renderers/system/__snapshots__/generic_details.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/system/__snapshots__/generic_details.test.tsx.snap rename to x-pack/plugins/siem/public/components/timeline/body/renderers/system/__snapshots__/generic_details.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/system/__snapshots__/generic_file_details.test.tsx.snap b/x-pack/plugins/siem/public/components/timeline/body/renderers/system/__snapshots__/generic_file_details.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/system/__snapshots__/generic_file_details.test.tsx.snap rename to x-pack/plugins/siem/public/components/timeline/body/renderers/system/__snapshots__/generic_file_details.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/system/__snapshots__/generic_row_renderer.test.tsx.snap b/x-pack/plugins/siem/public/components/timeline/body/renderers/system/__snapshots__/generic_row_renderer.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/system/__snapshots__/generic_row_renderer.test.tsx.snap rename to x-pack/plugins/siem/public/components/timeline/body/renderers/system/__snapshots__/generic_row_renderer.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/system/__snapshots__/package.test.tsx.snap b/x-pack/plugins/siem/public/components/timeline/body/renderers/system/__snapshots__/package.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/system/__snapshots__/package.test.tsx.snap rename to x-pack/plugins/siem/public/components/timeline/body/renderers/system/__snapshots__/package.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/system/auth_ssh.test.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/system/auth_ssh.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/system/auth_ssh.test.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/system/auth_ssh.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/system/auth_ssh.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/system/auth_ssh.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/system/auth_ssh.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/system/auth_ssh.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/system/generic_details.test.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/system/generic_details.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/system/generic_details.test.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/system/generic_details.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/system/generic_details.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/system/generic_details.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/system/generic_details.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/system/generic_details.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/system/generic_file_details.test.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/system/generic_file_details.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/system/generic_file_details.test.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/system/generic_file_details.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/system/generic_file_details.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/system/generic_file_details.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/system/generic_file_details.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/system/generic_file_details.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/system/generic_row_renderer.test.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/system/generic_row_renderer.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/system/generic_row_renderer.test.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/system/generic_row_renderer.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/system/generic_row_renderer.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/system/generic_row_renderer.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/system/generic_row_renderer.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/system/generic_row_renderer.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/system/package.test.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/system/package.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/system/package.test.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/system/package.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/system/package.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/system/package.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/system/package.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/system/package.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/system/translations.ts b/x-pack/plugins/siem/public/components/timeline/body/renderers/system/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/system/translations.ts rename to x-pack/plugins/siem/public/components/timeline/body/renderers/system/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/translations.ts b/x-pack/plugins/siem/public/components/timeline/body/renderers/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/translations.ts rename to x-pack/plugins/siem/public/components/timeline/body/renderers/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/unknown_column_renderer.test.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/unknown_column_renderer.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/unknown_column_renderer.test.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/unknown_column_renderer.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/unknown_column_renderer.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/unknown_column_renderer.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/unknown_column_renderer.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/unknown_column_renderer.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/user_host_working_dir.test.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/user_host_working_dir.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/user_host_working_dir.test.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/user_host_working_dir.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/user_host_working_dir.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/user_host_working_dir.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/user_host_working_dir.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/user_host_working_dir.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/zeek/__snapshots__/zeek_details.test.tsx.snap b/x-pack/plugins/siem/public/components/timeline/body/renderers/zeek/__snapshots__/zeek_details.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/zeek/__snapshots__/zeek_details.test.tsx.snap rename to x-pack/plugins/siem/public/components/timeline/body/renderers/zeek/__snapshots__/zeek_details.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/zeek/__snapshots__/zeek_row_renderer.test.tsx.snap b/x-pack/plugins/siem/public/components/timeline/body/renderers/zeek/__snapshots__/zeek_row_renderer.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/zeek/__snapshots__/zeek_row_renderer.test.tsx.snap rename to x-pack/plugins/siem/public/components/timeline/body/renderers/zeek/__snapshots__/zeek_row_renderer.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/zeek/__snapshots__/zeek_signature.test.tsx.snap b/x-pack/plugins/siem/public/components/timeline/body/renderers/zeek/__snapshots__/zeek_signature.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/zeek/__snapshots__/zeek_signature.test.tsx.snap rename to x-pack/plugins/siem/public/components/timeline/body/renderers/zeek/__snapshots__/zeek_signature.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/zeek/translations.ts b/x-pack/plugins/siem/public/components/timeline/body/renderers/zeek/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/zeek/translations.ts rename to x-pack/plugins/siem/public/components/timeline/body/renderers/zeek/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/zeek/zeek_details.test.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/zeek/zeek_details.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/zeek/zeek_details.test.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/zeek/zeek_details.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/zeek/zeek_details.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/zeek/zeek_details.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/zeek/zeek_details.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/zeek/zeek_details.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/zeek/zeek_row_renderer.test.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/zeek/zeek_row_renderer.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/zeek/zeek_row_renderer.test.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/zeek/zeek_row_renderer.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/zeek/zeek_row_renderer.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/zeek/zeek_row_renderer.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/zeek/zeek_row_renderer.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/zeek/zeek_row_renderer.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/zeek/zeek_signature.test.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/zeek/zeek_signature.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/zeek/zeek_signature.test.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/zeek/zeek_signature.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/zeek/zeek_signature.tsx b/x-pack/plugins/siem/public/components/timeline/body/renderers/zeek/zeek_signature.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/zeek/zeek_signature.tsx rename to x-pack/plugins/siem/public/components/timeline/body/renderers/zeek/zeek_signature.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/sort/__snapshots__/sort_indicator.test.tsx.snap b/x-pack/plugins/siem/public/components/timeline/body/sort/__snapshots__/sort_indicator.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/sort/__snapshots__/sort_indicator.test.tsx.snap rename to x-pack/plugins/siem/public/components/timeline/body/sort/__snapshots__/sort_indicator.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/sort/index.ts b/x-pack/plugins/siem/public/components/timeline/body/sort/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/sort/index.ts rename to x-pack/plugins/siem/public/components/timeline/body/sort/index.ts diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/sort/sort_indicator.test.tsx b/x-pack/plugins/siem/public/components/timeline/body/sort/sort_indicator.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/sort/sort_indicator.test.tsx rename to x-pack/plugins/siem/public/components/timeline/body/sort/sort_indicator.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/sort/sort_indicator.tsx b/x-pack/plugins/siem/public/components/timeline/body/sort/sort_indicator.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/sort/sort_indicator.tsx rename to x-pack/plugins/siem/public/components/timeline/body/sort/sort_indicator.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/stateful_body.test.tsx b/x-pack/plugins/siem/public/components/timeline/body/stateful_body.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/stateful_body.test.tsx rename to x-pack/plugins/siem/public/components/timeline/body/stateful_body.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/stateful_body.tsx b/x-pack/plugins/siem/public/components/timeline/body/stateful_body.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/stateful_body.tsx rename to x-pack/plugins/siem/public/components/timeline/body/stateful_body.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/translations.ts b/x-pack/plugins/siem/public/components/timeline/body/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/body/translations.ts rename to x-pack/plugins/siem/public/components/timeline/body/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/data_providers/__snapshots__/data_providers.test.tsx.snap b/x-pack/plugins/siem/public/components/timeline/data_providers/__snapshots__/data_providers.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/data_providers/__snapshots__/data_providers.test.tsx.snap rename to x-pack/plugins/siem/public/components/timeline/data_providers/__snapshots__/data_providers.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/data_providers/__snapshots__/empty.test.tsx.snap b/x-pack/plugins/siem/public/components/timeline/data_providers/__snapshots__/empty.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/data_providers/__snapshots__/empty.test.tsx.snap rename to x-pack/plugins/siem/public/components/timeline/data_providers/__snapshots__/empty.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/data_providers/__snapshots__/provider.test.tsx.snap b/x-pack/plugins/siem/public/components/timeline/data_providers/__snapshots__/provider.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/data_providers/__snapshots__/provider.test.tsx.snap rename to x-pack/plugins/siem/public/components/timeline/data_providers/__snapshots__/provider.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/data_providers/__snapshots__/providers.test.tsx.snap b/x-pack/plugins/siem/public/components/timeline/data_providers/__snapshots__/providers.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/data_providers/__snapshots__/providers.test.tsx.snap rename to x-pack/plugins/siem/public/components/timeline/data_providers/__snapshots__/providers.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/data_providers/data_provider.ts b/x-pack/plugins/siem/public/components/timeline/data_providers/data_provider.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/data_providers/data_provider.ts rename to x-pack/plugins/siem/public/components/timeline/data_providers/data_provider.ts diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/data_providers/data_providers.test.tsx b/x-pack/plugins/siem/public/components/timeline/data_providers/data_providers.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/data_providers/data_providers.test.tsx rename to x-pack/plugins/siem/public/components/timeline/data_providers/data_providers.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/data_providers/empty.test.tsx b/x-pack/plugins/siem/public/components/timeline/data_providers/empty.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/data_providers/empty.test.tsx rename to x-pack/plugins/siem/public/components/timeline/data_providers/empty.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/data_providers/empty.tsx b/x-pack/plugins/siem/public/components/timeline/data_providers/empty.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/data_providers/empty.tsx rename to x-pack/plugins/siem/public/components/timeline/data_providers/empty.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/data_providers/index.tsx b/x-pack/plugins/siem/public/components/timeline/data_providers/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/data_providers/index.tsx rename to x-pack/plugins/siem/public/components/timeline/data_providers/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/data_providers/mock/mock_data_providers.tsx b/x-pack/plugins/siem/public/components/timeline/data_providers/mock/mock_data_providers.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/data_providers/mock/mock_data_providers.tsx rename to x-pack/plugins/siem/public/components/timeline/data_providers/mock/mock_data_providers.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/data_providers/provider.test.tsx b/x-pack/plugins/siem/public/components/timeline/data_providers/provider.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/data_providers/provider.test.tsx rename to x-pack/plugins/siem/public/components/timeline/data_providers/provider.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/data_providers/provider.tsx b/x-pack/plugins/siem/public/components/timeline/data_providers/provider.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/data_providers/provider.tsx rename to x-pack/plugins/siem/public/components/timeline/data_providers/provider.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/data_providers/provider_badge.tsx b/x-pack/plugins/siem/public/components/timeline/data_providers/provider_badge.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/data_providers/provider_badge.tsx rename to x-pack/plugins/siem/public/components/timeline/data_providers/provider_badge.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/data_providers/provider_item_actions.tsx b/x-pack/plugins/siem/public/components/timeline/data_providers/provider_item_actions.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/data_providers/provider_item_actions.tsx rename to x-pack/plugins/siem/public/components/timeline/data_providers/provider_item_actions.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/data_providers/provider_item_and.tsx b/x-pack/plugins/siem/public/components/timeline/data_providers/provider_item_and.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/data_providers/provider_item_and.tsx rename to x-pack/plugins/siem/public/components/timeline/data_providers/provider_item_and.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/data_providers/provider_item_and_drag_drop.tsx b/x-pack/plugins/siem/public/components/timeline/data_providers/provider_item_and_drag_drop.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/data_providers/provider_item_and_drag_drop.tsx rename to x-pack/plugins/siem/public/components/timeline/data_providers/provider_item_and_drag_drop.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/data_providers/provider_item_badge.tsx b/x-pack/plugins/siem/public/components/timeline/data_providers/provider_item_badge.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/data_providers/provider_item_badge.tsx rename to x-pack/plugins/siem/public/components/timeline/data_providers/provider_item_badge.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/data_providers/providers.test.tsx b/x-pack/plugins/siem/public/components/timeline/data_providers/providers.test.tsx similarity index 99% rename from x-pack/legacy/plugins/siem/public/components/timeline/data_providers/providers.test.tsx rename to x-pack/plugins/siem/public/components/timeline/data_providers/providers.test.tsx index a4de8ffa3b9c5a..0c8a6932adf91e 100644 --- a/x-pack/legacy/plugins/siem/public/components/timeline/data_providers/providers.test.tsx +++ b/x-pack/plugins/siem/public/components/timeline/data_providers/providers.test.tsx @@ -10,7 +10,7 @@ import React from 'react'; import { createKibanaCoreStartMock } from '../../../mock/kibana_core'; import { TestProviders } from '../../../mock/test_providers'; import { DroppableWrapper } from '../../drag_and_drop/droppable_wrapper'; -import { FilterManager } from '../../../../../../../../src/plugins/data/public'; +import { FilterManager } from '../../../../../../../src/plugins/data/public'; import { TimelineContext } from '../timeline_context'; import { mockDataProviders } from './mock/mock_data_providers'; diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/data_providers/providers.tsx b/x-pack/plugins/siem/public/components/timeline/data_providers/providers.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/data_providers/providers.tsx rename to x-pack/plugins/siem/public/components/timeline/data_providers/providers.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/data_providers/translations.ts b/x-pack/plugins/siem/public/components/timeline/data_providers/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/data_providers/translations.ts rename to x-pack/plugins/siem/public/components/timeline/data_providers/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/events.ts b/x-pack/plugins/siem/public/components/timeline/events.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/events.ts rename to x-pack/plugins/siem/public/components/timeline/events.ts diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/expandable_event/index.tsx b/x-pack/plugins/siem/public/components/timeline/expandable_event/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/expandable_event/index.tsx rename to x-pack/plugins/siem/public/components/timeline/expandable_event/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/expandable_event/translations.tsx b/x-pack/plugins/siem/public/components/timeline/expandable_event/translations.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/expandable_event/translations.tsx rename to x-pack/plugins/siem/public/components/timeline/expandable_event/translations.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/fetch_kql_timeline.tsx b/x-pack/plugins/siem/public/components/timeline/fetch_kql_timeline.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/fetch_kql_timeline.tsx rename to x-pack/plugins/siem/public/components/timeline/fetch_kql_timeline.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/footer/__snapshots__/index.test.tsx.snap b/x-pack/plugins/siem/public/components/timeline/footer/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/footer/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/siem/public/components/timeline/footer/__snapshots__/index.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/footer/index.test.tsx b/x-pack/plugins/siem/public/components/timeline/footer/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/footer/index.test.tsx rename to x-pack/plugins/siem/public/components/timeline/footer/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/footer/index.tsx b/x-pack/plugins/siem/public/components/timeline/footer/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/footer/index.tsx rename to x-pack/plugins/siem/public/components/timeline/footer/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/footer/last_updated.tsx b/x-pack/plugins/siem/public/components/timeline/footer/last_updated.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/footer/last_updated.tsx rename to x-pack/plugins/siem/public/components/timeline/footer/last_updated.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/footer/mock.ts b/x-pack/plugins/siem/public/components/timeline/footer/mock.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/footer/mock.ts rename to x-pack/plugins/siem/public/components/timeline/footer/mock.ts diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/footer/translations.ts b/x-pack/plugins/siem/public/components/timeline/footer/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/footer/translations.ts rename to x-pack/plugins/siem/public/components/timeline/footer/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/header/__snapshots__/index.test.tsx.snap b/x-pack/plugins/siem/public/components/timeline/header/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/header/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/siem/public/components/timeline/header/__snapshots__/index.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/header/index.test.tsx b/x-pack/plugins/siem/public/components/timeline/header/index.test.tsx similarity index 97% rename from x-pack/legacy/plugins/siem/public/components/timeline/header/index.test.tsx rename to x-pack/plugins/siem/public/components/timeline/header/index.test.tsx index c43c69da64ba40..6f2053488f69bb 100644 --- a/x-pack/legacy/plugins/siem/public/components/timeline/header/index.test.tsx +++ b/x-pack/plugins/siem/public/components/timeline/header/index.test.tsx @@ -10,7 +10,7 @@ import React from 'react'; import { mockIndexPattern } from '../../../mock'; import { createKibanaCoreStartMock } from '../../../mock/kibana_core'; import { TestProviders } from '../../../mock/test_providers'; -import { FilterManager } from '../../../../../../../../src/plugins/data/public'; +import { FilterManager } from '../../../../../../../src/plugins/data/public'; import { mockDataProviders } from '../data_providers/mock/mock_data_providers'; import { useMountAppended } from '../../../utils/use_mount_appended'; diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/header/index.tsx b/x-pack/plugins/siem/public/components/timeline/header/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/header/index.tsx rename to x-pack/plugins/siem/public/components/timeline/header/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/header/translations.ts b/x-pack/plugins/siem/public/components/timeline/header/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/header/translations.ts rename to x-pack/plugins/siem/public/components/timeline/header/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/helpers.test.tsx b/x-pack/plugins/siem/public/components/timeline/helpers.test.tsx similarity index 99% rename from x-pack/legacy/plugins/siem/public/components/timeline/helpers.test.tsx rename to x-pack/plugins/siem/public/components/timeline/helpers.test.tsx index 9fd71f071ec600..fc5a8ae924f828 100644 --- a/x-pack/legacy/plugins/siem/public/components/timeline/helpers.test.tsx +++ b/x-pack/plugins/siem/public/components/timeline/helpers.test.tsx @@ -10,7 +10,7 @@ import { mockIndexPattern } from '../../mock'; import { mockDataProviders } from './data_providers/mock/mock_data_providers'; import { buildGlobalQuery, combineQueries } from './helpers'; import { mockBrowserFields } from '../../containers/source/mock'; -import { EsQueryConfig, Filter, esFilters } from '../../../../../../../src/plugins/data/public'; +import { EsQueryConfig, Filter, esFilters } from '../../../../../../src/plugins/data/public'; const cleanUpKqlQuery = (str: string) => str.replace(/\n/g, '').replace(/\s\s+/g, ' '); const startDate = new Date('2018-03-23T18:49:23.132Z').valueOf(); diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/helpers.tsx b/x-pack/plugins/siem/public/components/timeline/helpers.tsx similarity index 99% rename from x-pack/legacy/plugins/siem/public/components/timeline/helpers.tsx rename to x-pack/plugins/siem/public/components/timeline/helpers.tsx index f051bbe5b1af6a..53ab7d81cadc26 100644 --- a/x-pack/legacy/plugins/siem/public/components/timeline/helpers.tsx +++ b/x-pack/plugins/siem/public/components/timeline/helpers.tsx @@ -16,7 +16,7 @@ import { Query, EsQueryConfig, Filter, -} from '../../../../../../../src/plugins/data/public'; +} from '../../../../../../src/plugins/data/public'; const convertDateFieldToQuery = (field: string, value: string | number) => `${field}: ${isNumber(value) ? value : new Date(value).valueOf()}`; diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/index.tsx b/x-pack/plugins/siem/public/components/timeline/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/index.tsx rename to x-pack/plugins/siem/public/components/timeline/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/insert_timeline_popover/index.test.tsx b/x-pack/plugins/siem/public/components/timeline/insert_timeline_popover/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/insert_timeline_popover/index.test.tsx rename to x-pack/plugins/siem/public/components/timeline/insert_timeline_popover/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/insert_timeline_popover/index.tsx b/x-pack/plugins/siem/public/components/timeline/insert_timeline_popover/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/insert_timeline_popover/index.tsx rename to x-pack/plugins/siem/public/components/timeline/insert_timeline_popover/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/insert_timeline_popover/use_insert_timeline.tsx b/x-pack/plugins/siem/public/components/timeline/insert_timeline_popover/use_insert_timeline.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/insert_timeline_popover/use_insert_timeline.tsx rename to x-pack/plugins/siem/public/components/timeline/insert_timeline_popover/use_insert_timeline.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/properties/helpers.tsx b/x-pack/plugins/siem/public/components/timeline/properties/helpers.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/properties/helpers.tsx rename to x-pack/plugins/siem/public/components/timeline/properties/helpers.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/properties/index.test.tsx b/x-pack/plugins/siem/public/components/timeline/properties/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/properties/index.test.tsx rename to x-pack/plugins/siem/public/components/timeline/properties/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/properties/index.tsx b/x-pack/plugins/siem/public/components/timeline/properties/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/properties/index.tsx rename to x-pack/plugins/siem/public/components/timeline/properties/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/properties/notes_size.ts b/x-pack/plugins/siem/public/components/timeline/properties/notes_size.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/properties/notes_size.ts rename to x-pack/plugins/siem/public/components/timeline/properties/notes_size.ts diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/properties/properties_left.tsx b/x-pack/plugins/siem/public/components/timeline/properties/properties_left.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/properties/properties_left.tsx rename to x-pack/plugins/siem/public/components/timeline/properties/properties_left.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/properties/properties_right.tsx b/x-pack/plugins/siem/public/components/timeline/properties/properties_right.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/properties/properties_right.tsx rename to x-pack/plugins/siem/public/components/timeline/properties/properties_right.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/properties/styles.tsx b/x-pack/plugins/siem/public/components/timeline/properties/styles.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/properties/styles.tsx rename to x-pack/plugins/siem/public/components/timeline/properties/styles.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/properties/translations.ts b/x-pack/plugins/siem/public/components/timeline/properties/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/properties/translations.ts rename to x-pack/plugins/siem/public/components/timeline/properties/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/query_bar/index.test.tsx b/x-pack/plugins/siem/public/components/timeline/query_bar/index.test.tsx similarity index 98% rename from x-pack/legacy/plugins/siem/public/components/timeline/query_bar/index.test.tsx rename to x-pack/plugins/siem/public/components/timeline/query_bar/index.test.tsx index a49f6cc930abda..a78e5b8e1d2264 100644 --- a/x-pack/legacy/plugins/siem/public/components/timeline/query_bar/index.test.tsx +++ b/x-pack/plugins/siem/public/components/timeline/query_bar/index.test.tsx @@ -7,13 +7,13 @@ import { mount } from 'enzyme'; import React from 'react'; -import { DEFAULT_FROM, DEFAULT_TO } from '../../../../../../../plugins/siem/common/constants'; +import { DEFAULT_FROM, DEFAULT_TO } from '../../../../common/constants'; import { mockBrowserFields } from '../../../containers/source/mock'; import { convertKueryToElasticSearchQuery } from '../../../lib/keury'; import { mockIndexPattern, TestProviders } from '../../../mock'; import { createKibanaCoreStartMock } from '../../../mock/kibana_core'; import { QueryBar } from '../../query_bar'; -import { FilterManager } from '../../../../../../../../src/plugins/data/public'; +import { FilterManager } from '../../../../../../../src/plugins/data/public'; import { mockDataProviders } from '../data_providers/mock/mock_data_providers'; import { buildGlobalQuery } from '../helpers'; diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/query_bar/index.tsx b/x-pack/plugins/siem/public/components/timeline/query_bar/index.tsx similarity index 99% rename from x-pack/legacy/plugins/siem/public/components/timeline/query_bar/index.tsx rename to x-pack/plugins/siem/public/components/timeline/query_bar/index.tsx index f53f7bb56e2f40..7d2b4f71183dde 100644 --- a/x-pack/legacy/plugins/siem/public/components/timeline/query_bar/index.tsx +++ b/x-pack/plugins/siem/public/components/timeline/query_bar/index.tsx @@ -17,7 +17,7 @@ import { FilterManager, SavedQuery, SavedQueryTimeFilter, -} from '../../../../../../../../src/plugins/data/public'; +} from '../../../../../../../src/plugins/data/public'; import { BrowserFields } from '../../../containers/source'; import { convertKueryToElasticSearchQuery } from '../../../lib/keury'; diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/refetch_timeline.tsx b/x-pack/plugins/siem/public/components/timeline/refetch_timeline.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/refetch_timeline.tsx rename to x-pack/plugins/siem/public/components/timeline/refetch_timeline.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/search_or_filter/helpers.test.tsx b/x-pack/plugins/siem/public/components/timeline/search_or_filter/helpers.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/search_or_filter/helpers.test.tsx rename to x-pack/plugins/siem/public/components/timeline/search_or_filter/helpers.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/search_or_filter/helpers.tsx b/x-pack/plugins/siem/public/components/timeline/search_or_filter/helpers.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/search_or_filter/helpers.tsx rename to x-pack/plugins/siem/public/components/timeline/search_or_filter/helpers.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/search_or_filter/index.tsx b/x-pack/plugins/siem/public/components/timeline/search_or_filter/index.tsx similarity index 98% rename from x-pack/legacy/plugins/siem/public/components/timeline/search_or_filter/index.tsx rename to x-pack/plugins/siem/public/components/timeline/search_or_filter/index.tsx index a0a0ac4c2b85c0..fa92ef9ce59652 100644 --- a/x-pack/legacy/plugins/siem/public/components/timeline/search_or_filter/index.tsx +++ b/x-pack/plugins/siem/public/components/timeline/search_or_filter/index.tsx @@ -10,11 +10,7 @@ import { connect, ConnectedProps } from 'react-redux'; import { Dispatch } from 'redux'; import deepEqual from 'fast-deep-equal'; -import { - Filter, - FilterManager, - IIndexPattern, -} from '../../../../../../../../src/plugins/data/public'; +import { Filter, FilterManager, IIndexPattern } from '../../../../../../../src/plugins/data/public'; import { BrowserFields } from '../../../containers/source'; import { convertKueryToElasticSearchQuery } from '../../../lib/keury'; import { diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/search_or_filter/pick_events.tsx b/x-pack/plugins/siem/public/components/timeline/search_or_filter/pick_events.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/search_or_filter/pick_events.tsx rename to x-pack/plugins/siem/public/components/timeline/search_or_filter/pick_events.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/search_or_filter/search_or_filter.tsx b/x-pack/plugins/siem/public/components/timeline/search_or_filter/search_or_filter.tsx similarity index 97% rename from x-pack/legacy/plugins/siem/public/components/timeline/search_or_filter/search_or_filter.tsx rename to x-pack/plugins/siem/public/components/timeline/search_or_filter/search_or_filter.tsx index 02a575db259bbe..0b8ed71135744f 100644 --- a/x-pack/legacy/plugins/siem/public/components/timeline/search_or_filter/search_or_filter.tsx +++ b/x-pack/plugins/siem/public/components/timeline/search_or_filter/search_or_filter.tsx @@ -8,11 +8,7 @@ import { EuiFlexGroup, EuiFlexItem, EuiSuperSelect, EuiToolTip } from '@elastic/ import React from 'react'; import styled, { createGlobalStyle } from 'styled-components'; -import { - Filter, - FilterManager, - IIndexPattern, -} from '../../../../../../../../src/plugins/data/public'; +import { Filter, FilterManager, IIndexPattern } from '../../../../../../../src/plugins/data/public'; import { BrowserFields } from '../../../containers/source'; import { KueryFilterQuery, KueryFilterQueryKind } from '../../../store'; import { KqlMode, EventType } from '../../../store/timeline/model'; diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/search_or_filter/translations.ts b/x-pack/plugins/siem/public/components/timeline/search_or_filter/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/search_or_filter/translations.ts rename to x-pack/plugins/siem/public/components/timeline/search_or_filter/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/search_super_select/index.tsx b/x-pack/plugins/siem/public/components/timeline/search_super_select/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/search_super_select/index.tsx rename to x-pack/plugins/siem/public/components/timeline/search_super_select/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/selectable_timeline/index.tsx b/x-pack/plugins/siem/public/components/timeline/selectable_timeline/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/selectable_timeline/index.tsx rename to x-pack/plugins/siem/public/components/timeline/selectable_timeline/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/styles.tsx b/x-pack/plugins/siem/public/components/timeline/styles.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/styles.tsx rename to x-pack/plugins/siem/public/components/timeline/styles.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/timeline.test.tsx b/x-pack/plugins/siem/public/components/timeline/timeline.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/timeline.test.tsx rename to x-pack/plugins/siem/public/components/timeline/timeline.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/timeline.tsx b/x-pack/plugins/siem/public/components/timeline/timeline.tsx similarity index 99% rename from x-pack/legacy/plugins/siem/public/components/timeline/timeline.tsx rename to x-pack/plugins/siem/public/components/timeline/timeline.tsx index 222cc0530bddbd..10f10b1a86f1ec 100644 --- a/x-pack/legacy/plugins/siem/public/components/timeline/timeline.tsx +++ b/x-pack/plugins/siem/public/components/timeline/timeline.tsx @@ -39,7 +39,7 @@ import { Filter, FilterManager, IIndexPattern, -} from '../../../../../../../src/plugins/data/public'; +} from '../../../../../../src/plugins/data/public'; const TimelineContainer = styled.div` height: 100%; diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/timeline_context.tsx b/x-pack/plugins/siem/public/components/timeline/timeline_context.tsx similarity index 97% rename from x-pack/legacy/plugins/siem/public/components/timeline/timeline_context.tsx rename to x-pack/plugins/siem/public/components/timeline/timeline_context.tsx index 7c1eadd8e8beda..25a0078b6066a6 100644 --- a/x-pack/legacy/plugins/siem/public/components/timeline/timeline_context.tsx +++ b/x-pack/plugins/siem/public/components/timeline/timeline_context.tsx @@ -6,7 +6,7 @@ import React, { createContext, memo, useContext, useEffect, useState } from 'react'; -import { FilterManager } from '../../../../../../../src/plugins/data/public'; +import { FilterManager } from '../../../../../../src/plugins/data/public'; import { TimelineAction } from './body/actions'; diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/translations.ts b/x-pack/plugins/siem/public/components/timeline/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/timeline/translations.ts rename to x-pack/plugins/siem/public/components/timeline/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/toasters/__snapshots__/modal_all_errors.test.tsx.snap b/x-pack/plugins/siem/public/components/toasters/__snapshots__/modal_all_errors.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/toasters/__snapshots__/modal_all_errors.test.tsx.snap rename to x-pack/plugins/siem/public/components/toasters/__snapshots__/modal_all_errors.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/toasters/errors.ts b/x-pack/plugins/siem/public/components/toasters/errors.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/toasters/errors.ts rename to x-pack/plugins/siem/public/components/toasters/errors.ts diff --git a/x-pack/legacy/plugins/siem/public/components/toasters/index.test.tsx b/x-pack/plugins/siem/public/components/toasters/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/toasters/index.test.tsx rename to x-pack/plugins/siem/public/components/toasters/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/toasters/index.tsx b/x-pack/plugins/siem/public/components/toasters/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/toasters/index.tsx rename to x-pack/plugins/siem/public/components/toasters/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/toasters/modal_all_errors.test.tsx b/x-pack/plugins/siem/public/components/toasters/modal_all_errors.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/toasters/modal_all_errors.test.tsx rename to x-pack/plugins/siem/public/components/toasters/modal_all_errors.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/toasters/modal_all_errors.tsx b/x-pack/plugins/siem/public/components/toasters/modal_all_errors.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/toasters/modal_all_errors.tsx rename to x-pack/plugins/siem/public/components/toasters/modal_all_errors.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/toasters/translations.ts b/x-pack/plugins/siem/public/components/toasters/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/toasters/translations.ts rename to x-pack/plugins/siem/public/components/toasters/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/toasters/utils.test.ts b/x-pack/plugins/siem/public/components/toasters/utils.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/toasters/utils.test.ts rename to x-pack/plugins/siem/public/components/toasters/utils.test.ts diff --git a/x-pack/legacy/plugins/siem/public/components/toasters/utils.ts b/x-pack/plugins/siem/public/components/toasters/utils.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/toasters/utils.ts rename to x-pack/plugins/siem/public/components/toasters/utils.ts diff --git a/x-pack/legacy/plugins/siem/public/components/top_n/helpers.test.tsx b/x-pack/plugins/siem/public/components/top_n/helpers.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/top_n/helpers.test.tsx rename to x-pack/plugins/siem/public/components/top_n/helpers.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/top_n/helpers.ts b/x-pack/plugins/siem/public/components/top_n/helpers.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/top_n/helpers.ts rename to x-pack/plugins/siem/public/components/top_n/helpers.ts diff --git a/x-pack/legacy/plugins/siem/public/components/top_n/index.test.tsx b/x-pack/plugins/siem/public/components/top_n/index.test.tsx similarity index 99% rename from x-pack/legacy/plugins/siem/public/components/top_n/index.test.tsx rename to x-pack/plugins/siem/public/components/top_n/index.test.tsx index 61772f1dc7a7ab..9325dcf499b2b4 100644 --- a/x-pack/legacy/plugins/siem/public/components/top_n/index.test.tsx +++ b/x-pack/plugins/siem/public/components/top_n/index.test.tsx @@ -10,7 +10,7 @@ import React from 'react'; import { mockBrowserFields } from '../../containers/source/mock'; import { apolloClientObservable, mockGlobalState, TestProviders } from '../../mock'; import { createKibanaCoreStartMock } from '../../mock/kibana_core'; -import { FilterManager } from '../../../../../../../src/plugins/data/public'; +import { FilterManager } from '../../../../../../src/plugins/data/public'; import { createStore, State } from '../../store'; import { TimelineContext, TimelineTypeContext } from '../timeline/timeline_context'; diff --git a/x-pack/legacy/plugins/siem/public/components/top_n/index.tsx b/x-pack/plugins/siem/public/components/top_n/index.tsx similarity index 98% rename from x-pack/legacy/plugins/siem/public/components/top_n/index.tsx rename to x-pack/plugins/siem/public/components/top_n/index.tsx index 983b234a04eaad..9863df42f101d3 100644 --- a/x-pack/legacy/plugins/siem/public/components/top_n/index.tsx +++ b/x-pack/plugins/siem/public/components/top_n/index.tsx @@ -10,7 +10,7 @@ import { connect, ConnectedProps } from 'react-redux'; import { GlobalTime } from '../../containers/global_time'; import { BrowserFields, WithSource } from '../../containers/source'; import { useKibana } from '../../lib/kibana'; -import { esQuery, Filter, Query } from '../../../../../../../src/plugins/data/public'; +import { esQuery, Filter, Query } from '../../../../../../src/plugins/data/public'; import { inputsModel, inputsSelectors, State, timelineSelectors } from '../../store'; import { setAbsoluteRangeDatePicker as dispatchSetAbsoluteRangeDatePicker } from '../../store/inputs/actions'; import { timelineDefaults } from '../../store/timeline/defaults'; diff --git a/x-pack/legacy/plugins/siem/public/components/top_n/top_n.test.tsx b/x-pack/plugins/siem/public/components/top_n/top_n.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/top_n/top_n.test.tsx rename to x-pack/plugins/siem/public/components/top_n/top_n.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/top_n/top_n.tsx b/x-pack/plugins/siem/public/components/top_n/top_n.tsx similarity index 99% rename from x-pack/legacy/plugins/siem/public/components/top_n/top_n.tsx rename to x-pack/plugins/siem/public/components/top_n/top_n.tsx index 136252617e2a26..d8dc63ef92ec60 100644 --- a/x-pack/legacy/plugins/siem/public/components/top_n/top_n.tsx +++ b/x-pack/plugins/siem/public/components/top_n/top_n.tsx @@ -11,7 +11,7 @@ import { ActionCreator } from 'typescript-fsa'; import { EventsByDataset } from '../../pages/overview/events_by_dataset'; import { SignalsByCategory } from '../../pages/overview/signals_by_category'; -import { Filter, IIndexPattern, Query } from '../../../../../../../src/plugins/data/public'; +import { Filter, IIndexPattern, Query } from '../../../../../../src/plugins/data/public'; import { inputsModel } from '../../store'; import { InputsModelId } from '../../store/inputs/constants'; import { EventType } from '../../store/timeline/model'; diff --git a/x-pack/legacy/plugins/siem/public/components/top_n/translations.ts b/x-pack/plugins/siem/public/components/top_n/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/top_n/translations.ts rename to x-pack/plugins/siem/public/components/top_n/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/components/truncatable_text/__snapshots__/index.test.tsx.snap b/x-pack/plugins/siem/public/components/truncatable_text/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/truncatable_text/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/siem/public/components/truncatable_text/__snapshots__/index.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/truncatable_text/index.test.tsx b/x-pack/plugins/siem/public/components/truncatable_text/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/truncatable_text/index.test.tsx rename to x-pack/plugins/siem/public/components/truncatable_text/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/truncatable_text/index.tsx b/x-pack/plugins/siem/public/components/truncatable_text/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/truncatable_text/index.tsx rename to x-pack/plugins/siem/public/components/truncatable_text/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/url_state/constants.ts b/x-pack/plugins/siem/public/components/url_state/constants.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/url_state/constants.ts rename to x-pack/plugins/siem/public/components/url_state/constants.ts diff --git a/x-pack/legacy/plugins/siem/public/components/url_state/helpers.test.ts b/x-pack/plugins/siem/public/components/url_state/helpers.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/url_state/helpers.test.ts rename to x-pack/plugins/siem/public/components/url_state/helpers.test.ts diff --git a/x-pack/legacy/plugins/siem/public/components/url_state/helpers.ts b/x-pack/plugins/siem/public/components/url_state/helpers.ts similarity index 98% rename from x-pack/legacy/plugins/siem/public/components/url_state/helpers.ts rename to x-pack/plugins/siem/public/components/url_state/helpers.ts index b30244e57d0f1a..62196b90e5e6f2 100644 --- a/x-pack/legacy/plugins/siem/public/components/url_state/helpers.ts +++ b/x-pack/plugins/siem/public/components/url_state/helpers.ts @@ -9,8 +9,8 @@ import { parse, stringify } from 'query-string'; import { decode, encode } from 'rison-node'; import * as H from 'history'; -import { Query, Filter } from '../../../../../../../src/plugins/data/public'; -import { url } from '../../../../../../../src/plugins/kibana_utils/public'; +import { Query, Filter } from '../../../../../../src/plugins/data/public'; +import { url } from '../../../../../../src/plugins/kibana_utils/public'; import { SiemPageName } from '../../pages/home/types'; import { inputsSelectors, State, timelineSelectors } from '../../store'; diff --git a/x-pack/legacy/plugins/siem/public/components/url_state/index.test.tsx b/x-pack/plugins/siem/public/components/url_state/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/url_state/index.test.tsx rename to x-pack/plugins/siem/public/components/url_state/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/url_state/index.tsx b/x-pack/plugins/siem/public/components/url_state/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/url_state/index.tsx rename to x-pack/plugins/siem/public/components/url_state/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/url_state/index_mocked.test.tsx b/x-pack/plugins/siem/public/components/url_state/index_mocked.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/url_state/index_mocked.test.tsx rename to x-pack/plugins/siem/public/components/url_state/index_mocked.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/url_state/initialize_redux_by_url.tsx b/x-pack/plugins/siem/public/components/url_state/initialize_redux_by_url.tsx similarity index 98% rename from x-pack/legacy/plugins/siem/public/components/url_state/initialize_redux_by_url.tsx rename to x-pack/plugins/siem/public/components/url_state/initialize_redux_by_url.tsx index 4838fb4499b87e..54a196d1b81617 100644 --- a/x-pack/legacy/plugins/siem/public/components/url_state/initialize_redux_by_url.tsx +++ b/x-pack/plugins/siem/public/components/url_state/initialize_redux_by_url.tsx @@ -7,7 +7,7 @@ import { get, isEmpty } from 'lodash/fp'; import { Dispatch } from 'redux'; -import { Query, Filter } from '../../../../../../../src/plugins/data/public'; +import { Query, Filter } from '../../../../../../src/plugins/data/public'; import { inputsActions } from '../../store/actions'; import { InputsModelId, TimeRangeKinds } from '../../store/inputs/constants'; import { diff --git a/x-pack/legacy/plugins/siem/public/components/url_state/normalize_time_range.test.ts b/x-pack/plugins/siem/public/components/url_state/normalize_time_range.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/url_state/normalize_time_range.test.ts rename to x-pack/plugins/siem/public/components/url_state/normalize_time_range.test.ts diff --git a/x-pack/legacy/plugins/siem/public/components/url_state/normalize_time_range.ts b/x-pack/plugins/siem/public/components/url_state/normalize_time_range.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/url_state/normalize_time_range.ts rename to x-pack/plugins/siem/public/components/url_state/normalize_time_range.ts diff --git a/x-pack/legacy/plugins/siem/public/components/url_state/test_dependencies.ts b/x-pack/plugins/siem/public/components/url_state/test_dependencies.ts similarity index 99% rename from x-pack/legacy/plugins/siem/public/components/url_state/test_dependencies.ts rename to x-pack/plugins/siem/public/components/url_state/test_dependencies.ts index dc1b8d428bb20d..974bee53bc2ba0 100644 --- a/x-pack/legacy/plugins/siem/public/components/url_state/test_dependencies.ts +++ b/x-pack/plugins/siem/public/components/url_state/test_dependencies.ts @@ -15,7 +15,7 @@ import { HostsTableType } from '../../store/hosts/model'; import { CONSTANTS } from './constants'; import { dispatchSetInitialStateFromUrl } from './initialize_redux_by_url'; import { UrlStateContainerPropTypes, LocationTypes } from './types'; -import { Query } from '../../../../../../../src/plugins/data/public'; +import { Query } from '../../../../../../src/plugins/data/public'; type Action = 'PUSH' | 'POP' | 'REPLACE'; const pop: Action = 'POP'; diff --git a/x-pack/legacy/plugins/siem/public/components/url_state/types.ts b/x-pack/plugins/siem/public/components/url_state/types.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/url_state/types.ts rename to x-pack/plugins/siem/public/components/url_state/types.ts diff --git a/x-pack/legacy/plugins/siem/public/components/url_state/use_url_state.tsx b/x-pack/plugins/siem/public/components/url_state/use_url_state.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/url_state/use_url_state.tsx rename to x-pack/plugins/siem/public/components/url_state/use_url_state.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/utility_bar/__snapshots__/utility_bar.test.tsx.snap b/x-pack/plugins/siem/public/components/utility_bar/__snapshots__/utility_bar.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/utility_bar/__snapshots__/utility_bar.test.tsx.snap rename to x-pack/plugins/siem/public/components/utility_bar/__snapshots__/utility_bar.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/utility_bar/__snapshots__/utility_bar_action.test.tsx.snap b/x-pack/plugins/siem/public/components/utility_bar/__snapshots__/utility_bar_action.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/utility_bar/__snapshots__/utility_bar_action.test.tsx.snap rename to x-pack/plugins/siem/public/components/utility_bar/__snapshots__/utility_bar_action.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/utility_bar/__snapshots__/utility_bar_group.test.tsx.snap b/x-pack/plugins/siem/public/components/utility_bar/__snapshots__/utility_bar_group.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/utility_bar/__snapshots__/utility_bar_group.test.tsx.snap rename to x-pack/plugins/siem/public/components/utility_bar/__snapshots__/utility_bar_group.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/utility_bar/__snapshots__/utility_bar_section.test.tsx.snap b/x-pack/plugins/siem/public/components/utility_bar/__snapshots__/utility_bar_section.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/utility_bar/__snapshots__/utility_bar_section.test.tsx.snap rename to x-pack/plugins/siem/public/components/utility_bar/__snapshots__/utility_bar_section.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/utility_bar/__snapshots__/utility_bar_text.test.tsx.snap b/x-pack/plugins/siem/public/components/utility_bar/__snapshots__/utility_bar_text.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/utility_bar/__snapshots__/utility_bar_text.test.tsx.snap rename to x-pack/plugins/siem/public/components/utility_bar/__snapshots__/utility_bar_text.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/utility_bar/index.ts b/x-pack/plugins/siem/public/components/utility_bar/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/utility_bar/index.ts rename to x-pack/plugins/siem/public/components/utility_bar/index.ts diff --git a/x-pack/legacy/plugins/siem/public/components/utility_bar/styles.tsx b/x-pack/plugins/siem/public/components/utility_bar/styles.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/utility_bar/styles.tsx rename to x-pack/plugins/siem/public/components/utility_bar/styles.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/utility_bar/utility_bar.test.tsx b/x-pack/plugins/siem/public/components/utility_bar/utility_bar.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/utility_bar/utility_bar.test.tsx rename to x-pack/plugins/siem/public/components/utility_bar/utility_bar.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/utility_bar/utility_bar.tsx b/x-pack/plugins/siem/public/components/utility_bar/utility_bar.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/utility_bar/utility_bar.tsx rename to x-pack/plugins/siem/public/components/utility_bar/utility_bar.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/utility_bar/utility_bar_action.test.tsx b/x-pack/plugins/siem/public/components/utility_bar/utility_bar_action.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/utility_bar/utility_bar_action.test.tsx rename to x-pack/plugins/siem/public/components/utility_bar/utility_bar_action.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/utility_bar/utility_bar_action.tsx b/x-pack/plugins/siem/public/components/utility_bar/utility_bar_action.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/utility_bar/utility_bar_action.tsx rename to x-pack/plugins/siem/public/components/utility_bar/utility_bar_action.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/utility_bar/utility_bar_group.test.tsx b/x-pack/plugins/siem/public/components/utility_bar/utility_bar_group.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/utility_bar/utility_bar_group.test.tsx rename to x-pack/plugins/siem/public/components/utility_bar/utility_bar_group.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/utility_bar/utility_bar_group.tsx b/x-pack/plugins/siem/public/components/utility_bar/utility_bar_group.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/utility_bar/utility_bar_group.tsx rename to x-pack/plugins/siem/public/components/utility_bar/utility_bar_group.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/utility_bar/utility_bar_section.test.tsx b/x-pack/plugins/siem/public/components/utility_bar/utility_bar_section.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/utility_bar/utility_bar_section.test.tsx rename to x-pack/plugins/siem/public/components/utility_bar/utility_bar_section.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/utility_bar/utility_bar_section.tsx b/x-pack/plugins/siem/public/components/utility_bar/utility_bar_section.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/utility_bar/utility_bar_section.tsx rename to x-pack/plugins/siem/public/components/utility_bar/utility_bar_section.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/utility_bar/utility_bar_text.test.tsx b/x-pack/plugins/siem/public/components/utility_bar/utility_bar_text.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/utility_bar/utility_bar_text.test.tsx rename to x-pack/plugins/siem/public/components/utility_bar/utility_bar_text.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/utility_bar/utility_bar_text.tsx b/x-pack/plugins/siem/public/components/utility_bar/utility_bar_text.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/utility_bar/utility_bar_text.tsx rename to x-pack/plugins/siem/public/components/utility_bar/utility_bar_text.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/utils.ts b/x-pack/plugins/siem/public/components/utils.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/utils.ts rename to x-pack/plugins/siem/public/components/utils.ts diff --git a/x-pack/legacy/plugins/siem/public/components/with_hover_actions/index.tsx b/x-pack/plugins/siem/public/components/with_hover_actions/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/with_hover_actions/index.tsx rename to x-pack/plugins/siem/public/components/with_hover_actions/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/wrapper_page/__snapshots__/index.test.tsx.snap b/x-pack/plugins/siem/public/components/wrapper_page/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/wrapper_page/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/siem/public/components/wrapper_page/__snapshots__/index.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/components/wrapper_page/index.test.tsx b/x-pack/plugins/siem/public/components/wrapper_page/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/wrapper_page/index.test.tsx rename to x-pack/plugins/siem/public/components/wrapper_page/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/wrapper_page/index.tsx b/x-pack/plugins/siem/public/components/wrapper_page/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/components/wrapper_page/index.tsx rename to x-pack/plugins/siem/public/components/wrapper_page/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/containers/anomalies/anomalies_query_tab_body/histogram_configs.ts b/x-pack/plugins/siem/public/containers/anomalies/anomalies_query_tab_body/histogram_configs.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/anomalies/anomalies_query_tab_body/histogram_configs.ts rename to x-pack/plugins/siem/public/containers/anomalies/anomalies_query_tab_body/histogram_configs.ts diff --git a/x-pack/legacy/plugins/siem/public/containers/anomalies/anomalies_query_tab_body/index.tsx b/x-pack/plugins/siem/public/containers/anomalies/anomalies_query_tab_body/index.tsx similarity index 95% rename from x-pack/legacy/plugins/siem/public/containers/anomalies/anomalies_query_tab_body/index.tsx rename to x-pack/plugins/siem/public/containers/anomalies/anomalies_query_tab_body/index.tsx index 83c38f2a76175f..2bbb4cde92b151 100644 --- a/x-pack/legacy/plugins/siem/public/containers/anomalies/anomalies_query_tab_body/index.tsx +++ b/x-pack/plugins/siem/public/containers/anomalies/anomalies_query_tab_body/index.tsx @@ -6,7 +6,7 @@ import React, { useEffect } from 'react'; -import { DEFAULT_ANOMALY_SCORE } from '../../../../../../../plugins/siem/common/constants'; +import { DEFAULT_ANOMALY_SCORE } from '../../../../common/constants'; import { AnomaliesQueryTabBodyProps } from './types'; import { getAnomaliesFilterQuery } from './utils'; import { useSiemJobs } from '../../../components/ml_popover/hooks/use_siem_jobs'; diff --git a/x-pack/legacy/plugins/siem/public/containers/anomalies/anomalies_query_tab_body/translations.ts b/x-pack/plugins/siem/public/containers/anomalies/anomalies_query_tab_body/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/anomalies/anomalies_query_tab_body/translations.ts rename to x-pack/plugins/siem/public/containers/anomalies/anomalies_query_tab_body/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/containers/anomalies/anomalies_query_tab_body/types.ts b/x-pack/plugins/siem/public/containers/anomalies/anomalies_query_tab_body/types.ts similarity index 94% rename from x-pack/legacy/plugins/siem/public/containers/anomalies/anomalies_query_tab_body/types.ts rename to x-pack/plugins/siem/public/containers/anomalies/anomalies_query_tab_body/types.ts index d17eadc68d04b6..f6cae81e3c6c4b 100644 --- a/x-pack/legacy/plugins/siem/public/containers/anomalies/anomalies_query_tab_body/types.ts +++ b/x-pack/plugins/siem/public/containers/anomalies/anomalies_query_tab_body/types.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { ESTermQuery } from '../../../../../../../plugins/siem/common/typed_json'; +import { ESTermQuery } from '../../../../common/typed_json'; import { NarrowDateRange } from '../../../components/ml/types'; import { UpdateDateRange } from '../../../components/charts/common'; import { SetQuery } from '../../../pages/hosts/navigation/types'; diff --git a/x-pack/legacy/plugins/siem/public/containers/anomalies/anomalies_query_tab_body/utils.ts b/x-pack/plugins/siem/public/containers/anomalies/anomalies_query_tab_body/utils.ts similarity index 95% rename from x-pack/legacy/plugins/siem/public/containers/anomalies/anomalies_query_tab_body/utils.ts rename to x-pack/plugins/siem/public/containers/anomalies/anomalies_query_tab_body/utils.ts index f698e302d34232..790a797b2fead4 100644 --- a/x-pack/legacy/plugins/siem/public/containers/anomalies/anomalies_query_tab_body/utils.ts +++ b/x-pack/plugins/siem/public/containers/anomalies/anomalies_query_tab_body/utils.ts @@ -6,7 +6,7 @@ import deepmerge from 'deepmerge'; -import { ESTermQuery } from '../../../../../../../plugins/siem/common/typed_json'; +import { ESTermQuery } from '../../../../common/typed_json'; import { createFilter } from '../../helpers'; import { SiemJob } from '../../../components/ml_popover/types'; import { FlowTarget } from '../../../graphql/types'; diff --git a/x-pack/legacy/plugins/siem/public/containers/authentications/index.gql_query.ts b/x-pack/plugins/siem/public/containers/authentications/index.gql_query.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/authentications/index.gql_query.ts rename to x-pack/plugins/siem/public/containers/authentications/index.gql_query.ts diff --git a/x-pack/legacy/plugins/siem/public/containers/authentications/index.tsx b/x-pack/plugins/siem/public/containers/authentications/index.tsx similarity index 98% rename from x-pack/legacy/plugins/siem/public/containers/authentications/index.tsx rename to x-pack/plugins/siem/public/containers/authentications/index.tsx index 13bb40dad04bd8..6d4a88c45a7681 100644 --- a/x-pack/legacy/plugins/siem/public/containers/authentications/index.tsx +++ b/x-pack/plugins/siem/public/containers/authentications/index.tsx @@ -10,7 +10,7 @@ import { Query } from 'react-apollo'; import { connect } from 'react-redux'; import { compose } from 'redux'; -import { DEFAULT_INDEX_KEY } from '../../../../../../plugins/siem/common/constants'; +import { DEFAULT_INDEX_KEY } from '../../../common/constants'; import { AuthenticationsEdges, GetAuthenticationsQuery, diff --git a/x-pack/legacy/plugins/siem/public/containers/case/__mocks__/api.ts b/x-pack/plugins/siem/public/containers/case/__mocks__/api.ts similarity index 98% rename from x-pack/legacy/plugins/siem/public/containers/case/__mocks__/api.ts rename to x-pack/plugins/siem/public/containers/case/__mocks__/api.ts index 6d2cfb7147537f..dcc31401564b1f 100644 --- a/x-pack/legacy/plugins/siem/public/containers/case/__mocks__/api.ts +++ b/x-pack/plugins/siem/public/containers/case/__mocks__/api.ts @@ -35,7 +35,7 @@ import { ServiceConnectorCaseParams, ServiceConnectorCaseResponse, User, -} from '../../../../../../../plugins/case/common/api'; +} from '../../../../../case/common/api'; export const getCase = async ( caseId: string, diff --git a/x-pack/legacy/plugins/siem/public/containers/case/api.test.tsx b/x-pack/plugins/siem/public/containers/case/api.test.tsx similarity index 99% rename from x-pack/legacy/plugins/siem/public/containers/case/api.test.tsx rename to x-pack/plugins/siem/public/containers/case/api.test.tsx index 693a7175ebc3eb..ad61e2b46f6c5f 100644 --- a/x-pack/legacy/plugins/siem/public/containers/case/api.test.tsx +++ b/x-pack/plugins/siem/public/containers/case/api.test.tsx @@ -6,7 +6,7 @@ import { KibanaServices } from '../../lib/kibana'; -import { CASES_URL } from '../../../../../../plugins/case/common/constants'; +import { CASES_URL } from '../../../../case/common/constants'; import { deleteCases, diff --git a/x-pack/legacy/plugins/siem/public/containers/case/api.ts b/x-pack/plugins/siem/public/containers/case/api.ts similarity index 97% rename from x-pack/legacy/plugins/siem/public/containers/case/api.ts rename to x-pack/plugins/siem/public/containers/case/api.ts index b7453616324199..b97f94a5a6b597 100644 --- a/x-pack/legacy/plugins/siem/public/containers/case/api.ts +++ b/x-pack/plugins/siem/public/containers/case/api.ts @@ -18,7 +18,7 @@ import { ServiceConnectorCaseParams, ServiceConnectorCaseResponse, ActionTypeExecutorResult, -} from '../../../../../../plugins/case/common/api'; +} from '../../../../case/common/api'; import { CASE_STATUS_URL, @@ -27,13 +27,13 @@ import { CASE_REPORTERS_URL, ACTION_TYPES_URL, ACTION_URL, -} from '../../../../../../plugins/case/common/constants'; +} from '../../../../case/common/constants'; import { getCaseDetailsUrl, getCaseUserActionUrl, getCaseCommentsUrl, -} from '../../../../../../plugins/case/common/api/helpers'; +} from '../../../../case/common/api/helpers'; import { KibanaServices } from '../../lib/kibana'; diff --git a/x-pack/legacy/plugins/siem/public/containers/case/configure/__mocks__/api.ts b/x-pack/plugins/siem/public/containers/case/configure/__mocks__/api.ts similarity index 95% rename from x-pack/legacy/plugins/siem/public/containers/case/configure/__mocks__/api.ts rename to x-pack/plugins/siem/public/containers/case/configure/__mocks__/api.ts index 03f7d241e5dffd..c3611f490708ae 100644 --- a/x-pack/legacy/plugins/siem/public/containers/case/configure/__mocks__/api.ts +++ b/x-pack/plugins/siem/public/containers/case/configure/__mocks__/api.ts @@ -8,7 +8,7 @@ import { CasesConfigurePatch, CasesConfigureRequest, Connector, -} from '../../../../../../../../plugins/case/common/api'; +} from '../../../../../../case/common/api'; import { ApiProps } from '../../types'; import { CaseConfigure } from '../types'; diff --git a/x-pack/legacy/plugins/siem/public/containers/case/configure/api.test.ts b/x-pack/plugins/siem/public/containers/case/configure/api.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/case/configure/api.test.ts rename to x-pack/plugins/siem/public/containers/case/configure/api.test.ts diff --git a/x-pack/legacy/plugins/siem/public/containers/case/configure/api.ts b/x-pack/plugins/siem/public/containers/case/configure/api.ts similarity index 95% rename from x-pack/legacy/plugins/siem/public/containers/case/configure/api.ts rename to x-pack/plugins/siem/public/containers/case/configure/api.ts index 85e472811c93bf..4f516764e46f3d 100644 --- a/x-pack/legacy/plugins/siem/public/containers/case/configure/api.ts +++ b/x-pack/plugins/siem/public/containers/case/configure/api.ts @@ -10,13 +10,13 @@ import { CasesConfigurePatch, CasesConfigureResponse, CasesConfigureRequest, -} from '../../../../../../../plugins/case/common/api'; +} from '../../../../../case/common/api'; import { KibanaServices } from '../../../lib/kibana'; import { CASE_CONFIGURE_CONNECTORS_URL, CASE_CONFIGURE_URL, -} from '../../../../../../../plugins/case/common/constants'; +} from '../../../../../case/common/constants'; import { ApiProps } from '../types'; import { convertToCamelCase, decodeCaseConfigureResponse } from '../utils'; diff --git a/x-pack/legacy/plugins/siem/public/containers/case/configure/mock.ts b/x-pack/plugins/siem/public/containers/case/configure/mock.ts similarity index 97% rename from x-pack/legacy/plugins/siem/public/containers/case/configure/mock.ts rename to x-pack/plugins/siem/public/containers/case/configure/mock.ts index 388875724afe92..c6824bd50edb5c 100644 --- a/x-pack/legacy/plugins/siem/public/containers/case/configure/mock.ts +++ b/x-pack/plugins/siem/public/containers/case/configure/mock.ts @@ -8,7 +8,7 @@ import { Connector, CasesConfigureResponse, CasesConfigureRequest, -} from '../../../../../../../plugins/case/common/api'; +} from '../../../../../case/common/api'; import { CaseConfigure, CasesConfigurationMapping } from './types'; export const mapping: CasesConfigurationMapping[] = [ diff --git a/x-pack/legacy/plugins/siem/public/containers/case/configure/translations.ts b/x-pack/plugins/siem/public/containers/case/configure/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/case/configure/translations.ts rename to x-pack/plugins/siem/public/containers/case/configure/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/containers/case/configure/types.ts b/x-pack/plugins/siem/public/containers/case/configure/types.ts similarity index 94% rename from x-pack/legacy/plugins/siem/public/containers/case/configure/types.ts rename to x-pack/plugins/siem/public/containers/case/configure/types.ts index d69c23fe02ec9e..ed95315c066dcb 100644 --- a/x-pack/legacy/plugins/siem/public/containers/case/configure/types.ts +++ b/x-pack/plugins/siem/public/containers/case/configure/types.ts @@ -12,7 +12,7 @@ import { ClosureType, Connector, ThirdPartyField, -} from '../../../../../../../plugins/case/common/api'; +} from '../../../../../case/common/api'; export { ActionType, CasesConfigurationMaps, CaseField, ClosureType, Connector, ThirdPartyField }; diff --git a/x-pack/legacy/plugins/siem/public/containers/case/configure/use_configure.test.tsx b/x-pack/plugins/siem/public/containers/case/configure/use_configure.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/case/configure/use_configure.test.tsx rename to x-pack/plugins/siem/public/containers/case/configure/use_configure.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/containers/case/configure/use_configure.tsx b/x-pack/plugins/siem/public/containers/case/configure/use_configure.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/case/configure/use_configure.tsx rename to x-pack/plugins/siem/public/containers/case/configure/use_configure.tsx diff --git a/x-pack/legacy/plugins/siem/public/containers/case/configure/use_connectors.test.tsx b/x-pack/plugins/siem/public/containers/case/configure/use_connectors.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/case/configure/use_connectors.test.tsx rename to x-pack/plugins/siem/public/containers/case/configure/use_connectors.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/containers/case/configure/use_connectors.tsx b/x-pack/plugins/siem/public/containers/case/configure/use_connectors.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/case/configure/use_connectors.tsx rename to x-pack/plugins/siem/public/containers/case/configure/use_connectors.tsx diff --git a/x-pack/legacy/plugins/siem/public/containers/case/constants.ts b/x-pack/plugins/siem/public/containers/case/constants.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/case/constants.ts rename to x-pack/plugins/siem/public/containers/case/constants.ts diff --git a/x-pack/legacy/plugins/siem/public/containers/case/mock.ts b/x-pack/plugins/siem/public/containers/case/mock.ts similarity index 99% rename from x-pack/legacy/plugins/siem/public/containers/case/mock.ts rename to x-pack/plugins/siem/public/containers/case/mock.ts index 0bda75e5bc9e05..0f44b3a1594ba0 100644 --- a/x-pack/legacy/plugins/siem/public/containers/case/mock.ts +++ b/x-pack/plugins/siem/public/containers/case/mock.ts @@ -17,7 +17,7 @@ import { CaseUserActionsResponse, CasesResponse, CasesFindResponse, -} from '../../../../../../plugins/case/common/api/cases'; +} from '../../../../case/common/api/cases'; import { UseGetCasesState, DEFAULT_FILTER_OPTIONS, DEFAULT_QUERY_PARAMS } from './use_get_cases'; export const basicCaseId = 'basic-case-id'; diff --git a/x-pack/legacy/plugins/siem/public/containers/case/translations.ts b/x-pack/plugins/siem/public/containers/case/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/case/translations.ts rename to x-pack/plugins/siem/public/containers/case/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/containers/case/types.ts b/x-pack/plugins/siem/public/containers/case/types.ts similarity index 96% rename from x-pack/legacy/plugins/siem/public/containers/case/types.ts rename to x-pack/plugins/siem/public/containers/case/types.ts index e552f22b55fa40..dde13dc38aca84 100644 --- a/x-pack/legacy/plugins/siem/public/containers/case/types.ts +++ b/x-pack/plugins/siem/public/containers/case/types.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { User, UserActionField, UserAction } from '../../../../../../plugins/case/common/api'; +import { User, UserActionField, UserAction } from '../../../../case/common/api'; export interface Comment { id: string; diff --git a/x-pack/legacy/plugins/siem/public/containers/case/use_bulk_update_case.test.tsx b/x-pack/plugins/siem/public/containers/case/use_bulk_update_case.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/case/use_bulk_update_case.test.tsx rename to x-pack/plugins/siem/public/containers/case/use_bulk_update_case.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/containers/case/use_bulk_update_case.tsx b/x-pack/plugins/siem/public/containers/case/use_bulk_update_case.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/case/use_bulk_update_case.tsx rename to x-pack/plugins/siem/public/containers/case/use_bulk_update_case.tsx diff --git a/x-pack/legacy/plugins/siem/public/containers/case/use_delete_cases.test.tsx b/x-pack/plugins/siem/public/containers/case/use_delete_cases.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/case/use_delete_cases.test.tsx rename to x-pack/plugins/siem/public/containers/case/use_delete_cases.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/containers/case/use_delete_cases.tsx b/x-pack/plugins/siem/public/containers/case/use_delete_cases.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/case/use_delete_cases.tsx rename to x-pack/plugins/siem/public/containers/case/use_delete_cases.tsx diff --git a/x-pack/legacy/plugins/siem/public/containers/case/use_get_action_license.test.tsx b/x-pack/plugins/siem/public/containers/case/use_get_action_license.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/case/use_get_action_license.test.tsx rename to x-pack/plugins/siem/public/containers/case/use_get_action_license.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/containers/case/use_get_action_license.tsx b/x-pack/plugins/siem/public/containers/case/use_get_action_license.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/case/use_get_action_license.tsx rename to x-pack/plugins/siem/public/containers/case/use_get_action_license.tsx diff --git a/x-pack/legacy/plugins/siem/public/containers/case/use_get_case.test.tsx b/x-pack/plugins/siem/public/containers/case/use_get_case.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/case/use_get_case.test.tsx rename to x-pack/plugins/siem/public/containers/case/use_get_case.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/containers/case/use_get_case.tsx b/x-pack/plugins/siem/public/containers/case/use_get_case.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/case/use_get_case.tsx rename to x-pack/plugins/siem/public/containers/case/use_get_case.tsx diff --git a/x-pack/legacy/plugins/siem/public/containers/case/use_get_case_user_actions.test.tsx b/x-pack/plugins/siem/public/containers/case/use_get_case_user_actions.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/case/use_get_case_user_actions.test.tsx rename to x-pack/plugins/siem/public/containers/case/use_get_case_user_actions.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/containers/case/use_get_case_user_actions.tsx b/x-pack/plugins/siem/public/containers/case/use_get_case_user_actions.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/case/use_get_case_user_actions.tsx rename to x-pack/plugins/siem/public/containers/case/use_get_case_user_actions.tsx diff --git a/x-pack/legacy/plugins/siem/public/containers/case/use_get_cases.test.tsx b/x-pack/plugins/siem/public/containers/case/use_get_cases.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/case/use_get_cases.test.tsx rename to x-pack/plugins/siem/public/containers/case/use_get_cases.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/containers/case/use_get_cases.tsx b/x-pack/plugins/siem/public/containers/case/use_get_cases.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/case/use_get_cases.tsx rename to x-pack/plugins/siem/public/containers/case/use_get_cases.tsx diff --git a/x-pack/legacy/plugins/siem/public/containers/case/use_get_cases_status.test.tsx b/x-pack/plugins/siem/public/containers/case/use_get_cases_status.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/case/use_get_cases_status.test.tsx rename to x-pack/plugins/siem/public/containers/case/use_get_cases_status.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/containers/case/use_get_cases_status.tsx b/x-pack/plugins/siem/public/containers/case/use_get_cases_status.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/case/use_get_cases_status.tsx rename to x-pack/plugins/siem/public/containers/case/use_get_cases_status.tsx diff --git a/x-pack/legacy/plugins/siem/public/containers/case/use_get_reporters.test.tsx b/x-pack/plugins/siem/public/containers/case/use_get_reporters.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/case/use_get_reporters.test.tsx rename to x-pack/plugins/siem/public/containers/case/use_get_reporters.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/containers/case/use_get_reporters.tsx b/x-pack/plugins/siem/public/containers/case/use_get_reporters.tsx similarity index 97% rename from x-pack/legacy/plugins/siem/public/containers/case/use_get_reporters.tsx rename to x-pack/plugins/siem/public/containers/case/use_get_reporters.tsx index 2fc9b8294c8e0e..01679ae4ccd82d 100644 --- a/x-pack/legacy/plugins/siem/public/containers/case/use_get_reporters.tsx +++ b/x-pack/plugins/siem/public/containers/case/use_get_reporters.tsx @@ -7,7 +7,7 @@ import { useCallback, useEffect, useState } from 'react'; import { isEmpty } from 'lodash/fp'; -import { User } from '../../../../../../plugins/case/common/api'; +import { User } from '../../../../case/common/api'; import { errorToToaster, useStateToaster } from '../../components/toasters'; import { getReporters } from './api'; import * as i18n from './translations'; diff --git a/x-pack/legacy/plugins/siem/public/containers/case/use_get_tags.test.tsx b/x-pack/plugins/siem/public/containers/case/use_get_tags.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/case/use_get_tags.test.tsx rename to x-pack/plugins/siem/public/containers/case/use_get_tags.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/containers/case/use_get_tags.tsx b/x-pack/plugins/siem/public/containers/case/use_get_tags.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/case/use_get_tags.tsx rename to x-pack/plugins/siem/public/containers/case/use_get_tags.tsx diff --git a/x-pack/legacy/plugins/siem/public/containers/case/use_post_case.test.tsx b/x-pack/plugins/siem/public/containers/case/use_post_case.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/case/use_post_case.test.tsx rename to x-pack/plugins/siem/public/containers/case/use_post_case.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/containers/case/use_post_case.tsx b/x-pack/plugins/siem/public/containers/case/use_post_case.tsx similarity index 96% rename from x-pack/legacy/plugins/siem/public/containers/case/use_post_case.tsx rename to x-pack/plugins/siem/public/containers/case/use_post_case.tsx index aeb50fc098eeed..b33269f26e97dd 100644 --- a/x-pack/legacy/plugins/siem/public/containers/case/use_post_case.tsx +++ b/x-pack/plugins/siem/public/containers/case/use_post_case.tsx @@ -6,7 +6,7 @@ import { useReducer, useCallback } from 'react'; -import { CasePostRequest } from '../../../../../../plugins/case/common/api'; +import { CasePostRequest } from '../../../../case/common/api'; import { errorToToaster, useStateToaster } from '../../components/toasters'; import { postCase } from './api'; import * as i18n from './translations'; diff --git a/x-pack/legacy/plugins/siem/public/containers/case/use_post_comment.test.tsx b/x-pack/plugins/siem/public/containers/case/use_post_comment.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/case/use_post_comment.test.tsx rename to x-pack/plugins/siem/public/containers/case/use_post_comment.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/containers/case/use_post_comment.tsx b/x-pack/plugins/siem/public/containers/case/use_post_comment.tsx similarity index 96% rename from x-pack/legacy/plugins/siem/public/containers/case/use_post_comment.tsx rename to x-pack/plugins/siem/public/containers/case/use_post_comment.tsx index c6d34b54499777..c7d3b4125aada8 100644 --- a/x-pack/legacy/plugins/siem/public/containers/case/use_post_comment.tsx +++ b/x-pack/plugins/siem/public/containers/case/use_post_comment.tsx @@ -6,7 +6,7 @@ import { useReducer, useCallback } from 'react'; -import { CommentRequest } from '../../../../../../plugins/case/common/api'; +import { CommentRequest } from '../../../../case/common/api'; import { errorToToaster, useStateToaster } from '../../components/toasters'; import { postComment } from './api'; diff --git a/x-pack/legacy/plugins/siem/public/containers/case/use_post_push_to_service.test.tsx b/x-pack/plugins/siem/public/containers/case/use_post_push_to_service.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/case/use_post_push_to_service.test.tsx rename to x-pack/plugins/siem/public/containers/case/use_post_push_to_service.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/containers/case/use_post_push_to_service.tsx b/x-pack/plugins/siem/public/containers/case/use_post_push_to_service.tsx similarity index 99% rename from x-pack/legacy/plugins/siem/public/containers/case/use_post_push_to_service.tsx rename to x-pack/plugins/siem/public/containers/case/use_post_push_to_service.tsx index 89e7e18cf06881..acd4b92ee430dc 100644 --- a/x-pack/legacy/plugins/siem/public/containers/case/use_post_push_to_service.tsx +++ b/x-pack/plugins/siem/public/containers/case/use_post_push_to_service.tsx @@ -9,7 +9,7 @@ import { useReducer, useCallback } from 'react'; import { ServiceConnectorCaseResponse, ServiceConnectorCaseParams, -} from '../../../../../../plugins/case/common/api'; +} from '../../../../case/common/api'; import { errorToToaster, useStateToaster, displaySuccessToast } from '../../components/toasters'; import { getCase, pushToService, pushCase } from './api'; diff --git a/x-pack/legacy/plugins/siem/public/containers/case/use_update_case.test.tsx b/x-pack/plugins/siem/public/containers/case/use_update_case.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/case/use_update_case.test.tsx rename to x-pack/plugins/siem/public/containers/case/use_update_case.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/containers/case/use_update_case.tsx b/x-pack/plugins/siem/public/containers/case/use_update_case.tsx similarity index 97% rename from x-pack/legacy/plugins/siem/public/containers/case/use_update_case.tsx rename to x-pack/plugins/siem/public/containers/case/use_update_case.tsx index 7ebbbba076c121..2f2fe18321246f 100644 --- a/x-pack/legacy/plugins/siem/public/containers/case/use_update_case.tsx +++ b/x-pack/plugins/siem/public/containers/case/use_update_case.tsx @@ -6,7 +6,7 @@ import { useReducer, useCallback } from 'react'; import { displaySuccessToast, errorToToaster, useStateToaster } from '../../components/toasters'; -import { CasePatchRequest } from '../../../../../../plugins/case/common/api'; +import { CasePatchRequest } from '../../../../case/common/api'; import { patchCase } from './api'; import * as i18n from './translations'; diff --git a/x-pack/legacy/plugins/siem/public/containers/case/use_update_comment.test.tsx b/x-pack/plugins/siem/public/containers/case/use_update_comment.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/case/use_update_comment.test.tsx rename to x-pack/plugins/siem/public/containers/case/use_update_comment.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/containers/case/use_update_comment.tsx b/x-pack/plugins/siem/public/containers/case/use_update_comment.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/case/use_update_comment.tsx rename to x-pack/plugins/siem/public/containers/case/use_update_comment.tsx diff --git a/x-pack/legacy/plugins/siem/public/containers/case/utils.ts b/x-pack/plugins/siem/public/containers/case/utils.ts similarity index 98% rename from x-pack/legacy/plugins/siem/public/containers/case/utils.ts rename to x-pack/plugins/siem/public/containers/case/utils.ts index 1ec98bf5b5f1f4..aaa5ff4ab44c13 100644 --- a/x-pack/legacy/plugins/siem/public/containers/case/utils.ts +++ b/x-pack/plugins/siem/public/containers/case/utils.ts @@ -25,7 +25,7 @@ import { CaseUserActionsResponseRt, ServiceConnectorCaseResponseRt, ServiceConnectorCaseResponse, -} from '../../../../../../plugins/case/common/api'; +} from '../../../../case/common/api'; import { ToasterError } from '../../components/toasters'; import { AllCases, Case } from './types'; diff --git a/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/__mocks__/api.ts b/x-pack/plugins/siem/public/containers/detection_engine/rules/__mocks__/api.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/__mocks__/api.ts rename to x-pack/plugins/siem/public/containers/detection_engine/rules/__mocks__/api.ts diff --git a/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/api.test.ts b/x-pack/plugins/siem/public/containers/detection_engine/rules/api.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/api.test.ts rename to x-pack/plugins/siem/public/containers/detection_engine/rules/api.test.ts diff --git a/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/api.ts b/x-pack/plugins/siem/public/containers/detection_engine/rules/api.ts similarity index 99% rename from x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/api.ts rename to x-pack/plugins/siem/public/containers/detection_engine/rules/api.ts index 69f4c93a82e2cc..c1fadf289ef4d9 100644 --- a/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/api.ts +++ b/x-pack/plugins/siem/public/containers/detection_engine/rules/api.ts @@ -10,7 +10,7 @@ import { DETECTION_ENGINE_RULES_STATUS_URL, DETECTION_ENGINE_PREPACKAGED_RULES_STATUS_URL, DETECTION_ENGINE_TAGS_URL, -} from '../../../../../../../plugins/siem/common/constants'; +} from '../../../../common/constants'; import { AddRulesProps, DeleteRulesProps, diff --git a/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/fetch_index_patterns.test.tsx b/x-pack/plugins/siem/public/containers/detection_engine/rules/fetch_index_patterns.test.tsx similarity index 99% rename from x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/fetch_index_patterns.test.tsx rename to x-pack/plugins/siem/public/containers/detection_engine/rules/fetch_index_patterns.test.tsx index 83b8a3581a4be1..8c688fe5615f00 100644 --- a/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/fetch_index_patterns.test.tsx +++ b/x-pack/plugins/siem/public/containers/detection_engine/rules/fetch_index_patterns.test.tsx @@ -6,7 +6,7 @@ import { renderHook, act } from '@testing-library/react-hooks'; -import { DEFAULT_INDEX_PATTERN } from '../../../../../../../plugins/siem/common/constants'; +import { DEFAULT_INDEX_PATTERN } from '../../../../common/constants'; import { useApolloClient } from '../../../utils/apollo_context'; import { mocksSource } from '../../source/mock'; diff --git a/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/fetch_index_patterns.tsx b/x-pack/plugins/siem/public/containers/detection_engine/rules/fetch_index_patterns.tsx similarity index 97% rename from x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/fetch_index_patterns.tsx rename to x-pack/plugins/siem/public/containers/detection_engine/rules/fetch_index_patterns.tsx index c5aefac15f48e1..7e222045a1a3ba 100644 --- a/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/fetch_index_patterns.tsx +++ b/x-pack/plugins/siem/public/containers/detection_engine/rules/fetch_index_patterns.tsx @@ -8,7 +8,7 @@ import { isEmpty, get } from 'lodash/fp'; import { useEffect, useState, Dispatch, SetStateAction } from 'react'; import deepEqual from 'fast-deep-equal'; -import { IIndexPattern } from '../../../../../../../../src/plugins/data/public'; +import { IIndexPattern } from '../../../../../../../src/plugins/data/public'; import { BrowserFields, getBrowserFields, diff --git a/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/index.ts b/x-pack/plugins/siem/public/containers/detection_engine/rules/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/index.ts rename to x-pack/plugins/siem/public/containers/detection_engine/rules/index.ts diff --git a/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/mock.ts b/x-pack/plugins/siem/public/containers/detection_engine/rules/mock.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/mock.ts rename to x-pack/plugins/siem/public/containers/detection_engine/rules/mock.ts diff --git a/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/persist_rule.test.tsx b/x-pack/plugins/siem/public/containers/detection_engine/rules/persist_rule.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/persist_rule.test.tsx rename to x-pack/plugins/siem/public/containers/detection_engine/rules/persist_rule.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/persist_rule.tsx b/x-pack/plugins/siem/public/containers/detection_engine/rules/persist_rule.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/persist_rule.tsx rename to x-pack/plugins/siem/public/containers/detection_engine/rules/persist_rule.tsx diff --git a/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/translations.ts b/x-pack/plugins/siem/public/containers/detection_engine/rules/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/translations.ts rename to x-pack/plugins/siem/public/containers/detection_engine/rules/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/types.ts b/x-pack/plugins/siem/public/containers/detection_engine/rules/types.ts similarity index 98% rename from x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/types.ts rename to x-pack/plugins/siem/public/containers/detection_engine/rules/types.ts index 2f2de2e151664e..f89d21ef1aeb19 100644 --- a/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/types.ts +++ b/x-pack/plugins/siem/public/containers/detection_engine/rules/types.ts @@ -6,7 +6,7 @@ import * as t from 'io-ts'; -import { RuleTypeSchema } from '../../../../../../../plugins/siem/common/detection_engine/types'; +import { RuleTypeSchema } from '../../../../common/detection_engine/types'; /** * Params is an "record", since it is a type of AlertActionParams which is action templates. diff --git a/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/use_pre_packaged_rules.test.tsx b/x-pack/plugins/siem/public/containers/detection_engine/rules/use_pre_packaged_rules.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/use_pre_packaged_rules.test.tsx rename to x-pack/plugins/siem/public/containers/detection_engine/rules/use_pre_packaged_rules.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/use_pre_packaged_rules.tsx b/x-pack/plugins/siem/public/containers/detection_engine/rules/use_pre_packaged_rules.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/use_pre_packaged_rules.tsx rename to x-pack/plugins/siem/public/containers/detection_engine/rules/use_pre_packaged_rules.tsx diff --git a/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/use_rule.test.tsx b/x-pack/plugins/siem/public/containers/detection_engine/rules/use_rule.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/use_rule.test.tsx rename to x-pack/plugins/siem/public/containers/detection_engine/rules/use_rule.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/use_rule.tsx b/x-pack/plugins/siem/public/containers/detection_engine/rules/use_rule.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/use_rule.tsx rename to x-pack/plugins/siem/public/containers/detection_engine/rules/use_rule.tsx diff --git a/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/use_rule_status.test.tsx b/x-pack/plugins/siem/public/containers/detection_engine/rules/use_rule_status.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/use_rule_status.test.tsx rename to x-pack/plugins/siem/public/containers/detection_engine/rules/use_rule_status.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/use_rule_status.tsx b/x-pack/plugins/siem/public/containers/detection_engine/rules/use_rule_status.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/use_rule_status.tsx rename to x-pack/plugins/siem/public/containers/detection_engine/rules/use_rule_status.tsx diff --git a/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/use_rules.test.tsx b/x-pack/plugins/siem/public/containers/detection_engine/rules/use_rules.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/use_rules.test.tsx rename to x-pack/plugins/siem/public/containers/detection_engine/rules/use_rules.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/use_rules.tsx b/x-pack/plugins/siem/public/containers/detection_engine/rules/use_rules.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/use_rules.tsx rename to x-pack/plugins/siem/public/containers/detection_engine/rules/use_rules.tsx diff --git a/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/use_tags.test.tsx b/x-pack/plugins/siem/public/containers/detection_engine/rules/use_tags.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/use_tags.test.tsx rename to x-pack/plugins/siem/public/containers/detection_engine/rules/use_tags.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/use_tags.tsx b/x-pack/plugins/siem/public/containers/detection_engine/rules/use_tags.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/use_tags.tsx rename to x-pack/plugins/siem/public/containers/detection_engine/rules/use_tags.tsx diff --git a/x-pack/legacy/plugins/siem/public/containers/detection_engine/signals/__mocks__/api.ts b/x-pack/plugins/siem/public/containers/detection_engine/signals/__mocks__/api.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/detection_engine/signals/__mocks__/api.ts rename to x-pack/plugins/siem/public/containers/detection_engine/signals/__mocks__/api.ts diff --git a/x-pack/legacy/plugins/siem/public/containers/detection_engine/signals/api.test.ts b/x-pack/plugins/siem/public/containers/detection_engine/signals/api.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/detection_engine/signals/api.test.ts rename to x-pack/plugins/siem/public/containers/detection_engine/signals/api.test.ts diff --git a/x-pack/legacy/plugins/siem/public/containers/detection_engine/signals/api.ts b/x-pack/plugins/siem/public/containers/detection_engine/signals/api.ts similarity index 97% rename from x-pack/legacy/plugins/siem/public/containers/detection_engine/signals/api.ts rename to x-pack/plugins/siem/public/containers/detection_engine/signals/api.ts index ece2483adde3ad..1397e4a8696be8 100644 --- a/x-pack/legacy/plugins/siem/public/containers/detection_engine/signals/api.ts +++ b/x-pack/plugins/siem/public/containers/detection_engine/signals/api.ts @@ -9,7 +9,7 @@ import { DETECTION_ENGINE_SIGNALS_STATUS_URL, DETECTION_ENGINE_INDEX_URL, DETECTION_ENGINE_PRIVILEGES_URL, -} from '../../../../../../../plugins/siem/common/constants'; +} from '../../../../common/constants'; import { KibanaServices } from '../../../lib/kibana'; import { BasicSignals, diff --git a/x-pack/legacy/plugins/siem/public/containers/detection_engine/signals/mock.ts b/x-pack/plugins/siem/public/containers/detection_engine/signals/mock.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/detection_engine/signals/mock.ts rename to x-pack/plugins/siem/public/containers/detection_engine/signals/mock.ts diff --git a/x-pack/legacy/plugins/siem/public/containers/detection_engine/signals/translations.ts b/x-pack/plugins/siem/public/containers/detection_engine/signals/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/detection_engine/signals/translations.ts rename to x-pack/plugins/siem/public/containers/detection_engine/signals/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/containers/detection_engine/signals/types.ts b/x-pack/plugins/siem/public/containers/detection_engine/signals/types.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/detection_engine/signals/types.ts rename to x-pack/plugins/siem/public/containers/detection_engine/signals/types.ts diff --git a/x-pack/legacy/plugins/siem/public/containers/detection_engine/signals/use_privilege_user.test.tsx b/x-pack/plugins/siem/public/containers/detection_engine/signals/use_privilege_user.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/detection_engine/signals/use_privilege_user.test.tsx rename to x-pack/plugins/siem/public/containers/detection_engine/signals/use_privilege_user.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/containers/detection_engine/signals/use_privilege_user.tsx b/x-pack/plugins/siem/public/containers/detection_engine/signals/use_privilege_user.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/detection_engine/signals/use_privilege_user.tsx rename to x-pack/plugins/siem/public/containers/detection_engine/signals/use_privilege_user.tsx diff --git a/x-pack/legacy/plugins/siem/public/containers/detection_engine/signals/use_query.test.tsx b/x-pack/plugins/siem/public/containers/detection_engine/signals/use_query.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/detection_engine/signals/use_query.test.tsx rename to x-pack/plugins/siem/public/containers/detection_engine/signals/use_query.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/containers/detection_engine/signals/use_query.tsx b/x-pack/plugins/siem/public/containers/detection_engine/signals/use_query.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/detection_engine/signals/use_query.tsx rename to x-pack/plugins/siem/public/containers/detection_engine/signals/use_query.tsx diff --git a/x-pack/legacy/plugins/siem/public/containers/detection_engine/signals/use_signal_index.test.tsx b/x-pack/plugins/siem/public/containers/detection_engine/signals/use_signal_index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/detection_engine/signals/use_signal_index.test.tsx rename to x-pack/plugins/siem/public/containers/detection_engine/signals/use_signal_index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/containers/detection_engine/signals/use_signal_index.tsx b/x-pack/plugins/siem/public/containers/detection_engine/signals/use_signal_index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/detection_engine/signals/use_signal_index.tsx rename to x-pack/plugins/siem/public/containers/detection_engine/signals/use_signal_index.tsx diff --git a/x-pack/legacy/plugins/siem/public/containers/errors/index.test.tsx b/x-pack/plugins/siem/public/containers/errors/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/errors/index.test.tsx rename to x-pack/plugins/siem/public/containers/errors/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/containers/errors/index.tsx b/x-pack/plugins/siem/public/containers/errors/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/errors/index.tsx rename to x-pack/plugins/siem/public/containers/errors/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/containers/errors/translations.ts b/x-pack/plugins/siem/public/containers/errors/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/errors/translations.ts rename to x-pack/plugins/siem/public/containers/errors/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/containers/events/last_event_time/index.ts b/x-pack/plugins/siem/public/containers/events/last_event_time/index.ts similarity index 96% rename from x-pack/legacy/plugins/siem/public/containers/events/last_event_time/index.ts rename to x-pack/plugins/siem/public/containers/events/last_event_time/index.ts index 8628ba502f0819..9cae503d309408 100644 --- a/x-pack/legacy/plugins/siem/public/containers/events/last_event_time/index.ts +++ b/x-pack/plugins/siem/public/containers/events/last_event_time/index.ts @@ -7,7 +7,7 @@ import { get } from 'lodash/fp'; import React, { useEffect, useState } from 'react'; -import { DEFAULT_INDEX_KEY } from '../../../../../../../plugins/siem/common/constants'; +import { DEFAULT_INDEX_KEY } from '../../../../common/constants'; import { GetLastEventTimeQuery, LastEventIndexKey, LastTimeDetails } from '../../../graphql/types'; import { inputsModel } from '../../../store'; import { QueryTemplateProps } from '../../query_template'; diff --git a/x-pack/legacy/plugins/siem/public/containers/events/last_event_time/last_event_time.gql_query.ts b/x-pack/plugins/siem/public/containers/events/last_event_time/last_event_time.gql_query.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/events/last_event_time/last_event_time.gql_query.ts rename to x-pack/plugins/siem/public/containers/events/last_event_time/last_event_time.gql_query.ts diff --git a/x-pack/legacy/plugins/siem/public/containers/events/last_event_time/mock.ts b/x-pack/plugins/siem/public/containers/events/last_event_time/mock.ts similarity index 94% rename from x-pack/legacy/plugins/siem/public/containers/events/last_event_time/mock.ts rename to x-pack/plugins/siem/public/containers/events/last_event_time/mock.ts index 5ef8e67dedddbf..43f55dfcf27776 100644 --- a/x-pack/legacy/plugins/siem/public/containers/events/last_event_time/mock.ts +++ b/x-pack/plugins/siem/public/containers/events/last_event_time/mock.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { DEFAULT_INDEX_PATTERN } from '../../../../../../../plugins/siem/common/constants'; +import { DEFAULT_INDEX_PATTERN } from '../../../../common/constants'; import { GetLastEventTimeQuery, LastEventIndexKey } from '../../../graphql/types'; import { LastEventTimeGqlQuery } from './last_event_time.gql_query'; diff --git a/x-pack/legacy/plugins/siem/public/containers/global_time/index.tsx b/x-pack/plugins/siem/public/containers/global_time/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/global_time/index.tsx rename to x-pack/plugins/siem/public/containers/global_time/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/containers/helpers.test.ts b/x-pack/plugins/siem/public/containers/helpers.test.ts similarity index 93% rename from x-pack/legacy/plugins/siem/public/containers/helpers.test.ts rename to x-pack/plugins/siem/public/containers/helpers.test.ts index 67cfe259927ab2..5d378d79acc7a4 100644 --- a/x-pack/legacy/plugins/siem/public/containers/helpers.test.ts +++ b/x-pack/plugins/siem/public/containers/helpers.test.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { ESQuery } from '../../../../../plugins/siem/common/typed_json'; +import { ESQuery } from '../../common/typed_json'; import { createFilter } from './helpers'; diff --git a/x-pack/legacy/plugins/siem/public/containers/helpers.ts b/x-pack/plugins/siem/public/containers/helpers.ts similarity index 88% rename from x-pack/legacy/plugins/siem/public/containers/helpers.ts rename to x-pack/plugins/siem/public/containers/helpers.ts index 7ff9577bfb05e7..5f66e3f4b88d4d 100644 --- a/x-pack/legacy/plugins/siem/public/containers/helpers.ts +++ b/x-pack/plugins/siem/public/containers/helpers.ts @@ -7,7 +7,7 @@ import { FetchPolicy } from 'apollo-client'; import { isString } from 'lodash/fp'; -import { ESQuery } from '../../../../../plugins/siem/common/typed_json'; +import { ESQuery } from '../../common/typed_json'; export const createFilter = (filterQuery: ESQuery | string | undefined) => isString(filterQuery) ? filterQuery : JSON.stringify(filterQuery); diff --git a/x-pack/legacy/plugins/siem/public/containers/hosts/first_last_seen/first_last_seen.gql_query.ts b/x-pack/plugins/siem/public/containers/hosts/first_last_seen/first_last_seen.gql_query.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/hosts/first_last_seen/first_last_seen.gql_query.ts rename to x-pack/plugins/siem/public/containers/hosts/first_last_seen/first_last_seen.gql_query.ts diff --git a/x-pack/legacy/plugins/siem/public/containers/hosts/first_last_seen/index.ts b/x-pack/plugins/siem/public/containers/hosts/first_last_seen/index.ts similarity index 96% rename from x-pack/legacy/plugins/siem/public/containers/hosts/first_last_seen/index.ts rename to x-pack/plugins/siem/public/containers/hosts/first_last_seen/index.ts index 5806125f2397b9..a460fa8999b57b 100644 --- a/x-pack/legacy/plugins/siem/public/containers/hosts/first_last_seen/index.ts +++ b/x-pack/plugins/siem/public/containers/hosts/first_last_seen/index.ts @@ -8,7 +8,7 @@ import ApolloClient from 'apollo-client'; import { get } from 'lodash/fp'; import React, { useEffect, useState } from 'react'; -import { DEFAULT_INDEX_KEY } from '../../../../../../../plugins/siem/common/constants'; +import { DEFAULT_INDEX_KEY } from '../../../../common/constants'; import { useUiSetting$ } from '../../../lib/kibana'; import { GetHostFirstLastSeenQuery } from '../../../graphql/types'; import { inputsModel } from '../../../store'; diff --git a/x-pack/legacy/plugins/siem/public/containers/hosts/first_last_seen/mock.ts b/x-pack/plugins/siem/public/containers/hosts/first_last_seen/mock.ts similarity index 93% rename from x-pack/legacy/plugins/siem/public/containers/hosts/first_last_seen/mock.ts rename to x-pack/plugins/siem/public/containers/hosts/first_last_seen/mock.ts index 7376f38ae8d0fd..f59df84dacc1b1 100644 --- a/x-pack/legacy/plugins/siem/public/containers/hosts/first_last_seen/mock.ts +++ b/x-pack/plugins/siem/public/containers/hosts/first_last_seen/mock.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { DEFAULT_INDEX_PATTERN } from '../../../../../../../plugins/siem/common/constants'; +import { DEFAULT_INDEX_PATTERN } from '../../../../common/constants'; import { GetHostFirstLastSeenQuery } from '../../../graphql/types'; import { HostFirstLastSeenGqlQuery } from './first_last_seen.gql_query'; diff --git a/x-pack/legacy/plugins/siem/public/containers/hosts/hosts_table.gql_query.ts b/x-pack/plugins/siem/public/containers/hosts/hosts_table.gql_query.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/hosts/hosts_table.gql_query.ts rename to x-pack/plugins/siem/public/containers/hosts/hosts_table.gql_query.ts diff --git a/x-pack/legacy/plugins/siem/public/containers/hosts/index.tsx b/x-pack/plugins/siem/public/containers/hosts/index.tsx similarity index 98% rename from x-pack/legacy/plugins/siem/public/containers/hosts/index.tsx rename to x-pack/plugins/siem/public/containers/hosts/index.tsx index edf3f6855f955f..733c2224d840a7 100644 --- a/x-pack/legacy/plugins/siem/public/containers/hosts/index.tsx +++ b/x-pack/plugins/siem/public/containers/hosts/index.tsx @@ -11,7 +11,7 @@ import { Query } from 'react-apollo'; import { connect } from 'react-redux'; import { compose } from 'redux'; -import { DEFAULT_INDEX_KEY } from '../../../../../../plugins/siem/common/constants'; +import { DEFAULT_INDEX_KEY } from '../../../common/constants'; import { Direction, GetHostsTableQuery, diff --git a/x-pack/legacy/plugins/siem/public/containers/hosts/overview/host_overview.gql_query.ts b/x-pack/plugins/siem/public/containers/hosts/overview/host_overview.gql_query.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/hosts/overview/host_overview.gql_query.ts rename to x-pack/plugins/siem/public/containers/hosts/overview/host_overview.gql_query.ts diff --git a/x-pack/legacy/plugins/siem/public/containers/hosts/overview/index.tsx b/x-pack/plugins/siem/public/containers/hosts/overview/index.tsx similarity index 97% rename from x-pack/legacy/plugins/siem/public/containers/hosts/overview/index.tsx rename to x-pack/plugins/siem/public/containers/hosts/overview/index.tsx index 405c45348b54da..5057e872b53131 100644 --- a/x-pack/legacy/plugins/siem/public/containers/hosts/overview/index.tsx +++ b/x-pack/plugins/siem/public/containers/hosts/overview/index.tsx @@ -10,7 +10,7 @@ import { Query } from 'react-apollo'; import { connect } from 'react-redux'; import { compose } from 'redux'; -import { DEFAULT_INDEX_KEY } from '../../../../../../../plugins/siem/common/constants'; +import { DEFAULT_INDEX_KEY } from '../../../../common/constants'; import { inputsModel, inputsSelectors, State } from '../../../store'; import { getDefaultFetchPolicy } from '../../helpers'; import { QueryTemplate, QueryTemplateProps } from '../../query_template'; diff --git a/x-pack/legacy/plugins/siem/public/containers/ip_overview/index.gql_query.ts b/x-pack/plugins/siem/public/containers/ip_overview/index.gql_query.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/ip_overview/index.gql_query.ts rename to x-pack/plugins/siem/public/containers/ip_overview/index.gql_query.ts diff --git a/x-pack/legacy/plugins/siem/public/containers/ip_overview/index.tsx b/x-pack/plugins/siem/public/containers/ip_overview/index.tsx similarity index 96% rename from x-pack/legacy/plugins/siem/public/containers/ip_overview/index.tsx rename to x-pack/plugins/siem/public/containers/ip_overview/index.tsx index 954bfede07139e..ade94c430c6efb 100644 --- a/x-pack/legacy/plugins/siem/public/containers/ip_overview/index.tsx +++ b/x-pack/plugins/siem/public/containers/ip_overview/index.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { Query } from 'react-apollo'; import { connect, ConnectedProps } from 'react-redux'; -import { DEFAULT_INDEX_KEY } from '../../../../../../plugins/siem/common/constants'; +import { DEFAULT_INDEX_KEY } from '../../../common/constants'; import { GetIpOverviewQuery, IpOverviewData } from '../../graphql/types'; import { networkModel, inputsModel, inputsSelectors, State } from '../../store'; import { useUiSetting } from '../../lib/kibana'; diff --git a/x-pack/legacy/plugins/siem/public/containers/kpi_host_details/index.gql_query.tsx b/x-pack/plugins/siem/public/containers/kpi_host_details/index.gql_query.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/kpi_host_details/index.gql_query.tsx rename to x-pack/plugins/siem/public/containers/kpi_host_details/index.gql_query.tsx diff --git a/x-pack/legacy/plugins/siem/public/containers/kpi_host_details/index.tsx b/x-pack/plugins/siem/public/containers/kpi_host_details/index.tsx similarity index 96% rename from x-pack/legacy/plugins/siem/public/containers/kpi_host_details/index.tsx rename to x-pack/plugins/siem/public/containers/kpi_host_details/index.tsx index 3933aefa60483c..de9d54b1a185c8 100644 --- a/x-pack/legacy/plugins/siem/public/containers/kpi_host_details/index.tsx +++ b/x-pack/plugins/siem/public/containers/kpi_host_details/index.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { Query } from 'react-apollo'; import { connect, ConnectedProps } from 'react-redux'; -import { DEFAULT_INDEX_KEY } from '../../../../../../plugins/siem/common/constants'; +import { DEFAULT_INDEX_KEY } from '../../../common/constants'; import { KpiHostDetailsData, GetKpiHostDetailsQuery } from '../../graphql/types'; import { inputsModel, inputsSelectors, State } from '../../store'; import { useUiSetting } from '../../lib/kibana'; diff --git a/x-pack/legacy/plugins/siem/public/containers/kpi_hosts/index.gql_query.ts b/x-pack/plugins/siem/public/containers/kpi_hosts/index.gql_query.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/kpi_hosts/index.gql_query.ts rename to x-pack/plugins/siem/public/containers/kpi_hosts/index.gql_query.ts diff --git a/x-pack/legacy/plugins/siem/public/containers/kpi_hosts/index.tsx b/x-pack/plugins/siem/public/containers/kpi_hosts/index.tsx similarity index 96% rename from x-pack/legacy/plugins/siem/public/containers/kpi_hosts/index.tsx rename to x-pack/plugins/siem/public/containers/kpi_hosts/index.tsx index 7035d631931188..5be2423e8a162a 100644 --- a/x-pack/legacy/plugins/siem/public/containers/kpi_hosts/index.tsx +++ b/x-pack/plugins/siem/public/containers/kpi_hosts/index.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { Query } from 'react-apollo'; import { connect, ConnectedProps } from 'react-redux'; -import { DEFAULT_INDEX_KEY } from '../../../../../../plugins/siem/common/constants'; +import { DEFAULT_INDEX_KEY } from '../../../common/constants'; import { GetKpiHostsQuery, KpiHostsData } from '../../graphql/types'; import { inputsModel, inputsSelectors, State } from '../../store'; import { useUiSetting } from '../../lib/kibana'; diff --git a/x-pack/legacy/plugins/siem/public/containers/kpi_network/index.gql_query.ts b/x-pack/plugins/siem/public/containers/kpi_network/index.gql_query.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/kpi_network/index.gql_query.ts rename to x-pack/plugins/siem/public/containers/kpi_network/index.gql_query.ts diff --git a/x-pack/legacy/plugins/siem/public/containers/kpi_network/index.tsx b/x-pack/plugins/siem/public/containers/kpi_network/index.tsx similarity index 96% rename from x-pack/legacy/plugins/siem/public/containers/kpi_network/index.tsx rename to x-pack/plugins/siem/public/containers/kpi_network/index.tsx index 002a819417df64..338cdc39b178c1 100644 --- a/x-pack/legacy/plugins/siem/public/containers/kpi_network/index.tsx +++ b/x-pack/plugins/siem/public/containers/kpi_network/index.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { Query } from 'react-apollo'; import { connect, ConnectedProps } from 'react-redux'; -import { DEFAULT_INDEX_KEY } from '../../../../../../plugins/siem/common/constants'; +import { DEFAULT_INDEX_KEY } from '../../../common/constants'; import { GetKpiNetworkQuery, KpiNetworkData } from '../../graphql/types'; import { inputsModel, inputsSelectors, State } from '../../store'; import { useUiSetting } from '../../lib/kibana'; diff --git a/x-pack/legacy/plugins/siem/public/containers/kuery_autocompletion/index.tsx b/x-pack/plugins/siem/public/containers/kuery_autocompletion/index.tsx similarity index 98% rename from x-pack/legacy/plugins/siem/public/containers/kuery_autocompletion/index.tsx rename to x-pack/plugins/siem/public/containers/kuery_autocompletion/index.tsx index af4eb1ff7a5e1f..6120538a01e78b 100644 --- a/x-pack/legacy/plugins/siem/public/containers/kuery_autocompletion/index.tsx +++ b/x-pack/plugins/siem/public/containers/kuery_autocompletion/index.tsx @@ -5,7 +5,7 @@ */ import React, { useState } from 'react'; -import { QuerySuggestion, IIndexPattern } from '../../../../../../../src/plugins/data/public'; +import { QuerySuggestion, IIndexPattern } from '../../../../../../src/plugins/data/public'; import { useKibana } from '../../lib/kibana'; type RendererResult = React.ReactElement | null; diff --git a/x-pack/legacy/plugins/siem/public/containers/matrix_histogram/index.gql_query.ts b/x-pack/plugins/siem/public/containers/matrix_histogram/index.gql_query.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/matrix_histogram/index.gql_query.ts rename to x-pack/plugins/siem/public/containers/matrix_histogram/index.gql_query.ts diff --git a/x-pack/legacy/plugins/siem/public/containers/matrix_histogram/index.test.tsx b/x-pack/plugins/siem/public/containers/matrix_histogram/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/matrix_histogram/index.test.tsx rename to x-pack/plugins/siem/public/containers/matrix_histogram/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/containers/matrix_histogram/index.ts b/x-pack/plugins/siem/public/containers/matrix_histogram/index.ts similarity index 97% rename from x-pack/legacy/plugins/siem/public/containers/matrix_histogram/index.ts rename to x-pack/plugins/siem/public/containers/matrix_histogram/index.ts index 55d7e7cdc6e543..18bb611191bbc8 100644 --- a/x-pack/legacy/plugins/siem/public/containers/matrix_histogram/index.ts +++ b/x-pack/plugins/siem/public/containers/matrix_histogram/index.ts @@ -7,7 +7,7 @@ import { isEmpty } from 'lodash/fp'; import { useEffect, useMemo, useState, useRef } from 'react'; -import { DEFAULT_INDEX_KEY } from '../../../../../../plugins/siem/common/constants'; +import { DEFAULT_INDEX_KEY } from '../../../common/constants'; import { MatrixHistogramQueryProps } from '../../components/matrix_histogram/types'; import { errorToToaster, useStateToaster } from '../../components/toasters'; import { useUiSetting$ } from '../../lib/kibana'; diff --git a/x-pack/legacy/plugins/siem/public/containers/network_dns/index.gql_query.ts b/x-pack/plugins/siem/public/containers/network_dns/index.gql_query.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/network_dns/index.gql_query.ts rename to x-pack/plugins/siem/public/containers/network_dns/index.gql_query.ts diff --git a/x-pack/legacy/plugins/siem/public/containers/network_dns/index.tsx b/x-pack/plugins/siem/public/containers/network_dns/index.tsx similarity index 98% rename from x-pack/legacy/plugins/siem/public/containers/network_dns/index.tsx rename to x-pack/plugins/siem/public/containers/network_dns/index.tsx index 060b66fc3cbbef..04c8783c30a0ff 100644 --- a/x-pack/legacy/plugins/siem/public/containers/network_dns/index.tsx +++ b/x-pack/plugins/siem/public/containers/network_dns/index.tsx @@ -12,7 +12,7 @@ import { compose } from 'redux'; import { DocumentNode } from 'graphql'; import { ScaleType } from '@elastic/charts'; -import { DEFAULT_INDEX_KEY } from '../../../../../../plugins/siem/common/constants'; +import { DEFAULT_INDEX_KEY } from '../../../common/constants'; import { GetNetworkDnsQuery, NetworkDnsEdges, diff --git a/x-pack/legacy/plugins/siem/public/containers/network_http/index.gql_query.ts b/x-pack/plugins/siem/public/containers/network_http/index.gql_query.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/network_http/index.gql_query.ts rename to x-pack/plugins/siem/public/containers/network_http/index.gql_query.ts diff --git a/x-pack/legacy/plugins/siem/public/containers/network_http/index.tsx b/x-pack/plugins/siem/public/containers/network_http/index.tsx similarity index 98% rename from x-pack/legacy/plugins/siem/public/containers/network_http/index.tsx rename to x-pack/plugins/siem/public/containers/network_http/index.tsx index b13637fa88d07b..bf4e64f63d5599 100644 --- a/x-pack/legacy/plugins/siem/public/containers/network_http/index.tsx +++ b/x-pack/plugins/siem/public/containers/network_http/index.tsx @@ -10,7 +10,7 @@ import { Query } from 'react-apollo'; import { connect } from 'react-redux'; import { compose } from 'redux'; -import { DEFAULT_INDEX_KEY } from '../../../../../../plugins/siem/common/constants'; +import { DEFAULT_INDEX_KEY } from '../../../common/constants'; import { GetNetworkHttpQuery, NetworkHttpEdges, diff --git a/x-pack/legacy/plugins/siem/public/containers/network_top_countries/index.gql_query.ts b/x-pack/plugins/siem/public/containers/network_top_countries/index.gql_query.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/network_top_countries/index.gql_query.ts rename to x-pack/plugins/siem/public/containers/network_top_countries/index.gql_query.ts diff --git a/x-pack/legacy/plugins/siem/public/containers/network_top_countries/index.tsx b/x-pack/plugins/siem/public/containers/network_top_countries/index.tsx similarity index 98% rename from x-pack/legacy/plugins/siem/public/containers/network_top_countries/index.tsx rename to x-pack/plugins/siem/public/containers/network_top_countries/index.tsx index 17a14ce3a11205..bd1e1a002bbcdc 100644 --- a/x-pack/legacy/plugins/siem/public/containers/network_top_countries/index.tsx +++ b/x-pack/plugins/siem/public/containers/network_top_countries/index.tsx @@ -10,7 +10,7 @@ import { Query } from 'react-apollo'; import { connect } from 'react-redux'; import { compose } from 'redux'; -import { DEFAULT_INDEX_KEY } from '../../../../../../plugins/siem/common/constants'; +import { DEFAULT_INDEX_KEY } from '../../../common/constants'; import { FlowTargetSourceDest, GetNetworkTopCountriesQuery, diff --git a/x-pack/legacy/plugins/siem/public/containers/network_top_n_flow/index.gql_query.ts b/x-pack/plugins/siem/public/containers/network_top_n_flow/index.gql_query.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/network_top_n_flow/index.gql_query.ts rename to x-pack/plugins/siem/public/containers/network_top_n_flow/index.gql_query.ts diff --git a/x-pack/legacy/plugins/siem/public/containers/network_top_n_flow/index.tsx b/x-pack/plugins/siem/public/containers/network_top_n_flow/index.tsx similarity index 98% rename from x-pack/legacy/plugins/siem/public/containers/network_top_n_flow/index.tsx rename to x-pack/plugins/siem/public/containers/network_top_n_flow/index.tsx index fdac282292a4bc..f0f1f8257f29f1 100644 --- a/x-pack/legacy/plugins/siem/public/containers/network_top_n_flow/index.tsx +++ b/x-pack/plugins/siem/public/containers/network_top_n_flow/index.tsx @@ -10,7 +10,7 @@ import { Query } from 'react-apollo'; import { connect } from 'react-redux'; import { compose } from 'redux'; -import { DEFAULT_INDEX_KEY } from '../../../../../../plugins/siem/common/constants'; +import { DEFAULT_INDEX_KEY } from '../../../common/constants'; import { FlowTargetSourceDest, GetNetworkTopNFlowQuery, diff --git a/x-pack/legacy/plugins/siem/public/containers/overview/overview_host/index.gql_query.ts b/x-pack/plugins/siem/public/containers/overview/overview_host/index.gql_query.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/overview/overview_host/index.gql_query.ts rename to x-pack/plugins/siem/public/containers/overview/overview_host/index.gql_query.ts diff --git a/x-pack/legacy/plugins/siem/public/containers/overview/overview_host/index.tsx b/x-pack/plugins/siem/public/containers/overview/overview_host/index.tsx similarity index 96% rename from x-pack/legacy/plugins/siem/public/containers/overview/overview_host/index.tsx rename to x-pack/plugins/siem/public/containers/overview/overview_host/index.tsx index e7b68bf557a219..2dd9ccf24d802f 100644 --- a/x-pack/legacy/plugins/siem/public/containers/overview/overview_host/index.tsx +++ b/x-pack/plugins/siem/public/containers/overview/overview_host/index.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { Query } from 'react-apollo'; import { connect, ConnectedProps } from 'react-redux'; -import { DEFAULT_INDEX_KEY } from '../../../../../../../plugins/siem/common/constants'; +import { DEFAULT_INDEX_KEY } from '../../../../common/constants'; import { GetOverviewHostQuery, OverviewHostData } from '../../../graphql/types'; import { useUiSetting } from '../../../lib/kibana'; import { inputsModel, inputsSelectors } from '../../../store/inputs'; diff --git a/x-pack/legacy/plugins/siem/public/containers/overview/overview_network/index.gql_query.ts b/x-pack/plugins/siem/public/containers/overview/overview_network/index.gql_query.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/overview/overview_network/index.gql_query.ts rename to x-pack/plugins/siem/public/containers/overview/overview_network/index.gql_query.ts diff --git a/x-pack/legacy/plugins/siem/public/containers/overview/overview_network/index.tsx b/x-pack/plugins/siem/public/containers/overview/overview_network/index.tsx similarity index 96% rename from x-pack/legacy/plugins/siem/public/containers/overview/overview_network/index.tsx rename to x-pack/plugins/siem/public/containers/overview/overview_network/index.tsx index c7f72ac6193f40..d0acd41c224a5f 100644 --- a/x-pack/legacy/plugins/siem/public/containers/overview/overview_network/index.tsx +++ b/x-pack/plugins/siem/public/containers/overview/overview_network/index.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { Query } from 'react-apollo'; import { connect, ConnectedProps } from 'react-redux'; -import { DEFAULT_INDEX_KEY } from '../../../../../../../plugins/siem/common/constants'; +import { DEFAULT_INDEX_KEY } from '../../../../common/constants'; import { GetOverviewNetworkQuery, OverviewNetworkData } from '../../../graphql/types'; import { useUiSetting } from '../../../lib/kibana'; import { State } from '../../../store'; diff --git a/x-pack/legacy/plugins/siem/public/containers/query_template.tsx b/x-pack/plugins/siem/public/containers/query_template.tsx similarity index 97% rename from x-pack/legacy/plugins/siem/public/containers/query_template.tsx rename to x-pack/plugins/siem/public/containers/query_template.tsx index c33f5fd89a79b4..dfb452c24b86e5 100644 --- a/x-pack/legacy/plugins/siem/public/containers/query_template.tsx +++ b/x-pack/plugins/siem/public/containers/query_template.tsx @@ -8,7 +8,7 @@ import { ApolloQueryResult } from 'apollo-client'; import React from 'react'; import { FetchMoreOptions, FetchMoreQueryOptions, OperationVariables } from 'react-apollo'; -import { ESQuery } from '../../../../../plugins/siem/common/typed_json'; +import { ESQuery } from '../../common/typed_json'; export interface QueryTemplateProps { id?: string; diff --git a/x-pack/legacy/plugins/siem/public/containers/query_template_paginated.tsx b/x-pack/plugins/siem/public/containers/query_template_paginated.tsx similarity index 97% rename from x-pack/legacy/plugins/siem/public/containers/query_template_paginated.tsx rename to x-pack/plugins/siem/public/containers/query_template_paginated.tsx index 45041a64476118..db618f216d83e7 100644 --- a/x-pack/legacy/plugins/siem/public/containers/query_template_paginated.tsx +++ b/x-pack/plugins/siem/public/containers/query_template_paginated.tsx @@ -10,7 +10,7 @@ import React from 'react'; import { FetchMoreOptions, FetchMoreQueryOptions, OperationVariables } from 'react-apollo'; import deepEqual from 'fast-deep-equal'; -import { ESQuery } from '../../../../../plugins/siem/common/typed_json'; +import { ESQuery } from '../../common/typed_json'; import { inputsModel } from '../store/model'; import { generateTablePaginationOptions } from '../components/paginated_table/helpers'; diff --git a/x-pack/legacy/plugins/siem/public/containers/source/index.gql_query.ts b/x-pack/plugins/siem/public/containers/source/index.gql_query.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/source/index.gql_query.ts rename to x-pack/plugins/siem/public/containers/source/index.gql_query.ts diff --git a/x-pack/legacy/plugins/siem/public/containers/source/index.test.tsx b/x-pack/plugins/siem/public/containers/source/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/source/index.test.tsx rename to x-pack/plugins/siem/public/containers/source/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/containers/source/index.tsx b/x-pack/plugins/siem/public/containers/source/index.tsx similarity index 98% rename from x-pack/legacy/plugins/siem/public/containers/source/index.tsx rename to x-pack/plugins/siem/public/containers/source/index.tsx index 3467e2b5f18d84..e9359fdb195877 100644 --- a/x-pack/legacy/plugins/siem/public/containers/source/index.tsx +++ b/x-pack/plugins/siem/public/containers/source/index.tsx @@ -11,7 +11,7 @@ import React, { useEffect, useMemo, useState } from 'react'; import memoizeOne from 'memoize-one'; import { IIndexPattern } from 'src/plugins/data/public'; -import { DEFAULT_INDEX_KEY } from '../../../../../../plugins/siem/common/constants'; +import { DEFAULT_INDEX_KEY } from '../../../common/constants'; import { useUiSetting$ } from '../../lib/kibana'; import { IndexField, SourceQuery } from '../../graphql/types'; diff --git a/x-pack/legacy/plugins/siem/public/containers/source/mock.ts b/x-pack/plugins/siem/public/containers/source/mock.ts similarity index 99% rename from x-pack/legacy/plugins/siem/public/containers/source/mock.ts rename to x-pack/plugins/siem/public/containers/source/mock.ts index 805c69f7fcc12a..092aad9e7400cc 100644 --- a/x-pack/legacy/plugins/siem/public/containers/source/mock.ts +++ b/x-pack/plugins/siem/public/containers/source/mock.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { DEFAULT_INDEX_PATTERN } from '../../../../../../plugins/siem/common/constants'; +import { DEFAULT_INDEX_PATTERN } from '../../../common/constants'; import { BrowserFields } from '.'; import { sourceQuery } from './index.gql_query'; diff --git a/x-pack/legacy/plugins/siem/public/containers/timeline/all/api.ts b/x-pack/plugins/siem/public/containers/timeline/all/api.ts similarity index 92% rename from x-pack/legacy/plugins/siem/public/containers/timeline/all/api.ts rename to x-pack/plugins/siem/public/containers/timeline/all/api.ts index 32ac62d594e1c9..09c8374bad1138 100644 --- a/x-pack/legacy/plugins/siem/public/containers/timeline/all/api.ts +++ b/x-pack/plugins/siem/public/containers/timeline/all/api.ts @@ -4,10 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { - TIMELINE_IMPORT_URL, - TIMELINE_EXPORT_URL, -} from '../../../../../../../plugins/siem/common/constants'; +import { TIMELINE_IMPORT_URL, TIMELINE_EXPORT_URL } from '../../../../common/constants'; import { ImportDataProps, ImportDataResponse } from '../../detection_engine/rules'; import { KibanaServices } from '../../../lib/kibana'; import { ExportSelectedData } from '../../../components/generic_downloader'; diff --git a/x-pack/legacy/plugins/siem/public/containers/timeline/all/index.gql_query.ts b/x-pack/plugins/siem/public/containers/timeline/all/index.gql_query.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/timeline/all/index.gql_query.ts rename to x-pack/plugins/siem/public/containers/timeline/all/index.gql_query.ts diff --git a/x-pack/legacy/plugins/siem/public/containers/timeline/all/index.tsx b/x-pack/plugins/siem/public/containers/timeline/all/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/timeline/all/index.tsx rename to x-pack/plugins/siem/public/containers/timeline/all/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/containers/timeline/delete/persist.gql_query.ts b/x-pack/plugins/siem/public/containers/timeline/delete/persist.gql_query.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/timeline/delete/persist.gql_query.ts rename to x-pack/plugins/siem/public/containers/timeline/delete/persist.gql_query.ts diff --git a/x-pack/legacy/plugins/siem/public/containers/timeline/details/index.gql_query.ts b/x-pack/plugins/siem/public/containers/timeline/details/index.gql_query.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/timeline/details/index.gql_query.ts rename to x-pack/plugins/siem/public/containers/timeline/details/index.gql_query.ts diff --git a/x-pack/legacy/plugins/siem/public/containers/timeline/details/index.tsx b/x-pack/plugins/siem/public/containers/timeline/details/index.tsx similarity index 95% rename from x-pack/legacy/plugins/siem/public/containers/timeline/details/index.tsx rename to x-pack/plugins/siem/public/containers/timeline/details/index.tsx index 0debed9c5f9aae..cf1b8954307e7b 100644 --- a/x-pack/legacy/plugins/siem/public/containers/timeline/details/index.tsx +++ b/x-pack/plugins/siem/public/containers/timeline/details/index.tsx @@ -9,7 +9,7 @@ import memoizeOne from 'memoize-one'; import React from 'react'; import { Query } from 'react-apollo'; -import { DEFAULT_INDEX_KEY } from '../../../../../../../plugins/siem/common/constants'; +import { DEFAULT_INDEX_KEY } from '../../../../common/constants'; import { DetailItem, GetTimelineDetailsQuery } from '../../../graphql/types'; import { useUiSetting } from '../../../lib/kibana'; diff --git a/x-pack/legacy/plugins/siem/public/containers/timeline/favorite/persist.gql_query.ts b/x-pack/plugins/siem/public/containers/timeline/favorite/persist.gql_query.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/timeline/favorite/persist.gql_query.ts rename to x-pack/plugins/siem/public/containers/timeline/favorite/persist.gql_query.ts diff --git a/x-pack/legacy/plugins/siem/public/containers/timeline/index.gql_query.ts b/x-pack/plugins/siem/public/containers/timeline/index.gql_query.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/timeline/index.gql_query.ts rename to x-pack/plugins/siem/public/containers/timeline/index.gql_query.ts diff --git a/x-pack/legacy/plugins/siem/public/containers/timeline/index.tsx b/x-pack/plugins/siem/public/containers/timeline/index.tsx similarity index 97% rename from x-pack/legacy/plugins/siem/public/containers/timeline/index.tsx rename to x-pack/plugins/siem/public/containers/timeline/index.tsx index 3c089ef6926dde..6e09e124696b6f 100644 --- a/x-pack/legacy/plugins/siem/public/containers/timeline/index.tsx +++ b/x-pack/plugins/siem/public/containers/timeline/index.tsx @@ -11,8 +11,8 @@ import { Query } from 'react-apollo'; import { compose, Dispatch } from 'redux'; import { connect, ConnectedProps } from 'react-redux'; -import { DEFAULT_INDEX_KEY } from '../../../../../../plugins/siem/common/constants'; -import { IIndexPattern } from '../../../../../../../src/plugins/data/common/index_patterns'; +import { DEFAULT_INDEX_KEY } from '../../../common/constants'; +import { IIndexPattern } from '../../../../../../src/plugins/data/common/index_patterns'; import { GetTimelineQuery, PageInfo, diff --git a/x-pack/legacy/plugins/siem/public/containers/timeline/notes/persist.gql_query.ts b/x-pack/plugins/siem/public/containers/timeline/notes/persist.gql_query.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/timeline/notes/persist.gql_query.ts rename to x-pack/plugins/siem/public/containers/timeline/notes/persist.gql_query.ts diff --git a/x-pack/legacy/plugins/siem/public/containers/timeline/one/index.gql_query.ts b/x-pack/plugins/siem/public/containers/timeline/one/index.gql_query.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/timeline/one/index.gql_query.ts rename to x-pack/plugins/siem/public/containers/timeline/one/index.gql_query.ts diff --git a/x-pack/legacy/plugins/siem/public/containers/timeline/persist.gql_query.ts b/x-pack/plugins/siem/public/containers/timeline/persist.gql_query.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/timeline/persist.gql_query.ts rename to x-pack/plugins/siem/public/containers/timeline/persist.gql_query.ts diff --git a/x-pack/legacy/plugins/siem/public/containers/timeline/pinned_event/persist.gql_query.ts b/x-pack/plugins/siem/public/containers/timeline/pinned_event/persist.gql_query.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/timeline/pinned_event/persist.gql_query.ts rename to x-pack/plugins/siem/public/containers/timeline/pinned_event/persist.gql_query.ts diff --git a/x-pack/legacy/plugins/siem/public/containers/tls/index.gql_query.ts b/x-pack/plugins/siem/public/containers/tls/index.gql_query.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/tls/index.gql_query.ts rename to x-pack/plugins/siem/public/containers/tls/index.gql_query.ts diff --git a/x-pack/legacy/plugins/siem/public/containers/tls/index.tsx b/x-pack/plugins/siem/public/containers/tls/index.tsx similarity index 98% rename from x-pack/legacy/plugins/siem/public/containers/tls/index.tsx rename to x-pack/plugins/siem/public/containers/tls/index.tsx index 20617b88bda941..3738355c8846eb 100644 --- a/x-pack/legacy/plugins/siem/public/containers/tls/index.tsx +++ b/x-pack/plugins/siem/public/containers/tls/index.tsx @@ -10,7 +10,7 @@ import { Query } from 'react-apollo'; import { connect } from 'react-redux'; import { compose } from 'redux'; -import { DEFAULT_INDEX_KEY } from '../../../../../../plugins/siem/common/constants'; +import { DEFAULT_INDEX_KEY } from '../../../common/constants'; import { PageInfoPaginated, TlsEdges, diff --git a/x-pack/legacy/plugins/siem/public/containers/uncommon_processes/index.gql_query.ts b/x-pack/plugins/siem/public/containers/uncommon_processes/index.gql_query.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/uncommon_processes/index.gql_query.ts rename to x-pack/plugins/siem/public/containers/uncommon_processes/index.gql_query.ts diff --git a/x-pack/legacy/plugins/siem/public/containers/uncommon_processes/index.tsx b/x-pack/plugins/siem/public/containers/uncommon_processes/index.tsx similarity index 98% rename from x-pack/legacy/plugins/siem/public/containers/uncommon_processes/index.tsx rename to x-pack/plugins/siem/public/containers/uncommon_processes/index.tsx index 72e4e46bc6ae03..0a2ce67d9be805 100644 --- a/x-pack/legacy/plugins/siem/public/containers/uncommon_processes/index.tsx +++ b/x-pack/plugins/siem/public/containers/uncommon_processes/index.tsx @@ -10,7 +10,7 @@ import { Query } from 'react-apollo'; import { connect, ConnectedProps } from 'react-redux'; import { compose } from 'redux'; -import { DEFAULT_INDEX_KEY } from '../../../../../../plugins/siem/common/constants'; +import { DEFAULT_INDEX_KEY } from '../../../common/constants'; import { GetUncommonProcessesQuery, PageInfoPaginated, diff --git a/x-pack/legacy/plugins/siem/public/containers/users/index.gql_query.ts b/x-pack/plugins/siem/public/containers/users/index.gql_query.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/containers/users/index.gql_query.ts rename to x-pack/plugins/siem/public/containers/users/index.gql_query.ts diff --git a/x-pack/legacy/plugins/siem/public/containers/users/index.tsx b/x-pack/plugins/siem/public/containers/users/index.tsx similarity index 98% rename from x-pack/legacy/plugins/siem/public/containers/users/index.tsx rename to x-pack/plugins/siem/public/containers/users/index.tsx index 658cb5785b54c6..5f71449c524606 100644 --- a/x-pack/legacy/plugins/siem/public/containers/users/index.tsx +++ b/x-pack/plugins/siem/public/containers/users/index.tsx @@ -10,7 +10,7 @@ import { Query } from 'react-apollo'; import { connect, ConnectedProps } from 'react-redux'; import { compose } from 'redux'; -import { DEFAULT_INDEX_KEY } from '../../../../../../plugins/siem/common/constants'; +import { DEFAULT_INDEX_KEY } from '../../../common/constants'; import { GetUsersQuery, FlowTarget, PageInfoPaginated, UsersEdges } from '../../graphql/types'; import { inputsModel, networkModel, networkSelectors, State, inputsSelectors } from '../../store'; import { withKibana, WithKibanaProps } from '../../lib/kibana'; diff --git a/x-pack/legacy/plugins/siem/public/graphql/introspection.json b/x-pack/plugins/siem/public/graphql/introspection.json similarity index 100% rename from x-pack/legacy/plugins/siem/public/graphql/introspection.json rename to x-pack/plugins/siem/public/graphql/introspection.json diff --git a/x-pack/legacy/plugins/siem/public/graphql/types.ts b/x-pack/plugins/siem/public/graphql/types.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/graphql/types.ts rename to x-pack/plugins/siem/public/graphql/types.ts diff --git a/x-pack/legacy/plugins/siem/public/hooks/api/__mock__/api.tsx b/x-pack/plugins/siem/public/hooks/api/__mock__/api.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/hooks/api/__mock__/api.tsx rename to x-pack/plugins/siem/public/hooks/api/__mock__/api.tsx diff --git a/x-pack/legacy/plugins/siem/public/hooks/api/api.tsx b/x-pack/plugins/siem/public/hooks/api/api.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/hooks/api/api.tsx rename to x-pack/plugins/siem/public/hooks/api/api.tsx diff --git a/x-pack/legacy/plugins/siem/public/hooks/api/helpers.test.tsx b/x-pack/plugins/siem/public/hooks/api/helpers.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/hooks/api/helpers.test.tsx rename to x-pack/plugins/siem/public/hooks/api/helpers.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/hooks/api/helpers.tsx b/x-pack/plugins/siem/public/hooks/api/helpers.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/hooks/api/helpers.tsx rename to x-pack/plugins/siem/public/hooks/api/helpers.tsx diff --git a/x-pack/legacy/plugins/siem/public/hooks/translations.ts b/x-pack/plugins/siem/public/hooks/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/hooks/translations.ts rename to x-pack/plugins/siem/public/hooks/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/hooks/types.ts b/x-pack/plugins/siem/public/hooks/types.ts similarity index 88% rename from x-pack/legacy/plugins/siem/public/hooks/types.ts rename to x-pack/plugins/siem/public/hooks/types.ts index 301b8bd6553337..6527904964d000 100644 --- a/x-pack/legacy/plugins/siem/public/hooks/types.ts +++ b/x-pack/plugins/siem/public/hooks/types.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { SimpleSavedObject } from '../../../../../../src/core/public'; +import { SimpleSavedObject } from '../../../../../src/core/public'; // eslint-disable-next-line @typescript-eslint/consistent-type-definitions export type IndexPatternSavedObjectAttributes = { title: string }; diff --git a/x-pack/legacy/plugins/siem/public/hooks/use_index_patterns.tsx b/x-pack/plugins/siem/public/hooks/use_index_patterns.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/hooks/use_index_patterns.tsx rename to x-pack/plugins/siem/public/hooks/use_index_patterns.tsx diff --git a/x-pack/legacy/plugins/siem/public/index.ts b/x-pack/plugins/siem/public/index.ts similarity index 65% rename from x-pack/legacy/plugins/siem/public/index.ts rename to x-pack/plugins/siem/public/index.ts index 3a396a0637ea12..46f72c1fa17c8d 100644 --- a/x-pack/legacy/plugins/siem/public/index.ts +++ b/x-pack/plugins/siem/public/index.ts @@ -4,6 +4,9 @@ * you may not use this file except in compliance with the Elastic License. */ -import { Plugin, PluginInitializerContext } from './plugin'; +import { PluginInitializerContext } from '../../../../src/core/public'; +import { Plugin, PluginSetup, PluginStart } from './plugin'; export const plugin = (context: PluginInitializerContext): Plugin => new Plugin(context); + +export { Plugin, PluginSetup, PluginStart }; diff --git a/x-pack/legacy/plugins/siem/public/lib/clipboard/clipboard.tsx b/x-pack/plugins/siem/public/lib/clipboard/clipboard.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/lib/clipboard/clipboard.tsx rename to x-pack/plugins/siem/public/lib/clipboard/clipboard.tsx diff --git a/x-pack/legacy/plugins/siem/public/lib/clipboard/translations.ts b/x-pack/plugins/siem/public/lib/clipboard/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/lib/clipboard/translations.ts rename to x-pack/plugins/siem/public/lib/clipboard/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/lib/clipboard/with_copy_to_clipboard.tsx b/x-pack/plugins/siem/public/lib/clipboard/with_copy_to_clipboard.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/lib/clipboard/with_copy_to_clipboard.tsx rename to x-pack/plugins/siem/public/lib/clipboard/with_copy_to_clipboard.tsx diff --git a/x-pack/legacy/plugins/siem/public/lib/compose/helpers.test.ts b/x-pack/plugins/siem/public/lib/compose/helpers.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/lib/compose/helpers.test.ts rename to x-pack/plugins/siem/public/lib/compose/helpers.test.ts diff --git a/x-pack/legacy/plugins/siem/public/lib/compose/helpers.ts b/x-pack/plugins/siem/public/lib/compose/helpers.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/lib/compose/helpers.ts rename to x-pack/plugins/siem/public/lib/compose/helpers.ts diff --git a/x-pack/legacy/plugins/siem/public/lib/compose/kibana_compose.tsx b/x-pack/plugins/siem/public/lib/compose/kibana_compose.tsx similarity index 94% rename from x-pack/legacy/plugins/siem/public/lib/compose/kibana_compose.tsx rename to x-pack/plugins/siem/public/lib/compose/kibana_compose.tsx index c742ced4c504c7..fb30c9a5411ed7 100644 --- a/x-pack/legacy/plugins/siem/public/lib/compose/kibana_compose.tsx +++ b/x-pack/plugins/siem/public/lib/compose/kibana_compose.tsx @@ -8,8 +8,8 @@ import { InMemoryCache, IntrospectionFragmentMatcher } from 'apollo-cache-inmemo import ApolloClient from 'apollo-client'; import { ApolloLink } from 'apollo-link'; +import { CoreStart } from '../../../../../../src/core/public'; import introspectionQueryResultData from '../../graphql/introspection.json'; -import { CoreStart } from '../../plugin'; import { AppFrontendLibs } from '../lib'; import { getLinks } from './helpers'; diff --git a/x-pack/legacy/plugins/siem/public/lib/connectors/config.ts b/x-pack/plugins/siem/public/lib/connectors/config.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/lib/connectors/config.ts rename to x-pack/plugins/siem/public/lib/connectors/config.ts diff --git a/x-pack/legacy/plugins/siem/public/lib/connectors/index.ts b/x-pack/plugins/siem/public/lib/connectors/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/lib/connectors/index.ts rename to x-pack/plugins/siem/public/lib/connectors/index.ts diff --git a/x-pack/legacy/plugins/siem/public/lib/connectors/logos/servicenow.svg b/x-pack/plugins/siem/public/lib/connectors/logos/servicenow.svg similarity index 100% rename from x-pack/legacy/plugins/siem/public/lib/connectors/logos/servicenow.svg rename to x-pack/plugins/siem/public/lib/connectors/logos/servicenow.svg diff --git a/x-pack/legacy/plugins/siem/public/lib/connectors/servicenow.tsx b/x-pack/plugins/siem/public/lib/connectors/servicenow.tsx similarity index 99% rename from x-pack/legacy/plugins/siem/public/lib/connectors/servicenow.tsx rename to x-pack/plugins/siem/public/lib/connectors/servicenow.tsx index 536798ffad41b5..9fe0b4a957cebd 100644 --- a/x-pack/legacy/plugins/siem/public/lib/connectors/servicenow.tsx +++ b/x-pack/plugins/siem/public/lib/connectors/servicenow.tsx @@ -21,7 +21,7 @@ import { ValidationResult, ActionParamsProps, // eslint-disable-next-line @kbn/eslint/no-restricted-paths -} from '../../../../../../plugins/triggers_actions_ui/public/types'; +} from '../../../../triggers_actions_ui/public/types'; import { FieldMapping } from '../../pages/case/components/configure_cases/field_mapping'; diff --git a/x-pack/legacy/plugins/siem/public/lib/connectors/translations.ts b/x-pack/plugins/siem/public/lib/connectors/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/lib/connectors/translations.ts rename to x-pack/plugins/siem/public/lib/connectors/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/lib/connectors/types.ts b/x-pack/plugins/siem/public/lib/connectors/types.ts similarity index 85% rename from x-pack/legacy/plugins/siem/public/lib/connectors/types.ts rename to x-pack/plugins/siem/public/lib/connectors/types.ts index 66326a6590debc..2def4b5107aee8 100644 --- a/x-pack/legacy/plugins/siem/public/lib/connectors/types.ts +++ b/x-pack/plugins/siem/public/lib/connectors/types.ts @@ -10,7 +10,7 @@ import { ConfigType, SecretsType, -} from '../../../../../../plugins/actions/server/builtin_action_types/servicenow/types'; +} from '../../../../actions/server/builtin_action_types/servicenow/types'; export interface ServiceNowActionConnector { config: ConfigType; diff --git a/x-pack/legacy/plugins/siem/public/lib/connectors/validators.ts b/x-pack/plugins/siem/public/lib/connectors/validators.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/lib/connectors/validators.ts rename to x-pack/plugins/siem/public/lib/connectors/validators.ts diff --git a/x-pack/legacy/plugins/siem/public/lib/helpers/index.test.tsx b/x-pack/plugins/siem/public/lib/helpers/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/lib/helpers/index.test.tsx rename to x-pack/plugins/siem/public/lib/helpers/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/lib/helpers/index.tsx b/x-pack/plugins/siem/public/lib/helpers/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/lib/helpers/index.tsx rename to x-pack/plugins/siem/public/lib/helpers/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/lib/helpers/scheduler.ts b/x-pack/plugins/siem/public/lib/helpers/scheduler.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/lib/helpers/scheduler.ts rename to x-pack/plugins/siem/public/lib/helpers/scheduler.ts diff --git a/x-pack/legacy/plugins/siem/public/lib/history/index.ts b/x-pack/plugins/siem/public/lib/history/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/lib/history/index.ts rename to x-pack/plugins/siem/public/lib/history/index.ts diff --git a/x-pack/legacy/plugins/siem/public/lib/keury/index.test.ts b/x-pack/plugins/siem/public/lib/keury/index.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/lib/keury/index.test.ts rename to x-pack/plugins/siem/public/lib/keury/index.test.ts diff --git a/x-pack/legacy/plugins/siem/public/lib/keury/index.ts b/x-pack/plugins/siem/public/lib/keury/index.ts similarity index 95% rename from x-pack/legacy/plugins/siem/public/lib/keury/index.ts rename to x-pack/plugins/siem/public/lib/keury/index.ts index 53f845de48fb31..810baa89cd60dc 100644 --- a/x-pack/legacy/plugins/siem/public/lib/keury/index.ts +++ b/x-pack/plugins/siem/public/lib/keury/index.ts @@ -12,9 +12,9 @@ import { esQuery, esKuery, IIndexPattern, -} from '../../../../../../../src/plugins/data/public'; +} from '../../../../../../src/plugins/data/public'; -import { JsonObject } from '../../../../../../../src/plugins/kibana_utils/public'; +import { JsonObject } from '../../../../../../src/plugins/kibana_utils/public'; import { KueryFilterQuery } from '../../store'; diff --git a/x-pack/legacy/plugins/siem/public/lib/kibana/__mocks__/index.ts b/x-pack/plugins/siem/public/lib/kibana/__mocks__/index.ts similarity index 86% rename from x-pack/legacy/plugins/siem/public/lib/kibana/__mocks__/index.ts rename to x-pack/plugins/siem/public/lib/kibana/__mocks__/index.ts index 227680d79912f4..c3e1f35f373569 100644 --- a/x-pack/legacy/plugins/siem/public/lib/kibana/__mocks__/index.ts +++ b/x-pack/plugins/siem/public/lib/kibana/__mocks__/index.ts @@ -12,12 +12,13 @@ import { createWithKibanaMock, } from '../../../mock/kibana_react'; -export const KibanaServices = { get: jest.fn() }; +export const KibanaServices = { get: jest.fn(), getKibanaVersion: jest.fn(() => '8.0.0') }; export const useKibana = jest.fn(createUseKibanaMock()); export const useUiSetting = jest.fn(createUseUiSettingMock()); export const useUiSetting$ = jest.fn(createUseUiSetting$Mock()); export const useTimeZone = jest.fn(); export const useDateFormat = jest.fn(); export const useBasePath = jest.fn(() => '/test/base/path'); +export const useCurrentUser = jest.fn(); export const withKibana = jest.fn(createWithKibanaMock()); export const KibanaContextProvider = jest.fn(createKibanaContextProviderMock()); diff --git a/x-pack/legacy/plugins/siem/public/lib/kibana/hooks.ts b/x-pack/plugins/siem/public/lib/kibana/hooks.ts similarity index 94% rename from x-pack/legacy/plugins/siem/public/lib/kibana/hooks.ts rename to x-pack/plugins/siem/public/lib/kibana/hooks.ts index e1d0a445bf2fb0..d62701fe5944ab 100644 --- a/x-pack/legacy/plugins/siem/public/lib/kibana/hooks.ts +++ b/x-pack/plugins/siem/public/lib/kibana/hooks.ts @@ -8,13 +8,10 @@ import moment from 'moment-timezone'; import { useCallback, useEffect, useState } from 'react'; import { i18n } from '@kbn/i18n'; -import { - DEFAULT_DATE_FORMAT, - DEFAULT_DATE_FORMAT_TZ, -} from '../../../../../../plugins/siem/common/constants'; +import { DEFAULT_DATE_FORMAT, DEFAULT_DATE_FORMAT_TZ } from '../../../common/constants'; import { useUiSetting, useKibana } from './kibana_react'; import { errorToToaster, useStateToaster } from '../../components/toasters'; -import { AuthenticatedUser } from '../../../../../../plugins/security/common/model'; +import { AuthenticatedUser } from '../../../../security/common/model'; import { convertToCamelCase } from '../../containers/case/utils'; export const useDateFormat = (): string => useUiSetting(DEFAULT_DATE_FORMAT); diff --git a/x-pack/legacy/plugins/siem/public/lib/kibana/index.ts b/x-pack/plugins/siem/public/lib/kibana/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/lib/kibana/index.ts rename to x-pack/plugins/siem/public/lib/kibana/index.ts diff --git a/x-pack/legacy/plugins/siem/public/lib/kibana/kibana_react.ts b/x-pack/plugins/siem/public/lib/kibana/kibana_react.ts similarity index 92% rename from x-pack/legacy/plugins/siem/public/lib/kibana/kibana_react.ts rename to x-pack/plugins/siem/public/lib/kibana/kibana_react.ts index 012a1cfef5da2d..88be8d25e5840a 100644 --- a/x-pack/legacy/plugins/siem/public/lib/kibana/kibana_react.ts +++ b/x-pack/plugins/siem/public/lib/kibana/kibana_react.ts @@ -11,7 +11,7 @@ import { useUiSetting, useUiSetting$, withKibana, -} from '../../../../../../../src/plugins/kibana_react/public'; +} from '../../../../../../src/plugins/kibana_react/public'; import { StartServices } from '../../plugin'; export type KibanaContext = KibanaReactContextValue; diff --git a/x-pack/plugins/siem/public/lib/kibana/services.ts b/x-pack/plugins/siem/public/lib/kibana/services.ts new file mode 100644 index 00000000000000..4ab3e102f56ab5 --- /dev/null +++ b/x-pack/plugins/siem/public/lib/kibana/services.ts @@ -0,0 +1,45 @@ +/* + * 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. + */ + +import { CoreStart } from '../../../../../../src/core/public'; + +type GlobalServices = Pick; + +export class KibanaServices { + private static kibanaVersion?: string; + private static services?: GlobalServices; + + public static init({ + http, + kibanaVersion, + uiSettings, + }: GlobalServices & { kibanaVersion: string }) { + this.services = { http, uiSettings }; + this.kibanaVersion = kibanaVersion; + } + + public static get(): GlobalServices { + if (!this.services) { + this.throwUninitializedError(); + } + + return this.services; + } + + public static getKibanaVersion(): string { + if (!this.kibanaVersion) { + this.throwUninitializedError(); + } + + return this.kibanaVersion; + } + + private static throwUninitializedError(): never { + throw new Error( + 'Kibana services not initialized - are you trying to import this module from outside of the SIEM app?' + ); + } +} diff --git a/x-pack/legacy/plugins/siem/public/lib/lib.ts b/x-pack/plugins/siem/public/lib/lib.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/lib/lib.ts rename to x-pack/plugins/siem/public/lib/lib.ts diff --git a/x-pack/legacy/plugins/siem/public/lib/note/index.ts b/x-pack/plugins/siem/public/lib/note/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/lib/note/index.ts rename to x-pack/plugins/siem/public/lib/note/index.ts diff --git a/x-pack/legacy/plugins/siem/public/lib/telemetry/index.ts b/x-pack/plugins/siem/public/lib/telemetry/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/lib/telemetry/index.ts rename to x-pack/plugins/siem/public/lib/telemetry/index.ts diff --git a/x-pack/legacy/plugins/siem/public/lib/telemetry/middleware.ts b/x-pack/plugins/siem/public/lib/telemetry/middleware.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/lib/telemetry/middleware.ts rename to x-pack/plugins/siem/public/lib/telemetry/middleware.ts diff --git a/x-pack/legacy/plugins/siem/public/lib/theme/use_eui_theme.tsx b/x-pack/plugins/siem/public/lib/theme/use_eui_theme.tsx similarity index 86% rename from x-pack/legacy/plugins/siem/public/lib/theme/use_eui_theme.tsx rename to x-pack/plugins/siem/public/lib/theme/use_eui_theme.tsx index b72c34d3b59a71..1696001203bc87 100644 --- a/x-pack/legacy/plugins/siem/public/lib/theme/use_eui_theme.tsx +++ b/x-pack/plugins/siem/public/lib/theme/use_eui_theme.tsx @@ -7,7 +7,7 @@ import darkTheme from '@elastic/eui/dist/eui_theme_dark.json'; import lightTheme from '@elastic/eui/dist/eui_theme_light.json'; -import { DEFAULT_DARK_MODE } from '../../../../../../plugins/siem/common/constants'; +import { DEFAULT_DARK_MODE } from '../../../common/constants'; import { useUiSetting$ } from '../kibana'; export const useEuiTheme = () => { diff --git a/x-pack/legacy/plugins/siem/public/mock/global_state.ts b/x-pack/plugins/siem/public/mock/global_state.ts similarity index 99% rename from x-pack/legacy/plugins/siem/public/mock/global_state.ts rename to x-pack/plugins/siem/public/mock/global_state.ts index 266c3aadea8af1..6678c3043a3da4 100644 --- a/x-pack/legacy/plugins/siem/public/mock/global_state.ts +++ b/x-pack/plugins/siem/public/mock/global_state.ts @@ -22,7 +22,7 @@ import { DEFAULT_TO, DEFAULT_INTERVAL_TYPE, DEFAULT_INTERVAL_VALUE, -} from '../../../../../plugins/siem/common/constants'; +} from '../../common/constants'; export const mockGlobalState: State = { app: { diff --git a/x-pack/legacy/plugins/siem/public/mock/header.ts b/x-pack/plugins/siem/public/mock/header.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/mock/header.ts rename to x-pack/plugins/siem/public/mock/header.ts diff --git a/x-pack/legacy/plugins/siem/public/mock/hook_wrapper.tsx b/x-pack/plugins/siem/public/mock/hook_wrapper.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/mock/hook_wrapper.tsx rename to x-pack/plugins/siem/public/mock/hook_wrapper.tsx diff --git a/x-pack/legacy/plugins/siem/public/mock/index.ts b/x-pack/plugins/siem/public/mock/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/mock/index.ts rename to x-pack/plugins/siem/public/mock/index.ts diff --git a/x-pack/legacy/plugins/siem/public/mock/index_pattern.ts b/x-pack/plugins/siem/public/mock/index_pattern.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/mock/index_pattern.ts rename to x-pack/plugins/siem/public/mock/index_pattern.ts diff --git a/x-pack/plugins/siem/public/mock/kibana_core.ts b/x-pack/plugins/siem/public/mock/kibana_core.ts new file mode 100644 index 00000000000000..b175ddbf5106db --- /dev/null +++ b/x-pack/plugins/siem/public/mock/kibana_core.ts @@ -0,0 +1,13 @@ +/* + * 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. + */ + +import { coreMock } from '../../../../../src/core/public/mocks'; +import { dataPluginMock } from '../../../../../src/plugins/data/public/mocks'; + +export const createKibanaCoreStartMock = () => coreMock.createStart(); +export const createKibanaPluginsStartMock = () => ({ + data: dataPluginMock.createStartContract(), +}); diff --git a/x-pack/legacy/plugins/siem/public/mock/kibana_react.ts b/x-pack/plugins/siem/public/mock/kibana_react.ts similarity index 95% rename from x-pack/legacy/plugins/siem/public/mock/kibana_react.ts rename to x-pack/plugins/siem/public/mock/kibana_react.ts index db7a931b3fb153..cebba3e237f986 100644 --- a/x-pack/legacy/plugins/siem/public/mock/kibana_react.ts +++ b/x-pack/plugins/siem/public/mock/kibana_react.ts @@ -7,7 +7,7 @@ /* eslint-disable react/display-name */ import React from 'react'; -import { KibanaContextProvider } from '../../../../../../src/plugins/kibana_react/public'; +import { KibanaContextProvider } from '../../../../../src/plugins/kibana_react/public'; import { DEFAULT_SIEM_TIME_RANGE, @@ -24,7 +24,7 @@ import { DEFAULT_INTERVAL_VALUE, DEFAULT_BYTES_FORMAT, DEFAULT_INDEX_PATTERN, -} from '../../../../../plugins/siem/common/constants'; +} from '../../common/constants'; import { createKibanaCoreStartMock, createKibanaPluginsStartMock } from './kibana_core'; // eslint-disable-next-line @typescript-eslint/no-explicit-any diff --git a/x-pack/legacy/plugins/siem/public/mock/match_media.ts b/x-pack/plugins/siem/public/mock/match_media.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/mock/match_media.ts rename to x-pack/plugins/siem/public/mock/match_media.ts diff --git a/x-pack/legacy/plugins/siem/public/mock/mock_detail_item.ts b/x-pack/plugins/siem/public/mock/mock_detail_item.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/mock/mock_detail_item.ts rename to x-pack/plugins/siem/public/mock/mock_detail_item.ts diff --git a/x-pack/legacy/plugins/siem/public/mock/mock_ecs.ts b/x-pack/plugins/siem/public/mock/mock_ecs.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/mock/mock_ecs.ts rename to x-pack/plugins/siem/public/mock/mock_ecs.ts diff --git a/x-pack/legacy/plugins/siem/public/mock/mock_endgame_ecs_data.ts b/x-pack/plugins/siem/public/mock/mock_endgame_ecs_data.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/mock/mock_endgame_ecs_data.ts rename to x-pack/plugins/siem/public/mock/mock_endgame_ecs_data.ts diff --git a/x-pack/legacy/plugins/siem/public/mock/mock_timeline_data.ts b/x-pack/plugins/siem/public/mock/mock_timeline_data.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/mock/mock_timeline_data.ts rename to x-pack/plugins/siem/public/mock/mock_timeline_data.ts diff --git a/x-pack/legacy/plugins/siem/public/mock/netflow.ts b/x-pack/plugins/siem/public/mock/netflow.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/mock/netflow.ts rename to x-pack/plugins/siem/public/mock/netflow.ts diff --git a/x-pack/legacy/plugins/siem/public/mock/news.ts b/x-pack/plugins/siem/public/mock/news.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/mock/news.ts rename to x-pack/plugins/siem/public/mock/news.ts diff --git a/x-pack/legacy/plugins/siem/public/mock/raw_news.ts b/x-pack/plugins/siem/public/mock/raw_news.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/mock/raw_news.ts rename to x-pack/plugins/siem/public/mock/raw_news.ts diff --git a/x-pack/legacy/plugins/siem/public/mock/test_providers.tsx b/x-pack/plugins/siem/public/mock/test_providers.tsx similarity index 99% rename from x-pack/legacy/plugins/siem/public/mock/test_providers.tsx rename to x-pack/plugins/siem/public/mock/test_providers.tsx index 952f7f51b63f29..59e3874c6d0a1b 100644 --- a/x-pack/legacy/plugins/siem/public/mock/test_providers.tsx +++ b/x-pack/plugins/siem/public/mock/test_providers.tsx @@ -22,8 +22,6 @@ import { mockGlobalState } from './global_state'; import { createKibanaContextProviderMock } from './kibana_react'; import { FieldHook, useForm } from '../shared_imports'; -jest.mock('ui/new_platform'); - const state: State = mockGlobalState; interface Props { diff --git a/x-pack/legacy/plugins/siem/public/mock/timeline_results.ts b/x-pack/plugins/siem/public/mock/timeline_results.ts similarity index 99% rename from x-pack/legacy/plugins/siem/public/mock/timeline_results.ts rename to x-pack/plugins/siem/public/mock/timeline_results.ts index 363281e5633174..0e61457873bfde 100644 --- a/x-pack/legacy/plugins/siem/public/mock/timeline_results.ts +++ b/x-pack/plugins/siem/public/mock/timeline_results.ts @@ -10,7 +10,7 @@ import { allTimelinesQuery } from '../containers/timeline/all/index.gql_query'; import { CreateTimelineProps } from '../pages/detection_engine/components/signals/types'; import { TimelineModel } from '../store/timeline/model'; import { timelineDefaults } from '../store/timeline/defaults'; -import { FilterStateStore } from '../../../../../../src/plugins/data/common/es_query/filters/meta_filter'; +import { FilterStateStore } from '../../../../../src/plugins/data/common/es_query/filters/meta_filter'; export interface MockedProvidedQuery { request: { query: GetAllTimeline.Query; diff --git a/x-pack/legacy/plugins/siem/public/mock/utils.ts b/x-pack/plugins/siem/public/mock/utils.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/mock/utils.ts rename to x-pack/plugins/siem/public/mock/utils.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/404.tsx b/x-pack/plugins/siem/public/pages/404.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/404.tsx rename to x-pack/plugins/siem/public/pages/404.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/case/case.tsx b/x-pack/plugins/siem/public/pages/case/case.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/case.tsx rename to x-pack/plugins/siem/public/pages/case/case.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/case/case_details.tsx b/x-pack/plugins/siem/public/pages/case/case_details.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/case_details.tsx rename to x-pack/plugins/siem/public/pages/case/case_details.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/__mock__/form.ts b/x-pack/plugins/siem/public/pages/case/components/__mock__/form.ts similarity index 84% rename from x-pack/legacy/plugins/siem/public/pages/case/components/__mock__/form.ts rename to x-pack/plugins/siem/public/pages/case/components/__mock__/form.ts index cc01edcfaab112..12946c3af06bdb 100644 --- a/x-pack/legacy/plugins/siem/public/pages/case/components/__mock__/form.ts +++ b/x-pack/plugins/siem/public/pages/case/components/__mock__/form.ts @@ -3,9 +3,9 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -import { useForm } from '../../../../../../../../../src/plugins/es_ui_shared/static/forms/hook_form_lib/hooks'; +import { useForm } from '../../../../../../../../src/plugins/es_ui_shared/static/forms/hook_form_lib/hooks'; jest.mock( - '../../../../../../../../../src/plugins/es_ui_shared/static/forms/hook_form_lib/hooks/use_form' + '../../../../../../../../src/plugins/es_ui_shared/static/forms/hook_form_lib/hooks/use_form' ); export const mockFormHook = { isSubmitted: false, diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/__mock__/router.ts b/x-pack/plugins/siem/public/pages/case/components/__mock__/router.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/__mock__/router.ts rename to x-pack/plugins/siem/public/pages/case/components/__mock__/router.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/add_comment/index.test.tsx b/x-pack/plugins/siem/public/pages/case/components/add_comment/index.test.tsx similarity index 95% rename from x-pack/legacy/plugins/siem/public/pages/case/components/add_comment/index.test.tsx rename to x-pack/plugins/siem/public/pages/case/components/add_comment/index.test.tsx index 74f6411f17fa06..7ba8ec96662532 100644 --- a/x-pack/legacy/plugins/siem/public/pages/case/components/add_comment/index.test.tsx +++ b/x-pack/plugins/siem/public/pages/case/components/add_comment/index.test.tsx @@ -14,10 +14,10 @@ import { Router, routeData, mockHistory, mockLocation } from '../__mock__/router import { useInsertTimeline } from '../../../../components/timeline/insert_timeline_popover/use_insert_timeline'; import { usePostComment } from '../../../../containers/case/use_post_comment'; -import { useForm } from '../../../../../../../../../src/plugins/es_ui_shared/static/forms/hook_form_lib/hooks/use_form'; +import { useForm } from '../../../../../../../../src/plugins/es_ui_shared/static/forms/hook_form_lib/hooks/use_form'; import { wait } from '../../../../lib/helpers'; jest.mock( - '../../../../../../../../../src/plugins/es_ui_shared/static/forms/hook_form_lib/hooks/use_form' + '../../../../../../../../src/plugins/es_ui_shared/static/forms/hook_form_lib/hooks/use_form' ); jest.mock('../../../../components/timeline/insert_timeline_popover/use_insert_timeline'); jest.mock('../../../../containers/case/use_post_comment'); diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/add_comment/index.tsx b/x-pack/plugins/siem/public/pages/case/components/add_comment/index.tsx similarity index 97% rename from x-pack/legacy/plugins/siem/public/pages/case/components/add_comment/index.tsx rename to x-pack/plugins/siem/public/pages/case/components/add_comment/index.tsx index eaba708948a993..aa987b277da06a 100644 --- a/x-pack/legacy/plugins/siem/public/pages/case/components/add_comment/index.tsx +++ b/x-pack/plugins/siem/public/pages/case/components/add_comment/index.tsx @@ -8,7 +8,7 @@ import { EuiButton, EuiLoadingSpinner } from '@elastic/eui'; import React, { useCallback, useEffect } from 'react'; import styled from 'styled-components'; -import { CommentRequest } from '../../../../../../../../plugins/case/common/api'; +import { CommentRequest } from '../../../../../../case/common/api'; import { usePostComment } from '../../../../containers/case/use_post_comment'; import { Case } from '../../../../containers/case/types'; import { MarkdownEditorForm } from '../../../../components/markdown_editor/form'; diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/add_comment/schema.tsx b/x-pack/plugins/siem/public/pages/case/components/add_comment/schema.tsx similarity index 88% rename from x-pack/legacy/plugins/siem/public/pages/case/components/add_comment/schema.tsx rename to x-pack/plugins/siem/public/pages/case/components/add_comment/schema.tsx index c61874a8dabfc1..ad73fd71b8e115 100644 --- a/x-pack/legacy/plugins/siem/public/pages/case/components/add_comment/schema.tsx +++ b/x-pack/plugins/siem/public/pages/case/components/add_comment/schema.tsx @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { CommentRequest } from '../../../../../../../../plugins/case/common/api'; +import { CommentRequest } from '../../../../../../case/common/api'; import { FIELD_TYPES, fieldValidators, FormSchema } from '../../../../shared_imports'; import * as i18n from '../../translations'; diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/all_cases/actions.tsx b/x-pack/plugins/siem/public/pages/case/components/all_cases/actions.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/all_cases/actions.tsx rename to x-pack/plugins/siem/public/pages/case/components/all_cases/actions.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/all_cases/columns.test.tsx b/x-pack/plugins/siem/public/pages/case/components/all_cases/columns.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/all_cases/columns.test.tsx rename to x-pack/plugins/siem/public/pages/case/components/all_cases/columns.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/all_cases/columns.tsx b/x-pack/plugins/siem/public/pages/case/components/all_cases/columns.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/all_cases/columns.tsx rename to x-pack/plugins/siem/public/pages/case/components/all_cases/columns.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/all_cases/index.test.tsx b/x-pack/plugins/siem/public/pages/case/components/all_cases/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/all_cases/index.test.tsx rename to x-pack/plugins/siem/public/pages/case/components/all_cases/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/all_cases/index.tsx b/x-pack/plugins/siem/public/pages/case/components/all_cases/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/all_cases/index.tsx rename to x-pack/plugins/siem/public/pages/case/components/all_cases/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/all_cases/table_filters.test.tsx b/x-pack/plugins/siem/public/pages/case/components/all_cases/table_filters.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/all_cases/table_filters.test.tsx rename to x-pack/plugins/siem/public/pages/case/components/all_cases/table_filters.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/all_cases/table_filters.tsx b/x-pack/plugins/siem/public/pages/case/components/all_cases/table_filters.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/all_cases/table_filters.tsx rename to x-pack/plugins/siem/public/pages/case/components/all_cases/table_filters.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/all_cases/translations.ts b/x-pack/plugins/siem/public/pages/case/components/all_cases/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/all_cases/translations.ts rename to x-pack/plugins/siem/public/pages/case/components/all_cases/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/bulk_actions/index.tsx b/x-pack/plugins/siem/public/pages/case/components/bulk_actions/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/bulk_actions/index.tsx rename to x-pack/plugins/siem/public/pages/case/components/bulk_actions/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/bulk_actions/translations.ts b/x-pack/plugins/siem/public/pages/case/components/bulk_actions/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/bulk_actions/translations.ts rename to x-pack/plugins/siem/public/pages/case/components/bulk_actions/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/callout/helpers.tsx b/x-pack/plugins/siem/public/pages/case/components/callout/helpers.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/callout/helpers.tsx rename to x-pack/plugins/siem/public/pages/case/components/callout/helpers.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/callout/index.test.tsx b/x-pack/plugins/siem/public/pages/case/components/callout/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/callout/index.test.tsx rename to x-pack/plugins/siem/public/pages/case/components/callout/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/callout/index.tsx b/x-pack/plugins/siem/public/pages/case/components/callout/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/callout/index.tsx rename to x-pack/plugins/siem/public/pages/case/components/callout/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/callout/translations.ts b/x-pack/plugins/siem/public/pages/case/components/callout/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/callout/translations.ts rename to x-pack/plugins/siem/public/pages/case/components/callout/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/case_header_page/index.tsx b/x-pack/plugins/siem/public/pages/case/components/case_header_page/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/case_header_page/index.tsx rename to x-pack/plugins/siem/public/pages/case/components/case_header_page/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/case_header_page/translations.ts b/x-pack/plugins/siem/public/pages/case/components/case_header_page/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/case_header_page/translations.ts rename to x-pack/plugins/siem/public/pages/case/components/case_header_page/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/case_status/index.tsx b/x-pack/plugins/siem/public/pages/case/components/case_status/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/case_status/index.tsx rename to x-pack/plugins/siem/public/pages/case/components/case_status/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/case_view/actions.test.tsx b/x-pack/plugins/siem/public/pages/case/components/case_view/actions.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/case_view/actions.test.tsx rename to x-pack/plugins/siem/public/pages/case/components/case_view/actions.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/case_view/actions.tsx b/x-pack/plugins/siem/public/pages/case/components/case_view/actions.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/case_view/actions.tsx rename to x-pack/plugins/siem/public/pages/case/components/case_view/actions.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/case_view/index.test.tsx b/x-pack/plugins/siem/public/pages/case/components/case_view/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/case_view/index.test.tsx rename to x-pack/plugins/siem/public/pages/case/components/case_view/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/case_view/index.tsx b/x-pack/plugins/siem/public/pages/case/components/case_view/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/case_view/index.tsx rename to x-pack/plugins/siem/public/pages/case/components/case_view/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/case_view/translations.ts b/x-pack/plugins/siem/public/pages/case/components/case_view/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/case_view/translations.ts rename to x-pack/plugins/siem/public/pages/case/components/case_view/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/configure_cases/__mock__/index.tsx b/x-pack/plugins/siem/public/pages/case/components/configure_cases/__mock__/index.tsx similarity index 93% rename from x-pack/legacy/plugins/siem/public/pages/case/components/configure_cases/__mock__/index.tsx rename to x-pack/plugins/siem/public/pages/case/components/configure_cases/__mock__/index.tsx index e060a94e2d0cdd..0eccd8980ccd23 100644 --- a/x-pack/legacy/plugins/siem/public/pages/case/components/configure_cases/__mock__/index.tsx +++ b/x-pack/plugins/siem/public/pages/case/components/configure_cases/__mock__/index.tsx @@ -11,7 +11,7 @@ import { ReturnUseCaseConfigure } from '../../../../../containers/case/configure import { createUseKibanaMock } from '../../../../../mock/kibana_react'; export { mapping } from '../../../../../containers/case/configure/mock'; // eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { actionTypeRegistryMock } from '../../../../../../../../../plugins/triggers_actions_ui/public/application/action_type_registry.mock'; +import { actionTypeRegistryMock } from '../../../../../../../triggers_actions_ui/public/application/action_type_registry.mock'; export const connectors: Connector[] = connectorsMock; diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/configure_cases/button.test.tsx b/x-pack/plugins/siem/public/pages/case/components/configure_cases/button.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/configure_cases/button.test.tsx rename to x-pack/plugins/siem/public/pages/case/components/configure_cases/button.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/configure_cases/button.tsx b/x-pack/plugins/siem/public/pages/case/components/configure_cases/button.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/configure_cases/button.tsx rename to x-pack/plugins/siem/public/pages/case/components/configure_cases/button.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/configure_cases/closure_options.test.tsx b/x-pack/plugins/siem/public/pages/case/components/configure_cases/closure_options.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/configure_cases/closure_options.test.tsx rename to x-pack/plugins/siem/public/pages/case/components/configure_cases/closure_options.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/configure_cases/closure_options.tsx b/x-pack/plugins/siem/public/pages/case/components/configure_cases/closure_options.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/configure_cases/closure_options.tsx rename to x-pack/plugins/siem/public/pages/case/components/configure_cases/closure_options.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/configure_cases/closure_options_radio.test.tsx b/x-pack/plugins/siem/public/pages/case/components/configure_cases/closure_options_radio.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/configure_cases/closure_options_radio.test.tsx rename to x-pack/plugins/siem/public/pages/case/components/configure_cases/closure_options_radio.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/configure_cases/closure_options_radio.tsx b/x-pack/plugins/siem/public/pages/case/components/configure_cases/closure_options_radio.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/configure_cases/closure_options_radio.tsx rename to x-pack/plugins/siem/public/pages/case/components/configure_cases/closure_options_radio.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/configure_cases/connectors.test.tsx b/x-pack/plugins/siem/public/pages/case/components/configure_cases/connectors.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/configure_cases/connectors.test.tsx rename to x-pack/plugins/siem/public/pages/case/components/configure_cases/connectors.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/configure_cases/connectors.tsx b/x-pack/plugins/siem/public/pages/case/components/configure_cases/connectors.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/configure_cases/connectors.tsx rename to x-pack/plugins/siem/public/pages/case/components/configure_cases/connectors.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/configure_cases/connectors_dropdown.test.tsx b/x-pack/plugins/siem/public/pages/case/components/configure_cases/connectors_dropdown.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/configure_cases/connectors_dropdown.test.tsx rename to x-pack/plugins/siem/public/pages/case/components/configure_cases/connectors_dropdown.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/configure_cases/connectors_dropdown.tsx b/x-pack/plugins/siem/public/pages/case/components/configure_cases/connectors_dropdown.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/configure_cases/connectors_dropdown.tsx rename to x-pack/plugins/siem/public/pages/case/components/configure_cases/connectors_dropdown.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/configure_cases/field_mapping.test.tsx b/x-pack/plugins/siem/public/pages/case/components/configure_cases/field_mapping.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/configure_cases/field_mapping.test.tsx rename to x-pack/plugins/siem/public/pages/case/components/configure_cases/field_mapping.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/configure_cases/field_mapping.tsx b/x-pack/plugins/siem/public/pages/case/components/configure_cases/field_mapping.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/configure_cases/field_mapping.tsx rename to x-pack/plugins/siem/public/pages/case/components/configure_cases/field_mapping.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/configure_cases/field_mapping_row.test.tsx b/x-pack/plugins/siem/public/pages/case/components/configure_cases/field_mapping_row.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/configure_cases/field_mapping_row.test.tsx rename to x-pack/plugins/siem/public/pages/case/components/configure_cases/field_mapping_row.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/configure_cases/field_mapping_row.tsx b/x-pack/plugins/siem/public/pages/case/components/configure_cases/field_mapping_row.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/configure_cases/field_mapping_row.tsx rename to x-pack/plugins/siem/public/pages/case/components/configure_cases/field_mapping_row.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/configure_cases/index.test.tsx b/x-pack/plugins/siem/public/pages/case/components/configure_cases/index.test.tsx similarity index 99% rename from x-pack/legacy/plugins/siem/public/pages/case/components/configure_cases/index.test.tsx rename to x-pack/plugins/siem/public/pages/case/components/configure_cases/index.test.tsx index 2f9761d733b5b2..545eceb0f73a1b 100644 --- a/x-pack/legacy/plugins/siem/public/pages/case/components/configure_cases/index.test.tsx +++ b/x-pack/plugins/siem/public/pages/case/components/configure_cases/index.test.tsx @@ -16,7 +16,7 @@ import { ActionsConnectorsContextProvider, ConnectorAddFlyout, ConnectorEditFlyout, -} from '../../../../../../../../plugins/triggers_actions_ui/public'; +} from '../../../../../../triggers_actions_ui/public'; import { EuiBottomBar } from '@elastic/eui'; import { useKibana } from '../../../../lib/kibana'; diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/configure_cases/index.tsx b/x-pack/plugins/siem/public/pages/case/components/configure_cases/index.tsx similarity index 98% rename from x-pack/legacy/plugins/siem/public/pages/case/components/configure_cases/index.tsx rename to x-pack/plugins/siem/public/pages/case/components/configure_cases/index.tsx index cdb8966d81342e..a970fe895eb716 100644 --- a/x-pack/legacy/plugins/siem/public/pages/case/components/configure_cases/index.tsx +++ b/x-pack/plugins/siem/public/pages/case/components/configure_cases/index.tsx @@ -25,10 +25,10 @@ import { ActionType, ConnectorAddFlyout, ConnectorEditFlyout, -} from '../../../../../../../../plugins/triggers_actions_ui/public'; +} from '../../../../../../triggers_actions_ui/public'; // eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { ActionConnectorTableItem } from '../../../../../../../../plugins/triggers_actions_ui/public/types'; +import { ActionConnectorTableItem } from '../../../../../../triggers_actions_ui/public/types'; import { getCaseUrl } from '../../../../components/link_to'; import { useGetUrlSearch } from '../../../../components/navigation/use_get_url_search'; import { CCMapsCombinedActionAttributes } from '../../../../containers/case/configure/types'; diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/configure_cases/mapping.test.tsx b/x-pack/plugins/siem/public/pages/case/components/configure_cases/mapping.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/configure_cases/mapping.test.tsx rename to x-pack/plugins/siem/public/pages/case/components/configure_cases/mapping.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/configure_cases/mapping.tsx b/x-pack/plugins/siem/public/pages/case/components/configure_cases/mapping.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/configure_cases/mapping.tsx rename to x-pack/plugins/siem/public/pages/case/components/configure_cases/mapping.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/configure_cases/translations.ts b/x-pack/plugins/siem/public/pages/case/components/configure_cases/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/configure_cases/translations.ts rename to x-pack/plugins/siem/public/pages/case/components/configure_cases/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/configure_cases/utils.test.tsx b/x-pack/plugins/siem/public/pages/case/components/configure_cases/utils.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/configure_cases/utils.test.tsx rename to x-pack/plugins/siem/public/pages/case/components/configure_cases/utils.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/configure_cases/utils.ts b/x-pack/plugins/siem/public/pages/case/components/configure_cases/utils.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/configure_cases/utils.ts rename to x-pack/plugins/siem/public/pages/case/components/configure_cases/utils.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/confirm_delete_case/index.tsx b/x-pack/plugins/siem/public/pages/case/components/confirm_delete_case/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/confirm_delete_case/index.tsx rename to x-pack/plugins/siem/public/pages/case/components/confirm_delete_case/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/confirm_delete_case/translations.ts b/x-pack/plugins/siem/public/pages/case/components/confirm_delete_case/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/confirm_delete_case/translations.ts rename to x-pack/plugins/siem/public/pages/case/components/confirm_delete_case/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/create/index.test.tsx b/x-pack/plugins/siem/public/pages/case/components/create/index.test.tsx similarity index 93% rename from x-pack/legacy/plugins/siem/public/pages/case/components/create/index.test.tsx rename to x-pack/plugins/siem/public/pages/case/components/create/index.test.tsx index 0897be6310fa2e..4c2e15ddfa98a9 100644 --- a/x-pack/legacy/plugins/siem/public/pages/case/components/create/index.test.tsx +++ b/x-pack/plugins/siem/public/pages/case/components/create/index.test.tsx @@ -18,15 +18,15 @@ import { useGetTags } from '../../../../containers/case/use_get_tags'; jest.mock('../../../../components/timeline/insert_timeline_popover/use_insert_timeline'); jest.mock('../../../../containers/case/use_post_case'); -import { useForm } from '../../../../../../../../../src/plugins/es_ui_shared/static/forms/hook_form_lib/hooks'; +import { useForm } from '../../../../../../../../src/plugins/es_ui_shared/static/forms/hook_form_lib/hooks'; import { wait } from '../../../../lib/helpers'; import { SiemPageName } from '../../../home/types'; jest.mock( - '../../../../../../../../../src/plugins/es_ui_shared/static/forms/hook_form_lib/hooks/use_form' + '../../../../../../../../src/plugins/es_ui_shared/static/forms/hook_form_lib/hooks/use_form' ); jest.mock('../../../../containers/case/use_get_tags'); jest.mock( - '../../../../../../../../../src/plugins/es_ui_shared/static/forms/hook_form_lib/components/form_data_provider', + '../../../../../../../../src/plugins/es_ui_shared/static/forms/hook_form_lib/components/form_data_provider', () => ({ FormDataProvider: ({ children }: { children: ({ tags }: { tags: string[] }) => void }) => children({ tags: ['rad', 'dude'] }), diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/create/index.tsx b/x-pack/plugins/siem/public/pages/case/components/create/index.tsx similarity index 98% rename from x-pack/legacy/plugins/siem/public/pages/case/components/create/index.tsx rename to x-pack/plugins/siem/public/pages/case/components/create/index.tsx index 0f819f961b3963..6731b88572cdd3 100644 --- a/x-pack/legacy/plugins/siem/public/pages/case/components/create/index.tsx +++ b/x-pack/plugins/siem/public/pages/case/components/create/index.tsx @@ -16,7 +16,7 @@ import styled, { css } from 'styled-components'; import { Redirect } from 'react-router-dom'; import { isEqual } from 'lodash/fp'; -import { CasePostRequest } from '../../../../../../../../plugins/case/common/api'; +import { CasePostRequest } from '../../../../../../case/common/api'; import { Field, Form, diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/create/optional_field_label/index.tsx b/x-pack/plugins/siem/public/pages/case/components/create/optional_field_label/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/create/optional_field_label/index.tsx rename to x-pack/plugins/siem/public/pages/case/components/create/optional_field_label/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/create/schema.tsx b/x-pack/plugins/siem/public/pages/case/components/create/schema.tsx similarity index 92% rename from x-pack/legacy/plugins/siem/public/pages/case/components/create/schema.tsx rename to x-pack/plugins/siem/public/pages/case/components/create/schema.tsx index 4653dbc67d5a18..a4e0bb69165317 100644 --- a/x-pack/legacy/plugins/siem/public/pages/case/components/create/schema.tsx +++ b/x-pack/plugins/siem/public/pages/case/components/create/schema.tsx @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { CasePostRequest } from '../../../../../../../../plugins/case/common/api'; +import { CasePostRequest } from '../../../../../../case/common/api'; import { FIELD_TYPES, fieldValidators, FormSchema } from '../../../../shared_imports'; import * as i18n from '../../translations'; diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/open_closed_stats/index.tsx b/x-pack/plugins/siem/public/pages/case/components/open_closed_stats/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/open_closed_stats/index.tsx rename to x-pack/plugins/siem/public/pages/case/components/open_closed_stats/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/property_actions/constants.ts b/x-pack/plugins/siem/public/pages/case/components/property_actions/constants.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/property_actions/constants.ts rename to x-pack/plugins/siem/public/pages/case/components/property_actions/constants.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/property_actions/index.tsx b/x-pack/plugins/siem/public/pages/case/components/property_actions/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/property_actions/index.tsx rename to x-pack/plugins/siem/public/pages/case/components/property_actions/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/property_actions/translations.ts b/x-pack/plugins/siem/public/pages/case/components/property_actions/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/property_actions/translations.ts rename to x-pack/plugins/siem/public/pages/case/components/property_actions/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/tag_list/index.test.tsx b/x-pack/plugins/siem/public/pages/case/components/tag_list/index.test.tsx similarity index 93% rename from x-pack/legacy/plugins/siem/public/pages/case/components/tag_list/index.test.tsx rename to x-pack/plugins/siem/public/pages/case/components/tag_list/index.test.tsx index b5627376ac8aa1..9ddb96a4ed295a 100644 --- a/x-pack/legacy/plugins/siem/public/pages/case/components/tag_list/index.test.tsx +++ b/x-pack/plugins/siem/public/pages/case/components/tag_list/index.test.tsx @@ -12,15 +12,15 @@ import { TagList } from './'; import { getFormMock } from '../__mock__/form'; import { TestProviders } from '../../../../mock'; import { wait } from '../../../../lib/helpers'; -import { useForm } from '../../../../../../../../../src/plugins/es_ui_shared/static/forms/hook_form_lib/hooks'; +import { useForm } from '../../../../../../../../src/plugins/es_ui_shared/static/forms/hook_form_lib/hooks'; import { useGetTags } from '../../../../containers/case/use_get_tags'; jest.mock( - '../../../../../../../../../src/plugins/es_ui_shared/static/forms/hook_form_lib/hooks/use_form' + '../../../../../../../../src/plugins/es_ui_shared/static/forms/hook_form_lib/hooks/use_form' ); jest.mock('../../../../containers/case/use_get_tags'); jest.mock( - '../../../../../../../../../src/plugins/es_ui_shared/static/forms/hook_form_lib/components/form_data_provider', + '../../../../../../../../src/plugins/es_ui_shared/static/forms/hook_form_lib/components/form_data_provider', () => ({ FormDataProvider: ({ children }: { children: ({ tags }: { tags: string[] }) => void }) => children({ tags: ['rad', 'dude'] }), diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/tag_list/index.tsx b/x-pack/plugins/siem/public/pages/case/components/tag_list/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/tag_list/index.tsx rename to x-pack/plugins/siem/public/pages/case/components/tag_list/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/tag_list/schema.tsx b/x-pack/plugins/siem/public/pages/case/components/tag_list/schema.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/tag_list/schema.tsx rename to x-pack/plugins/siem/public/pages/case/components/tag_list/schema.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/tag_list/translations.ts b/x-pack/plugins/siem/public/pages/case/components/tag_list/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/tag_list/translations.ts rename to x-pack/plugins/siem/public/pages/case/components/tag_list/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/use_push_to_service/helpers.tsx b/x-pack/plugins/siem/public/pages/case/components/use_push_to_service/helpers.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/use_push_to_service/helpers.tsx rename to x-pack/plugins/siem/public/pages/case/components/use_push_to_service/helpers.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/use_push_to_service/index.test.tsx b/x-pack/plugins/siem/public/pages/case/components/use_push_to_service/index.test.tsx similarity index 98% rename from x-pack/legacy/plugins/siem/public/pages/case/components/use_push_to_service/index.test.tsx rename to x-pack/plugins/siem/public/pages/case/components/use_push_to_service/index.test.tsx index 77215e2318ded1..d428d9988ae39f 100644 --- a/x-pack/legacy/plugins/siem/public/pages/case/components/use_push_to_service/index.test.tsx +++ b/x-pack/plugins/siem/public/pages/case/components/use_push_to_service/index.test.tsx @@ -9,7 +9,7 @@ import { renderHook, act } from '@testing-library/react-hooks'; import { usePushToService, ReturnUsePushToService, UsePushToService } from './'; import { TestProviders } from '../../../../mock'; import { usePostPushToService } from '../../../../containers/case/use_post_push_to_service'; -import { ClosureType } from '../../../../../../../../plugins/case/common/api/cases'; +import { ClosureType } from '../../../../../../case/common/api/cases'; import * as i18n from './translations'; import { useGetActionLicense } from '../../../../containers/case/use_get_action_license'; import { getKibanaConfigError, getLicenseError } from './helpers'; diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/use_push_to_service/index.tsx b/x-pack/plugins/siem/public/pages/case/components/use_push_to_service/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/use_push_to_service/index.tsx rename to x-pack/plugins/siem/public/pages/case/components/use_push_to_service/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/use_push_to_service/translations.ts b/x-pack/plugins/siem/public/pages/case/components/use_push_to_service/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/use_push_to_service/translations.ts rename to x-pack/plugins/siem/public/pages/case/components/use_push_to_service/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/user_action_tree/helpers.test.tsx b/x-pack/plugins/siem/public/pages/case/components/user_action_tree/helpers.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/user_action_tree/helpers.test.tsx rename to x-pack/plugins/siem/public/pages/case/components/user_action_tree/helpers.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/user_action_tree/helpers.tsx b/x-pack/plugins/siem/public/pages/case/components/user_action_tree/helpers.tsx similarity index 97% rename from x-pack/legacy/plugins/siem/public/pages/case/components/user_action_tree/helpers.tsx rename to x-pack/plugins/siem/public/pages/case/components/user_action_tree/helpers.tsx index d6016e540bdc08..96f87c90829452 100644 --- a/x-pack/legacy/plugins/siem/public/pages/case/components/user_action_tree/helpers.tsx +++ b/x-pack/plugins/siem/public/pages/case/components/user_action_tree/helpers.tsx @@ -7,7 +7,7 @@ import { EuiFlexGroup, EuiFlexItem, EuiBadge, EuiLink } from '@elastic/eui'; import React from 'react'; -import { CaseFullExternalService } from '../../../../../../../../plugins/case/common/api'; +import { CaseFullExternalService } from '../../../../../../case/common/api'; import { CaseUserActions } from '../../../../containers/case/types'; import * as i18n from '../case_view/translations'; diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/user_action_tree/index.test.tsx b/x-pack/plugins/siem/public/pages/case/components/user_action_tree/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/user_action_tree/index.test.tsx rename to x-pack/plugins/siem/public/pages/case/components/user_action_tree/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/user_action_tree/index.tsx b/x-pack/plugins/siem/public/pages/case/components/user_action_tree/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/user_action_tree/index.tsx rename to x-pack/plugins/siem/public/pages/case/components/user_action_tree/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/user_action_tree/schema.ts b/x-pack/plugins/siem/public/pages/case/components/user_action_tree/schema.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/user_action_tree/schema.ts rename to x-pack/plugins/siem/public/pages/case/components/user_action_tree/schema.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/user_action_tree/translations.ts b/x-pack/plugins/siem/public/pages/case/components/user_action_tree/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/user_action_tree/translations.ts rename to x-pack/plugins/siem/public/pages/case/components/user_action_tree/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/user_action_tree/user_action_avatar.tsx b/x-pack/plugins/siem/public/pages/case/components/user_action_tree/user_action_avatar.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/user_action_tree/user_action_avatar.tsx rename to x-pack/plugins/siem/public/pages/case/components/user_action_tree/user_action_avatar.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/user_action_tree/user_action_item.tsx b/x-pack/plugins/siem/public/pages/case/components/user_action_tree/user_action_item.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/user_action_tree/user_action_item.tsx rename to x-pack/plugins/siem/public/pages/case/components/user_action_tree/user_action_item.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/user_action_tree/user_action_markdown.tsx b/x-pack/plugins/siem/public/pages/case/components/user_action_tree/user_action_markdown.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/user_action_tree/user_action_markdown.tsx rename to x-pack/plugins/siem/public/pages/case/components/user_action_tree/user_action_markdown.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/user_action_tree/user_action_title.test.tsx b/x-pack/plugins/siem/public/pages/case/components/user_action_tree/user_action_title.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/user_action_tree/user_action_title.test.tsx rename to x-pack/plugins/siem/public/pages/case/components/user_action_tree/user_action_title.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/user_action_tree/user_action_title.tsx b/x-pack/plugins/siem/public/pages/case/components/user_action_tree/user_action_title.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/user_action_tree/user_action_title.tsx rename to x-pack/plugins/siem/public/pages/case/components/user_action_tree/user_action_title.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/user_list/index.test.tsx b/x-pack/plugins/siem/public/pages/case/components/user_list/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/user_list/index.test.tsx rename to x-pack/plugins/siem/public/pages/case/components/user_list/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/user_list/index.tsx b/x-pack/plugins/siem/public/pages/case/components/user_list/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/user_list/index.tsx rename to x-pack/plugins/siem/public/pages/case/components/user_list/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/user_list/translations.ts b/x-pack/plugins/siem/public/pages/case/components/user_list/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/user_list/translations.ts rename to x-pack/plugins/siem/public/pages/case/components/user_list/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/wrappers/index.tsx b/x-pack/plugins/siem/public/pages/case/components/wrappers/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/components/wrappers/index.tsx rename to x-pack/plugins/siem/public/pages/case/components/wrappers/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/case/configure_cases.tsx b/x-pack/plugins/siem/public/pages/case/configure_cases.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/configure_cases.tsx rename to x-pack/plugins/siem/public/pages/case/configure_cases.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/case/create_case.tsx b/x-pack/plugins/siem/public/pages/case/create_case.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/create_case.tsx rename to x-pack/plugins/siem/public/pages/case/create_case.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/case/index.tsx b/x-pack/plugins/siem/public/pages/case/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/index.tsx rename to x-pack/plugins/siem/public/pages/case/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/case/saved_object_no_permissions.tsx b/x-pack/plugins/siem/public/pages/case/saved_object_no_permissions.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/saved_object_no_permissions.tsx rename to x-pack/plugins/siem/public/pages/case/saved_object_no_permissions.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/case/translations.ts b/x-pack/plugins/siem/public/pages/case/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/case/translations.ts rename to x-pack/plugins/siem/public/pages/case/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/case/utils.ts b/x-pack/plugins/siem/public/pages/case/utils.ts similarity index 93% rename from x-pack/legacy/plugins/siem/public/pages/case/utils.ts rename to x-pack/plugins/siem/public/pages/case/utils.ts index df9f0d08e728c5..f1aea747485e41 100644 --- a/x-pack/legacy/plugins/siem/public/pages/case/utils.ts +++ b/x-pack/plugins/siem/public/pages/case/utils.ts @@ -5,13 +5,14 @@ */ import { isEmpty } from 'lodash/fp'; -import { Breadcrumb } from 'ui/chrome'; + +import { ChromeBreadcrumb } from 'src/core/public'; import { getCaseDetailsUrl, getCaseUrl, getCreateCaseUrl } from '../../components/link_to'; import { RouteSpyState } from '../../utils/route/types'; import * as i18n from './translations'; -export const getBreadcrumbs = (params: RouteSpyState, search: string[]): Breadcrumb[] => { +export const getBreadcrumbs = (params: RouteSpyState, search: string[]): ChromeBreadcrumb[] => { const queryParameters = !isEmpty(search[0]) ? search[0] : null; let breadcrumb = [ diff --git a/x-pack/legacy/plugins/siem/public/pages/common/translations.ts b/x-pack/plugins/siem/public/pages/common/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/common/translations.ts rename to x-pack/plugins/siem/public/pages/common/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/activity_monitor/columns.tsx b/x-pack/plugins/siem/public/pages/detection_engine/components/activity_monitor/columns.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/components/activity_monitor/columns.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/components/activity_monitor/columns.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/activity_monitor/index.test.tsx b/x-pack/plugins/siem/public/pages/detection_engine/components/activity_monitor/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/components/activity_monitor/index.test.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/components/activity_monitor/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/activity_monitor/index.tsx b/x-pack/plugins/siem/public/pages/detection_engine/components/activity_monitor/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/components/activity_monitor/index.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/components/activity_monitor/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/activity_monitor/types.ts b/x-pack/plugins/siem/public/pages/detection_engine/components/activity_monitor/types.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/components/activity_monitor/types.ts rename to x-pack/plugins/siem/public/pages/detection_engine/components/activity_monitor/types.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/detection_engine_header_page/index.test.tsx b/x-pack/plugins/siem/public/pages/detection_engine/components/detection_engine_header_page/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/components/detection_engine_header_page/index.test.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/components/detection_engine_header_page/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/detection_engine_header_page/index.tsx b/x-pack/plugins/siem/public/pages/detection_engine/components/detection_engine_header_page/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/components/detection_engine_header_page/index.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/components/detection_engine_header_page/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/detection_engine_header_page/translations.ts b/x-pack/plugins/siem/public/pages/detection_engine/components/detection_engine_header_page/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/components/detection_engine_header_page/translations.ts rename to x-pack/plugins/siem/public/pages/detection_engine/components/detection_engine_header_page/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/no_api_integration_callout/index.test.tsx b/x-pack/plugins/siem/public/pages/detection_engine/components/no_api_integration_callout/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/components/no_api_integration_callout/index.test.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/components/no_api_integration_callout/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/no_api_integration_callout/index.tsx b/x-pack/plugins/siem/public/pages/detection_engine/components/no_api_integration_callout/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/components/no_api_integration_callout/index.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/components/no_api_integration_callout/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/no_api_integration_callout/translations.ts b/x-pack/plugins/siem/public/pages/detection_engine/components/no_api_integration_callout/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/components/no_api_integration_callout/translations.ts rename to x-pack/plugins/siem/public/pages/detection_engine/components/no_api_integration_callout/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/no_write_signals_callout/index.test.tsx b/x-pack/plugins/siem/public/pages/detection_engine/components/no_write_signals_callout/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/components/no_write_signals_callout/index.test.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/components/no_write_signals_callout/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/no_write_signals_callout/index.tsx b/x-pack/plugins/siem/public/pages/detection_engine/components/no_write_signals_callout/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/components/no_write_signals_callout/index.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/components/no_write_signals_callout/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/no_write_signals_callout/translations.ts b/x-pack/plugins/siem/public/pages/detection_engine/components/no_write_signals_callout/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/components/no_write_signals_callout/translations.ts rename to x-pack/plugins/siem/public/pages/detection_engine/components/no_write_signals_callout/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals/actions.test.tsx b/x-pack/plugins/siem/public/pages/detection_engine/components/signals/actions.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals/actions.test.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/components/signals/actions.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals/actions.tsx b/x-pack/plugins/siem/public/pages/detection_engine/components/signals/actions.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals/actions.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/components/signals/actions.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals/default_config.test.tsx b/x-pack/plugins/siem/public/pages/detection_engine/components/signals/default_config.test.tsx similarity index 98% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals/default_config.test.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/components/signals/default_config.test.tsx index 6212cad7e18459..5428b9932fbde7 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals/default_config.test.tsx +++ b/x-pack/plugins/siem/public/pages/detection_engine/components/signals/default_config.test.tsx @@ -7,7 +7,7 @@ import React from 'react'; import { mount, ReactWrapper } from 'enzyme'; import { EuiButtonIcon, EuiToolTip } from '@elastic/eui'; -import { Filter } from '../../../../../../../../../src/plugins/data/common/es_query'; +import { Filter } from '../../../../../../../../src/plugins/data/common/es_query'; import { TimelineAction } from '../../../../components/timeline/body/actions'; import { buildSignalsRuleIdFilter, getSignalsActions } from './default_config'; import { diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals/default_config.tsx b/x-pack/plugins/siem/public/pages/detection_engine/components/signals/default_config.tsx similarity index 98% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals/default_config.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/components/signals/default_config.tsx index fd3b9a6f68e824..81b643b7894dfc 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals/default_config.tsx +++ b/x-pack/plugins/siem/public/pages/detection_engine/components/signals/default_config.tsx @@ -10,7 +10,7 @@ import { EuiButtonIcon, EuiToolTip } from '@elastic/eui'; import ApolloClient from 'apollo-client'; import React from 'react'; -import { Filter } from '../../../../../../../../../src/plugins/data/common/es_query'; +import { Filter } from '../../../../../../../../src/plugins/data/common/es_query'; import { TimelineAction, TimelineActionProps } from '../../../../components/timeline/body/actions'; import { defaultColumnHeaderType } from '../../../../components/timeline/body/column_headers/default_headers'; import { diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals/helpers.test.ts b/x-pack/plugins/siem/public/pages/detection_engine/components/signals/helpers.test.ts similarity index 99% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals/helpers.test.ts rename to x-pack/plugins/siem/public/pages/detection_engine/components/signals/helpers.test.ts index 7e6778ca4fb4f1..a948d2b940b0c9 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals/helpers.test.ts +++ b/x-pack/plugins/siem/public/pages/detection_engine/components/signals/helpers.test.ts @@ -11,7 +11,7 @@ import { reformatDataProviderWithNewValue, } from './helpers'; import { mockEcsData } from '../../../../mock/mock_ecs'; -import { Filter } from '../../../../../../../../../src/plugins/data/public'; +import { Filter } from '../../../../../../../../src/plugins/data/public'; import { DataProvider } from '../../../../components/timeline/data_providers/data_provider'; import { mockDataProviders } from '../../../../components/timeline/data_providers/mock/mock_data_providers'; import { cloneDeep } from 'lodash/fp'; diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals/helpers.ts b/x-pack/plugins/siem/public/pages/detection_engine/components/signals/helpers.ts similarity index 99% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals/helpers.ts rename to x-pack/plugins/siem/public/pages/detection_engine/components/signals/helpers.ts index d80ef066d86ac2..3fa2da37046b00 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals/helpers.ts +++ b/x-pack/plugins/siem/public/pages/detection_engine/components/signals/helpers.ts @@ -5,7 +5,7 @@ */ import { get, isEmpty } from 'lodash/fp'; -import { Filter, esKuery, KueryNode } from '../../../../../../../../../src/plugins/data/public'; +import { Filter, esKuery, KueryNode } from '../../../../../../../../src/plugins/data/public'; import { DataProvider, DataProvidersAnd, diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals/index.test.tsx b/x-pack/plugins/siem/public/pages/detection_engine/components/signals/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals/index.test.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/components/signals/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals/index.tsx b/x-pack/plugins/siem/public/pages/detection_engine/components/signals/index.tsx similarity index 99% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals/index.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/components/signals/index.tsx index ce8ae2054b2c77..5442c8c19b5a70 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals/index.tsx +++ b/x-pack/plugins/siem/public/pages/detection_engine/components/signals/index.tsx @@ -10,7 +10,7 @@ import React, { useCallback, useEffect, useMemo, useState } from 'react'; import { connect, ConnectedProps } from 'react-redux'; import { Dispatch } from 'redux'; -import { Filter, esQuery } from '../../../../../../../../../src/plugins/data/public'; +import { Filter, esQuery } from '../../../../../../../../src/plugins/data/public'; import { useFetchIndexPatterns } from '../../../../containers/detection_engine/rules/fetch_index_patterns'; import { StatefulEventsViewer } from '../../../../components/events_viewer'; import { HeaderSection } from '../../../../components/header_section'; diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals/signals_filter_group/index.test.tsx b/x-pack/plugins/siem/public/pages/detection_engine/components/signals/signals_filter_group/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals/signals_filter_group/index.test.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/components/signals/signals_filter_group/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals/signals_filter_group/index.tsx b/x-pack/plugins/siem/public/pages/detection_engine/components/signals/signals_filter_group/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals/signals_filter_group/index.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/components/signals/signals_filter_group/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals/signals_utility_bar/index.test.tsx b/x-pack/plugins/siem/public/pages/detection_engine/components/signals/signals_utility_bar/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals/signals_utility_bar/index.test.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/components/signals/signals_utility_bar/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals/signals_utility_bar/index.tsx b/x-pack/plugins/siem/public/pages/detection_engine/components/signals/signals_utility_bar/index.tsx similarity index 97% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals/signals_utility_bar/index.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/components/signals/signals_utility_bar/index.tsx index 847fcc78600851..b9268716f85f01 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals/signals_utility_bar/index.tsx +++ b/x-pack/plugins/siem/public/pages/detection_engine/components/signals/signals_utility_bar/index.tsx @@ -8,7 +8,7 @@ import { isEmpty } from 'lodash/fp'; import React, { useCallback } from 'react'; import numeral from '@elastic/numeral'; -import { DEFAULT_NUMBER_FORMAT } from '../../../../../../../../../plugins/siem/common/constants'; +import { DEFAULT_NUMBER_FORMAT } from '../../../../../../common/constants'; import { UtilityBar, UtilityBarAction, diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals/signals_utility_bar/translations.ts b/x-pack/plugins/siem/public/pages/detection_engine/components/signals/signals_utility_bar/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals/signals_utility_bar/translations.ts rename to x-pack/plugins/siem/public/pages/detection_engine/components/signals/signals_utility_bar/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals/translations.ts b/x-pack/plugins/siem/public/pages/detection_engine/components/signals/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals/translations.ts rename to x-pack/plugins/siem/public/pages/detection_engine/components/signals/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals/types.ts b/x-pack/plugins/siem/public/pages/detection_engine/components/signals/types.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals/types.ts rename to x-pack/plugins/siem/public/pages/detection_engine/components/signals/types.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals_histogram_panel/config.ts b/x-pack/plugins/siem/public/pages/detection_engine/components/signals_histogram_panel/config.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals_histogram_panel/config.ts rename to x-pack/plugins/siem/public/pages/detection_engine/components/signals_histogram_panel/config.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals_histogram_panel/helpers.test.tsx b/x-pack/plugins/siem/public/pages/detection_engine/components/signals_histogram_panel/helpers.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals_histogram_panel/helpers.test.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/components/signals_histogram_panel/helpers.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals_histogram_panel/helpers.tsx b/x-pack/plugins/siem/public/pages/detection_engine/components/signals_histogram_panel/helpers.tsx similarity index 96% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals_histogram_panel/helpers.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/components/signals_histogram_panel/helpers.tsx index 90bdd39e4a6faf..24b12cae62d85d 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals_histogram_panel/helpers.tsx +++ b/x-pack/plugins/siem/public/pages/detection_engine/components/signals_histogram_panel/helpers.tsx @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { showAllOthersBucket } from '../../../../../../../../plugins/siem/common/constants'; +import { showAllOthersBucket } from '../../../../../common/constants'; import { HistogramData, SignalsAggregation, SignalsBucket, SignalsGroupBucket } from './types'; import { SignalSearchResponse } from '../../../../containers/detection_engine/signals/types'; import * as i18n from './translations'; diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals_histogram_panel/index.test.tsx b/x-pack/plugins/siem/public/pages/detection_engine/components/signals_histogram_panel/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals_histogram_panel/index.test.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/components/signals_histogram_panel/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals_histogram_panel/index.tsx b/x-pack/plugins/siem/public/pages/detection_engine/components/signals_histogram_panel/index.tsx similarity index 98% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals_histogram_panel/index.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/components/signals_histogram_panel/index.tsx index e70ba804ec0187..cf6730ea3ec3d7 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals_histogram_panel/index.tsx +++ b/x-pack/plugins/siem/public/pages/detection_engine/components/signals_histogram_panel/index.tsx @@ -11,11 +11,11 @@ import styled from 'styled-components'; import { isEmpty } from 'lodash/fp'; import uuid from 'uuid'; -import { DEFAULT_NUMBER_FORMAT } from '../../../../../../../../plugins/siem/common/constants'; +import { DEFAULT_NUMBER_FORMAT } from '../../../../../common/constants'; import { LegendItem } from '../../../../components/charts/draggable_legend_item'; import { escapeDataProviderId } from '../../../../components/drag_and_drop/helpers'; import { HeaderSection } from '../../../../components/header_section'; -import { Filter, esQuery, Query } from '../../../../../../../../../src/plugins/data/public'; +import { Filter, esQuery, Query } from '../../../../../../../../src/plugins/data/public'; import { useQuerySignals } from '../../../../containers/detection_engine/signals/use_query'; import { getDetectionEngineUrl } from '../../../../components/link_to'; import { defaultLegendColors } from '../../../../components/matrix_histogram/utils'; diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals_histogram_panel/signals_histogram.test.tsx b/x-pack/plugins/siem/public/pages/detection_engine/components/signals_histogram_panel/signals_histogram.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals_histogram_panel/signals_histogram.test.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/components/signals_histogram_panel/signals_histogram.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals_histogram_panel/signals_histogram.tsx b/x-pack/plugins/siem/public/pages/detection_engine/components/signals_histogram_panel/signals_histogram.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals_histogram_panel/signals_histogram.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/components/signals_histogram_panel/signals_histogram.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals_histogram_panel/translations.ts b/x-pack/plugins/siem/public/pages/detection_engine/components/signals_histogram_panel/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals_histogram_panel/translations.ts rename to x-pack/plugins/siem/public/pages/detection_engine/components/signals_histogram_panel/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals_histogram_panel/types.ts b/x-pack/plugins/siem/public/pages/detection_engine/components/signals_histogram_panel/types.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals_histogram_panel/types.ts rename to x-pack/plugins/siem/public/pages/detection_engine/components/signals_histogram_panel/types.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals_info/index.tsx b/x-pack/plugins/siem/public/pages/detection_engine/components/signals_info/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals_info/index.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/components/signals_info/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals_info/query.dsl.ts b/x-pack/plugins/siem/public/pages/detection_engine/components/signals_info/query.dsl.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals_info/query.dsl.ts rename to x-pack/plugins/siem/public/pages/detection_engine/components/signals_info/query.dsl.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals_info/types.ts b/x-pack/plugins/siem/public/pages/detection_engine/components/signals_info/types.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals_info/types.ts rename to x-pack/plugins/siem/public/pages/detection_engine/components/signals_info/types.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/user_info/index.test.tsx b/x-pack/plugins/siem/public/pages/detection_engine/components/user_info/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/components/user_info/index.test.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/components/user_info/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/user_info/index.tsx b/x-pack/plugins/siem/public/pages/detection_engine/components/user_info/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/components/user_info/index.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/components/user_info/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/detection_engine.test.tsx b/x-pack/plugins/siem/public/pages/detection_engine/detection_engine.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/detection_engine.test.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/detection_engine.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/detection_engine.tsx b/x-pack/plugins/siem/public/pages/detection_engine/detection_engine.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/detection_engine.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/detection_engine.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/detection_engine_empty_page.test.tsx b/x-pack/plugins/siem/public/pages/detection_engine/detection_engine_empty_page.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/detection_engine_empty_page.test.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/detection_engine_empty_page.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/detection_engine_empty_page.tsx b/x-pack/plugins/siem/public/pages/detection_engine/detection_engine_empty_page.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/detection_engine_empty_page.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/detection_engine_empty_page.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/detection_engine_no_signal_index.test.tsx b/x-pack/plugins/siem/public/pages/detection_engine/detection_engine_no_signal_index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/detection_engine_no_signal_index.test.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/detection_engine_no_signal_index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/detection_engine_no_signal_index.tsx b/x-pack/plugins/siem/public/pages/detection_engine/detection_engine_no_signal_index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/detection_engine_no_signal_index.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/detection_engine_no_signal_index.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/detection_engine_user_unauthenticated.test.tsx b/x-pack/plugins/siem/public/pages/detection_engine/detection_engine_user_unauthenticated.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/detection_engine_user_unauthenticated.test.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/detection_engine_user_unauthenticated.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/detection_engine_user_unauthenticated.tsx b/x-pack/plugins/siem/public/pages/detection_engine/detection_engine_user_unauthenticated.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/detection_engine_user_unauthenticated.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/detection_engine_user_unauthenticated.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/index.test.tsx b/x-pack/plugins/siem/public/pages/detection_engine/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/index.test.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/index.tsx b/x-pack/plugins/siem/public/pages/detection_engine/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/index.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/mitre/mitre_tactics_techniques.ts b/x-pack/plugins/siem/public/pages/detection_engine/mitre/mitre_tactics_techniques.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/mitre/mitre_tactics_techniques.ts rename to x-pack/plugins/siem/public/pages/detection_engine/mitre/mitre_tactics_techniques.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/mitre/types.ts b/x-pack/plugins/siem/public/pages/detection_engine/mitre/types.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/mitre/types.ts rename to x-pack/plugins/siem/public/pages/detection_engine/mitre/types.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/__mocks__/mock.ts b/x-pack/plugins/siem/public/pages/detection_engine/rules/all/__mocks__/mock.ts similarity index 98% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/__mocks__/mock.ts rename to x-pack/plugins/siem/public/pages/detection_engine/rules/all/__mocks__/mock.ts index 5e0293325289be..66964fae70f941 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/__mocks__/mock.ts +++ b/x-pack/plugins/siem/public/pages/detection_engine/rules/all/__mocks__/mock.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { esFilters } from '../../../../../../../../../../src/plugins/data/public'; +import { esFilters } from '../../../../../../../../../src/plugins/data/public'; import { Rule, RuleError } from '../../../../../containers/detection_engine/rules'; import { AboutStepRule, ActionsStepRule, DefineStepRule, ScheduleStepRule } from '../../types'; import { FieldValueQueryBar } from '../../components/query_bar'; diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/actions.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/all/actions.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/actions.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/all/actions.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/batch_actions.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/all/batch_actions.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/batch_actions.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/all/batch_actions.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/columns.test.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/all/columns.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/columns.test.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/all/columns.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/columns.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/all/columns.tsx similarity index 98% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/columns.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/all/columns.tsx index 97c89f91c12bdf..d383b5cd464ce2 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/columns.tsx +++ b/x-pack/plugins/siem/public/pages/detection_engine/rules/all/columns.tsx @@ -19,7 +19,7 @@ import { FormattedRelative } from '@kbn/i18n/react'; import * as H from 'history'; import React, { Dispatch } from 'react'; -import { isMlRule } from '../../../../../../../../plugins/siem/common/detection_engine/ml_helpers'; +import { isMlRule } from '../../../../../common/detection_engine/ml_helpers'; import { Rule, RuleStatus } from '../../../../containers/detection_engine/rules'; import { getEmptyTagValue } from '../../../../components/empty_value'; import { FormattedDate } from '../../../../components/formatted_date'; diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/helpers.test.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/all/helpers.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/helpers.test.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/all/helpers.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/helpers.ts b/x-pack/plugins/siem/public/pages/detection_engine/rules/all/helpers.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/helpers.ts rename to x-pack/plugins/siem/public/pages/detection_engine/rules/all/helpers.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/index.test.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/all/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/index.test.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/all/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/index.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/all/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/index.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/all/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/reducer.ts b/x-pack/plugins/siem/public/pages/detection_engine/rules/all/reducer.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/reducer.ts rename to x-pack/plugins/siem/public/pages/detection_engine/rules/all/reducer.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/rules_table_filters/rules_table_filters.test.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/all/rules_table_filters/rules_table_filters.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/rules_table_filters/rules_table_filters.test.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/all/rules_table_filters/rules_table_filters.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/rules_table_filters/rules_table_filters.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/all/rules_table_filters/rules_table_filters.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/rules_table_filters/rules_table_filters.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/all/rules_table_filters/rules_table_filters.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/rules_table_filters/tags_filter_popover.test.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/all/rules_table_filters/tags_filter_popover.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/rules_table_filters/tags_filter_popover.test.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/all/rules_table_filters/tags_filter_popover.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/rules_table_filters/tags_filter_popover.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/all/rules_table_filters/tags_filter_popover.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/rules_table_filters/tags_filter_popover.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/all/rules_table_filters/tags_filter_popover.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/accordion_title/index.test.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/accordion_title/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/accordion_title/index.test.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/accordion_title/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/accordion_title/index.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/accordion_title/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/accordion_title/index.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/accordion_title/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/add_item_form/index.test.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/add_item_form/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/add_item_form/index.test.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/add_item_form/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/add_item_form/index.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/add_item_form/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/add_item_form/index.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/add_item_form/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/all_rules_tables/index.test.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/all_rules_tables/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/all_rules_tables/index.test.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/all_rules_tables/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/all_rules_tables/index.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/all_rules_tables/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/all_rules_tables/index.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/all_rules_tables/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/anomaly_threshold_slider/index.test.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/anomaly_threshold_slider/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/anomaly_threshold_slider/index.test.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/anomaly_threshold_slider/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/anomaly_threshold_slider/index.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/anomaly_threshold_slider/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/anomaly_threshold_slider/index.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/anomaly_threshold_slider/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/description_step/__snapshots__/index.test.tsx.snap b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/description_step/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/description_step/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/description_step/__snapshots__/index.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/description_step/assets/list_tree_icon.svg b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/description_step/assets/list_tree_icon.svg similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/description_step/assets/list_tree_icon.svg rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/description_step/assets/list_tree_icon.svg diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/description_step/helpers.test.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/description_step/helpers.test.tsx similarity index 99% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/description_step/helpers.test.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/description_step/helpers.test.tsx index af946c6f02cbbb..186aeae42246d3 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/description_step/helpers.test.tsx +++ b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/description_step/helpers.test.tsx @@ -8,8 +8,8 @@ import React from 'react'; import { shallow } from 'enzyme'; import { EuiLoadingSpinner } from '@elastic/eui'; -import { coreMock } from '../../../../../../../../../../src/core/public/mocks'; -import { esFilters, FilterManager } from '../../../../../../../../../../src/plugins/data/public'; +import { coreMock } from '../../../../../../../../../src/core/public/mocks'; +import { esFilters, FilterManager } from '../../../../../../../../../src/plugins/data/public'; import { SeverityBadge } from '../severity_badge'; import * as i18n from './translations'; diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/description_step/helpers.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/description_step/helpers.tsx similarity index 97% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/description_step/helpers.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/description_step/helpers.tsx index d3014354ab7b35..e54441f0118a13 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/description_step/helpers.tsx +++ b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/description_step/helpers.tsx @@ -19,8 +19,8 @@ import { isEmpty } from 'lodash/fp'; import React from 'react'; import styled from 'styled-components'; -import { RuleType } from '../../../../../../../../../plugins/siem/common/detection_engine/types'; -import { esFilters } from '../../../../../../../../../../src/plugins/data/public'; +import { RuleType } from '../../../../../../common/detection_engine/types'; +import { esFilters } from '../../../../../../../../../src/plugins/data/public'; import { tacticsOptions, techniquesOptions } from '../../../mitre/mitre_tactics_techniques'; diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/description_step/index.test.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/description_step/index.test.tsx similarity index 98% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/description_step/index.test.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/description_step/index.test.tsx index 8e8927cb7bbd13..fdfcfd0fd85fe3 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/description_step/index.test.tsx +++ b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/description_step/index.test.tsx @@ -17,9 +17,9 @@ import { esFilters, Filter, FilterManager, -} from '../../../../../../../../../../src/plugins/data/public'; +} from '../../../../../../../../../src/plugins/data/public'; import { mockAboutStepRule, mockDefineStepRule } from '../../all/__mocks__/mock'; -import { coreMock } from '../../../../../../../../../../src/core/public/mocks'; +import { coreMock } from '../../../../../../../../../src/core/public/mocks'; import { DEFAULT_TIMELINE_TITLE } from '../../../../../components/timeline/translations'; import * as i18n from './translations'; diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/description_step/index.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/description_step/index.tsx similarity index 97% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/description_step/index.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/description_step/index.tsx index 49977713a585ad..108f2138114122 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/description_step/index.tsx +++ b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/description_step/index.tsx @@ -9,13 +9,13 @@ import { isEmpty, chunk, get, pick, isNumber } from 'lodash/fp'; import React, { memo, useState } from 'react'; import styled from 'styled-components'; -import { RuleType } from '../../../../../../../../../plugins/siem/common/detection_engine/types'; +import { RuleType } from '../../../../../../common/detection_engine/types'; import { IIndexPattern, Filter, esFilters, FilterManager, -} from '../../../../../../../../../../src/plugins/data/public'; +} from '../../../../../../../../../src/plugins/data/public'; import { DEFAULT_TIMELINE_TITLE } from '../../../../../components/timeline/translations'; import { useKibana } from '../../../../../lib/kibana'; import { IMitreEnterpriseAttack } from '../../types'; diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/description_step/ml_job_description.test.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/description_step/ml_job_description.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/description_step/ml_job_description.test.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/description_step/ml_job_description.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/description_step/ml_job_description.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/description_step/ml_job_description.tsx similarity index 96% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/description_step/ml_job_description.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/description_step/ml_job_description.tsx index 5e8681a90d428b..79993c37e549c3 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/description_step/ml_job_description.tsx +++ b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/description_step/ml_job_description.tsx @@ -8,7 +8,7 @@ import React from 'react'; import styled from 'styled-components'; import { EuiBadge, EuiIcon, EuiLink, EuiToolTip } from '@elastic/eui'; -import { isJobStarted } from '../../../../../../../../../plugins/siem/common/detection_engine/ml_helpers'; +import { isJobStarted } from '../../../../../../common/detection_engine/ml_helpers'; import { useKibana } from '../../../../../lib/kibana'; import { SiemJob } from '../../../../../components/ml_popover/types'; import { ListItems } from './types'; diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/description_step/translations.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/description_step/translations.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/description_step/translations.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/description_step/translations.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/description_step/types.ts b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/description_step/types.ts similarity index 92% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/description_step/types.ts rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/description_step/types.ts index bfca6b20684432..564a3c5dc2c018 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/description_step/types.ts +++ b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/description_step/types.ts @@ -9,7 +9,7 @@ import { IIndexPattern, Filter, FilterManager, -} from '../../../../../../../../../../src/plugins/data/public'; +} from '../../../../../../../../../src/plugins/data/public'; import { IMitreEnterpriseAttack } from '../../types'; export interface ListItems { diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/mitre/helpers.test.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/mitre/helpers.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/mitre/helpers.test.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/mitre/helpers.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/mitre/helpers.ts b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/mitre/helpers.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/mitre/helpers.ts rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/mitre/helpers.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/mitre/index.test.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/mitre/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/mitre/index.test.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/mitre/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/mitre/index.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/mitre/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/mitre/index.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/mitre/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/mitre/translations.ts b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/mitre/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/mitre/translations.ts rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/mitre/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/ml_job_select/index.test.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/ml_job_select/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/ml_job_select/index.test.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/ml_job_select/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/ml_job_select/index.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/ml_job_select/index.tsx similarity index 97% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/ml_job_select/index.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/ml_job_select/index.tsx index 82350150488d05..4fb9faaea711c0 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/ml_job_select/index.tsx +++ b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/ml_job_select/index.tsx @@ -17,7 +17,7 @@ import { } from '@elastic/eui'; import styled from 'styled-components'; -import { isJobStarted } from '../../../../../../../../../plugins/siem/common/detection_engine/ml_helpers'; +import { isJobStarted } from '../../../../../../common/detection_engine/ml_helpers'; import { FieldHook, getFieldValidityAndErrorMessage } from '../../../../../shared_imports'; import { useSiemJobs } from '../../../../../components/ml_popover/hooks/use_siem_jobs'; import { useKibana } from '../../../../../lib/kibana'; diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/next_step/__snapshots__/index.test.tsx.snap b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/next_step/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/next_step/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/next_step/__snapshots__/index.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/next_step/index.test.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/next_step/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/next_step/index.test.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/next_step/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/next_step/index.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/next_step/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/next_step/index.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/next_step/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/optional_field_label/index.test.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/optional_field_label/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/optional_field_label/index.test.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/optional_field_label/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/optional_field_label/index.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/optional_field_label/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/optional_field_label/index.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/optional_field_label/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/pick_timeline/index.test.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/pick_timeline/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/pick_timeline/index.test.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/pick_timeline/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/pick_timeline/index.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/pick_timeline/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/pick_timeline/index.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/pick_timeline/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/pre_packaged_rules/load_empty_prompt.test.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/pre_packaged_rules/load_empty_prompt.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/pre_packaged_rules/load_empty_prompt.test.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/pre_packaged_rules/load_empty_prompt.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/pre_packaged_rules/load_empty_prompt.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/pre_packaged_rules/load_empty_prompt.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/pre_packaged_rules/load_empty_prompt.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/pre_packaged_rules/load_empty_prompt.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/pre_packaged_rules/translations.ts b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/pre_packaged_rules/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/pre_packaged_rules/translations.ts rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/pre_packaged_rules/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/pre_packaged_rules/update_callout.test.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/pre_packaged_rules/update_callout.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/pre_packaged_rules/update_callout.test.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/pre_packaged_rules/update_callout.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/pre_packaged_rules/update_callout.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/pre_packaged_rules/update_callout.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/pre_packaged_rules/update_callout.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/pre_packaged_rules/update_callout.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/query_bar/index.test.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/query_bar/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/query_bar/index.test.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/query_bar/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/query_bar/index.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/query_bar/index.tsx similarity index 99% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/query_bar/index.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/query_bar/index.tsx index d232c86c19e6fd..b92d98a4afb13b 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/query_bar/index.tsx +++ b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/query_bar/index.tsx @@ -17,7 +17,7 @@ import { FilterManager, SavedQuery, SavedQueryTimeFilter, -} from '../../../../../../../../../../src/plugins/data/public'; +} from '../../../../../../../../../src/plugins/data/public'; import { BrowserFields } from '../../../../../containers/source'; import { OpenTimelineModal } from '../../../../../components/open_timeline/open_timeline_modal'; diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/query_bar/translations.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/query_bar/translations.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/query_bar/translations.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/query_bar/translations.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/read_only_callout/index.test.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/read_only_callout/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/read_only_callout/index.test.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/read_only_callout/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/read_only_callout/index.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/read_only_callout/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/read_only_callout/index.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/read_only_callout/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/read_only_callout/translations.ts b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/read_only_callout/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/read_only_callout/translations.ts rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/read_only_callout/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/rule_actions_field/index.test.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/rule_actions_field/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/rule_actions_field/index.test.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/rule_actions_field/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/rule_actions_field/index.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/rule_actions_field/index.tsx similarity index 87% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/rule_actions_field/index.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/rule_actions_field/index.tsx index b4d813c48b43f2..b743888b678155 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/rule_actions_field/index.tsx +++ b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/rule_actions_field/index.tsx @@ -7,15 +7,12 @@ import React, { useCallback, useEffect, useState } from 'react'; import deepMerge from 'deepmerge'; -import { NOTIFICATION_SUPPORTED_ACTION_TYPES_IDS } from '../../../../../../../../../plugins/siem/common/constants'; +import { NOTIFICATION_SUPPORTED_ACTION_TYPES_IDS } from '../../../../../../common/constants'; // eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { loadActionTypes } from '../../../../../../../../../plugins/triggers_actions_ui/public/application/lib/action_connector_api'; +import { loadActionTypes } from '../../../../../../../triggers_actions_ui/public/application/lib/action_connector_api'; import { SelectField } from '../../../../../shared_imports'; -import { - ActionForm, - ActionType, -} from '../../../../../../../../../plugins/triggers_actions_ui/public'; -import { AlertAction } from '../../../../../../../../../plugins/alerting/common'; +import { ActionForm, ActionType } from '../../../../../../../triggers_actions_ui/public'; +import { AlertAction } from '../../../../../../../alerting/common'; import { useKibana } from '../../../../../lib/kibana'; type ThrottleSelectField = typeof SelectField; diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/rule_actions_overflow/__snapshots__/index.test.tsx.snap b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/rule_actions_overflow/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/rule_actions_overflow/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/rule_actions_overflow/__snapshots__/index.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/rule_actions_overflow/index.test.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/rule_actions_overflow/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/rule_actions_overflow/index.test.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/rule_actions_overflow/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/rule_actions_overflow/index.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/rule_actions_overflow/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/rule_actions_overflow/index.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/rule_actions_overflow/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/rule_actions_overflow/translations.ts b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/rule_actions_overflow/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/rule_actions_overflow/translations.ts rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/rule_actions_overflow/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/rule_status/helpers.test.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/rule_status/helpers.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/rule_status/helpers.test.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/rule_status/helpers.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/rule_status/helpers.ts b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/rule_status/helpers.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/rule_status/helpers.ts rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/rule_status/helpers.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/rule_status/index.test.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/rule_status/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/rule_status/index.test.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/rule_status/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/rule_status/index.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/rule_status/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/rule_status/index.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/rule_status/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/rule_status/translations.ts b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/rule_status/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/rule_status/translations.ts rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/rule_status/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/rule_switch/__snapshots__/index.test.tsx.snap b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/rule_switch/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/rule_switch/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/rule_switch/__snapshots__/index.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/rule_switch/index.test.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/rule_switch/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/rule_switch/index.test.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/rule_switch/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/rule_switch/index.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/rule_switch/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/rule_switch/index.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/rule_switch/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/schedule_item_form/index.test.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/schedule_item_form/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/schedule_item_form/index.test.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/schedule_item_form/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/schedule_item_form/index.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/schedule_item_form/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/schedule_item_form/index.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/schedule_item_form/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/schedule_item_form/translations.ts b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/schedule_item_form/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/schedule_item_form/translations.ts rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/schedule_item_form/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/select_rule_type/index.test.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/select_rule_type/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/select_rule_type/index.test.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/select_rule_type/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/select_rule_type/index.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/select_rule_type/index.tsx similarity index 94% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/select_rule_type/index.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/select_rule_type/index.tsx index 2b1e5a367a9651..6f3d299da8d452 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/select_rule_type/index.tsx +++ b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/select_rule_type/index.tsx @@ -16,8 +16,8 @@ import { EuiText, } from '@elastic/eui'; -import { isMlRule } from '../../../../../../../../../plugins/siem/common/detection_engine/ml_helpers'; -import { RuleType } from '../../../../../../../../../plugins/siem/common/detection_engine/types'; +import { isMlRule } from '../../../../../../common/detection_engine/ml_helpers'; +import { RuleType } from '../../../../../../common/detection_engine/types'; import { FieldHook } from '../../../../../shared_imports'; import { useKibana } from '../../../../../lib/kibana'; import * as i18n from './translations'; diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/select_rule_type/translations.ts b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/select_rule_type/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/select_rule_type/translations.ts rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/select_rule_type/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/severity_badge/index.test.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/severity_badge/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/severity_badge/index.test.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/severity_badge/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/severity_badge/index.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/severity_badge/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/severity_badge/index.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/severity_badge/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/status_icon/index.test.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/status_icon/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/status_icon/index.test.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/status_icon/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/status_icon/index.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/status_icon/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/status_icon/index.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/status_icon/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_about_rule/data.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/step_about_rule/data.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_about_rule/data.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/step_about_rule/data.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_about_rule/default_value.ts b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/step_about_rule/default_value.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_about_rule/default_value.ts rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/step_about_rule/default_value.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_about_rule/helpers.test.ts b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/step_about_rule/helpers.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_about_rule/helpers.test.ts rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/step_about_rule/helpers.test.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_about_rule/helpers.ts b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/step_about_rule/helpers.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_about_rule/helpers.ts rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/step_about_rule/helpers.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_about_rule/index.test.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/step_about_rule/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_about_rule/index.test.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/step_about_rule/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_about_rule/index.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/step_about_rule/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_about_rule/index.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/step_about_rule/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_about_rule/schema.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/step_about_rule/schema.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_about_rule/schema.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/step_about_rule/schema.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_about_rule/translations.ts b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/step_about_rule/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_about_rule/translations.ts rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/step_about_rule/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_about_rule_details/index.test.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/step_about_rule_details/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_about_rule_details/index.test.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/step_about_rule_details/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_about_rule_details/index.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/step_about_rule_details/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_about_rule_details/index.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/step_about_rule_details/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_about_rule_details/translations.ts b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/step_about_rule_details/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_about_rule_details/translations.ts rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/step_about_rule_details/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_content_wrapper/index.test.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/step_content_wrapper/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_content_wrapper/index.test.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/step_content_wrapper/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_content_wrapper/index.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/step_content_wrapper/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_content_wrapper/index.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/step_content_wrapper/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_define_rule/index.test.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/step_define_rule/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_define_rule/index.test.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/step_define_rule/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_define_rule/index.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/step_define_rule/index.tsx similarity index 97% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_define_rule/index.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/step_define_rule/index.tsx index be9e919b806b5f..b6887badc56be5 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_define_rule/index.tsx +++ b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/step_define_rule/index.tsx @@ -9,9 +9,9 @@ import React, { FC, memo, useCallback, useState, useEffect } from 'react'; import styled from 'styled-components'; import deepEqual from 'fast-deep-equal'; -import { DEFAULT_INDEX_KEY } from '../../../../../../../../../plugins/siem/common/constants'; -import { isMlRule } from '../../../../../../../../../plugins/siem/common/detection_engine/ml_helpers'; -import { IIndexPattern } from '../../../../../../../../../../src/plugins/data/public'; +import { DEFAULT_INDEX_KEY } from '../../../../../../common/constants'; +import { isMlRule } from '../../../../../../common/detection_engine/ml_helpers'; +import { IIndexPattern } from '../../../../../../../../../src/plugins/data/public'; import { useFetchIndexPatterns } from '../../../../../containers/detection_engine/rules'; import { DEFAULT_TIMELINE_TITLE } from '../../../../../components/timeline/translations'; import { useMlCapabilities } from '../../../../../components/ml_popover/hooks/use_ml_capabilities'; diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_define_rule/schema.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/step_define_rule/schema.tsx similarity index 96% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_define_rule/schema.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/step_define_rule/schema.tsx index 629c6758a14147..8915c5f0a224f9 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_define_rule/schema.tsx +++ b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/step_define_rule/schema.tsx @@ -9,8 +9,8 @@ import { EuiText } from '@elastic/eui'; import { isEmpty } from 'lodash/fp'; import React from 'react'; -import { isMlRule } from '../../../../../../../../../plugins/siem/common/detection_engine/ml_helpers'; -import { esKuery } from '../../../../../../../../../../src/plugins/data/public'; +import { isMlRule } from '../../../../../../common/detection_engine/ml_helpers'; +import { esKuery } from '../../../../../../../../../src/plugins/data/public'; import { FieldValueQueryBar } from '../query_bar'; import { ERROR_CODE, diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_define_rule/translations.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/step_define_rule/translations.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_define_rule/translations.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/step_define_rule/translations.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_define_rule/types.ts b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/step_define_rule/types.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_define_rule/types.ts rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/step_define_rule/types.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_panel/index.test.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/step_panel/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_panel/index.test.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/step_panel/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_panel/index.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/step_panel/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_panel/index.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/step_panel/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_rule_actions/index.test.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/step_rule_actions/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_rule_actions/index.test.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/step_rule_actions/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_rule_actions/index.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/step_rule_actions/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_rule_actions/index.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/step_rule_actions/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_rule_actions/schema.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/step_rule_actions/schema.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_rule_actions/schema.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/step_rule_actions/schema.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_rule_actions/translations.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/step_rule_actions/translations.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_rule_actions/translations.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/step_rule_actions/translations.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_schedule_rule/index.test.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/step_schedule_rule/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_schedule_rule/index.test.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/step_schedule_rule/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_schedule_rule/index.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/step_schedule_rule/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_schedule_rule/index.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/step_schedule_rule/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_schedule_rule/schema.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/step_schedule_rule/schema.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_schedule_rule/schema.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/step_schedule_rule/schema.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_schedule_rule/translations.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/step_schedule_rule/translations.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_schedule_rule/translations.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/step_schedule_rule/translations.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/throttle_select_field/index.test.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/throttle_select_field/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/throttle_select_field/index.test.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/throttle_select_field/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/throttle_select_field/index.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/throttle_select_field/index.tsx similarity index 94% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/throttle_select_field/index.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/components/throttle_select_field/index.tsx index 3b297a623e34d5..0cf15c41a0f913 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/throttle_select_field/index.tsx +++ b/x-pack/plugins/siem/public/pages/detection_engine/rules/components/throttle_select_field/index.tsx @@ -9,7 +9,7 @@ import React, { useCallback } from 'react'; import { NOTIFICATION_THROTTLE_RULE, NOTIFICATION_THROTTLE_NO_ACTIONS, -} from '../../../../../../../../../plugins/siem/common/constants'; +} from '../../../../../../common/constants'; import { SelectField } from '../../../../../shared_imports'; export const THROTTLE_OPTIONS = [ diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/create/helpers.test.ts b/x-pack/plugins/siem/public/pages/detection_engine/rules/create/helpers.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/create/helpers.test.ts rename to x-pack/plugins/siem/public/pages/detection_engine/rules/create/helpers.test.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/create/helpers.ts b/x-pack/plugins/siem/public/pages/detection_engine/rules/create/helpers.ts similarity index 93% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/create/helpers.ts rename to x-pack/plugins/siem/public/pages/detection_engine/rules/create/helpers.ts index a65e8178f75c42..7ad116c313361d 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/create/helpers.ts +++ b/x-pack/plugins/siem/public/pages/detection_engine/rules/create/helpers.ts @@ -8,10 +8,10 @@ import { has, isEmpty } from 'lodash/fp'; import moment from 'moment'; import deepmerge from 'deepmerge'; -import { NOTIFICATION_THROTTLE_NO_ACTIONS } from '../../../../../../../../plugins/siem/common/constants'; -import { transformAlertToRuleAction } from '../../../../../../../../plugins/siem/common/detection_engine/transform_actions'; -import { RuleType } from '../../../../../../../../plugins/siem/common/detection_engine/types'; -import { isMlRule } from '../../../../../../../../plugins/siem/common/detection_engine/ml_helpers'; +import { NOTIFICATION_THROTTLE_NO_ACTIONS } from '../../../../../common/constants'; +import { transformAlertToRuleAction } from '../../../../../common/detection_engine/transform_actions'; +import { RuleType } from '../../../../../common/detection_engine/types'; +import { isMlRule } from '../../../../../common/detection_engine/ml_helpers'; import { NewRule } from '../../../../containers/detection_engine/rules'; import { diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/create/index.test.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/create/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/create/index.test.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/create/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/create/index.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/create/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/create/index.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/create/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/create/translations.ts b/x-pack/plugins/siem/public/pages/detection_engine/rules/create/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/create/translations.ts rename to x-pack/plugins/siem/public/pages/detection_engine/rules/create/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/details/failure_history.test.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/details/failure_history.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/details/failure_history.test.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/details/failure_history.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/details/failure_history.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/details/failure_history.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/details/failure_history.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/details/failure_history.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/details/index.test.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/details/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/details/index.test.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/details/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/details/index.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/details/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/details/index.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/details/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/details/status_failed_callout.test.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/details/status_failed_callout.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/details/status_failed_callout.test.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/details/status_failed_callout.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/details/status_failed_callout.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/details/status_failed_callout.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/details/status_failed_callout.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/details/status_failed_callout.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/details/translations.ts b/x-pack/plugins/siem/public/pages/detection_engine/rules/details/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/details/translations.ts rename to x-pack/plugins/siem/public/pages/detection_engine/rules/details/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/edit/index.test.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/edit/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/edit/index.test.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/edit/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/edit/index.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/edit/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/edit/index.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/edit/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/edit/translations.ts b/x-pack/plugins/siem/public/pages/detection_engine/rules/edit/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/edit/translations.ts rename to x-pack/plugins/siem/public/pages/detection_engine/rules/edit/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/helpers.test.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/helpers.test.tsx similarity index 99% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/helpers.test.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/helpers.test.tsx index 1c01a19573cd67..f2a04a87ced278 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/helpers.test.tsx +++ b/x-pack/plugins/siem/public/pages/detection_engine/rules/helpers.test.tsx @@ -17,7 +17,7 @@ import { userHasNoPermissions, } from './helpers'; import { mockRuleWithEverything, mockRule } from './all/__mocks__/mock'; -import { esFilters } from '../../../../../../../../src/plugins/data/public'; +import { esFilters } from '../../../../../../../src/plugins/data/public'; import { Rule } from '../../../containers/detection_engine/rules'; import { AboutStepRule, diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/helpers.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/helpers.tsx similarity index 94% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/helpers.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/helpers.tsx index 7bea41c2ab4d54..2ccbffd864070e 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/helpers.tsx +++ b/x-pack/plugins/siem/public/pages/detection_engine/rules/helpers.tsx @@ -10,13 +10,10 @@ import moment from 'moment'; import memoizeOne from 'memoize-one'; import { useLocation } from 'react-router-dom'; -import { - RuleAlertAction, - RuleType, -} from '../../../../../../../plugins/siem/common/detection_engine/types'; -import { isMlRule } from '../../../../../../../plugins/siem/common/detection_engine/ml_helpers'; -import { transformRuleToAlertAction } from '../../../../../../../plugins/siem/common/detection_engine/transform_actions'; -import { Filter } from '../../../../../../../../src/plugins/data/public'; +import { RuleAlertAction, RuleType } from '../../../../common/detection_engine/types'; +import { isMlRule } from '../../../../common/detection_engine/ml_helpers'; +import { transformRuleToAlertAction } from '../../../../common/detection_engine/transform_actions'; +import { Filter } from '../../../../../../../src/plugins/data/public'; import { Rule } from '../../../containers/detection_engine/rules'; import { FormData, FormHook, FormSchema } from '../../../shared_imports'; import { diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/index.test.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/index.test.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/index.tsx b/x-pack/plugins/siem/public/pages/detection_engine/rules/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/index.tsx rename to x-pack/plugins/siem/public/pages/detection_engine/rules/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/translations.ts b/x-pack/plugins/siem/public/pages/detection_engine/rules/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/translations.ts rename to x-pack/plugins/siem/public/pages/detection_engine/rules/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/types.ts b/x-pack/plugins/siem/public/pages/detection_engine/rules/types.ts similarity index 92% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/types.ts rename to x-pack/plugins/siem/public/pages/detection_engine/rules/types.ts index 380ef521903490..dcb5397d28f7ce 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/types.ts +++ b/x-pack/plugins/siem/public/pages/detection_engine/rules/types.ts @@ -4,12 +4,9 @@ * you may not use this file except in compliance with the Elastic License. */ -import { - RuleAlertAction, - RuleType, -} from '../../../../../../../plugins/siem/common/detection_engine/types'; -import { AlertAction } from '../../../../../../../plugins/alerting/common'; -import { Filter } from '../../../../../../../../src/plugins/data/common'; +import { RuleAlertAction, RuleType } from '../../../../common/detection_engine/types'; +import { AlertAction } from '../../../../../alerting/common'; +import { Filter } from '../../../../../../../src/plugins/data/common'; import { FieldValueQueryBar } from './components/query_bar'; import { FormData, FormHook } from '../../../shared_imports'; import { FieldValueTimeline } from './components/pick_timeline'; diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/utils.test.ts b/x-pack/plugins/siem/public/pages/detection_engine/rules/utils.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/utils.test.ts rename to x-pack/plugins/siem/public/pages/detection_engine/rules/utils.test.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/utils.ts b/x-pack/plugins/siem/public/pages/detection_engine/rules/utils.ts similarity index 97% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/utils.ts rename to x-pack/plugins/siem/public/pages/detection_engine/rules/utils.ts index 11942c57a4d279..f93ad94dd462b0 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/utils.ts +++ b/x-pack/plugins/siem/public/pages/detection_engine/rules/utils.ts @@ -6,7 +6,7 @@ import { isEmpty } from 'lodash/fp'; -import { ChromeBreadcrumb } from '../../../../../../../../src/core/public'; +import { ChromeBreadcrumb } from '../../../../../../../src/core/public'; import { getDetectionEngineUrl, getDetectionEngineTabUrl, diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/translations.ts b/x-pack/plugins/siem/public/pages/detection_engine/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/translations.ts rename to x-pack/plugins/siem/public/pages/detection_engine/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/types.ts b/x-pack/plugins/siem/public/pages/detection_engine/types.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/detection_engine/types.ts rename to x-pack/plugins/siem/public/pages/detection_engine/types.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/home/home_navigations.tsx b/x-pack/plugins/siem/public/pages/home/home_navigations.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/home/home_navigations.tsx rename to x-pack/plugins/siem/public/pages/home/home_navigations.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/home/index.tsx b/x-pack/plugins/siem/public/pages/home/index.tsx similarity index 96% rename from x-pack/legacy/plugins/siem/public/pages/home/index.tsx rename to x-pack/plugins/siem/public/pages/home/index.tsx index a8a34383585c6a..a9e0962f16e6ed 100644 --- a/x-pack/legacy/plugins/siem/public/pages/home/index.tsx +++ b/x-pack/plugins/siem/public/pages/home/index.tsx @@ -31,13 +31,6 @@ import { Timelines } from '../timelines'; import { navTabs } from './home_navigations'; import { SiemPageName } from './types'; -/* - * This is import is important to keep because if we do not have it - * we will loose the map embeddable until they move to the New Platform - * we need to have it - */ -import 'uiExports/embeddableFactories'; - const WrappedByAutoSizer = styled.div` height: 100%; `; diff --git a/x-pack/legacy/plugins/siem/public/pages/home/translations.ts b/x-pack/plugins/siem/public/pages/home/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/home/translations.ts rename to x-pack/plugins/siem/public/pages/home/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/home/types.ts b/x-pack/plugins/siem/public/pages/home/types.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/home/types.ts rename to x-pack/plugins/siem/public/pages/home/types.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/hosts/details/details_tabs.test.tsx b/x-pack/plugins/siem/public/pages/hosts/details/details_tabs.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/hosts/details/details_tabs.test.tsx rename to x-pack/plugins/siem/public/pages/hosts/details/details_tabs.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/hosts/details/details_tabs.tsx b/x-pack/plugins/siem/public/pages/hosts/details/details_tabs.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/hosts/details/details_tabs.tsx rename to x-pack/plugins/siem/public/pages/hosts/details/details_tabs.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/hosts/details/helpers.test.ts b/x-pack/plugins/siem/public/pages/hosts/details/helpers.test.ts similarity index 96% rename from x-pack/legacy/plugins/siem/public/pages/hosts/details/helpers.test.ts rename to x-pack/plugins/siem/public/pages/hosts/details/helpers.test.ts index 69268d841e12ee..d989d709cc4aff 100644 --- a/x-pack/legacy/plugins/siem/public/pages/hosts/details/helpers.test.ts +++ b/x-pack/plugins/siem/public/pages/hosts/details/helpers.test.ts @@ -5,7 +5,7 @@ */ import { getHostDetailsEventsKqlQueryExpression, getHostDetailsPageFilters } from './helpers'; -import { Filter } from '../../../../../../../../src/plugins/data/common/es_query'; +import { Filter } from '../../../../../../../src/plugins/data/common/es_query'; describe('hosts page helpers', () => { describe('getHostDetailsEventsKqlQueryExpression', () => { diff --git a/x-pack/legacy/plugins/siem/public/pages/hosts/details/helpers.ts b/x-pack/plugins/siem/public/pages/hosts/details/helpers.ts similarity index 94% rename from x-pack/legacy/plugins/siem/public/pages/hosts/details/helpers.ts rename to x-pack/plugins/siem/public/pages/hosts/details/helpers.ts index 461fde2bba0caa..6da76f2fb5cac9 100644 --- a/x-pack/legacy/plugins/siem/public/pages/hosts/details/helpers.ts +++ b/x-pack/plugins/siem/public/pages/hosts/details/helpers.ts @@ -5,7 +5,7 @@ */ import { escapeQueryValue } from '../../../lib/keury'; -import { Filter } from '../../../../../../../../src/plugins/data/public'; +import { Filter } from '../../../../../../../src/plugins/data/public'; /** Returns the kqlQueryExpression for the `Events` widget on the `Host Details` page */ export const getHostDetailsEventsKqlQueryExpression = ({ diff --git a/x-pack/legacy/plugins/siem/public/pages/hosts/details/index.tsx b/x-pack/plugins/siem/public/pages/hosts/details/index.tsx similarity index 99% rename from x-pack/legacy/plugins/siem/public/pages/hosts/details/index.tsx rename to x-pack/plugins/siem/public/pages/hosts/details/index.tsx index a12c95b3b5a6fe..ef04288aa1b6fe 100644 --- a/x-pack/legacy/plugins/siem/public/pages/hosts/details/index.tsx +++ b/x-pack/plugins/siem/public/pages/hosts/details/index.tsx @@ -33,7 +33,7 @@ import { inputsSelectors, State } from '../../../store'; import { setHostDetailsTablesActivePageToZero as dispatchHostDetailsTablesActivePageToZero } from '../../../store/hosts/actions'; import { setAbsoluteRangeDatePicker as dispatchAbsoluteRangeDatePicker } from '../../../store/inputs/actions'; import { SpyRoute } from '../../../utils/route/spy_routes'; -import { esQuery, Filter } from '../../../../../../../../src/plugins/data/public'; +import { esQuery, Filter } from '../../../../../../../src/plugins/data/public'; import { HostsEmptyPage } from '../hosts_empty_page'; import { HostDetailsTabs } from './details_tabs'; diff --git a/x-pack/legacy/plugins/siem/public/pages/hosts/details/nav_tabs.test.tsx b/x-pack/plugins/siem/public/pages/hosts/details/nav_tabs.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/hosts/details/nav_tabs.test.tsx rename to x-pack/plugins/siem/public/pages/hosts/details/nav_tabs.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/hosts/details/nav_tabs.tsx b/x-pack/plugins/siem/public/pages/hosts/details/nav_tabs.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/hosts/details/nav_tabs.tsx rename to x-pack/plugins/siem/public/pages/hosts/details/nav_tabs.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/hosts/details/types.ts b/x-pack/plugins/siem/public/pages/hosts/details/types.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/hosts/details/types.ts rename to x-pack/plugins/siem/public/pages/hosts/details/types.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/hosts/details/utils.ts b/x-pack/plugins/siem/public/pages/hosts/details/utils.ts similarity index 96% rename from x-pack/legacy/plugins/siem/public/pages/hosts/details/utils.ts rename to x-pack/plugins/siem/public/pages/hosts/details/utils.ts index c4680dc3d795ef..af4ba8eb091e20 100644 --- a/x-pack/legacy/plugins/siem/public/pages/hosts/details/utils.ts +++ b/x-pack/plugins/siem/public/pages/hosts/details/utils.ts @@ -6,7 +6,7 @@ import { get, isEmpty } from 'lodash/fp'; -import { ChromeBreadcrumb } from '../../../../../../../../src/core/public'; +import { ChromeBreadcrumb } from '../../../../../../../src/core/public'; import { hostsModel } from '../../../store'; import { HostsTableType } from '../../../store/hosts/model'; import { getHostsUrl, getHostDetailsUrl } from '../../../components/link_to/redirect_to_hosts'; diff --git a/x-pack/legacy/plugins/siem/public/pages/hosts/hosts.test.tsx b/x-pack/plugins/siem/public/pages/hosts/hosts.test.tsx similarity index 98% rename from x-pack/legacy/plugins/siem/public/pages/hosts/hosts.test.tsx rename to x-pack/plugins/siem/public/pages/hosts/hosts.test.tsx index 99cf767c65e08b..6134c1dd6911a2 100644 --- a/x-pack/legacy/plugins/siem/public/pages/hosts/hosts.test.tsx +++ b/x-pack/plugins/siem/public/pages/hosts/hosts.test.tsx @@ -10,7 +10,7 @@ import React from 'react'; import { Router } from 'react-router-dom'; import { MockedProvider } from 'react-apollo/test-utils'; -import { Filter } from '../../../../../../../src/plugins/data/common/es_query'; +import { Filter } from '../../../../../../src/plugins/data/common/es_query'; import '../../mock/match_media'; import { mocksSource } from '../../containers/source/mock'; import { wait } from '../../lib/helpers'; diff --git a/x-pack/legacy/plugins/siem/public/pages/hosts/hosts.tsx b/x-pack/plugins/siem/public/pages/hosts/hosts.tsx similarity index 98% rename from x-pack/legacy/plugins/siem/public/pages/hosts/hosts.tsx rename to x-pack/plugins/siem/public/pages/hosts/hosts.tsx index d574925a916009..028c804f4d48fe 100644 --- a/x-pack/legacy/plugins/siem/public/pages/hosts/hosts.tsx +++ b/x-pack/plugins/siem/public/pages/hosts/hosts.tsx @@ -28,7 +28,7 @@ import { inputsSelectors, State, hostsModel } from '../../store'; import { setAbsoluteRangeDatePicker as dispatchSetAbsoluteRangeDatePicker } from '../../store/inputs/actions'; import { SpyRoute } from '../../utils/route/spy_routes'; -import { esQuery } from '../../../../../../../src/plugins/data/public'; +import { esQuery } from '../../../../../../src/plugins/data/public'; import { useMlCapabilities } from '../../components/ml_popover/hooks/use_ml_capabilities'; import { HostsEmptyPage } from './hosts_empty_page'; import { HostsTabs } from './hosts_tabs'; diff --git a/x-pack/legacy/plugins/siem/public/pages/hosts/hosts_empty_page.tsx b/x-pack/plugins/siem/public/pages/hosts/hosts_empty_page.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/hosts/hosts_empty_page.tsx rename to x-pack/plugins/siem/public/pages/hosts/hosts_empty_page.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/hosts/hosts_tabs.tsx b/x-pack/plugins/siem/public/pages/hosts/hosts_tabs.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/hosts/hosts_tabs.tsx rename to x-pack/plugins/siem/public/pages/hosts/hosts_tabs.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/hosts/index.tsx b/x-pack/plugins/siem/public/pages/hosts/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/hosts/index.tsx rename to x-pack/plugins/siem/public/pages/hosts/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/hosts/nav_tabs.test.tsx b/x-pack/plugins/siem/public/pages/hosts/nav_tabs.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/hosts/nav_tabs.test.tsx rename to x-pack/plugins/siem/public/pages/hosts/nav_tabs.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/hosts/nav_tabs.tsx b/x-pack/plugins/siem/public/pages/hosts/nav_tabs.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/hosts/nav_tabs.tsx rename to x-pack/plugins/siem/public/pages/hosts/nav_tabs.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/hosts/navigation/alerts_query_tab_body.tsx b/x-pack/plugins/siem/public/pages/hosts/navigation/alerts_query_tab_body.tsx similarity index 95% rename from x-pack/legacy/plugins/siem/public/pages/hosts/navigation/alerts_query_tab_body.tsx rename to x-pack/plugins/siem/public/pages/hosts/navigation/alerts_query_tab_body.tsx index ebcb07131bb247..ec33834b1bf734 100644 --- a/x-pack/legacy/plugins/siem/public/pages/hosts/navigation/alerts_query_tab_body.tsx +++ b/x-pack/plugins/siem/public/pages/hosts/navigation/alerts_query_tab_body.tsx @@ -6,7 +6,7 @@ import React, { useMemo } from 'react'; -import { Filter } from '../../../../../../../../src/plugins/data/public'; +import { Filter } from '../../../../../../../src/plugins/data/public'; import { AlertsView } from '../../../components/alerts_viewer'; import { AlertsComponentQueryProps } from './types'; diff --git a/x-pack/legacy/plugins/siem/public/pages/hosts/navigation/authentications_query_tab_body.tsx b/x-pack/plugins/siem/public/pages/hosts/navigation/authentications_query_tab_body.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/hosts/navigation/authentications_query_tab_body.tsx rename to x-pack/plugins/siem/public/pages/hosts/navigation/authentications_query_tab_body.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/hosts/navigation/events_query_tab_body.tsx b/x-pack/plugins/siem/public/pages/hosts/navigation/events_query_tab_body.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/hosts/navigation/events_query_tab_body.tsx rename to x-pack/plugins/siem/public/pages/hosts/navigation/events_query_tab_body.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/hosts/navigation/hosts_query_tab_body.tsx b/x-pack/plugins/siem/public/pages/hosts/navigation/hosts_query_tab_body.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/hosts/navigation/hosts_query_tab_body.tsx rename to x-pack/plugins/siem/public/pages/hosts/navigation/hosts_query_tab_body.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/hosts/navigation/index.ts b/x-pack/plugins/siem/public/pages/hosts/navigation/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/hosts/navigation/index.ts rename to x-pack/plugins/siem/public/pages/hosts/navigation/index.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/hosts/navigation/types.ts b/x-pack/plugins/siem/public/pages/hosts/navigation/types.ts similarity index 91% rename from x-pack/legacy/plugins/siem/public/pages/hosts/navigation/types.ts rename to x-pack/plugins/siem/public/pages/hosts/navigation/types.ts index 207b86fee02b93..20d4d4e463a7f0 100644 --- a/x-pack/legacy/plugins/siem/public/pages/hosts/navigation/types.ts +++ b/x-pack/plugins/siem/public/pages/hosts/navigation/types.ts @@ -4,8 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ -import { ESTermQuery } from '../../../../../../../plugins/siem/common/typed_json'; -import { Filter, IIndexPattern } from '../../../../../../../../src/plugins/data/public'; +import { ESTermQuery } from '../../../../common/typed_json'; +import { Filter, IIndexPattern } from '../../../../../../../src/plugins/data/public'; import { NarrowDateRange } from '../../../components/ml/types'; import { InspectQuery, Refetch } from '../../../store/inputs/model'; diff --git a/x-pack/legacy/plugins/siem/public/pages/hosts/navigation/uncommon_process_query_tab_body.tsx b/x-pack/plugins/siem/public/pages/hosts/navigation/uncommon_process_query_tab_body.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/hosts/navigation/uncommon_process_query_tab_body.tsx rename to x-pack/plugins/siem/public/pages/hosts/navigation/uncommon_process_query_tab_body.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/hosts/translations.ts b/x-pack/plugins/siem/public/pages/hosts/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/hosts/translations.ts rename to x-pack/plugins/siem/public/pages/hosts/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/hosts/types.ts b/x-pack/plugins/siem/public/pages/hosts/types.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/hosts/types.ts rename to x-pack/plugins/siem/public/pages/hosts/types.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/network/index.tsx b/x-pack/plugins/siem/public/pages/network/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/network/index.tsx rename to x-pack/plugins/siem/public/pages/network/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/network/ip_details/__snapshots__/index.test.tsx.snap b/x-pack/plugins/siem/public/pages/network/ip_details/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/network/ip_details/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/siem/public/pages/network/ip_details/__snapshots__/index.test.tsx.snap diff --git a/x-pack/legacy/plugins/siem/public/pages/network/ip_details/index.test.tsx b/x-pack/plugins/siem/public/pages/network/ip_details/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/network/ip_details/index.test.tsx rename to x-pack/plugins/siem/public/pages/network/ip_details/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/network/ip_details/index.tsx b/x-pack/plugins/siem/public/pages/network/ip_details/index.tsx similarity index 99% rename from x-pack/legacy/plugins/siem/public/pages/network/ip_details/index.tsx rename to x-pack/plugins/siem/public/pages/network/ip_details/index.tsx index e796eaca0cd28e..350d6e34c1c0f7 100644 --- a/x-pack/legacy/plugins/siem/public/pages/network/ip_details/index.tsx +++ b/x-pack/plugins/siem/public/pages/network/ip_details/index.tsx @@ -40,7 +40,7 @@ import { TlsQueryTable } from './tls_query_table'; import { IPDetailsComponentProps } from './types'; import { UsersQueryTable } from './users_query_table'; import { AnomaliesQueryTabBody } from '../../../containers/anomalies/anomalies_query_tab_body'; -import { esQuery } from '../../../../../../../../src/plugins/data/public'; +import { esQuery } from '../../../../../../../src/plugins/data/public'; export { getBreadcrumbs } from './utils'; diff --git a/x-pack/legacy/plugins/siem/public/pages/network/ip_details/network_http_query_table.tsx b/x-pack/plugins/siem/public/pages/network/ip_details/network_http_query_table.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/network/ip_details/network_http_query_table.tsx rename to x-pack/plugins/siem/public/pages/network/ip_details/network_http_query_table.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/network/ip_details/network_top_countries_query_table.tsx b/x-pack/plugins/siem/public/pages/network/ip_details/network_top_countries_query_table.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/network/ip_details/network_top_countries_query_table.tsx rename to x-pack/plugins/siem/public/pages/network/ip_details/network_top_countries_query_table.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/network/ip_details/network_top_n_flow_query_table.tsx b/x-pack/plugins/siem/public/pages/network/ip_details/network_top_n_flow_query_table.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/network/ip_details/network_top_n_flow_query_table.tsx rename to x-pack/plugins/siem/public/pages/network/ip_details/network_top_n_flow_query_table.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/network/ip_details/tls_query_table.tsx b/x-pack/plugins/siem/public/pages/network/ip_details/tls_query_table.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/network/ip_details/tls_query_table.tsx rename to x-pack/plugins/siem/public/pages/network/ip_details/tls_query_table.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/network/ip_details/types.ts b/x-pack/plugins/siem/public/pages/network/ip_details/types.ts similarity index 94% rename from x-pack/legacy/plugins/siem/public/pages/network/ip_details/types.ts rename to x-pack/plugins/siem/public/pages/network/ip_details/types.ts index efd9c644ec6b6f..11c41fc74515e2 100644 --- a/x-pack/legacy/plugins/siem/public/pages/network/ip_details/types.ts +++ b/x-pack/plugins/siem/public/pages/network/ip_details/types.ts @@ -6,7 +6,7 @@ import { IIndexPattern } from 'src/plugins/data/public'; -import { ESTermQuery } from '../../../../../../../plugins/siem/common/typed_json'; +import { ESTermQuery } from '../../../../common/typed_json'; import { NetworkType } from '../../../store/network/model'; import { InspectQuery, Refetch } from '../../../store/inputs/model'; import { FlowTarget, FlowTargetSourceDest } from '../../../graphql/types'; diff --git a/x-pack/legacy/plugins/siem/public/pages/network/ip_details/users_query_table.tsx b/x-pack/plugins/siem/public/pages/network/ip_details/users_query_table.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/network/ip_details/users_query_table.tsx rename to x-pack/plugins/siem/public/pages/network/ip_details/users_query_table.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/network/ip_details/utils.ts b/x-pack/plugins/siem/public/pages/network/ip_details/utils.ts similarity index 96% rename from x-pack/legacy/plugins/siem/public/pages/network/ip_details/utils.ts rename to x-pack/plugins/siem/public/pages/network/ip_details/utils.ts index 1488dd556c0b9d..9d15d7ee250c99 100644 --- a/x-pack/legacy/plugins/siem/public/pages/network/ip_details/utils.ts +++ b/x-pack/plugins/siem/public/pages/network/ip_details/utils.ts @@ -6,7 +6,7 @@ import { get, isEmpty } from 'lodash/fp'; -import { ChromeBreadcrumb } from '../../../../../../../../src/core/public'; +import { ChromeBreadcrumb } from '../../../../../../../src/core/public'; import { decodeIpv6 } from '../../../lib/helpers'; import { getNetworkUrl, getIPDetailsUrl } from '../../../components/link_to/redirect_to_network'; import { networkModel } from '../../../store/network'; diff --git a/x-pack/legacy/plugins/siem/public/pages/network/navigation/alerts_query_tab_body.tsx b/x-pack/plugins/siem/public/pages/network/navigation/alerts_query_tab_body.tsx similarity index 95% rename from x-pack/legacy/plugins/siem/public/pages/network/navigation/alerts_query_tab_body.tsx rename to x-pack/plugins/siem/public/pages/network/navigation/alerts_query_tab_body.tsx index a5d0207f526d10..4c4f6c06ce1e1a 100644 --- a/x-pack/legacy/plugins/siem/public/pages/network/navigation/alerts_query_tab_body.tsx +++ b/x-pack/plugins/siem/public/pages/network/navigation/alerts_query_tab_body.tsx @@ -6,7 +6,7 @@ import React from 'react'; -import { Filter } from '../../../../../../../../src/plugins/data/common/es_query'; +import { Filter } from '../../../../../../../src/plugins/data/common/es_query'; import { AlertsView } from '../../../components/alerts_viewer'; import { NetworkComponentQueryProps } from './types'; diff --git a/x-pack/legacy/plugins/siem/public/pages/network/navigation/conditional_flex_group.tsx b/x-pack/plugins/siem/public/pages/network/navigation/conditional_flex_group.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/network/navigation/conditional_flex_group.tsx rename to x-pack/plugins/siem/public/pages/network/navigation/conditional_flex_group.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/network/navigation/countries_query_tab_body.tsx b/x-pack/plugins/siem/public/pages/network/navigation/countries_query_tab_body.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/network/navigation/countries_query_tab_body.tsx rename to x-pack/plugins/siem/public/pages/network/navigation/countries_query_tab_body.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/network/navigation/dns_query_tab_body.tsx b/x-pack/plugins/siem/public/pages/network/navigation/dns_query_tab_body.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/network/navigation/dns_query_tab_body.tsx rename to x-pack/plugins/siem/public/pages/network/navigation/dns_query_tab_body.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/network/navigation/http_query_tab_body.tsx b/x-pack/plugins/siem/public/pages/network/navigation/http_query_tab_body.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/network/navigation/http_query_tab_body.tsx rename to x-pack/plugins/siem/public/pages/network/navigation/http_query_tab_body.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/network/navigation/index.ts b/x-pack/plugins/siem/public/pages/network/navigation/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/network/navigation/index.ts rename to x-pack/plugins/siem/public/pages/network/navigation/index.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/network/navigation/ips_query_tab_body.tsx b/x-pack/plugins/siem/public/pages/network/navigation/ips_query_tab_body.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/network/navigation/ips_query_tab_body.tsx rename to x-pack/plugins/siem/public/pages/network/navigation/ips_query_tab_body.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/network/navigation/nav_tabs.tsx b/x-pack/plugins/siem/public/pages/network/navigation/nav_tabs.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/network/navigation/nav_tabs.tsx rename to x-pack/plugins/siem/public/pages/network/navigation/nav_tabs.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/network/navigation/network_routes.tsx b/x-pack/plugins/siem/public/pages/network/navigation/network_routes.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/network/navigation/network_routes.tsx rename to x-pack/plugins/siem/public/pages/network/navigation/network_routes.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/network/navigation/network_routes_loading.tsx b/x-pack/plugins/siem/public/pages/network/navigation/network_routes_loading.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/network/navigation/network_routes_loading.tsx rename to x-pack/plugins/siem/public/pages/network/navigation/network_routes_loading.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/network/navigation/tls_query_tab_body.tsx b/x-pack/plugins/siem/public/pages/network/navigation/tls_query_tab_body.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/network/navigation/tls_query_tab_body.tsx rename to x-pack/plugins/siem/public/pages/network/navigation/tls_query_tab_body.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/network/navigation/types.ts b/x-pack/plugins/siem/public/pages/network/navigation/types.ts similarity index 93% rename from x-pack/legacy/plugins/siem/public/pages/network/navigation/types.ts rename to x-pack/plugins/siem/public/pages/network/navigation/types.ts index 90c18b6ff69f46..ee03bff99b9677 100644 --- a/x-pack/legacy/plugins/siem/public/pages/network/navigation/types.ts +++ b/x-pack/plugins/siem/public/pages/network/navigation/types.ts @@ -4,8 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ -import { ESTermQuery } from '../../../../../../../plugins/siem/common/typed_json'; -import { IIndexPattern } from '../../../../../../../../src/plugins/data/common/'; +import { ESTermQuery } from '../../../../common/typed_json'; +import { IIndexPattern } from '../../../../../../../src/plugins/data/common'; import { NavTab } from '../../../components/navigation/types'; import { FlowTargetSourceDest } from '../../../graphql/types'; diff --git a/x-pack/legacy/plugins/siem/public/pages/network/navigation/utils.ts b/x-pack/plugins/siem/public/pages/network/navigation/utils.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/network/navigation/utils.ts rename to x-pack/plugins/siem/public/pages/network/navigation/utils.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/network/network.test.tsx b/x-pack/plugins/siem/public/pages/network/network.test.tsx similarity index 98% rename from x-pack/legacy/plugins/siem/public/pages/network/network.test.tsx rename to x-pack/plugins/siem/public/pages/network/network.test.tsx index 797fef15865184..300cb83c4ce753 100644 --- a/x-pack/legacy/plugins/siem/public/pages/network/network.test.tsx +++ b/x-pack/plugins/siem/public/pages/network/network.test.tsx @@ -11,7 +11,7 @@ import { Router } from 'react-router-dom'; import { MockedProvider } from 'react-apollo/test-utils'; import '../../mock/match_media'; -import { Filter } from '../../../../../../../src/plugins/data/common/es_query'; +import { Filter } from '../../../../../../src/plugins/data/common/es_query'; import { mocksSource } from '../../containers/source/mock'; import { TestProviders, mockGlobalState, apolloClientObservable } from '../../mock'; import { State, createStore } from '../../store'; diff --git a/x-pack/legacy/plugins/siem/public/pages/network/network.tsx b/x-pack/plugins/siem/public/pages/network/network.tsx similarity index 98% rename from x-pack/legacy/plugins/siem/public/pages/network/network.tsx rename to x-pack/plugins/siem/public/pages/network/network.tsx index 9b1ee76e1d376e..65b3142c8c0745 100644 --- a/x-pack/legacy/plugins/siem/public/pages/network/network.tsx +++ b/x-pack/plugins/siem/public/pages/network/network.tsx @@ -10,7 +10,7 @@ import { connect, ConnectedProps } from 'react-redux'; import { useParams } from 'react-router-dom'; import { StickyContainer } from 'react-sticky'; -import { esQuery } from '../../../../../../../src/plugins/data/public'; +import { esQuery } from '../../../../../../src/plugins/data/public'; import { EmbeddedMap } from '../../components/embeddables/embedded_map'; import { FiltersGlobal } from '../../components/filters_global'; import { HeaderPage } from '../../components/header_page'; diff --git a/x-pack/legacy/plugins/siem/public/pages/network/network_empty_page.tsx b/x-pack/plugins/siem/public/pages/network/network_empty_page.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/network/network_empty_page.tsx rename to x-pack/plugins/siem/public/pages/network/network_empty_page.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/network/translations.ts b/x-pack/plugins/siem/public/pages/network/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/network/translations.ts rename to x-pack/plugins/siem/public/pages/network/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/network/types.ts b/x-pack/plugins/siem/public/pages/network/types.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/network/types.ts rename to x-pack/plugins/siem/public/pages/network/types.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/overview/alerts_by_category/index.test.tsx b/x-pack/plugins/siem/public/pages/overview/alerts_by_category/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/overview/alerts_by_category/index.test.tsx rename to x-pack/plugins/siem/public/pages/overview/alerts_by_category/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/overview/alerts_by_category/index.tsx b/x-pack/plugins/siem/public/pages/overview/alerts_by_category/index.tsx similarity index 96% rename from x-pack/legacy/plugins/siem/public/pages/overview/alerts_by_category/index.tsx rename to x-pack/plugins/siem/public/pages/overview/alerts_by_category/index.tsx index 8e09572cb27966..a1936cf9221f85 100644 --- a/x-pack/legacy/plugins/siem/public/pages/overview/alerts_by_category/index.tsx +++ b/x-pack/plugins/siem/public/pages/overview/alerts_by_category/index.tsx @@ -9,7 +9,7 @@ import numeral from '@elastic/numeral'; import React, { useEffect, useMemo } from 'react'; import { Position } from '@elastic/charts'; -import { DEFAULT_NUMBER_FORMAT } from '../../../../../../../plugins/siem/common/constants'; +import { DEFAULT_NUMBER_FORMAT } from '../../../../common/constants'; import { SHOWING, UNIT } from '../../../components/alerts_viewer/translations'; import { getDetectionEngineAlertUrl } from '../../../components/link_to/redirect_to_detection_engine'; import { MatrixHistogramContainer } from '../../../components/matrix_histogram'; @@ -20,7 +20,7 @@ import { esQuery, IIndexPattern, Query, -} from '../../../../../../../../src/plugins/data/public'; +} from '../../../../../../../src/plugins/data/public'; import { inputsModel } from '../../../store'; import { HostsType } from '../../../store/hosts/model'; diff --git a/x-pack/legacy/plugins/siem/public/pages/overview/event_counts/index.test.tsx b/x-pack/plugins/siem/public/pages/overview/event_counts/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/overview/event_counts/index.test.tsx rename to x-pack/plugins/siem/public/pages/overview/event_counts/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/overview/event_counts/index.tsx b/x-pack/plugins/siem/public/pages/overview/event_counts/index.tsx similarity index 97% rename from x-pack/legacy/plugins/siem/public/pages/overview/event_counts/index.tsx rename to x-pack/plugins/siem/public/pages/overview/event_counts/index.tsx index 0fc37935b6062a..f242b0d84d7c13 100644 --- a/x-pack/legacy/plugins/siem/public/pages/overview/event_counts/index.tsx +++ b/x-pack/plugins/siem/public/pages/overview/event_counts/index.tsx @@ -19,7 +19,7 @@ import { esQuery, IIndexPattern, Query, -} from '../../../../../../../../src/plugins/data/public'; +} from '../../../../../../../src/plugins/data/public'; import { inputsModel } from '../../../store'; const HorizontalSpacer = styled(EuiFlexItem)` diff --git a/x-pack/legacy/plugins/siem/public/pages/overview/events_by_dataset/__mocks__/index.tsx b/x-pack/plugins/siem/public/pages/overview/events_by_dataset/__mocks__/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/overview/events_by_dataset/__mocks__/index.tsx rename to x-pack/plugins/siem/public/pages/overview/events_by_dataset/__mocks__/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/overview/events_by_dataset/index.tsx b/x-pack/plugins/siem/public/pages/overview/events_by_dataset/index.tsx similarity index 97% rename from x-pack/legacy/plugins/siem/public/pages/overview/events_by_dataset/index.tsx rename to x-pack/plugins/siem/public/pages/overview/events_by_dataset/index.tsx index 14cc29adb505a4..77d6da7a7efc4d 100644 --- a/x-pack/legacy/plugins/siem/public/pages/overview/events_by_dataset/index.tsx +++ b/x-pack/plugins/siem/public/pages/overview/events_by_dataset/index.tsx @@ -10,7 +10,7 @@ import numeral from '@elastic/numeral'; import React, { useEffect, useMemo } from 'react'; import uuid from 'uuid'; -import { DEFAULT_NUMBER_FORMAT } from '../../../../../../../plugins/siem/common/constants'; +import { DEFAULT_NUMBER_FORMAT } from '../../../../common/constants'; import { SHOWING, UNIT } from '../../../components/events_viewer/translations'; import { getTabsOnHostsUrl } from '../../../components/link_to/redirect_to_hosts'; import { MatrixHistogramContainer } from '../../../components/matrix_histogram'; @@ -29,7 +29,7 @@ import { esQuery, IIndexPattern, Query, -} from '../../../../../../../../src/plugins/data/public'; +} from '../../../../../../../src/plugins/data/public'; import { inputsModel } from '../../../store'; import { HostsTableType, HostsType } from '../../../store/hosts/model'; import { InputsModelId } from '../../../store/inputs/constants'; diff --git a/x-pack/legacy/plugins/siem/public/pages/overview/index.tsx b/x-pack/plugins/siem/public/pages/overview/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/overview/index.tsx rename to x-pack/plugins/siem/public/pages/overview/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/overview/overview.test.tsx b/x-pack/plugins/siem/public/pages/overview/overview.test.tsx similarity index 95% rename from x-pack/legacy/plugins/siem/public/pages/overview/overview.test.tsx rename to x-pack/plugins/siem/public/pages/overview/overview.test.tsx index b20cd842955666..c129258fa2e87b 100644 --- a/x-pack/legacy/plugins/siem/public/pages/overview/overview.test.tsx +++ b/x-pack/plugins/siem/public/pages/overview/overview.test.tsx @@ -15,14 +15,7 @@ import { TestProviders } from '../../mock'; import { mocksSource } from '../../containers/source/mock'; import { Overview } from './index'; -jest.mock('ui/chrome', () => ({ - getKibanaVersion: () => { - return 'v8.0.0'; - }, - breadcrumbs: { - set: jest.fn(), - }, -})); +jest.mock('../../lib/kibana'); // Test will fail because we will to need to mock some core services to make the test work // For now let's forget about SiemSearchBar and QueryBar diff --git a/x-pack/legacy/plugins/siem/public/pages/overview/overview.tsx b/x-pack/plugins/siem/public/pages/overview/overview.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/overview/overview.tsx rename to x-pack/plugins/siem/public/pages/overview/overview.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/overview/overview_empty/index.tsx b/x-pack/plugins/siem/public/pages/overview/overview_empty/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/overview/overview_empty/index.tsx rename to x-pack/plugins/siem/public/pages/overview/overview_empty/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/overview/sidebar/index.tsx b/x-pack/plugins/siem/public/pages/overview/sidebar/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/overview/sidebar/index.tsx rename to x-pack/plugins/siem/public/pages/overview/sidebar/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/overview/sidebar/sidebar.tsx b/x-pack/plugins/siem/public/pages/overview/sidebar/sidebar.tsx similarity index 97% rename from x-pack/legacy/plugins/siem/public/pages/overview/sidebar/sidebar.tsx rename to x-pack/plugins/siem/public/pages/overview/sidebar/sidebar.tsx index 4d4d96803cd658..c972fd83cc88f8 100644 --- a/x-pack/legacy/plugins/siem/public/pages/overview/sidebar/sidebar.tsx +++ b/x-pack/plugins/siem/public/pages/overview/sidebar/sidebar.tsx @@ -8,10 +8,7 @@ import { EuiFlexGroup, EuiFlexItem, EuiSpacer } from '@elastic/eui'; import React, { useMemo } from 'react'; import styled from 'styled-components'; -import { - ENABLE_NEWS_FEED_SETTING, - NEWS_FEED_URL_SETTING, -} from '../../../../../../../plugins/siem/common/constants'; +import { ENABLE_NEWS_FEED_SETTING, NEWS_FEED_URL_SETTING } from '../../../../common/constants'; import { Filters as RecentCasesFilters } from '../../../components/recent_cases/filters'; import { Filters as RecentTimelinesFilters } from '../../../components/recent_timelines/filters'; import { StatefulRecentCases } from '../../../components/recent_cases'; diff --git a/x-pack/legacy/plugins/siem/public/pages/overview/signals_by_category/index.tsx b/x-pack/plugins/siem/public/pages/overview/signals_by_category/index.tsx similarity index 98% rename from x-pack/legacy/plugins/siem/public/pages/overview/signals_by_category/index.tsx rename to x-pack/plugins/siem/public/pages/overview/signals_by_category/index.tsx index feba80539a11b9..6357d93d7ba71b 100644 --- a/x-pack/legacy/plugins/siem/public/pages/overview/signals_by_category/index.tsx +++ b/x-pack/plugins/siem/public/pages/overview/signals_by_category/index.tsx @@ -10,7 +10,7 @@ import { SignalsHistogramPanel } from '../../detection_engine/components/signals import { signalsHistogramOptions } from '../../detection_engine/components/signals_histogram_panel/config'; import { useSignalIndex } from '../../../containers/detection_engine/signals/use_signal_index'; import { SetAbsoluteRangeDatePicker } from '../../network/types'; -import { Filter, IIndexPattern, Query } from '../../../../../../../../src/plugins/data/public'; +import { Filter, IIndexPattern, Query } from '../../../../../../../src/plugins/data/public'; import { inputsModel } from '../../../store'; import { InputsModelId } from '../../../store/inputs/constants'; import * as i18n from '../translations'; diff --git a/x-pack/legacy/plugins/siem/public/pages/overview/summary.tsx b/x-pack/plugins/siem/public/pages/overview/summary.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/overview/summary.tsx rename to x-pack/plugins/siem/public/pages/overview/summary.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/overview/translations.ts b/x-pack/plugins/siem/public/pages/overview/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/overview/translations.ts rename to x-pack/plugins/siem/public/pages/overview/translations.ts diff --git a/x-pack/legacy/plugins/siem/public/pages/timelines/index.tsx b/x-pack/plugins/siem/public/pages/timelines/index.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/timelines/index.tsx rename to x-pack/plugins/siem/public/pages/timelines/index.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/timelines/timelines_page.test.tsx b/x-pack/plugins/siem/public/pages/timelines/timelines_page.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/timelines/timelines_page.test.tsx rename to x-pack/plugins/siem/public/pages/timelines/timelines_page.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/timelines/timelines_page.tsx b/x-pack/plugins/siem/public/pages/timelines/timelines_page.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/timelines/timelines_page.tsx rename to x-pack/plugins/siem/public/pages/timelines/timelines_page.tsx diff --git a/x-pack/legacy/plugins/siem/public/pages/timelines/translations.ts b/x-pack/plugins/siem/public/pages/timelines/translations.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/pages/timelines/translations.ts rename to x-pack/plugins/siem/public/pages/timelines/translations.ts diff --git a/x-pack/plugins/siem/public/plugin.tsx b/x-pack/plugins/siem/public/plugin.tsx new file mode 100644 index 00000000000000..e54c96364ba6b0 --- /dev/null +++ b/x-pack/plugins/siem/public/plugin.tsx @@ -0,0 +1,118 @@ +/* + * 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. + */ + +import { i18n } from '@kbn/i18n'; + +import { + AppMountParameters, + CoreSetup, + CoreStart, + PluginInitializerContext, + Plugin as IPlugin, +} from '../../../../src/core/public'; +import { + HomePublicPluginSetup, + FeatureCatalogueCategory, +} from '../../../../src/plugins/home/public'; +import { DataPublicPluginStart } from '../../../../src/plugins/data/public'; +import { EmbeddableStart } from '../../../../src/plugins/embeddable/public'; +import { Start as NewsfeedStart } from '../../../../src/plugins/newsfeed/public'; +import { Start as InspectorStart } from '../../../../src/plugins/inspector/public'; +import { UiActionsStart } from '../../../../src/plugins/ui_actions/public'; +import { UsageCollectionSetup } from '../../../../src/plugins/usage_collection/public'; +import { + TriggersAndActionsUIPublicPluginSetup as TriggersActionsSetup, + TriggersAndActionsUIPublicPluginStart as TriggersActionsStart, +} from '../../triggers_actions_ui/public'; +import { SecurityPluginSetup } from '../../security/public'; +import { APP_ID, APP_NAME, APP_PATH, APP_ICON } from '../common/constants'; +import { initTelemetry } from './lib/telemetry'; +import { KibanaServices } from './lib/kibana/services'; +import { serviceNowActionType } from './lib/connectors'; + +export interface SetupPlugins { + home: HomePublicPluginSetup; + security: SecurityPluginSetup; + triggers_actions_ui: TriggersActionsSetup; + usageCollection: UsageCollectionSetup; +} + +export interface StartPlugins { + data: DataPublicPluginStart; + embeddable: EmbeddableStart; + inspector: InspectorStart; + newsfeed?: NewsfeedStart; + triggers_actions_ui: TriggersActionsStart; + uiActions: UiActionsStart; +} + +export type StartServices = CoreStart & + StartPlugins & { + security: SecurityPluginSetup; + }; + +// eslint-disable-next-line @typescript-eslint/no-empty-interface +export interface PluginSetup {} +// eslint-disable-next-line @typescript-eslint/no-empty-interface +export interface PluginStart {} + +export class Plugin implements IPlugin { + private kibanaVersion: string; + + constructor(initializerContext: PluginInitializerContext) { + this.kibanaVersion = initializerContext.env.packageInfo.version; + } + + public setup(core: CoreSetup, plugins: SetupPlugins) { + initTelemetry(plugins.usageCollection, APP_ID); + + plugins.home.featureCatalogue.register({ + id: APP_ID, + title: i18n.translate('xpack.siem.featureCatalogue.title', { + defaultMessage: 'SIEM', + }), + description: i18n.translate('xpack.siem.featureCatalogue.description', { + defaultMessage: 'Explore security metrics and logs for events and alerts', + }), + icon: APP_ICON, + path: APP_PATH, + showOnHomePage: true, + category: FeatureCatalogueCategory.DATA, + }); + + plugins.triggers_actions_ui.actionTypeRegistry.register(serviceNowActionType()); + + core.application.register({ + id: APP_ID, + title: APP_NAME, + order: 9000, + euiIconType: APP_ICON, + async mount(params: AppMountParameters) { + const [coreStart, startPlugins] = await core.getStartServices(); + const { renderApp } = await import('./app'); + const services = { + ...coreStart, + ...startPlugins, + security: plugins.security, + } as StartServices; + + return renderApp(services, params); + }, + }); + + return {}; + } + + public start(core: CoreStart, plugins: StartPlugins) { + KibanaServices.init({ ...core, ...plugins, kibanaVersion: this.kibanaVersion }); + + return {}; + } + + public stop() { + return {}; + } +} diff --git a/x-pack/legacy/plugins/siem/public/routes.tsx b/x-pack/plugins/siem/public/routes.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/routes.tsx rename to x-pack/plugins/siem/public/routes.tsx diff --git a/x-pack/legacy/plugins/siem/public/shared_imports.ts b/x-pack/plugins/siem/public/shared_imports.ts similarity index 55% rename from x-pack/legacy/plugins/siem/public/shared_imports.ts rename to x-pack/plugins/siem/public/shared_imports.ts index 0c0ac637a42293..472006a9e55b15 100644 --- a/x-pack/legacy/plugins/siem/public/shared_imports.ts +++ b/x-pack/plugins/siem/public/shared_imports.ts @@ -19,10 +19,7 @@ export { useForm, ValidationFunc, VALIDATION_TYPES, -} from '../../../../../src/plugins/es_ui_shared/static/forms/hook_form_lib'; -export { - Field, - SelectField, -} from '../../../../../src/plugins/es_ui_shared/static/forms/components'; -export { fieldValidators } from '../../../../../src/plugins/es_ui_shared/static/forms/helpers'; -export { ERROR_CODE } from '../../../../../src/plugins/es_ui_shared/static/forms/helpers/field_validators/types'; +} from '../../../../src/plugins/es_ui_shared/static/forms/hook_form_lib'; +export { Field, SelectField } from '../../../../src/plugins/es_ui_shared/static/forms/components'; +export { fieldValidators } from '../../../../src/plugins/es_ui_shared/static/forms/helpers'; +export { ERROR_CODE } from '../../../../src/plugins/es_ui_shared/static/forms/helpers/field_validators/types'; diff --git a/x-pack/legacy/plugins/siem/public/store/actions.ts b/x-pack/plugins/siem/public/store/actions.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/store/actions.ts rename to x-pack/plugins/siem/public/store/actions.ts diff --git a/x-pack/legacy/plugins/siem/public/store/app/actions.ts b/x-pack/plugins/siem/public/store/app/actions.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/store/app/actions.ts rename to x-pack/plugins/siem/public/store/app/actions.ts diff --git a/x-pack/legacy/plugins/siem/public/store/app/index.ts b/x-pack/plugins/siem/public/store/app/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/store/app/index.ts rename to x-pack/plugins/siem/public/store/app/index.ts diff --git a/x-pack/legacy/plugins/siem/public/store/app/model.ts b/x-pack/plugins/siem/public/store/app/model.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/store/app/model.ts rename to x-pack/plugins/siem/public/store/app/model.ts diff --git a/x-pack/legacy/plugins/siem/public/store/app/reducer.ts b/x-pack/plugins/siem/public/store/app/reducer.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/store/app/reducer.ts rename to x-pack/plugins/siem/public/store/app/reducer.ts diff --git a/x-pack/legacy/plugins/siem/public/store/app/selectors.ts b/x-pack/plugins/siem/public/store/app/selectors.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/store/app/selectors.ts rename to x-pack/plugins/siem/public/store/app/selectors.ts diff --git a/x-pack/legacy/plugins/siem/public/store/constants.ts b/x-pack/plugins/siem/public/store/constants.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/store/constants.ts rename to x-pack/plugins/siem/public/store/constants.ts diff --git a/x-pack/legacy/plugins/siem/public/store/drag_and_drop/actions.ts b/x-pack/plugins/siem/public/store/drag_and_drop/actions.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/store/drag_and_drop/actions.ts rename to x-pack/plugins/siem/public/store/drag_and_drop/actions.ts diff --git a/x-pack/legacy/plugins/siem/public/store/drag_and_drop/index.ts b/x-pack/plugins/siem/public/store/drag_and_drop/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/store/drag_and_drop/index.ts rename to x-pack/plugins/siem/public/store/drag_and_drop/index.ts diff --git a/x-pack/legacy/plugins/siem/public/store/drag_and_drop/model.ts b/x-pack/plugins/siem/public/store/drag_and_drop/model.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/store/drag_and_drop/model.ts rename to x-pack/plugins/siem/public/store/drag_and_drop/model.ts diff --git a/x-pack/legacy/plugins/siem/public/store/drag_and_drop/reducer.test.ts b/x-pack/plugins/siem/public/store/drag_and_drop/reducer.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/store/drag_and_drop/reducer.test.ts rename to x-pack/plugins/siem/public/store/drag_and_drop/reducer.test.ts diff --git a/x-pack/legacy/plugins/siem/public/store/drag_and_drop/reducer.ts b/x-pack/plugins/siem/public/store/drag_and_drop/reducer.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/store/drag_and_drop/reducer.ts rename to x-pack/plugins/siem/public/store/drag_and_drop/reducer.ts diff --git a/x-pack/legacy/plugins/siem/public/store/drag_and_drop/selectors.ts b/x-pack/plugins/siem/public/store/drag_and_drop/selectors.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/store/drag_and_drop/selectors.ts rename to x-pack/plugins/siem/public/store/drag_and_drop/selectors.ts diff --git a/x-pack/legacy/plugins/siem/public/store/epic.ts b/x-pack/plugins/siem/public/store/epic.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/store/epic.ts rename to x-pack/plugins/siem/public/store/epic.ts diff --git a/x-pack/legacy/plugins/siem/public/store/hosts/actions.ts b/x-pack/plugins/siem/public/store/hosts/actions.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/store/hosts/actions.ts rename to x-pack/plugins/siem/public/store/hosts/actions.ts diff --git a/x-pack/legacy/plugins/siem/public/store/hosts/helpers.test.ts b/x-pack/plugins/siem/public/store/hosts/helpers.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/store/hosts/helpers.test.ts rename to x-pack/plugins/siem/public/store/hosts/helpers.test.ts diff --git a/x-pack/legacy/plugins/siem/public/store/hosts/helpers.ts b/x-pack/plugins/siem/public/store/hosts/helpers.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/store/hosts/helpers.ts rename to x-pack/plugins/siem/public/store/hosts/helpers.ts diff --git a/x-pack/legacy/plugins/siem/public/store/hosts/index.ts b/x-pack/plugins/siem/public/store/hosts/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/store/hosts/index.ts rename to x-pack/plugins/siem/public/store/hosts/index.ts diff --git a/x-pack/legacy/plugins/siem/public/store/hosts/model.ts b/x-pack/plugins/siem/public/store/hosts/model.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/store/hosts/model.ts rename to x-pack/plugins/siem/public/store/hosts/model.ts diff --git a/x-pack/legacy/plugins/siem/public/store/hosts/reducer.ts b/x-pack/plugins/siem/public/store/hosts/reducer.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/store/hosts/reducer.ts rename to x-pack/plugins/siem/public/store/hosts/reducer.ts diff --git a/x-pack/legacy/plugins/siem/public/store/hosts/selectors.ts b/x-pack/plugins/siem/public/store/hosts/selectors.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/store/hosts/selectors.ts rename to x-pack/plugins/siem/public/store/hosts/selectors.ts diff --git a/x-pack/legacy/plugins/siem/public/store/index.ts b/x-pack/plugins/siem/public/store/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/store/index.ts rename to x-pack/plugins/siem/public/store/index.ts diff --git a/x-pack/legacy/plugins/siem/public/store/inputs/actions.ts b/x-pack/plugins/siem/public/store/inputs/actions.ts similarity index 96% rename from x-pack/legacy/plugins/siem/public/store/inputs/actions.ts rename to x-pack/plugins/siem/public/store/inputs/actions.ts index 5b26957843f082..04cdf5246de2ce 100644 --- a/x-pack/legacy/plugins/siem/public/store/inputs/actions.ts +++ b/x-pack/plugins/siem/public/store/inputs/actions.ts @@ -8,7 +8,7 @@ import actionCreatorFactory from 'typescript-fsa'; import { InspectQuery, Refetch, RefetchKql } from './model'; import { InputsModelId } from './constants'; -import { Filter, SavedQuery } from '../../../../../../../src/plugins/data/public'; +import { Filter, SavedQuery } from '../../../../../../src/plugins/data/public'; const actionCreator = actionCreatorFactory('x-pack/siem/local/inputs'); diff --git a/x-pack/legacy/plugins/siem/public/store/inputs/constants.ts b/x-pack/plugins/siem/public/store/inputs/constants.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/store/inputs/constants.ts rename to x-pack/plugins/siem/public/store/inputs/constants.ts diff --git a/x-pack/legacy/plugins/siem/public/store/inputs/helpers.test.ts b/x-pack/plugins/siem/public/store/inputs/helpers.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/store/inputs/helpers.test.ts rename to x-pack/plugins/siem/public/store/inputs/helpers.test.ts diff --git a/x-pack/legacy/plugins/siem/public/store/inputs/helpers.ts b/x-pack/plugins/siem/public/store/inputs/helpers.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/store/inputs/helpers.ts rename to x-pack/plugins/siem/public/store/inputs/helpers.ts diff --git a/x-pack/legacy/plugins/siem/public/store/inputs/index.ts b/x-pack/plugins/siem/public/store/inputs/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/store/inputs/index.ts rename to x-pack/plugins/siem/public/store/inputs/index.ts diff --git a/x-pack/legacy/plugins/siem/public/store/inputs/model.ts b/x-pack/plugins/siem/public/store/inputs/model.ts similarity index 96% rename from x-pack/legacy/plugins/siem/public/store/inputs/model.ts rename to x-pack/plugins/siem/public/store/inputs/model.ts index e851caf523eb4b..3e6be6ce859e59 100644 --- a/x-pack/legacy/plugins/siem/public/store/inputs/model.ts +++ b/x-pack/plugins/siem/public/store/inputs/model.ts @@ -7,7 +7,7 @@ import { Dispatch } from 'redux'; import { InputsModelId } from './constants'; import { CONSTANTS } from '../../components/url_state/constants'; -import { Query, Filter, SavedQuery } from '../../../../../../../src/plugins/data/public'; +import { Query, Filter, SavedQuery } from '../../../../../../src/plugins/data/public'; export interface AbsoluteTimeRange { kind: 'absolute'; diff --git a/x-pack/legacy/plugins/siem/public/store/inputs/reducer.ts b/x-pack/plugins/siem/public/store/inputs/reducer.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/store/inputs/reducer.ts rename to x-pack/plugins/siem/public/store/inputs/reducer.ts diff --git a/x-pack/legacy/plugins/siem/public/store/inputs/selectors.ts b/x-pack/plugins/siem/public/store/inputs/selectors.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/store/inputs/selectors.ts rename to x-pack/plugins/siem/public/store/inputs/selectors.ts diff --git a/x-pack/legacy/plugins/siem/public/store/model.ts b/x-pack/plugins/siem/public/store/model.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/store/model.ts rename to x-pack/plugins/siem/public/store/model.ts diff --git a/x-pack/legacy/plugins/siem/public/store/network/actions.ts b/x-pack/plugins/siem/public/store/network/actions.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/store/network/actions.ts rename to x-pack/plugins/siem/public/store/network/actions.ts diff --git a/x-pack/legacy/plugins/siem/public/store/network/helpers.test.ts b/x-pack/plugins/siem/public/store/network/helpers.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/store/network/helpers.test.ts rename to x-pack/plugins/siem/public/store/network/helpers.test.ts diff --git a/x-pack/legacy/plugins/siem/public/store/network/helpers.ts b/x-pack/plugins/siem/public/store/network/helpers.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/store/network/helpers.ts rename to x-pack/plugins/siem/public/store/network/helpers.ts diff --git a/x-pack/legacy/plugins/siem/public/store/network/index.ts b/x-pack/plugins/siem/public/store/network/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/store/network/index.ts rename to x-pack/plugins/siem/public/store/network/index.ts diff --git a/x-pack/legacy/plugins/siem/public/store/network/model.ts b/x-pack/plugins/siem/public/store/network/model.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/store/network/model.ts rename to x-pack/plugins/siem/public/store/network/model.ts diff --git a/x-pack/legacy/plugins/siem/public/store/network/reducer.ts b/x-pack/plugins/siem/public/store/network/reducer.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/store/network/reducer.ts rename to x-pack/plugins/siem/public/store/network/reducer.ts diff --git a/x-pack/legacy/plugins/siem/public/store/network/selectors.ts b/x-pack/plugins/siem/public/store/network/selectors.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/store/network/selectors.ts rename to x-pack/plugins/siem/public/store/network/selectors.ts diff --git a/x-pack/legacy/plugins/siem/public/store/reducer.ts b/x-pack/plugins/siem/public/store/reducer.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/store/reducer.ts rename to x-pack/plugins/siem/public/store/reducer.ts diff --git a/x-pack/legacy/plugins/siem/public/store/selectors.ts b/x-pack/plugins/siem/public/store/selectors.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/store/selectors.ts rename to x-pack/plugins/siem/public/store/selectors.ts diff --git a/x-pack/legacy/plugins/siem/public/store/store.ts b/x-pack/plugins/siem/public/store/store.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/store/store.ts rename to x-pack/plugins/siem/public/store/store.ts diff --git a/x-pack/legacy/plugins/siem/public/store/timeline/actions.ts b/x-pack/plugins/siem/public/store/timeline/actions.ts similarity index 98% rename from x-pack/legacy/plugins/siem/public/store/timeline/actions.ts rename to x-pack/plugins/siem/public/store/timeline/actions.ts index 51043b999c27e9..a03cc2643e014a 100644 --- a/x-pack/legacy/plugins/siem/public/store/timeline/actions.ts +++ b/x-pack/plugins/siem/public/store/timeline/actions.ts @@ -6,7 +6,7 @@ import actionCreatorFactory from 'typescript-fsa'; -import { Filter } from '../../../../../../../src/plugins/data/public'; +import { Filter } from '../../../../../../src/plugins/data/public'; import { Sort } from '../../components/timeline/body/sort'; import { DataProvider, diff --git a/x-pack/legacy/plugins/siem/public/store/timeline/defaults.ts b/x-pack/plugins/siem/public/store/timeline/defaults.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/store/timeline/defaults.ts rename to x-pack/plugins/siem/public/store/timeline/defaults.ts diff --git a/x-pack/legacy/plugins/siem/public/store/timeline/epic.test.ts b/x-pack/plugins/siem/public/store/timeline/epic.test.ts similarity index 99% rename from x-pack/legacy/plugins/siem/public/store/timeline/epic.test.ts rename to x-pack/plugins/siem/public/store/timeline/epic.test.ts index 13d30825a169cb..bb6babcba41aeb 100644 --- a/x-pack/legacy/plugins/siem/public/store/timeline/epic.test.ts +++ b/x-pack/plugins/siem/public/store/timeline/epic.test.ts @@ -8,7 +8,7 @@ import { TimelineModel } from './model'; import { Direction } from '../../graphql/types'; import { convertTimelineAsInput } from './epic'; -import { Filter, esFilters } from '../../../../../../../src/plugins/data/public'; +import { Filter, esFilters } from '../../../../../../src/plugins/data/public'; describe('Epic Timeline', () => { describe('#convertTimelineAsInput ', () => { diff --git a/x-pack/legacy/plugins/siem/public/store/timeline/epic.ts b/x-pack/plugins/siem/public/store/timeline/epic.ts similarity index 99% rename from x-pack/legacy/plugins/siem/public/store/timeline/epic.ts rename to x-pack/plugins/siem/public/store/timeline/epic.ts index e6acff87364927..4fece0572274f3 100644 --- a/x-pack/legacy/plugins/siem/public/store/timeline/epic.ts +++ b/x-pack/plugins/siem/public/store/timeline/epic.ts @@ -28,7 +28,7 @@ import { takeUntil, } from 'rxjs/operators'; -import { esFilters, Filter, MatchAllFilter } from '../../../../../../../src/plugins/data/public'; +import { esFilters, Filter, MatchAllFilter } from '../../../../../../src/plugins/data/public'; import { persistTimelineMutation } from '../../containers/timeline/persist.gql_query'; import { PersistTimelineMutation, diff --git a/x-pack/legacy/plugins/siem/public/store/timeline/epic_dispatcher_timeline_persistence_queue.ts b/x-pack/plugins/siem/public/store/timeline/epic_dispatcher_timeline_persistence_queue.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/store/timeline/epic_dispatcher_timeline_persistence_queue.ts rename to x-pack/plugins/siem/public/store/timeline/epic_dispatcher_timeline_persistence_queue.ts diff --git a/x-pack/legacy/plugins/siem/public/store/timeline/epic_favorite.ts b/x-pack/plugins/siem/public/store/timeline/epic_favorite.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/store/timeline/epic_favorite.ts rename to x-pack/plugins/siem/public/store/timeline/epic_favorite.ts diff --git a/x-pack/legacy/plugins/siem/public/store/timeline/epic_note.ts b/x-pack/plugins/siem/public/store/timeline/epic_note.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/store/timeline/epic_note.ts rename to x-pack/plugins/siem/public/store/timeline/epic_note.ts diff --git a/x-pack/legacy/plugins/siem/public/store/timeline/epic_pinned_event.ts b/x-pack/plugins/siem/public/store/timeline/epic_pinned_event.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/store/timeline/epic_pinned_event.ts rename to x-pack/plugins/siem/public/store/timeline/epic_pinned_event.ts diff --git a/x-pack/legacy/plugins/siem/public/store/timeline/helpers.ts b/x-pack/plugins/siem/public/store/timeline/helpers.ts similarity index 99% rename from x-pack/legacy/plugins/siem/public/store/timeline/helpers.ts rename to x-pack/plugins/siem/public/store/timeline/helpers.ts index fa70c1b04608da..19de49918d100a 100644 --- a/x-pack/legacy/plugins/siem/public/store/timeline/helpers.ts +++ b/x-pack/plugins/siem/public/store/timeline/helpers.ts @@ -6,7 +6,7 @@ import { getOr, omit, uniq, isEmpty, isEqualWith, union } from 'lodash/fp'; -import { Filter } from '../../../../../../../src/plugins/data/public'; +import { Filter } from '../../../../../../src/plugins/data/public'; import { getColumnWidthFromType } from '../../components/timeline/body/column_headers/helpers'; import { Sort } from '../../components/timeline/body/sort'; import { diff --git a/x-pack/legacy/plugins/siem/public/store/timeline/index.ts b/x-pack/plugins/siem/public/store/timeline/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/store/timeline/index.ts rename to x-pack/plugins/siem/public/store/timeline/index.ts diff --git a/x-pack/legacy/plugins/siem/public/store/timeline/manage_timeline_id.tsx b/x-pack/plugins/siem/public/store/timeline/manage_timeline_id.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/store/timeline/manage_timeline_id.tsx rename to x-pack/plugins/siem/public/store/timeline/manage_timeline_id.tsx diff --git a/x-pack/legacy/plugins/siem/public/store/timeline/model.ts b/x-pack/plugins/siem/public/store/timeline/model.ts similarity index 98% rename from x-pack/legacy/plugins/siem/public/store/timeline/model.ts rename to x-pack/plugins/siem/public/store/timeline/model.ts index ef46a8d061c2e8..15bd2980e4aebd 100644 --- a/x-pack/legacy/plugins/siem/public/store/timeline/model.ts +++ b/x-pack/plugins/siem/public/store/timeline/model.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { Filter } from '../../../../../../../src/plugins/data/public'; +import { Filter } from '../../../../../../src/plugins/data/public'; import { DataProvider } from '../../components/timeline/data_providers/data_provider'; import { Sort } from '../../components/timeline/body/sort'; import { PinnedEvent, TimelineNonEcsData } from '../../graphql/types'; diff --git a/x-pack/legacy/plugins/siem/public/store/timeline/my_epic_timeline_id.ts b/x-pack/plugins/siem/public/store/timeline/my_epic_timeline_id.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/store/timeline/my_epic_timeline_id.ts rename to x-pack/plugins/siem/public/store/timeline/my_epic_timeline_id.ts diff --git a/x-pack/legacy/plugins/siem/public/store/timeline/reducer.test.ts b/x-pack/plugins/siem/public/store/timeline/reducer.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/store/timeline/reducer.test.ts rename to x-pack/plugins/siem/public/store/timeline/reducer.test.ts diff --git a/x-pack/legacy/plugins/siem/public/store/timeline/reducer.ts b/x-pack/plugins/siem/public/store/timeline/reducer.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/store/timeline/reducer.ts rename to x-pack/plugins/siem/public/store/timeline/reducer.ts diff --git a/x-pack/legacy/plugins/siem/public/store/timeline/refetch_queries.ts b/x-pack/plugins/siem/public/store/timeline/refetch_queries.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/store/timeline/refetch_queries.ts rename to x-pack/plugins/siem/public/store/timeline/refetch_queries.ts diff --git a/x-pack/legacy/plugins/siem/public/store/timeline/selectors.ts b/x-pack/plugins/siem/public/store/timeline/selectors.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/store/timeline/selectors.ts rename to x-pack/plugins/siem/public/store/timeline/selectors.ts diff --git a/x-pack/legacy/plugins/siem/public/store/timeline/types.ts b/x-pack/plugins/siem/public/store/timeline/types.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/store/timeline/types.ts rename to x-pack/plugins/siem/public/store/timeline/types.ts diff --git a/x-pack/legacy/plugins/siem/public/utils/api/index.ts b/x-pack/plugins/siem/public/utils/api/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/utils/api/index.ts rename to x-pack/plugins/siem/public/utils/api/index.ts diff --git a/x-pack/legacy/plugins/siem/public/utils/apollo_context.ts b/x-pack/plugins/siem/public/utils/apollo_context.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/utils/apollo_context.ts rename to x-pack/plugins/siem/public/utils/apollo_context.ts diff --git a/x-pack/legacy/plugins/siem/public/utils/default_date_settings.test.ts b/x-pack/plugins/siem/public/utils/default_date_settings.test.ts similarity index 99% rename from x-pack/legacy/plugins/siem/public/utils/default_date_settings.test.ts rename to x-pack/plugins/siem/public/utils/default_date_settings.test.ts index bb66067512d1fd..9dc179ba7a6e2d 100644 --- a/x-pack/legacy/plugins/siem/public/utils/default_date_settings.test.ts +++ b/x-pack/plugins/siem/public/utils/default_date_settings.test.ts @@ -21,7 +21,7 @@ import { DEFAULT_INTERVAL_PAUSE, DEFAULT_INTERVAL_VALUE, DEFAULT_INTERVAL_TYPE, -} from '../../../../../plugins/siem/common/constants'; +} from '../../common/constants'; import { KibanaServices } from '../lib/kibana'; import { Policy } from '../store/inputs/model'; @@ -30,7 +30,7 @@ import { Policy } from '../store/inputs/model'; // we have to repeat ourselves once const DEFAULT_FROM_DATE = '1983-05-31T13:03:54.234Z'; const DEFAULT_TO_DATE = '1990-05-31T13:03:54.234Z'; -jest.mock('../../../../../plugins/siem/common/constants', () => ({ +jest.mock('../../common/constants', () => ({ DEFAULT_FROM: '1983-05-31T13:03:54.234Z', DEFAULT_TO: '1990-05-31T13:03:54.234Z', DEFAULT_INTERVAL_PAUSE: true, diff --git a/x-pack/legacy/plugins/siem/public/utils/default_date_settings.ts b/x-pack/plugins/siem/public/utils/default_date_settings.ts similarity index 98% rename from x-pack/legacy/plugins/siem/public/utils/default_date_settings.ts rename to x-pack/plugins/siem/public/utils/default_date_settings.ts index 89f7d34d851310..c4869a4851ae50 100644 --- a/x-pack/legacy/plugins/siem/public/utils/default_date_settings.ts +++ b/x-pack/plugins/siem/public/utils/default_date_settings.ts @@ -15,7 +15,7 @@ import { DEFAULT_TO, DEFAULT_INTERVAL_TYPE, DEFAULT_INTERVAL_VALUE, -} from '../../../../../plugins/siem/common/constants'; +} from '../../common/constants'; import { KibanaServices } from '../lib/kibana'; import { Policy } from '../store/inputs/model'; diff --git a/x-pack/legacy/plugins/siem/public/utils/kql/use_update_kql.test.tsx b/x-pack/plugins/siem/public/utils/kql/use_update_kql.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/utils/kql/use_update_kql.test.tsx rename to x-pack/plugins/siem/public/utils/kql/use_update_kql.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/utils/kql/use_update_kql.tsx b/x-pack/plugins/siem/public/utils/kql/use_update_kql.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/utils/kql/use_update_kql.tsx rename to x-pack/plugins/siem/public/utils/kql/use_update_kql.tsx diff --git a/x-pack/legacy/plugins/siem/public/utils/logo_endpoint/64_color.svg b/x-pack/plugins/siem/public/utils/logo_endpoint/64_color.svg similarity index 100% rename from x-pack/legacy/plugins/siem/public/utils/logo_endpoint/64_color.svg rename to x-pack/plugins/siem/public/utils/logo_endpoint/64_color.svg diff --git a/x-pack/legacy/plugins/siem/public/utils/route/helpers.ts b/x-pack/plugins/siem/public/utils/route/helpers.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/utils/route/helpers.ts rename to x-pack/plugins/siem/public/utils/route/helpers.ts diff --git a/x-pack/legacy/plugins/siem/public/utils/route/index.test.tsx b/x-pack/plugins/siem/public/utils/route/index.test.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/utils/route/index.test.tsx rename to x-pack/plugins/siem/public/utils/route/index.test.tsx diff --git a/x-pack/legacy/plugins/siem/public/utils/route/manage_spy_routes.tsx b/x-pack/plugins/siem/public/utils/route/manage_spy_routes.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/utils/route/manage_spy_routes.tsx rename to x-pack/plugins/siem/public/utils/route/manage_spy_routes.tsx diff --git a/x-pack/legacy/plugins/siem/public/utils/route/spy_routes.tsx b/x-pack/plugins/siem/public/utils/route/spy_routes.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/utils/route/spy_routes.tsx rename to x-pack/plugins/siem/public/utils/route/spy_routes.tsx diff --git a/x-pack/legacy/plugins/siem/public/utils/route/types.ts b/x-pack/plugins/siem/public/utils/route/types.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/utils/route/types.ts rename to x-pack/plugins/siem/public/utils/route/types.ts diff --git a/x-pack/legacy/plugins/siem/public/utils/route/use_route_spy.tsx b/x-pack/plugins/siem/public/utils/route/use_route_spy.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/utils/route/use_route_spy.tsx rename to x-pack/plugins/siem/public/utils/route/use_route_spy.tsx diff --git a/x-pack/legacy/plugins/siem/public/utils/saved_query_services/index.tsx b/x-pack/plugins/siem/public/utils/saved_query_services/index.tsx similarity index 93% rename from x-pack/legacy/plugins/siem/public/utils/saved_query_services/index.tsx rename to x-pack/plugins/siem/public/utils/saved_query_services/index.tsx index a8ee10ba2b8014..335398177f0f43 100644 --- a/x-pack/legacy/plugins/siem/public/utils/saved_query_services/index.tsx +++ b/x-pack/plugins/siem/public/utils/saved_query_services/index.tsx @@ -8,7 +8,7 @@ import { useState, useEffect } from 'react'; import { SavedQueryService, createSavedQueryService, -} from '../../../../../../../src/plugins/data/public'; +} from '../../../../../../src/plugins/data/public'; import { useKibana } from '../../lib/kibana'; diff --git a/x-pack/legacy/plugins/siem/public/utils/timeline/use_show_timeline.tsx b/x-pack/plugins/siem/public/utils/timeline/use_show_timeline.tsx similarity index 100% rename from x-pack/legacy/plugins/siem/public/utils/timeline/use_show_timeline.tsx rename to x-pack/plugins/siem/public/utils/timeline/use_show_timeline.tsx diff --git a/x-pack/legacy/plugins/siem/public/utils/use_mount_appended.ts b/x-pack/plugins/siem/public/utils/use_mount_appended.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/utils/use_mount_appended.ts rename to x-pack/plugins/siem/public/utils/use_mount_appended.ts diff --git a/x-pack/legacy/plugins/siem/public/utils/validators/index.ts b/x-pack/plugins/siem/public/utils/validators/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/public/utils/validators/index.ts rename to x-pack/plugins/siem/public/utils/validators/index.ts diff --git a/x-pack/plugins/siem/scripts/check_circular_deps/run_check_circular_deps_cli.js b/x-pack/plugins/siem/scripts/check_circular_deps/run_check_circular_deps_cli.js index 0b5e5d6cf13b5b..9b4a57f09066d1 100644 --- a/x-pack/plugins/siem/scripts/check_circular_deps/run_check_circular_deps_cli.js +++ b/x-pack/plugins/siem/scripts/check_circular_deps/run_check_circular_deps_cli.js @@ -11,24 +11,23 @@ import madge from 'madge'; /* eslint-disable-next-line import/no-extraneous-dependencies */ import { run, createFailError } from '@kbn/dev-utils'; -const legacyPluginPath = '../../../../legacy/plugins/siem'; -const pluginPath = '../..'; - run( async ({ log }) => { const result = await madge( - [resolve(__dirname, legacyPluginPath, 'public'), resolve(__dirname, pluginPath, 'common')], + [resolve(__dirname, '../../public'), resolve(__dirname, '../../common')], { fileExtensions: ['ts', 'js', 'tsx'], excludeRegExp: [ 'test.ts$', 'test.tsx$', 'containers/detection_engine/rules/types.ts$', - 'core/public/chrome/chrome_service.tsx$', 'src/core/server/types.ts$', 'src/core/server/saved_objects/types.ts$', + 'src/core/public/chrome/chrome_service.tsx$', 'src/core/public/overlays/banners/banners_service.tsx$', 'src/core/public/saved_objects/saved_objects_client.ts$', + 'src/plugins/data/public', + 'src/plugins/ui_actions/public', ], } ); diff --git a/x-pack/plugins/siem/scripts/extract_tactics_techniques_mitre.js b/x-pack/plugins/siem/scripts/extract_tactics_techniques_mitre.js index 145d9715970c87..c8642e8b42c8fc 100644 --- a/x-pack/plugins/siem/scripts/extract_tactics_techniques_mitre.js +++ b/x-pack/plugins/siem/scripts/extract_tactics_techniques_mitre.js @@ -12,13 +12,7 @@ const fetch = require('node-fetch'); const { camelCase } = require('lodash'); const { resolve } = require('path'); -const OUTPUT_DIRECTORY = resolve( - '../../legacy/plugins/siem', - 'public', - 'pages', - 'detection_engine', - 'mitre' -); +const OUTPUT_DIRECTORY = resolve('public', 'pages', 'detection_engine', 'mitre'); const MITRE_ENTREPRISE_ATTACK_URL = 'https://raw.githubusercontent.com/mitre/cti/master/enterprise-attack/enterprise-attack.json'; diff --git a/x-pack/plugins/siem/scripts/generate_types_from_graphql.js b/x-pack/plugins/siem/scripts/generate_types_from_graphql.js index bded8832aba5a9..e6b063dfd2c071 100644 --- a/x-pack/plugins/siem/scripts/generate_types_from_graphql.js +++ b/x-pack/plugins/siem/scripts/generate_types_from_graphql.js @@ -10,19 +10,12 @@ const { join, resolve } = require('path'); // eslint-disable-next-line import/no-extraneous-dependencies, import/no-unresolved const { generate } = require('graphql-code-generator'); -const legacyPluginPath = '../../legacy/plugins/siem'; - const GRAPHQL_GLOBS = [ - join(legacyPluginPath, 'public', 'containers', '**', '*.gql_query.ts{,x}'), + join('public', 'containers', '**', '*.gql_query.ts{,x}'), join('common', 'graphql', '**', '*.gql_query.ts{,x}'), ]; -const OUTPUT_INTROSPECTION_PATH = resolve( - legacyPluginPath, - 'public', - 'graphql', - 'introspection.json' -); -const OUTPUT_CLIENT_TYPES_PATH = resolve(legacyPluginPath, 'public', 'graphql', 'types.ts'); +const OUTPUT_INTROSPECTION_PATH = resolve('public', 'graphql', 'introspection.json'); +const OUTPUT_CLIENT_TYPES_PATH = resolve('public', 'graphql', 'types.ts'); const OUTPUT_SERVER_TYPES_PATH = resolve('server', 'graphql', 'types.ts'); const SCHEMA_PATH = resolve(__dirname, 'combined_schema.ts'); diff --git a/x-pack/plugins/siem/scripts/optimize_tsconfig/tsconfig.json b/x-pack/plugins/siem/scripts/optimize_tsconfig/tsconfig.json index 42d26c4c27ed66..fb89c0e0fc3e24 100644 --- a/x-pack/plugins/siem/scripts/optimize_tsconfig/tsconfig.json +++ b/x-pack/plugins/siem/scripts/optimize_tsconfig/tsconfig.json @@ -2,7 +2,6 @@ "include": [ "typings/**/*", "plugins/siem/**/*", - "legacy/plugins/siem/**/*", "plugins/apm/typings/numeral.d.ts", "legacy/plugins/canvas/types/webpack.d.ts", "plugins/triggers_actions_ui/**/*" diff --git a/x-pack/plugins/siem/server/plugin.ts b/x-pack/plugins/siem/server/plugin.ts index 3988fbec05de4f..dc484b75ab531a 100644 --- a/x-pack/plugins/siem/server/plugin.ts +++ b/x-pack/plugins/siem/server/plugin.ts @@ -38,6 +38,7 @@ import { initSavedObjects, savedObjectTypes } from './saved_objects'; import { SiemClientFactory } from './client'; import { createConfig$, ConfigType } from './config'; import { initUiSettings } from './ui_settings'; +import { APP_ID, APP_ICON } from '../common/constants'; export { CoreSetup, CoreStart }; @@ -62,7 +63,6 @@ export interface PluginSetup {} export interface PluginStart {} export class Plugin implements IPlugin { - readonly name = 'siem'; private readonly logger: Logger; private readonly config$: Observable; private context: PluginInitializerContext; @@ -70,7 +70,7 @@ export class Plugin implements IPlugin ({ + core.http.registerRouteHandlerContext(APP_ID, (context, request, response) => ({ getSiemClient: () => this.siemClientFactory.create(request), })); @@ -110,12 +110,12 @@ export class Plugin implements IPlugin { + before(() => esArchiver.load('infra/metrics_and_logs')); + after(() => esArchiver.unload('infra/metrics_and_logs')); + beforeEach(() => esArchiver.load('empty_kibana')); + afterEach(() => esArchiver.unload('empty_kibana')); + + describe('source configuration get method for non-existant source', () => { + it('returns the default source configuration', async () => { + const response = await logSourceConfiguration + .createGetLogSourceConfigurationAgent('default') + .expect(200); + + const { + data: { configuration, origin }, + } = decodeOrThrow(getLogSourceConfigurationSuccessResponsePayloadRT)(response.body); + + expect(origin).to.be('fallback'); + expect(configuration.name).to.be('Default'); + expect(configuration.logAlias).to.be('filebeat-*,kibana_sample_data_logs*'); + expect(configuration.fields.timestamp).to.be('@timestamp'); + expect(configuration.fields.tiebreaker).to.be('_doc'); + expect(configuration.logColumns[0]).to.have.key('timestampColumn'); + expect(configuration.logColumns[1]).to.have.key('fieldColumn'); + expect(configuration.logColumns[2]).to.have.key('messageColumn'); + }); + }); + + describe('source configuration patch method for non-existant source', () => { + it('creates a source configuration', async () => { + const response = await logSourceConfiguration + .createUpdateLogSourceConfigurationAgent('default', { + name: 'NAME', + description: 'DESCRIPTION', + logAlias: 'filebeat-**', + fields: { + tiebreaker: 'TIEBREAKER', + timestamp: 'TIMESTAMP', + }, + logColumns: [ + { + messageColumn: { + id: 'MESSAGE_COLUMN', + }, + }, + ], + }) + .expect(200); + + // check direct response + const { + data: { configuration, origin }, + } = decodeOrThrow(patchLogSourceConfigurationSuccessResponsePayloadRT)(response.body); + + expect(configuration.name).to.be('NAME'); + expect(origin).to.be('stored'); + expect(configuration.logAlias).to.be('filebeat-**'); + expect(configuration.fields.timestamp).to.be('TIMESTAMP'); + expect(configuration.fields.tiebreaker).to.be('TIEBREAKER'); + expect(configuration.logColumns).to.have.length(1); + expect(configuration.logColumns[0]).to.have.key('messageColumn'); + + // check for persistence + const { + data: { configuration: persistedConfiguration }, + } = await logSourceConfiguration.getLogSourceConfiguration('default'); + + expect(configuration).to.eql(persistedConfiguration); + }); + + it('creates a source configuration with default values for unspecified properties', async () => { + const response = await logSourceConfiguration + .createUpdateLogSourceConfigurationAgent('default', {}) + .expect(200); + + const { + data: { configuration, origin }, + } = decodeOrThrow(patchLogSourceConfigurationSuccessResponsePayloadRT)(response.body); + + expect(configuration.name).to.be('Default'); + expect(origin).to.be('stored'); + expect(configuration.logAlias).to.be('filebeat-*,kibana_sample_data_logs*'); + expect(configuration.fields.timestamp).to.be('@timestamp'); + expect(configuration.fields.tiebreaker).to.be('_doc'); + expect(configuration.logColumns).to.have.length(3); + expect(configuration.logColumns[0]).to.have.key('timestampColumn'); + expect(configuration.logColumns[1]).to.have.key('fieldColumn'); + expect(configuration.logColumns[2]).to.have.key('messageColumn'); + + // check for persistence + const { + data: { configuration: persistedConfiguration, origin: persistedOrigin }, + } = await logSourceConfiguration.getLogSourceConfiguration('default'); + + expect(persistedOrigin).to.be('stored'); + expect(configuration).to.eql(persistedConfiguration); + }); + }); + + describe('source configuration patch method for existing source', () => { + beforeEach(async () => { + await logSourceConfiguration.updateLogSourceConfiguration('default', {}); + }); + + it('updates a source configuration', async () => { + const response = await logSourceConfiguration + .createUpdateLogSourceConfigurationAgent('default', { + name: 'NAME', + description: 'DESCRIPTION', + logAlias: 'filebeat-**', + fields: { + tiebreaker: 'TIEBREAKER', + timestamp: 'TIMESTAMP', + }, + logColumns: [ + { + messageColumn: { + id: 'MESSAGE_COLUMN', + }, + }, + ], + }) + .expect(200); + + const { + data: { configuration, origin }, + } = decodeOrThrow(patchLogSourceConfigurationSuccessResponsePayloadRT)(response.body); + + expect(configuration.name).to.be('NAME'); + expect(origin).to.be('stored'); + expect(configuration.logAlias).to.be('filebeat-**'); + expect(configuration.fields.timestamp).to.be('TIMESTAMP'); + expect(configuration.fields.tiebreaker).to.be('TIEBREAKER'); + expect(configuration.logColumns).to.have.length(1); + expect(configuration.logColumns[0]).to.have.key('messageColumn'); + }); + + it('partially updates a source configuration', async () => { + const response = await logSourceConfiguration + .createUpdateLogSourceConfigurationAgent('default', { + name: 'NAME', + }) + .expect(200); + + const { + data: { configuration, origin }, + } = decodeOrThrow(patchLogSourceConfigurationSuccessResponsePayloadRT)(response.body); + + expect(configuration.name).to.be('NAME'); + expect(origin).to.be('stored'); + expect(configuration.logAlias).to.be('filebeat-*,kibana_sample_data_logs*'); + expect(configuration.fields.timestamp).to.be('@timestamp'); + expect(configuration.fields.tiebreaker).to.be('_doc'); + expect(configuration.logColumns).to.have.length(3); + expect(configuration.logColumns[0]).to.have.key('timestampColumn'); + expect(configuration.logColumns[1]).to.have.key('fieldColumn'); + expect(configuration.logColumns[2]).to.have.key('messageColumn'); + }); + }); + }); +} diff --git a/x-pack/test/api_integration/apis/siem/authentications.ts b/x-pack/test/api_integration/apis/siem/authentications.ts index cf9d8d8c9a5155..b89a1448d5fe6f 100644 --- a/x-pack/test/api_integration/apis/siem/authentications.ts +++ b/x-pack/test/api_integration/apis/siem/authentications.ts @@ -6,8 +6,8 @@ import expect from '@kbn/expect'; -import { authenticationsQuery } from '../../../../legacy/plugins/siem/public/containers/authentications/index.gql_query'; -import { GetAuthenticationsQuery } from '../../../../legacy/plugins/siem/public/graphql/types'; +import { authenticationsQuery } from '../../../../plugins/siem/public/containers/authentications/index.gql_query'; +import { GetAuthenticationsQuery } from '../../../../plugins/siem/public/graphql/types'; import { FtrProviderContext } from '../../ftr_provider_context'; const FROM = new Date('2000-01-01T00:00:00.000Z').valueOf(); diff --git a/x-pack/test/api_integration/apis/siem/hosts.ts b/x-pack/test/api_integration/apis/siem/hosts.ts index 6e74375cedc126..0a2ee9c82bce22 100644 --- a/x-pack/test/api_integration/apis/siem/hosts.ts +++ b/x-pack/test/api_integration/apis/siem/hosts.ts @@ -12,10 +12,10 @@ import { GetHostFirstLastSeenQuery, GetHostsTableQuery, HostsFields, -} from '../../../../legacy/plugins/siem/public/graphql/types'; -import { HostOverviewQuery } from '../../../../legacy/plugins/siem/public/containers/hosts/overview/host_overview.gql_query'; -import { HostFirstLastSeenGqlQuery } from './../../../../legacy/plugins/siem/public/containers/hosts/first_last_seen/first_last_seen.gql_query'; -import { HostsTableQuery } from './../../../../legacy/plugins/siem/public/containers/hosts/hosts_table.gql_query'; +} from '../../../../plugins/siem/public/graphql/types'; +import { HostOverviewQuery } from '../../../../plugins/siem/public/containers/hosts/overview/host_overview.gql_query'; +import { HostFirstLastSeenGqlQuery } from '../../../../plugins/siem/public/containers/hosts/first_last_seen/first_last_seen.gql_query'; +import { HostsTableQuery } from '../../../../plugins/siem/public/containers/hosts/hosts_table.gql_query'; import { FtrProviderContext } from '../../ftr_provider_context'; const FROM = new Date('2000-01-01T00:00:00.000Z').valueOf(); diff --git a/x-pack/test/api_integration/apis/siem/ip_overview.ts b/x-pack/test/api_integration/apis/siem/ip_overview.ts index bec31a018cac8d..2f1a792aff25bf 100644 --- a/x-pack/test/api_integration/apis/siem/ip_overview.ts +++ b/x-pack/test/api_integration/apis/siem/ip_overview.ts @@ -5,8 +5,8 @@ */ import expect from '@kbn/expect'; -import { ipOverviewQuery } from '../../../../legacy/plugins/siem/public/containers/ip_overview/index.gql_query'; -import { GetIpOverviewQuery } from '../../../../legacy/plugins/siem/public/graphql/types'; +import { ipOverviewQuery } from '../../../../plugins/siem/public/containers/ip_overview/index.gql_query'; +import { GetIpOverviewQuery } from '../../../../plugins/siem/public/graphql/types'; import { FtrProviderContext } from '../../ftr_provider_context'; export default function({ getService }: FtrProviderContext) { diff --git a/x-pack/test/api_integration/apis/siem/kpi_host_details.ts b/x-pack/test/api_integration/apis/siem/kpi_host_details.ts index 02152c0b71ca9e..30f9f6f04a2423 100644 --- a/x-pack/test/api_integration/apis/siem/kpi_host_details.ts +++ b/x-pack/test/api_integration/apis/siem/kpi_host_details.ts @@ -5,8 +5,8 @@ */ import expect from '@kbn/expect'; -import { kpiHostDetailsQuery } from '../../../../legacy/plugins/siem/public/containers/kpi_host_details/index.gql_query'; -import { GetKpiHostDetailsQuery } from '../../../../legacy/plugins/siem/public/graphql/types'; +import { kpiHostDetailsQuery } from '../../../../plugins/siem/public/containers/kpi_host_details/index.gql_query'; +import { GetKpiHostDetailsQuery } from '../../../../plugins/siem/public/graphql/types'; import { FtrProviderContext } from '../../ftr_provider_context'; export default function({ getService }: FtrProviderContext) { diff --git a/x-pack/test/api_integration/apis/siem/kpi_hosts.ts b/x-pack/test/api_integration/apis/siem/kpi_hosts.ts index 9e43405b324faa..2303b9ecfb78fd 100644 --- a/x-pack/test/api_integration/apis/siem/kpi_hosts.ts +++ b/x-pack/test/api_integration/apis/siem/kpi_hosts.ts @@ -5,8 +5,8 @@ */ import expect from '@kbn/expect'; -import { kpiHostsQuery } from '../../../../legacy/plugins/siem/public/containers/kpi_hosts/index.gql_query'; -import { GetKpiHostsQuery } from '../../../../legacy/plugins/siem/public/graphql/types'; +import { kpiHostsQuery } from '../../../../plugins/siem/public/containers/kpi_hosts/index.gql_query'; +import { GetKpiHostsQuery } from '../../../../plugins/siem/public/graphql/types'; import { FtrProviderContext } from '../../ftr_provider_context'; export default function({ getService }: FtrProviderContext) { diff --git a/x-pack/test/api_integration/apis/siem/kpi_network.ts b/x-pack/test/api_integration/apis/siem/kpi_network.ts index 6b12b4e3c938ab..22e133e48bbd2b 100644 --- a/x-pack/test/api_integration/apis/siem/kpi_network.ts +++ b/x-pack/test/api_integration/apis/siem/kpi_network.ts @@ -5,8 +5,8 @@ */ import expect from '@kbn/expect'; -import { kpiNetworkQuery } from '../../../../legacy/plugins/siem/public/containers/kpi_network/index.gql_query'; -import { GetKpiNetworkQuery } from '../../../../legacy/plugins/siem/public/graphql/types'; +import { kpiNetworkQuery } from '../../../../plugins/siem/public/containers/kpi_network/index.gql_query'; +import { GetKpiNetworkQuery } from '../../../../plugins/siem/public/graphql/types'; import { FtrProviderContext } from '../../ftr_provider_context'; export default function({ getService }: FtrProviderContext) { diff --git a/x-pack/test/api_integration/apis/siem/network_dns.ts b/x-pack/test/api_integration/apis/siem/network_dns.ts index 13e98f09d072b6..1eba41e238c819 100644 --- a/x-pack/test/api_integration/apis/siem/network_dns.ts +++ b/x-pack/test/api_integration/apis/siem/network_dns.ts @@ -5,12 +5,12 @@ */ import expect from '@kbn/expect'; -import { networkDnsQuery } from '../../../../legacy/plugins/siem/public/containers/network_dns/index.gql_query'; +import { networkDnsQuery } from '../../../../plugins/siem/public/containers/network_dns/index.gql_query'; import { Direction, GetNetworkDnsQuery, NetworkDnsFields, -} from '../../../../legacy/plugins/siem/public/graphql/types'; +} from '../../../../plugins/siem/public/graphql/types'; import { FtrProviderContext } from '../../ftr_provider_context'; export default function({ getService }: FtrProviderContext) { diff --git a/x-pack/test/api_integration/apis/siem/network_top_n_flow.ts b/x-pack/test/api_integration/apis/siem/network_top_n_flow.ts index ee4344bb0f1ee7..6ab7945e9000d6 100644 --- a/x-pack/test/api_integration/apis/siem/network_top_n_flow.ts +++ b/x-pack/test/api_integration/apis/siem/network_top_n_flow.ts @@ -5,13 +5,13 @@ */ import expect from '@kbn/expect'; -import { networkTopNFlowQuery } from '../../../../legacy/plugins/siem/public/containers/network_top_n_flow/index.gql_query'; +import { networkTopNFlowQuery } from '../../../../plugins/siem/public/containers/network_top_n_flow/index.gql_query'; import { Direction, FlowTargetSourceDest, GetNetworkTopNFlowQuery, NetworkTopTablesFields, -} from '../../../../legacy/plugins/siem/public/graphql/types'; +} from '../../../../plugins/siem/public/graphql/types'; import { FtrProviderContext } from '../../ftr_provider_context'; const EDGE_LENGTH = 10; diff --git a/x-pack/test/api_integration/apis/siem/overview_host.ts b/x-pack/test/api_integration/apis/siem/overview_host.ts index 7e5cbd7673af7f..95dbb44e30c41c 100644 --- a/x-pack/test/api_integration/apis/siem/overview_host.ts +++ b/x-pack/test/api_integration/apis/siem/overview_host.ts @@ -7,8 +7,8 @@ import expect from '@kbn/expect'; import { DEFAULT_INDEX_PATTERN } from '../../../../plugins/siem/common/constants'; -import { overviewHostQuery } from '../../../../legacy/plugins/siem/public/containers/overview/overview_host/index.gql_query'; -import { GetOverviewHostQuery } from '../../../../legacy/plugins/siem/public/graphql/types'; +import { overviewHostQuery } from '../../../../plugins/siem/public/containers/overview/overview_host/index.gql_query'; +import { GetOverviewHostQuery } from '../../../../plugins/siem/public/graphql/types'; import { FtrProviderContext } from '../../ftr_provider_context'; export default function({ getService }: FtrProviderContext) { diff --git a/x-pack/test/api_integration/apis/siem/overview_network.ts b/x-pack/test/api_integration/apis/siem/overview_network.ts index ce2f8d4a0b5e5f..ef7d82d2ea8d96 100644 --- a/x-pack/test/api_integration/apis/siem/overview_network.ts +++ b/x-pack/test/api_integration/apis/siem/overview_network.ts @@ -5,8 +5,8 @@ */ import expect from '@kbn/expect'; -import { overviewNetworkQuery } from '../../../../legacy/plugins/siem/public/containers/overview/overview_network/index.gql_query'; -import { GetOverviewNetworkQuery } from '../../../../legacy/plugins/siem/public/graphql/types'; +import { overviewNetworkQuery } from '../../../../plugins/siem/public/containers/overview/overview_network/index.gql_query'; +import { GetOverviewNetworkQuery } from '../../../../plugins/siem/public/graphql/types'; import { FtrProviderContext } from '../../ftr_provider_context'; export default function({ getService }: FtrProviderContext) { diff --git a/x-pack/test/api_integration/apis/siem/saved_objects/notes.ts b/x-pack/test/api_integration/apis/siem/saved_objects/notes.ts index 5aa7a10e07c2a4..75670374b6f632 100644 --- a/x-pack/test/api_integration/apis/siem/saved_objects/notes.ts +++ b/x-pack/test/api_integration/apis/siem/saved_objects/notes.ts @@ -8,7 +8,7 @@ import expect from '@kbn/expect'; import gql from 'graphql-tag'; import { FtrProviderContext } from '../../../ftr_provider_context'; -import { persistTimelineNoteMutation } from '../../../../../legacy/plugins/siem/public/containers/timeline/notes/persist.gql_query'; +import { persistTimelineNoteMutation } from '../../../../../plugins/siem/public/containers/timeline/notes/persist.gql_query'; export default function({ getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); diff --git a/x-pack/test/api_integration/apis/siem/saved_objects/pinned_events.ts b/x-pack/test/api_integration/apis/siem/saved_objects/pinned_events.ts index f1e926b3ede426..39055e971d1185 100644 --- a/x-pack/test/api_integration/apis/siem/saved_objects/pinned_events.ts +++ b/x-pack/test/api_integration/apis/siem/saved_objects/pinned_events.ts @@ -7,7 +7,7 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../ftr_provider_context'; -import { persistTimelinePinnedEventMutation } from '../../../../../legacy/plugins/siem/public/containers/timeline/pinned_event/persist.gql_query'; +import { persistTimelinePinnedEventMutation } from '../../../../../plugins/siem/public/containers/timeline/pinned_event/persist.gql_query'; export default function({ getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); diff --git a/x-pack/test/api_integration/apis/siem/saved_objects/timeline.ts b/x-pack/test/api_integration/apis/siem/saved_objects/timeline.ts index 6fe11bc2947950..2d9f576ef37e95 100644 --- a/x-pack/test/api_integration/apis/siem/saved_objects/timeline.ts +++ b/x-pack/test/api_integration/apis/siem/saved_objects/timeline.ts @@ -15,10 +15,10 @@ import ApolloClient from 'apollo-client'; import { FtrProviderContext } from '../../../ftr_provider_context'; -import { deleteTimelineMutation } from '../../../../../legacy/plugins/siem/public/containers/timeline/delete/persist.gql_query'; -import { persistTimelineFavoriteMutation } from '../../../../../legacy/plugins/siem/public/containers/timeline/favorite/persist.gql_query'; -import { persistTimelineMutation } from '../../../../../legacy/plugins/siem/public/containers/timeline/persist.gql_query'; -import { TimelineResult } from '../../../../../legacy/plugins/siem/public/graphql/types'; +import { deleteTimelineMutation } from '../../../../../plugins/siem/public/containers/timeline/delete/persist.gql_query'; +import { persistTimelineFavoriteMutation } from '../../../../../plugins/siem/public/containers/timeline/favorite/persist.gql_query'; +import { persistTimelineMutation } from '../../../../../plugins/siem/public/containers/timeline/persist.gql_query'; +import { TimelineResult } from '../../../../../plugins/siem/public/graphql/types'; export default function({ getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); diff --git a/x-pack/test/api_integration/apis/siem/sources.ts b/x-pack/test/api_integration/apis/siem/sources.ts index e0db91449a8ccd..2338d4ce45c8db 100644 --- a/x-pack/test/api_integration/apis/siem/sources.ts +++ b/x-pack/test/api_integration/apis/siem/sources.ts @@ -5,8 +5,8 @@ */ import expect from '@kbn/expect'; -import { sourceQuery } from '../../../../legacy/plugins/siem/public/containers/source/index.gql_query'; -import { SourceQuery } from '../../../../legacy/plugins/siem/public/graphql/types'; +import { sourceQuery } from '../../../../plugins/siem/public/containers/source/index.gql_query'; +import { SourceQuery } from '../../../../plugins/siem/public/graphql/types'; import { FtrProviderContext } from '../../ftr_provider_context'; diff --git a/x-pack/test/api_integration/apis/siem/timeline.ts b/x-pack/test/api_integration/apis/siem/timeline.ts index a6ab4493448f33..de57b0c3f469fb 100644 --- a/x-pack/test/api_integration/apis/siem/timeline.ts +++ b/x-pack/test/api_integration/apis/siem/timeline.ts @@ -6,8 +6,8 @@ import expect from '@kbn/expect'; -import { timelineQuery } from '../../../../legacy/plugins/siem/public/containers/timeline/index.gql_query'; -import { Direction, GetTimelineQuery } from '../../../../legacy/plugins/siem/public/graphql/types'; +import { timelineQuery } from '../../../../plugins/siem/public/containers/timeline/index.gql_query'; +import { Direction, GetTimelineQuery } from '../../../../plugins/siem/public/graphql/types'; import { FtrProviderContext } from '../../ftr_provider_context'; const LTE = new Date('3000-01-01T00:00:00.000Z').valueOf(); diff --git a/x-pack/test/api_integration/apis/siem/timeline_details.ts b/x-pack/test/api_integration/apis/siem/timeline_details.ts index 5d1e645bcf80be..f88d5355f22c1c 100644 --- a/x-pack/test/api_integration/apis/siem/timeline_details.ts +++ b/x-pack/test/api_integration/apis/siem/timeline_details.ts @@ -7,11 +7,8 @@ import expect from '@kbn/expect'; import { sortBy } from 'lodash'; -import { timelineDetailsQuery } from '../../../../legacy/plugins/siem/public/containers/timeline/details/index.gql_query'; -import { - DetailItem, - GetTimelineDetailsQuery, -} from '../../../../legacy/plugins/siem/public/graphql/types'; +import { timelineDetailsQuery } from '../../../../plugins/siem/public/containers/timeline/details/index.gql_query'; +import { DetailItem, GetTimelineDetailsQuery } from '../../../../plugins/siem/public/graphql/types'; import { FtrProviderContext } from '../../ftr_provider_context'; type DetailsData = Array< diff --git a/x-pack/test/api_integration/apis/siem/tls.ts b/x-pack/test/api_integration/apis/siem/tls.ts index 8467308d709af6..e4e8b5db3d7e38 100644 --- a/x-pack/test/api_integration/apis/siem/tls.ts +++ b/x-pack/test/api_integration/apis/siem/tls.ts @@ -5,13 +5,13 @@ */ import expect from '@kbn/expect'; -import { tlsQuery } from '../../../../legacy/plugins/siem/public/containers/tls/index.gql_query'; +import { tlsQuery } from '../../../../plugins/siem/public/containers/tls/index.gql_query'; import { Direction, TlsFields, FlowTarget, GetTlsQuery, -} from '../../../../legacy/plugins/siem/public/graphql/types'; +} from '../../../../plugins/siem/public/graphql/types'; import { FtrProviderContext } from '../../ftr_provider_context'; const FROM = new Date('2000-01-01T00:00:00.000Z').valueOf(); diff --git a/x-pack/test/api_integration/apis/siem/uncommon_processes.ts b/x-pack/test/api_integration/apis/siem/uncommon_processes.ts index b463c4db996536..c9674e740f76d9 100644 --- a/x-pack/test/api_integration/apis/siem/uncommon_processes.ts +++ b/x-pack/test/api_integration/apis/siem/uncommon_processes.ts @@ -6,8 +6,8 @@ import expect from '@kbn/expect'; -import { uncommonProcessesQuery } from '../../../../legacy/plugins/siem/public/containers/uncommon_processes/index.gql_query'; -import { GetUncommonProcessesQuery } from '../../../../legacy/plugins/siem/public/graphql/types'; +import { uncommonProcessesQuery } from '../../../../plugins/siem/public/containers/uncommon_processes/index.gql_query'; +import { GetUncommonProcessesQuery } from '../../../../plugins/siem/public/graphql/types'; import { FtrProviderContext } from '../../ftr_provider_context'; const FROM = new Date('2000-01-01T00:00:00.000Z').valueOf(); diff --git a/x-pack/test/api_integration/apis/siem/users.ts b/x-pack/test/api_integration/apis/siem/users.ts index f1869d40fbf1d5..c8ea1be7d3f11d 100644 --- a/x-pack/test/api_integration/apis/siem/users.ts +++ b/x-pack/test/api_integration/apis/siem/users.ts @@ -5,13 +5,13 @@ */ import expect from '@kbn/expect'; -import { usersQuery } from '../../../../legacy/plugins/siem/public/containers/users/index.gql_query'; +import { usersQuery } from '../../../../plugins/siem/public/containers/users/index.gql_query'; import { Direction, UsersFields, FlowTarget, GetUsersQuery, -} from '../../../../legacy/plugins/siem/public/graphql/types'; +} from '../../../../plugins/siem/public/graphql/types'; import { FtrProviderContext } from '../../ftr_provider_context'; const FROM = new Date('2000-01-01T00:00:00.000Z').valueOf(); diff --git a/x-pack/test/api_integration/services/index.ts b/x-pack/test/api_integration/services/index.ts index 84b8476bd1dd10..6dcc9bb291b02a 100644 --- a/x-pack/test/api_integration/services/index.ts +++ b/x-pack/test/api_integration/services/index.ts @@ -21,6 +21,7 @@ import { } from './infraops_graphql_client'; import { SiemGraphQLClientProvider, SiemGraphQLClientFactoryProvider } from './siem_graphql_client'; import { InfraOpsSourceConfigurationProvider } from './infraops_source_configuration'; +import { InfraLogSourceConfigurationProvider } from './infra_log_source_configuration'; import { MachineLearningProvider } from './ml'; import { IngestManagerProvider } from './ingest_manager'; @@ -35,6 +36,7 @@ export const services = { infraOpsGraphQLClient: InfraOpsGraphQLClientProvider, infraOpsGraphQLClientFactory: InfraOpsGraphQLClientFactoryProvider, infraOpsSourceConfiguration: InfraOpsSourceConfigurationProvider, + infraLogSourceConfiguration: InfraLogSourceConfigurationProvider, siemGraphQLClient: SiemGraphQLClientProvider, siemGraphQLClientFactory: SiemGraphQLClientFactoryProvider, supertestWithoutAuth: SupertestWithoutAuthProvider, diff --git a/x-pack/test/api_integration/services/infra_log_source_configuration.ts b/x-pack/test/api_integration/services/infra_log_source_configuration.ts new file mode 100644 index 00000000000000..851720895c6201 --- /dev/null +++ b/x-pack/test/api_integration/services/infra_log_source_configuration.ts @@ -0,0 +1,69 @@ +/* + * 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. + */ + +import { + getLogSourceConfigurationPath, + getLogSourceConfigurationSuccessResponsePayloadRT, + PatchLogSourceConfigurationRequestBody, + patchLogSourceConfigurationRequestBodyRT, + patchLogSourceConfigurationResponsePayloadRT, +} from '../../../plugins/infra/common/http_api/log_sources'; +import { decodeOrThrow } from '../../../plugins/infra/common/runtime_types'; +import { FtrProviderContext } from '../ftr_provider_context'; + +export function InfraLogSourceConfigurationProvider({ getService }: FtrProviderContext) { + const supertest = getService('supertest'); + const log = getService('log'); + + const createGetLogSourceConfigurationAgent = (sourceId: string) => + supertest + .get(getLogSourceConfigurationPath(sourceId)) + .set({ + 'kbn-xsrf': 'some-xsrf-token', + }) + .send(); + + const getLogSourceConfiguration = async (sourceId: string) => { + log.debug(`Fetching Logs UI source configuration "${sourceId}"`); + + const response = await createGetLogSourceConfigurationAgent(sourceId); + + return decodeOrThrow(getLogSourceConfigurationSuccessResponsePayloadRT)(response.body); + }; + + const createUpdateLogSourceConfigurationAgent = ( + sourceId: string, + sourceProperties: PatchLogSourceConfigurationRequestBody['data'] + ) => + supertest + .patch(getLogSourceConfigurationPath(sourceId)) + .set({ + 'kbn-xsrf': 'some-xsrf-token', + }) + .send(patchLogSourceConfigurationRequestBodyRT.encode({ data: sourceProperties })); + + const updateLogSourceConfiguration = async ( + sourceId: string, + sourceProperties: PatchLogSourceConfigurationRequestBody['data'] + ) => { + log.debug( + `Updating Logs UI source configuration "${sourceId}" with properties ${JSON.stringify( + sourceProperties + )}` + ); + + const response = await createUpdateLogSourceConfigurationAgent(sourceId, sourceProperties); + + return decodeOrThrow(patchLogSourceConfigurationResponsePayloadRT)(response.body); + }; + + return { + createGetLogSourceConfigurationAgent, + createUpdateLogSourceConfigurationAgent, + getLogSourceConfiguration, + updateLogSourceConfiguration, + }; +} diff --git a/x-pack/test/api_integration/services/siem_graphql_client.ts b/x-pack/test/api_integration/services/siem_graphql_client.ts index 7d6aa5e8a9dd56..ba60e66682955b 100644 --- a/x-pack/test/api_integration/services/siem_graphql_client.ts +++ b/x-pack/test/api_integration/services/siem_graphql_client.ts @@ -11,7 +11,7 @@ import { ApolloClient } from 'apollo-client'; import { HttpLink } from 'apollo-link-http'; import { FtrProviderContext } from '../ftr_provider_context'; -import introspectionQueryResultData from '../../../legacy/plugins/siem/public/graphql/introspection.json'; +import introspectionQueryResultData from '../../../plugins/siem/public/graphql/introspection.json'; interface SiemGraphQLClientFactoryOptions { username?: string; diff --git a/x-pack/test/functional/apps/dashboard/index.ts b/x-pack/test/functional/apps/dashboard/index.ts index 794bd2f1f0db36..23825836caad32 100644 --- a/x-pack/test/functional/apps/dashboard/index.ts +++ b/x-pack/test/functional/apps/dashboard/index.ts @@ -11,5 +11,6 @@ export default function({ loadTestFile }: FtrProviderContext) { loadTestFile(require.resolve('./feature_controls')); loadTestFile(require.resolve('./preserve_url')); + loadTestFile(require.resolve('./reporting')); }); } diff --git a/x-pack/test/functional/apps/dashboard/reporting/README.md b/x-pack/test/functional/apps/dashboard/reporting/README.md new file mode 100644 index 00000000000000..3a2b8f5cc783f9 --- /dev/null +++ b/x-pack/test/functional/apps/dashboard/reporting/README.md @@ -0,0 +1,22 @@ +## The Dashboard Reporting Tests + +### Baseline snapshots + +The reporting tests create a few PNG reports and do a snapshot comparison against stored baselines. The baseline images are stored in `./reports/baseline`. + +### Updating the baselines + +Every now and then visual changes will be made that will require the snapshots to be updated. This is how you go about updating it. + +1. **Load the ES Archive containing the dashboard and data.** + This will load the test data into an Elasticsearch instance running via the functional test server: + ``` + node scripts/es_archiver load reporting/ecommerce --config=x-pack/test/functional/config.js + node scripts/es_archiver load reporting/ecommerce_kibana --config=x-pack/test/functional/config.js + ``` +2. **Generate the reports of the E-commerce dashboard in the Kibana UI.** + Navigate to `http://localhost:5620`, find the archived dashboard, and generate all the types of reports for which there are stored baseline images. +3. **Download the reports, and save them into the `reports/baseline` folder.** + Change the names of the PNG/PDF files to overwrite the stored baselines. + +The next time functional tests run, the generated reports will be compared to the latest image that you have saved :bowtie: \ No newline at end of file diff --git a/x-pack/test/functional/apps/dashboard/reporting/index.js b/x-pack/test/functional/apps/dashboard/reporting/index.js new file mode 100644 index 00000000000000..99be084d80d74c --- /dev/null +++ b/x-pack/test/functional/apps/dashboard/reporting/index.js @@ -0,0 +1,126 @@ +/* + * 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. + */ + +import expect from '@kbn/expect'; +import path from 'path'; +import fs from 'fs'; +import { promisify } from 'util'; +import { checkIfPngsMatch } from './lib/compare_pngs'; + +const writeFileAsync = promisify(fs.writeFile); +const mkdirAsync = promisify(fs.mkdir); + +const REPORTS_FOLDER = path.resolve(__dirname, 'reports'); + +export default function({ getService, getPageObjects }) { + const esArchiver = getService('esArchiver'); + const browser = getService('browser'); + const log = getService('log'); + const config = getService('config'); + const PageObjects = getPageObjects(['reporting', 'common', 'dashboard']); + + describe('Reporting', () => { + before('initialize tests', async () => { + log.debug('ReportingPage:initTests'); + await esArchiver.loadIfNeeded('reporting/ecommerce'); + await esArchiver.loadIfNeeded('reporting/ecommerce_kibana'); + await browser.setWindowSize(1600, 850); + }); + after('clean up archives', async () => { + await esArchiver.unload('reporting/ecommerce'); + await esArchiver.unload('reporting/ecommerce_kibana'); + }); + + describe('Print PDF button', () => { + it('is not available if new', async () => { + await PageObjects.common.navigateToApp('dashboard'); + await PageObjects.dashboard.clickNewDashboard(); + await PageObjects.reporting.openPdfReportingPanel(); + expect(await PageObjects.reporting.isGenerateReportButtonDisabled()).to.be('true'); + }); + + it('becomes available when saved', async () => { + await PageObjects.dashboard.saveDashboard('My PDF Dashboard'); + await PageObjects.reporting.openPdfReportingPanel(); + expect(await PageObjects.reporting.isGenerateReportButtonDisabled()).to.be(null); + }); + }); + + describe('Print Layout', () => { + it('downloads a PDF file', async function() { + // Generating and then comparing reports can take longer than the default 60s timeout because the comparePngs + // function is taking about 15 seconds per comparison in jenkins. + this.timeout(300000); + await PageObjects.common.navigateToApp('dashboard'); + await PageObjects.dashboard.loadSavedDashboard('Ecom Dashboard'); + await PageObjects.reporting.openPdfReportingPanel(); + await PageObjects.reporting.checkUsePrintLayout(); + await PageObjects.reporting.clickGenerateReportButton(); + + const url = await PageObjects.reporting.getReportURL(60000); + const res = await PageObjects.reporting.getResponse(url); + + expect(res.statusCode).to.equal(200); + expect(res.headers['content-type']).to.equal('application/pdf'); + }); + }); + + describe('Print PNG button', () => { + it('is not available if new', async () => { + await PageObjects.common.navigateToApp('dashboard'); + await PageObjects.dashboard.clickNewDashboard(); + await PageObjects.reporting.openPngReportingPanel(); + expect(await PageObjects.reporting.isGenerateReportButtonDisabled()).to.be('true'); + }); + + it('becomes available when saved', async () => { + await PageObjects.dashboard.saveDashboard('My PNG Dash'); + await PageObjects.reporting.openPngReportingPanel(); + expect(await PageObjects.reporting.isGenerateReportButtonDisabled()).to.be(null); + }); + }); + + describe('Preserve Layout', () => { + it('matches baseline report', async function() { + const writeSessionReport = async (name, rawPdf, reportExt) => { + const sessionDirectory = path.resolve(REPORTS_FOLDER, 'session'); + await mkdirAsync(sessionDirectory, { recursive: true }); + const sessionReportPath = path.resolve(sessionDirectory, `${name}.${reportExt}`); + await writeFileAsync(sessionReportPath, rawPdf); + return sessionReportPath; + }; + const getBaselineReportPath = (fileName, reportExt) => { + const baselineFolder = path.resolve(REPORTS_FOLDER, 'baseline'); + const fullPath = path.resolve(baselineFolder, `${fileName}.${reportExt}`); + log.debug(`getBaselineReportPath (${fullPath})`); + return fullPath; + }; + + this.timeout(300000); + + await PageObjects.common.navigateToApp('dashboard'); + await PageObjects.dashboard.loadSavedDashboard('Ecom Dashboard'); + await PageObjects.reporting.openPngReportingPanel(); + await PageObjects.reporting.forceSharedItemsContainerSize({ width: 1405 }); + await PageObjects.reporting.clickGenerateReportButton(); + await PageObjects.reporting.removeForceSharedItemsContainerSize(); + + const url = await PageObjects.reporting.getReportURL(60000); + const reportData = await PageObjects.reporting.getRawPdfReportData(url); + const reportFileName = 'dashboard_preserve_layout'; + const sessionReportPath = await writeSessionReport(reportFileName, reportData, 'png'); + const percentSimilar = await checkIfPngsMatch( + sessionReportPath, + getBaselineReportPath(reportFileName, 'png'), + config.get('screenshots.directory'), + log + ); + + expect(percentSimilar).to.be.lessThan(0.1); + }); + }); + }); +} diff --git a/x-pack/test/reporting/functional/lib/compare_pngs.js b/x-pack/test/functional/apps/dashboard/reporting/lib/compare_pngs.js similarity index 95% rename from x-pack/test/reporting/functional/lib/compare_pngs.js rename to x-pack/test/functional/apps/dashboard/reporting/lib/compare_pngs.js index 16b1008c645a05..13c97a7fce7858 100644 --- a/x-pack/test/reporting/functional/lib/compare_pngs.js +++ b/x-pack/test/functional/apps/dashboard/reporting/lib/compare_pngs.js @@ -7,7 +7,7 @@ import path from 'path'; import fs from 'fs'; import { promisify } from 'bluebird'; -import { comparePngs } from '../../../../../test/functional/services/lib/compare_pngs'; +import { comparePngs } from '../../../../../../../test/functional/services/lib/compare_pngs'; const mkdirAsync = promisify(fs.mkdir); diff --git a/x-pack/test/reporting/functional/reports/baseline/dashboard_preserve_layout.png b/x-pack/test/functional/apps/dashboard/reporting/reports/baseline/dashboard_preserve_layout.png similarity index 100% rename from x-pack/test/reporting/functional/reports/baseline/dashboard_preserve_layout.png rename to x-pack/test/functional/apps/dashboard/reporting/reports/baseline/dashboard_preserve_layout.png diff --git a/x-pack/test/functional/apps/discover/index.ts b/x-pack/test/functional/apps/discover/index.ts index 2e5bdd736337d7..7688315a005168 100644 --- a/x-pack/test/functional/apps/discover/index.ts +++ b/x-pack/test/functional/apps/discover/index.ts @@ -11,5 +11,6 @@ export default function({ loadTestFile }: FtrProviderContext) { loadTestFile(require.resolve('./feature_controls')); loadTestFile(require.resolve('./preserve_url')); + loadTestFile(require.resolve('./reporting')); }); } diff --git a/x-pack/test/functional/apps/discover/reporting.js b/x-pack/test/functional/apps/discover/reporting.js new file mode 100644 index 00000000000000..4aa005fc2db553 --- /dev/null +++ b/x-pack/test/functional/apps/discover/reporting.js @@ -0,0 +1,75 @@ +/* + * 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. + */ + +import expect from '@kbn/expect'; + +export default function({ getService, getPageObjects }) { + const log = getService('log'); + const esArchiver = getService('esArchiver'); + const browser = getService('browser'); + const PageObjects = getPageObjects(['reporting', 'common', 'discover']); + const filterBar = getService('filterBar'); + + describe('Discover', () => { + before('initialize tests', async () => { + log.debug('ReportingPage:initTests'); + await esArchiver.loadIfNeeded('reporting/ecommerce'); + await browser.setWindowSize(1600, 850); + }); + after('clean up archives', async () => { + await esArchiver.unload('reporting/ecommerce'); + }); + + describe('Generate CSV button', () => { + beforeEach(() => PageObjects.common.navigateToApp('discover')); + + it('is not available if new', async () => { + await PageObjects.reporting.openCsvReportingPanel(); + expect(await PageObjects.reporting.isGenerateReportButtonDisabled()).to.be('true'); + }); + + it('becomes available when saved', async () => { + await PageObjects.discover.saveSearch('my search - expectEnabledGenerateReportButton'); + await PageObjects.reporting.openCsvReportingPanel(); + expect(await PageObjects.reporting.isGenerateReportButtonDisabled()).to.be(null); + }); + + it('becomes available/not available when a saved search is created, changed and saved again', async () => { + // create new search, csv export is not available + await PageObjects.discover.clickNewSearchButton(); + await PageObjects.reporting.openCsvReportingPanel(); + expect(await PageObjects.reporting.isGenerateReportButtonDisabled()).to.be('true'); + // save search, csv export is available + await PageObjects.discover.saveSearch('my search - expectEnabledGenerateReportButton 2'); + await PageObjects.reporting.openCsvReportingPanel(); + expect(await PageObjects.reporting.isGenerateReportButtonDisabled()).to.be(null); + // add filter, csv export is not available + await filterBar.addFilter('currency', 'is', 'EUR'); + await PageObjects.reporting.openCsvReportingPanel(); + expect(await PageObjects.reporting.isGenerateReportButtonDisabled()).to.be('true'); + // save search again, csv export is available + await PageObjects.discover.saveSearch('my search - expectEnabledGenerateReportButton 2'); + await PageObjects.reporting.openCsvReportingPanel(); + expect(await PageObjects.reporting.isGenerateReportButtonDisabled()).to.be(null); + }); + + it('generates a report with data', async () => { + await PageObjects.discover.clickNewSearchButton(); + await PageObjects.reporting.setTimepickerInDataRange(); + await PageObjects.discover.saveSearch('my search - with data - expectReportCanBeCreated'); + await PageObjects.reporting.openCsvReportingPanel(); + expect(await PageObjects.reporting.canReportBeCreated()).to.be(true); + }); + + it('generates a report with no data', async () => { + await PageObjects.reporting.setTimepickerInNoDataRange(); + await PageObjects.discover.saveSearch('my search - no data - expectReportCanBeCreated'); + await PageObjects.reporting.openCsvReportingPanel(); + expect(await PageObjects.reporting.canReportBeCreated()).to.be(true); + }); + }); + }); +} diff --git a/x-pack/test/functional/apps/infra/link_to.ts b/x-pack/test/functional/apps/infra/link_to.ts index 4e5ebab90880e0..89ed51f65b9306 100644 --- a/x-pack/test/functional/apps/infra/link_to.ts +++ b/x-pack/test/functional/apps/infra/link_to.ts @@ -5,6 +5,7 @@ */ import expect from '@kbn/expect'; +import { URL } from 'url'; import { FtrProviderContext } from '../../ftr_provider_context'; const ONE_HOUR = 60 * 60 * 1000; @@ -28,8 +29,6 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { search: `time=${timestamp}&filter=trace.id:${traceId}`, state: undefined, }; - const expectedSearchString = `logFilter=(expression:'trace.id:${traceId}',kind:kuery)&logPosition=(end:'${endDate}',position:(tiebreaker:0,time:${timestamp}),start:'${startDate}',streamLive:!f)&sourceId=default`; - const expectedRedirectPath = '/logs/stream?'; await pageObjects.common.navigateToUrlWithBrowserHistory( 'infraLogs', @@ -41,9 +40,16 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { ); await retry.tryForTime(5000, async () => { const currentUrl = await browser.getCurrentUrl(); - const decodedUrl = decodeURIComponent(currentUrl); - expect(decodedUrl).to.contain(expectedRedirectPath); - expect(decodedUrl).to.contain(expectedSearchString); + const parsedUrl = new URL(currentUrl); + + expect(parsedUrl.pathname).to.be('/app/logs/stream'); + expect(parsedUrl.searchParams.get('logFilter')).to.be( + `(expression:'trace.id:${traceId}',kind:kuery)` + ); + expect(parsedUrl.searchParams.get('logPosition')).to.be( + `(end:'${endDate}',position:(tiebreaker:0,time:${timestamp}),start:'${startDate}',streamLive:!f)` + ); + expect(parsedUrl.searchParams.get('sourceId')).to.be('default'); }); }); }); diff --git a/x-pack/test/functional/apps/visualize/index.ts b/x-pack/test/functional/apps/visualize/index.ts index f30367ba3dd0b3..1c23b8cde86064 100644 --- a/x-pack/test/functional/apps/visualize/index.ts +++ b/x-pack/test/functional/apps/visualize/index.ts @@ -15,5 +15,6 @@ export default function visualize({ loadTestFile }: FtrProviderContext) { loadTestFile(require.resolve('./hybrid_visualization')); loadTestFile(require.resolve('./precalculated_histogram')); loadTestFile(require.resolve('./preserve_url')); + loadTestFile(require.resolve('./reporting')); }); } diff --git a/x-pack/test/functional/apps/visualize/reporting.js b/x-pack/test/functional/apps/visualize/reporting.js new file mode 100644 index 00000000000000..bc252e1ad4134b --- /dev/null +++ b/x-pack/test/functional/apps/visualize/reporting.js @@ -0,0 +1,69 @@ +/* + * 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. + */ + +import expect from '@kbn/expect'; + +export default function({ getService, getPageObjects }) { + const esArchiver = getService('esArchiver'); + const browser = getService('browser'); + const log = getService('log'); + const PageObjects = getPageObjects([ + 'reporting', + 'common', + 'dashboard', + 'visualize', + 'visEditor', + ]); + + describe('Visualize', () => { + before('initialize tests', async () => { + log.debug('ReportingPage:initTests'); + await esArchiver.loadIfNeeded('reporting/ecommerce'); + await esArchiver.loadIfNeeded('reporting/ecommerce_kibana'); + await browser.setWindowSize(1600, 850); + }); + after('clean up archives', async () => { + await esArchiver.unload('reporting/ecommerce'); + await esArchiver.unload('reporting/ecommerce_kibana'); + }); + + describe('Print PDF button', () => { + it('is not available if new', async () => { + await PageObjects.common.navigateToUrl('visualize', 'new'); + await PageObjects.visualize.clickAreaChart(); + await PageObjects.visualize.clickNewSearch('ecommerce'); + await PageObjects.reporting.openPdfReportingPanel(); + expect(await PageObjects.reporting.isGenerateReportButtonDisabled()).to.be('true'); + }); + + it('becomes available when saved', async () => { + await PageObjects.reporting.setTimepickerInDataRange(); + await PageObjects.visEditor.clickBucket('X-axis'); + await PageObjects.visEditor.selectAggregation('Date Histogram'); + await PageObjects.visEditor.clickGo(); + await PageObjects.visualize.saveVisualization('my viz'); + await PageObjects.reporting.openPdfReportingPanel(); + expect(await PageObjects.reporting.isGenerateReportButtonDisabled()).to.be(null); + }); + + it('downloaded PDF has OK status', async function() { + // Generating and then comparing reports can take longer than the default 60s timeout + this.timeout(180000); + + await PageObjects.common.navigateToApp('dashboard'); + await PageObjects.dashboard.loadSavedDashboard('Ecom Dashboard'); + await PageObjects.reporting.openPdfReportingPanel(); + await PageObjects.reporting.clickGenerateReportButton(); + + const url = await PageObjects.reporting.getReportURL(60000); + const res = await PageObjects.reporting.getResponse(url); + + expect(res.statusCode).to.equal(200); + expect(res.headers['content-type']).to.equal('application/pdf'); + }); + }); + }); +} diff --git a/x-pack/test/functional/page_objects/reporting_page.js b/x-pack/test/functional/page_objects/reporting_page.js index 35a76c74d4811c..b24ba8cf95d1ce 100644 --- a/x-pack/test/functional/page_objects/reporting_page.js +++ b/x-pack/test/functional/page_objects/reporting_page.js @@ -17,7 +17,6 @@ import http from 'http'; export function ReportingPageProvider({ getService, getPageObjects }) { const retry = getService('retry'); const log = getService('log'); - const config = getService('config'); const testSubjects = getService('testSubjects'); const browser = getService('browser'); const PageObjects = getPageObjects(['common', 'security', 'share', 'timePicker']); @@ -51,7 +50,7 @@ export function ReportingPageProvider({ getService, getPageObjects }) { getResponse(url) { log.debug(`getResponse for ${url}`); - const auth = config.get('servers.elasticsearch.auth'); + const auth = 'test_user:changeme'; // FIXME not sure why there is no config that can be read for this const headers = { Authorization: `Basic ${Buffer.from(auth).toString('base64')}`, }; @@ -71,6 +70,7 @@ export function ReportingPageProvider({ getService, getPageObjects }) { } ) .on('error', e => { + log.error(e); reject(e); }); }); diff --git a/x-pack/test/plugin_api_integration/config.ts b/x-pack/test/plugin_api_integration/config.ts index c581e0c246e132..adb31f3562a6f7 100644 --- a/x-pack/test/plugin_api_integration/config.ts +++ b/x-pack/test/plugin_api_integration/config.ts @@ -22,6 +22,7 @@ export default async function({ readConfigFile }: FtrConfigProviderContext) { testFiles: [ require.resolve('./test_suites/task_manager'), require.resolve('./test_suites/event_log'), + require.resolve('./test_suites/licensed_feature_usage'), ], services, servers: integrationConfig.get('servers'), diff --git a/x-pack/test/plugin_api_integration/plugins/feature_usage_test/kibana.json b/x-pack/test/plugin_api_integration/plugins/feature_usage_test/kibana.json new file mode 100644 index 00000000000000..b11b7ada24a578 --- /dev/null +++ b/x-pack/test/plugin_api_integration/plugins/feature_usage_test/kibana.json @@ -0,0 +1,9 @@ +{ + "id": "feature_usage_test", + "version": "1.0.0", + "kibanaVersion": "kibana", + "configPath": ["xpack", "feature_usage_test"], + "requiredPlugins": ["licensing"], + "server": true, + "ui": false +} diff --git a/x-pack/test/plugin_api_integration/plugins/feature_usage_test/server/index.ts b/x-pack/test/plugin_api_integration/plugins/feature_usage_test/server/index.ts new file mode 100644 index 00000000000000..e07915ab5f46b5 --- /dev/null +++ b/x-pack/test/plugin_api_integration/plugins/feature_usage_test/server/index.ts @@ -0,0 +1,17 @@ +/* + * 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. + */ + +import { PluginInitializer } from 'kibana/server'; +import { + FeatureUsageTestPlugin, + FeatureUsageTestPluginSetup, + FeatureUsageTestPluginStart, +} from './plugin'; + +export const plugin: PluginInitializer< + FeatureUsageTestPluginSetup, + FeatureUsageTestPluginStart +> = () => new FeatureUsageTestPlugin(); diff --git a/x-pack/test/plugin_api_integration/plugins/feature_usage_test/server/plugin.ts b/x-pack/test/plugin_api_integration/plugins/feature_usage_test/server/plugin.ts new file mode 100644 index 00000000000000..b36d6dca077f74 --- /dev/null +++ b/x-pack/test/plugin_api_integration/plugins/feature_usage_test/server/plugin.ts @@ -0,0 +1,53 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import { Plugin, CoreSetup } from 'kibana/server'; +import { + LicensingPluginSetup, + LicensingPluginStart, +} from '../../../../../plugins/licensing/server'; +import { registerRoutes } from './routes'; + +// eslint-disable-next-line @typescript-eslint/no-empty-interface +export interface FeatureUsageTestPluginSetup {} +// eslint-disable-next-line @typescript-eslint/no-empty-interface +export interface FeatureUsageTestPluginStart {} + +export interface FeatureUsageTestSetupDependencies { + licensing: LicensingPluginSetup; +} +export interface FeatureUsageTestStartDependencies { + licensing: LicensingPluginStart; +} + +export class FeatureUsageTestPlugin + implements + Plugin< + FeatureUsageTestPluginSetup, + FeatureUsageTestPluginStart, + FeatureUsageTestSetupDependencies, + FeatureUsageTestStartDependencies + > { + public setup( + { + http, + getStartServices, + }: CoreSetup, + { licensing }: FeatureUsageTestSetupDependencies + ) { + licensing.featureUsage.register('test_feature_a'); + licensing.featureUsage.register('test_feature_b'); + licensing.featureUsage.register('test_feature_c'); + + registerRoutes(http.createRouter(), getStartServices); + + return {}; + } + + public start() { + return {}; + } +} diff --git a/x-pack/test/plugin_api_integration/plugins/feature_usage_test/server/routes/hit.ts b/x-pack/test/plugin_api_integration/plugins/feature_usage_test/server/routes/hit.ts new file mode 100644 index 00000000000000..494bcdbf5f61eb --- /dev/null +++ b/x-pack/test/plugin_api_integration/plugins/feature_usage_test/server/routes/hit.ts @@ -0,0 +1,39 @@ +/* + * 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. + */ + +import { schema } from '@kbn/config-schema'; +import { IRouter, StartServicesAccessor } from 'src/core/server'; +import { FeatureUsageTestStartDependencies, FeatureUsageTestPluginStart } from '../plugin'; + +export function registerFeatureHitRoute( + router: IRouter, + getStartServices: StartServicesAccessor< + FeatureUsageTestStartDependencies, + FeatureUsageTestPluginStart + > +) { + router.get( + { + path: '/api/feature_usage_test/hit', + validate: { + query: schema.object({ + featureName: schema.string(), + usedAt: schema.maybe(schema.number()), + }), + }, + }, + async (context, request, response) => { + const [, { licensing }] = await getStartServices(); + try { + const { featureName, usedAt } = request.query; + licensing.featureUsage.notifyUsage(featureName, usedAt); + return response.ok(); + } catch (e) { + return response.badRequest(); + } + } + ); +} diff --git a/x-pack/test/plugin_api_integration/plugins/feature_usage_test/server/routes/index.ts b/x-pack/test/plugin_api_integration/plugins/feature_usage_test/server/routes/index.ts new file mode 100644 index 00000000000000..a8225838fd9bfc --- /dev/null +++ b/x-pack/test/plugin_api_integration/plugins/feature_usage_test/server/routes/index.ts @@ -0,0 +1,20 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import { IRouter, StartServicesAccessor } from 'src/core/server'; +import { FeatureUsageTestStartDependencies, FeatureUsageTestPluginStart } from '../plugin'; + +import { registerFeatureHitRoute } from './hit'; + +export function registerRoutes( + router: IRouter, + getStartServices: StartServicesAccessor< + FeatureUsageTestStartDependencies, + FeatureUsageTestPluginStart + > +) { + registerFeatureHitRoute(router, getStartServices); +} diff --git a/x-pack/test/plugin_api_integration/test_suites/licensed_feature_usage/feature_usage.ts b/x-pack/test/plugin_api_integration/test_suites/licensed_feature_usage/feature_usage.ts new file mode 100644 index 00000000000000..41f2cfc7983ef0 --- /dev/null +++ b/x-pack/test/plugin_api_integration/test_suites/licensed_feature_usage/feature_usage.ts @@ -0,0 +1,34 @@ +/* + * 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. + */ + +import expect from '@kbn/expect'; +import { FtrProviderContext } from '../../ftr_provider_context'; + +// eslint-disable-next-line import/no-default-export +export default function({ getService }: FtrProviderContext) { + const supertest = getService('supertest'); + + const notifyUsage = async (featureName: string, usedAt: number) => { + await supertest.get(`/api/feature_usage_test/hit?featureName=${featureName}&usedAt=${usedAt}`); + }; + + const toISO = (time: number) => new Date(time).toISOString(); + + describe('/api/licensing/feature_usage', () => { + it('returns a map of last feature usages', async () => { + const timeA = Date.now(); + await notifyUsage('test_feature_a', timeA); + + const timeB = Date.now() - 4567; + await notifyUsage('test_feature_b', timeB); + + const response = await supertest.get('/api/licensing/feature_usage').expect(200); + + expect(response.body.test_feature_a).to.eql(toISO(timeA)); + expect(response.body.test_feature_b).to.eql(toISO(timeB)); + }); + }); +} diff --git a/x-pack/test/plugin_api_integration/test_suites/licensed_feature_usage/index.ts b/x-pack/test/plugin_api_integration/test_suites/licensed_feature_usage/index.ts new file mode 100644 index 00000000000000..6cafb60bf81679 --- /dev/null +++ b/x-pack/test/plugin_api_integration/test_suites/licensed_feature_usage/index.ts @@ -0,0 +1,14 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import { FtrProviderContext } from '../../ftr_provider_context'; + +export default function({ loadTestFile }: FtrProviderContext) { + describe('Licensed feature usage APIs', function() { + this.tags('ciGroup2'); + loadTestFile(require.resolve('./feature_usage')); + }); +} diff --git a/x-pack/test/reporting/README.md b/x-pack/test/reporting/README.md deleted file mode 100644 index fc5147ad8c4544..00000000000000 --- a/x-pack/test/reporting/README.md +++ /dev/null @@ -1,153 +0,0 @@ -## The Reporting Tests - -### Overview - -Reporting tests have their own top level test folder because: - - Current API tests run with `optimize.enabled=false` flag for performance reasons, but reporting actually requires UI assets. - - Reporting tests take a lot longer than other test types. This separation allows developers to run them in isolation, or to run other functional or API tests without them. - - ### Running the tests - - There is more information on running x-pack tests here: https://github.com/elastic/kibana/blob/master/x-pack/README.md#running-functional-tests. Similar to running the API tests, you need to specify a reporting configuration file. Reporting currently has two configuration files you can point to: - - test/reporting/configs/chromium_api.js - - test/reporting/configs/chromium_functional.js - - The `api` versions hit the reporting api and ensure report generation completes successfully, but does not verify the output of the reports. This is done in the `functional` test versions, which does a snapshot comparison of the generated URL against a baseline to determine success. - - To run the tests in a single command. : -1. cd into x-pack directory. -2. run: - ``` -node scripts/functional_tests --config test/reporting/configs/[config_file_name_here].js - ``` - - You can also run the test server seperately from the runner. This is beneficial when debugging as Kibana and Elasticsearch will remain up and running throughout multiple test runs. To do this: - -1. cd into x-pack directory. -2. In one terminal window, run: - ``` -node scripts/functional_tests_server.js --config test/reporting/configs/[test_config_name_here].js - ``` -3. In another terminal window, cd into x-pack dir and run: - ``` -node ../scripts/functional_test_runner.js --config test/reporting/configs/[test_config_name_here].js - ``` - -```sh -//OSX -brew install imagemagick ghostscript poppler - -//Ubutnu -sudo apt-get install imagemagick ghostscript poppler-utils -``` - -For windows: - -ImageMagick-6.9.9-37-Q16-HDRI-x64-dll.exe -from -https://sourceforge.net/projects/imagemagick/postdownload -Install with all default options - -gs925w64.exe -from -https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs925/gs925w64.exe -Install with all default options - - -**Note:** Configurations from `kibana.dev.yml` are picked up when running the tests. Ensure that `kibana.dev.yml` does not contain any `xpack.reporting` configurations. - -### Reporting baseline snapshots - -The functional version of the reporting tests create a few pdf reports and do a snapshot comparison against a couple baselines. The baseline images are stored in `./functional/reports/baseline`. - -#### Updating the baselines - -Every now and then visual changes will be made that will require the snapshots to be updated. This is how you go about updating it. I will discuss generating snapshots from chromium since that is the way of the future. - -1. Run the test server for chromium. - ``` -node scripts/functional_tests_server.js --config test/reporting/configs/chromium_functional.js - ``` - 2. Run the test runner - ``` - node ../scripts/functional_test_runner.js --config test/reporting/configs/chromium_functional.js - ``` - 3. This will create new report snapshots in `./functional/reports/session/`. - 4. After manually verifying the new reports in the `session` folder, copy them into [./functional/reports/baseline/](https://github.com/elastic/kibana/blob/master/x-pack/test/reporting/functional/reports/baseline) - 5. Create a new PR with the new snapshots in the baseline folder. - -**Note:** Dashboard has some snapshot testing too, in `_dashboard_snapshots.js`. This test watches for a command line flag `--updateBaselines` which automates updating the baselines. Probably worthwhile to do some similar here in the long run. - -``` -node ../scripts/es_archiver.js --es-url http://elastic:changeme@localhost:9200 load ../../../../test/functional/fixtures/es_archiver/dashboard/current/kibana -``` -^^ That loads the .kibana index. - -``` -node ../scripts/es_archiver.js --es-url http://elastic:changeme@localhost:9200 load ../../../../test/functional/fixtures/es_archiver/dashboard/current/data -``` -^^ That loads the data indices. - -**Note:** Depending on your kibana.yml configuration, you may need to adjust the username, pw, and port in the urls above. - -5. Navigate to Kibana in the browser (`http://localhost:5601`) -6. Log in, pick any index to be the default to get page the management screen (doesn’t matter) -7. Generate some reporting URLs - - Use a mixture of Visualize, Discover (CSV), Dashboard - - Can view the current test coverage by checkout out [api/generation_urls.js](https://github.com/elastic/kibana/blob/master/x-pack/test/reporting/api/generation_urls.js). You can use different ones for better test coverage (e.g. different dashboards, different visualizations). - - Don’t generate urls from huge dashboards since this is time consuming. - - Use dashboards that have time saved with them if you wish to have data included. -8. Save these reporting urls. -9. Navigate back to the main branch via `git checkout master`. Then create, or work off your branch as usual to add the extra test coverage. -10. Copy the urls into `api/generation_urls.js`, stripping out the domain, port and base path (if they have it). -11. Write your new tests in [api/bwc_generation_urls.js](https://github.com/elastic/kibana/blob/master/x-pack/test/reporting/api/bwc_generation_urls.js) -12. Run tests via the mechanism above. - -**Note:** We may at some point wish to push most of these tests into an integration suite, as testing BWC of urls generated in every single minor, especially if there were not notable changes, may be overkill, especially given the time they add to the ci. - -### Expanding test coverage by including more data - -As Kibana development progresses, our existing data indices often fail to cover new situations, such as: - - Reports with new visualization types - - Canvas reports - - Reports with visualizations referencing new index types (e.g. visualizations referencing rolled up indices) - - etc - - Every now and then we should expand our test coverage to include new features. This is how you go about doing that in the context of reporting: - - 1. Checkout the `[version].x` branch, where `version` is the currently working minor version (e.g. 6.x, not `master`). This is because we don't want to run tests from data generated from a master version. The opposite works fine however - tests on master can run against data generated from the last minor. At least generally, though major version upgrades may require updating archived data (or be run through the appropriate migration scripts). - - 2. Load the current archives via: - ``` -node ../scripts/es_archiver.js --es-url http://elastic:changeme@localhost:9200 load ../../../../test/functional/fixtures/es_archiver/dashboard/current/kibana -``` -^^ That loads the .kibana index. - -``` -node ../scripts/es_archiver.js --es-url http://elastic:changeme@localhost:9200 load ../../../../test/functional/fixtures/es_archiver/dashboard/current/data -``` -^^ That loads the data indices. - -**Note:** Your es-url parameter might be different, but those are the default ports if running via `yarn start` and `yarn es snapshot --license trial`. - -3. Now generate the new data, create new index patterns, create new visualizations, and create new dashboards using those visualizations. All the fun stuff that you may want to use in your tests. - -**Note:** This data is used in open source dashboard testing. All visualizations and saved searches that have `Rendering Test` in their name are dynamically added to a new dashboard and their rendering is confirmed in https://github.com/elastic/kibana/tree/master/test/functional/apps/dashboard/_embedddable_rendering.js. You may need to adjust the expectations if you add new tests (which will be a good thing anyway, help extend the basic rendering tests - this way issues are caught before it gets to reporting tests!). Similarly all visualizations and saved searches that have `Filter Bytes Test` in their name are tested in https://github.com/elastic/kibana/tree/master/test/functional/apps/dashboard/_dashboard_filtering.js - -**Note:** The current reporting tests add visualizations from what is in `PageObjects.dashboard.getTestVisualizationNames`. We should probably instead use a saved dashboard we generate this report from. Then you can add any new visualizations, re-save the dashboard, and re-generate the snapshot above. - -4. After adding more visualizations to a test dashboard, update tests if necessary, update snapshots, then **save the new archives**! - ``` -node ../scripts/es_archiver.js --es-url http://elastic:changeme@localhost:9200 save ../../../../test/functional/fixtures/es_archiver/dashboard/current/kibana -``` -^^ That saves the .kibana index. - -``` -node ../scripts/es_archiver.js --es-url http://elastic:changeme@localhost:9200 save ../../../../test/functional/fixtures/es_archiver/dashboard/current/data log* animal* dog* [ANY OTHER NEW INDEX NAME YOU ADDED]* -``` -^^ That saves the data indices. The last parameter is a list of indices you want archived. You don't want to include the `.kibana` one in there (this way you can use a custom `.kibana`, but can reuse the data archive, for tests, and `.kibana` archive is small, but the data archives are larger and should be reused). - -5. Create your PR with test updates, and the larger archive. - - - diff --git a/x-pack/test/reporting/configs/chromium_functional.js b/x-pack/test/reporting/configs/chromium_functional.js deleted file mode 100644 index 753d2b2a20ab95..00000000000000 --- a/x-pack/test/reporting/configs/chromium_functional.js +++ /dev/null @@ -1,39 +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 default async function({ readConfigFile }) { - // TODO move reporting tests to x-pack/test/functional/apps//reporting - const functionalConfig = await readConfigFile(require.resolve('../../functional/config.js')); - - return { - services: functionalConfig.get('services'), - pageObjects: functionalConfig.get('pageObjects'), - servers: functionalConfig.get('servers'), - apps: functionalConfig.get('apps'), - screenshots: functionalConfig.get('screenshots'), - junit: { - reportName: 'X-Pack Chromium Functional Reporting Tests', - }, - testFiles: [require.resolve('../functional')], - kbnTestServer: { - ...functionalConfig.get('kbnTestServer'), - serverArgs: [ - ...functionalConfig.get('kbnTestServer.serverArgs'), - '--logging.events.log', - '["info","warning","error","fatal","optimize","reporting"]', - '--xpack.endpoint.enabled=true', - '--xpack.reporting.csv.enablePanelActionDownload=true', - '--xpack.reporting.csv.checkForFormulas=false', - '--xpack.reporting.csv.maxSizeBytes=25000000', - '--xpack.security.session.idleTimeout=3600000', - '--xpack.spaces.enabled=false', - ], - }, - esArchiver: functionalConfig.get('esArchiver'), - esTestCluster: functionalConfig.get('esTestCluster'), - security: { disableTestUser: true }, - }; -} diff --git a/x-pack/test/reporting/functional/reporting.js b/x-pack/test/reporting/functional/reporting.js deleted file mode 100644 index c1a2ae634662ca..00000000000000 --- a/x-pack/test/reporting/functional/reporting.js +++ /dev/null @@ -1,251 +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. - */ - -import expect from '@kbn/expect'; -import path from 'path'; -import fs from 'fs'; -import { promisify } from 'util'; -import { checkIfPngsMatch } from './lib'; - -const writeFileAsync = promisify(fs.writeFile); -const mkdirAsync = promisify(fs.mkdir); - -const REPORTS_FOLDER = path.resolve(__dirname, 'reports'); - -/* - * TODO Remove this file and spread the tests to various apps - */ - -export default function({ getService, getPageObjects }) { - const esArchiver = getService('esArchiver'); - const browser = getService('browser'); - const log = getService('log'); - const config = getService('config'); - const filterBar = getService('filterBar'); - const PageObjects = getPageObjects([ - 'reporting', - 'common', - 'dashboard', - 'header', - 'discover', - 'visualize', - 'visEditor', - ]); - - describe('Reporting', () => { - describe('Dashboard', () => { - before('initialize tests', async () => { - log.debug('ReportingPage:initTests'); - await esArchiver.loadIfNeeded('reporting/ecommerce'); - await esArchiver.loadIfNeeded('reporting/ecommerce_kibana'); - await browser.setWindowSize(1600, 850); - }); - after('clean up archives', async () => { - await esArchiver.unload('reporting/ecommerce'); - await esArchiver.unload('reporting/ecommerce_kibana'); - }); - - describe('Print PDF button', () => { - it('is not available if new', async () => { - await PageObjects.common.navigateToApp('dashboard'); - await PageObjects.dashboard.clickNewDashboard(); - await PageObjects.reporting.openPdfReportingPanel(); - expect(await PageObjects.reporting.isGenerateReportButtonDisabled()).to.be('true'); - }); - - it('becomes available when saved', async () => { - await PageObjects.dashboard.saveDashboard('My PDF Dashboard'); - await PageObjects.reporting.openPdfReportingPanel(); - expect(await PageObjects.reporting.isGenerateReportButtonDisabled()).to.be(null); - }); - }); - - describe('Print Layout', () => { - it('downloads a PDF file', async function() { - // Generating and then comparing reports can take longer than the default 60s timeout because the comparePngs - // function is taking about 15 seconds per comparison in jenkins. - this.timeout(300000); - await PageObjects.common.navigateToApp('dashboard'); - await PageObjects.dashboard.loadSavedDashboard('Ecom Dashboard'); - await PageObjects.reporting.openPdfReportingPanel(); - await PageObjects.reporting.checkUsePrintLayout(); - await PageObjects.reporting.clickGenerateReportButton(); - - const url = await PageObjects.reporting.getReportURL(60000); - const res = await PageObjects.reporting.getResponse(url); - - expect(res.statusCode).to.equal(200); - expect(res.headers['content-type']).to.equal('application/pdf'); - }); - }); - - describe('Print PNG button', () => { - it('is not available if new', async () => { - await PageObjects.common.navigateToApp('dashboard'); - await PageObjects.dashboard.clickNewDashboard(); - await PageObjects.reporting.openPngReportingPanel(); - expect(await PageObjects.reporting.isGenerateReportButtonDisabled()).to.be('true'); - }); - - it('becomes available when saved', async () => { - await PageObjects.dashboard.saveDashboard('My PNG Dash'); - await PageObjects.reporting.openPngReportingPanel(); - expect(await PageObjects.reporting.isGenerateReportButtonDisabled()).to.be(null); - }); - }); - - describe('Preserve Layout', () => { - it('matches baseline report', async function() { - const writeSessionReport = async (name, rawPdf, reportExt) => { - const sessionDirectory = path.resolve(REPORTS_FOLDER, 'session'); - await mkdirAsync(sessionDirectory, { recursive: true }); - const sessionReportPath = path.resolve(sessionDirectory, `${name}.${reportExt}`); - await writeFileAsync(sessionReportPath, rawPdf); - return sessionReportPath; - }; - const getBaselineReportPath = (fileName, reportExt) => { - const baselineFolder = path.resolve(REPORTS_FOLDER, 'baseline'); - const fullPath = path.resolve(baselineFolder, `${fileName}.${reportExt}`); - log.debug(`getBaselineReportPath (${fullPath})`); - return fullPath; - }; - - this.timeout(300000); - - await PageObjects.common.navigateToApp('dashboard'); - await PageObjects.dashboard.loadSavedDashboard('Ecom Dashboard'); - await PageObjects.reporting.openPngReportingPanel(); - await PageObjects.reporting.forceSharedItemsContainerSize({ width: 1405 }); - await PageObjects.reporting.clickGenerateReportButton(); - await PageObjects.reporting.removeForceSharedItemsContainerSize(); - - const url = await PageObjects.reporting.getReportURL(60000); - const reportData = await PageObjects.reporting.getRawPdfReportData(url); - const reportFileName = 'dashboard_preserve_layout'; - const sessionReportPath = await writeSessionReport(reportFileName, reportData, 'png'); - const percentSimilar = await checkIfPngsMatch( - sessionReportPath, - getBaselineReportPath(reportFileName, 'png'), - config.get('screenshots.directory'), - log - ); - - expect(percentSimilar).to.be.lessThan(0.1); - }); - }); - }); - - describe('Discover', () => { - before('initialize tests', async () => { - log.debug('ReportingPage:initTests'); - await esArchiver.loadIfNeeded('reporting/ecommerce'); - await browser.setWindowSize(1600, 850); - }); - after('clean up archives', async () => { - await esArchiver.unload('reporting/ecommerce'); - }); - - describe('Generate CSV button', () => { - beforeEach(() => PageObjects.common.navigateToApp('discover')); - - it('is not available if new', async () => { - await PageObjects.reporting.openCsvReportingPanel(); - expect(await PageObjects.reporting.isGenerateReportButtonDisabled()).to.be('true'); - }); - - it('becomes available when saved', async () => { - await PageObjects.discover.saveSearch('my search - expectEnabledGenerateReportButton'); - await PageObjects.reporting.openCsvReportingPanel(); - expect(await PageObjects.reporting.isGenerateReportButtonDisabled()).to.be(null); - }); - - it('becomes available/not available when a saved search is created, changed and saved again', async () => { - // create new search, csv export is not available - await PageObjects.discover.clickNewSearchButton(); - await PageObjects.reporting.openCsvReportingPanel(); - expect(await PageObjects.reporting.isGenerateReportButtonDisabled()).to.be('true'); - // save search, csv export is available - await PageObjects.discover.saveSearch('my search - expectEnabledGenerateReportButton 2'); - await PageObjects.reporting.openCsvReportingPanel(); - expect(await PageObjects.reporting.isGenerateReportButtonDisabled()).to.be(null); - // add filter, csv export is not available - await filterBar.addFilter('currency', 'is', 'EUR'); - await PageObjects.reporting.openCsvReportingPanel(); - expect(await PageObjects.reporting.isGenerateReportButtonDisabled()).to.be('true'); - // save search again, csv export is available - await PageObjects.discover.saveSearch('my search - expectEnabledGenerateReportButton 2'); - await PageObjects.reporting.openCsvReportingPanel(); - expect(await PageObjects.reporting.isGenerateReportButtonDisabled()).to.be(null); - }); - - it('generates a report with data', async () => { - await PageObjects.discover.clickNewSearchButton(); - await PageObjects.reporting.setTimepickerInDataRange(); - await PageObjects.discover.saveSearch('my search - with data - expectReportCanBeCreated'); - await PageObjects.reporting.openCsvReportingPanel(); - expect(await PageObjects.reporting.canReportBeCreated()).to.be(true); - }); - - it('generates a report with no data', async () => { - await PageObjects.reporting.setTimepickerInNoDataRange(); - await PageObjects.discover.saveSearch('my search - no data - expectReportCanBeCreated'); - await PageObjects.reporting.openCsvReportingPanel(); - expect(await PageObjects.reporting.canReportBeCreated()).to.be(true); - }); - }); - }); - - describe('Visualize', () => { - before('initialize tests', async () => { - log.debug('ReportingPage:initTests'); - await esArchiver.loadIfNeeded('reporting/ecommerce'); - await esArchiver.loadIfNeeded('reporting/ecommerce_kibana'); - await browser.setWindowSize(1600, 850); - }); - after('clean up archives', async () => { - await esArchiver.unload('reporting/ecommerce'); - await esArchiver.unload('reporting/ecommerce_kibana'); - }); - - describe('Print PDF button', () => { - it('is not available if new', async () => { - await PageObjects.common.navigateToUrl('visualize', 'new'); - await PageObjects.visualize.clickAreaChart(); - await PageObjects.visualize.clickNewSearch('ecommerce'); - await PageObjects.reporting.openPdfReportingPanel(); - expect(await PageObjects.reporting.isGenerateReportButtonDisabled()).to.be('true'); - }); - - it('becomes available when saved', async () => { - await PageObjects.reporting.setTimepickerInDataRange(); - await PageObjects.visEditor.clickBucket('X-axis'); - await PageObjects.visEditor.selectAggregation('Date Histogram'); - await PageObjects.visEditor.clickGo(); - await PageObjects.visualize.saveVisualization('my viz'); - await PageObjects.reporting.openPdfReportingPanel(); - expect(await PageObjects.reporting.isGenerateReportButtonDisabled()).to.be(null); - }); - - it('downloaded PDF has OK status', async function() { - // Generating and then comparing reports can take longer than the default 60s timeout because the comparePngs - // function is taking about 15 seconds per comparison in jenkins. - this.timeout(180000); - - await PageObjects.common.navigateToApp('dashboard'); - await PageObjects.dashboard.loadSavedDashboard('Ecom Dashboard'); - await PageObjects.reporting.openPdfReportingPanel(); - await PageObjects.reporting.clickGenerateReportButton(); - - const url = await PageObjects.reporting.getReportURL(60000); - const res = await PageObjects.reporting.getResponse(url); - - expect(res.statusCode).to.equal(200); - expect(res.headers['content-type']).to.equal('application/pdf'); - }); - }); - }); - }); -} diff --git a/yarn.lock b/yarn.lock index f348aa99e6f20b..ee00ef283f07c0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4237,7 +4237,7 @@ resolved "https://registry.yarnpkg.com/@types/js-search/-/js-search-1.4.0.tgz#f2d4afa176a4fc7b17fb46a1593847887fa1fb7b" integrity sha1-8tSvoXak/HsX+0ahWThHiH+h+3s= -"@types/js-yaml@^3.11.1", "@types/js-yaml@^3.12.1": +"@types/js-yaml@^3.11.1": version "3.12.1" resolved "https://registry.yarnpkg.com/@types/js-yaml/-/js-yaml-3.12.1.tgz#5c6f4a1eabca84792fbd916f0cb40847f123c656" integrity sha512-SGGAhXLHDx+PK4YLNcNGa6goPf9XRWQNAUUbffkwVGGXIxmDKWyGGL4inzq2sPmExu431Ekb9aEMn9BkPqEYFA== @@ -6838,15 +6838,7 @@ axios@^0.18.0: follow-redirects "1.5.10" is-buffer "^2.0.2" -axios@^0.19.0: - version "0.19.0" - resolved "https://registry.yarnpkg.com/axios/-/axios-0.19.0.tgz#8e09bff3d9122e133f7b8101c8fbdd00ed3d2ab8" - integrity sha512-1uvKqKQta3KBxIz14F2v06AEHZ/dIoeKfbTRkK1E5oqjDnuEerLmYTgJB5AiQZHJcljpg1TuRzdjDR06qNk0DQ== - dependencies: - follow-redirects "1.5.10" - is-buffer "^2.0.2" - -axios@^0.19.2: +axios@^0.19.0, axios@^0.19.2: version "0.19.2" resolved "https://registry.yarnpkg.com/axios/-/axios-0.19.2.tgz#3ea36c5d8818d0d5f8a8a97a6d36b86cdc00cb27" integrity sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==