[common] fix paths.

This commit is contained in:
Aleh Zasypkin 2018-11-29 14:14:40 +01:00
parent 91dc30e608
commit db3d727fdb
26 changed files with 73 additions and 71 deletions

View file

@ -9,10 +9,10 @@ bower_components
/src/ui/public/angular-bootstrap
/src/ui/public/flot-charts
/test/fixtures/scenarios
/src/core_plugins/console/public/webpackShims
/src/core_plugins/console/public/tests/webpackShims
/src/legacy/core_plugins/console/public/webpackShims
/src/legacy/core_plugins/console/public/tests/webpackShims
/src/ui/public/utils/decode_geo_hash.js
/src/core_plugins/timelion/public/webpackShims/jquery.flot.*
/src/legacy/core_plugins/timelion/public/webpackShims/jquery.flot.*
/src/core/lib/kbn_internal_native_observable
/packages/*/target
/packages/eslint-config-kibana

View file

@ -2,20 +2,20 @@
"paths": {
"common.ui": "src/ui",
"server": "src/server",
"console": "src/core_plugins/console",
"inputControl": "src/core_plugins/input_control_vis",
"kbn": "src/core_plugins/kibana",
"kbnVislibVisTypes": "src/core_plugins/kbn_vislib_vis_types",
"markdownVis": "src/core_plugins/markdown_vis",
"metricVis": "src/core_plugins/metric_vis",
"vega": "src/core_plugins/vega",
"tableVis": "src/core_plugins/table_vis",
"regionMap": "src/core_plugins/region_map",
"statusPage": "src/core_plugins/status_page",
"tileMap": "src/core_plugins/tile_map",
"timelion": "src/core_plugins/timelion",
"tagCloud": "src/core_plugins/tagcloud",
"tsvb": "src/core_plugins/metrics",
"console": "src/legacy/core_plugins/console",
"inputControl": "src/legacy/core_plugins/input_control_vis",
"kbn": "src/legacy/core_plugins/kibana",
"kbnVislibVisTypes": "src/legacy/core_plugins/kbn_vislib_vis_types",
"markdownVis": "src/legacy/core_plugins/markdown_vis",
"metricVis": "src/legacy/core_plugins/metric_vis",
"vega": "src/legacy/core_plugins/vega",
"tableVis": "src/legacy/core_plugins/table_vis",
"regionMap": "src/legacy/core_plugins/region_map",
"statusPage": "src/legacy/core_plugins/status_page",
"tileMap": "src/legacy/core_plugins/tile_map",
"timelion": "src/legacy/core_plugins/timelion",
"tagCloud": "src/legacy/core_plugins/tagcloud",
"tsvb": "src/legacy/core_plugins/metrics",
"xpack.beatsManagement": "x-pack/plugins/beats_management",
"xpack.graph": "x-pack/plugins/graph",
"xpack.grokDebugger": "x-pack/plugins/grokdebugger",

View file

@ -11,11 +11,11 @@ Each tutorial contains three sets of instructions:
[float]
=== Creating a new tutorial
1. Create a new directory in the link:https://github.com/elastic/kibana/tree/master/src/core_plugins/kibana/server/tutorials[tutorials directory].
1. Create a new directory in the link:https://github.com/elastic/kibana/tree/master/src/legacy/core_plugins/kibana/server/tutorials[tutorials directory].
2. In the new directory, create a file called `index.js` that exports a function.
The function must return a JavaScript object that conforms to the link:https://github.com/elastic/kibana/blob/master/src/core_plugins/kibana/common/tutorials/tutorial_schema.js[tutorial schema].
3. Register the tutorial in link:https://github.com/elastic/kibana/blob/master/src/core_plugins/kibana/server/tutorials/register.js[register.js] by calling `server.registerTutorial(myFuncImportedFromIndexJs)`.
4. Add image assets to the link:https://github.com/elastic/kibana/tree/master/src/core_plugins/kibana/public/home/tutorial_resources[tutorial_resources directory].
The function must return a JavaScript object that conforms to the link:https://github.com/elastic/kibana/blob/master/src/lgeacy/core_plugins/kibana/common/tutorials/tutorial_schema.js[tutorial schema].
3. Register the tutorial in link:https://github.com/elastic/kibana/blob/master/src/legacy/core_plugins/kibana/server/tutorials/register.js[register.js] by calling `server.registerTutorial(myFuncImportedFromIndexJs)`.
4. Add image assets to the link:https://github.com/elastic/kibana/tree/master/src/legacy/core_plugins/kibana/public/home/tutorial_resources[tutorial_resources directory].
5. Run Kibana locally to preview the tutorial.
6. Create a PR and go through the review process to get the changes approved.
@ -24,11 +24,11 @@ The function must return a JavaScript object that conforms to the link:https://g
String values can contain variables that are substituted when rendered. Variables are specified by `{}`.
For example: `{config.docs.version}` is rendered as `6.2` when running the tutorial in Kibana 6.2.
link:https://github.com/elastic/kibana/blob/master/src/core_plugins/kibana/public/home/components/tutorial/replace_template_strings.js#L23[Provided variables]
link:https://github.com/elastic/kibana/blob/master/src/legacy/core_plugins/kibana/public/home/components/tutorial/replace_template_strings.js#L23[Provided variables]
[float]
==== Markdown
String values can contain limited Markdown syntax.
link:https://github.com/elastic/kibana/blob/master/src/core_plugins/kibana/public/home/components/tutorial/content.js#L8[Enabled Markdown grammars]
link:https://github.com/elastic/kibana/blob/master/src/legacy/core_plugins/kibana/public/home/components/tutorial/content.js#L8[Enabled Markdown grammars]

View file

@ -163,7 +163,7 @@ export default class ClusterManager {
const { fromRoot } = require('../../utils');
const watchPaths = [
fromRoot('src/core_plugins'),
fromRoot('src/legacy/core_plugins'),
fromRoot('src/server'),
fromRoot('src/ui'),
fromRoot('src/utils'),

View file

@ -165,7 +165,7 @@ export default function (program) {
pluginDirCollector,
[
fromRoot('plugins'),
fromRoot('src/core_plugins')
fromRoot('src/legacy/core_plugins')
]
)
.option(

View file

@ -32,9 +32,9 @@ export const CopySourceTask = {
'!src/**/{__tests__,__snapshots__}/**',
'!src/test_utils/**',
'!src/fixtures/**',
'!src/core_plugins/tests_bundle/**',
'!src/core_plugins/testbed/**',
'!src/core_plugins/console/public/tests/**',
'!src/legacy/core_plugins/tests_bundle/**',
'!src/legacy/core_plugins/testbed/**',
'!src/legacy/core_plugins/console/public/tests/**',
'!src/cli/cluster/**',
'!src/cli/repl/**',
'!src/es_archiver/**',

View file

@ -26,7 +26,7 @@ export const TranspileScssTask = {
description: 'Transpiling SCSS to CSS',
async run(config, log, build) {
const scanDirs = [ build.resolvePath('src/core_plugins') ];
const scanDirs = [ build.resolvePath('src/legacy/core_plugins') ];
const paths = [ build.resolvePath('node_modules/x-pack') ];
const { spec$ } = findPluginSpecs({ plugins: { scanDirs, paths } });
@ -41,4 +41,4 @@ export const TranspileScssTask = {
throw new Error(`${message} on line ${line} of ${file}`);
}
}
};
};

View file

@ -22,7 +22,7 @@ export default {
roots: [
'<rootDir>/src/ui',
'<rootDir>/src/core',
'<rootDir>/src/core_plugins',
'<rootDir>/src/legacy/core_plugins',
'<rootDir>/src/server',
'<rootDir>/src/cli',
'<rootDir>/src/cli_keystore',

View file

@ -104,26 +104,26 @@ export const IGNORE_DIRECTORY_GLOBS = [
* @type {Array}
*/
export const TEMPORARILY_IGNORED_PATHS = [
'src/core_plugins/console/public/src/directives/helpExample.txt',
'src/core_plugins/console/public/src/sense_editor/theme-sense-dark.js',
'src/core_plugins/console/public/tests/webpackShims/qunit-1.10.0.css',
'src/core_plugins/console/public/tests/webpackShims/qunit-1.10.0.js',
'src/core_plugins/console/public/webpackShims/ace/ext-language_tools.js',
'src/core_plugins/console/public/webpackShims/ace/ext-searchbox.js',
'src/core_plugins/console/public/webpackShims/ace/mode-json.js',
'src/core_plugins/console/public/webpackShims/ace/mode-yaml.js',
'src/core_plugins/console/public/webpackShims/ace/worker-json.js',
'src/core_plugins/console/public/webpackShims/ui-bootstrap-custom.js',
'src/core_plugins/kibana/public/assets/play-circle.svg',
'src/core_plugins/tests_bundle/webpackShims/angular-mocks.js',
'src/core_plugins/tile_map/public/__tests__/scaledCircleMarkers.png',
'src/core_plugins/tile_map/public/__tests__/shadedCircleMarkers.png',
'src/core_plugins/tile_map/public/__tests__/shadedGeohashGrid.png',
'src/core_plugins/timelion/server/lib/asSorted.js',
'src/core_plugins/timelion/server/lib/unzipPairs.js',
'src/core_plugins/timelion/server/series_functions/__tests__/fixtures/bucketList.js',
'src/core_plugins/timelion/server/series_functions/__tests__/fixtures/seriesList.js',
'src/core_plugins/timelion/server/series_functions/__tests__/fixtures/tlConfig.js',
'src/legacy/core_plugins/console/public/src/directives/helpExample.txt',
'src/legacy/core_plugins/console/public/src/sense_editor/theme-sense-dark.js',
'src/legacy/core_plugins/console/public/tests/webpackShims/qunit-1.10.0.css',
'src/legacy/core_plugins/console/public/tests/webpackShims/qunit-1.10.0.js',
'src/legacy/core_plugins/console/public/webpackShims/ace/ext-language_tools.js',
'src/legacy/core_plugins/console/public/webpackShims/ace/ext-searchbox.js',
'src/legacy/core_plugins/console/public/webpackShims/ace/mode-json.js',
'src/legacy/core_plugins/console/public/webpackShims/ace/mode-yaml.js',
'src/legacy/core_plugins/console/public/webpackShims/ace/worker-json.js',
'src/legacy/core_plugins/console/public/webpackShims/ui-bootstrap-custom.js',
'src/legacy/core_plugins/kibana/public/assets/play-circle.svg',
'src/legacy/core_plugins/tests_bundle/webpackShims/angular-mocks.js',
'src/legacy/core_plugins/tile_map/public/__tests__/scaledCircleMarkers.png',
'src/legacy/core_plugins/tile_map/public/__tests__/shadedCircleMarkers.png',
'src/legacy/core_plugins/tile_map/public/__tests__/shadedGeohashGrid.png',
'src/legacy/core_plugins/timelion/server/lib/asSorted.js',
'src/legacy/core_plugins/timelion/server/lib/unzipPairs.js',
'src/legacy/core_plugins/timelion/server/series_functions/__tests__/fixtures/bucketList.js',
'src/legacy/core_plugins/timelion/server/series_functions/__tests__/fixtures/seriesList.js',
'src/legacy/core_plugins/timelion/server/series_functions/__tests__/fixtures/tlConfig.js',
'src/fixtures/config_upgrade_from_4.0.0_to_4.0.1-snapshot.json',
'src/fixtures/vislib/mock_data/terms/_seriesMultiple.js',
'src/ui/i18n/__tests__/fixtures/translations/test_plugin_1/es-ES.json',

View file

@ -35,7 +35,7 @@ import { findPluginSpecs } from '../../../plugin_discovery';
const buildUiExports = _.once(async () => {
const { spec$ } = await findPluginSpecs({
plugins: {
scanDirs: [path.resolve(__dirname, '../../../core_plugins')],
scanDirs: [path.resolve(__dirname, '../../../legacy/core_plugins')],
paths: [path.resolve(__dirname, '../../../../x-pack')],
},
});

View file

@ -137,7 +137,7 @@ Only exported so that `PluginPack` instances can be created in tests and used in
### params
- `options.path`: absolute path to where this plugin pack was found, this is normally a direct child of `./src/core_plugins` or `./plugins`
- `options.path`: absolute path to where this plugin pack was found, this is normally a direct child of `./src/legacy/core_plugins` or `./plugins`
- `options.pkg`: the parsed `package.json` for this pack, used for defaults in `PluginSpec` objects defined by this pack
- `options.provider`: the default export of the pack, a function which is called with the `PluginSpec` class which should return one or more `PluginSpec` objects.

View file

@ -44,7 +44,7 @@ const DEFAULTS_SETTINGS = {
};
const DEFAULT_SETTINGS_WITH_CORE_PLUGINS = {
plugins: { scanDirs: [resolve(__dirname, '../core_plugins')] },
plugins: { scanDirs: [resolve(__dirname, '../legacy/core_plugins')] },
elasticsearch: {
url: esTestConfig.getUrl(),
username: kibanaServerTestUser.username,

View file

@ -19,7 +19,7 @@
import _ from 'lodash';
import expect from 'expect.js';
import { asPrettyString } from '../../../core_plugins/kibana/common/utils/as_pretty_string';
import { asPrettyString } from '../../../legacy/core_plugins/kibana/common/utils/as_pretty_string';
import { FieldFormat } from '../field_format';
describe('FieldFormat class', function () {

View file

@ -20,7 +20,7 @@
import expect from 'expect.js';
import { FieldFormat } from '../field_format';
import { FieldFormatsService } from '../field_formats_service';
import { createNumberFormat } from '../../../core_plugins/kibana/common/field_formats/types/number';
import { createNumberFormat } from '../../../legacy/core_plugins/kibana/common/field_formats/types/number';
describe('FieldFormatsService', function () {

View file

@ -18,8 +18,8 @@
*/
import _ from 'lodash';
import { asPrettyString } from '../../core_plugins/kibana/common/utils/as_pretty_string';
import { getHighlightHtml } from '../../core_plugins/kibana/common/highlight/highlight_html';
import { asPrettyString } from '../../legacy/core_plugins/kibana/common/utils/as_pretty_string';
import { getHighlightHtml } from '../../legacy/core_plugins/kibana/common/highlight/highlight_html';
const types = {
html: function (format, convert) {

View file

@ -15,7 +15,7 @@
// The following are prefixed with "vis"
// Can't import vis folder here because of cascading issues, it's imported in core_plugins/kibana
// Can't import vis folder here because of cascading issues, it's imported in legacy/core_plugins/kibana
// @import './vis/index';
@import './vislib/index';
@import './visualize/index';

View file

@ -18,7 +18,7 @@
*/
import _ from 'lodash';
import { toJson } from '../../../../../../core_plugins/kibana/common/utils/aggressive_parse';
import { toJson } from '../../../../../../legacy/core_plugins/kibana/common/utils/aggressive_parse';
function emptySearch() {
return {

View file

@ -81,7 +81,7 @@ import { SegmentedSearchRequestProvider } from '../fetch/request/segmented_searc
import { searchRequestQueue } from '../search_request_queue';
import { FetchSoonProvider } from '../fetch';
import { FieldWildcardProvider } from '../../field_wildcard';
import { getHighlightRequest } from '../../../../core_plugins/kibana/common/highlight';
import { getHighlightRequest } from '../../../../legacy/core_plugins/kibana/common/highlight';
import { KbnError, OutdatedKuerySyntaxError } from '../../errors';
const FIELDS = [

View file

@ -23,7 +23,7 @@ import rison from 'rison-node';
import '../../doc_viewer';
import '../../filters/trust_as_html';
import '../../filters/short_dots';
import { noWhiteSpace } from '../../../../core_plugins/kibana/common/utils/no_white_space';
import { noWhiteSpace } from '../../../../legacy/core_plugins/kibana/common/utils/no_white_space';
import openRowHtml from './table_row/open.html';
import detailsHtml from './table_row/details.html';
import { uiModules } from '../../modules';

View file

@ -31,7 +31,7 @@ import {
DefaultFormatEditor
} from '../default';
import { DEFAULT_COLOR } from '../../../../../../../core_plugins/kibana/common/field_formats/types/color_default';
import { DEFAULT_COLOR } from '../../../../../../../legacy/core_plugins/kibana/common/field_formats/types/color_default';
import { injectI18n, FormattedMessage } from '@kbn/i18n/react';

View file

@ -21,7 +21,7 @@ import React from 'react';
import { shallowWithIntl } from 'test_utils/enzyme_helpers';
import { ColorFormatEditor, ColorFormatEditorComponent } from './color';
import { DEFAULT_COLOR } from '../../../../../../../core_plugins/kibana/common/field_formats/types/color_default';
import { DEFAULT_COLOR } from '../../../../../../../legacy/core_plugins/kibana/common/field_formats/types/color_default';
const fieldType = 'string';
const format = {

View file

@ -19,7 +19,7 @@
import { getDefaultFormat } from '../get_default_format';
import { FieldFormat } from '../../../../field_formats';
import { createNumberFormat } from '../../../../../core_plugins/kibana/common/field_formats/types/number';
import { createNumberFormat } from '../../../../../legacy/core_plugins/kibana/common/field_formats/types/number';
const Format = createNumberFormat(FieldFormat);
const getConfig = () => {

View file

@ -18,7 +18,7 @@
*/
import _ from 'lodash';
import { shortenDottedString } from '../../../core_plugins/kibana/common/utils/shorten_dotted_string';
import { shortenDottedString } from '../../../legacy/core_plugins/kibana/common/utils/shorten_dotted_string';
import { uiModules } from '../modules';
// Shorts dot notated strings
// e.g., foo.bar.baz becomes f.b.baz

View file

@ -21,7 +21,7 @@ import { ObjDefine } from '../utils/obj_define';
import { FieldFormat } from '../../field_formats/field_format';
import { fieldFormats } from '../registry/field_formats';
import { getKbnFieldType } from '../../../utils';
import { shortenDottedString } from '../../../core_plugins/kibana/common/utils/shorten_dotted_string';
import { shortenDottedString } from '../../../legacy/core_plugins/kibana/common/utils/shorten_dotted_string';
import { toastNotifications } from 'ui/notify';
import chrome from 'ui/chrome';
import { i18n } from '@kbn/i18n';

View file

@ -21,7 +21,9 @@ export {
PAGE_TITLE_COMPONENT,
PAGE_SUBTITLE_COMPONENT,
PAGE_FOOTER_COMPONENT,
} from '../../../core_plugins/kibana/public/management/sections/settings/components/default_component_registry';
export { registerSettingsComponent } from '../../../core_plugins/kibana/public/management/sections/settings/components/component_registry';
export { Field } from '../../../core_plugins/kibana/public/management/sections/settings/components/field/field';
} from '../../../legacy/core_plugins/kibana/public/management/sections/settings/components/default_component_registry';
export {
registerSettingsComponent
} from '../../../legacy/core_plugins/kibana/public/management/sections/settings/components/component_registry';
export { Field } from '../../../legacy/core_plugins/kibana/public/management/sections/settings/components/field/field';
export { management } from './sections_register';

View file

@ -18,7 +18,7 @@
*/
import Joi from 'joi';
import { tutorialSchema } from '../core_plugins/kibana/common/tutorials/tutorial_schema';
import { tutorialSchema } from '../legacy/core_plugins/kibana/common/tutorials/tutorial_schema';
export function tutorialsMixin(kbnServer, server) {
const tutorialProviders = [];