Skip to content

Commit

Permalink
[Canvas] move files from legacy/plugins to plugins (elastic#65283)
Browse files Browse the repository at this point in the history
* Moves the files

* Rename legacy/plugins/canvas paths

* Correct paths

* Fix shareable_runtime and storybook

* ESLint Fixes

* Fix jest test and paths
# Conflicts:
#	.github/CODEOWNERS
#	test/scripts/jenkins_xpack.sh
#	x-pack/legacy/plugins/canvas/index.js
#	x-pack/plugins/canvas/canvas_plugin_src/expression_types/embeddable_types.ts
  • Loading branch information
Corey Robertson committed May 6, 2020
1 parent 1c0e76b commit 04f439e
Show file tree
Hide file tree
Showing 1,261 changed files with 444 additions and 463 deletions.
8 changes: 4 additions & 4 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ target
/src/plugins/vis_type_timelion/public/webpackShims/jquery.flot.*
/x-pack/legacy/plugins/**/__tests__/fixtures/**
/x-pack/plugins/apm/e2e/cypress/**/snapshots.js
/x-pack/legacy/plugins/canvas/canvas_plugin
/x-pack/legacy/plugins/canvas/canvas_plugin_src/lib/flot-charts
/x-pack/legacy/plugins/canvas/shareable_runtime/build
/x-pack/legacy/plugins/canvas/storybook
/x-pack/plugins/canvas/canvas_plugin
/x-pack/plugins/canvas/canvas_plugin_src/lib/flot-charts
/x-pack/plugins/canvas/shareable_runtime/build
/x-pack/plugins/canvas/storybook
/x-pack/plugins/monitoring/public/lib/jquery_flot
/x-pack/legacy/plugins/infra/common/graphql/types.ts
/x-pack/legacy/plugins/infra/public/graphql/types.ts
Expand Down
22 changes: 11 additions & 11 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ module.exports = {
},
},
{
files: ['x-pack/legacy/plugins/canvas/**/*.{js,ts,tsx}'],
files: ['x-pack/plugins/canvas/**/*.{js,ts,tsx}'],
rules: {
'react-hooks/exhaustive-deps': 'off',
'jsx-a11y/click-events-have-key-events': 'off',
Expand Down Expand Up @@ -882,7 +882,7 @@ module.exports = {
* Canvas overrides
*/
{
files: ['x-pack/legacy/plugins/canvas/**/*.js'],
files: ['x-pack/plugins/canvas/**/*.js'],
rules: {
radix: 'error',

Expand Down Expand Up @@ -926,12 +926,12 @@ module.exports = {
},
{
files: [
'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',
'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',
],
rules: {
'import/no-extraneous-dependencies': [
Expand All @@ -944,7 +944,7 @@ module.exports = {
},
},
{
files: ['x-pack/legacy/plugins/canvas/canvas_plugin_src/**/*.js'],
files: ['x-pack/plugins/canvas/canvas_plugin_src/**/*.js'],
globals: { canvas: true, $: true },
rules: {
'import/no-unresolved': [
Expand All @@ -956,13 +956,13 @@ module.exports = {
},
},
{
files: ['x-pack/legacy/plugins/canvas/public/**/*.js'],
files: ['x-pack/plugins/canvas/public/**/*.js'],
env: {
browser: true,
},
},
{
files: ['x-pack/legacy/plugins/canvas/canvas_plugin_src/lib/flot-charts/**/*.js'],
files: ['x-pack/plugins/canvas/canvas_plugin_src/lib/flot-charts/**/*.js'],
env: {
jquery: true,
},
Expand Down
229 changes: 229 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,229 @@
# GitHub CODEOWNERS definition
# Identify which groups will be pinged by changes to different parts of the codebase.
# For more info, see https://help.github.com/articles/about-codeowners/

# App
/x-pack/plugins/dashboard_enhanced/ @elastic/kibana-app
/x-pack/plugins/lens/ @elastic/kibana-app
/x-pack/plugins/graph/ @elastic/kibana-app
/src/legacy/server/url_shortening/ @elastic/kibana-app
/src/legacy/server/sample_data/ @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/plugins/dashboard/ @elastic/kibana-app
/src/plugins/discover/ @elastic/kibana-app
/src/plugins/input_control_vis/ @elastic/kibana-app
/src/plugins/kibana_legacy/ @elastic/kibana-app
/src/plugins/vis_default_editor/ @elastic/kibana-app
/src/plugins/vis_type_markdown/ @elastic/kibana-app
/src/plugins/vis_type_metric/ @elastic/kibana-app
/src/plugins/vis_type_table/ @elastic/kibana-app
/src/plugins/vis_type_tagcloud/ @elastic/kibana-app
/src/plugins/vis_type_timelion/ @elastic/kibana-app
/src/plugins/vis_type_timeseries/ @elastic/kibana-app
/src/plugins/vis_type_vega/ @elastic/kibana-app
/src/plugins/vis_type_vislib/ @elastic/kibana-app
/src/plugins/vis_type_xy/ @elastic/kibana-app
/src/plugins/visualize/ @elastic/kibana-app

# Core UI
# Exclude tutorials folder for now because they are not owned by Kibana app and most will move out soon
/src/plugins/home/public @elastic/kibana-core-ui
/src/plugins/home/server/*.ts @elastic/kibana-core-ui
/src/plugins/home/server/services/ @elastic/kibana-core-ui
# Exclude tutorial resources folder for now because they are not owned by Kibana app and most will move out soon
/src/legacy/core_plugins/kibana/public/home/*.ts @elastic/kibana-core-ui
/src/legacy/core_plugins/kibana/public/home/*.scss @elastic/kibana-core-ui
/src/legacy/core_plugins/kibana/public/home/np_ready/ @elastic/kibana-core-ui

# App Architecture
/examples/url_generators_examples/ @elastic/kibana-app-arch
/examples/url_generators_explorer/ @elastic/kibana-app-arch
/packages/kbn-interpreter/ @elastic/kibana-app-arch
/src/legacy/core_plugins/embeddable_api/ @elastic/kibana-app-arch
/src/legacy/core_plugins/interpreter/ @elastic/kibana-app-arch
/src/legacy/core_plugins/kibana_react/ @elastic/kibana-app-arch
/src/legacy/core_plugins/kibana/public/management/ @elastic/kibana-app-arch
/src/legacy/core_plugins/kibana/server/routes/api/management/ @elastic/kibana-app-arch
/src/legacy/core_plugins/visualizations/ @elastic/kibana-app-arch
/src/legacy/server/index_patterns/ @elastic/kibana-app-arch
/src/plugins/advanced_settings/ @elastic/kibana-app-arch
/src/plugins/bfetch/ @elastic/kibana-app-arch
/src/plugins/data/ @elastic/kibana-app-arch
/src/plugins/embeddable/ @elastic/kibana-app-arch
/src/plugins/expressions/ @elastic/kibana-app-arch
/src/plugins/inspector/ @elastic/kibana-app-arch
/src/plugins/kibana_react/ @elastic/kibana-app-arch
/src/plugins/kibana_react/public/code_editor @elastic/kibana-canvas
/src/plugins/kibana_utils/ @elastic/kibana-app-arch
/src/plugins/management/ @elastic/kibana-app-arch
/src/plugins/navigation/ @elastic/kibana-app-arch
/src/plugins/share/ @elastic/kibana-app-arch
/src/plugins/ui_actions/ @elastic/kibana-app-arch
/src/plugins/visualizations/ @elastic/kibana-app-arch
/x-pack/plugins/advanced_ui_actions/ @elastic/kibana-app-arch
/x-pack/plugins/data_enhanced/ @elastic/kibana-app-arch
/x-pack/plugins/drilldowns/ @elastic/kibana-app-arch

# APM
/x-pack/plugins/apm/ @elastic/apm-ui
/x-pack/plugins/apm/ @elastic/apm-ui
/x-pack/test/functional/apps/apm/ @elastic/apm-ui
/src/legacy/core_plugins/apm_oss/ @elastic/apm-ui
/src/plugins/apm_oss/ @elastic/apm-ui
/src/apm.js @watson

# Beats
/x-pack/legacy/plugins/beats_management/ @elastic/beats

# Canvas
/x-pack/plugins/canvas/ @elastic/kibana-canvas

# Observability UIs
/x-pack/legacy/plugins/infra/ @elastic/logs-metrics-ui
/x-pack/plugins/infra/ @elastic/logs-metrics-ui
/x-pack/plugins/ingest_manager/ @elastic/ingest-management
/x-pack/legacy/plugins/ingest_manager/ @elastic/ingest-management
/x-pack/plugins/observability/ @elastic/logs-metrics-ui @elastic/apm-ui @elastic/uptime @elastic/ingest-management
/x-pack/legacy/plugins/monitoring/ @elastic/stack-monitoring-ui
/x-pack/plugins/monitoring/ @elastic/stack-monitoring-ui
/x-pack/plugins/uptime @elastic/uptime

# Machine Learning
/x-pack/legacy/plugins/ml/ @elastic/ml-ui
/x-pack/plugins/ml/ @elastic/ml-ui
/x-pack/test/functional/apps/machine_learning/ @elastic/ml-ui
/x-pack/test/functional/services/machine_learning/ @elastic/ml-ui
/x-pack/test/functional/services/ml.ts @elastic/ml-ui
# ML team owns and maintains the transform plugin despite it living in the Elasticsearch management section.
/x-pack/plugins/transform/ @elastic/ml-ui
/x-pack/test/functional/apps/transform/ @elastic/ml-ui
/x-pack/test/functional/services/transform_ui/ @elastic/ml-ui
/x-pack/test/functional/services/transform.ts @elastic/ml-ui

# Maps
/x-pack/legacy/plugins/maps/ @elastic/kibana-gis
/x-pack/plugins/maps/ @elastic/kibana-gis
/x-pack/test/api_integration/apis/maps/ @elastic/kibana-gis
/x-pack/test/functional/apps/maps/ @elastic/kibana-gis
/x-pack/test/functional/es_archives/maps/ @elastic/kibana-gis
/x-pack/test/visual_regression/tests/maps/index.js @elastic/kibana-gis

# Operations
/src/dev/ @elastic/kibana-operations
/src/setup_node_env/ @elastic/kibana-operations
/src/optimize/ @elastic/kibana-operations
/src/es_archiver/ @elastic/kibana-operations
/packages/*eslint*/ @elastic/kibana-operations
/packages/*babel*/ @elastic/kibana-operations
/packages/kbn-dev-utils*/ @elastic/kibana-operations
/packages/kbn-es/ @elastic/kibana-operations
/packages/kbn-optimizer/ @elastic/kibana-operations
/packages/kbn-pm/ @elastic/kibana-operations
/packages/kbn-test/ @elastic/kibana-operations
/packages/kbn-ui-shared-deps/ @elastic/kibana-operations
/src/legacy/server/keystore/ @elastic/kibana-operations
/src/legacy/server/pid/ @elastic/kibana-operations
/src/legacy/server/sass/ @elastic/kibana-operations
/src/legacy/server/utils/ @elastic/kibana-operations
/src/legacy/server/warnings/ @elastic/kibana-operations

# Platform
/src/core/ @elastic/kibana-platform
/config/kibana.yml @elastic/kibana-platform
/x-pack/plugins/features/ @elastic/kibana-platform
/x-pack/plugins/licensing/ @elastic/kibana-platform
/packages/kbn-config-schema/ @elastic/kibana-platform
/src/legacy/server/config/ @elastic/kibana-platform
/src/legacy/server/http/ @elastic/kibana-platform
/src/legacy/server/logging/ @elastic/kibana-platform
/src/legacy/server/saved_objects/ @elastic/kibana-platform
/src/legacy/server/status/ @elastic/kibana-platform
/src/plugins/status_page/ @elastic/kibana-platform
/src/plugins/saved_objects_management/ @elastic/kibana-platform
/src/dev/run_check_published_api_changes.ts @elastic/kibana-platform

# Security
/src/core/server/csp/ @elastic/kibana-security @elastic/kibana-platform
/x-pack/legacy/plugins/security/ @elastic/kibana-security
/x-pack/legacy/plugins/spaces/ @elastic/kibana-security
/x-pack/plugins/spaces/ @elastic/kibana-security
/x-pack/legacy/plugins/encrypted_saved_objects/ @elastic/kibana-security
/x-pack/plugins/encrypted_saved_objects/ @elastic/kibana-security
/x-pack/plugins/security/ @elastic/kibana-security
/x-pack/test/api_integration/apis/security/ @elastic/kibana-security

# Kibana Localization
/src/dev/i18n/ @elastic/kibana-localization
/src/legacy/server/i18n/ @elastic/kibana-localization
/src/core/public/i18n/ @elastic/kibana-localization
/packages/kbn-i18n/ @elastic/kibana-localization

# Pulse
/packages/kbn-analytics/ @elastic/pulse
/src/legacy/core_plugins/ui_metric/ @elastic/pulse
/src/plugins/telemetry/ @elastic/pulse
/src/plugins/telemetry_collection_manager/ @elastic/pulse
/src/plugins/telemetry_management_section/ @elastic/pulse
/src/plugins/usage_collection/ @elastic/pulse
/x-pack/plugins/telemetry_collection_xpack/ @elastic/pulse

# Kibana Alerting Services
/x-pack/plugins/alerting/ @elastic/kibana-alerting-services
/x-pack/plugins/actions/ @elastic/kibana-alerting-services
/x-pack/plugins/event_log/ @elastic/kibana-alerting-services
/x-pack/plugins/task_manager/ @elastic/kibana-alerting-services
/x-pack/test/alerting_api_integration/ @elastic/kibana-alerting-services
/x-pack/test/plugin_api_integration/plugins/task_manager/ @elastic/kibana-alerting-services
/x-pack/test/plugin_api_integration/test_suites/task_manager/ @elastic/kibana-alerting-services
/x-pack/plugins/triggers_actions_ui/ @elastic/kibana-alerting-services
/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/ @elastic/kibana-alerting-services
/x-pack/test/functional_with_es_ssl/fixtures/plugins/alerts/ @elastic/kibana-alerting-services

# Design
**/*.scss @elastic/kibana-design

# Elasticsearch UI
/src/plugins/dev_tools/ @elastic/es-ui
/src/plugins/console/ @elastic/es-ui
/src/plugins/es_ui_shared/ @elastic/es-ui
/x-pack/legacy/plugins/cross_cluster_replication/ @elastic/es-ui
/x-pack/plugins/index_lifecycle_management/ @elastic/es-ui
/x-pack/legacy/plugins/index_management/ @elastic/es-ui
/x-pack/legacy/plugins/license_management/ @elastic/es-ui
/x-pack/legacy/plugins/rollup/ @elastic/es-ui
/x-pack/legacy/plugins/snapshot_restore/ @elastic/es-ui
/x-pack/legacy/plugins/upgrade_assistant/ @elastic/es-ui
/x-pack/plugins/console_extensions/ @elastic/es-ui
/x-pack/plugins/es_ui_shared/ @elastic/es-ui
/x-pack/plugins/grokdebugger/ @elastic/es-ui
/x-pack/plugins/index_management/ @elastic/es-ui
/x-pack/plugins/license_management/ @elastic/es-ui
/x-pack/plugins/painless_lab/ @elastic/es-ui
/x-pack/plugins/remote_clusters/ @elastic/es-ui
/x-pack/plugins/rollup/ @elastic/es-ui
/x-pack/plugins/searchprofiler/ @elastic/es-ui
/x-pack/plugins/snapshot_restore/ @elastic/es-ui
/x-pack/plugins/upgrade_assistant/ @elastic/es-ui
/x-pack/plugins/watcher/ @elastic/es-ui
/x-pack/plugins/ingest_pipelines/ @elastic/es-ui

# Endpoint
/x-pack/plugins/endpoint/ @elastic/endpoint-app-team @elastic/siem
/x-pack/test/api_integration/apis/endpoint/ @elastic/endpoint-app-team @elastic/siem
/x-pack/test/endpoint_api_integration_no_ingest/ @elastic/endpoint-app-team @elastic/siem
/x-pack/test/functional_endpoint/ @elastic/endpoint-app-team @elastic/siem
/x-pack/test/functional_endpoint_ingest_failure/ @elastic/endpoint-app-team @elastic/siem
/x-pack/test/functional/es_archives/endpoint/ @elastic/endpoint-app-team @elastic/siem
/x-pack/test/plugin_functional/plugins/resolver_test/ @elastic/endpoint-app-team @elastic/siem
/x-pack/test/plugin_functional/test_suites/resolver/ @elastic/endpoint-app-team @elastic/siem

# SIEM
/x-pack/plugins/siem/ @elastic/siem @elastic/endpoint-app-team
/x-pack/test/detection_engine_api_integration @elastic/siem @elastic/endpoint-app-team
/x-pack/test/api_integration/apis/siem @elastic/siem @elastic/endpoint-app-team
/x-pack/plugins/case @elastic/siem @elastic/endpoint-app-team
/x-pack/plugins/lists @elastic/siem @elastic/endpoint-app-team

# Security Intelligence And Analytics
/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules @elastic/security-intelligence-analytics
4 changes: 2 additions & 2 deletions .sass-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ files:
- '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/canvas/**/*.s+(a|c)ss'
- 'x-pack/plugins/triggers_actions_ui/**/*.s+(a|c)ss'
- 'x-pack/plugins/lens/**/*.s+(a|c)ss'
- 'x-pack/plugins/cross_cluster_replication/**/*.s+(a|c)ss'
- 'x-pack/legacy/plugins/maps/**/*.s+(a|c)ss'
- 'x-pack/plugins/maps/**/*.s+(a|c)ss'
ignore:
- 'x-pack/legacy/plugins/canvas/shareable_runtime/**/*.s+(a|c)ss'
- 'x-pack/plugins/canvas/shareable_runtime/**/*.s+(a|c)ss'
rules:
quotes:
- 2
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"test:ftr:server": "node scripts/functional_tests_server",
"test:ftr:runner": "node scripts/functional_test_runner",
"test:coverage": "grunt test:coverage",
"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",
"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",
"checkLicenses": "node scripts/check_licenses --dev",
"build": "node scripts/build --all-platforms",
"start": "node scripts/kibana --dev",
Expand Down
2 changes: 1 addition & 1 deletion src/cli/cluster/cluster_manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ export class ClusterManager {
fromRoot('x-pack/plugins/siem/cypress'),
fromRoot('x-pack/plugins/apm/e2e'),
fromRoot('x-pack/plugins/apm/scripts'),
fromRoot('x-pack/legacy/plugins/canvas/canvas_plugin_src'), // prevents server from restarting twice for Canvas plugin changes,
fromRoot('x-pack/plugins/canvas/canvas_plugin_src'), // prevents server from restarting twice for Canvas plugin changes,
'plugins/java_languageserver',
];

Expand Down
6 changes: 3 additions & 3 deletions src/dev/precommit_hook/casing_check_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ export const IGNORE_FILE_GLOBS = [
'**/Gruntfile.js',
'tasks/config/**/*',
'**/{Dockerfile,docker-compose.yml}',
'x-pack/legacy/plugins/canvas/tasks/**/*',
'x-pack/legacy/plugins/canvas/canvas_plugin_src/**/*',
'x-pack/plugins/canvas/tasks/**/*',
'x-pack/plugins/canvas/canvas_plugin_src/**/*',
'x-pack/plugins/monitoring/public/lib/jquery_flot/**/*',
'**/.*',
'**/{webpackShims,__mocks__}/**/*',
Expand All @@ -48,7 +48,7 @@ export const IGNORE_FILE_GLOBS = [
'vars/*',

// Files in this directory must match a pre-determined name in some cases.
'x-pack/legacy/plugins/canvas/.storybook/*',
'x-pack/plugins/canvas/.storybook/*',

// filename must match language code which requires capital letters
'**/translations/*.json',
Expand Down
2 changes: 1 addition & 1 deletion src/dev/storybook/aliases.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
export const storybookAliases = {
advanced_ui_actions: 'x-pack/plugins/advanced_ui_actions/scripts/storybook.js',
apm: 'x-pack/plugins/apm/scripts/storybook.js',
canvas: 'x-pack/legacy/plugins/canvas/scripts/storybook_new.js',
canvas: 'x-pack/plugins/canvas/scripts/storybook_new.js',
codeeditor: 'src/plugins/kibana_react/public/code_editor/scripts/storybook.ts',
dashboard_enhanced: 'x-pack/plugins/dashboard_enhanced/scripts/storybook.js',
drilldowns: 'x-pack/plugins/drilldowns/scripts/storybook.js',
Expand Down
2 changes: 1 addition & 1 deletion x-pack/.i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"xpack.alertingBuiltins": "plugins/alerting_builtins",
"xpack.apm": ["legacy/plugins/apm", "plugins/apm"],
"xpack.beatsManagement": "legacy/plugins/beats_management",
"xpack.canvas": "legacy/plugins/canvas",
"xpack.canvas": "plugins/canvas",
"xpack.dashboard": "plugins/dashboard_enhanced",
"xpack.crossClusterReplication": "plugins/cross_cluster_replication",
"xpack.dashboardMode": "legacy/plugins/dashboard_mode",
Expand Down
4 changes: 2 additions & 2 deletions x-pack/.kibana-plugin-helpers.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
"!legacy/plugins/**/__snapshots__",
"!legacy/plugins/**/__snapshots__/*",
"!legacy/plugins/**/__mocks__/*",
"!legacy/plugins/canvas/shareable_runtime/test",
"!legacy/plugins/canvas/shareable_runtime/test/**/*"
"!plugins/canvas/shareable_runtime/test",
"!plugins/canvas/shareable_runtime/test/**/*"
],
"skipInstallDependencies": true
}
Loading

0 comments on commit 04f439e

Please sign in to comment.