From e30afbd3826932f402c2ebf836d1b61d9a8d5040 Mon Sep 17 00:00:00 2001 From: Gerard Soldevila Date: Mon, 9 Dec 2024 17:04:40 +0100 Subject: [PATCH] Relocating module `@kbn/monitoring-collection-plugin` --- .github/CODEOWNERS | 2 +- docs/developer/plugin-list.asciidoc | 2 +- package.json | 2 +- tsconfig.base.json | 4 ++-- .../plugins/private}/monitoring_collection/README.md | 0 .../plugins/private}/monitoring_collection/jest.config.js | 8 ++++---- .../plugins/private}/monitoring_collection/kibana.jsonc | 0 .../private}/monitoring_collection/server/config.ts | 0 .../private}/monitoring_collection/server/constants.ts | 0 .../private}/monitoring_collection/server/index.ts | 0 .../server/lib/get_es_cluster_uuid.test.ts | 0 .../server/lib/get_es_cluster_uuid.ts | 0 .../server/lib/get_kibana_stats.test.ts | 0 .../monitoring_collection/server/lib/get_kibana_stats.ts | 0 .../private}/monitoring_collection/server/lib/index.ts | 0 .../server/lib/prometheus_exporter.ts | 0 .../private}/monitoring_collection/server/mocks.ts | 0 .../private}/monitoring_collection/server/plugin.test.ts | 0 .../private}/monitoring_collection/server/plugin.ts | 0 .../api/v1/dynamic_route/get_metrics_by_type.test.ts | 0 .../routes/api/v1/dynamic_route/get_metrics_by_type.ts | 0 .../server/routes/api/v1/dynamic_route/index.ts | 0 .../monitoring_collection/server/routes/api/v1/index.ts | 0 .../server/routes/api/v1/prometheus/get_metrics.test.ts | 0 .../server/routes/api/v1/prometheus/get_metrics.ts | 0 .../server/routes/api/v1/prometheus/index.ts | 0 .../private}/monitoring_collection/server/routes/index.ts | 0 .../plugins/private}/monitoring_collection/tsconfig.json | 2 +- yarn.lock | 2 +- 29 files changed, 11 insertions(+), 11 deletions(-) rename x-pack/{plugins => platform/plugins/private}/monitoring_collection/README.md (100%) rename x-pack/{plugins => platform/plugins/private}/monitoring_collection/jest.config.js (61%) rename x-pack/{plugins => platform/plugins/private}/monitoring_collection/kibana.jsonc (100%) rename x-pack/{plugins => platform/plugins/private}/monitoring_collection/server/config.ts (100%) rename x-pack/{plugins => platform/plugins/private}/monitoring_collection/server/constants.ts (100%) rename x-pack/{plugins => platform/plugins/private}/monitoring_collection/server/index.ts (100%) rename x-pack/{plugins => platform/plugins/private}/monitoring_collection/server/lib/get_es_cluster_uuid.test.ts (100%) rename x-pack/{plugins => platform/plugins/private}/monitoring_collection/server/lib/get_es_cluster_uuid.ts (100%) rename x-pack/{plugins => platform/plugins/private}/monitoring_collection/server/lib/get_kibana_stats.test.ts (100%) rename x-pack/{plugins => platform/plugins/private}/monitoring_collection/server/lib/get_kibana_stats.ts (100%) rename x-pack/{plugins => platform/plugins/private}/monitoring_collection/server/lib/index.ts (100%) rename x-pack/{plugins => platform/plugins/private}/monitoring_collection/server/lib/prometheus_exporter.ts (100%) rename x-pack/{plugins => platform/plugins/private}/monitoring_collection/server/mocks.ts (100%) rename x-pack/{plugins => platform/plugins/private}/monitoring_collection/server/plugin.test.ts (100%) rename x-pack/{plugins => platform/plugins/private}/monitoring_collection/server/plugin.ts (100%) rename x-pack/{plugins => platform/plugins/private}/monitoring_collection/server/routes/api/v1/dynamic_route/get_metrics_by_type.test.ts (100%) rename x-pack/{plugins => platform/plugins/private}/monitoring_collection/server/routes/api/v1/dynamic_route/get_metrics_by_type.ts (100%) rename x-pack/{plugins => platform/plugins/private}/monitoring_collection/server/routes/api/v1/dynamic_route/index.ts (100%) rename x-pack/{plugins => platform/plugins/private}/monitoring_collection/server/routes/api/v1/index.ts (100%) rename x-pack/{plugins => platform/plugins/private}/monitoring_collection/server/routes/api/v1/prometheus/get_metrics.test.ts (100%) rename x-pack/{plugins => platform/plugins/private}/monitoring_collection/server/routes/api/v1/prometheus/get_metrics.ts (100%) rename x-pack/{plugins => platform/plugins/private}/monitoring_collection/server/routes/api/v1/prometheus/index.ts (100%) rename x-pack/{plugins => platform/plugins/private}/monitoring_collection/server/routes/index.ts (100%) rename x-pack/{plugins => platform/plugins/private}/monitoring_collection/tsconfig.json (87%) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 320b4eb868eb7..ea40d137cd8e5 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -867,6 +867,7 @@ x-pack/packages/security/role_management_model @elastic/kibana-security x-pack/packages/security/ui_components @elastic/kibana-security x-pack/performance @elastic/appex-qa x-pack/platform/packages/shared/kbn-entities-schema @elastic/obs-entities +x-pack/platform/plugins/private/monitoring_collection @elastic/stack-monitoring x-pack/platform/plugins/shared/entity_manager @elastic/obs-entities x-pack/plugins/actions @elastic/response-ops x-pack/plugins/ai_infra/llm_tasks @elastic/appex-ai-infra @@ -923,7 +924,6 @@ x-pack/plugins/logstash @elastic/logstash x-pack/plugins/maps @elastic/kibana-presentation x-pack/plugins/ml @elastic/ml-ui x-pack/plugins/monitoring @elastic/stack-monitoring -x-pack/plugins/monitoring_collection @elastic/stack-monitoring x-pack/plugins/notifications @elastic/appex-sharedux x-pack/plugins/observability_solution/apm @elastic/obs-ux-infra_services-team x-pack/plugins/observability_solution/apm_data_access @elastic/obs-ux-infra_services-team diff --git a/docs/developer/plugin-list.asciidoc b/docs/developer/plugin-list.asciidoc index dc65c9df54e92..5fd39dbd9767a 100644 --- a/docs/developer/plugin-list.asciidoc +++ b/docs/developer/plugin-list.asciidoc @@ -735,7 +735,7 @@ Elastic. |This plugin provides the Stack Monitoring kibana application. -|{kib-repo}blob/{branch}/x-pack/plugins/monitoring_collection/README.md[monitoringCollection] +|{kib-repo}blob/{branch}/x-pack/platform/plugins/private/monitoring_collection/README.md[monitoringCollection] |This plugin allows for other plugins to add data to Kibana stack monitoring documents. diff --git a/package.json b/package.json index d628499e5bf22..f13b650ed601d 100644 --- a/package.json +++ b/package.json @@ -683,7 +683,7 @@ "@kbn/ml-url-state": "link:x-pack/packages/ml/url_state", "@kbn/ml-validators": "link:x-pack/packages/ml/validators", "@kbn/monaco": "link:packages/kbn-monaco", - "@kbn/monitoring-collection-plugin": "link:x-pack/plugins/monitoring_collection", + "@kbn/monitoring-collection-plugin": "link:x-pack/platform/plugins/private/monitoring_collection", "@kbn/monitoring-plugin": "link:x-pack/plugins/monitoring", "@kbn/navigation-plugin": "link:src/plugins/navigation", "@kbn/newsfeed-plugin": "link:src/plugins/newsfeed", diff --git a/tsconfig.base.json b/tsconfig.base.json index 7d1f6ea696819..c6ab8f93a4f60 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -1298,8 +1298,8 @@ "@kbn/mock-idp-utils/*": ["packages/kbn-mock-idp-utils/*"], "@kbn/monaco": ["packages/kbn-monaco"], "@kbn/monaco/*": ["packages/kbn-monaco/*"], - "@kbn/monitoring-collection-plugin": ["x-pack/plugins/monitoring_collection"], - "@kbn/monitoring-collection-plugin/*": ["x-pack/plugins/monitoring_collection/*"], + "@kbn/monitoring-collection-plugin": ["x-pack/platform/plugins/private/monitoring_collection"], + "@kbn/monitoring-collection-plugin/*": ["x-pack/platform/plugins/private/monitoring_collection/*"], "@kbn/monitoring-plugin": ["x-pack/plugins/monitoring"], "@kbn/monitoring-plugin/*": ["x-pack/plugins/monitoring/*"], "@kbn/navigation-plugin": ["src/plugins/navigation"], diff --git a/x-pack/plugins/monitoring_collection/README.md b/x-pack/platform/plugins/private/monitoring_collection/README.md similarity index 100% rename from x-pack/plugins/monitoring_collection/README.md rename to x-pack/platform/plugins/private/monitoring_collection/README.md diff --git a/x-pack/plugins/monitoring_collection/jest.config.js b/x-pack/platform/plugins/private/monitoring_collection/jest.config.js similarity index 61% rename from x-pack/plugins/monitoring_collection/jest.config.js rename to x-pack/platform/plugins/private/monitoring_collection/jest.config.js index d2bb0617857d2..1108368ade89f 100644 --- a/x-pack/plugins/monitoring_collection/jest.config.js +++ b/x-pack/platform/plugins/private/monitoring_collection/jest.config.js @@ -7,11 +7,11 @@ module.exports = { preset: '@kbn/test', - rootDir: '../../..', - roots: ['/x-pack/plugins/monitoring_collection'], - coverageDirectory: '/target/kibana-coverage/jest/x-pack/plugins/monitoring_collection', + rootDir: '../../../../..', + roots: ['/x-pack/platform/plugins/private/monitoring_collection'], + coverageDirectory: '/target/kibana-coverage/jest/x-pack/platform/plugins/private/monitoring_collection', coverageReporters: ['text', 'html'], collectCoverageFrom: [ - '/x-pack/plugins/monitoring_collection/{common,public,server}/**/*.{js,ts,tsx}', + '/x-pack/platform/plugins/private/monitoring_collection/{common,public,server}/**/*.{js,ts,tsx}', ], }; diff --git a/x-pack/plugins/monitoring_collection/kibana.jsonc b/x-pack/platform/plugins/private/monitoring_collection/kibana.jsonc similarity index 100% rename from x-pack/plugins/monitoring_collection/kibana.jsonc rename to x-pack/platform/plugins/private/monitoring_collection/kibana.jsonc diff --git a/x-pack/plugins/monitoring_collection/server/config.ts b/x-pack/platform/plugins/private/monitoring_collection/server/config.ts similarity index 100% rename from x-pack/plugins/monitoring_collection/server/config.ts rename to x-pack/platform/plugins/private/monitoring_collection/server/config.ts diff --git a/x-pack/plugins/monitoring_collection/server/constants.ts b/x-pack/platform/plugins/private/monitoring_collection/server/constants.ts similarity index 100% rename from x-pack/plugins/monitoring_collection/server/constants.ts rename to x-pack/platform/plugins/private/monitoring_collection/server/constants.ts diff --git a/x-pack/plugins/monitoring_collection/server/index.ts b/x-pack/platform/plugins/private/monitoring_collection/server/index.ts similarity index 100% rename from x-pack/plugins/monitoring_collection/server/index.ts rename to x-pack/platform/plugins/private/monitoring_collection/server/index.ts diff --git a/x-pack/plugins/monitoring_collection/server/lib/get_es_cluster_uuid.test.ts b/x-pack/platform/plugins/private/monitoring_collection/server/lib/get_es_cluster_uuid.test.ts similarity index 100% rename from x-pack/plugins/monitoring_collection/server/lib/get_es_cluster_uuid.test.ts rename to x-pack/platform/plugins/private/monitoring_collection/server/lib/get_es_cluster_uuid.test.ts diff --git a/x-pack/plugins/monitoring_collection/server/lib/get_es_cluster_uuid.ts b/x-pack/platform/plugins/private/monitoring_collection/server/lib/get_es_cluster_uuid.ts similarity index 100% rename from x-pack/plugins/monitoring_collection/server/lib/get_es_cluster_uuid.ts rename to x-pack/platform/plugins/private/monitoring_collection/server/lib/get_es_cluster_uuid.ts diff --git a/x-pack/plugins/monitoring_collection/server/lib/get_kibana_stats.test.ts b/x-pack/platform/plugins/private/monitoring_collection/server/lib/get_kibana_stats.test.ts similarity index 100% rename from x-pack/plugins/monitoring_collection/server/lib/get_kibana_stats.test.ts rename to x-pack/platform/plugins/private/monitoring_collection/server/lib/get_kibana_stats.test.ts diff --git a/x-pack/plugins/monitoring_collection/server/lib/get_kibana_stats.ts b/x-pack/platform/plugins/private/monitoring_collection/server/lib/get_kibana_stats.ts similarity index 100% rename from x-pack/plugins/monitoring_collection/server/lib/get_kibana_stats.ts rename to x-pack/platform/plugins/private/monitoring_collection/server/lib/get_kibana_stats.ts diff --git a/x-pack/plugins/monitoring_collection/server/lib/index.ts b/x-pack/platform/plugins/private/monitoring_collection/server/lib/index.ts similarity index 100% rename from x-pack/plugins/monitoring_collection/server/lib/index.ts rename to x-pack/platform/plugins/private/monitoring_collection/server/lib/index.ts diff --git a/x-pack/plugins/monitoring_collection/server/lib/prometheus_exporter.ts b/x-pack/platform/plugins/private/monitoring_collection/server/lib/prometheus_exporter.ts similarity index 100% rename from x-pack/plugins/monitoring_collection/server/lib/prometheus_exporter.ts rename to x-pack/platform/plugins/private/monitoring_collection/server/lib/prometheus_exporter.ts diff --git a/x-pack/plugins/monitoring_collection/server/mocks.ts b/x-pack/platform/plugins/private/monitoring_collection/server/mocks.ts similarity index 100% rename from x-pack/plugins/monitoring_collection/server/mocks.ts rename to x-pack/platform/plugins/private/monitoring_collection/server/mocks.ts diff --git a/x-pack/plugins/monitoring_collection/server/plugin.test.ts b/x-pack/platform/plugins/private/monitoring_collection/server/plugin.test.ts similarity index 100% rename from x-pack/plugins/monitoring_collection/server/plugin.test.ts rename to x-pack/platform/plugins/private/monitoring_collection/server/plugin.test.ts diff --git a/x-pack/plugins/monitoring_collection/server/plugin.ts b/x-pack/platform/plugins/private/monitoring_collection/server/plugin.ts similarity index 100% rename from x-pack/plugins/monitoring_collection/server/plugin.ts rename to x-pack/platform/plugins/private/monitoring_collection/server/plugin.ts diff --git a/x-pack/plugins/monitoring_collection/server/routes/api/v1/dynamic_route/get_metrics_by_type.test.ts b/x-pack/platform/plugins/private/monitoring_collection/server/routes/api/v1/dynamic_route/get_metrics_by_type.test.ts similarity index 100% rename from x-pack/plugins/monitoring_collection/server/routes/api/v1/dynamic_route/get_metrics_by_type.test.ts rename to x-pack/platform/plugins/private/monitoring_collection/server/routes/api/v1/dynamic_route/get_metrics_by_type.test.ts diff --git a/x-pack/plugins/monitoring_collection/server/routes/api/v1/dynamic_route/get_metrics_by_type.ts b/x-pack/platform/plugins/private/monitoring_collection/server/routes/api/v1/dynamic_route/get_metrics_by_type.ts similarity index 100% rename from x-pack/plugins/monitoring_collection/server/routes/api/v1/dynamic_route/get_metrics_by_type.ts rename to x-pack/platform/plugins/private/monitoring_collection/server/routes/api/v1/dynamic_route/get_metrics_by_type.ts diff --git a/x-pack/plugins/monitoring_collection/server/routes/api/v1/dynamic_route/index.ts b/x-pack/platform/plugins/private/monitoring_collection/server/routes/api/v1/dynamic_route/index.ts similarity index 100% rename from x-pack/plugins/monitoring_collection/server/routes/api/v1/dynamic_route/index.ts rename to x-pack/platform/plugins/private/monitoring_collection/server/routes/api/v1/dynamic_route/index.ts diff --git a/x-pack/plugins/monitoring_collection/server/routes/api/v1/index.ts b/x-pack/platform/plugins/private/monitoring_collection/server/routes/api/v1/index.ts similarity index 100% rename from x-pack/plugins/monitoring_collection/server/routes/api/v1/index.ts rename to x-pack/platform/plugins/private/monitoring_collection/server/routes/api/v1/index.ts diff --git a/x-pack/plugins/monitoring_collection/server/routes/api/v1/prometheus/get_metrics.test.ts b/x-pack/platform/plugins/private/monitoring_collection/server/routes/api/v1/prometheus/get_metrics.test.ts similarity index 100% rename from x-pack/plugins/monitoring_collection/server/routes/api/v1/prometheus/get_metrics.test.ts rename to x-pack/platform/plugins/private/monitoring_collection/server/routes/api/v1/prometheus/get_metrics.test.ts diff --git a/x-pack/plugins/monitoring_collection/server/routes/api/v1/prometheus/get_metrics.ts b/x-pack/platform/plugins/private/monitoring_collection/server/routes/api/v1/prometheus/get_metrics.ts similarity index 100% rename from x-pack/plugins/monitoring_collection/server/routes/api/v1/prometheus/get_metrics.ts rename to x-pack/platform/plugins/private/monitoring_collection/server/routes/api/v1/prometheus/get_metrics.ts diff --git a/x-pack/plugins/monitoring_collection/server/routes/api/v1/prometheus/index.ts b/x-pack/platform/plugins/private/monitoring_collection/server/routes/api/v1/prometheus/index.ts similarity index 100% rename from x-pack/plugins/monitoring_collection/server/routes/api/v1/prometheus/index.ts rename to x-pack/platform/plugins/private/monitoring_collection/server/routes/api/v1/prometheus/index.ts diff --git a/x-pack/plugins/monitoring_collection/server/routes/index.ts b/x-pack/platform/plugins/private/monitoring_collection/server/routes/index.ts similarity index 100% rename from x-pack/plugins/monitoring_collection/server/routes/index.ts rename to x-pack/platform/plugins/private/monitoring_collection/server/routes/index.ts diff --git a/x-pack/plugins/monitoring_collection/tsconfig.json b/x-pack/platform/plugins/private/monitoring_collection/tsconfig.json similarity index 87% rename from x-pack/plugins/monitoring_collection/tsconfig.json rename to x-pack/platform/plugins/private/monitoring_collection/tsconfig.json index 7e27b29c24c9c..a863a06a8a0dc 100644 --- a/x-pack/plugins/monitoring_collection/tsconfig.json +++ b/x-pack/platform/plugins/private/monitoring_collection/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../../tsconfig.base.json", + "extends": "../../../../../tsconfig.base.json", "compilerOptions": { "outDir": "target/types", }, diff --git a/yarn.lock b/yarn.lock index df4c2f65299f2..1395dd63a56b9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6412,7 +6412,7 @@ version "0.0.0" uid "" -"@kbn/monitoring-collection-plugin@link:x-pack/plugins/monitoring_collection": +"@kbn/monitoring-collection-plugin@link:x-pack/platform/plugins/private/monitoring_collection": version "0.0.0" uid ""