Fix path references into and out of x-pack/legacy

This commit is contained in:
Court Ewing 2019-06-18 18:13:00 -04:00
parent dbb0534c21
commit a973cbc7a9
206 changed files with 459 additions and 450 deletions

View file

@ -41,8 +41,8 @@ tar -cf "$HOME/.kibana/bootstrap_cache/$branch.tar" \
node_modules \
packages/*/node_modules \
x-pack/node_modules \
x-pack/plugins/*/node_modules \
x-pack/plugins/reporting/.chromium \
x-pack/legacy/plugins/*/node_modules \
x-pack/legacy/plugins/reporting/.chromium \
test/plugin_functional/plugins/*/node_modules \
.es \
.chromedriver \

View file

@ -25,17 +25,17 @@ bower_components
/packages/kbn-ui-framework/dist
/packages/kbn-ui-framework/doc_site/build
/packages/kbn-ui-framework/generator-kui/*/templates/
/x-pack/plugins/maps/public/vendor/**
/x-pack/legacy/plugins/maps/public/vendor/**
/x-pack/coverage
/x-pack/build
/x-pack/plugins/**/__tests__/fixtures/**
/x-pack/legacy/plugins/**/__tests__/fixtures/**
/packages/kbn-interpreter/src/common/lib/grammar.js
/x-pack/plugins/canvas/canvas_plugin
/x-pack/plugins/canvas/storybook
/x-pack/plugins/canvas/canvas_plugin_src/lib/flot-charts
/x-pack/plugins/infra/common/graphql/types.ts
/x-pack/plugins/infra/public/graphql/types.ts
/x-pack/plugins/infra/server/graphql/types.ts
/x-pack/legacy/plugins/canvas/canvas_plugin
/x-pack/legacy/plugins/canvas/storybook
/x-pack/legacy/plugins/canvas/canvas_plugin_src/lib/flot-charts
/x-pack/legacy/plugins/infra/common/graphql/types.ts
/x-pack/legacy/plugins/infra/public/graphql/types.ts
/x-pack/legacy/plugins/infra/server/graphql/types.ts
**/graphql/types.ts
**/*.js.snap
!/.eslintrc.js

View file

@ -53,8 +53,8 @@ module.exports = {
'packages/kbn-test/**/*',
'packages/kbn-eslint-import-resolver-kibana/**/*',
'src/legacy/server/saved_objects/**/*',
'x-pack/plugins/apm/**/*',
'x-pack/plugins/canvas/**/*',
'x-pack/legacy/plugins/apm/**/*',
'x-pack/legacy/plugins/canvas/**/*',
'**/*.{ts,tsx}',
'src/legacy/core_plugins/metrics/**/*.js',
],
@ -166,7 +166,7 @@ module.exports = {
{
files: [
'x-pack/test/functional/apps/**/*.js',
'x-pack/plugins/apm/**/*.js',
'x-pack/legacy/plugins/apm/**/*.js',
'test/*/config.ts',
'test/visual_regression/tests/**/*',
'x-pack/test/visual_regression/tests/**/*',
@ -205,12 +205,15 @@ module.exports = {
forceNode: false,
rootPackageName: 'kibana',
kibanaPath: '.',
pluginMap: readdirSync(resolve(__dirname, 'x-pack/plugins')).reduce((acc, name) => {
if (!name.startsWith('_')) {
acc[name] = `x-pack/plugins/${name}`;
}
return acc;
}, {}),
pluginMap: readdirSync(resolve(__dirname, 'x-pack/legacy/plugins')).reduce(
(acc, name) => {
if (!name.startsWith('_')) {
acc[name] = `x-pack/legacy/plugins/${name}`;
}
return acc;
},
{}
),
},
},
},
@ -253,7 +256,7 @@ module.exports = {
'x-pack/**/*.test.js',
'x-pack/test_utils/**/*',
'x-pack/gulpfile.js',
'x-pack/plugins/apm/public/utils/testHelpers.js',
'x-pack/legacy/plugins/apm/public/utils/testHelpers.js',
],
rules: {
'import/no-extraneous-dependencies': [
@ -361,7 +364,7 @@ module.exports = {
* APM overrides
*/
{
files: ['x-pack/plugins/apm/**/*.js'],
files: ['x-pack/legacy/plugins/apm/**/*.js'],
rules: {
'no-unused-vars': ['error', { ignoreRestSiblings: true }],
'no-console': ['warn', { allow: ['error'] }],
@ -372,7 +375,7 @@ module.exports = {
* GIS overrides
*/
{
files: ['x-pack/plugins/maps/**/*.js'],
files: ['x-pack/legacy/plugins/maps/**/*.js'],
rules: {
'react/prefer-stateless-function': [0, { ignorePureComponents: false }],
},
@ -382,7 +385,7 @@ module.exports = {
* Graph overrides
*/
{
files: ['x-pack/plugins/graph/**/*.js'],
files: ['x-pack/legacy/plugins/graph/**/*.js'],
globals: {
angular: true,
$: true,
@ -405,7 +408,7 @@ module.exports = {
* ML overrides
*/
{
files: ['x-pack/plugins/ml/**/*.js'],
files: ['x-pack/legacy/plugins/ml/**/*.js'],
rules: {
'no-shadow': 'error',
},
@ -416,7 +419,7 @@ module.exports = {
*/
{
// front end typescript and javascript files only
files: ['x-pack/plugins/siem/public/**/*.{js,ts,tsx}'],
files: ['x-pack/legacy/plugins/siem/public/**/*.{js,ts,tsx}'],
rules: {
'import/no-nodejs-modules': 'error',
'no-restricted-imports': [
@ -430,7 +433,7 @@ module.exports = {
},
{
// typescript only for front and back end
files: ['x-pack/plugins/siem/**/*.{ts,tsx}'],
files: ['x-pack/legacy/plugins/siem/**/*.{ts,tsx}'],
rules: {
// This will be turned on after bug fixes are complete
// '@typescript-eslint/explicit-member-accessibility': 'warn',
@ -464,7 +467,7 @@ module.exports = {
},
{
// typescript and javascript for front and back end
files: ['x-pack/plugins/siem/**/*.{js,ts,tsx}'],
files: ['x-pack/legacy/plugins/siem/**/*.{js,ts,tsx}'],
plugins: ['eslint-plugin-node', 'react'],
rules: {
'accessor-pairs': 'error',
@ -611,7 +614,7 @@ module.exports = {
* Monitoring overrides
*/
{
files: ['x-pack/plugins/monitoring/**/*.js'],
files: ['x-pack/legacy/plugins/monitoring/**/*.js'],
rules: {
'block-spacing': ['error', 'always'],
curly: ['error', 'all'],
@ -620,7 +623,7 @@ module.exports = {
},
},
{
files: ['x-pack/plugins/monitoring/public/**/*.js'],
files: ['x-pack/legacy/plugins/monitoring/public/**/*.js'],
env: { browser: true },
},
@ -628,7 +631,7 @@ module.exports = {
* Canvas overrides
*/
{
files: ['x-pack/plugins/canvas/**/*.js'],
files: ['x-pack/legacy/plugins/canvas/**/*.js'],
rules: {
radix: 'error',
curly: ['error', 'all'],
@ -674,12 +677,12 @@ module.exports = {
},
{
files: [
'x-pack/plugins/canvas/gulpfile.js',
'x-pack/plugins/canvas/scripts/*.js',
'x-pack/plugins/canvas/tasks/*.js',
'x-pack/plugins/canvas/tasks/**/*.js',
'x-pack/plugins/canvas/__tests__/**/*.js',
'x-pack/plugins/canvas/**/{__tests__,__test__,__jest__,__fixtures__,__mocks__}/**/*.js',
'x-pack/legacy/plugins/canvas/gulpfile.js',
'x-pack/legacy/plugins/canvas/scripts/*.js',
'x-pack/legacy/plugins/canvas/tasks/*.js',
'x-pack/legacy/plugins/canvas/tasks/**/*.js',
'x-pack/legacy/plugins/canvas/__tests__/**/*.js',
'x-pack/legacy/plugins/canvas/**/{__tests__,__test__,__jest__,__fixtures__,__mocks__}/**/*.js',
],
rules: {
'import/no-extraneous-dependencies': [
@ -692,7 +695,7 @@ module.exports = {
},
},
{
files: ['x-pack/plugins/canvas/canvas_plugin_src/**/*.js'],
files: ['x-pack/legacy/plugins/canvas/canvas_plugin_src/**/*.js'],
globals: { canvas: true, $: true },
rules: {
'import/no-unresolved': [
@ -704,13 +707,13 @@ module.exports = {
},
},
{
files: ['x-pack/plugins/canvas/public/**/*.js'],
files: ['x-pack/legacy/plugins/canvas/public/**/*.js'],
env: {
browser: true,
},
},
{
files: ['x-pack/plugins/canvas/canvas_plugin_src/lib/flot-charts/**/*.js'],
files: ['x-pack/legacy/plugins/canvas/canvas_plugin_src/lib/flot-charts/**/*.js'],
env: {
jquery: true,
},

View file

@ -23,42 +23,42 @@
"tagCloud": "src/legacy/core_plugins/tagcloud",
"tsvb": "src/legacy/core_plugins/metrics",
"kbnESQuery": "packages/kbn-es-query",
"xpack.apm": "x-pack/plugins/apm",
"xpack.beatsManagement": "x-pack/plugins/beats_management",
"xpack.canvas": "x-pack/plugins/canvas",
"xpack.code": "x-pack/plugins/code",
"xpack.crossClusterReplication": "x-pack/plugins/cross_cluster_replication",
"xpack.dashboardMode": "x-pack/plugins/dashboard_mode",
"xpack.fileUpload": "x-pack/plugins/file_upload",
"xpack.graph": "x-pack/plugins/graph",
"xpack.grokDebugger": "x-pack/plugins/grokdebugger",
"xpack.idxMgmt": "x-pack/plugins/index_management",
"xpack.indexLifecycleMgmt": "x-pack/plugins/index_lifecycle_management",
"xpack.infra": "x-pack/plugins/infra",
"xpack.kueryAutocomplete": "x-pack/plugins/kuery_autocomplete",
"xpack.licenseMgmt": "x-pack/plugins/license_management",
"xpack.maps": "x-pack/plugins/maps",
"xpack.ml": "x-pack/plugins/ml",
"xpack.logstash": "x-pack/plugins/logstash",
"xpack.main": "x-pack/plugins/xpack_main",
"xpack.telemetry": "x-pack/plugins/telemetry",
"xpack.monitoring": "x-pack/plugins/monitoring",
"xpack.remoteClusters": "x-pack/plugins/remote_clusters",
"xpack.reporting": "x-pack/plugins/reporting",
"xpack.rollupJobs": "x-pack/plugins/rollup",
"xpack.searchProfiler": "x-pack/plugins/searchprofiler",
"xpack.siem": "x-pack/plugins/siem",
"xpack.security": "x-pack/plugins/security",
"xpack.server": "x-pack/server",
"xpack.snapshotRestore": "x-pack/plugins/snapshot_restore",
"xpack.spaces": "x-pack/plugins/spaces",
"xpack.upgradeAssistant": "x-pack/plugins/upgrade_assistant",
"xpack.uptime": "x-pack/plugins/uptime",
"xpack.watcher": "x-pack/plugins/watcher"
"xpack.apm": "x-pack/legacy/plugins/apm",
"xpack.beatsManagement": "x-pack/legacy/plugins/beats_management",
"xpack.canvas": "x-pack/legacy/plugins/canvas",
"xpack.code": "x-pack/legacy/plugins/code",
"xpack.crossClusterReplication": "x-pack/legacy/plugins/cross_cluster_replication",
"xpack.dashboardMode": "x-pack/legacy/plugins/dashboard_mode",
"xpack.fileUpload": "x-pack/legacy/plugins/file_upload",
"xpack.graph": "x-pack/legacy/plugins/graph",
"xpack.grokDebugger": "x-pack/legacy/plugins/grokdebugger",
"xpack.idxMgmt": "x-pack/legacy/plugins/index_management",
"xpack.indexLifecycleMgmt": "x-pack/legacy/plugins/index_lifecycle_management",
"xpack.infra": "x-pack/legacy/plugins/infra",
"xpack.kueryAutocomplete": "x-pack/legacy/plugins/kuery_autocomplete",
"xpack.licenseMgmt": "x-pack/legacy/plugins/license_management",
"xpack.maps": "x-pack/legacy/plugins/maps",
"xpack.ml": "x-pack/legacy/plugins/ml",
"xpack.logstash": "x-pack/legacy/plugins/logstash",
"xpack.main": "x-pack/legacy/plugins/xpack_main",
"xpack.telemetry": "x-pack/legacy/plugins/telemetry",
"xpack.monitoring": "x-pack/legacy/plugins/monitoring",
"xpack.remoteClusters": "x-pack/legacy/plugins/remote_clusters",
"xpack.reporting": "x-pack/legacy/plugins/reporting",
"xpack.rollupJobs": "x-pack/legacy/plugins/rollup",
"xpack.searchProfiler": "x-pack/legacy/plugins/searchprofiler",
"xpack.siem": "x-pack/legacy/plugins/siem",
"xpack.security": "x-pack/legacy/plugins/security",
"xpack.server": "x-pack/legacy/server",
"xpack.snapshotRestore": "x-pack/legacy/plugins/snapshot_restore",
"xpack.spaces": "x-pack/legacy/plugins/spaces",
"xpack.upgradeAssistant": "x-pack/legacy/plugins/upgrade_assistant",
"xpack.uptime": "x-pack/legacy/plugins/uptime",
"xpack.watcher": "x-pack/legacy/plugins/watcher"
},
"exclude": ["src/legacy/ui/ui_render/ui_render_mixin.js"],
"translations": [
"x-pack/plugins/translations/translations/zh-CN.json",
"x-pack/plugins/translations/translations/ja-JP.json"
"x-pack/legacy/plugins/translations/translations/zh-CN.json",
"x-pack/legacy/plugins/translations/translations/ja-JP.json"
]
}

View file

@ -4,8 +4,8 @@ files:
- 'src/legacy/core_plugins/timelion/**/*.s+(a|c)ss'
- 'src/legacy/ui/public/query_bar/**/*.s+(a|c)ss'
- 'src/legacy/ui/public/vislib/**/*.s+(a|c)ss'
- 'x-pack/plugins/rollup/**/*.s+(a|c)ss'
- 'x-pack/plugins/security/**/*.s+(a|c)ss'
- 'x-pack/legacy/plugins/rollup/**/*.s+(a|c)ss'
- 'x-pack/legacy/plugins/security/**/*.s+(a|c)ss'
rules:
quotes:
- 2

View file

@ -9,7 +9,7 @@ To convert existing code over to TypeScript:
### How to fix common TypeScript errors
The first thing that will probably happen when you convert a `.js` file in our system to `.ts` is that some imports will be lacking types.
The first thing that will probably happen when you convert a `.js` file in our system to `.ts` is that some imports will be lacking types.
#### EUI component is missing types
@ -59,7 +59,7 @@ declare module '@elastic/eui' {
#### Internal dependency is missing types.
1. Open up the file and see how easy it would be to convert to TypeScript.
1. Open up the file and see how easy it would be to convert to TypeScript.
2. If it's very straightforward, go for it.
3. If it's not and you wish to stay focused on your own PR, get around the error by adding a type definition file in the same folder as the dependency, with the same name.
4. Minimally you will need to type what you are using in your PR. No need to go crazy to fully type the thing or you might be there for awhile depending on what's available.
@ -101,7 +101,7 @@ export { metadata };
`yarn add -D @types/markdown-it@8.4.1`
Use the version number that we have installed in package.json. This may not always work, and you might get something like:
Use the version number that we have installed in package.json. This may not always work, and you might get something like:
`Please choose a version of "@types/markdown-it" from this list:`
@ -110,12 +110,12 @@ If that happens, just pick the closest one.
If yarn doesn't find the module it may not have types. For example, our `rison_node` package doesn't have types. In this case you have a few options:
1. Contribute types into the DefinitelyTyped repo itself, or
2. Create a top level `types` folder and point to that in the tsconfig. For example, Infra team already handled this for `rison_node` and added: `x-pack/plugins/infra/types/rison_node.d.ts`. Other code uses it too so we will need to pull it up. Or,
2. Create a top level `types` folder and point to that in the tsconfig. For example, Infra team already handled this for `rison_node` and added: `x-pack/legacy/plugins/infra/types/rison_node.d.ts`. Other code uses it too so we will need to pull it up. Or,
3. Add a `// @ts-ignore` line above the import. This should be used minimally, the above options are better. However, sometimes you have to resort to this method.
### TypeScripting react files
React has it's own concept of runtime types via `proptypes`. TypeScript gives you compile time types so I prefer those.
React has it's own concept of runtime types via `proptypes`. TypeScript gives you compile time types so I prefer those.
Before:
```jsx
@ -126,12 +126,12 @@ import PropTypes from 'prop-types';
state = {
buttonWasClicked = false
};
render() {
return <button onClick={() => setState({ buttonWasClicked: true })}>{this.props.text}</button>
}
}
Button.proptypes = {
text: PropTypes.string,
}
@ -152,7 +152,7 @@ interface State {
state = {
buttonWasClicked = false
};
render() {
return <button onClick={() => setState({ buttonWasClicked: true })}>{this.props.text}</button>
}
@ -197,7 +197,7 @@ function ({ title, description }: Options) {
...
}
```
## Use `any` as little as possible
Using any is sometimes valid, but should rarely be used, even if to make quicker progress. Even `Unknown` is better than using `any` if you aren't sure of an input parameter.

View file

@ -22,7 +22,7 @@ init(server) {
-----------
===== Feature details
Registering a feature consists of the following fields. For more information, consult the {repo}blob/{branch}/x-pack/plugins/xpack_main/server/lib/feature_registry/feature_registry.ts[feature registry interface].
Registering a feature consists of the following fields. For more information, consult the {repo}blob/{branch}/x-pack/legacy/plugins/xpack_main/server/lib/feature_registry/feature_registry.ts[feature registry interface].
[cols="1a, 1a, 1a, 1a"]
@ -45,7 +45,7 @@ Registering a feature consists of the following fields. For more information, co
|An array of applications this feature enables. Typically, all of your plugins apps (from `uiExports`) will be included here.
|`privileges` (required)
|{repo}blob/{branch}/x-pack/plugins/xpack_main/server/lib/feature_registry/feature_registry.ts[`FeatureWithAllOrReadPrivileges`].
|{repo}blob/{branch}/x-pack/legacy/plugins/xpack_main/server/lib/feature_registry/feature_registry.ts[`FeatureWithAllOrReadPrivileges`].
|see examples below
|The set of privileges this feature requires to function.
@ -63,7 +63,7 @@ Registering a feature consists of the following fields. For more information, co
===== Privilege definition
The `privileges` section of feature registration allows plugins to implement read/write and read-only modes for their applications.
For a full explanation of fields and options, consult the {repo}blob/{branch}/x-pack/plugins/xpack_main/server/lib/feature_registry/feature_registry.ts[feature registry interface].
For a full explanation of fields and options, consult the {repo}blob/{branch}/x-pack/legacy/plugins/xpack_main/server/lib/feature_registry/feature_registry.ts[feature registry interface].
==== Using UI Capabilities
@ -113,7 +113,7 @@ init(server) {
-----------
This shows how the Canvas application might register itself as a Kibana feature.
Note that it specifies different `savedObject` access levels for each privilege:
Note that it specifies different `savedObject` access levels for each privilege:
- Users with read/write access (`all` privilege) need to be able to read/write `canvas-workpad` saved objects, and they need read-only access to `index-pattern` saved objects.
- Users with read-only access (`read` privilege) do not need to have read/write access to any saved objects, but instead get read-only access to `index-pattern` and `canvas-workpad` saved objects.

View file

@ -50,7 +50,7 @@
"test:ui:runner": "node scripts/functional_test_runner",
"test:server": "grunt test:server",
"test:coverage": "grunt test:coverage",
"typespec": "typings-tester --config x-pack/plugins/canvas/public/lib/aeroelastic/tsconfig.json x-pack/plugins/canvas/public/lib/aeroelastic/__fixtures__/typescript/typespec_tests.ts",
"typespec": "typings-tester --config x-pack/legacy/plugins/canvas/public/lib/aeroelastic/tsconfig.json x-pack/legacy/plugins/canvas/public/lib/aeroelastic/__fixtures__/typescript/typespec_tests.ts",
"checkLicenses": "node scripts/check_licenses --dev",
"build": "node scripts/build --all-platforms",
"start": "node --trace-warnings --trace-deprecation scripts/kibana --dev ",
@ -86,7 +86,7 @@
"packages": [
"packages/*",
"x-pack",
"x-pack/plugins/*",
"x-pack/legacy/plugins/*",
"test/plugin_functional/plugins/*",
"test/interpreter_functional/plugins/*"
],

View file

@ -39,8 +39,8 @@ module.exports = {
//
// See https://github.com/babel/babel/issues/8244#issuecomment-466548733
test: [
/x-pack[\/\\]plugins[\/\\]infra[\/\\].*[\/\\]graphql/,
/x-pack[\/\\]plugins[\/\\]siem[\/\\].*[\/\\]graphql/,
/x-pack[\/\\]legacy[\/\\]plugins[\/\\]infra[\/\\].*[\/\\]graphql/,
/x-pack[\/\\]legacy[\/\\]plugins[\/\\]siem[\/\\].*[\/\\]graphql/,
],
plugins: [[require.resolve('babel-plugin-typescript-strip-namespaces')]],
},

View file

@ -33,7 +33,7 @@ For example:
src/legacy/core_plugins/kibana/translations/fr.json
```
The engine scans `x-pack/plugins/*/translations`, `src/core_plugins/*/translations`, `plugins/*/translations` and `src/legacy/ui/translations` folders on initialization, so there is no need to register translation files.
The engine scans `x-pack/legacy/plugins/*/translations`, `src/core_plugins/*/translations`, `plugins/*/translations` and `src/legacy/ui/translations` folders on initialization, so there is no need to register translation files.
The engine uses a `config/kibana.yml` file for locale resolution process. If locale is
defined via `i18n.locale` option in `config/kibana.yml` then it will be used as a base

View file

@ -17621,7 +17621,7 @@ function getProjectPaths(rootPath, options = {}) {
if (!ossOnly) {
projectPaths.push(Object(path__WEBPACK_IMPORTED_MODULE_0__["resolve"])(rootPath, 'x-pack'));
projectPaths.push(Object(path__WEBPACK_IMPORTED_MODULE_0__["resolve"])(rootPath, 'x-pack/plugins/*'));
projectPaths.push(Object(path__WEBPACK_IMPORTED_MODULE_0__["resolve"])(rootPath, 'x-pack/legacy/plugins/*'));
}
if (!skipKibanaPlugins) {

View file

@ -47,7 +47,7 @@ export function getProjectPaths(rootPath: string, options: IProjectPathOptions =
if (!ossOnly) {
projectPaths.push(resolve(rootPath, 'x-pack'));
projectPaths.push(resolve(rootPath, 'x-pack/plugins/*'));
projectPaths.push(resolve(rootPath, 'x-pack/legacy/plugins/*'));
}
if (!skipKibanaPlugins) {

View file

@ -116,7 +116,7 @@ export default class ClusterManager {
resolve(path, 'target'),
resolve(path, 'scripts'),
resolve(path, 'docs'),
resolve(path, 'x-pack/plugins/canvas/canvas_plugin_src') // prevents server from restarting twice for Canvas plugin changes
resolve(path, 'x-pack/legacy/plugins/canvas/canvas_plugin_src') // prevents server from restarting twice for Canvas plugin changes
),
[]
);
@ -168,9 +168,9 @@ export default class ClusterManager {
fromRoot('src/legacy/server'),
fromRoot('src/legacy/ui'),
fromRoot('src/legacy/utils'),
fromRoot('x-pack/common'),
fromRoot('x-pack/plugins'),
fromRoot('x-pack/server'),
fromRoot('x-pack/legacy/common'),
fromRoot('x-pack/legacy/plugins'),
fromRoot('x-pack/legacy/server'),
fromRoot('config'),
...extraPaths,
].map(path => resolve(path));

View file

@ -204,7 +204,7 @@ export const CleanExtraBrowsersTask = {
async run(config, log, build) {
const getBrowserPathsForPlatform = platform => {
const reportingDir = 'x-pack/plugins/reporting';
const reportingDir = 'x-pack/legacy/plugins/reporting';
const chromiumDir = '.chromium';
const chromiumPath = p =>
build.resolvePathForPlatform(platform, reportingDir, chromiumDir, p);

View file

@ -19,7 +19,7 @@
import { scanCopy, untar, deleteAll } from '../lib';
import { createWriteStream } from 'fs';
import { binaryInfo } from '../../../../x-pack/plugins/code/tasks/nodegit_info';
import { binaryInfo } from '../../../../x-pack/legacy/plugins/code/tasks/nodegit_info';
import wreck from '@hapi/wreck';
import mkdirp from 'mkdirp';
import { dirname, join, basename } from 'path';

View file

@ -1,15 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<testsuites name="jest" timestamp="2019-06-07T03:36:23" time="781.292" tests="5487" skipped="9">
<testsuite name="x-pack/plugins/code/server/lsp/abstract_launcher.test.ts" timestamp="2019-06-07T03:42:21" time="14.504" tests="5" failures="1" skipped="0" file="/var/lib/jenkins/workspace/elastic+kibana+master/JOB/x-pack-intake/node/immutable/kibana/x-pack/plugins/code/server/lsp/abstract_launcher.test.ts">
<testcase classname="X-Pack Jest Tests.x-pack/plugins/code/server/lsp" name="launcher can start and end a process" time="1.316"/>
<testcase classname="X-Pack Jest Tests.x-pack/plugins/code/server/lsp" name="launcher can force kill the process if langServer can not exit" time="3.182"/>
<testcase classname="X-Pack Jest Tests.x-pack/plugins/code/server/lsp" name="launcher can reconnect if process died" time="7.060">
<testsuite name="x-pack/legacy/plugins/code/server/lsp/abstract_launcher.test.ts" timestamp="2019-06-07T03:42:21" time="14.504" tests="5" failures="1" skipped="0" file="/var/lib/jenkins/workspace/elastic+kibana+master/JOB/x-pack-intake/node/immutable/kibana/x-pack/legacy/plugins/code/server/lsp/abstract_launcher.test.ts">
<testcase classname="X-Pack Jest Tests.x-pack/legacy/plugins/code/server/lsp" name="launcher can start and end a process" time="1.316"/>
<testcase classname="X-Pack Jest Tests.x-pack/legacy/plugins/code/server/lsp" name="launcher can force kill the process if langServer can not exit" time="3.182"/>
<testcase classname="X-Pack Jest Tests.x-pack/legacy/plugins/code/server/lsp" name="launcher can reconnect if process died" time="7.060">
<failure>
<![CDATA[TypeError: Cannot read property '0' of undefined
at Object.<anonymous>.test (/var/lib/jenkins/workspace/elastic+kibana+master/JOB/x-pack-intake/node/immutable/kibana/x-pack/plugins/code/server/lsp/abstract_launcher.test.ts:166:10)]]>
at Object.<anonymous>.test (/var/lib/jenkins/workspace/elastic+kibana+master/JOB/x-pack-intake/node/immutable/kibana/x-pack/legacy/plugins/code/server/lsp/abstract_launcher.test.ts:166:10)]]>
</failure>
</testcase>
<testcase classname="X-Pack Jest Tests.x-pack/plugins/code/server/lsp" name="passive launcher can start and end a process" time="0.435"/>
<testcase classname="X-Pack Jest Tests.x-pack/plugins/code/server/lsp" name="passive launcher should restart a process if a process died before connected" time="1.502"/>
<testcase classname="X-Pack Jest Tests.x-pack/legacy/plugins/code/server/lsp" name="passive launcher can start and end a process" time="0.435"/>
<testcase classname="X-Pack Jest Tests.x-pack/legacy/plugins/code/server/lsp" name="passive launcher should restart a process if a process died before connected" time="1.502"/>
</testsuite>
</testsuites>

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<testsuites>
<testsuite timestamp="2019-06-13T23:29:36" time="30.739" tests="1444" failures="2" skipped="3">
<testcase name="code in multiple nodes &quot;before all&quot; hook" classname="X-Pack Mocha Tests.x-pack/plugins/code/server/__tests__/multi_node·ts" time="0.121">
<testcase name="code in multiple nodes &quot;before all&quot; hook" classname="X-Pack Mocha Tests.x-pack/legacy/plugins/code/server/__tests__/multi_node·ts" time="0.121">
<system-out>
<![CDATA[]]>
</system-out>
@ -19,7 +19,7 @@
at process._tickCallback (internal/process/next_tick.js:68:7)]]>
</failure>
</testcase>
<testcase name="code in multiple nodes &quot;after all&quot; hook" classname="X-Pack Mocha Tests.x-pack/plugins/code/server/__tests__/multi_node·ts" time="0.003">
<testcase name="code in multiple nodes &quot;after all&quot; hook" classname="X-Pack Mocha Tests.x-pack/legacy/plugins/code/server/__tests__/multi_node·ts" time="0.003">
<system-out>
<![CDATA[]]>
</system-out>
@ -29,7 +29,7 @@
at process.topLevelDomainCallback (domain.js:120:23)]]>
</failure>
</testcase>
<testcase name="repository service test can not clone a repo by ssh without a key" classname="X-Pack Mocha Tests.x-pack/plugins/code/server/__tests__/repository_service·ts" time="0.005">
<testcase name="repository service test can not clone a repo by ssh without a key" classname="X-Pack Mocha Tests.x-pack/legacy/plugins/code/server/__tests__/repository_service·ts" time="0.005">
<system-out>
<![CDATA[]]>
</system-out>

View file

@ -50,10 +50,10 @@ Array [
expect(failures).toMatchInlineSnapshot(`
Array [
Object {
"classname": "X-Pack Jest Tests.x-pack/plugins/code/server/lsp",
"classname": "X-Pack Jest Tests.x-pack/legacy/plugins/code/server/lsp",
"failure": "
TypeError: Cannot read property '0' of undefined
at Object.<anonymous>.test (/var/lib/jenkins/workspace/elastic+kibana+master/JOB/x-pack-intake/node/immutable/kibana/x-pack/plugins/code/server/lsp/abstract_launcher.test.ts:166:10)
at Object.<anonymous>.test (/var/lib/jenkins/workspace/elastic+kibana+master/JOB/x-pack-intake/node/immutable/kibana/x-pack/legacy/plugins/code/server/lsp/abstract_launcher.test.ts:166:10)
",
"name": "launcher can reconnect if process died",
"time": "7.060",
@ -120,7 +120,7 @@ Wait timed out after 10055ms
expect(console.log.mock.calls).toMatchInlineSnapshot(`
Array [
Array [
"Ignoring likely irrelevant failure: X-Pack Mocha Tests.x-pack/plugins/code/server/__tests__/multi_node·ts - code in multiple nodes \\"before all\\" hook
"Ignoring likely irrelevant failure: X-Pack Mocha Tests.x-pack/legacy/plugins/code/server/__tests__/multi_node·ts - code in multiple nodes \\"before all\\" hook
Error: Unable to read artifact info from https://artifacts-api.elastic.co/v1/versions/8.0.0-SNAPSHOT/builds/latest/projects/elasticsearch: Service Temporarily Unavailable
<html>
@ -136,7 +136,7 @@ Array [
",
],
Array [
"Ignoring likely irrelevant failure: X-Pack Mocha Tests.x-pack/plugins/code/server/__tests__/multi_node·ts - code in multiple nodes \\"after all\\" hook
"Ignoring likely irrelevant failure: X-Pack Mocha Tests.x-pack/legacy/plugins/code/server/__tests__/multi_node·ts - code in multiple nodes \\"after all\\" hook
TypeError: Cannot read property 'shutdown' of undefined
at Context.shutdown (plugins/code/server/__tests__/multi_node.ts:125:23)

View file

@ -175,11 +175,11 @@ The tool throws an exception if `formats` object is missing in locale file.
### Usage
```bash
node scripts/i18n_integrate --source path/to/locale.json --target x-pack/plugins/translations/translations/locale.json
node scripts/i18n_integrate --source path/to/locale.json --target x-pack/legacy/plugins/translations/translations/locale.json
```
* `--source` path to the JSON file with translations that should be integrated.
* `--target` defines a single path to the JSON file where translations should be integrated to, path mappings from
* `--target` defines a single path to the JSON file where translations should be integrated to, path mappings from
[.i18nrc.json](../../../.i18nrc.json) are ignored in this case. It's currently used for integrating of Kibana built-in
translations that are located in a single JSON file within `x-pack/translations` plugin.
* `--dry-run` tells the tool to exit after verification phase and not write translations to the disk.

View file

@ -35,16 +35,16 @@ export const IGNORE_FILE_GLOBS = [
'**/Gruntfile.js',
'tasks/config/**/*',
'**/{Dockerfile,docker-compose.yml}',
'x-pack/plugins/apm/**/*',
'x-pack/plugins/canvas/tasks/**/*',
'x-pack/plugins/canvas/canvas_plugin_src/**/*',
'x-pack/legacy/plugins/apm/**/*',
'x-pack/legacy/plugins/canvas/tasks/**/*',
'x-pack/legacy/plugins/canvas/canvas_plugin_src/**/*',
'**/.*',
'**/{webpackShims,__mocks__}/**/*',
'x-pack/docs/**/*',
'src/legacy/ui/public/assets/fonts/**/*',
// Files in this directory must match a pre-determined name in some cases.
'x-pack/plugins/canvas/.storybook/*',
'x-pack/legacy/plugins/canvas/.storybook/*',
// filename must match language code which requires capital letters
'**/translations/*.json',
@ -159,23 +159,23 @@ export const TEMPORARILY_IGNORED_PATHS = [
'webpackShims/elasticsearch-browser.js',
'webpackShims/moment-timezone.js',
'webpackShims/ui-bootstrap.js',
'x-pack/plugins/graph/public/graphClientWorkspace.js',
'x-pack/plugins/graph/public/angular-venn-simple.js',
'x-pack/plugins/index_management/public/lib/editSettings.js',
'x-pack/plugins/license_management/public/store/reducers/licenseManagement.js',
'x-pack/plugins/monitoring/public/components/sparkline/__mocks__/plugins/xpack_main/jquery_flot.js',
'x-pack/plugins/ml/public/jobs/new_job/simple/components/watcher/email-influencers.html',
'x-pack/plugins/monitoring/public/icons/alert-blue.svg',
'x-pack/plugins/monitoring/public/icons/health-gray.svg',
'x-pack/plugins/monitoring/public/icons/health-green.svg',
'x-pack/plugins/monitoring/public/icons/health-red.svg',
'x-pack/plugins/monitoring/public/icons/health-yellow.svg',
'x-pack/plugins/reporting/export_types/printable_pdf/server/lib/pdf/assets/fonts/noto/NotoSansCJKtc-Medium.ttf',
'x-pack/plugins/reporting/export_types/printable_pdf/server/lib/pdf/assets/fonts/noto/NotoSansCJKtc-Regular.ttf',
'x-pack/plugins/reporting/export_types/printable_pdf/server/lib/pdf/assets/fonts/roboto/Roboto-Italic.ttf',
'x-pack/plugins/reporting/export_types/printable_pdf/server/lib/pdf/assets/fonts/roboto/Roboto-Medium.ttf',
'x-pack/plugins/reporting/export_types/printable_pdf/server/lib/pdf/assets/fonts/roboto/Roboto-Regular.ttf',
'x-pack/plugins/reporting/export_types/printable_pdf/server/lib/pdf/assets/img/logo-grey.png',
'x-pack/legacy/plugins/graph/public/graphClientWorkspace.js',
'x-pack/legacy/plugins/graph/public/angular-venn-simple.js',
'x-pack/legacy/plugins/index_management/public/lib/editSettings.js',
'x-pack/legacy/plugins/license_management/public/store/reducers/licenseManagement.js',
'x-pack/legacy/plugins/monitoring/public/components/sparkline/__mocks__/plugins/xpack_main/jquery_flot.js',
'x-pack/legacy/plugins/ml/public/jobs/new_job/simple/components/watcher/email-influencers.html',
'x-pack/legacy/plugins/monitoring/public/icons/alert-blue.svg',
'x-pack/legacy/plugins/monitoring/public/icons/health-gray.svg',
'x-pack/legacy/plugins/monitoring/public/icons/health-green.svg',
'x-pack/legacy/plugins/monitoring/public/icons/health-red.svg',
'x-pack/legacy/plugins/monitoring/public/icons/health-yellow.svg',
'x-pack/legacy/plugins/reporting/export_types/printable_pdf/server/lib/pdf/assets/fonts/noto/NotoSansCJKtc-Medium.ttf',
'x-pack/legacy/plugins/reporting/export_types/printable_pdf/server/lib/pdf/assets/fonts/noto/NotoSansCJKtc-Regular.ttf',
'x-pack/legacy/plugins/reporting/export_types/printable_pdf/server/lib/pdf/assets/fonts/roboto/Roboto-Italic.ttf',
'x-pack/legacy/plugins/reporting/export_types/printable_pdf/server/lib/pdf/assets/fonts/roboto/Roboto-Medium.ttf',
'x-pack/legacy/plugins/reporting/export_types/printable_pdf/server/lib/pdf/assets/fonts/roboto/Roboto-Regular.ttf',
'x-pack/legacy/plugins/reporting/export_types/printable_pdf/server/lib/pdf/assets/img/logo-grey.png',
'x-pack/test/functional/es_archives/monitoring/beats-with-restarted-instance/data.json.gz',
'x-pack/test/functional/es_archives/monitoring/beats-with-restarted-instance/mappings.json',
'x-pack/test/functional/es_archives/monitoring/logstash-pipelines/data.json.gz',

View file

@ -19,7 +19,7 @@ echo ""
echo " -> Running SIEM cyclic dependency test"
cd "$XPACK_DIR"
checks-reporter-with-killswitch "X-Pack SIEM cyclic dependency test" node plugins/siem/scripts/check_circular_deps
checks-reporter-with-killswitch "X-Pack SIEM cyclic dependency test" node legacy/plugins/siem/scripts/check_circular_deps
echo ""
echo ""

8
x-pack/.gitignore vendored
View file

@ -4,14 +4,14 @@
/test/functional/failure_debug
/test/functional/screenshots
/test/functional/apps/reporting/reports/session
/plugins/reporting/.chromium/
/plugins/reporting/.phantom/
/legacy/plugins/reporting/.chromium/
/legacy/plugins/reporting/.phantom/
/.aws-config.json
/.env
/.kibana-plugin-helpers.dev.*
!/plugins/infra/**/target
!/legacy/plugins/infra/**/target
.cache
!/plugins/siem/**/target
!/legacy/plugins/siem/**/target
# We don't want any yarn.lock files in here
/yarn.lock

View file

@ -1,8 +1,8 @@
{
"serverTestPatterns": [
"server/**/__tests__/**/*.js",
"plugins/**/__tests__/**/*.js",
"!plugins/**/server/**/__tests__/**/*"
"legacy/server/**/__tests__/**/*.js",
"legacy/plugins/**/__tests__/**/*.js",
"!legacy/plugins/**/server/**/__tests__/**/*"
],
"buildSourcePatterns": [
"LICENSE.txt",
@ -11,11 +11,11 @@
"yarn.lock",
"tsconfig.json",
"index.js",
"plugins/reporting/.phantom/*",
"plugins/reporting/.chromium/*",
"common/**/*",
"plugins/**/*",
"server/**/*",
"legacy/plugins/reporting/.phantom/*",
"legacy/plugins/reporting/.chromium/*",
"legacy/common/**/*",
"legacy/plugins/**/*",
"legacy/server/**/*",
"typings/**/*",
"webpackShims/*",
"!**/README.md",
@ -23,10 +23,10 @@
"!__tests__/**/*",
"!**/__tests__",
"!**/__tests__/**/*",
"!plugins/**/*.test.{js,ts}",
"!plugins/**/__snapshots__",
"!plugins/**/__snapshots__/*",
"!plugins/**/__mocks__/*"
"!legacy/plugins/**/*.test.{js,ts}",
"!legacy/plugins/**/__snapshots__",
"!legacy/plugins/**/__snapshots__/*",
"!legacy/plugins/**/__mocks__/*"
],
"skipInstallDependencies": true
}

View file

@ -110,7 +110,7 @@ To run the build, replace the sha in the following commands with the sha that yo
After the build completes, there will be a .zip file and a .md5 file in `~/chromium/chromium/src/out/headless`. These are named like so: `chromium-{first_7_of_SHA}-{platform}`, for example: `chromium-4747cc2-linux`.
The zip files need to be deployed to s3. For testing, I drop them into `headless-shell-dev`, but for production, they need to be in `headless-shell`. And the `x-pack/plugins/reporting/server/browsers/chromium/paths.js` file needs to be upated to have the correct `archiveChecksum`, `archiveFilename`, `rawChecksum` and `baseUrl`. Below is a list of what the archive's are:
The zip files need to be deployed to s3. For testing, I drop them into `headless-shell-dev`, but for production, they need to be in `headless-shell`. And the `x-pack/legacy/plugins/reporting/server/browsers/chromium/paths.js` file needs to be upated to have the correct `archiveChecksum`, `archiveFilename`, `rawChecksum` and `baseUrl`. Below is a list of what the archive's are:
- `archiveChecksum`: The contents of the `.md5` file, which is the `md5` checksum of the zip file.
- `rawChecksum`: The `md5` checksum of the `headless_shell` binary itself.

View file

@ -11,8 +11,8 @@ export function createJestConfig({
return {
rootDir: xPackKibanaDirectory,
roots: [
'<rootDir>/plugins',
'<rootDir>/server',
'<rootDir>/legacy/plugins',
'<rootDir>/legacy/server',
],
moduleFileExtensions: [
'js',
@ -23,7 +23,7 @@ export function createJestConfig({
moduleNameMapper: {
'^ui/(.*)': `${kibanaDirectory}/src/legacy/ui/public/$1`,
'^src/core/(.*)': `${kibanaDirectory}/src/core/$1`,
'^plugins/xpack_main/(.*);': `${xPackKibanaDirectory}/plugins/xpack_main/public/$1`,
'^plugins/xpack_main/(.*);': `${xPackKibanaDirectory}/legacy/plugins/xpack_main/public/$1`,
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
`${kibanaDirectory}/src/dev/jest/mocks/file_mock.js`,
'\\.(css|less|scss)$': `${kibanaDirectory}/src/dev/jest/mocks/style_mock.js`,

View file

@ -38,4 +38,4 @@ require('./tasks/dev')(gulp, gulpHelpers);
require('./tasks/prepare')(gulp, gulpHelpers);
require('./tasks/report')(gulp, gulpHelpers);
require('./tasks/test')(gulp, gulpHelpers);
require('./plugins/canvas/tasks')(gulp, gulpHelpers);
require('./legacy/plugins/canvas/tasks')(gulp, gulpHelpers);

View file

@ -4,45 +4,45 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { xpackMain } from './plugins/xpack_main';
import { graph } from './plugins/graph';
import { monitoring } from './plugins/monitoring';
import { reporting } from './plugins/reporting';
import { security } from './plugins/security';
import { searchprofiler } from './plugins/searchprofiler';
import { ml } from './plugins/ml';
import { tilemap } from './plugins/tilemap';
import { watcher } from './plugins/watcher';
import { grokdebugger } from './plugins/grokdebugger';
import { dashboardMode } from './plugins/dashboard_mode';
import { logstash } from './plugins/logstash';
import { beats } from './plugins/beats_management';
import { apm } from './plugins/apm';
import { code } from './plugins/code';
import { maps } from './plugins/maps';
import { licenseManagement } from './plugins/license_management';
import { cloud } from './plugins/cloud';
import { indexManagement } from './plugins/index_management';
import { indexLifecycleManagement } from './plugins/index_lifecycle_management';
import { consoleExtensions } from './plugins/console_extensions';
import { spaces } from './plugins/spaces';
import { notifications } from './plugins/notifications';
import { kueryAutocomplete } from './plugins/kuery_autocomplete';
import { canvas } from './plugins/canvas';
import { infra } from './plugins/infra';
import { taskManager } from './plugins/task_manager';
import { rollup } from './plugins/rollup';
import { siem } from './plugins/siem';
import { remoteClusters } from './plugins/remote_clusters';
import { crossClusterReplication } from './plugins/cross_cluster_replication';
import { translations } from './plugins/translations';
import { upgradeAssistant } from './plugins/upgrade_assistant';
import { uptime } from './plugins/uptime';
import { ossTelemetry } from './plugins/oss_telemetry';
import { fileUpload } from './plugins/file_upload';
import { telemetry } from './plugins/telemetry';
import { encryptedSavedObjects } from './plugins/encrypted_saved_objects';
import { snapshotRestore } from './plugins/snapshot_restore';
import { xpackMain } from './legacy/plugins/xpack_main';
import { graph } from './legacy/plugins/graph';
import { monitoring } from './legacy/plugins/monitoring';
import { reporting } from './legacy/plugins/reporting';
import { security } from './legacy/plugins/security';
import { searchprofiler } from './legacy/plugins/searchprofiler';
import { ml } from './legacy/plugins/ml';
import { tilemap } from './legacy/plugins/tilemap';
import { watcher } from './legacy/plugins/watcher';
import { grokdebugger } from './legacy/plugins/grokdebugger';
import { dashboardMode } from './legacy/plugins/dashboard_mode';
import { logstash } from './legacy/plugins/logstash';
import { beats } from './legacy/plugins/beats_management';
import { apm } from './legacy/plugins/apm';
import { code } from './legacy/plugins/code';
import { maps } from './legacy/plugins/maps';
import { licenseManagement } from './legacy/plugins/license_management';
import { cloud } from './legacy/plugins/cloud';
import { indexManagement } from './legacy/plugins/index_management';
import { indexLifecycleManagement } from './legacy/plugins/index_lifecycle_management';
import { consoleExtensions } from './legacy/plugins/console_extensions';
import { spaces } from './legacy/plugins/spaces';
import { notifications } from './legacy/plugins/notifications';
import { kueryAutocomplete } from './legacy/plugins/kuery_autocomplete';
import { canvas } from './legacy/plugins/canvas';
import { infra } from './legacy/plugins/infra';
import { taskManager } from './legacy/plugins/task_manager';
import { rollup } from './legacy/plugins/rollup';
import { siem } from './legacy/plugins/siem';
import { remoteClusters } from './legacy/plugins/remote_clusters';
import { crossClusterReplication } from './legacy/plugins/cross_cluster_replication';
import { translations } from './legacy/plugins/translations';
import { upgradeAssistant } from './legacy/plugins/upgrade_assistant';
import { uptime } from './legacy/plugins/uptime';
import { ossTelemetry } from './legacy/plugins/oss_telemetry';
import { fileUpload } from './legacy/plugins/file_upload';
import { telemetry } from './legacy/plugins/telemetry';
import { encryptedSavedObjects } from './legacy/plugins/encrypted_saved_objects';
import { snapshotRestore } from './legacy/plugins/snapshot_restore';
module.exports = function (kibana) {
return [

View file

@ -10,8 +10,8 @@ import { resolve } from 'path';
import {
InternalCoreSetup,
PluginInitializerContext
} from '../../../src/core/server';
import { LegacyPluginInitializer } from '../../../src/legacy/types';
} from '../../../../src/core/server';
import { LegacyPluginInitializer } from '../../../../src/legacy/types';
import mappings from './mappings.json';
import { plugin } from './server/new-platform/index';

View file

@ -18,12 +18,12 @@ Note: Run the following commands from `kibana/`.
### Prettier
```
yarn prettier "./x-pack/plugins/apm/**/*.{tsx,ts,js}" --write
yarn prettier "./x-pack/legacy/plugins/apm/**/*.{tsx,ts,js}" --write
```
### ESLint
```
yarn eslint ./x-pack/plugins/apm --fix
yarn eslint ./x-pack/legacy/plugins/apm --fix
```
### Ensure everything from master has been backported to 6.x

View file

@ -5,7 +5,7 @@
*/
import { InternalCoreSetup } from 'src/core/server';
import { getSavedObjectsClient } from '../helpers/saved_objects_client';
import apmIndexPattern from '../../../../../../src/legacy/core_plugins/kibana/server/tutorials/apm/index_pattern.json';
import apmIndexPattern from '../../../../../../../src/legacy/core_plugins/kibana/server/tutorials/apm/index_pattern.json';
export async function getIndexPattern(core: InternalCoreSetup) {
const { server } = core.http;

View file

@ -10,7 +10,7 @@ import { join, resolve } from 'path';
import { FlatObject } from '../../../frontend_types';
import { RestAPIAdapter } from './adapter_types';
const pkg = JSON.parse(
fs.readFileSync(resolve(join(__dirname, '../../../../../../../package.json'))).toString()
fs.readFileSync(resolve(join(__dirname, '../../../../../../../../package.json'))).toString()
);
let globalAPI: AxiosInstance;

View file

@ -1,5 +1,5 @@
{
"extends": "../../tsconfig.json",
"extends": "../../../tsconfig.json",
"exclude": ["**/node_modules/**"],
"paths": {
"react": ["../../../node_modules/@types/react"]

View file

@ -39,7 +39,7 @@ function loadStories() {
// Only gather and require CSS files related to Canvas. The other CSS files
// are built into the DLL.
const css = require.context(
'../../../../built_assets/css',
'../../../../../built_assets/css',
true,
/plugins\/(?=canvas).*light\.css/
);
@ -56,7 +56,7 @@ addParameters({
theme: create({
base: 'light',
brandTitle: 'Canvas Storybook',
brandUrl: 'https://github.com/elastic/kibana/tree/master/x-pack/plugins/canvas',
brandUrl: 'https://github.com/elastic/kibana/tree/master/x-pack/legacy/plugins/canvas',
}),
showPanel: true,
isFullscreen: false,

View file

@ -11,7 +11,7 @@
// Pull in the built CSS produced by the Kibana server, but not
// the Canvas CSS-- we want that in the HMR service.
const css = require.context(
'../../../../built_assets/css',
'../../../../../built_assets/css',
true,
/\.\/plugins\/(?!canvas).*light\.css/
);
@ -21,7 +21,7 @@ css.keys().forEach(filename => {
// Include Legacy styles
const uiStyles = require.context(
'../../../../src/legacy/ui/public/styles',
'../../../../../src/legacy/ui/public/styles',
false,
/[\/\\](?!mixins|variables|_|\.|bootstrap_(light|dark))[^\/\\]+\.less/
);

View file

@ -9,5 +9,5 @@ const path = require('path');
// Extend the Storybook Middleware to include a route to access Legacy UI assets
module.exports = function(router) {
router.get('/ui', serve(path.resolve(__dirname, '../../../../src/legacy/ui/public/assets')));
router.get('/ui', serve(path.resolve(__dirname, '../../../../../src/legacy/ui/public/assets')));
};

View file

@ -15,7 +15,7 @@
"paths": {
"layout/*": ["aeroelastic/*"]
},
"types": ["@kbn/x-pack/plugins/canvas/public/lib/aeroelastic"]
"types": ["@kbn/x-pack/legacy/plugins/canvas/public/lib/aeroelastic"]
},
"exclude": ["node_modules", "**/*.spec.ts", "node_modules/@types/mocha"]
}

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { trackUiMetric } from '../../../../../src/legacy/core_plugins/ui_metric/public';
import { trackUiMetric } from '../../../../../../src/legacy/core_plugins/ui_metric/public';
const APP = 'canvas';
export const trackCanvasUiMetric = uiMetrics => {

View file

@ -4,4 +4,4 @@
* you may not use this file except in compliance with the Elastic License.
*/
require('./_helpers').runKibanaScript('eslint', ['x-pack/plugins/canvas/**/*.{js,jsx}']);
require('./_helpers').runKibanaScript('eslint', ['x-pack/legacy/plugins/canvas/**/*.{js,jsx}']);

View file

@ -24,7 +24,7 @@ if (fs.existsSync(DLL_OUTPUT)) {
[
'webpack',
'--config',
'x-pack/plugins/canvas/.storybook/webpack.dll.config.js',
'x-pack/legacy/plugins/canvas/.storybook/webpack.dll.config.js',
'--progress',
'--hide-modules',
'--display-entrypoints',

View file

@ -4,4 +4,4 @@
* you may not use this file except in compliance with the Elastic License.
*/
require('./_helpers').runKibanaScript('eslint', ['x-pack/plugins/code/**/*.{js,jsx,ts,tsx}', '--fix']);
require('./_helpers').runKibanaScript('eslint', ['x-pack/legacy/plugins/code/**/*.{js,jsx,ts,tsx}', '--fix']);

View file

@ -13,7 +13,7 @@ import {
getKbnServer,
request,
startTestServers,
} from '../../../../../src/test_utils/kbn_server';
} from '../../../../../../src/test_utils/kbn_server';
const xpackOption = {
upgrade_assistant: {

View file

@ -5,7 +5,7 @@
*/
/*
* Borrowed from https://github.com/elastic/kibana/tree/master/x-pack/plugins/reporting/server/lib/esqueue
* Borrowed from https://github.com/elastic/kibana/tree/master/x-pack/legacy/plugins/reporting/server/lib/esqueue
* TODO(mengwei): need to abstract this esqueue as a common library when merging into kibana's main repo.
*/

View file

@ -5,7 +5,7 @@
*/
/*
* Borrowed from https://github.com/elastic/kibana/blob/master/x-pack/common/poller.js
* Borrowed from https://github.com/elastic/kibana/blob/master/x-pack/legacy/common/poller.js
*/
import _ from 'lodash';

View file

@ -5,7 +5,7 @@
*/
/*
* Borrowed from https://github.com/elastic/kibana/blob/master/x-pack/common/poller.js
* Borrowed from https://github.com/elastic/kibana/blob/master/x-pack/legacy/common/poller.js
*/
// Because the timers lib is global for Nodejs, it's not necessary to explicit import it.

View file

@ -5,7 +5,7 @@
*/
import { setupEnvironment, pageHelpers, nextTick, getRandomString } from './helpers';
import { INDEX_PATTERN_ILLEGAL_CHARACTERS_VISIBLE } from '../../../../../src/legacy/ui/public/index_patterns';
import { INDEX_PATTERN_ILLEGAL_CHARACTERS_VISIBLE } from '../../../../../../src/legacy/ui/public/index_patterns';
jest.mock('ui/chrome', () => ({
addBasePath: (path) => path || 'api/cross_cluster_replication',
@ -23,9 +23,9 @@ jest.mock('ui/chrome', () => ({
jest.mock('ui/index_patterns', () => {
const { INDEX_PATTERN_ILLEGAL_CHARACTERS_VISIBLE } =
jest.requireActual('../../../../../src/legacy/ui/public/index_patterns/constants');
jest.requireActual('../../../../../../src/legacy/ui/public/index_patterns/constants');
const { validateIndexPattern, ILLEGAL_CHARACTERS, CONTAINS_SPACES } =
jest.requireActual('../../../../../src/legacy/ui/public/index_patterns/validate/validate_index_pattern');
jest.requireActual('../../../../../../src/legacy/ui/public/index_patterns/validate/validate_index_pattern');
return { INDEX_PATTERN_ILLEGAL_CHARACTERS_VISIBLE, validateIndexPattern, ILLEGAL_CHARACTERS, CONTAINS_SPACES };
});

View file

@ -24,9 +24,9 @@ jest.mock('ui/chrome', () => ({
jest.mock('ui/index_patterns', () => {
const { INDEX_PATTERN_ILLEGAL_CHARACTERS_VISIBLE } =
jest.requireActual('../../../../../src/legacy/ui/public/index_patterns/constants');
jest.requireActual('../../../../../../src/legacy/ui/public/index_patterns/constants');
const { validateIndexPattern, ILLEGAL_CHARACTERS, CONTAINS_SPACES } =
jest.requireActual('../../../../../src/legacy/ui/public/index_patterns/validate/validate_index_pattern');
jest.requireActual('../../../../../../src/legacy/ui/public/index_patterns/validate/validate_index_pattern');
return { INDEX_PATTERN_ILLEGAL_CHARACTERS_VISIBLE, validateIndexPattern, ILLEGAL_CHARACTERS, CONTAINS_SPACES };
});

View file

@ -15,11 +15,11 @@ jest.mock('ui/chrome', () => ({
jest.mock('ui/index_patterns', () => {
const { INDEX_PATTERN_ILLEGAL_CHARACTERS_VISIBLE } =
require.requireActual('../../../../../src/legacy/ui/public/index_patterns/constants');
require.requireActual('../../../../../../src/legacy/ui/public/index_patterns/constants');
return { INDEX_PATTERN_ILLEGAL_CHARACTERS_VISIBLE };
});
jest.mock('../../../../../src/legacy/core_plugins/ui_metric/public', () => ({
jest.mock('../../../../../../src/legacy/core_plugins/ui_metric/public', () => ({
trackUiMetric: jest.fn(),
}));

View file

@ -7,7 +7,7 @@
import { setupEnvironment, pageHelpers, nextTick } from './helpers';
import { RemoteClustersFormField } from '../../public/app/components';
import { INDEX_PATTERN_ILLEGAL_CHARACTERS_VISIBLE } from '../../../../../src/legacy/ui/public/index_patterns';
import { INDEX_PATTERN_ILLEGAL_CHARACTERS_VISIBLE } from '../../../../../../src/legacy/ui/public/index_patterns';
jest.mock('ui/chrome', () => ({
addBasePath: (path) => path || 'api/cross_cluster_replication',
@ -25,9 +25,9 @@ jest.mock('ui/chrome', () => ({
jest.mock('ui/index_patterns', () => {
const { INDEX_PATTERN_ILLEGAL_CHARACTERS_VISIBLE } =
jest.requireActual('../../../../../src/legacy/ui/public/index_patterns/constants');
jest.requireActual('../../../../../../src/legacy/ui/public/index_patterns/constants');
const { validateIndexPattern, ILLEGAL_CHARACTERS, CONTAINS_SPACES } =
jest.requireActual('../../../../../src/legacy/ui/public/index_patterns/validate/validate_index_pattern');
jest.requireActual('../../../../../../src/legacy/ui/public/index_patterns/validate/validate_index_pattern');
return { INDEX_PATTERN_ILLEGAL_CHARACTERS_VISIBLE, validateIndexPattern, ILLEGAL_CHARACTERS, CONTAINS_SPACES };
});

View file

@ -25,9 +25,9 @@ jest.mock('ui/chrome', () => ({
jest.mock('ui/index_patterns', () => {
const { INDEX_PATTERN_ILLEGAL_CHARACTERS_VISIBLE } =
jest.requireActual('../../../../../src/legacy/ui/public/index_patterns/constants');
jest.requireActual('../../../../../../src/legacy/ui/public/index_patterns/constants');
const { validateIndexPattern, ILLEGAL_CHARACTERS, CONTAINS_SPACES } =
jest.requireActual('../../../../../src/legacy/ui/public/index_patterns/validate/validate_index_pattern');
jest.requireActual('../../../../../../src/legacy/ui/public/index_patterns/validate/validate_index_pattern');
return { INDEX_PATTERN_ILLEGAL_CHARACTERS_VISIBLE, validateIndexPattern, ILLEGAL_CHARACTERS, CONTAINS_SPACES };
});

View file

@ -15,11 +15,11 @@ jest.mock('ui/chrome', () => ({
jest.mock('ui/index_patterns', () => {
const { INDEX_PATTERN_ILLEGAL_CHARACTERS_VISIBLE } =
require.requireActual('../../../../../src/legacy/ui/public/index_patterns/constants');
require.requireActual('../../../../../../src/legacy/ui/public/index_patterns/constants');
return { INDEX_PATTERN_ILLEGAL_CHARACTERS_VISIBLE };
});
jest.mock('../../../../../src/legacy/core_plugins/ui_metric/public', () => ({
jest.mock('../../../../../../src/legacy/core_plugins/ui_metric/public', () => ({
trackUiMetric: jest.fn(),
}));

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { registerTestBed } from '../../../../../test_utils';
import { registerTestBed } from '../../../../../../test_utils';
import { AutoFollowPatternAdd } from '../../../public/app/sections/auto_follow_pattern_add';
import { ccrStore } from '../../../public/app/store';
import routing from '../../../public/app/services/routing';

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { registerTestBed } from '../../../../../test_utils';
import { registerTestBed } from '../../../../../../test_utils';
import { AutoFollowPatternEdit } from '../../../public/app/sections/auto_follow_pattern_edit';
import { ccrStore } from '../../../public/app/store';
import routing from '../../../public/app/services/routing';

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { registerTestBed, findTestSubject } from '../../../../../test_utils';
import { registerTestBed, findTestSubject } from '../../../../../../test_utils';
import { AutoFollowPatternList } from '../../../public/app/sections/home/auto_follow_pattern_list';
import { ccrStore } from '../../../public/app/store';
import routing from '../../../public/app/services/routing';

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { registerTestBed } from '../../../../../test_utils';
import { registerTestBed } from '../../../../../../test_utils';
import { FollowerIndexAdd } from '../../../public/app/sections/follower_index_add';
import { ccrStore } from '../../../public/app/store';
import routing from '../../../public/app/services/routing';

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { registerTestBed } from '../../../../../test_utils';
import { registerTestBed } from '../../../../../../test_utils';
import { FollowerIndexEdit } from '../../../public/app/sections/follower_index_edit';
import { ccrStore } from '../../../public/app/store';
import routing from '../../../public/app/services/routing';

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { registerTestBed, findTestSubject } from '../../../../../test_utils';
import { registerTestBed, findTestSubject } from '../../../../../../test_utils';
import { FollowerIndicesList } from '../../../public/app/sections/home/follower_indices_list';
import { ccrStore } from '../../../public/app/store';
import routing from '../../../public/app/services/routing';

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { registerTestBed } from '../../../../../test_utils';
import { registerTestBed } from '../../../../../../test_utils';
import { CrossClusterReplicationHome } from '../../../public/app/sections/home/home';
import { ccrStore } from '../../../public/app/store';
import routing from '../../../public/app/services/routing';

View file

@ -12,7 +12,7 @@ import { setup as followerIndexAddSetup } from './follower_index_add.helpers';
import { setup as followerIndexEditSetup } from './follower_index_edit.helpers';
import { setup as homeSetup } from './home.helpers';
export { nextTick, getRandomString, findTestSubject } from '../../../../../test_utils';
export { nextTick, getRandomString, findTestSubject } from '../../../../../../test_utils';
export { setupEnvironment } from './setup_environment';

View file

@ -24,11 +24,11 @@ jest.mock('ui/chrome', () => ({
jest.mock('ui/index_patterns', () => {
const { INDEX_PATTERN_ILLEGAL_CHARACTERS_VISIBLE } =
require.requireActual('../../../../../src/legacy/ui/public/index_patterns/constants');
require.requireActual('../../../../../../src/legacy/ui/public/index_patterns/constants');
return { INDEX_PATTERN_ILLEGAL_CHARACTERS_VISIBLE };
});
jest.mock('../../../../../src/legacy/core_plugins/ui_metric/public', () => ({
jest.mock('../../../../../../src/legacy/core_plugins/ui_metric/public', () => ({
trackUiMetric: jest.fn(),
}));

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { getRandomString } from '../../../test_utils';
import { getRandomString } from '../../../../test_utils';
export const getAutoFollowPatternMock = (
name = getRandomString(),

View file

@ -6,7 +6,7 @@
const Chance = require('chance'); // eslint-disable-line import/no-extraneous-dependencies
const chance = new Chance();
import { getRandomString } from '../../../test_utils';
import { getRandomString } from '../../../../test_utils';
const serializeShard = ({
id,

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { trackUiMetric as track } from '../../../../../../src/legacy/core_plugins/ui_metric/public';
import { trackUiMetric as track } from '../../../../../../../src/legacy/core_plugins/ui_metric/public';
import { UIM_APP_NAME } from '../constants';
export function trackUiMetric(actionType) {

View file

@ -5,7 +5,7 @@
*/
import { encryptedSavedObjects } from './index';
import { getConfigSchema } from '../../test_utils';
import { getConfigSchema } from '../../../test_utils';
const describeWithContext = describe.each([[{ dist: false }], [{ dist: true }]]);

View file

@ -9,7 +9,7 @@ import moment from 'moment-timezone';
import { Provider } from 'react-redux';
import { fetchedPolicies, fetchedNodes } from '../../public/store/actions';
import { indexLifecycleManagementStore } from '../../public/store';
import { mountWithIntl } from '../../../../test_utils/enzyme_helpers';
import { mountWithIntl } from '../../../../../test_utils/enzyme_helpers';
import { EditPolicy } from '../../public/sections/edit_policy';
// axios has a $http like interface so using it to simulate $http
import axios from 'axios';

View file

@ -8,7 +8,7 @@ import React from 'react';
import { Provider } from 'react-redux';
import { fetchedPolicies } from '../../public/store/actions';
import { indexLifecycleManagementStore } from '../../public/store';
import { mountWithIntl } from '../../../../test_utils/enzyme_helpers';
import { mountWithIntl } from '../../../../../test_utils/enzyme_helpers';
import { PolicyTable } from '../../public/sections/policy_table';
import { findTestSubject, takeMountedSnapshot } from '@elastic/eui/lib/test';
// axios has a $http like interface so using it to simulate $http

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { mountWithIntl } from '../../../test_utils/enzyme_helpers';
import { mountWithIntl } from '../../../../test_utils/enzyme_helpers';
import moment from 'moment-timezone';
import {
retryLifecycleActionExtension,

View file

@ -6,7 +6,7 @@
import { get } from 'lodash';
import { trackUiMetric as track } from '../../../../../src/legacy/core_plugins/ui_metric/public';
import { trackUiMetric as track } from '../../../../../../src/legacy/core_plugins/ui_metric/public';
import {
UIM_APP_NAME,

View file

@ -11,7 +11,7 @@ import { Provider } from 'react-redux';
import { loadIndicesSuccess } from '../../public/store/actions';
import { indexManagementStore } from '../../public/store';
import { BASE_PATH } from '../../common/constants';
import { mountWithIntl } from '../../../../test_utils/enzyme_helpers';
import { mountWithIntl } from '../../../../../test_utils/enzyme_helpers';
// axios has a $http like interface so using it to simulate $http
import axios from 'axios';
import axiosXhrAdapter from 'axios/lib/adapters/xhr';

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { trackUiMetric as track } from '../../../../../src/legacy/core_plugins/ui_metric/public';
import { trackUiMetric as track } from '../../../../../../src/legacy/core_plugins/ui_metric/public';
import { UIM_APP_NAME } from '../../common/constants';
export function trackUiMetric(metricType) {

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
require('../../../../src/setup_node_env');
require('../../../../../src/setup_node_env');
const { join, resolve } = require('path');
// eslint-disable-next-line import/no-extraneous-dependencies, import/no-unresolved

View file

@ -1,3 +1,3 @@
{
"extends": "../../tsconfig.json",
"extends": "../../../tsconfig.json",
}

View file

@ -5,7 +5,7 @@
*/
import React from 'react';
import { TelemetryOptIn } from '../public/components/telemetry_opt_in';
import { mountWithIntl } from '../../../test_utils/enzyme_helpers';
import { mountWithIntl } from '../../../../test_utils/enzyme_helpers';
jest.mock('ui/capabilities', () => ({
get: jest.fn(),

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { mountWithIntl } from '../../../test_utils/enzyme_helpers';
import { mountWithIntl } from '../../../../test_utils/enzyme_helpers';
import React from 'react';
import { Provider } from 'react-redux';
import { uploadLicense } from '../public/store/actions/upload_license';

View file

@ -7,7 +7,7 @@
import { Provider } from 'react-redux';
import { licenseManagementStore } from '../../public/store/store';
import React from 'react';
import { mountWithIntl } from '../../../../test_utils/enzyme_helpers';
import { mountWithIntl } from '../../../../../test_utils/enzyme_helpers';
const highExpirationMillis = new Date('October 13, 2099 00:00:00Z').getTime();

View file

@ -8,7 +8,7 @@
"src/legacy/ui/public/*"
],
"plugins/ml/*": [
"x-pack/plugins/ml/public/*"
"x-pack/legacy/plugins/ml/public/*"
]
}
},

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { Logger } from '../../../../../src/core/server';
import { Logger } from '../../../../../../src/core/server';
export interface LogInitialization {
log: Logger;

View file

@ -1,3 +1,3 @@
{
"extends": "../../tsconfig.json"
"extends": "../../../tsconfig.json"
}

View file

@ -5,7 +5,7 @@
*/
import React from 'react';
import { renderWithIntl } from '../../../../../../../test_utils/enzyme_helpers';
import { renderWithIntl } from '../../../../../../../../test_utils/enzyme_helpers';
import { MetricCell } from '../cells';
describe('Node Listing Metric Cell', () => {

View file

@ -22,7 +22,7 @@ import {
EuiText,
} from '@elastic/eui';
import { getInstructionSteps } from '../instruction_steps';
import { Storage } from '../../../../../../../src/legacy/ui/public/storage/storage';
import { Storage } from '../../../../../../../../src/legacy/ui/public/storage/storage';
import { STORAGE_KEY, ELASTICSEARCH_CUSTOM_ID } from '../../../../common/constants';
import { ensureMinimumTime } from '../../../lib/ensure_minimum_time';
import { i18n } from '@kbn/i18n';

View file

@ -6,7 +6,7 @@
import React from 'react';
import { boomify, forbidden } from 'boom';
import { renderWithIntl } from '../../../../../../test_utils/enzyme_helpers';
import { renderWithIntl } from '../../../../../../../test_utils/enzyme_helpers';
import { CheckerErrors } from '../checker_errors';
describe('CheckerErrors', () => {

View file

@ -5,7 +5,7 @@
*/
import React from 'react';
import { renderWithIntl } from '../../../../../../test_utils/enzyme_helpers';
import { renderWithIntl } from '../../../../../../../test_utils/enzyme_helpers';
import { NoData } from '../';
const enabler = {};

View file

@ -6,7 +6,7 @@
import React from 'react';
import sinon from 'sinon';
import { mountWithIntl } from '../../../../../../../../test_utils/enzyme_helpers';
import { mountWithIntl } from '../../../../../../../../../test_utils/enzyme_helpers';
import { ExplainCollectionEnabled } from '../collection_enabled';
import { findTestSubject } from '@elastic/eui/lib/test';

View file

@ -6,7 +6,7 @@
import React from 'react';
import sinon from 'sinon';
import { mountWithIntl } from '../../../../../../../../test_utils/enzyme_helpers';
import { mountWithIntl } from '../../../../../../../../../test_utils/enzyme_helpers';
import { ExplainCollectionInterval } from '../collection_interval';
import { findTestSubject } from '@elastic/eui/lib/test';

View file

@ -5,7 +5,7 @@
*/
import React from 'react';
import { renderWithIntl } from '../../../../../../../../test_utils/enzyme_helpers';
import { renderWithIntl } from '../../../../../../../../../test_utils/enzyme_helpers';
import { ExplainExporters } from '../exporters';
describe('ExplainExporters', () => {

View file

@ -5,7 +5,7 @@
*/
import React from 'react';
import { renderWithIntl } from '../../../../../../../../test_utils/enzyme_helpers';
import { renderWithIntl } from '../../../../../../../../../test_utils/enzyme_helpers';
import { ExplainPluginEnabled } from '../plugin_enabled';
describe('ExplainPluginEnabled', () => {

View file

@ -5,7 +5,7 @@
*/
import React from 'react';
import { renderWithIntl } from '../../../../../../../test_utils/enzyme_helpers';
import { renderWithIntl } from '../../../../../../../../test_utils/enzyme_helpers';
import { ReasonFound } from '../';
const enabler = {};

View file

@ -5,7 +5,7 @@
*/
import React from 'react';
import { renderWithIntl } from '../../../../../../../test_utils/enzyme_helpers';
import { renderWithIntl } from '../../../../../../../../test_utils/enzyme_helpers';
import { WeTried } from '../';
describe('WeTried', () => {

View file

@ -5,7 +5,7 @@
*/
import React from 'react';
import { renderWithIntl } from '../../../../../../test_utils/enzyme_helpers';
import { renderWithIntl } from '../../../../../../../test_utils/enzyme_helpers';
import { PageLoading } from '../';
describe('PageLoading', () => {

View file

@ -5,7 +5,7 @@
*/
import React from 'react';
import { renderWithIntl } from '../../../../../test_utils/enzyme_helpers';
import { renderWithIntl } from '../../../../../../test_utils/enzyme_helpers';
import { SummaryStatus } from './summary_status';
jest.mock(`@elastic/eui/lib/components/form/form_row/make_id`, () => () => `generated-id`);

View file

@ -8,7 +8,7 @@ import { setup as remoteClustersAddSetup } from './remote_clusters_add.helpers';
import { setup as remoteClustersEditSetup } from './remote_clusters_edit.helpers';
import { setup as remoteClustersListSetup } from './remote_clusters_list.helpers';
export { nextTick, getRandomString, findTestSubject } from '../../../../../test_utils';
export { nextTick, getRandomString, findTestSubject } from '../../../../../../test_utils';
export { setupEnvironment } from './setup_environment';

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { registerTestBed } from '../../../../../test_utils';
import { registerTestBed } from '../../../../../../test_utils';
import { RemoteClusterAdd } from '../../../public/app/sections/remote_cluster_add';
import { createRemoteClustersStore } from '../../../public/app/store';
import { registerRouter } from '../../../public/app/services/routing';

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { registerTestBed } from '../../../../../test_utils';
import { registerTestBed } from '../../../../../../test_utils';
import { RemoteClusterEdit } from '../../../public/app/sections/remote_cluster_edit';
import { createRemoteClustersStore } from '../../../public/app/store';
import { registerRouter } from '../../../public/app/services/routing';

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { registerTestBed, findTestSubject } from '../../../../../test_utils';
import { registerTestBed, findTestSubject } from '../../../../../../test_utils';
import { RemoteClusterList } from '../../../public/app/sections/remote_cluster_list';
import { createRemoteClustersStore } from '../../../public/app/store';
import { registerRouter } from '../../../public/app/services/routing';

View file

@ -3,7 +3,7 @@
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import { getRandomString } from '../../../test_utils';
import { getRandomString } from '../../../../test_utils';
export const getRemoteClusterMock = ({
name = getRandomString(),

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { trackUiMetric as track } from '../../../../../../src/legacy/core_plugins/ui_metric/public';
import { trackUiMetric as track } from '../../../../../../../src/legacy/core_plugins/ui_metric/public';
import { UIM_APP_NAME } from '../constants';
export function trackUiMetric(actionType) {

View file

@ -9,7 +9,7 @@ import { management, MANAGEMENT_BREADCRUMB } from 'ui/management';
import { fatalError } from 'ui/notify';
import { DOC_LINK_VERSION, ELASTIC_WEBSITE_URL } from 'ui/documentation_links';
import { trackUiMetric as track } from '../../../../src/legacy/core_plugins/ui_metric/public';
import { trackUiMetric as track } from '../../../../../src/legacy/core_plugins/ui_metric/public';
export function createShim() {
const {

View file

@ -10,9 +10,9 @@ import sinon from 'sinon';
import nodeCrypto from '@elastic/node-crypto';
import { CancellationToken } from '../../../../common/cancellation_token';
import { FieldFormat } from '../../../../../../../src/legacy/ui/field_formats/field_format.js';
import { FieldFormatsService } from '../../../../../../../src/legacy/ui/field_formats/field_formats_service.js';
import { createStringFormat } from '../../../../../../../src/legacy/core_plugins/kibana/common/field_formats/types/string.js';
import { FieldFormat } from '../../../../../../../../src/legacy/ui/field_formats/field_format.js';
import { FieldFormatsService } from '../../../../../../../../src/legacy/ui/field_formats/field_formats_service.js';
import { createStringFormat } from '../../../../../../../../src/legacy/core_plugins/kibana/common/field_formats/types/string.js';
import { executeJobFactory } from '../execute_job';

View file

@ -6,10 +6,10 @@
import expect from '@kbn/expect';
import { FieldFormat } from '../../../../../../../../src/legacy/ui/field_formats/field_format.js';
import { FieldFormatsService } from '../../../../../../../../src/legacy/ui/field_formats/field_formats_service.js';
import { createBytesFormat } from '../../../../../../../../src/legacy/core_plugins/kibana/common/field_formats/types/bytes.js';
import { createNumberFormat } from '../../../../../../../../src/legacy/core_plugins/kibana/common/field_formats/types/number.js';
import { FieldFormat } from '../../../../../../../../../src/legacy/ui/field_formats/field_format.js';
import { FieldFormatsService } from '../../../../../../../../../src/legacy/ui/field_formats/field_formats_service.js';
import { createBytesFormat } from '../../../../../../../../../src/legacy/core_plugins/kibana/common/field_formats/types/bytes.js';
import { createNumberFormat } from '../../../../../../../../../src/legacy/core_plugins/kibana/common/field_formats/types/number.js';
import { fieldFormatMapFactory } from '../field_format_map';

View file

@ -78,7 +78,7 @@ export interface SavedObject {
/* This object is passed to different helpers in different parts of the code
- packages/kbn-es-query/src/es_query/build_es_query
- x-pack/plugins/reporting/export_types/csv/server/lib/field_format_map
- x-pack/legacy/plugins/reporting/export_types/csv/server/lib/field_format_map
The structure has redundant parts and json-parsed / json-unparsed versions of the same data
*/
export interface IndexPatternSavedObject {

View file

@ -5,7 +5,7 @@
*/
import { reporting } from './index';
import { getConfigSchema } from '../../test_utils';
import { getConfigSchema } from '../../../test_utils';
// The snapshot records the number of cpus available
// to make the snapshot deterministic `os.cpus` needs to be mocked

Some files were not shown because too many files have changed in this diff Show more