diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 5fcb619af6570..c91d1a702b7ec 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -315,7 +315,6 @@ /src/plugins/es_ui_shared/ @elastic/kibana-stack-management /x-pack/plugins/cross_cluster_replication/ @elastic/kibana-stack-management /x-pack/plugins/index_lifecycle_management/ @elastic/kibana-stack-management -/x-pack/plugins/console_extensions/ @elastic/kibana-stack-management /x-pack/plugins/grokdebugger/ @elastic/kibana-stack-management /x-pack/plugins/index_management/ @elastic/kibana-stack-management /x-pack/plugins/license_api_guard/ @elastic/kibana-stack-management @@ -330,7 +329,6 @@ /x-pack/plugins/ingest_pipelines/ @elastic/kibana-stack-management /packages/kbn-ace/ @elastic/kibana-stack-management /packages/kbn-monaco/ @elastic/kibana-stack-management -#CC# /x-pack/plugins/console_extensions/ @elastic/kibana-stack-management #CC# /x-pack/plugins/cross_cluster_replication/ @elastic/kibana-stack-management # Security Solution diff --git a/.github/workflows/project-assigner.yml b/.github/workflows/project-assigner.yml index 4966a0b506317..f4e62648a9741 100644 --- a/.github/workflows/project-assigner.yml +++ b/.github/workflows/project-assigner.yml @@ -8,8 +8,16 @@ jobs: name: Assign issue or PR to project based on label steps: - name: Assign to project - uses: elastic/github-actions/project-assigner@v2.0.0 + uses: elastic/github-actions/project-assigner@v2.1.0 id: project_assigner with: - issue-mappings: '[{"label": "Feature:Lens", "projectNumber": 32, "columnName": "Long-term goals"}, {"label": "Feature:Canvas", "projectNumber": 38, "columnName": "Inbox"}, {"label": "Feature:Dashboard", "projectNumber": 68, "columnName": "Inbox"}, {"label": "Feature:Drilldowns", "projectNumber": 68, "columnName": "Inbox"}, {"label": "Feature:Input Controls", "projectNumber": 72, "columnName": "Inbox"}]' + issue-mappings: | + [ + {"label": "Feature:Lens", "projectNumber": 32, "columnName": "Long-term goals"}, + {"label": "Feature:Canvas", "projectNumber": 38, "columnName": "Inbox"}, + {"label": "Feature:Dashboard", "projectNumber": 68, "columnName": "Inbox"}, + {"label": "Feature:Drilldowns", "projectNumber": 68, "columnName": "Inbox"}, + {"label": "Feature:Input Controls", "projectNumber": 72, "columnName": "Inbox"}, + {"label": "Team:Security", "projectNumber": 320, "columnName": "Awaiting triage", "projectScope": "org"} + ] ghToken: ${{ secrets.PROJECT_ASSIGNER_TOKEN }} diff --git a/config/kibana.yml b/config/kibana.yml index eefb6bb8bacda..dea9849f17b28 100644 --- a/config/kibana.yml +++ b/config/kibana.yml @@ -42,6 +42,10 @@ #elasticsearch.username: "kibana_system" #elasticsearch.password: "pass" +# Kibana can also authenticate to Elasticsearch via "service account tokens". +# If may use this token instead of a username/password. +# elasticsearch.serviceAccountToken: "my_token" + # Enables SSL and paths to the PEM-format SSL certificate and SSL key files, respectively. # These settings enable SSL for outgoing requests from the Kibana server to the browser. #server.ssl.enabled: false diff --git a/docs/apm/agent-configuration.asciidoc b/docs/apm/agent-configuration.asciidoc index 2574d254ac14c..f2e07412c4a38 100644 --- a/docs/apm/agent-configuration.asciidoc +++ b/docs/apm/agent-configuration.asciidoc @@ -43,6 +43,7 @@ Supported configurations are also tagged with the image:./images/dynamic-config. [horizontal] Go Agent:: {apm-go-ref}/configuration.html[Configuration reference] +iOS agent:: _Not yet supported_ Java Agent:: {apm-java-ref}/configuration.html[Configuration reference] .NET Agent:: {apm-dotnet-ref}/configuration.html[Configuration reference] Node.js Agent:: {apm-node-ref}/configuration.html[Configuration reference] diff --git a/docs/apm/apm-alerts.asciidoc b/docs/apm/apm-alerts.asciidoc index 3e3e2b178ff10..42016ac08bfc7 100644 --- a/docs/apm/apm-alerts.asciidoc +++ b/docs/apm/apm-alerts.asciidoc @@ -1,69 +1,57 @@ [role="xpack"] [[apm-alerts]] -=== Alerts +=== Alerts and rules ++++ Create an alert ++++ +The APM app allows you to define **rules** to detect complex conditions within your APM data +and trigger built-in **actions** when those conditions are met. -The APM app integrates with Kibana's {kibana-ref}/alerting-getting-started.html[alerting and actions] feature. -It provides a set of built-in **actions** and APM specific threshold **alerts** for you to use -and enables central management of all alerts from <>. +The following **rules** are supported: + +* Latency anomaly rule: +Alert when latency of a service is abnormal +* Transaction error rate threshold rule: +Alert when the service's transaction error rate is above the defined threshold +* Error count threshold rule: +Alert when the number of errors in a service exceeds a defined threshold [role="screenshot"] image::apm/images/apm-alert.png[Create an alert in the APM app] -For a walkthrough of the alert flyout panel, including detailed information on each configurable property, -see Kibana's <>. - -The APM app supports four different types of alerts: - -* Transaction duration anomaly: -alerts when the service's transaction duration reaches a certain anomaly score -* Transaction duration threshold: -alerts when the service's transaction duration exceeds a given time limit over a given time frame -* Transaction error rate threshold: -alerts when the service's transaction error rate is above the selected rate over a given time frame -* Error count threshold: -alerts when service exceeds a selected number of errors over a given time frame +For a complete walkthrough of the **Create rule** flyout panel, including detailed information on each configurable property, +see Kibana's <>. -Below, we'll walk through the creation of two of these alerts. +Below, we'll walk through the creation of two APM rules. [float] [[apm-create-transaction-alert]] -=== Example: create a transaction duration alert +=== Example: create a latency anomaly rule -Transaction duration alerts trigger when the duration of a specific transaction type in a service exceeds a defined threshold. -This guide will create an alert for the `opbeans-java` service based on the following criteria: +Latency anomaly rules trigger when the latency of a service is abnormal. +This guide will create an alert for all services based on the following criteria: -* Environment: Production -* Transaction type: `transaction.type:request` -* Average request is above `1500ms` for the last 5 minutes -* Check every 10 minutes, and repeat the alert every 30 minutes -* Send the alert via Slack +* Environment: production +* Severity level: critical +* Run every five minutes +* Send an alert to a Slack channel only when the rule status changes -From the APM app, navigate to the `opbeans-java` service and select -**Alerts** > **Create threshold alert** > **Transaction duration**. +From any page in the APM app, select **Alerts and rules** > **Latency** > **Create anomaly rule**. +Change the name of the alert, but do not edit the tags. -`Transaction duration | opbeans-java` is automatically set as the name of the alert, -and `apm` and `service.name:opbeans-java` are added as tags. -It's fine to change the name of the alert, but do not edit the tags. +Based on the criteria above, define the following rule details: -Based on the alert criteria, define the following alert details: +* **Check every** - `5 minutes` +* **Notify** - "Only on status change" +* **Environment** - `all` +* **Has anomaly with severity** - `critical` -* **Check every** - `10 minutes` -* **Notify every** - `30 minutes` -* **TYPE** - `request` -* **WHEN** - `avg` -* **IS ABOVE** - `1500ms` -* **FOR THE LAST** - `5 minutes` - -Select an action type. -Multiple action types can be selected, but in this example, we want to post to a Slack channel. +Next, add a connector. Multiple connectors can be selected, but in this example we're interested in Slack. Select **Slack** > **Create a connector**. Enter a name for the connector, -and paste the webhook URL. +and paste your Slack webhook URL. See Slack's webhook documentation if you need to create one. A default message is provided as a starting point for your alert. @@ -72,35 +60,32 @@ to pass additional alert values at the time a condition is detected to an action A list of available variables can be accessed by selecting the **add variable** button image:apm/images/add-variable.png[add variable button]. -Select **Save**. The alert has been created and is now active! +Click **Save**. The rule has been created and is now active! [float] [[apm-create-error-alert]] -=== Example: create an error rate alert +=== Example: create an error count threshold alert -Error rate alerts trigger when the number of errors in a service exceeds a defined threshold. -This guide creates an alert for the `opbeans-python` service based on the following criteria: +The error count threshold alert triggers when the number of errors in a service exceeds a defined threshold. +This guide will create an alert for all services based on the following criteria: -* Environment: Production +* All environments * Error rate is above 25 for the last minute -* Check every 1 minute, and repeat the alert every 10 minutes -* Send the alert via email to the `opbeans-python` team - -From the APM app, navigate to the `opbeans-python` service and select -**Alerts** > **Create threshold alert** > **Error rate**. +* Check every 1 minute, and alert every time the rule is active +* Send the alert via email to the site reliability team -`Error rate | opbeans-python` is automatically set as the name of the alert, -and `apm` and `service.name:opbeans-python` are added as tags. -It's fine to change the name of the alert, but do not edit the tags. +From any page in the APM app, select **Alerts and rules** > **Error count** > **Create threshold rule**. +Change the name of the alert, but do not edit the tags. -Based on the alert criteria, define the following alert details: +Based on the criteria above, define the following rule details: * **Check every** - `1 minute` -* **Notify every** - `10 minutes` -* **IS ABOVE** - `25 errors` -* **FOR THE LAST** - `1 minute` +* **Notify** - "Every time alert is active" +* **Environment** - `all` +* **Is above** - `25 errors` +* **For the last** - `1 minute` -Select the **Email** action type and click **Create a connector**. +Select the **Email** connector and click **Create a connector**. Fill out the required details: sender, host, port, etc., and click **save**. A default message is provided as a starting point for your alert. @@ -109,14 +94,14 @@ to pass additional alert values at the time a condition is detected to an action A list of available variables can be accessed by selecting the **add variable** button image:apm/images/add-variable.png[add variable button]. -Select **Save**. The alert has been created and is now active! +Click **Save**. The alert has been created and is now active! [float] [[apm-alert-manage]] -=== Manage alerts and actions +=== Manage alerts and rules -From the APM app, select **Alerts** > **View active alerts** to be taken to the Kibana alerts and actions management page. -From this page, you can create, edit, disable, mute, and delete alerts, and create, edit, and disable connectors. +From the APM app, select **Alerts and rules** > **Manage rules** to be taken to the Kibana **Rules and Connectors** page. +From this page, you can disable, mute, and delete APM alerts. [float] [[apm-alert-more-info]] @@ -126,4 +111,4 @@ See {kibana-ref}/alerting-getting-started.html[alerting and actions] for more in NOTE: If you are using an **on-premise** Elastic Stack deployment with security, communication between Elasticsearch and Kibana must have TLS configured. -More information is in the alerting {kibana-ref}/alerting-setup.html#alerting-prerequisites[prerequisites]. \ No newline at end of file +More information is in the alerting {kibana-ref}/alerting-setup.html#alerting-prerequisites[prerequisites]. diff --git a/docs/apm/filters.asciidoc b/docs/apm/filters.asciidoc index 56602ab7c05c9..c0ea81c87378b 100644 --- a/docs/apm/filters.asciidoc +++ b/docs/apm/filters.asciidoc @@ -36,6 +36,7 @@ It's vital to be consistent when naming environments in your agents. To learn how to configure service environments, see the specific agent documentation: * *Go:* {apm-go-ref}/configuration.html#config-environment[`ELASTIC_APM_ENVIRONMENT`] +* *iOS agent:* _Not yet supported_ * *Java:* {apm-java-ref}/config-core.html#config-environment[`environment`] * *.NET:* {apm-dotnet-ref}/config-core.html#config-environment[`Environment`] * *Node.js:* {apm-node-ref}/configuration.html#environment[`environment`] diff --git a/docs/apm/images/apm-agent-configuration.png b/docs/apm/images/apm-agent-configuration.png index 07398f0609187..22fd9d75c3d73 100644 Binary files a/docs/apm/images/apm-agent-configuration.png and b/docs/apm/images/apm-agent-configuration.png differ diff --git a/docs/apm/images/apm-alert.png b/docs/apm/images/apm-alert.png index 2ac91b6b19219..a845d65dd24a5 100644 Binary files a/docs/apm/images/apm-alert.png and b/docs/apm/images/apm-alert.png differ diff --git a/docs/apm/images/apm-error-group.png b/docs/apm/images/apm-error-group.png index 359bdc6b704e9..1326e97f757d6 100644 Binary files a/docs/apm/images/apm-error-group.png and b/docs/apm/images/apm-error-group.png differ diff --git a/docs/apm/images/apm-logs-tab.png b/docs/apm/images/apm-logs-tab.png index 77aecf744bc7f..891d2b7a1dd69 100644 Binary files a/docs/apm/images/apm-logs-tab.png and b/docs/apm/images/apm-logs-tab.png differ diff --git a/docs/apm/images/apm-services-overview.png b/docs/apm/images/apm-services-overview.png index 1c16ac5b572c3..7aeb5f1ac379f 100644 Binary files a/docs/apm/images/apm-services-overview.png and b/docs/apm/images/apm-services-overview.png differ diff --git a/docs/apm/images/apm-settings.png b/docs/apm/images/apm-settings.png index c821b7fb76e79..2201ed5fcaa72 100644 Binary files a/docs/apm/images/apm-settings.png and b/docs/apm/images/apm-settings.png differ diff --git a/docs/apm/images/apm-span-detail.png b/docs/apm/images/apm-span-detail.png index bacb2d372c166..c9f55575b2232 100644 Binary files a/docs/apm/images/apm-span-detail.png and b/docs/apm/images/apm-span-detail.png differ diff --git a/docs/apm/images/apm-traces.png b/docs/apm/images/apm-traces.png index 0e9062ee448b4..ee16f9ed16a18 100644 Binary files a/docs/apm/images/apm-traces.png and b/docs/apm/images/apm-traces.png differ diff --git a/docs/apm/images/apm-transaction-duration-dist.png b/docs/apm/images/apm-transaction-duration-dist.png index 863f493f20db4..91ae6c3a59ad2 100644 Binary files a/docs/apm/images/apm-transaction-duration-dist.png and b/docs/apm/images/apm-transaction-duration-dist.png differ diff --git a/docs/apm/images/apm-transaction-response-dist.png b/docs/apm/images/apm-transaction-response-dist.png index 2f3e69f263a28..70e5ad7041287 100644 Binary files a/docs/apm/images/apm-transaction-response-dist.png and b/docs/apm/images/apm-transaction-response-dist.png differ diff --git a/docs/apm/images/apm-transaction-sample.png b/docs/apm/images/apm-transaction-sample.png index 0e4bc5f3f878a..54eea902f0311 100644 Binary files a/docs/apm/images/apm-transaction-sample.png and b/docs/apm/images/apm-transaction-sample.png differ diff --git a/docs/apm/images/apm-transactions-overview.png b/docs/apm/images/apm-transactions-overview.png index be292c37e24e0..66cf739a861b7 100644 Binary files a/docs/apm/images/apm-transactions-overview.png and b/docs/apm/images/apm-transactions-overview.png differ diff --git a/docs/apm/images/service-maps-java.png b/docs/apm/images/service-maps-java.png index d7c0786e406d9..25600b690a5bd 100644 Binary files a/docs/apm/images/service-maps-java.png and b/docs/apm/images/service-maps-java.png differ diff --git a/docs/apm/images/service-maps.png b/docs/apm/images/service-maps.png index 190b7af3c560e..511d8401b22f3 100644 Binary files a/docs/apm/images/service-maps.png and b/docs/apm/images/service-maps.png differ diff --git a/docs/apm/service-maps.asciidoc b/docs/apm/service-maps.asciidoc index 99a6205ae010e..f43253d819429 100644 --- a/docs/apm/service-maps.asciidoc +++ b/docs/apm/service-maps.asciidoc @@ -108,6 +108,7 @@ Service maps are supported for the following Agent versions: [horizontal] Go agent:: ≥ v1.7.0 +iOS agent:: _Not yet supported_ Java agent:: ≥ v1.13.0 .NET agent:: ≥ v1.3.0 Node.js agent:: ≥ v3.6.0 diff --git a/docs/apm/transactions.asciidoc b/docs/apm/transactions.asciidoc index c2a3e0bc2502d..76006d375d075 100644 --- a/docs/apm/transactions.asciidoc +++ b/docs/apm/transactions.asciidoc @@ -100,22 +100,22 @@ the selected transaction group. image::apm/images/apm-transaction-response-dist.png[Example view of response time distribution] [[transaction-duration-distribution]] -==== Transactions duration distribution +==== Latency distribution -This chart plots all transaction durations for the given time period. +A plot of all transaction durations for the given time period. The screenshot below shows a typical distribution, and indicates most of our requests were served quickly -- awesome! -It's the requests on the right, the ones taking longer than average, that we probably want to focus on. +It's the requests on the right, the ones taking longer than average, that we probably need to focus on. [role="screenshot"] -image::apm/images/apm-transaction-duration-dist.png[Example view of transactions duration distribution graph] +image::apm/images/apm-transaction-duration-dist.png[Example view of latency distribution graph] -Select a transaction duration _bucket_ to display up to ten trace samples. +Select a latency duration _bucket_ to display up to ten trace samples. [[transaction-trace-sample]] ==== Trace sample -Trace samples are based on the _bucket_ selection in the *Transactions duration distribution* chart; +Trace samples are based on the _bucket_ selection in the *Latency distribution* chart; update the samples by selecting a new _bucket_. The number of requests per bucket is displayed when hovering over the graph, and the selected bucket is highlighted to stand out. diff --git a/docs/apm/troubleshooting.asciidoc b/docs/apm/troubleshooting.asciidoc index 8cab7bb03da75..4a62f71528676 100644 --- a/docs/apm/troubleshooting.asciidoc +++ b/docs/apm/troubleshooting.asciidoc @@ -15,6 +15,7 @@ don't forget to check our other troubleshooting guides or discussion forum: * {apm-server-ref}/troubleshooting.html[APM Server troubleshooting] * {apm-dotnet-ref}/troubleshooting.html[.NET agent troubleshooting] * {apm-go-ref}/troubleshooting.html[Go agent troubleshooting] +* {apm-ios-ref}/troubleshooting.html[iOS agent troubleshooting] * {apm-java-ref}/trouble-shooting.html[Java agent troubleshooting] * {apm-node-ref}/troubleshooting.html[Node.js agent troubleshooting] * {apm-php-ref}/troubleshooting.html[PHP agent troubleshooting] diff --git a/docs/developer/plugin-list.asciidoc b/docs/developer/plugin-list.asciidoc index eee92ba433721..5f49360c926bf 100644 --- a/docs/developer/plugin-list.asciidoc +++ b/docs/developer/plugin-list.asciidoc @@ -354,10 +354,6 @@ The plugin exposes the static DefaultEditorController class to consume. The client-side plugin configures following values: -|{kib-repo}blob/{branch}/x-pack/plugins/console_extensions/README.md[consoleExtensions] -|This plugin provides autocomplete definitions of licensed APIs to the OSS Console plugin. - - |{kib-repo}blob/{branch}/x-pack/plugins/cross_cluster_replication/README.md[crossClusterReplication] |You can run a local cluster and simulate a remote cluster within a single Kibana directory. @@ -393,7 +389,7 @@ security and spaces filtering as well as performing audit logging. |{kib-repo}blob/{branch}/x-pack/plugins/enterprise_search/README.md[enterpriseSearch] -|This plugin's goal is to provide a Kibana user interface to the Enterprise Search solution's products (App Search and Workplace Search). In it's current MVP state, the plugin provides the following with the goal of gathering user feedback and raising product awareness: +|This plugin provides beta Kibana user interfaces for managing the Enterprise Search solution and its products, App Search and Workplace Search. |{kib-repo}blob/{branch}/x-pack/plugins/event_log/README.md[eventLog] diff --git a/docs/development/core/server/kibana-plugin-core-server.elasticsearchclientconfig.md b/docs/development/core/server/kibana-plugin-core-server.elasticsearchclientconfig.md index a854e5ddad19a..208e0e0175d71 100644 --- a/docs/development/core/server/kibana-plugin-core-server.elasticsearchclientconfig.md +++ b/docs/development/core/server/kibana-plugin-core-server.elasticsearchclientconfig.md @@ -9,7 +9,7 @@ Configuration options to be used to create a [cluster client](./kibana-plugin-co Signature: ```typescript -export declare type ElasticsearchClientConfig = Pick & { +export declare type ElasticsearchClientConfig = Pick & { pingTimeout?: ElasticsearchConfig['pingTimeout'] | ClientOptions['pingTimeout']; requestTimeout?: ElasticsearchConfig['requestTimeout'] | ClientOptions['requestTimeout']; ssl?: Partial; diff --git a/docs/development/core/server/kibana-plugin-core-server.elasticsearchconfig.md b/docs/development/core/server/kibana-plugin-core-server.elasticsearchconfig.md index d87ea63d59b8d..a9ed614ba7552 100644 --- a/docs/development/core/server/kibana-plugin-core-server.elasticsearchconfig.md +++ b/docs/development/core/server/kibana-plugin-core-server.elasticsearchconfig.md @@ -31,10 +31,11 @@ export declare class ElasticsearchConfig | [pingTimeout](./kibana-plugin-core-server.elasticsearchconfig.pingtimeout.md) | | Duration | Timeout after which PING HTTP request will be aborted and retried. | | [requestHeadersWhitelist](./kibana-plugin-core-server.elasticsearchconfig.requestheaderswhitelist.md) | | string[] | List of Kibana client-side headers to send to Elasticsearch when request scoped cluster client is used. If this is an empty array then \*no\* client-side will be sent. | | [requestTimeout](./kibana-plugin-core-server.elasticsearchconfig.requesttimeout.md) | | Duration | Timeout after which HTTP request will be aborted and retried. | +| [serviceAccountToken](./kibana-plugin-core-server.elasticsearchconfig.serviceaccounttoken.md) | | string | If Elasticsearch security features are enabled, this setting provides the service account token that the Kibana server users to perform its administrative functions.This is an alternative to specifying a username and password. | | [shardTimeout](./kibana-plugin-core-server.elasticsearchconfig.shardtimeout.md) | | Duration | Timeout for Elasticsearch to wait for responses from shards. Set to 0 to disable. | | [sniffInterval](./kibana-plugin-core-server.elasticsearchconfig.sniffinterval.md) | | false | Duration | Interval to perform a sniff operation and make sure the list of nodes is complete. If false then sniffing is disabled. | | [sniffOnConnectionFault](./kibana-plugin-core-server.elasticsearchconfig.sniffonconnectionfault.md) | | boolean | Specifies whether the client should immediately sniff for a more current list of nodes when a connection dies. | | [sniffOnStart](./kibana-plugin-core-server.elasticsearchconfig.sniffonstart.md) | | boolean | Specifies whether the client should attempt to detect the rest of the cluster when it is first instantiated. | | [ssl](./kibana-plugin-core-server.elasticsearchconfig.ssl.md) | | Pick<SslConfigSchema, Exclude<keyof SslConfigSchema, 'certificateAuthorities' | 'keystore' | 'truststore'>> & {
certificateAuthorities?: string[];
} | Set of settings configure SSL connection between Kibana and Elasticsearch that are required when xpack.ssl.verification_mode in Elasticsearch is set to either certificate or full. | -| [username](./kibana-plugin-core-server.elasticsearchconfig.username.md) | | string | If Elasticsearch is protected with basic authentication, this setting provides the username that the Kibana server uses to perform its administrative functions. | +| [username](./kibana-plugin-core-server.elasticsearchconfig.username.md) | | string | If Elasticsearch is protected with basic authentication, this setting provides the username that the Kibana server uses to perform its administrative functions. Cannot be used in conjunction with serviceAccountToken. | diff --git a/docs/development/core/server/kibana-plugin-core-server.elasticsearchconfig.serviceaccounttoken.md b/docs/development/core/server/kibana-plugin-core-server.elasticsearchconfig.serviceaccounttoken.md new file mode 100644 index 0000000000000..5934e83de17a4 --- /dev/null +++ b/docs/development/core/server/kibana-plugin-core-server.elasticsearchconfig.serviceaccounttoken.md @@ -0,0 +1,15 @@ + + +[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [ElasticsearchConfig](./kibana-plugin-core-server.elasticsearchconfig.md) > [serviceAccountToken](./kibana-plugin-core-server.elasticsearchconfig.serviceaccounttoken.md) + +## ElasticsearchConfig.serviceAccountToken property + +If Elasticsearch security features are enabled, this setting provides the service account token that the Kibana server users to perform its administrative functions. + +This is an alternative to specifying a username and password. + +Signature: + +```typescript +readonly serviceAccountToken?: string; +``` diff --git a/docs/development/core/server/kibana-plugin-core-server.elasticsearchconfig.username.md b/docs/development/core/server/kibana-plugin-core-server.elasticsearchconfig.username.md index 14db9f2e36ccf..959870ff43a0f 100644 --- a/docs/development/core/server/kibana-plugin-core-server.elasticsearchconfig.username.md +++ b/docs/development/core/server/kibana-plugin-core-server.elasticsearchconfig.username.md @@ -4,7 +4,7 @@ ## ElasticsearchConfig.username property -If Elasticsearch is protected with basic authentication, this setting provides the username that the Kibana server uses to perform its administrative functions. +If Elasticsearch is protected with basic authentication, this setting provides the username that the Kibana server uses to perform its administrative functions. Cannot be used in conjunction with serviceAccountToken. Signature: diff --git a/docs/development/core/server/kibana-plugin-core-server.legacyelasticsearchclientconfig.md b/docs/development/core/server/kibana-plugin-core-server.legacyelasticsearchclientconfig.md index b028a09bee453..a80ebe2fee493 100644 --- a/docs/development/core/server/kibana-plugin-core-server.legacyelasticsearchclientconfig.md +++ b/docs/development/core/server/kibana-plugin-core-server.legacyelasticsearchclientconfig.md @@ -11,7 +11,7 @@ Signature: ```typescript -export declare type LegacyElasticsearchClientConfig = Pick & Pick & { +export declare type LegacyElasticsearchClientConfig = Pick & Pick & { pingTimeout?: ElasticsearchConfig['pingTimeout'] | ConfigOptions['pingTimeout']; requestTimeout?: ElasticsearchConfig['requestTimeout'] | ConfigOptions['requestTimeout']; sniffInterval?: ElasticsearchConfig['sniffInterval'] | ConfigOptions['sniffInterval']; diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatterntype.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatterntype.md new file mode 100644 index 0000000000000..46fd3a0725e40 --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatterntype.md @@ -0,0 +1,19 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [IndexPatternType](./kibana-plugin-plugins-data-public.indexpatterntype.md) + +## IndexPatternType enum + +Signature: + +```typescript +export declare enum IndexPatternType +``` + +## Enumeration Members + +| Member | Value | Description | +| --- | --- | --- | +| DEFAULT | "default" | | +| ROLLUP | "rollup" | | + diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatterntypemeta.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatterntypemeta.md index e6690b244c9ea..19a884862d460 100644 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatterntypemeta.md +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatterntypemeta.md @@ -15,4 +15,5 @@ export interface TypeMeta | Property | Type | Description | | --- | --- | --- | | [aggs](./kibana-plugin-plugins-data-public.indexpatterntypemeta.aggs.md) | Record<string, AggregationRestrictions> | | +| [params](./kibana-plugin-plugins-data-public.indexpatterntypemeta.params.md) | {
rollup_index: string;
} | | diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatterntypemeta.params.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatterntypemeta.params.md new file mode 100644 index 0000000000000..12646a39188a0 --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatterntypemeta.params.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [IndexPatternTypeMeta](./kibana-plugin-plugins-data-public.indexpatterntypemeta.md) > [params](./kibana-plugin-plugins-data-public.indexpatterntypemeta.params.md) + +## IndexPatternTypeMeta.params property + +Signature: + +```typescript +params?: { + rollup_index: string; + }; +``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.md index 65c4601d5faec..7c2911875ee05 100644 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.md +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.md @@ -31,6 +31,7 @@ | --- | --- | | [BUCKET\_TYPES](./kibana-plugin-plugins-data-public.bucket_types.md) | | | [ES\_FIELD\_TYPES](./kibana-plugin-plugins-data-public.es_field_types.md) | \* | +| [IndexPatternType](./kibana-plugin-plugins-data-public.indexpatterntype.md) | | | [KBN\_FIELD\_TYPES](./kibana-plugin-plugins-data-public.kbn_field_types.md) | \* | | [METRIC\_TYPES](./kibana-plugin-plugins-data-public.metric_types.md) | | | [QuerySuggestionTypes](./kibana-plugin-plugins-data-public.querysuggestiontypes.md) | | diff --git a/docs/maps/vector-layer.asciidoc b/docs/maps/vector-layer.asciidoc index 2115c16a889c6..5017ecf91dffd 100644 --- a/docs/maps/vector-layer.asciidoc +++ b/docs/maps/vector-layer.asciidoc @@ -20,10 +20,10 @@ The index must contain at least one field mapped as {ref}/geo-point.html[geo_poi Results are limited to the `index.max_result_window` index setting, which defaults to 10000. Select the appropriate *Scaling* option for your use case. + -* *Limit results to 10000.* The layer displays features from the first `index.max_result_window` documents. +* *Limit results to 10,000* The layer displays features from the first `index.max_result_window` documents. Results exceeding `index.max_result_window` are not displayed. -* *Show clusters when results exceed 10000.* When results exceed `index.max_result_window`, the layer uses {ref}/search-aggregations-bucket-geotilegrid-aggregation.html[GeoTile grid aggregation] to group your documents into clusters and displays metrics for each cluster. When results are less then `index.max_result_window`, the layer displays features from individual documents. +* *Show clusters when results exceed 10,000* When results exceed `index.max_result_window`, the layer uses {ref}/search-aggregations-bucket-geotilegrid-aggregation.html[GeoTile grid aggregation] to group your documents into clusters and displays metrics for each cluster. When results are less then `index.max_result_window`, the layer displays features from individual documents. * *Use vector tiles.* Vector tiles partition your map into 6 to 8 tiles. Each tile request is limited to the `index.max_result_window` index setting. diff --git a/docs/settings/apm-settings.asciidoc b/docs/settings/apm-settings.asciidoc index 79fa9a642428a..dfb239f0e26c0 100644 --- a/docs/settings/apm-settings.asciidoc +++ b/docs/settings/apm-settings.asciidoc @@ -18,7 +18,7 @@ It is enabled by default. // Any changes made in this file will be seen there as well. // tag::apm-indices-settings[] -Index defaults can be changed in Kibana. Open the main menu, then click *APM > Settings > Indices*. +Index defaults can be changed in the APM app. Select **Settings** > **Indices**. Index settings in the APM app take precedence over those set in `kibana.yml`. [role="screenshot"] diff --git a/docs/setup/settings.asciidoc b/docs/setup/settings.asciidoc index ba333deeb1609..15abd0fa4ad96 100644 --- a/docs/setup/settings.asciidoc +++ b/docs/setup/settings.asciidoc @@ -284,6 +284,11 @@ the username and password that the {kib} server uses to perform maintenance on the {kib} index at startup. {kib} users still need to authenticate with {es}, which is proxied through the {kib} server. +|[[elasticsearch-service-account-token]] `elasticsearch.serviceAccountToken:` + | beta[]. If your {es} is protected with basic authentication, this token provides the credentials +that the {kib} server uses to perform maintenance on the {kib} index at startup. This setting +is an alternative to `elasticsearch.username` and `elasticsearch.password`. + | `enterpriseSearch.host` | The URL of your Enterprise Search instance diff --git a/docs/user/management.asciidoc b/docs/user/management.asciidoc index b86fa82c30381..2f9f1fe371dc3 100644 --- a/docs/user/management.asciidoc +++ b/docs/user/management.asciidoc @@ -82,9 +82,10 @@ connectors>> for triggering actions. | Monitor the generation of reports—PDF, PNG, and CSV—and download reports that you previously generated. A report can contain a dashboard, visualization, saved search, or Canvas workpad. -| {ml-docs}/ml-jobs.html[Machine Learning Jobs] -| View your {anomaly-jobs} and {dfanalytics-jobs}. Open the Single Metric -Viewer or Anomaly Explorer to see your {ml} results. +| Machine Learning Jobs +| View your <> and +<> jobs. Open the Single Metric +Viewer or Anomaly Explorer to see your {anomaly-detect} results. | <> | Detect changes in your data by creating, managing, and monitoring alerts. diff --git a/docs/user/ml/index.asciidoc b/docs/user/ml/index.asciidoc index b3606b122d750..a05ff1eeec4a6 100644 --- a/docs/user/ml/index.asciidoc +++ b/docs/user/ml/index.asciidoc @@ -48,8 +48,9 @@ pane: image::user/ml/images/ml-job-management.png[Job Management] You can use the *Settings* pane to create and edit -{ml-docs}/ml-calendars.html[calendars] and the filters that are used in -{ml-docs}/ml-rules.html[custom rules]: +{ml-docs}/ml-ad-finding-anomalies.html#ml-ad-calendars[calendars] and the +filters that are used in +{ml-docs}/ml-ad-finding-anomalies.html#ml-ad-rules[custom rules]: [role="screenshot"] image::user/ml/images/ml-settings.png[Calendar Management] diff --git a/package.json b/package.json index 22eedde59c5e7..5cf72e2110982 100644 --- a/package.json +++ b/package.json @@ -99,7 +99,7 @@ "dependencies": { "@elastic/apm-rum": "^5.8.0", "@elastic/apm-rum-react": "^1.2.11", - "@elastic/charts": "31.1.0", + "@elastic/charts": "32.0.0", "@elastic/datemath": "link:bazel-bin/packages/elastic-datemath", "@elastic/elasticsearch": "npm:@elastic/elasticsearch-canary@^8.0.0-canary.13", "@elastic/ems-client": "7.14.0", diff --git a/packages/kbn-optimizer/src/__fixtures__/mock_repo/packages/kbn-ui-shared-deps/src/public_path_module_creator.ts b/packages/kbn-optimizer/src/__fixtures__/mock_repo/packages/kbn-ui-shared-deps/src/public_path_module_creator.ts new file mode 100644 index 0000000000000..b03ee16d2f746 --- /dev/null +++ b/packages/kbn-optimizer/src/__fixtures__/mock_repo/packages/kbn-ui-shared-deps/src/public_path_module_creator.ts @@ -0,0 +1,9 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +// stub diff --git a/packages/kbn-optimizer/src/common/__snapshots__/parse_path.test.ts.snap b/packages/kbn-optimizer/src/common/__snapshots__/parse_path.test.ts.snap index f537674c3fff7..2a30694afb826 100644 --- a/packages/kbn-optimizer/src/common/__snapshots__/parse_path.test.ts.snap +++ b/packages/kbn-optimizer/src/common/__snapshots__/parse_path.test.ts.snap @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`parseDirPath() parses / 1`] = ` -Object { +ParsedPath { "dirs": Array [], "filename": undefined, "query": undefined, @@ -10,7 +10,7 @@ Object { `; exports[`parseDirPath() parses /foo 1`] = ` -Object { +ParsedPath { "dirs": Array [ "foo", ], @@ -21,7 +21,7 @@ Object { `; exports[`parseDirPath() parses /foo/bar/baz 1`] = ` -Object { +ParsedPath { "dirs": Array [ "foo", "bar", @@ -34,7 +34,7 @@ Object { `; exports[`parseDirPath() parses /foo/bar/baz/ 1`] = ` -Object { +ParsedPath { "dirs": Array [ "foo", "bar", @@ -47,7 +47,7 @@ Object { `; exports[`parseDirPath() parses c:\\ 1`] = ` -Object { +ParsedPath { "dirs": Array [], "filename": undefined, "query": undefined, @@ -56,7 +56,7 @@ Object { `; exports[`parseDirPath() parses c:\\foo 1`] = ` -Object { +ParsedPath { "dirs": Array [ "foo", ], @@ -67,7 +67,7 @@ Object { `; exports[`parseDirPath() parses c:\\foo\\bar\\baz 1`] = ` -Object { +ParsedPath { "dirs": Array [ "foo", "bar", @@ -80,7 +80,7 @@ Object { `; exports[`parseDirPath() parses c:\\foo\\bar\\baz\\ 1`] = ` -Object { +ParsedPath { "dirs": Array [ "foo", "bar", @@ -93,7 +93,7 @@ Object { `; exports[`parseFilePath() parses /foo 1`] = ` -Object { +ParsedPath { "dirs": Array [], "filename": "foo", "query": undefined, @@ -102,7 +102,7 @@ Object { `; exports[`parseFilePath() parses /foo/bar/baz 1`] = ` -Object { +ParsedPath { "dirs": Array [ "foo", "bar", @@ -114,7 +114,7 @@ Object { `; exports[`parseFilePath() parses /foo/bar/baz.json 1`] = ` -Object { +ParsedPath { "dirs": Array [ "foo", "bar", @@ -126,7 +126,7 @@ Object { `; exports[`parseFilePath() parses /foo/bar/baz.json?light 1`] = ` -Object { +ParsedPath { "dirs": Array [ "foo", "bar", @@ -140,7 +140,7 @@ Object { `; exports[`parseFilePath() parses /foo/bar/baz.json?light=true&dark=false 1`] = ` -Object { +ParsedPath { "dirs": Array [ "foo", "bar", @@ -155,7 +155,7 @@ Object { `; exports[`parseFilePath() parses c:/foo/bar/baz.json 1`] = ` -Object { +ParsedPath { "dirs": Array [ "foo", "bar", @@ -167,7 +167,7 @@ Object { `; exports[`parseFilePath() parses c:\\foo 1`] = ` -Object { +ParsedPath { "dirs": Array [], "filename": "foo", "query": undefined, @@ -176,7 +176,7 @@ Object { `; exports[`parseFilePath() parses c:\\foo\\bar\\baz 1`] = ` -Object { +ParsedPath { "dirs": Array [ "foo", "bar", @@ -188,7 +188,7 @@ Object { `; exports[`parseFilePath() parses c:\\foo\\bar\\baz.json 1`] = ` -Object { +ParsedPath { "dirs": Array [ "foo", "bar", @@ -200,7 +200,7 @@ Object { `; exports[`parseFilePath() parses c:\\foo\\bar\\baz.json?dark 1`] = ` -Object { +ParsedPath { "dirs": Array [ "foo", "bar", @@ -214,7 +214,7 @@ Object { `; exports[`parseFilePath() parses c:\\foo\\bar\\baz.json?dark=true&light=false 1`] = ` -Object { +ParsedPath { "dirs": Array [ "foo", "bar", diff --git a/packages/kbn-optimizer/src/common/parse_path.ts b/packages/kbn-optimizer/src/common/parse_path.ts index 7ea0042db25c9..da3744ba477bd 100644 --- a/packages/kbn-optimizer/src/common/parse_path.ts +++ b/packages/kbn-optimizer/src/common/parse_path.ts @@ -9,17 +9,61 @@ import normalizePath from 'normalize-path'; import Qs from 'querystring'; +class ParsedPath { + constructor( + public readonly root: string, + public readonly dirs: string[], + public readonly query?: Record, + public readonly filename?: string + ) {} + + private indexOfDir(match: string | RegExp, fromIndex: number = 0) { + for (let i = fromIndex; i < this.dirs.length; i++) { + if (this.matchDir(i, match)) { + return i; + } + } + + return -1; + } + + private matchDir(i: number, match: string | RegExp) { + return typeof match === 'string' ? this.dirs[i] === match : match.test(this.dirs[i]); + } + + matchDirs(...segments: Array) { + const [first, ...rest] = segments; + let fromIndex = 0; + while (true) { + // do the dirs include the first segment to match? + const startIndex = this.indexOfDir(first, fromIndex); + if (startIndex === -1) { + return; + } + + // are all of the ...rest segments also matched at this point? + if (!rest.length || rest.every((seg, i) => this.matchDir(startIndex + 1 + i, seg))) { + return { startIndex, endIndex: startIndex + rest.length }; + } + + // no match, search again, this time looking at instances after the matched instance + fromIndex = startIndex + 1; + } + } +} + /** * Parse an absolute path, supporting normalized paths from webpack, * into a list of directories and root */ export function parseDirPath(path: string) { const filePath = parseFilePath(path); - return { - ...filePath, - dirs: [...filePath.dirs, ...(filePath.filename ? [filePath.filename] : [])], - filename: undefined, - }; + return new ParsedPath( + filePath.root, + [...filePath.dirs, ...(filePath.filename ? [filePath.filename] : [])], + filePath.query, + undefined + ); } export function parseFilePath(path: string) { @@ -32,10 +76,10 @@ export function parseFilePath(path: string) { } const [root, ...others] = normalized.split('/'); - return { - root: root === '' ? '/' : root, - dirs: others.slice(0, -1), + return new ParsedPath( + root === '' ? '/' : root, + others.slice(0, -1), query, - filename: others[others.length - 1] || undefined, - }; + others[others.length - 1] || undefined + ); } diff --git a/packages/kbn-optimizer/src/integration_tests/basic_optimization.test.ts b/packages/kbn-optimizer/src/integration_tests/basic_optimization.test.ts index 97a7f33be673d..48d36b706b831 100644 --- a/packages/kbn-optimizer/src/integration_tests/basic_optimization.test.ts +++ b/packages/kbn-optimizer/src/integration_tests/basic_optimization.test.ts @@ -15,7 +15,7 @@ import cpy from 'cpy'; import del from 'del'; import { tap, filter } from 'rxjs/operators'; import { REPO_ROOT } from '@kbn/utils'; -import { ToolingLog, createReplaceSerializer } from '@kbn/dev-utils'; +import { ToolingLog } from '@kbn/dev-utils'; import { runOptimizer, OptimizerConfig, OptimizerUpdate, logOptimizerState } from '../index'; import { allValuesFrom } from '../common'; @@ -29,8 +29,6 @@ expect.addSnapshotSerializer({ test: (value: any) => typeof value === 'string' && value.includes(REPO_ROOT), }); -expect.addSnapshotSerializer(createReplaceSerializer(/\w+-fastbuild/, '-fastbuild')); - const log = new ToolingLog({ level: 'error', writeTo: { @@ -132,7 +130,7 @@ it('builds expected bundles, saves bundle counts to metadata', async () => { expect(foo.cache.getModuleCount()).toBe(6); expect(foo.cache.getReferencedFiles()).toMatchInlineSnapshot(` Array [ - /packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/bazel-out/-fastbuild/bin/packages/kbn-ui-shared-deps/target/public_path_module_creator.js, + /packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/packages/kbn-ui-shared-deps/src/public_path_module_creator.ts, /packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/foo/kibana.json, /packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/foo/public/async_import.ts, /packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/foo/public/ext.ts, @@ -155,7 +153,7 @@ it('builds expected bundles, saves bundle counts to metadata', async () => { /node_modules/@kbn/optimizer/postcss.config.js, /node_modules/css-loader/package.json, /node_modules/style-loader/package.json, - /packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/bazel-out/-fastbuild/bin/packages/kbn-ui-shared-deps/target/public_path_module_creator.js, + /packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/packages/kbn-ui-shared-deps/src/public_path_module_creator.ts, /packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/bar/kibana.json, /packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/bar/public/index.scss, /packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/bar/public/index.ts, @@ -175,7 +173,7 @@ it('builds expected bundles, saves bundle counts to metadata', async () => { expect(baz.cache.getReferencedFiles()).toMatchInlineSnapshot(` Array [ - /packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/bazel-out/-fastbuild/bin/packages/kbn-ui-shared-deps/target/public_path_module_creator.js, + /packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/packages/kbn-ui-shared-deps/src/public_path_module_creator.ts, /packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/x-pack/baz/kibana.json, /packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/x-pack/baz/public/index.ts, /packages/kbn-optimizer/src/worker/entry_point_creator.ts, diff --git a/packages/kbn-optimizer/src/worker/populate_bundle_cache_plugin.ts b/packages/kbn-optimizer/src/worker/populate_bundle_cache_plugin.ts index 8d890b31b639d..a3455d7ddf2b9 100644 --- a/packages/kbn-optimizer/src/worker/populate_bundle_cache_plugin.ts +++ b/packages/kbn-optimizer/src/worker/populate_bundle_cache_plugin.ts @@ -6,11 +6,11 @@ * Side Public License, v 1. */ -import webpack from 'webpack'; - import Path from 'path'; import { inspect } from 'util'; +import webpack from 'webpack'; + import { Bundle, WorkerConfig, ascending, parseFilePath } from '../common'; import { BundleRefModule } from './bundle_ref_module'; import { @@ -21,6 +21,20 @@ import { getModulePath, } from './webpack_helpers'; +function tryToResolveRewrittenPath(from: string, toResolve: string) { + try { + return require.resolve(toResolve); + } catch (error) { + if (error.code === 'MODULE_NOT_FOUND') { + throw new Error( + `attempted to rewrite bazel-out path [${from}] to [${toResolve}] but couldn't find the rewrite target` + ); + } + + throw error; + } +} + /** * sass-loader creates about a 40% overhead on the overall optimizer runtime, and * so this constant is used to indicate to assignBundlesToWorkers() that there is @@ -57,17 +71,44 @@ export class PopulateBundleCachePlugin { let path = getModulePath(module); let parsedPath = parseFilePath(path); - if (parsedPath.dirs.includes('bazel-out')) { - const index = parsedPath.dirs.indexOf('bazel-out'); - path = Path.join( - workerConfig.repoRoot, - 'bazel-out', - ...parsedPath.dirs.slice(index + 1), - parsedPath.filename ?? '' + const bazelOut = parsedPath.matchDirs( + 'bazel-out', + /-fastbuild$/, + 'bin', + 'packages', + /.*/, + 'target' + ); + + // if the module is referenced from one of our packages and resolved to the `bazel-out` dir + // we should rewrite our reference to point to the source file so that we can track the + // modified time of that file rather than the built output which is rebuilt all the time + // without actually changing + if (bazelOut) { + const packageDir = parsedPath.dirs[bazelOut.endIndex - 1]; + const subDirs = parsedPath.dirs.slice(bazelOut.endIndex + 1); + path = tryToResolveRewrittenPath( + path, + Path.join( + workerConfig.repoRoot, + 'packages', + packageDir, + 'src', + ...subDirs, + parsedPath.filename + ? Path.basename(parsedPath.filename, Path.extname(parsedPath.filename)) + : '' + ) ); parsedPath = parseFilePath(path); } + if (parsedPath.matchDirs('bazel-out')) { + throw new Error( + `a bazel-out dir is being referenced by module [${path}] and not getting rewritten to its source location` + ); + } + if (!parsedPath.dirs.includes('node_modules')) { referencedFiles.add(path); diff --git a/packages/kbn-spec-to-console/README.md b/packages/kbn-spec-to-console/README.md index 0328dec791320..a0e654713f61b 100644 --- a/packages/kbn-spec-to-console/README.md +++ b/packages/kbn-spec-to-console/README.md @@ -18,15 +18,10 @@ git pull --depth=1 origin master ### Usage -You need to run the command twice: once for the **OSS** specs and once for the **X-Pack** specs At the root of the Kibana repository, run the following commands: ```sh -# OSS yarn spec_to_console -g "/rest-api-spec/src/main/resources/rest-api-spec/api/*" -d "src/plugins/console/server/lib/spec_definitions/json/generated" - -# X-pack -yarn spec_to_console -g "/x-pack/plugin/src/test/resources/rest-api-spec/api/*" -d "x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated" ``` ### Information used in Console that is not available in the REST spec diff --git a/packages/kbn-spec-to-console/lib/convert/params.js b/packages/kbn-spec-to-console/lib/convert/params.js index e5365b4d7311e..1aa89be11c76d 100644 --- a/packages/kbn-spec-to-console/lib/convert/params.js +++ b/packages/kbn-spec-to-console/lib/convert/params.js @@ -37,6 +37,7 @@ module.exports = (params) => { case 'string': case 'number': case 'number|string': + case 'boolean|long': result[param] = defaultValue || ''; break; case 'list': diff --git a/src/cli/serve/serve.js b/src/cli/serve/serve.js index ad83965efde33..be949350f7229 100644 --- a/src/cli/serve/serve.js +++ b/src/cli/serve/serve.js @@ -68,12 +68,14 @@ function applyConfigOverrides(rawConfig, opts, extraCliOptions) { delete extraCliOptions.env; if (opts.dev) { - if (!has('elasticsearch.username')) { - set('elasticsearch.username', 'kibana_system'); - } + if (!has('elasticsearch.serviceAccountToken')) { + if (!has('elasticsearch.username')) { + set('elasticsearch.username', 'kibana_system'); + } - if (!has('elasticsearch.password')) { - set('elasticsearch.password', 'changeme'); + if (!has('elasticsearch.password')) { + set('elasticsearch.password', 'changeme'); + } } if (opts.ssl) { diff --git a/src/core/public/chrome/ui/header/header_help_menu.tsx b/src/core/public/chrome/ui/header/header_help_menu.tsx index c6a09c1177a5e..cbf89bba2ca44 100644 --- a/src/core/public/chrome/ui/header/header_help_menu.tsx +++ b/src/core/public/chrome/ui/header/header_help_menu.tsx @@ -211,7 +211,7 @@ export class HeaderHelpMenu extends Component { return ( - + { - + { - + { @@ -330,7 +330,7 @@ export class HeaderHelpMenu extends Component { {customLinks} {content && ( <> - {customLinks && } + {customLinks && } )} @@ -383,7 +383,7 @@ const createCustomLink = ( ) => { return ( - + {text} {addSpacer && } diff --git a/src/core/public/doc_links/doc_links_service.ts b/src/core/public/doc_links/doc_links_service.ts index 7a843a41cc4ca..e8453d009e720 100644 --- a/src/core/public/doc_links/doc_links_service.ts +++ b/src/core/public/doc_links/doc_links_service.ts @@ -232,20 +232,20 @@ export class DocLinksService { guide: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/index.html`, aggregations: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/ml-configuring-aggregation.html`, anomalyDetection: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/ml-ad-overview.html`, - anomalyDetectionJobs: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/ml-jobs.html`, + anomalyDetectionJobs: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/ml-ad-finding-anomalies.html`, anomalyDetectionConfiguringCategories: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/ml-configuring-categories.html`, - anomalyDetectionBucketSpan: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/create-jobs.html#bucket-span`, - anomalyDetectionCardinality: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/create-jobs.html#cardinality`, - anomalyDetectionCreateJobs: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/create-jobs.html`, - anomalyDetectionDetectors: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/create-jobs.html#detectors`, - anomalyDetectionInfluencers: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/ml-influencers.html`, + anomalyDetectionBucketSpan: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/ml-ad-finding-anomalies.html#ml-ad-bucket-span`, + anomalyDetectionCardinality: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/ml-ad-finding-anomalies.html#ml-ad-cardinality`, + anomalyDetectionCreateJobs: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/ml-ad-finding-anomalies.html#ml-ad-create-job`, + anomalyDetectionDetectors: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/ml-ad-finding-anomalies.html#ml-ad-detectors`, + anomalyDetectionInfluencers: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/ml-ad-finding-anomalies.html#ml-ad-influencers`, anomalyDetectionJobResource: `${ELASTICSEARCH_DOCS}ml-put-job.html#ml-put-job-path-parms`, anomalyDetectionJobResourceAnalysisConfig: `${ELASTICSEARCH_DOCS}ml-put-job.html#put-analysisconfig`, - anomalyDetectionJobTips: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/create-jobs.html#job-tips`, - anomalyDetectionModelMemoryLimits: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/create-jobs.html#model-memory-limits`, - calendars: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/ml-calendars.html`, + anomalyDetectionJobTips: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/ml-ad-finding-anomalies.html#ml-ad-job-tips`, + anomalyDetectionModelMemoryLimits: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/ml-ad-finding-anomalies.html#ml-ad-model-memory-limits`, + calendars: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/ml-ad-finding-anomalies.html#ml-ad-calendars`, classificationEvaluation: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/ml-dfa-classification.html#ml-dfanalytics-classification-evaluation`, - customRules: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/ml-rules.html`, + customRules: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/ml-ad-finding-anomalies.html#ml-ad-rules`, customUrls: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/ml-configuring-url.html`, dataFrameAnalytics: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/ml-dfanalytics.html`, featureImportance: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/ml-feature-importance.html`, diff --git a/src/core/server/core_app/bundle_routes/file_hash.test.ts b/src/core/server/core_app/bundle_routes/file_hash.test.ts index 918f435156344..ef24ebe063057 100644 --- a/src/core/server/core_app/bundle_routes/file_hash.test.ts +++ b/src/core/server/core_app/bundle_routes/file_hash.test.ts @@ -19,7 +19,8 @@ const mockedCache = (): jest.Mocked => ({ set: jest.fn(), }); -describe('getFileHash', () => { +// FLAKY: https://github.com/elastic/kibana/issues/105174 +describe.skip('getFileHash', () => { const sampleFilePath = resolve(__dirname, 'foo.js'); const fd = 42; const stats: Stats = { ino: 42, size: 9000 } as any; diff --git a/src/core/server/elasticsearch/client/client_config.test.ts b/src/core/server/elasticsearch/client/client_config.test.ts index faca79b3aa6fa..7e16339b40235 100644 --- a/src/core/server/elasticsearch/client/client_config.test.ts +++ b/src/core/server/elasticsearch/client/client_config.test.ts @@ -204,11 +204,27 @@ describe('parseClientOptions', () => { ); }); + it('adds an authorization header if `serviceAccountToken` is set', () => { + expect( + parseClientOptions( + createConfig({ + serviceAccountToken: 'ABC123', + }), + false + ) + ).toEqual( + expect.objectContaining({ + headers: expect.objectContaining({ + authorization: `Bearer ABC123`, + }), + }) + ); + }); + it('does not add auth to the nodes', () => { const options = parseClientOptions( createConfig({ - username: 'user', - password: 'pass', + serviceAccountToken: 'ABC123', hosts: ['http://node-A:9200'], }), true @@ -252,6 +268,34 @@ describe('parseClientOptions', () => { ] `); }); + + it('does not add the authorization header even if `serviceAccountToken` is set', () => { + expect( + parseClientOptions( + createConfig({ + serviceAccountToken: 'ABC123', + }), + true + ).headers + ).not.toHaveProperty('authorization'); + }); + + it('does not add auth to the nodes even if `serviceAccountToken` is set', () => { + const options = parseClientOptions( + createConfig({ + serviceAccountToken: 'ABC123', + hosts: ['http://node-A:9200'], + }), + true + ); + expect(options.nodes).toMatchInlineSnapshot(` + Array [ + Object { + "url": "http://node-a:9200/", + }, + ] + `); + }); }); }); diff --git a/src/core/server/elasticsearch/client/client_config.ts b/src/core/server/elasticsearch/client/client_config.ts index 3044b277db902..bbbb1ac247b3b 100644 --- a/src/core/server/elasticsearch/client/client_config.ts +++ b/src/core/server/elasticsearch/client/client_config.ts @@ -29,6 +29,7 @@ export type ElasticsearchClientConfig = Pick< | 'hosts' | 'username' | 'password' + | 'serviceAccountToken' > & { pingTimeout?: ElasticsearchConfig['pingTimeout'] | ClientOptions['pingTimeout']; requestTimeout?: ElasticsearchConfig['requestTimeout'] | ClientOptions['requestTimeout']; @@ -74,11 +75,16 @@ export function parseClientOptions( }; } - if (config.username && config.password && !scoped) { - clientOptions.auth = { - username: config.username, - password: config.password, - }; + if (!scoped) { + if (config.username && config.password) { + clientOptions.auth = { + username: config.username, + password: config.password, + }; + } else if (config.serviceAccountToken) { + // TODO: change once ES client has native support for service account tokens: https://github.com/elastic/elasticsearch-js/issues/1477 + clientOptions.headers!.authorization = `Bearer ${config.serviceAccountToken}`; + } } clientOptions.nodes = config.hosts.map((host) => convertHost(host)); diff --git a/src/core/server/elasticsearch/elasticsearch_config.test.ts b/src/core/server/elasticsearch/elasticsearch_config.test.ts index f8ef1a7a20a83..6e05baac88e34 100644 --- a/src/core/server/elasticsearch/elasticsearch_config.test.ts +++ b/src/core/server/elasticsearch/elasticsearch_config.test.ts @@ -41,6 +41,7 @@ test('set correct defaults', () => { "authorization", ], "requestTimeout": "PT30S", + "serviceAccountToken": undefined, "shardTimeout": "PT30S", "sniffInterval": false, "sniffOnConnectionFault": false, @@ -377,3 +378,22 @@ test('#username throws if equal to "elastic", only while running from source', ( ); expect(() => config.schema.validate(obj, { dist: true })).not.toThrow(); }); + +test('serviceAccountToken throws if username is also set', () => { + const obj = { + username: 'elastic', + serviceAccountToken: 'abc123', + }; + + expect(() => config.schema.validate(obj)).toThrowErrorMatchingInlineSnapshot( + `"[serviceAccountToken]: serviceAccountToken cannot be specified when \\"username\\" is also set."` + ); +}); + +test('serviceAccountToken does not throw if username is not set', () => { + const obj = { + serviceAccountToken: 'abc123', + }; + + expect(() => config.schema.validate(obj)).not.toThrow(); +}); diff --git a/src/core/server/elasticsearch/elasticsearch_config.ts b/src/core/server/elasticsearch/elasticsearch_config.ts index b2b25cda3ac2a..e756d9da867b3 100644 --- a/src/core/server/elasticsearch/elasticsearch_config.ts +++ b/src/core/server/elasticsearch/elasticsearch_config.ts @@ -53,6 +53,18 @@ export const configSchema = schema.object({ ) ), password: schema.maybe(schema.string()), + serviceAccountToken: schema.maybe( + schema.conditional( + schema.siblingRef('username'), + schema.never(), + schema.string(), + schema.string({ + validate: () => { + return `serviceAccountToken cannot be specified when "username" is also set.`; + }, + }) + ) + ), requestHeadersWhitelist: schema.oneOf( [ schema.string({ @@ -272,6 +284,7 @@ export class ElasticsearchConfig { /** * If Elasticsearch is protected with basic authentication, this setting provides * the username that the Kibana server uses to perform its administrative functions. + * Cannot be used in conjunction with serviceAccountToken. */ public readonly username?: string; @@ -281,6 +294,14 @@ export class ElasticsearchConfig { */ public readonly password?: string; + /** + * If Elasticsearch security features are enabled, this setting provides the service account + * token that the Kibana server users to perform its administrative functions. + * + * This is an alternative to specifying a username and password. + */ + public readonly serviceAccountToken?: string; + /** * Set of settings configure SSL connection between Kibana and Elasticsearch that * are required when `xpack.ssl.verification_mode` in Elasticsearch is set to @@ -314,6 +335,7 @@ export class ElasticsearchConfig { this.healthCheckDelay = rawConfig.healthCheck.delay; this.username = rawConfig.username; this.password = rawConfig.password; + this.serviceAccountToken = rawConfig.serviceAccountToken; this.customHeaders = rawConfig.customHeaders; const { alwaysPresentCertificate, verificationMode } = rawConfig.ssl; diff --git a/src/core/server/elasticsearch/legacy/cluster_client.test.ts b/src/core/server/elasticsearch/legacy/cluster_client.test.ts index 2ce19570677c5..52bc4bd45660e 100644 --- a/src/core/server/elasticsearch/legacy/cluster_client.test.ts +++ b/src/core/server/elasticsearch/legacy/cluster_client.test.ts @@ -101,6 +101,30 @@ describe('#callAsInternalUser', () => { expect(mockEsClientInstance.ping).toHaveBeenLastCalledWith(mockParams); }); + test('sets the authorization header when a service account token is configured', async () => { + clusterClient = new LegacyClusterClient( + { apiVersion: 'es-version', serviceAccountToken: 'ABC123' } as any, + logger.get(), + 'custom-type' + ); + + const mockResponse = { data: 'ping' }; + const mockParams = { param: 'ping' }; + mockEsClientInstance.ping.mockImplementation(function mockCall(this: any) { + return Promise.resolve({ + context: this, + response: mockResponse, + }); + }); + + await clusterClient.callAsInternalUser('ping', mockParams); + + expect(mockEsClientInstance.ping).toHaveBeenCalledWith({ + headers: { authorization: 'Bearer ABC123' }, + param: 'ping', + }); + }); + test('correctly deals with nested endpoint', async () => { const mockResponse = { data: 'authenticate' }; const mockParams = { param: 'authenticate' }; @@ -355,6 +379,31 @@ describe('#asScoped', () => { ); }); + test('does not set the authorization header when a service account token is configured', async () => { + clusterClient = new LegacyClusterClient( + { + apiVersion: 'es-version', + requestHeadersWhitelist: ['zero'], + serviceAccountToken: 'ABC123', + } as any, + logger.get(), + 'custom-type' + ); + + clusterClient.asScoped( + httpServerMock.createRawRequest({ headers: { zero: '0', one: '1', two: '2', three: '3' } }) + ); + + const expectedHeaders = { zero: '0' }; + + expect(MockScopedClusterClient).toHaveBeenCalledTimes(1); + expect(MockScopedClusterClient).toHaveBeenCalledWith( + expect.any(Function), + expect.any(Function), + expectedHeaders + ); + }); + test('both scoped and internal API caller fail if cluster client is closed', async () => { clusterClient.asScoped( httpServerMock.createRawRequest({ headers: { zero: '0', one: '1', two: '2', three: '3' } }) diff --git a/src/core/server/elasticsearch/legacy/cluster_client.ts b/src/core/server/elasticsearch/legacy/cluster_client.ts index bdb2ca4d01b3c..6a6765b67da9f 100644 --- a/src/core/server/elasticsearch/legacy/cluster_client.ts +++ b/src/core/server/elasticsearch/legacy/cluster_client.ts @@ -147,6 +147,13 @@ export class LegacyClusterClient implements ILegacyClusterClient { ) => { this.assertIsNotClosed(); + if (this.config.serviceAccountToken) { + clientParams.headers = { + ...clientParams.headers, + authorization: `Bearer ${this.config.serviceAccountToken}`, + }; + } + return await (callAPI.bind(null, this.client) as LegacyAPICaller)( endpoint, clientParams, diff --git a/src/core/server/elasticsearch/legacy/elasticsearch_client_config.test.ts b/src/core/server/elasticsearch/legacy/elasticsearch_client_config.test.ts index 6239ad270d5b5..a343c0d5d2ad1 100644 --- a/src/core/server/elasticsearch/legacy/elasticsearch_client_config.test.ts +++ b/src/core/server/elasticsearch/legacy/elasticsearch_client_config.test.ts @@ -333,6 +333,128 @@ describe('#auth', () => { }); }); +describe('#serviceAccountToken', () => { + it('is set when #auth is true, and a token is provided', () => { + expect( + parseElasticsearchClientConfig( + { + apiVersion: 'v7.0.0', + customHeaders: { xsrf: 'something' }, + sniffOnStart: true, + sniffOnConnectionFault: true, + hosts: ['https://es.local'], + requestHeadersWhitelist: [], + serviceAccountToken: 'ABC123', + }, + logger.get(), + 'custom-type', + { auth: true } + ) + ).toMatchInlineSnapshot(` + Object { + "apiVersion": "v7.0.0", + "hosts": Array [ + Object { + "headers": Object { + "x-elastic-product-origin": "kibana", + "xsrf": "something", + }, + "host": "es.local", + "path": "/", + "port": "443", + "protocol": "https:", + "query": null, + }, + ], + "keepAlive": true, + "log": [Function], + "serviceAccountToken": "ABC123", + "sniffOnConnectionFault": true, + "sniffOnStart": true, + } + `); + }); + + it('is not set when #auth is true, and a token is not provided', () => { + expect( + parseElasticsearchClientConfig( + { + apiVersion: 'v7.0.0', + customHeaders: { xsrf: 'something' }, + sniffOnStart: true, + sniffOnConnectionFault: true, + hosts: ['https://es.local'], + requestHeadersWhitelist: [], + }, + logger.get(), + 'custom-type', + { auth: true } + ) + ).toMatchInlineSnapshot(` + Object { + "apiVersion": "v7.0.0", + "hosts": Array [ + Object { + "headers": Object { + "x-elastic-product-origin": "kibana", + "xsrf": "something", + }, + "host": "es.local", + "path": "/", + "port": "443", + "protocol": "https:", + "query": null, + }, + ], + "keepAlive": true, + "log": [Function], + "sniffOnConnectionFault": true, + "sniffOnStart": true, + } + `); + }); + + it('is not set when #auth is false, and a token is provided', () => { + expect( + parseElasticsearchClientConfig( + { + apiVersion: 'v7.0.0', + customHeaders: { xsrf: 'something' }, + sniffOnStart: true, + sniffOnConnectionFault: true, + hosts: ['https://es.local'], + requestHeadersWhitelist: [], + serviceAccountToken: 'ABC123', + }, + logger.get(), + 'custom-type', + { auth: false } + ) + ).toMatchInlineSnapshot(` + Object { + "apiVersion": "v7.0.0", + "hosts": Array [ + Object { + "headers": Object { + "x-elastic-product-origin": "kibana", + "xsrf": "something", + }, + "host": "es.local", + "path": "/", + "port": "443", + "protocol": "https:", + "query": null, + }, + ], + "keepAlive": true, + "log": [Function], + "sniffOnConnectionFault": true, + "sniffOnStart": true, + } + `); + }); +}); + describe('#customHeaders', () => { test('override the default headers', () => { const headerKey = Object.keys(DEFAULT_HEADERS)[0]; diff --git a/src/core/server/elasticsearch/legacy/elasticsearch_client_config.ts b/src/core/server/elasticsearch/legacy/elasticsearch_client_config.ts index d68e7635c57cb..3d81caefad457 100644 --- a/src/core/server/elasticsearch/legacy/elasticsearch_client_config.ts +++ b/src/core/server/elasticsearch/legacy/elasticsearch_client_config.ts @@ -35,6 +35,7 @@ export type LegacyElasticsearchClientConfig = Pick & { pingTimeout?: ElasticsearchConfig['pingTimeout'] | ConfigOptions['pingTimeout']; requestTimeout?: ElasticsearchConfig['requestTimeout'] | ConfigOptions['requestTimeout']; @@ -61,6 +62,7 @@ interface LegacyElasticsearchClientConfigOverrides { /** @internal */ type ExtendedConfigOptions = ConfigOptions & Partial<{ + serviceAccountToken?: string; ssl: Partial<{ rejectUnauthorized: boolean; checkServerIdentity: typeof checkServerIdentity; @@ -106,9 +108,14 @@ export function parseElasticsearchClientConfig( esClientConfig.sniffInterval = getDurationAsMs(config.sniffInterval); } - const needsAuth = auth !== false && config.username && config.password; + const needsAuth = + auth !== false && ((config.username && config.password) || config.serviceAccountToken); if (needsAuth) { - esClientConfig.httpAuth = `${config.username}:${config.password}`; + if (config.username) { + esClientConfig.httpAuth = `${config.username}:${config.password}`; + } else if (config.serviceAccountToken) { + esClientConfig.serviceAccountToken = config.serviceAccountToken; + } } if (Array.isArray(config.hosts)) { diff --git a/src/core/server/saved_objects/migrations/core/migrate_raw_docs.test.ts b/src/core/server/saved_objects/migrations/core/migrate_raw_docs.test.ts index 0481e6118acb0..c8ff79351aadb 100644 --- a/src/core/server/saved_objects/migrations/core/migrate_raw_docs.test.ts +++ b/src/core/server/saved_objects/migrations/core/migrate_raw_docs.test.ts @@ -137,14 +137,15 @@ describe('migrateRawDocsSafely', () => { const transform = jest.fn((doc: any) => [ set(_.cloneDeep(doc), 'attributes.name', 'HOI!'), ]); - const task = migrateRawDocsSafely( - new SavedObjectsSerializer(new SavedObjectTypeRegistry()), - transform, - [ + const task = migrateRawDocsSafely({ + serializer: new SavedObjectsSerializer(new SavedObjectTypeRegistry()), + knownTypes: new Set(['a', 'c']), + migrateDoc: transform, + rawDocs: [ { _id: 'a:b', _source: { type: 'a', a: { name: 'AAA' } } }, { _id: 'c:d', _source: { type: 'c', c: { name: 'DDD' } } }, - ] - ); + ], + }); const result = (await task()) as Either.Right; expect(result._tag).toEqual('Right'); expect(result.right.processedDocs).toEqual([ @@ -181,14 +182,15 @@ describe('migrateRawDocsSafely', () => { const transform = jest.fn((doc: any) => [ set(_.cloneDeep(doc), 'attributes.name', 'TADA'), ]); - const task = migrateRawDocsSafely( - new SavedObjectsSerializer(new SavedObjectTypeRegistry()), - transform, - [ + const task = migrateRawDocsSafely({ + serializer: new SavedObjectsSerializer(new SavedObjectTypeRegistry()), + knownTypes: new Set(['a', 'c']), + migrateDoc: transform, + rawDocs: [ { _id: 'foo:b', _source: { type: 'a', a: { name: 'AAA' } } }, { _id: 'c:d', _source: { type: 'c', c: { name: 'DDD' } } }, - ] - ); + ], + }); const result = (await task()) as Either.Left; expect(transform).toHaveBeenCalledTimes(1); expect(result._tag).toEqual('Left'); @@ -202,11 +204,12 @@ describe('migrateRawDocsSafely', () => { set(_.cloneDeep(doc), 'attributes.name', 'HOI!'), { id: 'bar', type: 'foo', attributes: { name: 'baz' } }, ]); - const task = migrateRawDocsSafely( - new SavedObjectsSerializer(new SavedObjectTypeRegistry()), - transform, - [{ _id: 'a:b', _source: { type: 'a', a: { name: 'AAA' } } }] - ); + const task = migrateRawDocsSafely({ + serializer: new SavedObjectsSerializer(new SavedObjectTypeRegistry()), + knownTypes: new Set(['a', 'c']), + migrateDoc: transform, + rawDocs: [{ _id: 'a:b', _source: { type: 'a', a: { name: 'AAA' } } }], + }); const result = (await task()) as Either.Right; expect(result._tag).toEqual('Right'); expect(result.right.processedDocs).toEqual([ @@ -235,11 +238,12 @@ describe('migrateRawDocsSafely', () => { const transform = jest.fn((doc: any) => { throw new TransformSavedObjectDocumentError(new Error('error during transform'), '8.0.0'); }); - const task = migrateRawDocsSafely( - new SavedObjectsSerializer(new SavedObjectTypeRegistry()), - transform, - [{ _id: 'a:b', _source: { type: 'a', a: { name: 'AAA' } } }] // this is the raw doc - ); + const task = migrateRawDocsSafely({ + serializer: new SavedObjectsSerializer(new SavedObjectTypeRegistry()), + knownTypes: new Set(['a', 'c']), + migrateDoc: transform, + rawDocs: [{ _id: 'a:b', _source: { type: 'a', a: { name: 'AAA' } } }], // this is the raw doc + }); const result = (await task()) as Either.Left; expect(transform).toHaveBeenCalledTimes(1); expect(result._tag).toEqual('Left'); @@ -252,4 +256,43 @@ describe('migrateRawDocsSafely', () => { } `); }); + + test('skips documents of unknown types', async () => { + const transform = jest.fn((doc: any) => [ + set(_.cloneDeep(doc), 'attributes.name', 'HOI!'), + ]); + const task = migrateRawDocsSafely({ + serializer: new SavedObjectsSerializer(new SavedObjectTypeRegistry()), + knownTypes: new Set(['a']), + migrateDoc: transform, + rawDocs: [ + { _id: 'a:b', _source: { type: 'a', a: { name: 'AAA' } } }, + { _id: 'c:d', _source: { type: 'c', c: { name: 'DDD' } } }, + ], + }); + + const result = (await task()) as Either.Right; + expect(result._tag).toEqual('Right'); + expect(result.right.processedDocs).toEqual([ + { + _id: 'a:b', + _source: { type: 'a', a: { name: 'HOI!' }, migrationVersion: {}, references: [] }, + }, + { + _id: 'c:d', + // name field is not migrated on unknown type + _source: { type: 'c', c: { name: 'DDD' } }, + }, + ]); + + const obj1 = { + id: 'b', + type: 'a', + attributes: { name: 'AAA' }, + migrationVersion: {}, + references: [], + }; + expect(transform).toHaveBeenCalledTimes(1); + expect(transform).toHaveBeenNthCalledWith(1, obj1); + }); }); diff --git a/src/core/server/saved_objects/migrations/core/migrate_raw_docs.ts b/src/core/server/saved_objects/migrations/core/migrate_raw_docs.ts index 461ae1df6bc3d..65ea21a6778d5 100644 --- a/src/core/server/saved_objects/migrations/core/migrate_raw_docs.ts +++ b/src/core/server/saved_objects/migrations/core/migrate_raw_docs.ts @@ -81,6 +81,13 @@ export async function migrateRawDocs( return processedDocs; } +interface MigrateRawDocsSafelyDeps { + serializer: SavedObjectsSerializer; + knownTypes: ReadonlySet; + migrateDoc: MigrateAndConvertFn; + rawDocs: SavedObjectsRawDoc[]; +} + /** * Applies the specified migration function to every saved object document provided * and converts the saved object to a raw document. @@ -88,11 +95,15 @@ export async function migrateRawDocs( * for which the transformation function failed. * @returns {TaskEither.TaskEither} */ -export function migrateRawDocsSafely( - serializer: SavedObjectsSerializer, - migrateDoc: MigrateAndConvertFn, - rawDocs: SavedObjectsRawDoc[] -): TaskEither.TaskEither { +export function migrateRawDocsSafely({ + serializer, + knownTypes, + migrateDoc, + rawDocs, +}: MigrateRawDocsSafelyDeps): TaskEither.TaskEither< + DocumentsTransformFailed, + DocumentsTransformSuccess +> { return async () => { const migrateDocNonBlocking = transformNonBlocking(migrateDoc); const processedDocs: SavedObjectsRawDoc[] = []; @@ -100,7 +111,10 @@ export function migrateRawDocsSafely( const corruptSavedObjectIds: string[] = []; const options = { namespaceTreatment: 'lax' as const }; for (const raw of rawDocs) { - if (serializer.isRawSavedObject(raw, options)) { + // Do not transform documents of unknown types + if (raw?._source?.type && !knownTypes.has(raw._source.type)) { + processedDocs.push(raw); + } else if (serializer.isRawSavedObject(raw, options)) { try { const savedObject = convertToRawAddMigrationVersion(raw, options, serializer); processedDocs.push( diff --git a/src/core/server/saved_objects/migrations/kibana/kibana_migrator.ts b/src/core/server/saved_objects/migrations/kibana/kibana_migrator.ts index 2d0282e6d2632..572b2934e49b8 100644 --- a/src/core/server/saved_objects/migrations/kibana/kibana_migrator.ts +++ b/src/core/server/saved_objects/migrations/kibana/kibana_migrator.ts @@ -184,11 +184,12 @@ export class KibanaMigrator { logger: this.log, preMigrationScript: indexMap[index].script, transformRawDocs: (rawDocs: SavedObjectsRawDoc[]) => - migrateRawDocsSafely( - this.serializer, - this.documentMigrator.migrateAndConvert, - rawDocs - ), + migrateRawDocsSafely({ + serializer: this.serializer, + knownTypes: new Set(this.typeRegistry.getAllTypes().map((t) => t.name)), + migrateDoc: this.documentMigrator.migrateAndConvert, + rawDocs, + }), migrationVersionPerType: this.documentMigrator.migrationVersion, indexPrefix: index, migrationsConfig: this.soMigrationsConfig, diff --git a/src/core/server/saved_objects/migrationsv2/actions/check_for_unknown_docs.test.ts b/src/core/server/saved_objects/migrationsv2/actions/check_for_unknown_docs.test.ts index 62a619ef447fa..a52cb2a922968 100644 --- a/src/core/server/saved_objects/migrationsv2/actions/check_for_unknown_docs.test.ts +++ b/src/core/server/saved_objects/migrationsv2/actions/check_for_unknown_docs.test.ts @@ -97,9 +97,12 @@ describe('checkForUnknownDocs', () => { const result = await task(); expect(Either.isRight(result)).toBe(true); + expect((result as Either.Right).right).toEqual({ + unknownDocs: [], + }); }); - it('resolves with `Either.left` when unknown docs are found', async () => { + it('resolves with `Either.right` when unknown docs are found', async () => { const client = elasticsearchClientMock.createInternalClient( elasticsearchClientMock.createSuccessTransportRequestPromise({ hits: { @@ -120,9 +123,8 @@ describe('checkForUnknownDocs', () => { const result = await task(); - expect(Either.isLeft(result)).toBe(true); - expect((result as Either.Left).left).toEqual({ - type: 'unknown_docs_found', + expect(Either.isRight(result)).toBe(true); + expect((result as Either.Right).right).toEqual({ unknownDocs: [ { id: '12', type: 'foo' }, { id: '14', type: 'bar' }, @@ -148,9 +150,8 @@ describe('checkForUnknownDocs', () => { const result = await task(); - expect(Either.isLeft(result)).toBe(true); - expect((result as Either.Left).left).toEqual({ - type: 'unknown_docs_found', + expect(Either.isRight(result)).toBe(true); + expect((result as Either.Right).right).toEqual({ unknownDocs: [{ id: '12', type: 'unknown' }], }); }); diff --git a/src/core/server/saved_objects/migrationsv2/actions/check_for_unknown_docs.ts b/src/core/server/saved_objects/migrationsv2/actions/check_for_unknown_docs.ts index 7cc1c26a2ea8b..e3d72fbdf866f 100644 --- a/src/core/server/saved_objects/migrationsv2/actions/check_for_unknown_docs.ts +++ b/src/core/server/saved_objects/migrationsv2/actions/check_for_unknown_docs.ts @@ -32,7 +32,6 @@ export interface CheckForUnknownDocsFoundDoc { /** @internal */ export interface UnknownDocsFound { - type: 'unknown_docs_found'; unknownDocs: CheckForUnknownDocsFoundDoc[]; } @@ -42,8 +41,8 @@ export const checkForUnknownDocs = ({ unusedTypesQuery, knownTypes, }: CheckForUnknownDocsParams): TaskEither.TaskEither< - RetryableEsClientError | UnknownDocsFound, - {} + RetryableEsClientError, + UnknownDocsFound > => () => { const query = createUnknownDocQuery(unusedTypesQuery, knownTypes); @@ -56,14 +55,9 @@ export const checkForUnknownDocs = ({ }) .then((response) => { const { hits } = response.body.hits; - if (hits.length) { - return Either.left({ - type: 'unknown_docs_found' as const, - unknownDocs: hits.map((hit) => ({ id: hit._id, type: hit._source?.type ?? 'unknown' })), - }); - } else { - return Either.right({}); - } + return Either.right({ + unknownDocs: hits.map((hit) => ({ id: hit._id, type: hit._source?.type ?? 'unknown' })), + }); }) .catch(catchRetryableEsClientErrors); }; diff --git a/src/core/server/saved_objects/migrationsv2/actions/index.ts b/src/core/server/saved_objects/migrationsv2/actions/index.ts index 8e4584970f138..6bfcddfe1f6de 100644 --- a/src/core/server/saved_objects/migrationsv2/actions/index.ts +++ b/src/core/server/saved_objects/migrationsv2/actions/index.ts @@ -80,7 +80,6 @@ export type { } from './update_and_pickup_mappings'; export { updateAndPickupMappings } from './update_and_pickup_mappings'; -import type { UnknownDocsFound } from './check_for_unknown_docs'; export type { CheckForUnknownDocsParams, UnknownDocsFound, @@ -131,7 +130,6 @@ export interface ActionErrorTypeMap { alias_not_found_exception: AliasNotFound; remove_index_not_a_concrete_index: RemoveIndexNotAConcreteIndex; documents_transform_failed: DocumentsTransformFailed; - unknown_docs_found: UnknownDocsFound; } /** diff --git a/src/core/server/saved_objects/migrationsv2/integration_tests/migration_7_13_0_unknown_types.test.ts b/src/core/server/saved_objects/migrationsv2/integration_tests/migration_7_13_0_unknown_types.test.ts index c5e302adbe903..a30b3d291e7ec 100644 --- a/src/core/server/saved_objects/migrationsv2/integration_tests/migration_7_13_0_unknown_types.test.ts +++ b/src/core/server/saved_objects/migrationsv2/integration_tests/migration_7_13_0_unknown_types.test.ts @@ -7,42 +7,31 @@ */ import Path from 'path'; -import Fs from 'fs'; -import Util from 'util'; +import fs from 'fs/promises'; import { estypes } from '@elastic/elasticsearch'; import * as kbnTestServer from '../../../../test_helpers/kbn_server'; import { Root } from '../../../root'; +import JSON5 from 'json5'; +import { ElasticsearchClient } from '../../../elasticsearch'; const logFilePath = Path.join(__dirname, '7_13_unknown_types_test.log'); -const asyncUnlink = Util.promisify(Fs.unlink); - async function removeLogFile() { // ignore errors if it doesn't exist - await asyncUnlink(logFilePath).catch(() => void 0); + await fs.unlink(logFilePath).catch(() => void 0); } describe('migration v2', () => { let esServer: kbnTestServer.TestElasticsearchUtils; let root: Root; + let startES: () => Promise; beforeAll(async () => { await removeLogFile(); }); - afterAll(async () => { - if (root) { - await root.shutdown(); - } - if (esServer) { - await esServer.stop(); - } - - await new Promise((resolve) => setTimeout(resolve, 10000)); - }); - - it('migrates the documents to the highest version', async () => { - const { startES } = kbnTestServer.createTestServers({ + beforeEach(() => { + ({ startES } = kbnTestServer.createTestServers({ adjustTimeout: (t: number) => jest.setTimeout(t), settings: { es: { @@ -53,50 +42,155 @@ describe('migration v2', () => { dataArchive: Path.join(__dirname, 'archives', '7.13.0_with_unknown_so.zip'), }, }, - }); + })); + }); + + afterEach(async () => { + if (root) { + await root.shutdown(); + } + if (esServer) { + await esServer.stop(); + } + + await new Promise((resolve) => setTimeout(resolve, 10000)); + }); + it('logs a warning and completes the migration with unknown docs retained', async () => { root = createRoot(); + esServer = await startES(); + await root.setup(); + await root.start(); + + const logFileContent = await fs.readFile(logFilePath, 'utf-8'); + const records = logFileContent + .split('\n') + .filter(Boolean) + .map((str) => JSON5.parse(str)); + + const unknownDocsWarningLog = records.find((rec) => + rec.message.startsWith(`[.kibana] CHECK_UNKNOWN_DOCUMENTS`) + ); + + expect( + unknownDocsWarningLog.message.startsWith( + '[.kibana] CHECK_UNKNOWN_DOCUMENTS Upgrades will fail for 8.0+ because documents were found for unknown saved ' + + 'object types. To ensure that upgrades will succeed in the future, either re-enable plugins or delete ' + + 'these documents from the ".kibana_8.0.0_001" index after the current upgrade completes.' + ) + ).toBeTruthy(); + + const unknownDocs = [ + { type: 'space', id: 'space:default' }, + { type: 'space', id: 'space:first' }, + { type: 'space', id: 'space:second' }, + { type: 'space', id: 'space:third' }, + { type: 'space', id: 'space:forth' }, + { type: 'space', id: 'space:fifth' }, + { type: 'space', id: 'space:sixth' }, + { type: 'foo', id: 'P2SQfHkBs3dBRGh--No5' }, + { type: 'foo', id: 'QGSZfHkBs3dBRGh-ANoD' }, + { type: 'foo', id: 'QWSZfHkBs3dBRGh-hNob' }, + ]; + + unknownDocs.forEach(({ id, type }) => { + expect(unknownDocsWarningLog.message).toEqual( + expect.stringContaining(`- "${id}" (type: "${type}")`) + ); + }); + + const client: ElasticsearchClient = esServer.es.getClient(); + const { body: response } = await client.indices.getSettings({ index: '.kibana_8.0.0_001' }); + const settings = response['.kibana_8.0.0_001'] + .settings as estypes.IndicesIndexStatePrefixedSettings; + expect(settings.index).not.toBeUndefined(); + expect(settings.index!.blocks?.write).not.toEqual('true'); + + // Ensure that documents for unknown types were preserved in target index in an unmigrated state + const spaceDocs = await fetchDocs(client, '.kibana_8.0.0_001', 'space'); + expect(spaceDocs.map((s) => s.id)).toEqual( + expect.arrayContaining([ + 'space:default', + 'space:first', + 'space:second', + 'space:third', + 'space:forth', + 'space:fifth', + 'space:sixth', + ]) + ); + spaceDocs.forEach((d) => { + expect(d.migrationVersion.space).toEqual('6.6.0'); + expect(d.coreMigrationVersion).toEqual('7.13.0'); + }); + const fooDocs = await fetchDocs(client, '.kibana_8.0.0_001', 'foo'); + expect(fooDocs.map((f) => f.id)).toEqual( + expect.arrayContaining([ + 'P2SQfHkBs3dBRGh--No5', + 'QGSZfHkBs3dBRGh-ANoD', + 'QWSZfHkBs3dBRGh-hNob', + ]) + ); + fooDocs.forEach((d) => { + expect(d.migrationVersion.foo).toEqual('7.13.0'); + expect(d.coreMigrationVersion).toEqual('7.13.0'); + }); + }); + it('migrates outdated documents when types are re-enabled', async () => { + // Start kibana with foo and space types disabled + root = createRoot(); esServer = await startES(); await root.setup(); + await root.start(); - try { - await root.start(); - } catch (err) { - const errorMessage = err.message; - - expect( - errorMessage.startsWith( - 'Unable to complete saved object migrations for the [.kibana] index: Migration failed because documents ' + - 'were found for unknown saved object types. To proceed with the migration, please delete these documents from the ' + - '".kibana_7.13.0_001" index.' - ) - ).toBeTruthy(); - - const unknownDocs = [ - { type: 'space', id: 'space:default' }, - { type: 'space', id: 'space:first' }, - { type: 'space', id: 'space:second' }, - { type: 'space', id: 'space:third' }, - { type: 'space', id: 'space:forth' }, - { type: 'space', id: 'space:fifth' }, - { type: 'space', id: 'space:sixth' }, - { type: 'foo', id: 'P2SQfHkBs3dBRGh--No5' }, - { type: 'foo', id: 'QGSZfHkBs3dBRGh-ANoD' }, - { type: 'foo', id: 'QWSZfHkBs3dBRGh-hNob' }, - ]; - - unknownDocs.forEach(({ id, type }) => { - expect(errorMessage).toEqual(expect.stringContaining(`- "${id}" (type: "${type}")`)); - }); - - const client = esServer.es.getClient(); - const { body: response } = await client.indices.getSettings({ index: '.kibana_7.13.0_001' }); - const settings = response['.kibana_7.13.0_001'] - .settings as estypes.IndicesIndexStatePrefixedSettings; - expect(settings.index).not.toBeUndefined(); - expect(settings.index!.blocks?.write).not.toEqual('true'); - } + // Shutdown and start Kibana again with space type registered to ensure space docs get migrated + await root.shutdown(); + root = createRoot(); + const coreSetup = await root.setup(); + coreSetup.savedObjects.registerType({ + name: 'space', + hidden: false, + mappings: { properties: {} }, + namespaceType: 'agnostic', + migrations: { + '6.6.0': (d) => d, + '8.0.0': (d) => d, + }, + }); + await root.start(); + + const client: ElasticsearchClient = esServer.es.getClient(); + const spacesDocsMigrated = await fetchDocs(client, '.kibana_8.0.0_001', 'space'); + expect(spacesDocsMigrated.map((s) => s.id)).toEqual( + expect.arrayContaining([ + 'space:default', + 'space:first', + 'space:second', + 'space:third', + 'space:forth', + 'space:fifth', + 'space:sixth', + ]) + ); + spacesDocsMigrated.forEach((d) => { + expect(d.migrationVersion.space).toEqual('8.0.0'); // should be migrated + expect(d.coreMigrationVersion).toEqual('8.0.0'); + }); + + // Make sure unmigrated foo docs are also still there in an unmigrated state + const fooDocsUnmigrated = await fetchDocs(client, '.kibana_8.0.0_001', 'foo'); + expect(fooDocsUnmigrated.map((f) => f.id)).toEqual( + expect.arrayContaining([ + 'P2SQfHkBs3dBRGh--No5', + 'QGSZfHkBs3dBRGh-ANoD', + 'QWSZfHkBs3dBRGh-hNob', + ]) + ); + fooDocsUnmigrated.forEach((d) => { + expect(d.migrationVersion.foo).toEqual('7.13.0'); // should still not be migrated + expect(d.coreMigrationVersion).toEqual('7.13.0'); + }); }); }); @@ -131,3 +225,26 @@ function createRoot() { } ); } + +async function fetchDocs(esClient: ElasticsearchClient, index: string, type: string) { + const { body } = await esClient.search({ + index, + size: 10000, + body: { + query: { + bool: { + should: [ + { + term: { type }, + }, + ], + }, + }, + }, + }); + + return body.hits.hits.map((h) => ({ + ...h._source, + id: h._id, + })); +} diff --git a/src/core/server/saved_objects/migrationsv2/migrations_state_action_machine.ts b/src/core/server/saved_objects/migrationsv2/migrations_state_action_machine.ts index 8443f837a7f1d..cd42d4077695e 100644 --- a/src/core/server/saved_objects/migrationsv2/migrations_state_action_machine.ts +++ b/src/core/server/saved_objects/migrationsv2/migrations_state_action_machine.ts @@ -52,6 +52,8 @@ const logStateTransition = ( switch (level) { case 'error': return logger.error(logMessagePrefix + message); + case 'warning': + return logger.warn(logMessagePrefix + message); case 'info': return logger.info(logMessagePrefix + message); default: diff --git a/src/core/server/saved_objects/migrationsv2/model/extract_errors.test.ts b/src/core/server/saved_objects/migrationsv2/model/extract_errors.test.ts index a028c40ca6597..c2daadcd342ac 100644 --- a/src/core/server/saved_objects/migrationsv2/model/extract_errors.test.ts +++ b/src/core/server/saved_objects/migrationsv2/model/extract_errors.test.ts @@ -25,7 +25,7 @@ describe('extractUnknownDocFailureReason', () => { '.kibana_15' ) ).toMatchInlineSnapshot(` - "Migration failed because documents were found for unknown saved object types. To proceed with the migration, please delete these documents from the \\".kibana_15\\" index. + "Upgrades will fail for 8.0+ because documents were found for unknown saved object types. To ensure that upgrades will succeed in the future, either re-enable plugins or delete these documents from the \\".kibana_15\\" index after the current upgrade completes. The documents with unknown types are: - \\"unknownType:12\\" (type: \\"unknownType\\") - \\"anotherUnknownType:42\\" (type: \\"anotherUnknownType\\") diff --git a/src/core/server/saved_objects/migrationsv2/model/extract_errors.ts b/src/core/server/saved_objects/migrationsv2/model/extract_errors.ts index cc6fe7bad3ca7..082e6344afffc 100644 --- a/src/core/server/saved_objects/migrationsv2/model/extract_errors.ts +++ b/src/core/server/saved_objects/migrationsv2/model/extract_errors.ts @@ -38,15 +38,16 @@ export function extractTransformFailuresReason( export function extractUnknownDocFailureReason( unknownDocs: CheckForUnknownDocsFoundDoc[], - sourceIndex: string + targetIndex: string ): string { return ( - `Migration failed because documents were found for unknown saved object types. ` + - `To proceed with the migration, please delete these documents from the "${sourceIndex}" index.\n` + + `Upgrades will fail for 8.0+ because documents were found for unknown saved object types. ` + + `To ensure that upgrades will succeed in the future, either re-enable plugins or delete these documents from the ` + + `"${targetIndex}" index after the current upgrade completes.\n` + `The documents with unknown types are:\n` + unknownDocs.map((doc) => `- "${doc.id}" (type: "${doc.type}")\n`).join('') + `You can delete them using the following command:\n` + - `curl -X POST "{elasticsearch}/${sourceIndex}/_bulk?pretty" -H 'Content-Type: application/json' -d'\n` + + `curl -X POST "{elasticsearch}/${targetIndex}/_bulk?pretty" -H 'Content-Type: application/json' -d'\n` + unknownDocs.map((doc) => `{ "delete" : { "_id" : "${doc.id}" } }\n`).join('') + `'` ); diff --git a/src/core/server/saved_objects/migrationsv2/model/model.test.ts b/src/core/server/saved_objects/migrationsv2/model/model.test.ts index 136709d1b874f..3058f586efb0c 100644 --- a/src/core/server/saved_objects/migrationsv2/model/model.test.ts +++ b/src/core/server/saved_objects/migrationsv2/model/model.test.ts @@ -715,7 +715,7 @@ describe('migrations v2 model', () => { }, } as const; - test('CHECK_UNKNOWN_DOCUMENTS -> SET_SOURCE_WRITE_BLOCK if action succeeds', () => { + test('CHECK_UNKNOWN_DOCUMENTS -> SET_SOURCE_WRITE_BLOCK if action succeeds and no unknown docs are found', () => { const checkUnknownDocumentsSourceState: CheckUnknownDocumentsState = { ...baseState, controlState: 'CHECK_UNKNOWN_DOCUMENTS', @@ -723,7 +723,7 @@ describe('migrations v2 model', () => { sourceIndexMappings: mappingsWithUnknownType, }; - const res: ResponseType<'CHECK_UNKNOWN_DOCUMENTS'> = Either.right({}); + const res: ResponseType<'CHECK_UNKNOWN_DOCUMENTS'> = Either.right({ unknownDocs: [] }); const newState = model(checkUnknownDocumentsSourceState, res); expect(newState.controlState).toEqual('SET_SOURCE_WRITE_BLOCK'); @@ -758,9 +758,12 @@ describe('migrations v2 model', () => { }, } `); + + // No log message gets appended + expect(newState.logs).toEqual([]); }); - test('CHECK_UNKNOWN_DOCUMENTS -> FATAL if action fails and unknown docs were found', () => { + test('CHECK_UNKNOWN_DOCUMENTS -> SET_SOURCE_WRITE_BLOCK and adds log if action succeeds and unknown docs were found', () => { const checkUnknownDocumentsSourceState: CheckUnknownDocumentsState = { ...baseState, controlState: 'CHECK_UNKNOWN_DOCUMENTS', @@ -768,20 +771,51 @@ describe('migrations v2 model', () => { sourceIndexMappings: mappingsWithUnknownType, }; - const res: ResponseType<'CHECK_UNKNOWN_DOCUMENTS'> = Either.left({ - type: 'unknown_docs_found', + const res: ResponseType<'CHECK_UNKNOWN_DOCUMENTS'> = Either.right({ unknownDocs: [ { id: 'dashboard:12', type: 'dashboard' }, { id: 'foo:17', type: 'foo' }, ], }); const newState = model(checkUnknownDocumentsSourceState, res); - expect(newState.controlState).toEqual('FATAL'); + expect(newState.controlState).toEqual('SET_SOURCE_WRITE_BLOCK'); expect(newState).toMatchObject({ - controlState: 'FATAL', - reason: expect.stringContaining( - 'Migration failed because documents were found for unknown saved object types' + controlState: 'SET_SOURCE_WRITE_BLOCK', + sourceIndex: Option.some('.kibana_3'), + targetIndex: '.kibana_7.11.0_001', + }); + + // This snapshot asserts that we disable the unknown saved object + // type. Because it's mappings are disabled, we also don't copy the + // `_meta.migrationMappingPropertyHashes` for the disabled type. + expect(newState.targetIndexMappings).toMatchInlineSnapshot(` + Object { + "_meta": Object { + "migrationMappingPropertyHashes": Object { + "new_saved_object_type": "4a11183eee21e6fbad864f7a30b39ad0", + }, + }, + "properties": Object { + "disabled_saved_object_type": Object { + "dynamic": false, + "properties": Object {}, + }, + "new_saved_object_type": Object { + "properties": Object { + "value": Object { + "type": "text", + }, + }, + }, + }, + } + `); + + expect(newState.logs[0]).toMatchObject({ + level: 'warning', + message: expect.stringContaining( + 'Upgrades will fail for 8.0+ because documents were found for unknown saved object types' ), }); }); diff --git a/src/core/server/saved_objects/migrationsv2/model/model.ts b/src/core/server/saved_objects/migrationsv2/model/model.ts index b28e4e3024380..a78457fa891f7 100644 --- a/src/core/server/saved_objects/migrationsv2/model/model.ts +++ b/src/core/server/saved_objects/migrationsv2/model/model.ts @@ -10,7 +10,7 @@ import * as Either from 'fp-ts/lib/Either'; import * as Option from 'fp-ts/lib/Option'; import { AliasAction, isLeftTypeof } from '../actions'; -import { AllActionStates, State } from '../types'; +import { AllActionStates, MigrationLog, State } from '../types'; import type { ResponseType } from '../next'; import { disableUnknownTypeMappingFields } from '../../migrations/core/migration_context'; import { @@ -318,6 +318,7 @@ export const model = (currentState: State, resW: ResponseType): } } else if (stateP.controlState === 'CHECK_UNKNOWN_DOCUMENTS') { const res = resW as ExcludeRetryableEsError>; + if (Either.isRight(res)) { const source = stateP.sourceIndex; const target = stateP.versionIndex; @@ -336,17 +337,24 @@ export const model = (currentState: State, resW: ResponseType): { add: { index: target, alias: stateP.versionAlias } }, { remove_index: { index: stateP.tempIndex } }, ]), + + logs: [ + ...stateP.logs, + ...(res.right.unknownDocs.length > 0 + ? ([ + { + level: 'warning', + message: `CHECK_UNKNOWN_DOCUMENTS ${extractUnknownDocFailureReason( + res.right.unknownDocs, + target + )}`, + }, + ] as MigrationLog[]) + : []), + ], }; } else { - if (isLeftTypeof(res.left, 'unknown_docs_found')) { - return { - ...stateP, - controlState: 'FATAL', - reason: extractUnknownDocFailureReason(res.left.unknownDocs, stateP.sourceIndex.value), - }; - } else { - return throwBadResponse(stateP, res.left); - } + return throwBadResponse(stateP, res); } } else if (stateP.controlState === 'SET_SOURCE_WRITE_BLOCK') { const res = resW as ExcludeRetryableEsError>; diff --git a/src/core/server/saved_objects/migrationsv2/types.ts b/src/core/server/saved_objects/migrationsv2/types.ts index ed361a710ac99..576e3a4412184 100644 --- a/src/core/server/saved_objects/migrationsv2/types.ts +++ b/src/core/server/saved_objects/migrationsv2/types.ts @@ -19,7 +19,7 @@ import { DocumentsTransformSuccess, } from '../migrations/core/migrate_raw_docs'; -export type MigrationLogLevel = 'error' | 'info'; +export type MigrationLogLevel = 'error' | 'info' | 'warning'; export interface MigrationLog { level: MigrationLogLevel; diff --git a/src/core/server/server.api.md b/src/core/server/server.api.md index ed55c6e3d09cb..65ea082c9d8a8 100644 --- a/src/core/server/server.api.md +++ b/src/core/server/server.api.md @@ -345,6 +345,7 @@ export const config: { hosts: Type; username: Type; password: Type; + serviceAccountToken: Type; requestHeadersWhitelist: Type; customHeaders: Type>; shardTimeout: Type; @@ -948,7 +949,7 @@ export type ElasticsearchClient = Omit & { +export type ElasticsearchClientConfig = Pick & { pingTimeout?: ElasticsearchConfig['pingTimeout'] | ClientOptions['pingTimeout']; requestTimeout?: ElasticsearchConfig['requestTimeout'] | ClientOptions['requestTimeout']; ssl?: Partial; @@ -968,6 +969,7 @@ export class ElasticsearchConfig { readonly pingTimeout: Duration; readonly requestHeadersWhitelist: string[]; readonly requestTimeout: Duration; + readonly serviceAccountToken?: string; readonly shardTimeout: Duration; readonly sniffInterval: false | Duration; readonly sniffOnConnectionFault: boolean; @@ -1675,7 +1677,7 @@ export class LegacyClusterClient implements ILegacyClusterClient { } // @public @deprecated (undocumented) -export type LegacyElasticsearchClientConfig = Pick & Pick & { +export type LegacyElasticsearchClientConfig = Pick & Pick & { pingTimeout?: ElasticsearchConfig['pingTimeout'] | ConfigOptions['pingTimeout']; requestTimeout?: ElasticsearchConfig['requestTimeout'] | ConfigOptions['requestTimeout']; sniffInterval?: ElasticsearchConfig['sniffInterval'] | ConfigOptions['sniffInterval']; diff --git a/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker b/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker index 39a7665f1ce5e..c7a129418765b 100755 --- a/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker +++ b/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker @@ -51,6 +51,7 @@ kibana_vars=( elasticsearch.pingTimeout elasticsearch.requestHeadersWhitelist elasticsearch.requestTimeout + elasticsearch.serviceAccountToken elasticsearch.shardTimeout elasticsearch.sniffInterval elasticsearch.sniffOnConnectionFault diff --git a/src/dev/precommit_hook/casing_check_config.js b/src/dev/precommit_hook/casing_check_config.js index ba18c085b649d..57ae640da3c84 100644 --- a/src/dev/precommit_hook/casing_check_config.js +++ b/src/dev/precommit_hook/casing_check_config.js @@ -77,7 +77,11 @@ export const IGNORE_FILE_GLOBS = [ * * @type {Array} */ -export const KEBAB_CASE_DIRECTORY_GLOBS = ['packages/*', 'x-pack']; +export const KEBAB_CASE_DIRECTORY_GLOBS = [ + 'packages/*', + 'x-pack', + 'packages/kbn-optimizer/src/__fixtures__/mock_repo/packages/kbn-ui-shared-deps', +]; /** * These patterns are matched against directories and indicate diff --git a/src/plugins/console/server/lib/spec_definitions/js/ingest.ts b/src/plugins/console/server/lib/spec_definitions/js/ingest.ts index 2ac8d2cb87ccc..5ffae9d7be23e 100644 --- a/src/plugins/console/server/lib/spec_definitions/js/ingest.ts +++ b/src/plugins/console/server/lib/spec_definitions/js/ingest.ts @@ -179,6 +179,29 @@ const dropProcessorDefinition = { }, }; +// Based on https://www.elastic.co/guide/en/elasticsearch/reference/master/enrich-processor.html +const enrichProcessorDefinition = { + enrich: { + __template: { + policy_name: '', + field: '', + target_field: '', + }, + policy_name: '', + field: '', + target_field: '', + ignore_missing: { + __one_of: [false, true], + }, + override: { + __one_of: [true, false], + }, + max_matches: 1, + shape_relation: 'INTERSECTS', + ...commonPipelineParams, + }, +}; + // Based on https://www.elastic.co/guide/en/elasticsearch/reference/master/fail-processor.html const failProcessorDefinition = { fail: { @@ -279,13 +302,26 @@ const inferenceProcessorDefinition = { inference: { __template: { model_id: '', - field_map: {}, inference_config: {}, + field_mappings: {}, }, - model_id: '', - field_map: {}, - inference_config: {}, target_field: '', + model_id: '', + field_mappings: { + __template: {}, + }, + inference_config: { + regression: { + __template: {}, + results_field: '', + }, + classification: { + __template: {}, + results_field: '', + num_top_classes: 2, + top_classes_results_field: '', + }, + }, ...commonPipelineParams, }, }; @@ -530,6 +566,7 @@ const processorDefinition = { dissectProcessorDefinition, dotExpanderProcessorDefinition, dropProcessorDefinition, + enrichProcessorDefinition, failProcessorDefinition, foreachProcessorDefinition, geoipProcessorDefinition, diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/async_search.delete.json b/src/plugins/console/server/lib/spec_definitions/json/generated/async_search.delete.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/async_search.delete.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/async_search.delete.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/async_search.get.json b/src/plugins/console/server/lib/spec_definitions/json/generated/async_search.get.json similarity index 88% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/async_search.get.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/async_search.get.json index 09f4520d580e3..3fb1f3da6fdf7 100644 --- a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/async_search.get.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/async_search.get.json @@ -1,7 +1,7 @@ { "async_search.get": { "url_params": { - "wait_for_completion": "", + "wait_for_completion_timeout": "", "keep_alive": "", "typed_keys": "__flag__" }, diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/async_search.status.json b/src/plugins/console/server/lib/spec_definitions/json/generated/async_search.status.json new file mode 100644 index 0000000000000..f2aef917ea23d --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/async_search.status.json @@ -0,0 +1,11 @@ +{ + "async_search.status": { + "methods": [ + "GET" + ], + "patterns": [ + "_async_search/status/{id}" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html" + } +} diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/async_search.submit.json b/src/plugins/console/server/lib/spec_definitions/json/generated/async_search.submit.json similarity index 92% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/async_search.submit.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/async_search.submit.json index 83fb7c0fe75ad..635436bdb167f 100644 --- a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/async_search.submit.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/async_search.submit.json @@ -1,8 +1,8 @@ { "async_search.submit": { "url_params": { - "wait_for_completion": "", - "clean_on_completion": "__flag__", + "wait_for_completion_timeout": "", + "keep_on_completion": "__flag__", "keep_alive": "", "batched_reduce_size": "", "request_cache": "__flag__", @@ -23,6 +23,7 @@ "expand_wildcards": [ "open", "closed", + "hidden", "none", "all" ], @@ -51,7 +52,7 @@ "suggest_text": "", "timeout": "", "track_scores": "__flag__", - "track_total_hits": "__flag__", + "track_total_hits": "", "allow_partial_search_results": "__flag__", "typed_keys": "__flag__", "version": "__flag__", diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/autoscaling.delete_autoscaling_policy.json b/src/plugins/console/server/lib/spec_definitions/json/generated/autoscaling.delete_autoscaling_policy.json new file mode 100644 index 0000000000000..2d65c9744987c --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/autoscaling.delete_autoscaling_policy.json @@ -0,0 +1,11 @@ +{ + "autoscaling.delete_autoscaling_policy": { + "methods": [ + "DELETE" + ], + "patterns": [ + "_autoscaling/policy/{name}" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-delete-autoscaling-policy.html" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/autoscaling.get_autoscaling_capacity.json b/src/plugins/console/server/lib/spec_definitions/json/generated/autoscaling.get_autoscaling_capacity.json new file mode 100644 index 0000000000000..24aea8cfba86b --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/autoscaling.get_autoscaling_capacity.json @@ -0,0 +1,11 @@ +{ + "autoscaling.get_autoscaling_capacity": { + "methods": [ + "GET" + ], + "patterns": [ + "_autoscaling/capacity" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-get-autoscaling-capacity.html" + } +} diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/autoscaling.get_autoscaling_decision.json b/src/plugins/console/server/lib/spec_definitions/json/generated/autoscaling.get_autoscaling_decision.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/autoscaling.get_autoscaling_decision.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/autoscaling.get_autoscaling_decision.json diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/autoscaling.get_autoscaling_policy.json b/src/plugins/console/server/lib/spec_definitions/json/generated/autoscaling.get_autoscaling_policy.json new file mode 100644 index 0000000000000..4d5ab1d00266b --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/autoscaling.get_autoscaling_policy.json @@ -0,0 +1,11 @@ +{ + "autoscaling.get_autoscaling_policy": { + "methods": [ + "GET" + ], + "patterns": [ + "_autoscaling/policy/{name}" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-get-autoscaling-policy.html" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/autoscaling.put_autoscaling_policy.json b/src/plugins/console/server/lib/spec_definitions/json/generated/autoscaling.put_autoscaling_policy.json new file mode 100644 index 0000000000000..3ed40851c94d9 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/autoscaling.put_autoscaling_policy.json @@ -0,0 +1,11 @@ +{ + "autoscaling.put_autoscaling_policy": { + "methods": [ + "PUT" + ], + "patterns": [ + "_autoscaling/policy/{name}" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-put-autoscaling-policy.html" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/bulk.json b/src/plugins/console/server/lib/spec_definitions/json/generated/bulk.json index 2d3bd260372ba..144a3ad359c40 100644 --- a/src/plugins/console/server/lib/spec_definitions/json/generated/bulk.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/bulk.json @@ -13,7 +13,8 @@ "_source": [], "_source_excludes": [], "_source_includes": [], - "pipeline": "" + "pipeline": "", + "require_alias": "__flag__" }, "methods": [ "POST", diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/cat.indices.json b/src/plugins/console/server/lib/spec_definitions/json/generated/cat.indices.json index 410350df13721..a0d405f60904d 100644 --- a/src/plugins/console/server/lib/spec_definitions/json/generated/cat.indices.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/cat.indices.json @@ -15,7 +15,6 @@ "p", "pb" ], - "local": "__flag__", "master_timeout": "", "h": [], "health": [ diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/cat.ml_data_frame_analytics.json b/src/plugins/console/server/lib/spec_definitions/json/generated/cat.ml_data_frame_analytics.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/cat.ml_data_frame_analytics.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/cat.ml_data_frame_analytics.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/cat.ml_datafeeds.json b/src/plugins/console/server/lib/spec_definitions/json/generated/cat.ml_datafeeds.json similarity index 93% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/cat.ml_datafeeds.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/cat.ml_datafeeds.json index 04f4e45782e1f..e58735a037153 100644 --- a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/cat.ml_datafeeds.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/cat.ml_datafeeds.json @@ -1,6 +1,7 @@ { "cat.ml_datafeeds": { "url_params": { + "allow_no_match": "__flag__", "allow_no_datafeeds": "__flag__", "format": "", "h": [], diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/cat.ml_jobs.json b/src/plugins/console/server/lib/spec_definitions/json/generated/cat.ml_jobs.json similarity index 95% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/cat.ml_jobs.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/cat.ml_jobs.json index 2f7e03e564b5d..a7a068fa3691e 100644 --- a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/cat.ml_jobs.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/cat.ml_jobs.json @@ -1,6 +1,7 @@ { "cat.ml_jobs": { "url_params": { + "allow_no_match": "__flag__", "allow_no_jobs": "__flag__", "bytes": [ "b", diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/cat.ml_trained_models.json b/src/plugins/console/server/lib/spec_definitions/json/generated/cat.ml_trained_models.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/cat.ml_trained_models.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/cat.ml_trained_models.json diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/cat.nodes.json b/src/plugins/console/server/lib/spec_definitions/json/generated/cat.nodes.json index 2e89a66ef1f35..b695bb1df9625 100644 --- a/src/plugins/console/server/lib/spec_definitions/json/generated/cat.nodes.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/cat.nodes.json @@ -16,7 +16,6 @@ ], "format": "", "full_id": "__flag__", - "local": "__flag__", "master_timeout": "", "h": [], "help": "__flag__", @@ -30,7 +29,8 @@ "micros", "nanos" ], - "v": "__flag__" + "v": "__flag__", + "include_unloaded_segments": "__flag__" }, "methods": [ "GET" diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/cat.plugins.json b/src/plugins/console/server/lib/spec_definitions/json/generated/cat.plugins.json index 958992be81216..752313bf6f975 100644 --- a/src/plugins/console/server/lib/spec_definitions/json/generated/cat.plugins.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/cat.plugins.json @@ -6,6 +6,7 @@ "master_timeout": "", "h": [], "help": "__flag__", + "include_bootstrap": "__flag__", "s": [], "v": "__flag__" }, diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/cat.shards.json b/src/plugins/console/server/lib/spec_definitions/json/generated/cat.shards.json index 2b66562e3d6df..64a235eae67d5 100644 --- a/src/plugins/console/server/lib/spec_definitions/json/generated/cat.shards.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/cat.shards.json @@ -15,7 +15,6 @@ "p", "pb" ], - "local": "__flag__", "master_timeout": "", "h": [], "help": "__flag__", diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/cat.tasks.json b/src/plugins/console/server/lib/spec_definitions/json/generated/cat.tasks.json index 31c987a5893cf..f981d189a17b2 100644 --- a/src/plugins/console/server/lib/spec_definitions/json/generated/cat.tasks.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/cat.tasks.json @@ -2,10 +2,10 @@ "cat.tasks": { "url_params": { "format": "", - "node_id": [], + "nodes": [], "actions": [], "detailed": "__flag__", - "parent_task": "", + "parent_task_id": "", "h": [], "help": "__flag__", "s": [], diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/cat.thread_pool.json b/src/plugins/console/server/lib/spec_definitions/json/generated/cat.thread_pool.json index 5017a0390a2e4..d237f8d54ab2a 100644 --- a/src/plugins/console/server/lib/spec_definitions/json/generated/cat.thread_pool.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/cat.thread_pool.json @@ -2,13 +2,14 @@ "cat.thread_pool": { "url_params": { "format": "", - "size": [ - "", - "k", + "time": [ + "d", + "h", "m", - "g", - "t", - "p" + "s", + "ms", + "micros", + "nanos" ], "local": "__flag__", "master_timeout": "", diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/cat.transforms.json b/src/plugins/console/server/lib/spec_definitions/json/generated/cat.transforms.json new file mode 100644 index 0000000000000..048d7af411635 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/cat.transforms.json @@ -0,0 +1,31 @@ +{ + "cat.transforms": { + "url_params": { + "from": 0, + "size": 0, + "allow_no_match": "__flag__", + "format": "", + "h": [], + "help": "__flag__", + "s": [], + "time": [ + "d", + "h", + "m", + "s", + "ms", + "micros", + "nanos" + ], + "v": "__flag__" + }, + "methods": [ + "GET" + ], + "patterns": [ + "_cat/transforms", + "_cat/transforms/{transform_id}" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-transforms.html" + } +} diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ccr.delete_auto_follow_pattern.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ccr.delete_auto_follow_pattern.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ccr.delete_auto_follow_pattern.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ccr.delete_auto_follow_pattern.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ccr.follow.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ccr.follow.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ccr.follow.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ccr.follow.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ccr.follow_info.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ccr.follow_info.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ccr.follow_info.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ccr.follow_info.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ccr.follow_stats.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ccr.follow_stats.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ccr.follow_stats.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ccr.follow_stats.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ccr.forget_follower.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ccr.forget_follower.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ccr.forget_follower.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ccr.forget_follower.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ccr.get_auto_follow_pattern.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ccr.get_auto_follow_pattern.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ccr.get_auto_follow_pattern.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ccr.get_auto_follow_pattern.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ccr.pause_auto_follow_pattern.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ccr.pause_auto_follow_pattern.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ccr.pause_auto_follow_pattern.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ccr.pause_auto_follow_pattern.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ccr.pause_follow.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ccr.pause_follow.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ccr.pause_follow.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ccr.pause_follow.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ccr.put_auto_follow_pattern.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ccr.put_auto_follow_pattern.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ccr.put_auto_follow_pattern.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ccr.put_auto_follow_pattern.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ccr.resume_auto_follow_pattern.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ccr.resume_auto_follow_pattern.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ccr.resume_auto_follow_pattern.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ccr.resume_auto_follow_pattern.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ccr.resume_follow.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ccr.resume_follow.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ccr.resume_follow.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ccr.resume_follow.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ccr.stats.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ccr.stats.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ccr.stats.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ccr.stats.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ccr.unfollow.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ccr.unfollow.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ccr.unfollow.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ccr.unfollow.json diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/clear_scroll.json b/src/plugins/console/server/lib/spec_definitions/json/generated/clear_scroll.json index 7e6e6692f931b..5273574357ddd 100644 --- a/src/plugins/console/server/lib/spec_definitions/json/generated/clear_scroll.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/clear_scroll.json @@ -6,6 +6,6 @@ "patterns": [ "_search/scroll" ], - "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html#_clear_scroll_api" + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-scroll-api.html" } } diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/close_point_in_time.json b/src/plugins/console/server/lib/spec_definitions/json/generated/close_point_in_time.json new file mode 100644 index 0000000000000..e1997bc2e20ea --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/close_point_in_time.json @@ -0,0 +1,11 @@ +{ + "close_point_in_time": { + "methods": [ + "DELETE" + ], + "patterns": [ + "_pit" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/point-in-time-api.html" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/cluster.delete_component_template.json b/src/plugins/console/server/lib/spec_definitions/json/generated/cluster.delete_component_template.json index e935b8999e6d3..24255f7231892 100644 --- a/src/plugins/console/server/lib/spec_definitions/json/generated/cluster.delete_component_template.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/cluster.delete_component_template.json @@ -10,6 +10,6 @@ "patterns": [ "_component_template/{name}" ], - "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-templates.html" + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html" } } diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/cluster.delete_voting_config_exclusions.json b/src/plugins/console/server/lib/spec_definitions/json/generated/cluster.delete_voting_config_exclusions.json new file mode 100644 index 0000000000000..6b4b48113f2a8 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/cluster.delete_voting_config_exclusions.json @@ -0,0 +1,14 @@ +{ + "cluster.delete_voting_config_exclusions": { + "url_params": { + "wait_for_removal": "__flag__" + }, + "methods": [ + "DELETE" + ], + "patterns": [ + "_cluster/voting_config_exclusions" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/voting-config-exclusions.html" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/cluster.exists_component_template.json b/src/plugins/console/server/lib/spec_definitions/json/generated/cluster.exists_component_template.json new file mode 100644 index 0000000000000..24dcbeb006e6f --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/cluster.exists_component_template.json @@ -0,0 +1,15 @@ +{ + "cluster.exists_component_template": { + "url_params": { + "master_timeout": "", + "local": "__flag__" + }, + "methods": [ + "HEAD" + ], + "patterns": [ + "_component_template/{name}" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/cluster.get_component_template.json b/src/plugins/console/server/lib/spec_definitions/json/generated/cluster.get_component_template.json index 784053d69ad5a..cbfed6741f8a4 100644 --- a/src/plugins/console/server/lib/spec_definitions/json/generated/cluster.get_component_template.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/cluster.get_component_template.json @@ -12,5 +12,6 @@ "_component_template", "_component_template/{name}" ], - "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/getting-component-templates.html" } + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/getting-component-templates.html" + } } diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/cluster.get_settings.json b/src/plugins/console/server/lib/spec_definitions/json/generated/cluster.get_settings.json index 249f582c33682..6c97254b5201c 100644 --- a/src/plugins/console/server/lib/spec_definitions/json/generated/cluster.get_settings.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/cluster.get_settings.json @@ -12,6 +12,6 @@ "patterns": [ "_cluster/settings" ], - "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html" + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-get-settings.html" } } diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/cluster.post_voting_config_exclusions.json b/src/plugins/console/server/lib/spec_definitions/json/generated/cluster.post_voting_config_exclusions.json new file mode 100644 index 0000000000000..74cc74a8c05a4 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/cluster.post_voting_config_exclusions.json @@ -0,0 +1,16 @@ +{ + "cluster.post_voting_config_exclusions": { + "url_params": { + "node_ids": "", + "node_names": "", + "timeout": "" + }, + "methods": [ + "POST" + ], + "patterns": [ + "_cluster/voting_config_exclusions" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/voting-config-exclusions.html" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/cluster.put_component_template.json b/src/plugins/console/server/lib/spec_definitions/json/generated/cluster.put_component_template.json index 8a0bfc278cbf3..999ff0c149fe8 100644 --- a/src/plugins/console/server/lib/spec_definitions/json/generated/cluster.put_component_template.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/cluster.put_component_template.json @@ -5,10 +5,12 @@ "master_timeout": "" }, "methods": [ - "PUT" + "PUT", + "POST" ], "patterns": [ "_component_template/{name}" ], - "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html" } + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html" + } } diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/dangling_indices.delete_dangling_index.json b/src/plugins/console/server/lib/spec_definitions/json/generated/dangling_indices.delete_dangling_index.json new file mode 100644 index 0000000000000..03d7c914baab5 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/dangling_indices.delete_dangling_index.json @@ -0,0 +1,16 @@ +{ + "dangling_indices.delete_dangling_index": { + "url_params": { + "accept_data_loss": "__flag__", + "timeout": "", + "master_timeout": "" + }, + "methods": [ + "DELETE" + ], + "patterns": [ + "_dangling/{index_uuid}" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/dangling_indices.import_dangling_index.json b/src/plugins/console/server/lib/spec_definitions/json/generated/dangling_indices.import_dangling_index.json new file mode 100644 index 0000000000000..c55cdd2901699 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/dangling_indices.import_dangling_index.json @@ -0,0 +1,16 @@ +{ + "dangling_indices.import_dangling_index": { + "url_params": { + "accept_data_loss": "__flag__", + "timeout": "", + "master_timeout": "" + }, + "methods": [ + "POST" + ], + "patterns": [ + "_dangling/{index_uuid}" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/dangling_indices.list_dangling_indices.json b/src/plugins/console/server/lib/spec_definitions/json/generated/dangling_indices.list_dangling_indices.json new file mode 100644 index 0000000000000..63dd560947876 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/dangling_indices.list_dangling_indices.json @@ -0,0 +1,11 @@ +{ + "dangling_indices.list_dangling_indices": { + "methods": [ + "GET" + ], + "patterns": [ + "_dangling" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/data_frame_transform_deprecated.delete_transform.json b/src/plugins/console/server/lib/spec_definitions/json/generated/data_frame_transform_deprecated.delete_transform.json new file mode 100644 index 0000000000000..6dfd81ded7bc5 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/data_frame_transform_deprecated.delete_transform.json @@ -0,0 +1,10 @@ +{ + "data_frame_transform_deprecated.delete_transform": { + "url_params": { + "force": "__flag__" + }, + "methods": [], + "patterns": [], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-transform.html" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/data_frame_transform_deprecated.get_transform.json b/src/plugins/console/server/lib/spec_definitions/json/generated/data_frame_transform_deprecated.get_transform.json new file mode 100644 index 0000000000000..be3716ba3da6e --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/data_frame_transform_deprecated.get_transform.json @@ -0,0 +1,13 @@ +{ + "data_frame_transform_deprecated.get_transform": { + "url_params": { + "from": 0, + "size": 0, + "allow_no_match": "__flag__", + "exclude_generated": "__flag__" + }, + "methods": [], + "patterns": [], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/get-transform.html" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/data_frame_transform_deprecated.get_transform_stats.json b/src/plugins/console/server/lib/spec_definitions/json/generated/data_frame_transform_deprecated.get_transform_stats.json new file mode 100644 index 0000000000000..440eed6a1f2a4 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/data_frame_transform_deprecated.get_transform_stats.json @@ -0,0 +1,12 @@ +{ + "data_frame_transform_deprecated.get_transform_stats": { + "url_params": { + "from": "", + "size": "", + "allow_no_match": "__flag__" + }, + "methods": [], + "patterns": [], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/get-transform-stats.html" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/data_frame_transform_deprecated.preview_transform.json b/src/plugins/console/server/lib/spec_definitions/json/generated/data_frame_transform_deprecated.preview_transform.json new file mode 100644 index 0000000000000..f095847ed0d9a --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/data_frame_transform_deprecated.preview_transform.json @@ -0,0 +1,7 @@ +{ + "data_frame_transform_deprecated.preview_transform": { + "methods": [], + "patterns": [], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/preview-transform.html" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/data_frame_transform_deprecated.put_transform.json b/src/plugins/console/server/lib/spec_definitions/json/generated/data_frame_transform_deprecated.put_transform.json new file mode 100644 index 0000000000000..e7555ce4bad29 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/data_frame_transform_deprecated.put_transform.json @@ -0,0 +1,10 @@ +{ + "data_frame_transform_deprecated.put_transform": { + "url_params": { + "defer_validation": "__flag__" + }, + "methods": [], + "patterns": [], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/put-transform.html" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/data_frame_transform_deprecated.start_transform.json b/src/plugins/console/server/lib/spec_definitions/json/generated/data_frame_transform_deprecated.start_transform.json new file mode 100644 index 0000000000000..d50346ff328c6 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/data_frame_transform_deprecated.start_transform.json @@ -0,0 +1,10 @@ +{ + "data_frame_transform_deprecated.start_transform": { + "url_params": { + "timeout": "" + }, + "methods": [], + "patterns": [], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/start-transform.html" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/data_frame_transform_deprecated.stop_transform.json b/src/plugins/console/server/lib/spec_definitions/json/generated/data_frame_transform_deprecated.stop_transform.json new file mode 100644 index 0000000000000..2618446916c76 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/data_frame_transform_deprecated.stop_transform.json @@ -0,0 +1,12 @@ +{ + "data_frame_transform_deprecated.stop_transform": { + "url_params": { + "wait_for_completion": "__flag__", + "timeout": "", + "allow_no_match": "__flag__" + }, + "methods": [], + "patterns": [], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/stop-transform.html" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/data_frame_transform_deprecated.update_transform.json b/src/plugins/console/server/lib/spec_definitions/json/generated/data_frame_transform_deprecated.update_transform.json new file mode 100644 index 0000000000000..60f71474e865a --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/data_frame_transform_deprecated.update_transform.json @@ -0,0 +1,10 @@ +{ + "data_frame_transform_deprecated.update_transform": { + "url_params": { + "defer_validation": "__flag__" + }, + "methods": [], + "patterns": [], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/update-transform.html" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/delete.json b/src/plugins/console/server/lib/spec_definitions/json/generated/delete.json index 0852d8d184831..a71a659618eb1 100644 --- a/src/plugins/console/server/lib/spec_definitions/json/generated/delete.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/delete.json @@ -15,8 +15,7 @@ "version_type": [ "internal", "external", - "external_gte", - "force" + "external_gte" ] }, "methods": [ diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/delete_by_query.json b/src/plugins/console/server/lib/spec_definitions/json/generated/delete_by_query.json index e01ea8b2dec6d..4e2b3a180fbba 100644 --- a/src/plugins/console/server/lib/spec_definitions/json/generated/delete_by_query.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/delete_by_query.json @@ -32,7 +32,6 @@ "dfs_query_then_fetch" ], "search_timeout": "", - "size": "", "max_docs": "all documents", "sort": [], "_source": [], diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/enrich.delete_policy.json b/src/plugins/console/server/lib/spec_definitions/json/generated/enrich.delete_policy.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/enrich.delete_policy.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/enrich.delete_policy.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/enrich.execute_policy.json b/src/plugins/console/server/lib/spec_definitions/json/generated/enrich.execute_policy.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/enrich.execute_policy.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/enrich.execute_policy.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/enrich.get_policy.json b/src/plugins/console/server/lib/spec_definitions/json/generated/enrich.get_policy.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/enrich.get_policy.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/enrich.get_policy.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/enrich.put_policy.json b/src/plugins/console/server/lib/spec_definitions/json/generated/enrich.put_policy.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/enrich.put_policy.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/enrich.put_policy.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/enrich.stats.json b/src/plugins/console/server/lib/spec_definitions/json/generated/enrich.stats.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/enrich.stats.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/enrich.stats.json diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/eql.delete.json b/src/plugins/console/server/lib/spec_definitions/json/generated/eql.delete.json new file mode 100644 index 0000000000000..4bc4846f628a0 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/eql.delete.json @@ -0,0 +1,11 @@ +{ + "eql.delete": { + "methods": [ + "DELETE" + ], + "patterns": [ + "_eql/search/{id}" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/eql-search-api.html" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/eql.get.json b/src/plugins/console/server/lib/spec_definitions/json/generated/eql.get.json new file mode 100644 index 0000000000000..4aa740c333beb --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/eql.get.json @@ -0,0 +1,15 @@ +{ + "eql.get": { + "url_params": { + "wait_for_completion_timeout": "", + "keep_alive": "" + }, + "methods": [ + "GET" + ], + "patterns": [ + "_eql/search/{id}" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/eql-search-api.html" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/eql.get_status.json b/src/plugins/console/server/lib/spec_definitions/json/generated/eql.get_status.json new file mode 100644 index 0000000000000..68fe8aff70046 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/eql.get_status.json @@ -0,0 +1,11 @@ +{ + "eql.get_status": { + "methods": [ + "GET" + ], + "patterns": [ + "_eql/search/status/{id}" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/get-async-eql-status-api.html" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/eql.search.json b/src/plugins/console/server/lib/spec_definitions/json/generated/eql.search.json new file mode 100644 index 0000000000000..67e7a1729c295 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/eql.search.json @@ -0,0 +1,17 @@ +{ + "eql.search": { + "url_params": { + "wait_for_completion_timeout": "", + "keep_on_completion": "__flag__", + "keep_alive": "" + }, + "methods": [ + "GET", + "POST" + ], + "patterns": [ + "{indices}/_eql/search" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/eql-search-api.html" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/exists.json b/src/plugins/console/server/lib/spec_definitions/json/generated/exists.json index a6799b9e361cd..7d66dad050e5d 100644 --- a/src/plugins/console/server/lib/spec_definitions/json/generated/exists.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/exists.json @@ -13,8 +13,7 @@ "version_type": [ "internal", "external", - "external_gte", - "force" + "external_gte" ] }, "methods": [ diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/exists_source.json b/src/plugins/console/server/lib/spec_definitions/json/generated/exists_source.json index 9ffc4b55f3037..6811940cb0f1e 100644 --- a/src/plugins/console/server/lib/spec_definitions/json/generated/exists_source.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/exists_source.json @@ -12,8 +12,7 @@ "version_type": [ "internal", "external", - "external_gte", - "force" + "external_gte" ] }, "methods": [ diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/features.get_features.json b/src/plugins/console/server/lib/spec_definitions/json/generated/features.get_features.json new file mode 100644 index 0000000000000..abbf74b880f1a --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/features.get_features.json @@ -0,0 +1,14 @@ +{ + "features.get_features": { + "url_params": { + "master_timeout": "" + }, + "methods": [ + "GET" + ], + "patterns": [ + "_features" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/get-features-api.html" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/features.reset_features.json b/src/plugins/console/server/lib/spec_definitions/json/generated/features.reset_features.json new file mode 100644 index 0000000000000..98280afdab1a0 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/features.reset_features.json @@ -0,0 +1,11 @@ +{ + "features.reset_features": { + "methods": [ + "POST" + ], + "patterns": [ + "_features/_reset" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/reset-features-api.html" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/fleet.global_checkpoints.json b/src/plugins/console/server/lib/spec_definitions/json/generated/fleet.global_checkpoints.json new file mode 100644 index 0000000000000..29f37c9099de2 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/fleet.global_checkpoints.json @@ -0,0 +1,17 @@ +{ + "fleet.global_checkpoints": { + "url_params": { + "wait_for_advance": "__flag__", + "wait_for_index": "__flag__", + "checkpoints": [], + "timeout": "" + }, + "methods": [ + "GET" + ], + "patterns": [ + "{indices}/_fleet/global_checkpoints" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/get-global-checkpoints.html" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/get.json b/src/plugins/console/server/lib/spec_definitions/json/generated/get.json index 5a72761c7c32e..396396f7550ca 100644 --- a/src/plugins/console/server/lib/spec_definitions/json/generated/get.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/get.json @@ -13,8 +13,7 @@ "version_type": [ "internal", "external", - "external_gte", - "force" + "external_gte" ] }, "methods": [ diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/get_script_context.json b/src/plugins/console/server/lib/spec_definitions/json/generated/get_script_context.json index 528c261df7707..f3808d568e989 100644 --- a/src/plugins/console/server/lib/spec_definitions/json/generated/get_script_context.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/get_script_context.json @@ -5,6 +5,7 @@ ], "patterns": [ "_script_context" - ] + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-contexts.html" } } diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/get_script_languages.json b/src/plugins/console/server/lib/spec_definitions/json/generated/get_script_languages.json index 10ea433ca68c5..a872885615d05 100644 --- a/src/plugins/console/server/lib/spec_definitions/json/generated/get_script_languages.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/get_script_languages.json @@ -5,6 +5,7 @@ ], "patterns": [ "_script_language" - ] + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html" } } diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/get_source.json b/src/plugins/console/server/lib/spec_definitions/json/generated/get_source.json index 8201960363a78..de1b5b0f3de21 100644 --- a/src/plugins/console/server/lib/spec_definitions/json/generated/get_source.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/get_source.json @@ -12,8 +12,7 @@ "version_type": [ "internal", "external", - "external_gte", - "force" + "external_gte" ] }, "methods": [ diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/graph.explore.json b/src/plugins/console/server/lib/spec_definitions/json/generated/graph.explore.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/graph.explore.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/graph.explore.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ilm.delete_lifecycle.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ilm.delete_lifecycle.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ilm.delete_lifecycle.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ilm.delete_lifecycle.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ilm.explain_lifecycle.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ilm.explain_lifecycle.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ilm.explain_lifecycle.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ilm.explain_lifecycle.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ilm.get_lifecycle.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ilm.get_lifecycle.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ilm.get_lifecycle.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ilm.get_lifecycle.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ilm.get_status.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ilm.get_status.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ilm.get_status.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ilm.get_status.json diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/ilm.migrate_to_data_tiers.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ilm.migrate_to_data_tiers.json new file mode 100644 index 0000000000000..acafe1183a893 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/ilm.migrate_to_data_tiers.json @@ -0,0 +1,14 @@ +{ + "ilm.migrate_to_data_tiers": { + "url_params": { + "dry_run": "__flag__" + }, + "methods": [ + "POST" + ], + "patterns": [ + "_ilm/migrate_to_data_tiers" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-migrate-to-data-tiers.html" + } +} diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ilm.move_to_step.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ilm.move_to_step.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ilm.move_to_step.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ilm.move_to_step.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ilm.put_lifecycle.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ilm.put_lifecycle.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ilm.put_lifecycle.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ilm.put_lifecycle.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ilm.remove_policy.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ilm.remove_policy.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ilm.remove_policy.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ilm.remove_policy.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ilm.retry.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ilm.retry.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ilm.retry.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ilm.retry.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ilm.set_policy.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ilm.set_policy.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ilm.set_policy.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ilm.set_policy.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ilm.start.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ilm.start.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ilm.start.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ilm.start.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ilm.stop.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ilm.stop.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ilm.stop.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ilm.stop.json diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/index.json b/src/plugins/console/server/lib/spec_definitions/json/generated/index.json index 25977806776a7..c6b290a58812b 100644 --- a/src/plugins/console/server/lib/spec_definitions/json/generated/index.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/index.json @@ -21,7 +21,8 @@ ], "if_seq_no": "", "if_primary_term": "", - "pipeline": "" + "pipeline": "", + "require_alias": "__flag__" }, "methods": [ "PUT", diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/indices.add_block.json b/src/plugins/console/server/lib/spec_definitions/json/generated/indices.add_block.json new file mode 100644 index 0000000000000..ff2623b100bda --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/indices.add_block.json @@ -0,0 +1,24 @@ +{ + "indices.add_block": { + "url_params": { + "timeout": "", + "master_timeout": "", + "ignore_unavailable": "__flag__", + "allow_no_indices": "__flag__", + "expand_wildcards": [ + "open", + "closed", + "hidden", + "none", + "all" + ] + }, + "methods": [ + "PUT" + ], + "patterns": [ + "{indices}/_block/{block}" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/index-modules-blocks.html" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/indices.create.json b/src/plugins/console/server/lib/spec_definitions/json/generated/indices.create.json index 1970f88b30958..8227e38d3c6d9 100644 --- a/src/plugins/console/server/lib/spec_definitions/json/generated/indices.create.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/indices.create.json @@ -1,7 +1,6 @@ { "indices.create": { "url_params": { - "include_type_name": "__flag__", "wait_for_active_shards": "", "timeout": "", "master_timeout": "" diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/indices.create_data_stream.json b/src/plugins/console/server/lib/spec_definitions/json/generated/indices.create_data_stream.json new file mode 100644 index 0000000000000..832d5b8de1f47 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/indices.create_data_stream.json @@ -0,0 +1,11 @@ +{ + "indices.create_data_stream": { + "methods": [ + "PUT" + ], + "patterns": [ + "_data_stream/{name}" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/indices.data_streams_stats.json b/src/plugins/console/server/lib/spec_definitions/json/generated/indices.data_streams_stats.json new file mode 100644 index 0000000000000..6a88c351ff700 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/indices.data_streams_stats.json @@ -0,0 +1,12 @@ +{ + "indices.data_streams_stats": { + "methods": [ + "GET" + ], + "patterns": [ + "_data_stream/_stats", + "_data_stream/{name}/_stats" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/indices.delete_data_stream.json b/src/plugins/console/server/lib/spec_definitions/json/generated/indices.delete_data_stream.json new file mode 100644 index 0000000000000..9b91e3deb3a08 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/indices.delete_data_stream.json @@ -0,0 +1,20 @@ +{ + "indices.delete_data_stream": { + "url_params": { + "expand_wildcards": [ + "open", + "closed", + "hidden", + "none", + "all" + ] + }, + "methods": [ + "DELETE" + ], + "patterns": [ + "_data_stream/{name}" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/indices.delete_index_template.json b/src/plugins/console/server/lib/spec_definitions/json/generated/indices.delete_index_template.json new file mode 100644 index 0000000000000..ef3f836207f17 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/indices.delete_index_template.json @@ -0,0 +1,15 @@ +{ + "indices.delete_index_template": { + "url_params": { + "timeout": "", + "master_timeout": "" + }, + "methods": [ + "DELETE" + ], + "patterns": [ + "_index_template/{name}" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/indices.disk_usage.json b/src/plugins/console/server/lib/spec_definitions/json/generated/indices.disk_usage.json new file mode 100644 index 0000000000000..fe7d378b2b168 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/indices.disk_usage.json @@ -0,0 +1,24 @@ +{ + "indices.disk_usage": { + "url_params": { + "run_expensive_tasks": "__flag__", + "flush": "__flag__", + "ignore_unavailable": "__flag__", + "allow_no_indices": "__flag__", + "expand_wildcards": [ + "open", + "closed", + "hidden", + "none", + "all" + ] + }, + "methods": [ + "POST" + ], + "patterns": [ + "{indices}/_disk_usage" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-disk-usage.html" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/indices.exists_index_template.json b/src/plugins/console/server/lib/spec_definitions/json/generated/indices.exists_index_template.json new file mode 100644 index 0000000000000..97fa8cf55576f --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/indices.exists_index_template.json @@ -0,0 +1,16 @@ +{ + "indices.exists_index_template": { + "url_params": { + "flat_settings": "__flag__", + "master_timeout": "", + "local": "__flag__" + }, + "methods": [ + "HEAD" + ], + "patterns": [ + "_index_template/{name}" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html" + } +} diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/indices.freeze.json b/src/plugins/console/server/lib/spec_definitions/json/generated/indices.freeze.json similarity index 75% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/indices.freeze.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/indices.freeze.json index 06e8c606f59f7..77c765b90bcdc 100644 --- a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/indices.freeze.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/indices.freeze.json @@ -8,17 +8,14 @@ "expand_wildcards": [ "open", "closed", + "hidden", "none", "all" ], "wait_for_active_shards": "" }, - "methods": [ - "POST" - ], - "patterns": [ - "{indices}/_freeze" - ], - "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/frozen.html" + "methods": [], + "patterns": [], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/freeze-index-api.html" } } diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/indices.get.json b/src/plugins/console/server/lib/spec_definitions/json/generated/indices.get.json index 6df796ed6c4cf..99a654d023ba2 100644 --- a/src/plugins/console/server/lib/spec_definitions/json/generated/indices.get.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/indices.get.json @@ -1,7 +1,6 @@ { "indices.get": { "url_params": { - "include_type_name": "__flag__", "local": "__flag__", "ignore_unavailable": "__flag__", "allow_no_indices": "__flag__", diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/indices.get_data_stream.json b/src/plugins/console/server/lib/spec_definitions/json/generated/indices.get_data_stream.json new file mode 100644 index 0000000000000..45199a60f337d --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/indices.get_data_stream.json @@ -0,0 +1,21 @@ +{ + "indices.get_data_stream": { + "url_params": { + "expand_wildcards": [ + "open", + "closed", + "hidden", + "none", + "all" + ] + }, + "methods": [ + "GET" + ], + "patterns": [ + "_data_stream", + "_data_stream/{name}" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/indices.get_field_mapping.json b/src/plugins/console/server/lib/spec_definitions/json/generated/indices.get_field_mapping.json index c95e2efc73fab..c50919af0a2f3 100644 --- a/src/plugins/console/server/lib/spec_definitions/json/generated/indices.get_field_mapping.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/indices.get_field_mapping.json @@ -1,7 +1,6 @@ { "indices.get_field_mapping": { "url_params": { - "include_type_name": "__flag__", "include_defaults": "__flag__", "ignore_unavailable": "__flag__", "allow_no_indices": "__flag__", diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/indices.get_index_template.json b/src/plugins/console/server/lib/spec_definitions/json/generated/indices.get_index_template.json new file mode 100644 index 0000000000000..142b75f22c2a6 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/indices.get_index_template.json @@ -0,0 +1,17 @@ +{ + "indices.get_index_template": { + "url_params": { + "flat_settings": "__flag__", + "master_timeout": "", + "local": "__flag__" + }, + "methods": [ + "GET" + ], + "patterns": [ + "_index_template", + "_index_template/{name}" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/indices.get_mapping.json b/src/plugins/console/server/lib/spec_definitions/json/generated/indices.get_mapping.json index 555137d0e2ee0..f484f0dca0669 100644 --- a/src/plugins/console/server/lib/spec_definitions/json/generated/indices.get_mapping.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/indices.get_mapping.json @@ -1,7 +1,6 @@ { "indices.get_mapping": { "url_params": { - "include_type_name": "__flag__", "ignore_unavailable": "__flag__", "allow_no_indices": "__flag__", "expand_wildcards": [ diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/indices.get_template.json b/src/plugins/console/server/lib/spec_definitions/json/generated/indices.get_template.json index d5f52ec76b374..f5902929c25cc 100644 --- a/src/plugins/console/server/lib/spec_definitions/json/generated/indices.get_template.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/indices.get_template.json @@ -1,7 +1,6 @@ { "indices.get_template": { "url_params": { - "include_type_name": "__flag__", "flat_settings": "__flag__", "master_timeout": "", "local": "__flag__" diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/indices.migrate_to_data_stream.json b/src/plugins/console/server/lib/spec_definitions/json/generated/indices.migrate_to_data_stream.json new file mode 100644 index 0000000000000..45cd033801e55 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/indices.migrate_to_data_stream.json @@ -0,0 +1,11 @@ +{ + "indices.migrate_to_data_stream": { + "methods": [ + "POST" + ], + "patterns": [ + "_data_stream/_migrate/{name}" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/indices.promote_data_stream.json b/src/plugins/console/server/lib/spec_definitions/json/generated/indices.promote_data_stream.json new file mode 100644 index 0000000000000..a92b9a7a4a40d --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/indices.promote_data_stream.json @@ -0,0 +1,11 @@ +{ + "indices.promote_data_stream": { + "methods": [ + "POST" + ], + "patterns": [ + "_data_stream/_promote/{name}" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/indices.put_index_template.json b/src/plugins/console/server/lib/spec_definitions/json/generated/indices.put_index_template.json new file mode 100644 index 0000000000000..0ce27c1d9d21e --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/indices.put_index_template.json @@ -0,0 +1,17 @@ +{ + "indices.put_index_template": { + "url_params": { + "create": "__flag__", + "cause": "", + "master_timeout": "" + }, + "methods": [ + "PUT", + "POST" + ], + "patterns": [ + "_index_template/{name}" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/indices.put_mapping.json b/src/plugins/console/server/lib/spec_definitions/json/generated/indices.put_mapping.json index e36783c815e3f..5b8ce2b8b4350 100644 --- a/src/plugins/console/server/lib/spec_definitions/json/generated/indices.put_mapping.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/indices.put_mapping.json @@ -1,7 +1,6 @@ { "indices.put_mapping": { "url_params": { - "include_type_name": "__flag__", "timeout": "", "master_timeout": "", "ignore_unavailable": "__flag__", @@ -12,7 +11,8 @@ "hidden", "none", "all" - ] + ], + "write_index_only": "__flag__" }, "methods": [ "PUT", diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/indices.put_template.json b/src/plugins/console/server/lib/spec_definitions/json/generated/indices.put_template.json index 8fb31277da44e..537428f3c53c9 100644 --- a/src/plugins/console/server/lib/spec_definitions/json/generated/indices.put_template.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/indices.put_template.json @@ -1,11 +1,9 @@ { "indices.put_template": { "url_params": { - "include_type_name": "__flag__", "order": "", "create": "__flag__", - "master_timeout": "", - "flat_settings": "__flag__" + "master_timeout": "" }, "methods": [ "PUT", diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/indices.reload_search_analyzers.json b/src/plugins/console/server/lib/spec_definitions/json/generated/indices.reload_search_analyzers.json similarity index 96% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/indices.reload_search_analyzers.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/indices.reload_search_analyzers.json index 13ae3a0fd4d18..d4d1d8c52b349 100644 --- a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/indices.reload_search_analyzers.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/indices.reload_search_analyzers.json @@ -6,6 +6,7 @@ "expand_wildcards": [ "open", "closed", + "hidden", "none", "all" ] diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/indices.resolve_index.json b/src/plugins/console/server/lib/spec_definitions/json/generated/indices.resolve_index.json new file mode 100644 index 0000000000000..574d07f1e4324 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/indices.resolve_index.json @@ -0,0 +1,20 @@ +{ + "indices.resolve_index": { + "url_params": { + "expand_wildcards": [ + "open", + "closed", + "hidden", + "none", + "all" + ] + }, + "methods": [ + "GET" + ], + "patterns": [ + "_resolve/index/{name}" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-resolve-index-api.html" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/indices.rollover.json b/src/plugins/console/server/lib/spec_definitions/json/generated/indices.rollover.json index 7fa76a687eb77..19e0f1f909ab8 100644 --- a/src/plugins/console/server/lib/spec_definitions/json/generated/indices.rollover.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/indices.rollover.json @@ -1,7 +1,6 @@ { "indices.rollover": { "url_params": { - "include_type_name": "__flag__", "timeout": "", "dry_run": "__flag__", "master_timeout": "", diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/indices.shrink.json b/src/plugins/console/server/lib/spec_definitions/json/generated/indices.shrink.json index 6fbdea0f1244b..31acc86a2fa56 100644 --- a/src/plugins/console/server/lib/spec_definitions/json/generated/indices.shrink.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/indices.shrink.json @@ -1,7 +1,6 @@ { "indices.shrink": { "url_params": { - "copy_settings": "__flag__", "timeout": "", "master_timeout": "", "wait_for_active_shards": "" diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/indices.simulate_index_template.json b/src/plugins/console/server/lib/spec_definitions/json/generated/indices.simulate_index_template.json new file mode 100644 index 0000000000000..e122bd844e9bc --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/indices.simulate_index_template.json @@ -0,0 +1,16 @@ +{ + "indices.simulate_index_template": { + "url_params": { + "create": "__flag__", + "cause": "", + "master_timeout": "" + }, + "methods": [ + "POST" + ], + "patterns": [ + "_index_template/_simulate_index/{name}" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/indices.simulate_template.json b/src/plugins/console/server/lib/spec_definitions/json/generated/indices.simulate_template.json new file mode 100644 index 0000000000000..9e174799e6c07 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/indices.simulate_template.json @@ -0,0 +1,17 @@ +{ + "indices.simulate_template": { + "url_params": { + "create": "__flag__", + "cause": "", + "master_timeout": "" + }, + "methods": [ + "POST" + ], + "patterns": [ + "_index_template/_simulate", + "_index_template/_simulate/{name}" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/indices.split.json b/src/plugins/console/server/lib/spec_definitions/json/generated/indices.split.json index 68f2e338cd201..1bfbaa078b796 100644 --- a/src/plugins/console/server/lib/spec_definitions/json/generated/indices.split.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/indices.split.json @@ -1,7 +1,6 @@ { "indices.split": { "url_params": { - "copy_settings": "__flag__", "timeout": "", "master_timeout": "", "wait_for_active_shards": "" diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/indices.stats.json b/src/plugins/console/server/lib/spec_definitions/json/generated/indices.stats.json index 1fa32265c91ee..9cdcbdf672d8c 100644 --- a/src/plugins/console/server/lib/spec_definitions/json/generated/indices.stats.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/indices.stats.json @@ -34,6 +34,7 @@ "url_components": { "metrics": [ "_all", + "bulk", "completion", "docs", "fielddata", @@ -47,7 +48,6 @@ "search", "segments", "store", - "suggest", "warmer" ], "indices": null diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/indices.unfreeze.json b/src/plugins/console/server/lib/spec_definitions/json/generated/indices.unfreeze.json similarity index 75% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/indices.unfreeze.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/indices.unfreeze.json index 186a671347240..3e87971cb66f5 100644 --- a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/indices.unfreeze.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/indices.unfreeze.json @@ -8,17 +8,14 @@ "expand_wildcards": [ "open", "closed", + "hidden", "none", "all" ], "wait_for_active_shards": "" }, - "methods": [ - "POST" - ], - "patterns": [ - "{indices}/_unfreeze" - ], - "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/frozen.html" + "methods": [], + "patterns": [], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/unfreeze-index-api.html" } } diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/ingest.geo_ip_stats.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ingest.geo_ip_stats.json new file mode 100644 index 0000000000000..2993eca9f0af5 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/ingest.geo_ip_stats.json @@ -0,0 +1,11 @@ +{ + "ingest.geo_ip_stats": { + "methods": [ + "GET" + ], + "patterns": [ + "_ingest/geoip/stats" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/geoip-stats-api.html" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/ingest.get_pipeline.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ingest.get_pipeline.json index cffcbb1261f90..df90b976444c1 100644 --- a/src/plugins/console/server/lib/spec_definitions/json/generated/ingest.get_pipeline.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/ingest.get_pipeline.json @@ -1,6 +1,7 @@ { "ingest.get_pipeline": { "url_params": { + "summary": "__flag__", "master_timeout": "" }, "methods": [ diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/license.delete.json b/src/plugins/console/server/lib/spec_definitions/json/generated/license.delete.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/license.delete.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/license.delete.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/license.get.json b/src/plugins/console/server/lib/spec_definitions/json/generated/license.get.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/license.get.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/license.get.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/license.get_basic_status.json b/src/plugins/console/server/lib/spec_definitions/json/generated/license.get_basic_status.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/license.get_basic_status.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/license.get_basic_status.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/license.get_trial_status.json b/src/plugins/console/server/lib/spec_definitions/json/generated/license.get_trial_status.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/license.get_trial_status.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/license.get_trial_status.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/license.post.json b/src/plugins/console/server/lib/spec_definitions/json/generated/license.post.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/license.post.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/license.post.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/license.post_start_basic.json b/src/plugins/console/server/lib/spec_definitions/json/generated/license.post_start_basic.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/license.post_start_basic.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/license.post_start_basic.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/license.post_start_trial.json b/src/plugins/console/server/lib/spec_definitions/json/generated/license.post_start_trial.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/license.post_start_trial.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/license.post_start_trial.json diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/logstash.delete_pipeline.json b/src/plugins/console/server/lib/spec_definitions/json/generated/logstash.delete_pipeline.json new file mode 100644 index 0000000000000..9e2c32e287253 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/logstash.delete_pipeline.json @@ -0,0 +1,11 @@ +{ + "logstash.delete_pipeline": { + "methods": [ + "DELETE" + ], + "patterns": [ + "_logstash/pipeline/{id}" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/logstash-api-delete-pipeline.html" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/logstash.get_pipeline.json b/src/plugins/console/server/lib/spec_definitions/json/generated/logstash.get_pipeline.json new file mode 100644 index 0000000000000..a6b3a69b53a60 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/logstash.get_pipeline.json @@ -0,0 +1,11 @@ +{ + "logstash.get_pipeline": { + "methods": [ + "GET" + ], + "patterns": [ + "_logstash/pipeline/{id}" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/logstash-api-get-pipeline.html" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/logstash.put_pipeline.json b/src/plugins/console/server/lib/spec_definitions/json/generated/logstash.put_pipeline.json new file mode 100644 index 0000000000000..9640ced182898 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/logstash.put_pipeline.json @@ -0,0 +1,11 @@ +{ + "logstash.put_pipeline": { + "methods": [ + "PUT" + ], + "patterns": [ + "_logstash/pipeline/{id}" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/logstash-api-put-pipeline.html" + } +} diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/migration.deprecations.json b/src/plugins/console/server/lib/spec_definitions/json/generated/migration.deprecations.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/migration.deprecations.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/migration.deprecations.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/migration.get_assistance.json b/src/plugins/console/server/lib/spec_definitions/json/generated/migration.get_assistance.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/migration.get_assistance.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/migration.get_assistance.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/migration.upgrade.json b/src/plugins/console/server/lib/spec_definitions/json/generated/migration.upgrade.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/migration.upgrade.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/migration.upgrade.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.close_job.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.close_job.json similarity index 90% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.close_job.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ml.close_job.json index b0f2c6489b30e..4fd0b7ccf98a7 100644 --- a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.close_job.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.close_job.json @@ -1,6 +1,7 @@ { "ml.close_job": { "url_params": { + "allow_no_match": "__flag__", "allow_no_jobs": "__flag__", "force": "__flag__", "timeout": "" diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.delete_calendar.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.delete_calendar.json similarity index 51% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.delete_calendar.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ml.delete_calendar.json index 97e5898072a08..7ccf7ef673070 100644 --- a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.delete_calendar.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.delete_calendar.json @@ -5,6 +5,7 @@ ], "patterns": [ "_ml/calendars/{calendar_id}" - ] + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-calendar.html" } } diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.delete_calendar_event.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.delete_calendar_event.json similarity index 54% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.delete_calendar_event.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ml.delete_calendar_event.json index 85ea5add0b60b..7ee8ef376a4db 100644 --- a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.delete_calendar_event.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.delete_calendar_event.json @@ -5,6 +5,7 @@ ], "patterns": [ "_ml/calendars/{calendar_id}/events/{event_id}" - ] + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-calendar-event.html" } } diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.delete_calendar_job.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.delete_calendar_job.json similarity index 54% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.delete_calendar_job.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ml.delete_calendar_job.json index 6665f52eeb90d..b97667900fe35 100644 --- a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.delete_calendar_job.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.delete_calendar_job.json @@ -5,6 +5,7 @@ ], "patterns": [ "_ml/calendars/{calendar_id}/jobs/{job_id}" - ] + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-calendar-job.html" } } diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.delete_data_frame_analytics.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.delete_data_frame_analytics.json similarity index 85% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.delete_data_frame_analytics.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ml.delete_data_frame_analytics.json index 2e4593f339212..a46bfdf8318db 100644 --- a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.delete_data_frame_analytics.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.delete_data_frame_analytics.json @@ -1,7 +1,8 @@ { "ml.delete_data_frame_analytics": { "url_params": { - "force": "__flag__" + "force": "__flag__", + "timeout": "" }, "methods": [ "DELETE" diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.delete_datafeed.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.delete_datafeed.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.delete_datafeed.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ml.delete_datafeed.json diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/ml.delete_expired_data.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.delete_expired_data.json new file mode 100644 index 0000000000000..1515821cb1628 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.delete_expired_data.json @@ -0,0 +1,16 @@ +{ + "ml.delete_expired_data": { + "url_params": { + "requests_per_second": "", + "timeout": "" + }, + "methods": [ + "DELETE" + ], + "patterns": [ + "_ml/_delete_expired_data/{job_id}", + "_ml/_delete_expired_data" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-expired-data.html" + } +} diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.delete_filter.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.delete_filter.json similarity index 51% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.delete_filter.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ml.delete_filter.json index 8210a2acd71d0..515986d44d77c 100644 --- a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.delete_filter.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.delete_filter.json @@ -5,6 +5,7 @@ ], "patterns": [ "_ml/filters/{filter_id}" - ] + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-filter.html" } } diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.delete_forecast.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.delete_forecast.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.delete_forecast.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ml.delete_forecast.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.delete_job.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.delete_job.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.delete_job.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ml.delete_job.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.delete_model_snapshot.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.delete_model_snapshot.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.delete_model_snapshot.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ml.delete_model_snapshot.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.delete_trained_model.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.delete_trained_model.json similarity index 65% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.delete_trained_model.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ml.delete_trained_model.json index 343fa904c4216..75592c5964ed0 100644 --- a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.delete_trained_model.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.delete_trained_model.json @@ -4,8 +4,8 @@ "DELETE" ], "patterns": [ - "_ml/inference/{model_id}" + "_ml/trained_models/{model_id}" ], - "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-inference.html" + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-trained-models.html" } } diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/ml.delete_trained_model_alias.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.delete_trained_model_alias.json new file mode 100644 index 0000000000000..cd27f21b1d6e4 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.delete_trained_model_alias.json @@ -0,0 +1,11 @@ +{ + "ml.delete_trained_model_alias": { + "methods": [ + "DELETE" + ], + "patterns": [ + "_ml/trained_models/{model_id}/model_aliases/{model_alias}" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-trained-models-aliases.html" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/ml.estimate_model_memory.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.estimate_model_memory.json new file mode 100644 index 0000000000000..94b149e542d43 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.estimate_model_memory.json @@ -0,0 +1,11 @@ +{ + "ml.estimate_model_memory": { + "methods": [ + "POST" + ], + "patterns": [ + "_ml/anomaly_detectors/_estimate_model_memory" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-apis.html" + } +} diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.evaluate_data_frame.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.evaluate_data_frame.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.evaluate_data_frame.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ml.evaluate_data_frame.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.explain_data_frame_analytics.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.explain_data_frame_analytics.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.explain_data_frame_analytics.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ml.explain_data_frame_analytics.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.find_file_structure.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.find_file_structure.json similarity index 88% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.find_file_structure.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ml.find_file_structure.json index 6e7163ae2b740..9ede28306e313 100644 --- a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.find_file_structure.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.find_file_structure.json @@ -25,8 +25,8 @@ "POST" ], "patterns": [ - "_ml/find_file_structure" + "_text_structure/find_structure" ], - "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-find-file-structure.html" + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/find-structure.html" } } diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.flush_job.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.flush_job.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.flush_job.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ml.flush_job.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.forecast.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.forecast.json similarity index 52% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.forecast.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ml.forecast.json index 3a8849aad3e4d..d2b53c11cb985 100644 --- a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.forecast.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.forecast.json @@ -2,13 +2,15 @@ "ml.forecast": { "url_params": { "duration": "", - "expires_in": "" + "expires_in": "", + "max_model_memory": "" }, "methods": [ "POST" ], "patterns": [ "_ml/anomaly_detectors/{job_id}/_forecast" - ] + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-forecast.html" } } diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_buckets.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.get_buckets.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_buckets.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ml.get_buckets.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_calendar_events.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.get_calendar_events.json similarity index 67% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_calendar_events.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ml.get_calendar_events.json index 8999af6320dfa..f8886067dd80e 100644 --- a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_calendar_events.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.get_calendar_events.json @@ -12,6 +12,7 @@ ], "patterns": [ "_ml/calendars/{calendar_id}/events" - ] + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-calendar-event.html" } } diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_calendars.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.get_calendars.json similarity index 65% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_calendars.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ml.get_calendars.json index 87f582b5c364d..575f2573d1ee9 100644 --- a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_calendars.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.get_calendars.json @@ -11,6 +11,7 @@ "patterns": [ "_ml/calendars", "_ml/calendars/{calendar_id}" - ] + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-calendar.html" } } diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_categories.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.get_categories.json similarity index 88% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_categories.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ml.get_categories.json index 64edb196bb366..1083760d7594f 100644 --- a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_categories.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.get_categories.json @@ -2,7 +2,8 @@ "ml.get_categories": { "url_params": { "from": 0, - "size": 0 + "size": 0, + "partition_field_value": "" }, "methods": [ "GET", diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_data_frame_analytics.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.get_data_frame_analytics.json similarity index 86% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_data_frame_analytics.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ml.get_data_frame_analytics.json index ecccec9c7e059..cccaa516110aa 100644 --- a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_data_frame_analytics.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.get_data_frame_analytics.json @@ -3,7 +3,8 @@ "url_params": { "allow_no_match": "__flag__", "from": 0, - "size": 0 + "size": 0, + "exclude_generated": "__flag__" }, "methods": [ "GET" diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_data_frame_analytics_stats.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.get_data_frame_analytics_stats.json similarity index 89% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_data_frame_analytics_stats.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ml.get_data_frame_analytics_stats.json index 3ae103f79f798..20fbb2981a28c 100644 --- a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_data_frame_analytics_stats.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.get_data_frame_analytics_stats.json @@ -3,7 +3,8 @@ "url_params": { "allow_no_match": "__flag__", "from": 0, - "size": 0 + "size": 0, + "verbose": "__flag__" }, "methods": [ "GET" diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_datafeed_stats.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.get_datafeed_stats.json similarity index 90% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_datafeed_stats.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ml.get_datafeed_stats.json index 2971b8a7f6c63..75ece20e87443 100644 --- a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_datafeed_stats.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.get_datafeed_stats.json @@ -1,6 +1,7 @@ { "ml.get_datafeed_stats": { "url_params": { + "allow_no_match": "__flag__", "allow_no_datafeeds": "__flag__" }, "methods": [ diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_datafeeds.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.get_datafeeds.json similarity index 71% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_datafeeds.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ml.get_datafeeds.json index deeb81d692739..ec557966a7271 100644 --- a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_datafeeds.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.get_datafeeds.json @@ -1,7 +1,9 @@ { "ml.get_datafeeds": { "url_params": { - "allow_no_datafeeds": "__flag__" + "allow_no_match": "__flag__", + "allow_no_datafeeds": "__flag__", + "exclude_generated": "__flag__" }, "methods": [ "GET" diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_filters.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.get_filters.json similarity index 63% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_filters.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ml.get_filters.json index 9b06e618a0b0c..df5747e143412 100644 --- a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_filters.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.get_filters.json @@ -10,6 +10,7 @@ "patterns": [ "_ml/filters", "_ml/filters/{filter_id}" - ] + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-filter.html" } } diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_influencers.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.get_influencers.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_influencers.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ml.get_influencers.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_job_stats.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.get_job_stats.json similarity index 90% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_job_stats.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ml.get_job_stats.json index 6173b3ebdc6d0..48dd9e52cd990 100644 --- a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_job_stats.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.get_job_stats.json @@ -1,6 +1,7 @@ { "ml.get_job_stats": { "url_params": { + "allow_no_match": "__flag__", "allow_no_jobs": "__flag__" }, "methods": [ diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_jobs.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.get_jobs.json similarity index 72% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_jobs.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ml.get_jobs.json index 2486684424670..b46c86559ea09 100644 --- a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_jobs.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.get_jobs.json @@ -1,7 +1,9 @@ { "ml.get_jobs": { "url_params": { - "allow_no_jobs": "__flag__" + "allow_no_match": "__flag__", + "allow_no_jobs": "__flag__", + "exclude_generated": "__flag__" }, "methods": [ "GET" diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_model_snapshots.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.get_model_snapshots.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_model_snapshots.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ml.get_model_snapshots.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_overall_buckets.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.get_overall_buckets.json similarity index 93% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_overall_buckets.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ml.get_overall_buckets.json index 3a88c9d8ab9c9..e374f6c5ef63f 100644 --- a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_overall_buckets.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.get_overall_buckets.json @@ -7,6 +7,7 @@ "exclude_interim": "__flag__", "start": "", "end": "", + "allow_no_match": "__flag__", "allow_no_jobs": "__flag__" }, "methods": [ diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_records.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.get_records.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_records.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ml.get_records.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_trained_models.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.get_trained_models.json similarity index 64% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_trained_models.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ml.get_trained_models.json index 76598ee015c6d..19f169fa98e86 100644 --- a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_trained_models.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.get_trained_models.json @@ -2,19 +2,21 @@ "ml.get_trained_models": { "url_params": { "allow_no_match": "__flag__", + "include": "", "include_model_definition": "__flag__", "decompress_definition": "__flag__", "from": 0, "size": 0, - "tags": [] + "tags": [], + "exclude_generated": "__flag__" }, "methods": [ "GET" ], "patterns": [ - "_ml/inference/{model_id}", - "_ml/inference" + "_ml/trained_models/{model_id}", + "_ml/trained_models" ], - "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/get-inference.html" + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/get-trained-models.html" } } diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_trained_models_stats.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.get_trained_models_stats.json similarity index 66% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_trained_models_stats.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ml.get_trained_models_stats.json index ab05e203b3980..44d06c78aef70 100644 --- a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_trained_models_stats.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.get_trained_models_stats.json @@ -9,9 +9,9 @@ "GET" ], "patterns": [ - "_ml/inference/{model_id}/_stats", - "_ml/inference/_stats" + "_ml/trained_models/{model_id}/_stats", + "_ml/trained_models/_stats" ], - "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/get-inference-stats.html" + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/get-trained-models-stats.html" } } diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/ml.infer_trained_model_deployment.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.infer_trained_model_deployment.json new file mode 100644 index 0000000000000..644942801d2f6 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.infer_trained_model_deployment.json @@ -0,0 +1,14 @@ +{ + "ml.infer_trained_model_deployment": { + "url_params": { + "timeout": "" + }, + "methods": [ + "POST" + ], + "patterns": [ + "_ml/trained_models/{model_id}/deployment/_infer" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-infer-trained-model-deployment.html" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/ml.info.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.info.json new file mode 100644 index 0000000000000..e09491dacf1fd --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.info.json @@ -0,0 +1,11 @@ +{ + "ml.info": { + "methods": [ + "GET" + ], + "patterns": [ + "_ml/info" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/get-ml-info.html" + } +} diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.open_job.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.open_job.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.open_job.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ml.open_job.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.post_calendar_events.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.post_calendar_events.json similarity index 52% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.post_calendar_events.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ml.post_calendar_events.json index 89ce2df63315b..9d0947c4704a1 100644 --- a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.post_calendar_events.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.post_calendar_events.json @@ -5,6 +5,7 @@ ], "patterns": [ "_ml/calendars/{calendar_id}/events" - ] + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-post-calendar-event.html" } } diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.post_data.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.post_data.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.post_data.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ml.post_data.json diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/ml.preview_data_frame_analytics.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.preview_data_frame_analytics.json new file mode 100644 index 0000000000000..bc3e0a4fd54b5 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.preview_data_frame_analytics.json @@ -0,0 +1,13 @@ +{ + "ml.preview_data_frame_analytics": { + "methods": [ + "GET", + "POST" + ], + "patterns": [ + "_ml/data_frame/analytics/_preview", + "_ml/data_frame/analytics/{id}/_preview" + ], + "documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/current/preview-dfanalytics.html" + } +} diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.preview_datafeed.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.preview_datafeed.json similarity index 65% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.preview_datafeed.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ml.preview_datafeed.json index 6eb537804134b..29dbabd67d60b 100644 --- a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.preview_datafeed.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.preview_datafeed.json @@ -1,10 +1,12 @@ { "ml.preview_datafeed": { "methods": [ - "GET" + "GET", + "POST" ], "patterns": [ - "_ml/datafeeds/{datafeed_id}/_preview" + "_ml/datafeeds/{datafeed_id}/_preview", + "_ml/datafeeds/_preview" ], "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-preview-datafeed.html" } diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.put_calendar.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.put_calendar.json similarity index 51% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.put_calendar.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ml.put_calendar.json index 7452d1b4b9707..c60a9b60f4ca0 100644 --- a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.put_calendar.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.put_calendar.json @@ -5,6 +5,7 @@ ], "patterns": [ "_ml/calendars/{calendar_id}" - ] + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-calendar.html" } } diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.put_calendar_job.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.put_calendar_job.json similarity index 53% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.put_calendar_job.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ml.put_calendar_job.json index 08dc3d77b5f25..5a3ac8e0b3243 100644 --- a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.put_calendar_job.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.put_calendar_job.json @@ -5,6 +5,7 @@ ], "patterns": [ "_ml/calendars/{calendar_id}/jobs/{job_id}" - ] + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-calendar-job.html" } } diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.put_data_frame_analytics.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.put_data_frame_analytics.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.put_data_frame_analytics.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ml.put_data_frame_analytics.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.put_datafeed.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.put_datafeed.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.put_datafeed.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ml.put_datafeed.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.put_job.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.put_filter.json similarity index 58% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.put_job.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ml.put_filter.json index 7a48994bd1a6c..ad9caa9417da9 100644 --- a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.put_job.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.put_filter.json @@ -1,11 +1,11 @@ { - "ml.put_job": { + "ml.put_filter": { "methods": [ "PUT" ], "patterns": [ - "_ml/anomaly_detectors/{job_id}" + "_ml/filters/{filter_id}" ], - "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-job.html" + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-filter.html" } } diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/ml.put_job.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.put_job.json new file mode 100644 index 0000000000000..a55ee4ab21a63 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.put_job.json @@ -0,0 +1,23 @@ +{ + "ml.put_job": { + "url_params": { + "ignore_unavailable": "__flag__", + "allow_no_indices": "__flag__", + "ignore_throttled": "__flag__", + "expand_wildcards": [ + "open", + "closed", + "hidden", + "none", + "all" + ] + }, + "methods": [ + "PUT" + ], + "patterns": [ + "_ml/anomaly_detectors/{job_id}" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-job.html" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/ml.put_trained_model.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.put_trained_model.json new file mode 100644 index 0000000000000..9b95f6891d474 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.put_trained_model.json @@ -0,0 +1,11 @@ +{ + "ml.put_trained_model": { + "methods": [ + "PUT" + ], + "patterns": [ + "_ml/trained_models/{model_id}" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-models.html" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/ml.put_trained_model_alias.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.put_trained_model_alias.json new file mode 100644 index 0000000000000..a83d54220b31a --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.put_trained_model_alias.json @@ -0,0 +1,14 @@ +{ + "ml.put_trained_model_alias": { + "url_params": { + "reassign": "__flag__" + }, + "methods": [ + "PUT" + ], + "patterns": [ + "_ml/trained_models/{model_id}/model_aliases/{model_alias}" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-models-aliases.html" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/ml.reset_job.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.reset_job.json new file mode 100644 index 0000000000000..79441afbdebf7 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.reset_job.json @@ -0,0 +1,14 @@ +{ + "ml.reset_job": { + "url_params": { + "wait_for_completion": "__flag__" + }, + "methods": [ + "POST" + ], + "patterns": [ + "_ml/anomaly_detectors/{job_id}/_reset" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-reset-job.html" + } +} diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.revert_model_snapshot.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.revert_model_snapshot.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.revert_model_snapshot.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ml.revert_model_snapshot.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.set_upgrade_mode.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.set_upgrade_mode.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.set_upgrade_mode.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ml.set_upgrade_mode.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.start_data_frame_analytics.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.start_data_frame_analytics.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.start_data_frame_analytics.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ml.start_data_frame_analytics.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.start_datafeed.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.start_datafeed.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.start_datafeed.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ml.start_datafeed.json diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/ml.start_trained_model_deployment.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.start_trained_model_deployment.json new file mode 100644 index 0000000000000..49e246c90d8e1 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.start_trained_model_deployment.json @@ -0,0 +1,14 @@ +{ + "ml.start_trained_model_deployment": { + "url_params": { + "timeout": "" + }, + "methods": [ + "POST" + ], + "patterns": [ + "_ml/trained_models/{model_id}/deployment/_start" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-start-trained-model-deployment.html" + } +} diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.stop_data_frame_analytics.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.stop_data_frame_analytics.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.stop_data_frame_analytics.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ml.stop_data_frame_analytics.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.stop_datafeed.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.stop_datafeed.json similarity index 90% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.stop_datafeed.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ml.stop_datafeed.json index d6769ed58148f..b52f1e22bddf8 100644 --- a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.stop_datafeed.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.stop_datafeed.json @@ -1,6 +1,7 @@ { "ml.stop_datafeed": { "url_params": { + "allow_no_match": "__flag__", "allow_no_datafeeds": "__flag__", "force": "__flag__", "timeout": "" diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/ml.stop_trained_model_deployment.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.stop_trained_model_deployment.json new file mode 100644 index 0000000000000..94b34f597fc3b --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.stop_trained_model_deployment.json @@ -0,0 +1,11 @@ +{ + "ml.stop_trained_model_deployment": { + "methods": [ + "POST" + ], + "patterns": [ + "_ml/trained_models/{model_id}/deployment/_stop" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/stop-trained-model-deployment.html" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/ml.update_data_frame_analytics.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.update_data_frame_analytics.json new file mode 100644 index 0000000000000..e3134770742cb --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.update_data_frame_analytics.json @@ -0,0 +1,11 @@ +{ + "ml.update_data_frame_analytics": { + "methods": [ + "POST" + ], + "patterns": [ + "_ml/data_frame/analytics/{id}/_update" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/update-dfanalytics.html" + } +} diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.update_datafeed.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.update_datafeed.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.update_datafeed.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ml.update_datafeed.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.update_filter.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.update_filter.json similarity index 52% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.update_filter.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ml.update_filter.json index 3f48013c2be1c..16b6aedb404d3 100644 --- a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.update_filter.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.update_filter.json @@ -5,6 +5,7 @@ ], "patterns": [ "_ml/filters/{filter_id}/_update" - ] + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-filter.html" } } diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.update_job.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.update_job.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.update_job.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ml.update_job.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.update_model_snapshot.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.update_model_snapshot.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.update_model_snapshot.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ml.update_model_snapshot.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.upgrade.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.upgrade.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.upgrade.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ml.upgrade.json diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/ml.upgrade_job_snapshot.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.upgrade_job_snapshot.json new file mode 100644 index 0000000000000..6818eab2bb084 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.upgrade_job_snapshot.json @@ -0,0 +1,15 @@ +{ + "ml.upgrade_job_snapshot": { + "url_params": { + "timeout": "", + "wait_for_completion": "__flag__" + }, + "methods": [ + "POST" + ], + "patterns": [ + "_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}/_upgrade" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-upgrade-job-model-snapshot.html" + } +} diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.validate.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.validate.json similarity index 54% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.validate.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ml.validate.json index 298c7cf6dce26..da07f1a2fa203 100644 --- a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.validate.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.validate.json @@ -5,6 +5,7 @@ ], "patterns": [ "_ml/anomaly_detectors/_validate" - ] + ], + "documentation": "https://www.elastic.co/guide/en/machine-learning/current/ml-jobs.html" } } diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.validate_detector.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.validate_detector.json similarity index 58% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.validate_detector.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ml.validate_detector.json index 5e6d7daeea772..73527bd28c5d8 100644 --- a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.validate_detector.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.validate_detector.json @@ -5,6 +5,7 @@ ], "patterns": [ "_ml/anomaly_detectors/_validate/detector" - ] + ], + "documentation": "https://www.elastic.co/guide/en/machine-learning/current/ml-jobs.html" } } diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/monitoring.bulk.json b/src/plugins/console/server/lib/spec_definitions/json/generated/monitoring.bulk.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/monitoring.bulk.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/monitoring.bulk.json diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/msearch.json b/src/plugins/console/server/lib/spec_definitions/json/generated/msearch.json index ecb71e9ba23c0..d460bf2b1add5 100644 --- a/src/plugins/console/server/lib/spec_definitions/json/generated/msearch.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/msearch.json @@ -3,9 +3,7 @@ "url_params": { "search_type": [ "query_then_fetch", - "query_and_fetch", - "dfs_query_then_fetch", - "dfs_query_and_fetch" + "dfs_query_then_fetch" ], "max_concurrent_searches": "", "typed_keys": "__flag__", diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/msearch_template.json b/src/plugins/console/server/lib/spec_definitions/json/generated/msearch_template.json index 0b0ca087b1819..cc7cfbd6e82b6 100644 --- a/src/plugins/console/server/lib/spec_definitions/json/generated/msearch_template.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/msearch_template.json @@ -3,9 +3,7 @@ "url_params": { "search_type": [ "query_then_fetch", - "query_and_fetch", - "dfs_query_then_fetch", - "dfs_query_and_fetch" + "dfs_query_then_fetch" ], "typed_keys": "__flag__", "max_concurrent_searches": "", diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/mtermvectors.json b/src/plugins/console/server/lib/spec_definitions/json/generated/mtermvectors.json index 72a134eca4d2e..20c3daca849c7 100644 --- a/src/plugins/console/server/lib/spec_definitions/json/generated/mtermvectors.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/mtermvectors.json @@ -15,8 +15,7 @@ "version_type": [ "internal", "external", - "external_gte", - "force" + "external_gte" ] }, "methods": [ diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/nodes.stats.json b/src/plugins/console/server/lib/spec_definitions/json/generated/nodes.stats.json index e194a6d42c031..cfbcf69b39b7a 100644 --- a/src/plugins/console/server/lib/spec_definitions/json/generated/nodes.stats.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/nodes.stats.json @@ -12,7 +12,8 @@ ], "types": [], "timeout": "", - "include_segment_file_sizes": "__flag__" + "include_segment_file_sizes": "__flag__", + "include_unloaded_segments": "__flag__" }, "methods": [ "GET" @@ -33,6 +34,7 @@ "discovery", "fs", "http", + "indexing_pressure", "indices", "jvm", "os", @@ -42,6 +44,7 @@ ], "index_metric": [ "_all", + "bulk", "completion", "docs", "fielddata", @@ -55,7 +58,6 @@ "search", "segments", "store", - "suggest", "warmer" ] }, diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/open_point_in_time.json b/src/plugins/console/server/lib/spec_definitions/json/generated/open_point_in_time.json new file mode 100644 index 0000000000000..9ce78acbc1a2a --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/open_point_in_time.json @@ -0,0 +1,25 @@ +{ + "open_point_in_time": { + "url_params": { + "preference": "random", + "routing": "", + "ignore_unavailable": "__flag__", + "expand_wildcards": [ + "open", + "closed", + "hidden", + "none", + "all" + ], + "keep_alive": "" + }, + "methods": [ + "POST" + ], + "patterns": [ + "_pit", + "{indices}/_pit" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/point-in-time-api.html" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/render_search_template.json b/src/plugins/console/server/lib/spec_definitions/json/generated/render_search_template.json index e206140f9d16a..84377591e270b 100644 --- a/src/plugins/console/server/lib/spec_definitions/json/generated/render_search_template.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/render_search_template.json @@ -8,6 +8,6 @@ "_render/template", "_render/template/{id}" ], - "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html#_validating_templates" + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/render-search-template-api.html" } } diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/rollup.delete_job.json b/src/plugins/console/server/lib/spec_definitions/json/generated/rollup.delete_job.json new file mode 100644 index 0000000000000..4f7b37006c3b6 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/rollup.delete_job.json @@ -0,0 +1,11 @@ +{ + "rollup.delete_job": { + "methods": [ + "DELETE" + ], + "patterns": [ + "_rollup/job/{id}" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-delete-job.html" + } +} diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/rollup.get_jobs.json b/src/plugins/console/server/lib/spec_definitions/json/generated/rollup.get_jobs.json similarity index 53% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/rollup.get_jobs.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/rollup.get_jobs.json index 49524b394167c..70ce98063d57c 100644 --- a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/rollup.get_jobs.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/rollup.get_jobs.json @@ -6,6 +6,7 @@ "patterns": [ "_rollup/job/{id}", "_rollup/job/" - ] + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-get-job.html" } } diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/rollup.get_rollup_caps.json b/src/plugins/console/server/lib/spec_definitions/json/generated/rollup.get_rollup_caps.json similarity index 53% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/rollup.get_rollup_caps.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/rollup.get_rollup_caps.json index 8a0ef67a0ad4e..9d39f5a4e2ba8 100644 --- a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/rollup.get_rollup_caps.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/rollup.get_rollup_caps.json @@ -6,6 +6,7 @@ "patterns": [ "_rollup/data/{id}", "_rollup/data/" - ] + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-get-rollup-caps.html" } } diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/rollup.get_rollup_index_caps.json b/src/plugins/console/server/lib/spec_definitions/json/generated/rollup.get_rollup_index_caps.json similarity index 50% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/rollup.get_rollup_index_caps.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/rollup.get_rollup_index_caps.json index 325115553c294..f7ae6d14f675c 100644 --- a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/rollup.get_rollup_index_caps.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/rollup.get_rollup_index_caps.json @@ -5,6 +5,7 @@ ], "patterns": [ "{indices}/_rollup/data" - ] + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-get-rollup-index-caps.html" } } diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/rollup.put_job.json b/src/plugins/console/server/lib/spec_definitions/json/generated/rollup.put_job.json new file mode 100644 index 0000000000000..7970008f8c8f4 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/rollup.put_job.json @@ -0,0 +1,11 @@ +{ + "rollup.put_job": { + "methods": [ + "PUT" + ], + "patterns": [ + "_rollup/job/{id}" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-put-job.html" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/rollup.rollup.json b/src/plugins/console/server/lib/spec_definitions/json/generated/rollup.rollup.json new file mode 100644 index 0000000000000..c3cc629abac80 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/rollup.rollup.json @@ -0,0 +1,11 @@ +{ + "rollup.rollup": { + "methods": [ + "POST" + ], + "patterns": [ + "{indices}/_rollup/{rollup_index}" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/xpack-rollup.html" + } +} diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/rollup.rollup_search.json b/src/plugins/console/server/lib/spec_definitions/json/generated/rollup.rollup_search.json similarity index 68% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/rollup.rollup_search.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/rollup.rollup_search.json index a1771126a71b4..431e5e532a323 100644 --- a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/rollup.rollup_search.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/rollup.rollup_search.json @@ -10,6 +10,7 @@ ], "patterns": [ "{indices}/_rollup_search" - ] + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-search.html" } } diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/rollup.start_job.json b/src/plugins/console/server/lib/spec_definitions/json/generated/rollup.start_job.json similarity index 50% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/rollup.start_job.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/rollup.start_job.json index 9714275072b07..39ced395166c7 100644 --- a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/rollup.start_job.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/rollup.start_job.json @@ -5,6 +5,7 @@ ], "patterns": [ "_rollup/job/{id}/_start" - ] + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-start-job.html" } } diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/rollup.stop_job.json b/src/plugins/console/server/lib/spec_definitions/json/generated/rollup.stop_job.json similarity index 64% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/rollup.stop_job.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/rollup.stop_job.json index 70931030b4402..a1290cd388a09 100644 --- a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/rollup.stop_job.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/rollup.stop_job.json @@ -9,6 +9,7 @@ ], "patterns": [ "_rollup/job/{id}/_stop" - ] + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-stop-job.html" } } diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/search.json b/src/plugins/console/server/lib/spec_definitions/json/generated/search.json index 78b969d3ed8f2..f5e3a0041c7a6 100644 --- a/src/plugins/console/server/lib/spec_definitions/json/generated/search.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/search.json @@ -49,7 +49,7 @@ "suggest_text": "", "timeout": "", "track_scores": "__flag__", - "track_total_hits": "__flag__", + "track_total_hits": "", "allow_partial_search_results": "__flag__", "typed_keys": "__flag__", "version": "__flag__", @@ -58,7 +58,8 @@ "batched_reduce_size": "", "max_concurrent_shard_requests": "", "pre_filter_shard_size": "", - "rest_total_hits_as_int": "__flag__" + "rest_total_hits_as_int": "__flag__", + "min_compatible_shard_node": "" }, "methods": [ "GET", diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/search_template.json b/src/plugins/console/server/lib/spec_definitions/json/generated/search_template.json index 748326522e5c2..6d7b3aa34c107 100644 --- a/src/plugins/console/server/lib/spec_definitions/json/generated/search_template.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/search_template.json @@ -16,9 +16,7 @@ "scroll": "", "search_type": [ "query_then_fetch", - "query_and_fetch", - "dfs_query_then_fetch", - "dfs_query_and_fetch" + "dfs_query_then_fetch" ], "explain": "__flag__", "profile": "__flag__", diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/searchable_snapshots.cache_stats.json b/src/plugins/console/server/lib/spec_definitions/json/generated/searchable_snapshots.cache_stats.json new file mode 100644 index 0000000000000..5a53319c164f8 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/searchable_snapshots.cache_stats.json @@ -0,0 +1,15 @@ +{ + "searchable_snapshots.cache_stats": { + "url_params": { + "master_timeout": "" + }, + "methods": [ + "GET" + ], + "patterns": [ + "_searchable_snapshots/cache/stats", + "_searchable_snapshots/{nodes}/cache/stats" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-api-cache-stats.html" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/searchable_snapshots.clear_cache.json b/src/plugins/console/server/lib/spec_definitions/json/generated/searchable_snapshots.clear_cache.json new file mode 100644 index 0000000000000..428991f758cdb --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/searchable_snapshots.clear_cache.json @@ -0,0 +1,23 @@ +{ + "searchable_snapshots.clear_cache": { + "url_params": { + "ignore_unavailable": "__flag__", + "allow_no_indices": "__flag__", + "expand_wildcards": [ + "open", + "closed", + "none", + "all" + ], + "index": [] + }, + "methods": [ + "POST" + ], + "patterns": [ + "_searchable_snapshots/cache/clear", + "{indices}/_searchable_snapshots/cache/clear" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/searchable_snapshots.mount.json b/src/plugins/console/server/lib/spec_definitions/json/generated/searchable_snapshots.mount.json new file mode 100644 index 0000000000000..6556c466120da --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/searchable_snapshots.mount.json @@ -0,0 +1,16 @@ +{ + "searchable_snapshots.mount": { + "url_params": { + "master_timeout": "", + "wait_for_completion": "__flag__", + "storage": "" + }, + "methods": [ + "POST" + ], + "patterns": [ + "_snapshot/{repository}/{snapshot}/_mount" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-api-mount-snapshot.html" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/searchable_snapshots.stats.json b/src/plugins/console/server/lib/spec_definitions/json/generated/searchable_snapshots.stats.json new file mode 100644 index 0000000000000..ccf7522634a0e --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/searchable_snapshots.stats.json @@ -0,0 +1,19 @@ +{ + "searchable_snapshots.stats": { + "url_params": { + "level": [ + "cluster", + "indices", + "shards" + ] + }, + "methods": [ + "GET" + ], + "patterns": [ + "_searchable_snapshots/stats", + "{indices}/_searchable_snapshots/stats" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-api-stats.html" + } +} diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.authenticate.json b/src/plugins/console/server/lib/spec_definitions/json/generated/security.authenticate.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.authenticate.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/security.authenticate.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.change_password.json b/src/plugins/console/server/lib/spec_definitions/json/generated/security.change_password.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.change_password.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/security.change_password.json diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/security.clear_api_key_cache.json b/src/plugins/console/server/lib/spec_definitions/json/generated/security.clear_api_key_cache.json new file mode 100644 index 0000000000000..0046dab4074e6 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/security.clear_api_key_cache.json @@ -0,0 +1,11 @@ +{ + "security.clear_api_key_cache": { + "methods": [ + "POST" + ], + "patterns": [ + "_security/api_key/{ids}/_clear_cache" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-api-key-cache.html" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/security.clear_cached_privileges.json b/src/plugins/console/server/lib/spec_definitions/json/generated/security.clear_cached_privileges.json new file mode 100644 index 0000000000000..aaab692cefc35 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/security.clear_cached_privileges.json @@ -0,0 +1,11 @@ +{ + "security.clear_cached_privileges": { + "methods": [ + "POST" + ], + "patterns": [ + "_security/privilege/{application}/_clear_cache" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-privilege-cache.html" + } +} diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.clear_cached_realms.json b/src/plugins/console/server/lib/spec_definitions/json/generated/security.clear_cached_realms.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.clear_cached_realms.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/security.clear_cached_realms.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.clear_cached_roles.json b/src/plugins/console/server/lib/spec_definitions/json/generated/security.clear_cached_roles.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.clear_cached_roles.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/security.clear_cached_roles.json diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/security.clear_cached_service_tokens.json b/src/plugins/console/server/lib/spec_definitions/json/generated/security.clear_cached_service_tokens.json new file mode 100644 index 0000000000000..2fc747518fbc3 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/security.clear_cached_service_tokens.json @@ -0,0 +1,11 @@ +{ + "security.clear_cached_service_tokens": { + "methods": [ + "POST" + ], + "patterns": [ + "_security/service/{namespace}/{service}/credential/token/{name}/_clear_cache" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-service-token-caches.html" + } +} diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.create_api_key.json b/src/plugins/console/server/lib/spec_definitions/json/generated/security.create_api_key.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.create_api_key.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/security.create_api_key.json diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/security.create_service_token.json b/src/plugins/console/server/lib/spec_definitions/json/generated/security.create_service_token.json new file mode 100644 index 0000000000000..71c6ccedddc74 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/security.create_service_token.json @@ -0,0 +1,20 @@ +{ + "security.create_service_token": { + "url_params": { + "refresh": [ + "true", + "false", + "wait_for" + ] + }, + "methods": [ + "PUT", + "POST" + ], + "patterns": [ + "_security/service/{namespace}/{service}/credential/token/{name}", + "_security/service/{namespace}/{service}/credential/token" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-service-token.html" + } +} diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.delete_privileges.json b/src/plugins/console/server/lib/spec_definitions/json/generated/security.delete_privileges.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.delete_privileges.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/security.delete_privileges.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.delete_role.json b/src/plugins/console/server/lib/spec_definitions/json/generated/security.delete_role.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.delete_role.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/security.delete_role.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.delete_role_mapping.json b/src/plugins/console/server/lib/spec_definitions/json/generated/security.delete_role_mapping.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.delete_role_mapping.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/security.delete_role_mapping.json diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/security.delete_service_token.json b/src/plugins/console/server/lib/spec_definitions/json/generated/security.delete_service_token.json new file mode 100644 index 0000000000000..bfdfeb79cb27e --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/security.delete_service_token.json @@ -0,0 +1,18 @@ +{ + "security.delete_service_token": { + "url_params": { + "refresh": [ + "true", + "false", + "wait_for" + ] + }, + "methods": [ + "DELETE" + ], + "patterns": [ + "_security/service/{namespace}/{service}/credential/token/{name}" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-service-token.html" + } +} diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.delete_user.json b/src/plugins/console/server/lib/spec_definitions/json/generated/security.delete_user.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.delete_user.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/security.delete_user.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.disable_user.json b/src/plugins/console/server/lib/spec_definitions/json/generated/security.disable_user.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.disable_user.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/security.disable_user.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.enable_user.json b/src/plugins/console/server/lib/spec_definitions/json/generated/security.enable_user.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.enable_user.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/security.enable_user.json diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/security.enroll_kibana.json b/src/plugins/console/server/lib/spec_definitions/json/generated/security.enroll_kibana.json new file mode 100644 index 0000000000000..630adedd03ad7 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/security.enroll_kibana.json @@ -0,0 +1,11 @@ +{ + "security.enroll_kibana": { + "methods": [ + "GET" + ], + "patterns": [ + "_security/enroll/kibana" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/security-api-enroll-kibana.html" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/security.enroll_node.json b/src/plugins/console/server/lib/spec_definitions/json/generated/security.enroll_node.json new file mode 100644 index 0000000000000..d9cb7da17ed6e --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/security.enroll_node.json @@ -0,0 +1,11 @@ +{ + "security.enroll_node": { + "methods": [ + "GET" + ], + "patterns": [ + "_security/enroll/node" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/security-api-node-enrollment.html" + } +} diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.get_api_key.json b/src/plugins/console/server/lib/spec_definitions/json/generated/security.get_api_key.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.get_api_key.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/security.get_api_key.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.get_builtin_privileges.json b/src/plugins/console/server/lib/spec_definitions/json/generated/security.get_builtin_privileges.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.get_builtin_privileges.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/security.get_builtin_privileges.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.get_privileges.json b/src/plugins/console/server/lib/spec_definitions/json/generated/security.get_privileges.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.get_privileges.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/security.get_privileges.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.get_role.json b/src/plugins/console/server/lib/spec_definitions/json/generated/security.get_role.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.get_role.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/security.get_role.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.get_role_mapping.json b/src/plugins/console/server/lib/spec_definitions/json/generated/security.get_role_mapping.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.get_role_mapping.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/security.get_role_mapping.json diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/security.get_service_accounts.json b/src/plugins/console/server/lib/spec_definitions/json/generated/security.get_service_accounts.json new file mode 100644 index 0000000000000..41afc1de8df5c --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/security.get_service_accounts.json @@ -0,0 +1,13 @@ +{ + "security.get_service_accounts": { + "methods": [ + "GET" + ], + "patterns": [ + "_security/service/{namespace}/{service}", + "_security/service/{namespace}", + "_security/service" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-service-accounts.html" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/security.get_service_credentials.json b/src/plugins/console/server/lib/spec_definitions/json/generated/security.get_service_credentials.json new file mode 100644 index 0000000000000..b98029aaae367 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/security.get_service_credentials.json @@ -0,0 +1,11 @@ +{ + "security.get_service_credentials": { + "methods": [ + "GET" + ], + "patterns": [ + "_security/service/{namespace}/{service}/credential" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-service-credentials.html" + } +} diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.get_token.json b/src/plugins/console/server/lib/spec_definitions/json/generated/security.get_token.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.get_token.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/security.get_token.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.get_user.json b/src/plugins/console/server/lib/spec_definitions/json/generated/security.get_user.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.get_user.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/security.get_user.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.get_user_privileges.json b/src/plugins/console/server/lib/spec_definitions/json/generated/security.get_user_privileges.json similarity index 76% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.get_user_privileges.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/security.get_user_privileges.json index 63bf8d6969344..1b939d2d9a29e 100644 --- a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.get_user_privileges.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/security.get_user_privileges.json @@ -6,6 +6,6 @@ "patterns": [ "_security/user/_privileges" ], - "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-privileges.html" + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user-privileges.html" } } diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/security.grant_api_key.json b/src/plugins/console/server/lib/spec_definitions/json/generated/security.grant_api_key.json new file mode 100644 index 0000000000000..4d1a56e4fb0bb --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/security.grant_api_key.json @@ -0,0 +1,18 @@ +{ + "security.grant_api_key": { + "url_params": { + "refresh": [ + "true", + "false", + "wait_for" + ] + }, + "methods": [ + "POST" + ], + "patterns": [ + "_security/api_key/grant" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-grant-api-key.html" + } +} diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.has_privileges.json b/src/plugins/console/server/lib/spec_definitions/json/generated/security.has_privileges.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.has_privileges.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/security.has_privileges.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.invalidate_api_key.json b/src/plugins/console/server/lib/spec_definitions/json/generated/security.invalidate_api_key.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.invalidate_api_key.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/security.invalidate_api_key.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.invalidate_token.json b/src/plugins/console/server/lib/spec_definitions/json/generated/security.invalidate_token.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.invalidate_token.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/security.invalidate_token.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.put_privileges.json b/src/plugins/console/server/lib/spec_definitions/json/generated/security.put_privileges.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.put_privileges.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/security.put_privileges.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.put_role.json b/src/plugins/console/server/lib/spec_definitions/json/generated/security.put_role.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.put_role.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/security.put_role.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.put_role_mapping.json b/src/plugins/console/server/lib/spec_definitions/json/generated/security.put_role_mapping.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.put_role_mapping.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/security.put_role_mapping.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.put_user.json b/src/plugins/console/server/lib/spec_definitions/json/generated/security.put_user.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.put_user.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/security.put_user.json diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/security.saml_authenticate.json b/src/plugins/console/server/lib/spec_definitions/json/generated/security.saml_authenticate.json new file mode 100644 index 0000000000000..5ed30f2a4ef83 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/security.saml_authenticate.json @@ -0,0 +1,11 @@ +{ + "security.saml_authenticate": { + "methods": [ + "POST" + ], + "patterns": [ + "_security/saml/authenticate" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-authenticate.html" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/security.saml_complete_logout.json b/src/plugins/console/server/lib/spec_definitions/json/generated/security.saml_complete_logout.json new file mode 100644 index 0000000000000..7ecc4bdbc8784 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/security.saml_complete_logout.json @@ -0,0 +1,11 @@ +{ + "security.saml_complete_logout": { + "methods": [ + "POST" + ], + "patterns": [ + "_security/saml/complete_logout" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-complete-logout.html" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/security.saml_invalidate.json b/src/plugins/console/server/lib/spec_definitions/json/generated/security.saml_invalidate.json new file mode 100644 index 0000000000000..cea5236c474f4 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/security.saml_invalidate.json @@ -0,0 +1,11 @@ +{ + "security.saml_invalidate": { + "methods": [ + "POST" + ], + "patterns": [ + "_security/saml/invalidate" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-invalidate.html" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/security.saml_logout.json b/src/plugins/console/server/lib/spec_definitions/json/generated/security.saml_logout.json new file mode 100644 index 0000000000000..4300c948199b3 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/security.saml_logout.json @@ -0,0 +1,11 @@ +{ + "security.saml_logout": { + "methods": [ + "POST" + ], + "patterns": [ + "_security/saml/logout" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-logout.html" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/security.saml_prepare_authentication.json b/src/plugins/console/server/lib/spec_definitions/json/generated/security.saml_prepare_authentication.json new file mode 100644 index 0000000000000..fa4303ccfedae --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/security.saml_prepare_authentication.json @@ -0,0 +1,11 @@ +{ + "security.saml_prepare_authentication": { + "methods": [ + "POST" + ], + "patterns": [ + "_security/saml/prepare" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-prepare-authentication.html" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/security.saml_service_provider_metadata.json b/src/plugins/console/server/lib/spec_definitions/json/generated/security.saml_service_provider_metadata.json new file mode 100644 index 0000000000000..a77953309c9ce --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/security.saml_service_provider_metadata.json @@ -0,0 +1,11 @@ +{ + "security.saml_service_provider_metadata": { + "methods": [ + "GET" + ], + "patterns": [ + "_security/saml/metadata/{realm_name}" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-sp-metadata.html" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/shutdown.delete_node.json b/src/plugins/console/server/lib/spec_definitions/json/generated/shutdown.delete_node.json new file mode 100644 index 0000000000000..18605b2afc549 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/shutdown.delete_node.json @@ -0,0 +1,11 @@ +{ + "shutdown.delete_node": { + "methods": [ + "DELETE" + ], + "patterns": [ + "_nodes/{nodes}/shutdown" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/shutdown.get_node.json b/src/plugins/console/server/lib/spec_definitions/json/generated/shutdown.get_node.json new file mode 100644 index 0000000000000..0b9c9139b57e3 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/shutdown.get_node.json @@ -0,0 +1,12 @@ +{ + "shutdown.get_node": { + "methods": [ + "GET" + ], + "patterns": [ + "_nodes/shutdown", + "_nodes/{nodes}/shutdown" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/shutdown.put_node.json b/src/plugins/console/server/lib/spec_definitions/json/generated/shutdown.put_node.json new file mode 100644 index 0000000000000..aee49831305f1 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/shutdown.put_node.json @@ -0,0 +1,11 @@ +{ + "shutdown.put_node": { + "methods": [ + "PUT" + ], + "patterns": [ + "_nodes/{nodes}/shutdown" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current" + } +} diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/slm.delete_lifecycle.json b/src/plugins/console/server/lib/spec_definitions/json/generated/slm.delete_lifecycle.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/slm.delete_lifecycle.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/slm.delete_lifecycle.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/slm.execute_lifecycle.json b/src/plugins/console/server/lib/spec_definitions/json/generated/slm.execute_lifecycle.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/slm.execute_lifecycle.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/slm.execute_lifecycle.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/slm.execute_retention.json b/src/plugins/console/server/lib/spec_definitions/json/generated/slm.execute_retention.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/slm.execute_retention.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/slm.execute_retention.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/slm.get_lifecycle.json b/src/plugins/console/server/lib/spec_definitions/json/generated/slm.get_lifecycle.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/slm.get_lifecycle.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/slm.get_lifecycle.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/slm.get_stats.json b/src/plugins/console/server/lib/spec_definitions/json/generated/slm.get_stats.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/slm.get_stats.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/slm.get_stats.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/slm.get_status.json b/src/plugins/console/server/lib/spec_definitions/json/generated/slm.get_status.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/slm.get_status.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/slm.get_status.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/slm.put_lifecycle.json b/src/plugins/console/server/lib/spec_definitions/json/generated/slm.put_lifecycle.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/slm.put_lifecycle.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/slm.put_lifecycle.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/slm.start.json b/src/plugins/console/server/lib/spec_definitions/json/generated/slm.start.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/slm.start.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/slm.start.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/slm.stop.json b/src/plugins/console/server/lib/spec_definitions/json/generated/slm.stop.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/slm.stop.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/slm.stop.json diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/snapshot.cleanup_repository.json b/src/plugins/console/server/lib/spec_definitions/json/generated/snapshot.cleanup_repository.json index eed3e597dc070..cd29d6c300dc6 100644 --- a/src/plugins/console/server/lib/spec_definitions/json/generated/snapshot.cleanup_repository.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/snapshot.cleanup_repository.json @@ -10,6 +10,6 @@ "patterns": [ "_snapshot/{repository}/_cleanup" ], - "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html" + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/clean-up-snapshot-repo-api.html" } } diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/snapshot.clone.json b/src/plugins/console/server/lib/spec_definitions/json/generated/snapshot.clone.json new file mode 100644 index 0000000000000..ef8eedf78ac91 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/snapshot.clone.json @@ -0,0 +1,14 @@ +{ + "snapshot.clone": { + "url_params": { + "master_timeout": "" + }, + "methods": [ + "PUT" + ], + "patterns": [ + "_snapshot/{repository}/{snapshot}/_clone/{target_snapshot}" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/snapshot.get.json b/src/plugins/console/server/lib/spec_definitions/json/generated/snapshot.get.json index b37141728f6b7..8edb85f416b48 100644 --- a/src/plugins/console/server/lib/spec_definitions/json/generated/snapshot.get.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/snapshot.get.json @@ -3,7 +3,12 @@ "url_params": { "master_timeout": "", "ignore_unavailable": "__flag__", - "verbose": "__flag__" + "index_details": "__flag__", + "verbose": "__flag__", + "sort": ["start_time", "duration", "name", "index_count"], + "size": "", + "order": "", + "after": "" }, "methods": [ "GET" diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/snapshot.repository_analyze.json b/src/plugins/console/server/lib/spec_definitions/json/generated/snapshot.repository_analyze.json new file mode 100644 index 0000000000000..cf591a66ad2fd --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/snapshot.repository_analyze.json @@ -0,0 +1,24 @@ +{ + "snapshot.repository_analyze": { + "url_params": { + "blob_count": "", + "concurrency": "", + "read_node_count": "", + "early_read_node_count": "", + "seed": "", + "rare_action_probability": "", + "max_blob_size": "", + "max_total_data_size": "", + "timeout": "", + "detailed": "__flag__", + "rarely_abort_writes": "__flag__" + }, + "methods": [ + "POST" + ], + "patterns": [ + "_snapshot/{repository}/_analyze" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html" + } +} diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/sql.clear_cursor.json b/src/plugins/console/server/lib/spec_definitions/json/generated/sql.clear_cursor.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/sql.clear_cursor.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/sql.clear_cursor.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/sql.query.json b/src/plugins/console/server/lib/spec_definitions/json/generated/sql.query.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/sql.query.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/sql.query.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/sql.translate.json b/src/plugins/console/server/lib/spec_definitions/json/generated/sql.translate.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/sql.translate.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/sql.translate.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ssl.certificates.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ssl.certificates.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ssl.certificates.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/ssl.certificates.json diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/tasks.cancel.json b/src/plugins/console/server/lib/spec_definitions/json/generated/tasks.cancel.json index 7a84c6acb53a7..2583876b93625 100644 --- a/src/plugins/console/server/lib/spec_definitions/json/generated/tasks.cancel.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/tasks.cancel.json @@ -3,7 +3,8 @@ "url_params": { "nodes": [], "actions": [], - "parent_task_id": "" + "parent_task_id": "", + "wait_for_completion": "__flag__" }, "methods": [ "POST" diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/terms_enum.json b/src/plugins/console/server/lib/spec_definitions/json/generated/terms_enum.json new file mode 100644 index 0000000000000..c1cb06b8a195a --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/terms_enum.json @@ -0,0 +1,12 @@ +{ + "terms_enum": { + "methods": [ + "GET", + "POST" + ], + "patterns": [ + "{indices}/_terms_enum" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/search-terms-enum.html" + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/termvectors.json b/src/plugins/console/server/lib/spec_definitions/json/generated/termvectors.json index d94cffc38b7af..53ea7a9d6cbf6 100644 --- a/src/plugins/console/server/lib/spec_definitions/json/generated/termvectors.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/termvectors.json @@ -14,8 +14,7 @@ "version_type": [ "internal", "external", - "external_gte", - "force" + "external_gte" ] }, "methods": [ diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/text_structure.find_structure.json b/src/plugins/console/server/lib/spec_definitions/json/generated/text_structure.find_structure.json new file mode 100644 index 0000000000000..8b5e576b495a3 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/text_structure.find_structure.json @@ -0,0 +1,32 @@ +{ + "text_structure.find_structure": { + "url_params": { + "lines_to_sample": 0, + "line_merge_size_limit": 0, + "timeout": "", + "charset": "", + "format": [ + "ndjson", + "xml", + "delimited", + "semi_structured_text" + ], + "has_header_row": "__flag__", + "column_names": [], + "delimiter": "", + "quote": "", + "should_trim_fields": "__flag__", + "grok_pattern": "", + "timestamp_field": "", + "timestamp_format": "", + "explain": "__flag__" + }, + "methods": [ + "POST" + ], + "patterns": [ + "_text_structure/find_structure" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/find-structure.html" + } +} diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/transform.cat_transform.json b/src/plugins/console/server/lib/spec_definitions/json/generated/transform.cat_transform.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/transform.cat_transform.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/transform.cat_transform.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/transform.delete_transform.json b/src/plugins/console/server/lib/spec_definitions/json/generated/transform.delete_transform.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/transform.delete_transform.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/transform.delete_transform.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/transform.get_transform.json b/src/plugins/console/server/lib/spec_definitions/json/generated/transform.get_transform.json similarity index 81% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/transform.get_transform.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/transform.get_transform.json index 2875ff8b91937..3a50ff7fc3c1c 100644 --- a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/transform.get_transform.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/transform.get_transform.json @@ -3,7 +3,8 @@ "url_params": { "from": 0, "size": 0, - "allow_no_match": "__flag__" + "allow_no_match": "__flag__", + "exclude_generated": "__flag__" }, "methods": [ "GET" diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/transform.get_transform_stats.json b/src/plugins/console/server/lib/spec_definitions/json/generated/transform.get_transform_stats.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/transform.get_transform_stats.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/transform.get_transform_stats.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/transform.preview_transform.json b/src/plugins/console/server/lib/spec_definitions/json/generated/transform.preview_transform.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/transform.preview_transform.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/transform.preview_transform.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/transform.put_transform.json b/src/plugins/console/server/lib/spec_definitions/json/generated/transform.put_transform.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/transform.put_transform.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/transform.put_transform.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/transform.start_transform.json b/src/plugins/console/server/lib/spec_definitions/json/generated/transform.start_transform.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/transform.start_transform.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/transform.start_transform.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/transform.stop_transform.json b/src/plugins/console/server/lib/spec_definitions/json/generated/transform.stop_transform.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/transform.stop_transform.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/transform.stop_transform.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/transform.update_transform.json b/src/plugins/console/server/lib/spec_definitions/json/generated/transform.update_transform.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/transform.update_transform.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/transform.update_transform.json diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/update.json b/src/plugins/console/server/lib/spec_definitions/json/generated/update.json index 43945dfada35c..4dd33978a77b8 100644 --- a/src/plugins/console/server/lib/spec_definitions/json/generated/update.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/update.json @@ -15,7 +15,8 @@ "routing": "", "timeout": "", "if_seq_no": "", - "if_primary_term": "" + "if_primary_term": "", + "require_alias": "__flag__" }, "methods": [ "POST" diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/update_by_query.json b/src/plugins/console/server/lib/spec_definitions/json/generated/update_by_query.json index 596f8f8b83963..b4b88312e638e 100644 --- a/src/plugins/console/server/lib/spec_definitions/json/generated/update_by_query.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/update_by_query.json @@ -33,7 +33,6 @@ "dfs_query_then_fetch" ], "search_timeout": "", - "size": "", "max_docs": "all documents", "sort": [], "_source": [], diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/watcher.ack_watch.json b/src/plugins/console/server/lib/spec_definitions/json/generated/watcher.ack_watch.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/watcher.ack_watch.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/watcher.ack_watch.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/watcher.activate_watch.json b/src/plugins/console/server/lib/spec_definitions/json/generated/watcher.activate_watch.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/watcher.activate_watch.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/watcher.activate_watch.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/watcher.deactivate_watch.json b/src/plugins/console/server/lib/spec_definitions/json/generated/watcher.deactivate_watch.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/watcher.deactivate_watch.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/watcher.deactivate_watch.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/watcher.delete_watch.json b/src/plugins/console/server/lib/spec_definitions/json/generated/watcher.delete_watch.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/watcher.delete_watch.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/watcher.delete_watch.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/watcher.execute_watch.json b/src/plugins/console/server/lib/spec_definitions/json/generated/watcher.execute_watch.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/watcher.execute_watch.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/watcher.execute_watch.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/watcher.get_watch.json b/src/plugins/console/server/lib/spec_definitions/json/generated/watcher.get_watch.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/watcher.get_watch.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/watcher.get_watch.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/watcher.put_watch.json b/src/plugins/console/server/lib/spec_definitions/json/generated/watcher.put_watch.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/watcher.put_watch.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/watcher.put_watch.json diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/watcher.query_watches.json b/src/plugins/console/server/lib/spec_definitions/json/generated/watcher.query_watches.json new file mode 100644 index 0000000000000..ea6f03a5672c1 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/watcher.query_watches.json @@ -0,0 +1,12 @@ +{ + "watcher.query_watches": { + "methods": [ + "GET", + "POST" + ], + "patterns": [ + "_watcher/_query/watches" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-query-watches.html" + } +} diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/watcher.start.json b/src/plugins/console/server/lib/spec_definitions/json/generated/watcher.start.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/watcher.start.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/watcher.start.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/watcher.stats.json b/src/plugins/console/server/lib/spec_definitions/json/generated/watcher.stats.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/watcher.stats.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/watcher.stats.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/watcher.stop.json b/src/plugins/console/server/lib/spec_definitions/json/generated/watcher.stop.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/watcher.stop.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/watcher.stop.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/xpack.info.json b/src/plugins/console/server/lib/spec_definitions/json/generated/xpack.info.json similarity index 78% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/xpack.info.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/xpack.info.json index 5b555dc129390..da92c12c5fd69 100644 --- a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/xpack.info.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/xpack.info.json @@ -1,7 +1,8 @@ { "xpack.info": { "url_params": { - "categories": [] + "categories": [], + "accept_enterprise": "__flag__" }, "methods": [ "GET" diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/xpack.ssl.certificates.json b/src/plugins/console/server/lib/spec_definitions/json/generated/xpack.ssl.certificates.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/xpack.ssl.certificates.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/xpack.ssl.certificates.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/xpack.usage.json b/src/plugins/console/server/lib/spec_definitions/json/generated/xpack.usage.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/xpack.usage.json rename to src/plugins/console/server/lib/spec_definitions/json/generated/xpack.usage.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/async_search.submit.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/async_search.submit.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/async_search.submit.json rename to src/plugins/console/server/lib/spec_definitions/json/overrides/async_search.submit.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ccr.follow.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/ccr.follow.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ccr.follow.json rename to src/plugins/console/server/lib/spec_definitions/json/overrides/ccr.follow.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ccr.forget_follower.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/ccr.forget_follower.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ccr.forget_follower.json rename to src/plugins/console/server/lib/spec_definitions/json/overrides/ccr.forget_follower.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ccr.put_auto_follow_pattern.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/ccr.put_auto_follow_pattern.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ccr.put_auto_follow_pattern.json rename to src/plugins/console/server/lib/spec_definitions/json/overrides/ccr.put_auto_follow_pattern.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ccr.resume_follow.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/ccr.resume_follow.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ccr.resume_follow.json rename to src/plugins/console/server/lib/spec_definitions/json/overrides/ccr.resume_follow.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/enrich.put_policy.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/enrich.put_policy.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/enrich.put_policy.json rename to src/plugins/console/server/lib/spec_definitions/json/overrides/enrich.put_policy.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ilm.move_to_step.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/ilm.move_to_step.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ilm.move_to_step.json rename to src/plugins/console/server/lib/spec_definitions/json/overrides/ilm.move_to_step.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ilm.put_lifecycle.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/ilm.put_lifecycle.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ilm.put_lifecycle.json rename to src/plugins/console/server/lib/spec_definitions/json/overrides/ilm.put_lifecycle.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.evaluate_data_frame.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/ml.evaluate_data_frame.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.evaluate_data_frame.json rename to src/plugins/console/server/lib/spec_definitions/json/overrides/ml.evaluate_data_frame.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.explain_data_frame_analytics.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/ml.explain_data_frame_analytics.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.explain_data_frame_analytics.json rename to src/plugins/console/server/lib/spec_definitions/json/overrides/ml.explain_data_frame_analytics.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.get_buckets.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/ml.get_buckets.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.get_buckets.json rename to src/plugins/console/server/lib/spec_definitions/json/overrides/ml.get_buckets.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.get_calendar_events.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/ml.get_calendar_events.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.get_calendar_events.json rename to src/plugins/console/server/lib/spec_definitions/json/overrides/ml.get_calendar_events.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.get_calendars.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/ml.get_calendars.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.get_calendars.json rename to src/plugins/console/server/lib/spec_definitions/json/overrides/ml.get_calendars.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.get_categories.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/ml.get_categories.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.get_categories.json rename to src/plugins/console/server/lib/spec_definitions/json/overrides/ml.get_categories.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.get_influencers.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/ml.get_influencers.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.get_influencers.json rename to src/plugins/console/server/lib/spec_definitions/json/overrides/ml.get_influencers.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.get_model_snapshots.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/ml.get_model_snapshots.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.get_model_snapshots.json rename to src/plugins/console/server/lib/spec_definitions/json/overrides/ml.get_model_snapshots.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.get_overall_buckets.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/ml.get_overall_buckets.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.get_overall_buckets.json rename to src/plugins/console/server/lib/spec_definitions/json/overrides/ml.get_overall_buckets.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.get_records.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/ml.get_records.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.get_records.json rename to src/plugins/console/server/lib/spec_definitions/json/overrides/ml.get_records.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.post_calendar_events.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/ml.post_calendar_events.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.post_calendar_events.json rename to src/plugins/console/server/lib/spec_definitions/json/overrides/ml.post_calendar_events.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.put_calendar.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/ml.put_calendar.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.put_calendar.json rename to src/plugins/console/server/lib/spec_definitions/json/overrides/ml.put_calendar.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.put_data_frame_analytics.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/ml.put_data_frame_analytics.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.put_data_frame_analytics.json rename to src/plugins/console/server/lib/spec_definitions/json/overrides/ml.put_data_frame_analytics.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.put_datafeed.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/ml.put_datafeed.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.put_datafeed.json rename to src/plugins/console/server/lib/spec_definitions/json/overrides/ml.put_datafeed.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.put_job.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/ml.put_job.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.put_job.json rename to src/plugins/console/server/lib/spec_definitions/json/overrides/ml.put_job.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.put_trained_model.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/ml.put_trained_model.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.put_trained_model.json rename to src/plugins/console/server/lib/spec_definitions/json/overrides/ml.put_trained_model.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.revert_model_snapshot.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/ml.revert_model_snapshot.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.revert_model_snapshot.json rename to src/plugins/console/server/lib/spec_definitions/json/overrides/ml.revert_model_snapshot.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.update_datafeed.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/ml.update_datafeed.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.update_datafeed.json rename to src/plugins/console/server/lib/spec_definitions/json/overrides/ml.update_datafeed.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.update_job.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/ml.update_job.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.update_job.json rename to src/plugins/console/server/lib/spec_definitions/json/overrides/ml.update_job.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.update_model_snapshot.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/ml.update_model_snapshot.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.update_model_snapshot.json rename to src/plugins/console/server/lib/spec_definitions/json/overrides/ml.update_model_snapshot.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/security.authenticate.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/security.authenticate.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/security.authenticate.json rename to src/plugins/console/server/lib/spec_definitions/json/overrides/security.authenticate.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/security.change_password.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/security.change_password.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/security.change_password.json rename to src/plugins/console/server/lib/spec_definitions/json/overrides/security.change_password.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/security.create_api_key.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/security.create_api_key.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/security.create_api_key.json rename to src/plugins/console/server/lib/spec_definitions/json/overrides/security.create_api_key.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/security.get_token.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/security.get_token.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/security.get_token.json rename to src/plugins/console/server/lib/spec_definitions/json/overrides/security.get_token.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/security.has_privileges.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/security.has_privileges.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/security.has_privileges.json rename to src/plugins/console/server/lib/spec_definitions/json/overrides/security.has_privileges.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/security.invalidate_api_key.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/security.invalidate_api_key.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/security.invalidate_api_key.json rename to src/plugins/console/server/lib/spec_definitions/json/overrides/security.invalidate_api_key.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/security.invalidate_token.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/security.invalidate_token.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/security.invalidate_token.json rename to src/plugins/console/server/lib/spec_definitions/json/overrides/security.invalidate_token.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/security.put_role.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/security.put_role.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/security.put_role.json rename to src/plugins/console/server/lib/spec_definitions/json/overrides/security.put_role.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/security.put_role_mapping.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/security.put_role_mapping.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/security.put_role_mapping.json rename to src/plugins/console/server/lib/spec_definitions/json/overrides/security.put_role_mapping.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/security.put_user.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/security.put_user.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/security.put_user.json rename to src/plugins/console/server/lib/spec_definitions/json/overrides/security.put_user.json diff --git a/src/plugins/console/server/lib/spec_definitions/json/overrides/security.saml_authenticate.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/security.saml_authenticate.json new file mode 100644 index 0000000000000..a1d50daa70572 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/overrides/security.saml_authenticate.json @@ -0,0 +1,9 @@ +{ + "security.saml_authenticate": { + "data_autocomplete_rules": { + "content": "", + "ids": [], + "realm": "" + } + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/overrides/security.saml_complete_logout.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/security.saml_complete_logout.json new file mode 100644 index 0000000000000..b9d5b83e0424c --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/overrides/security.saml_complete_logout.json @@ -0,0 +1,10 @@ +{ + "security.saml_complete_logout": { + "data_autocomplete_rules": { + "realm": "", + "ids": [], + "query_string": "", + "content": "" + } + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/overrides/security.saml_invalidate.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/security.saml_invalidate.json new file mode 100644 index 0000000000000..f4a27d659c360 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/overrides/security.saml_invalidate.json @@ -0,0 +1,9 @@ +{ + "security.saml_invalidate": { + "data_autocomplete_rules": { + "query_string": "", + "acs": "", + "realm": "" + } + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/overrides/security.saml_logout.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/security.saml_logout.json new file mode 100644 index 0000000000000..40e5c6bc09299 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/overrides/security.saml_logout.json @@ -0,0 +1,8 @@ +{ + "security.saml_logout": { + "data_autocomplete_rules": { + "token": "", + "refresh_token": "" + } + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/overrides/security.saml_prepare_authentication.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/security.saml_prepare_authentication.json new file mode 100644 index 0000000000000..4ebdd53c95166 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/overrides/security.saml_prepare_authentication.json @@ -0,0 +1,8 @@ +{ + "security.saml_prepare_authentication": { + "data_autocomplete_rules": { + "acs": "", + "realm": "" + } + } +} diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/slm.put_lifecycle.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/slm.put_lifecycle.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/slm.put_lifecycle.json rename to src/plugins/console/server/lib/spec_definitions/json/overrides/slm.put_lifecycle.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/slm.start.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/slm.start.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/slm.start.json rename to src/plugins/console/server/lib/spec_definitions/json/overrides/slm.start.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/slm.stop.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/slm.stop.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/slm.stop.json rename to src/plugins/console/server/lib/spec_definitions/json/overrides/slm.stop.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/sql.query.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/sql.query.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/sql.query.json rename to src/plugins/console/server/lib/spec_definitions/json/overrides/sql.query.json diff --git a/src/plugins/console/server/lib/spec_definitions/json/overrides/terms_enum.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/terms_enum.json new file mode 100644 index 0000000000000..3a3681cefe072 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/overrides/terms_enum.json @@ -0,0 +1,12 @@ +{ + "terms_enum": { + "data_autocomplete_rules": { + "field": "", + "string": "", + "size": "", + "timeout": "", + "case_insensitive": { "__one_of": [true, false] }, + "index_filter": "" + } + } +} diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/transform.get_transform_stats.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/transform.get_transform_stats.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/transform.get_transform_stats.json rename to src/plugins/console/server/lib/spec_definitions/json/overrides/transform.get_transform_stats.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/transform.preview_transform.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/transform.preview_transform.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/transform.preview_transform.json rename to src/plugins/console/server/lib/spec_definitions/json/overrides/transform.preview_transform.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/transform.put_transform.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/transform.put_transform.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/transform.put_transform.json rename to src/plugins/console/server/lib/spec_definitions/json/overrides/transform.put_transform.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/transform.stop_transform.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/transform.stop_transform.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/transform.stop_transform.json rename to src/plugins/console/server/lib/spec_definitions/json/overrides/transform.stop_transform.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/transform.update_transform.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/transform.update_transform.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/transform.update_transform.json rename to src/plugins/console/server/lib/spec_definitions/json/overrides/transform.update_transform.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/xpack.graph.explore.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/xpack.graph.explore.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/xpack.graph.explore.json rename to src/plugins/console/server/lib/spec_definitions/json/overrides/xpack.graph.explore.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/xpack.info.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/xpack.info.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/xpack.info.json rename to src/plugins/console/server/lib/spec_definitions/json/overrides/xpack.info.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/xpack.license.post.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/xpack.license.post.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/xpack.license.post.json rename to src/plugins/console/server/lib/spec_definitions/json/overrides/xpack.license.post.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/xpack.rollup.delete_job.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/xpack.rollup.delete_job.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/xpack.rollup.delete_job.json rename to src/plugins/console/server/lib/spec_definitions/json/overrides/xpack.rollup.delete_job.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/xpack.rollup.put_job.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/xpack.rollup.put_job.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/xpack.rollup.put_job.json rename to src/plugins/console/server/lib/spec_definitions/json/overrides/xpack.rollup.put_job.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/xpack.rollup.rollup_search.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/xpack.rollup.rollup_search.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/xpack.rollup.rollup_search.json rename to src/plugins/console/server/lib/spec_definitions/json/overrides/xpack.rollup.rollup_search.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/xpack.security.authenticate.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/xpack.security.authenticate.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/xpack.security.authenticate.json rename to src/plugins/console/server/lib/spec_definitions/json/overrides/xpack.security.authenticate.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/xpack.security.change_password.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/xpack.security.change_password.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/xpack.security.change_password.json rename to src/plugins/console/server/lib/spec_definitions/json/overrides/xpack.security.change_password.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/xpack.security.get_token.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/xpack.security.get_token.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/xpack.security.get_token.json rename to src/plugins/console/server/lib/spec_definitions/json/overrides/xpack.security.get_token.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/xpack.security.invalidate_token.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/xpack.security.invalidate_token.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/xpack.security.invalidate_token.json rename to src/plugins/console/server/lib/spec_definitions/json/overrides/xpack.security.invalidate_token.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/xpack.security.put_role.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/xpack.security.put_role.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/xpack.security.put_role.json rename to src/plugins/console/server/lib/spec_definitions/json/overrides/xpack.security.put_role.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/xpack.security.put_role_mapping.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/xpack.security.put_role_mapping.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/xpack.security.put_role_mapping.json rename to src/plugins/console/server/lib/spec_definitions/json/overrides/xpack.security.put_role_mapping.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/xpack.security.put_user.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/xpack.security.put_user.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/xpack.security.put_user.json rename to src/plugins/console/server/lib/spec_definitions/json/overrides/xpack.security.put_user.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/xpack.watcher.execute_watch.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/xpack.watcher.execute_watch.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/xpack.watcher.execute_watch.json rename to src/plugins/console/server/lib/spec_definitions/json/overrides/xpack.watcher.execute_watch.json diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/xpack.watcher.put_watch.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/xpack.watcher.put_watch.json similarity index 100% rename from x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/xpack.watcher.put_watch.json rename to src/plugins/console/server/lib/spec_definitions/json/overrides/xpack.watcher.put_watch.json diff --git a/src/plugins/data/common/index_patterns/types.ts b/src/plugins/data/common/index_patterns/types.ts index b03e745df74a6..58cc6d0478d5e 100644 --- a/src/plugins/data/common/index_patterns/types.ts +++ b/src/plugins/data/common/index_patterns/types.ts @@ -150,9 +150,17 @@ export type AggregationRestrictions = Record< time_zone?: string; } >; + export interface TypeMeta { aggs?: Record; - [key: string]: any; + params?: { + rollup_index: string; + }; +} + +export enum IndexPatternType { + DEFAULT = 'default', + ROLLUP = 'rollup', } export type FieldSpecConflictDescriptions = Record; diff --git a/src/plugins/data/public/index.ts b/src/plugins/data/public/index.ts index e9e50ebfaf138..9af1cbf95d94d 100644 --- a/src/plugins/data/public/index.ts +++ b/src/plugins/data/public/index.ts @@ -269,6 +269,7 @@ export { IndexPatternLoadExpressionFunctionDefinition, fieldList, INDEX_PATTERN_SAVED_OBJECT_TYPE, + IndexPatternType, } from '../common'; export { DuplicateIndexPatternError } from '../common/index_patterns/errors'; diff --git a/src/plugins/data/public/public.api.md b/src/plugins/data/public/public.api.md index b8af7c12d57fc..6c0ddd000f30a 100644 --- a/src/plugins/data/public/public.api.md +++ b/src/plugins/data/public/public.api.md @@ -1688,14 +1688,26 @@ export class IndexPatternsService { updateSavedObject(indexPattern: IndexPattern, saveAttempts?: number, ignoreErrors?: boolean): Promise; } +// Warning: (ae-missing-release-tag) "IndexPatternType" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export enum IndexPatternType { + // (undocumented) + DEFAULT = "default", + // (undocumented) + ROLLUP = "rollup" +} + // Warning: (ae-missing-release-tag) "TypeMeta" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) export interface IndexPatternTypeMeta { - // (undocumented) - [key: string]: any; // (undocumented) aggs?: Record; + // (undocumented) + params?: { + rollup_index: string; + }; } // Warning: (ae-missing-release-tag) "injectReferences" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) @@ -2766,20 +2778,20 @@ export interface WaitUntilNextSessionCompletesOptions { // src/plugins/data/public/index.ts:238:27 - (ae-forgotten-export) The symbol "validateIndexPattern" needs to be exported by the entry point index.d.ts // src/plugins/data/public/index.ts:238:27 - (ae-forgotten-export) The symbol "flattenHitWrapper" needs to be exported by the entry point index.d.ts // src/plugins/data/public/index.ts:238:27 - (ae-forgotten-export) The symbol "formatHitProvider" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:409:20 - (ae-forgotten-export) The symbol "getResponseInspectorStats" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:409:20 - (ae-forgotten-export) The symbol "tabifyAggResponse" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:409:20 - (ae-forgotten-export) The symbol "tabifyGetColumns" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:411:1 - (ae-forgotten-export) The symbol "CidrMask" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:412:1 - (ae-forgotten-export) The symbol "dateHistogramInterval" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:421:1 - (ae-forgotten-export) The symbol "InvalidEsCalendarIntervalError" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:422:1 - (ae-forgotten-export) The symbol "InvalidEsIntervalFormatError" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:423:1 - (ae-forgotten-export) The symbol "IpAddress" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:424:1 - (ae-forgotten-export) The symbol "isDateHistogramBucketAggConfig" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:428:1 - (ae-forgotten-export) The symbol "isValidEsInterval" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:429:1 - (ae-forgotten-export) The symbol "isValidInterval" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:432:1 - (ae-forgotten-export) The symbol "parseInterval" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:433:1 - (ae-forgotten-export) The symbol "propFilter" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:436:1 - (ae-forgotten-export) The symbol "toAbsoluteDates" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:410:20 - (ae-forgotten-export) The symbol "getResponseInspectorStats" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:410:20 - (ae-forgotten-export) The symbol "tabifyAggResponse" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:410:20 - (ae-forgotten-export) The symbol "tabifyGetColumns" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:412:1 - (ae-forgotten-export) The symbol "CidrMask" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:413:1 - (ae-forgotten-export) The symbol "dateHistogramInterval" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:422:1 - (ae-forgotten-export) The symbol "InvalidEsCalendarIntervalError" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:423:1 - (ae-forgotten-export) The symbol "InvalidEsIntervalFormatError" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:424:1 - (ae-forgotten-export) The symbol "IpAddress" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:425:1 - (ae-forgotten-export) The symbol "isDateHistogramBucketAggConfig" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:429:1 - (ae-forgotten-export) The symbol "isValidEsInterval" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:430:1 - (ae-forgotten-export) The symbol "isValidInterval" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:433:1 - (ae-forgotten-export) The symbol "parseInterval" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:434:1 - (ae-forgotten-export) The symbol "propFilter" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:437:1 - (ae-forgotten-export) The symbol "toAbsoluteDates" needs to be exported by the entry point index.d.ts // src/plugins/data/public/query/state_sync/connect_to_query_state.ts:34:5 - (ae-forgotten-export) The symbol "FilterStateStore" needs to be exported by the entry point index.d.ts // src/plugins/data/public/search/session/session_service.ts:62:5 - (ae-forgotten-export) The symbol "UrlGeneratorStateMapping" needs to be exported by the entry point index.d.ts diff --git a/src/plugins/data/public/ui/filter_bar/filter_bar.tsx b/src/plugins/data/public/ui/filter_bar/filter_bar.tsx index 4655bbf8e91a5..cc796ad749f0b 100644 --- a/src/plugins/data/public/ui/filter_bar/filter_bar.tsx +++ b/src/plugins/data/public/ui/filter_bar/filter_bar.tsx @@ -77,7 +77,7 @@ function FilterBarUI(props: Props) { const button = ( setIsAddFilterPopoverOpen(true)} data-test-subj="addFilter" className="globalFilterBar__addButton" diff --git a/src/plugins/es_ui_shared/static/forms/hook_form_lib/components/use_array.ts b/src/plugins/es_ui_shared/static/forms/hook_form_lib/components/use_array.ts index 1152290f7d553..0a6f2cc2c2b18 100644 --- a/src/plugins/es_ui_shared/static/forms/hook_form_lib/components/use_array.ts +++ b/src/plugins/es_ui_shared/static/forms/hook_form_lib/components/use_array.ts @@ -62,7 +62,7 @@ export const UseArray = ({ const uniqueId = useRef(0); const form = useFormContext(); - const { __getFieldDefaultValue } = form; + const { getFieldDefaultValue } = form; const getNewItemAtIndex = useCallback( (index: number): ArrayItem => ({ @@ -75,7 +75,7 @@ export const UseArray = ({ const fieldDefaultValue = useMemo(() => { const defaultValues = readDefaultValueOnForm - ? (__getFieldDefaultValue(path) as any[]) + ? (getFieldDefaultValue(path) as any[]) : undefined; const getInitialItemsFromValues = (values: any[]): ArrayItem[] => @@ -88,13 +88,7 @@ export const UseArray = ({ return defaultValues ? getInitialItemsFromValues(defaultValues) : new Array(initialNumberOfItems).fill('').map((_, i) => getNewItemAtIndex(i)); - }, [ - path, - initialNumberOfItems, - readDefaultValueOnForm, - __getFieldDefaultValue, - getNewItemAtIndex, - ]); + }, [path, initialNumberOfItems, readDefaultValueOnForm, getFieldDefaultValue, getNewItemAtIndex]); // Create a new hook field with the "isIncludedInOutput" set to false so we don't use its value to build the final form data. // Apart from that the field behaves like a normal field and is hooked into the form validation lifecycle. diff --git a/src/plugins/es_ui_shared/static/forms/hook_form_lib/components/use_field.tsx b/src/plugins/es_ui_shared/static/forms/hook_form_lib/components/use_field.tsx index 3a5fbaba8f3b8..45fa2e977a6c7 100644 --- a/src/plugins/es_ui_shared/static/forms/hook_form_lib/components/use_field.tsx +++ b/src/plugins/es_ui_shared/static/forms/hook_form_lib/components/use_field.tsx @@ -59,8 +59,7 @@ function UseFieldComp(props: Props { + describe('field.validate()', () => { + const EMPTY_VALUE = ' '; + + test('It should not invalidate a field with arrayItem validation when isBlocking is false', async () => { + let fieldHook: FieldHook; + + const TestField = ({ field }: { field: FieldHook }) => { + fieldHook = field; + return null; + }; + + const TestForm = () => { + const { form } = useForm(); + + return ( +
+ + + ); + }; + + registerTestBed(TestForm)(); + + let validateResponse: FieldValidateResponse; + + await act(async () => { + validateResponse = await fieldHook!.validate({ + value: EMPTY_VALUE, + validationType: VALIDATION_TYPES.ARRAY_ITEM, + }); + }); + + // validation fails for ARRAY_ITEM with a non-blocking validation error + expect(validateResponse!).toEqual({ + isValid: false, + errors: [ + { + code: 'ERR_FIELD_MISSING', + path: 'test-path', + message: 'error-message', + __isBlocking__: false, + validationType: 'arrayItem', + }, + ], + }); + + // expect the field to be valid because the validation error is non-blocking + expect(fieldHook!.isValid).toBe(true); + }); + + test('It should invalidate an arrayItem field when isBlocking is true', async () => { + let fieldHook: FieldHook; + + const TestField = ({ field }: { field: FieldHook }) => { + fieldHook = field; + return null; + }; + + const TestForm = () => { + const { form } = useForm(); + + return ( +
+ + + ); + }; + + registerTestBed(TestForm)(); + + let validateResponse: FieldValidateResponse; + + await act(async () => { + validateResponse = await fieldHook!.validate({ + value: EMPTY_VALUE, + validationType: VALIDATION_TYPES.ARRAY_ITEM, + }); + }); + + // validation fails for ARRAY_ITEM with a blocking validation error + expect(validateResponse!).toEqual({ + isValid: false, + errors: [ + { + code: 'ERR_FIELD_MISSING', + path: 'test-path', + message: 'error-message', + __isBlocking__: true, + validationType: 'arrayItem', + }, + ], + }); + + // expect the field to be invalid because the validation error is blocking + expect(fieldHook!.isValid).toBe(false); + }); + }); +}); diff --git a/src/plugins/es_ui_shared/static/forms/hook_form_lib/hooks/use_field.ts b/src/plugins/es_ui_shared/static/forms/hook_form_lib/hooks/use_field.ts index 0cf1bb3601667..77bb17d7b9e60 100644 --- a/src/plugins/es_ui_shared/static/forms/hook_form_lib/hooks/use_field.ts +++ b/src/plugins/es_ui_shared/static/forms/hook_form_lib/hooks/use_field.ts @@ -15,6 +15,7 @@ import { FieldValidateResponse, ValidationError, FormData, + ValidationConfig, } from '../types'; import { FIELD_TYPES, VALIDATION_TYPES } from '../constants'; @@ -189,10 +190,12 @@ export const useField = ( { formData, value: valueToValidate, + onlyBlocking: runOnlyBlockingValidations, validationTypeToValidate, }: { formData: any; value: I; + onlyBlocking: boolean; validationTypeToValidate?: string; }, clearFieldErrors: FieldHook['clearErrors'] @@ -203,10 +206,31 @@ export const useField = ( // By default, for fields that have an asynchronous validation // we will clear the errors as soon as the field value changes. - clearFieldErrors([VALIDATION_TYPES.FIELD, VALIDATION_TYPES.ASYNC]); + clearFieldErrors([ + validationTypeToValidate ?? VALIDATION_TYPES.FIELD, + VALIDATION_TYPES.ASYNC, + ]); cancelInflightValidation(); + const doByPassValidation = ({ + type: validationType, + isBlocking, + }: ValidationConfig) => { + if ( + typeof validationTypeToValidate !== 'undefined' && + validationType !== validationTypeToValidate + ) { + return true; + } + + if (runOnlyBlockingValidations && isBlocking === false) { + return true; + } + + return false; + }; + const runAsync = async () => { const validationErrors: ValidationError[] = []; @@ -219,10 +243,7 @@ export const useField = ( type: validationType = VALIDATION_TYPES.FIELD, } = validation; - if ( - typeof validationTypeToValidate !== 'undefined' && - validationType !== validationTypeToValidate - ) { + if (doByPassValidation(validation)) { continue; } @@ -265,10 +286,7 @@ export const useField = ( type: validationType = VALIDATION_TYPES.FIELD, } = validation; - if ( - typeof validationTypeToValidate !== 'undefined' && - validationType !== validationTypeToValidate - ) { + if (doByPassValidation(validation)) { continue; } @@ -344,6 +362,7 @@ export const useField = ( formData = __getFormData$().value, value: valueToValidate = value, validationType, + onlyBlocking = false, } = validationData; setIsValidated(true); @@ -377,6 +396,7 @@ export const useField = ( formData, value: valueToValidate, validationTypeToValidate: validationType, + onlyBlocking, }, clearErrors ); diff --git a/src/plugins/es_ui_shared/static/forms/hook_form_lib/hooks/use_form.test.tsx b/src/plugins/es_ui_shared/static/forms/hook_form_lib/hooks/use_form.test.tsx index 40fc179c73c3b..92a9876f1cd30 100644 --- a/src/plugins/es_ui_shared/static/forms/hook_form_lib/hooks/use_form.test.tsx +++ b/src/plugins/es_ui_shared/static/forms/hook_form_lib/hooks/use_form.test.tsx @@ -10,7 +10,7 @@ import React, { useEffect } from 'react'; import { act } from 'react-dom/test-utils'; import { registerTestBed, getRandomString, TestBed } from '../shared_imports'; - +import { emptyField } from '../../helpers/field_validators'; import { Form, UseField } from '../components'; import { FormSubmitHandler, @@ -18,7 +18,8 @@ import { FormHook, ValidationFunc, FieldConfig, -} from '../types'; + VALIDATION_TYPES, +} from '..'; import { useForm } from './use_form'; interface MyForm { @@ -501,4 +502,74 @@ describe('useForm() hook', () => { expect(isValid).toBeUndefined(); // Make sure it is "undefined" and not "false". }); }); + + describe('form.validate()', () => { + test('should not invalidate a field with arrayItem validation when validating a form', async () => { + const TestComp = () => { + const { form } = useForm(); + formHook = form; + + return ( +
+ + + ); + }; + + registerTestBed(TestComp)(); + + let isValid: boolean = false; + + await act(async () => { + isValid = await formHook!.validate(); + }); + + expect(isValid).toBe(true); + }); + + test('should invalidate a field with a blocking arrayItem validation when validating a form', async () => { + const TestComp = () => { + const { form } = useForm(); + formHook = form; + + return ( +
+ + + ); + }; + + registerTestBed(TestComp)(); + + let isValid: boolean = false; + + await act(async () => { + isValid = await formHook!.validate(); + }); + + expect(isValid).toBe(false); + }); + }); }); diff --git a/src/plugins/es_ui_shared/static/forms/hook_form_lib/hooks/use_form.ts b/src/plugins/es_ui_shared/static/forms/hook_form_lib/hooks/use_form.ts index fb334afb22b13..dcf2cb37d6542 100644 --- a/src/plugins/es_ui_shared/static/forms/hook_form_lib/hooks/use_form.ts +++ b/src/plugins/es_ui_shared/static/forms/hook_form_lib/hooks/use_form.ts @@ -151,14 +151,14 @@ export function useForm( }, [fieldsToArray]); const validateFields: FormHook['__validateFields'] = useCallback( - async (fieldNames) => { + async (fieldNames, onlyBlocking = false) => { const fieldsToValidate = fieldNames .map((name) => fieldsRefs.current[name]) .filter((field) => field !== undefined); const formData = getFormData$().value; const validationResult = await Promise.all( - fieldsToValidate.map((field) => field.validate({ formData })) + fieldsToValidate.map((field) => field.validate({ formData, onlyBlocking })) ); if (isMounted.current === false) { @@ -257,11 +257,6 @@ export function useForm( [getFormData$, updateFormData$, fieldsToArray] ); - const getFieldDefaultValue: FormHook['__getFieldDefaultValue'] = useCallback( - (fieldName) => get(defaultValueDeserialized.current, fieldName), - [] - ); - const readFieldConfigFromSchema: FormHook['__readFieldConfigFromSchema'] = useCallback( (fieldName) => { const config = (get(schema ?? {}, fieldName) as FieldConfig) || {}; @@ -315,7 +310,8 @@ export function useForm( if (fieldsToValidate.length === 0) { isFormValid = fieldsArray.every(isFieldValid); } else { - ({ isFormValid } = await validateFields(fieldsToValidate.map((field) => field.path))); + const fieldPathsToValidate = fieldsToValidate.map((field) => field.path); + ({ isFormValid } = await validateFields(fieldPathsToValidate, true)); } setIsValid(isFormValid); @@ -338,6 +334,11 @@ export function useForm( const getFields: FormHook['getFields'] = useCallback(() => fieldsRefs.current, []); + const getFieldDefaultValue: FormHook['getFieldDefaultValue'] = useCallback( + (fieldName) => get(defaultValueDeserialized.current, fieldName), + [] + ); + const submit: FormHook['submit'] = useCallback( async (e) => { if (e) { @@ -430,6 +431,7 @@ export function useForm( setFieldValue, setFieldErrors, getFields, + getFieldDefaultValue, getFormData, getErrors, reset, @@ -438,7 +440,6 @@ export function useForm( __updateFormDataAt: updateFormDataAt, __updateDefaultValueAt: updateDefaultValueAt, __readFieldConfigFromSchema: readFieldConfigFromSchema, - __getFieldDefaultValue: getFieldDefaultValue, __addField: addField, __removeField: removeField, __validateFields: validateFields, diff --git a/src/plugins/es_ui_shared/static/forms/hook_form_lib/types.ts b/src/plugins/es_ui_shared/static/forms/hook_form_lib/types.ts index 75c918d4340f2..4e9ff29f0cdd3 100644 --- a/src/plugins/es_ui_shared/static/forms/hook_form_lib/types.ts +++ b/src/plugins/es_ui_shared/static/forms/hook_form_lib/types.ts @@ -36,6 +36,8 @@ export interface FormHook setFieldErrors: (fieldName: string, errors: ValidationError[]) => void; /** Access the fields on the form. */ getFields: () => FieldsMap; + /** Access the defaultValue for a specific field */ + getFieldDefaultValue: (path: string) => unknown; /** * Return the form data. It accepts an optional options object with an `unflatten` parameter (defaults to `true`). * If you are only interested in the raw form data, pass `unflatten: false` to the handler @@ -53,12 +55,13 @@ export interface FormHook __addField: (field: FieldHook) => void; __removeField: (fieldNames: string | string[]) => void; __validateFields: ( - fieldNames: string[] + fieldNames: string[], + /** Run only blocking validations */ + onlyBlocking?: boolean ) => Promise<{ areFieldsValid: boolean; isFormValid: boolean | undefined }>; __updateFormDataAt: (field: string, value: unknown) => void; __updateDefaultValueAt: (field: string, value: unknown) => void; __readFieldConfigFromSchema: (field: string) => FieldConfig; - __getFieldDefaultValue: (path: string) => unknown; } export type FormSchema = { @@ -137,6 +140,7 @@ export interface FieldHook { formData?: any; value?: I; validationType?: string; + onlyBlocking?: boolean; }) => FieldValidateResponse | Promise; reset: (options?: { resetValue?: boolean; defaultValue?: T }) => unknown | undefined; // Flag to indicate if the field value will be included in the form data outputted diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/__snapshots__/indexed_fields_table.test.tsx.snap b/src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/__snapshots__/indexed_fields_table.test.tsx.snap index 32a2b936edd00..776294a93df18 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/__snapshots__/indexed_fields_table.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/__snapshots__/indexed_fields_table.test.tsx.snap @@ -1,5 +1,146 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP +exports[`IndexedFieldsTable IndexedFieldsTable with rollup index pattern should render normally 1`] = ` +
+ + +`; + exports[`IndexedFieldsTable should filter based on the query bar 1`] = `
diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/components/table/table.test.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/components/table/table.test.tsx index b9957534d8c69..163152b52e80b 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/components/table/table.test.tsx +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/components/table/table.test.tsx @@ -8,13 +8,13 @@ import React from 'react'; import { shallow } from 'enzyme'; -import { IIndexPattern } from 'src/plugins/data/public'; +import { IndexPattern } from 'src/plugins/data/public'; import { IndexedFieldItem } from '../../types'; import { Table, renderFieldName } from './table'; const indexPattern = { timeFieldName: 'timestamp', -} as IIndexPattern; +} as IndexPattern; const items: IndexedFieldItem[] = [ { diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/indexed_fields_table.test.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/indexed_fields_table.test.tsx index e587ada6695cb..c819b1d3a33fd 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/indexed_fields_table.test.tsx +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/indexed_fields_table.test.tsx @@ -8,8 +8,9 @@ import React from 'react'; import { shallow } from 'enzyme'; -import { IndexPatternField, IndexPattern } from 'src/plugins/data/public'; +import { IndexPatternField, IndexPattern, IndexPatternType } from 'src/plugins/data/public'; import { IndexedFieldsTable } from './indexed_fields_table'; +import { RollupIndexPatternListConfig } from '../../../service/list'; jest.mock('@elastic/eui', () => ({ EuiFlexGroup: 'eui-flex-group', @@ -28,7 +29,8 @@ jest.mock('./components/table', () => ({ const helpers = { editField: (fieldName: string) => {}, deleteField: (fieldName: string) => {}, - getFieldInfo: () => [], + // getFieldInfo handles non rollups as well + getFieldInfo: new RollupIndexPatternListConfig().getFieldInfo, }; const indexPattern = ({ @@ -36,6 +38,32 @@ const indexPattern = ({ getFormatterForFieldNoDefault: () => ({ params: () => ({}) }), } as unknown) as IndexPattern; +const rollupIndexPattern = ({ + type: IndexPatternType.ROLLUP, + typeMeta: { + 'rollup-index': 'rollup', + aggs: { + date_histogram: { + timestamp: { + agg: 'date_histogram', + fixed_interval: '30s', + delay: '30s', + time_zone: 'UTC', + }, + }, + terms: { Elastic: { agg: 'terms' } }, + histogram: { amount: { agg: 'histogram', interval: 5 } }, + avg: { amount: { agg: 'avg' } }, + max: { amount: { agg: 'max' } }, + min: { amount: { agg: 'min' } }, + sum: { amount: { agg: 'sum' } }, + value_count: { amount: { agg: 'value_count' } }, + }, + }, + getNonScriptedFields: () => fields, + getFormatterForFieldNoDefault: () => ({ params: () => ({}) }), +} as unknown) as IndexPattern; + const mockFieldToIndexPatternField = ( spec: Record ) => { @@ -51,6 +79,7 @@ const fields = [ }, { name: 'timestamp', displayName: 'timestamp', esTypes: ['date'] }, { name: 'conflictingField', displayName: 'conflictingField', esTypes: ['keyword', 'long'] }, + { name: 'amount', displayName: 'amount', esTypes: ['long'] }, ].map(mockFieldToIndexPatternField); describe('IndexedFieldsTable', () => { @@ -115,4 +144,26 @@ describe('IndexedFieldsTable', () => { expect(component).toMatchSnapshot(); }); + + describe('IndexedFieldsTable with rollup index pattern', () => { + test('should render normally', async () => { + const component = shallow( + { + return () => false; + }} + indexedFieldTypeFilter="" + fieldFilter="" + /> + ); + + await new Promise((resolve) => process.nextTick(resolve)); + component.update(); + + expect(component).toMatchSnapshot(); + }); + }); }); diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/indexed_fields_table.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/indexed_fields_table.tsx index ee1147997079f..4e9aeb1874c89 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/indexed_fields_table.tsx +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/indexed_fields_table.tsx @@ -8,7 +8,7 @@ import React, { Component } from 'react'; import { createSelector } from 'reselect'; -import { IndexPatternField, IndexPattern, IFieldType } from '../../../../../../plugins/data/public'; +import { IndexPatternField, IndexPattern } from '../../../../../../plugins/data/public'; import { Table } from './components/table'; import { IndexedFieldItem } from './types'; @@ -20,7 +20,7 @@ interface IndexedFieldsTableProps { helpers: { editField: (fieldName: string) => void; deleteField: (fieldName: string) => void; - getFieldInfo: (indexPattern: IndexPattern, field: IFieldType) => string[]; + getFieldInfo: (indexPattern: IndexPattern, field: IndexPatternField) => string[]; }; fieldWildcardMatcher: (filters: any[]) => (val: any) => boolean; } diff --git a/src/plugins/index_pattern_management/public/components/index_pattern_table/index_pattern_table.tsx b/src/plugins/index_pattern_management/public/components/index_pattern_table/index_pattern_table.tsx index 6bd06528084ce..6405a81282471 100644 --- a/src/plugins/index_pattern_management/public/components/index_pattern_table/index_pattern_table.tsx +++ b/src/plugins/index_pattern_management/public/components/index_pattern_table/index_pattern_table.tsx @@ -132,7 +132,7 @@ export const IndexPatternTable = ({ canSave, history }: Props) => { } ) => ( <> - + {name}   diff --git a/src/plugins/index_pattern_management/public/service/list/config.ts b/src/plugins/index_pattern_management/public/service/list/config.ts index e13f8c1c06241..4be27fc47d0db 100644 --- a/src/plugins/index_pattern_management/public/service/list/config.ts +++ b/src/plugins/index_pattern_management/public/service/list/config.ts @@ -7,8 +7,7 @@ */ import { i18n } from '@kbn/i18n'; -import { IIndexPattern, IFieldType } from 'src/plugins/data/public'; -import { SimpleSavedObject } from 'src/core/public'; +import { IndexPattern, IndexPatternField, IndexPatternType } from '../../../../data/public'; export interface IndexPatternTag { key: string; @@ -23,12 +22,9 @@ const defaultIndexPatternListName = i18n.translate( ); export class IndexPatternListConfig { - public readonly key = 'default'; + public readonly key: IndexPatternType = IndexPatternType.DEFAULT; - public getIndexPatternTags( - indexPattern: IIndexPattern | SimpleSavedObject, - isDefault: boolean - ): IndexPatternTag[] { + public getIndexPatternTags(indexPattern: IndexPattern, isDefault: boolean): IndexPatternTag[] { return isDefault ? [ { @@ -39,11 +35,11 @@ export class IndexPatternListConfig { : []; } - public getFieldInfo(indexPattern: IIndexPattern, field: IFieldType): string[] { + public getFieldInfo(indexPattern: IndexPattern, field: IndexPatternField): string[] { return []; } - public areScriptedFieldsEnabled(indexPattern: IIndexPattern): boolean { + public areScriptedFieldsEnabled(indexPattern: IndexPattern): boolean { return true; } } diff --git a/src/plugins/index_pattern_management/public/service/list/manager.ts b/src/plugins/index_pattern_management/public/service/list/manager.ts index bdb2d47057f1f..d9cefbd8001a5 100644 --- a/src/plugins/index_pattern_management/public/service/list/manager.ts +++ b/src/plugins/index_pattern_management/public/service/list/manager.ts @@ -6,13 +6,11 @@ * Side Public License, v 1. */ -import { IIndexPattern, IFieldType } from 'src/plugins/data/public'; -import { SimpleSavedObject } from 'src/core/public'; +import { IndexPattern, IndexPatternField } from 'src/plugins/data/public'; import { once } from 'lodash'; import { CoreStart } from '../../../../../core/public'; import { IndexPatternListConfig, IndexPatternTag } from './config'; import { CONFIG_ROLLUPS } from '../../constants'; -// @ts-ignore import { RollupIndexPatternListConfig } from './rollup_list_config'; interface IndexPatternListManagerStart { @@ -32,10 +30,7 @@ export class IndexPatternListManager { return configs; }); return { - getIndexPatternTags: ( - indexPattern: IIndexPattern | SimpleSavedObject, - isDefault: boolean - ) => + getIndexPatternTags: (indexPattern: IndexPattern, isDefault: boolean) => getConfigs().reduce( (tags: IndexPatternTag[], config) => config.getIndexPatternTags @@ -44,14 +39,14 @@ export class IndexPatternListManager { [] ), - getFieldInfo: (indexPattern: IIndexPattern, field: IFieldType): string[] => + getFieldInfo: (indexPattern: IndexPattern, field: IndexPatternField): string[] => getConfigs().reduce( (info: string[], config) => config.getFieldInfo ? info.concat(config.getFieldInfo(indexPattern, field)) : info, [] ), - areScriptedFieldsEnabled: (indexPattern: IIndexPattern): boolean => + areScriptedFieldsEnabled: (indexPattern: IndexPattern): boolean => getConfigs().every((config) => config.areScriptedFieldsEnabled ? config.areScriptedFieldsEnabled(indexPattern) : true ), diff --git a/src/plugins/index_pattern_management/public/service/list/rollup_list_config.js b/src/plugins/index_pattern_management/public/service/list/rollup_list_config.ts similarity index 69% rename from src/plugins/index_pattern_management/public/service/list/rollup_list_config.js rename to src/plugins/index_pattern_management/public/service/list/rollup_list_config.ts index 9a80d5fd0d622..bb9da0d461701 100644 --- a/src/plugins/index_pattern_management/public/service/list/rollup_list_config.js +++ b/src/plugins/index_pattern_management/public/service/list/rollup_list_config.ts @@ -6,18 +6,17 @@ * Side Public License, v 1. */ +import { IndexPattern, IndexPatternField, IndexPatternType } from '../../../../data/public'; import { IndexPatternListConfig } from '.'; -function isRollup(indexPattern) { - return ( - indexPattern.type === 'rollup' || (indexPattern.get && indexPattern.get('type') === 'rollup') - ); +function isRollup(indexPattern: IndexPattern) { + return indexPattern.type === IndexPatternType.ROLLUP; } export class RollupIndexPatternListConfig extends IndexPatternListConfig { - key = 'rollup'; + key = IndexPatternType.ROLLUP; - getIndexPatternTags = (indexPattern) => { + getIndexPatternTags = (indexPattern: IndexPattern) => { return isRollup(indexPattern) ? [ { @@ -28,13 +27,13 @@ export class RollupIndexPatternListConfig extends IndexPatternListConfig { : []; }; - getFieldInfo = (indexPattern, field) => { + getFieldInfo = (indexPattern: IndexPattern, field: IndexPatternField) => { if (!isRollup(indexPattern)) { return []; } const allAggs = indexPattern.typeMeta && indexPattern.typeMeta.aggs; - const fieldAggs = allAggs && Object.keys(allAggs).filter((agg) => allAggs[agg][field]); + const fieldAggs = allAggs && Object.keys(allAggs).filter((agg) => allAggs[agg][field.name]); if (!fieldAggs || !fieldAggs.length) { return []; @@ -42,13 +41,12 @@ export class RollupIndexPatternListConfig extends IndexPatternListConfig { return ['Rollup aggregations:'].concat( fieldAggs.map((aggName) => { - const agg = allAggs[aggName][field]; + const agg = allAggs![aggName][field.name]; switch (aggName) { case 'date_histogram': - return `${aggName} (interval: ${agg.interval}, ${ + return `${aggName} (interval: ${agg.fixed_interval}, ${ agg.delay ? `delay: ${agg.delay},` : '' } ${agg.time_zone})`; - break; case 'histogram': return `${aggName} (interval: ${agg.interval})`; default: @@ -58,7 +56,7 @@ export class RollupIndexPatternListConfig extends IndexPatternListConfig { ); }; - areScriptedFieldsEnabled = (indexPattern) => { + areScriptedFieldsEnabled = (indexPattern: IndexPattern) => { return !isRollup(indexPattern); }; } diff --git a/src/plugins/navigation/public/top_nav_menu/top_nav_menu_item.tsx b/src/plugins/navigation/public/top_nav_menu/top_nav_menu_item.tsx index 523bf07f828c9..f4ca53a9a974e 100644 --- a/src/plugins/navigation/public/top_nav_menu/top_nav_menu_item.tsx +++ b/src/plugins/navigation/public/top_nav_menu/top_nav_menu_item.tsx @@ -42,7 +42,7 @@ export function TopNavMenuItem(props: TopNavMenuData) { {upperFirst(props.label || props.id!)} ) : ( - + {upperFirst(props.label || props.id!)} ); diff --git a/tsconfig.json b/tsconfig.json index f6df8fcbb6406..082325306e379 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -76,7 +76,6 @@ { "path": "./x-pack/plugins/canvas/tsconfig.json" }, { "path": "./x-pack/plugins/cases/tsconfig.json" }, { "path": "./x-pack/plugins/cloud/tsconfig.json" }, - { "path": "./x-pack/plugins/console_extensions/tsconfig.json" }, { "path": "./x-pack/plugins/data_enhanced/tsconfig.json" }, { "path": "./x-pack/plugins/dashboard_mode/tsconfig.json" }, { "path": "./x-pack/plugins/discover_enhanced/tsconfig.json" }, diff --git a/tsconfig.refs.json b/tsconfig.refs.json index e08b50cc055c1..bbaf18d29ae2a 100644 --- a/tsconfig.refs.json +++ b/tsconfig.refs.json @@ -63,7 +63,6 @@ { "path": "./x-pack/plugins/canvas/tsconfig.json" }, { "path": "./x-pack/plugins/cases/tsconfig.json" }, { "path": "./x-pack/plugins/cloud/tsconfig.json" }, - { "path": "./x-pack/plugins/console_extensions/tsconfig.json" }, { "path": "./x-pack/plugins/dashboard_enhanced/tsconfig.json" }, { "path": "./x-pack/plugins/data_enhanced/tsconfig.json" }, { "path": "./x-pack/plugins/dashboard_mode/tsconfig.json" }, diff --git a/x-pack/plugins/apm/public/components/app/RumDashboard/ActionMenu/index.tsx b/x-pack/plugins/apm/public/components/app/RumDashboard/ActionMenu/index.tsx index 63ba7047696ca..4e6544a20f301 100644 --- a/x-pack/plugins/apm/public/components/app/RumDashboard/ActionMenu/index.tsx +++ b/x-pack/plugins/apm/public/components/app/RumDashboard/ActionMenu/index.tsx @@ -6,12 +6,7 @@ */ import React from 'react'; -import { - EuiButtonEmpty, - EuiFlexGroup, - EuiFlexItem, - EuiToolTip, -} from '@elastic/eui'; +import { EuiHeaderLinks, EuiHeaderLink, EuiToolTip } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { createExploratoryViewUrl, @@ -62,38 +57,29 @@ export function UXActionMenu({ - - - {ANALYZE_MESSAGE}

}> - - {ANALYZE_DATA} - -
-
- - + {ANALYZE_MESSAGE}

}> + - {i18n.translate('xpack.apm.addDataButtonLabel', { - defaultMessage: 'Add data', - })} -
-
-
+ {ANALYZE_DATA} +
+ + + {i18n.translate('xpack.apm.addDataButtonLabel', { + defaultMessage: 'Add data', + })} + + ); } diff --git a/x-pack/plugins/apm/public/components/app/Settings/agent_configurations/index.tsx b/x-pack/plugins/apm/public/components/app/Settings/agent_configurations/index.tsx index 1ca7f46a0b26f..32c93e43175df 100644 --- a/x-pack/plugins/apm/public/components/app/Settings/agent_configurations/index.tsx +++ b/x-pack/plugins/apm/public/components/app/Settings/agent_configurations/index.tsx @@ -18,7 +18,6 @@ import { i18n } from '@kbn/i18n'; import { isEmpty } from 'lodash'; import React from 'react'; import { useLocation } from 'react-router-dom'; -import { useTrackPageview } from '../../../../../../observability/public'; import { useApmPluginContext } from '../../../../context/apm_plugin/use_apm_plugin_context'; import { useFetcher } from '../../../../hooks/use_fetcher'; import { createAgentConfigurationHref } from '../../../shared/Links/apm/agentConfigurationLinks'; @@ -34,9 +33,6 @@ export function AgentConfigurations() { { preservePreviousData: false, showToastOnError: false } ); - useTrackPageview({ app: 'apm', path: 'agent_configuration' }); - useTrackPageview({ app: 'apm', path: 'agent_configuration', delay: 15000 }); - const hasConfigurations = !isEmpty(data.configurations); return ( diff --git a/x-pack/plugins/apm/public/components/app/Settings/schema/confirm_switch_modal.tsx b/x-pack/plugins/apm/public/components/app/Settings/schema/confirm_switch_modal.tsx index 04817aaf84f3e..5bb93c251777f 100644 --- a/x-pack/plugins/apm/public/components/app/Settings/schema/confirm_switch_modal.tsx +++ b/x-pack/plugins/apm/public/components/app/Settings/schema/confirm_switch_modal.tsx @@ -15,6 +15,7 @@ import { htmlIdGenerator, } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; +import { useUiTracker } from '../../../../../../observability/public'; import { ElasticDocsLink } from '../../../shared/Links/ElasticDocsLink'; interface Props { @@ -27,6 +28,7 @@ export function ConfirmSwitchModal({ onCancel, unsupportedConfigs, }: Props) { + const trackApmEvent = useUiTracker({ app: 'apm' }); const [isConfirmChecked, setIsConfirmChecked] = useState(false); const hasUnsupportedConfigs = !!unsupportedConfigs.length; return ( @@ -48,7 +50,12 @@ export function ConfirmSwitchModal({ } )} defaultFocusedButton="confirm" - onConfirm={onConfirm} + onConfirm={() => { + trackApmEvent({ + metric: 'confirm_data_stream_switch', + }); + onConfirm(); + }} confirmButtonDisabled={!isConfirmChecked} >

diff --git a/x-pack/plugins/apm/public/components/app/correlations/index.tsx b/x-pack/plugins/apm/public/components/app/correlations/index.tsx index 2b32ece14e5cd..9ad5088bb0bcf 100644 --- a/x-pack/plugins/apm/public/components/app/correlations/index.tsx +++ b/x-pack/plugins/apm/public/components/app/correlations/index.tsx @@ -104,16 +104,7 @@ export function Correlations() { width: '20%', }); } - if (urlParams.transactionName) { - properties.push({ - label: i18n.translate('xpack.apm.correlations.transactionLabel', { - defaultMessage: 'Transaction', - }), - fieldName: TRANSACTION_NAME, - val: urlParams.transactionName, - width: '20%', - }); - } + if (urlParams.environment) { properties.push({ label: i18n.translate('xpack.apm.correlations.environmentLabel', { @@ -125,6 +116,17 @@ export function Correlations() { }); } + if (urlParams.transactionName) { + properties.push({ + label: i18n.translate('xpack.apm.correlations.transactionLabel', { + defaultMessage: 'Transaction', + }), + fieldName: TRANSACTION_NAME, + val: urlParams.transactionName, + width: '20%', + }); + } + return properties; }, [serviceName, urlParams.environment, urlParams.transactionName]); diff --git a/x-pack/plugins/apm/public/components/app/correlations/ml_latency_correlations.tsx b/x-pack/plugins/apm/public/components/app/correlations/ml_latency_correlations.tsx index f9536353747ee..4bd20f51977c6 100644 --- a/x-pack/plugins/apm/public/components/app/correlations/ml_latency_correlations.tsx +++ b/x-pack/plugins/apm/public/components/app/correlations/ml_latency_correlations.tsx @@ -36,6 +36,7 @@ import { useCorrelations } from './use_correlations'; import { push } from '../../shared/Links/url_helpers'; import { useUiTracker } from '../../../../../observability/public'; import { asPreciseDecimal } from '../../../../common/utils/formatters'; +import { LatencyCorrelationsHelpPopover } from './ml_latency_correlations_help_popover'; const DEFAULT_PERCENTILE_THRESHOLD = 95; const isErrorMessage = (arg: unknown): arg is Error => { @@ -151,7 +152,7 @@ export function MlLatencyCorrelations({ onClose }: Props) { 'xpack.apm.correlations.latencyCorrelations.correlationsTable.correlationColumnDescription', { defaultMessage: - 'The impact of a field on the latency of the service, ranging from 0 to 1.', + 'The correlation score [0-1] of an attribute; the greater the score, the more an attribute increases latency.', } )} > @@ -263,20 +264,6 @@ export function MlLatencyCorrelations({ onClose }: Props) { return ( <> - -

- {i18n.translate( - 'xpack.apm.correlations.latencyCorrelations.description', - { - defaultMessage: - 'What is slowing down my service? Correlations will help discover a slower performance in a particular cohort of your data.', - } - )} -

- - - - {!isRunning && ( @@ -320,6 +307,9 @@ export function MlLatencyCorrelations({ onClose }: Props) { + + + diff --git a/x-pack/plugins/apm/public/components/app/correlations/ml_latency_correlations_help_popover.tsx b/x-pack/plugins/apm/public/components/app/correlations/ml_latency_correlations_help_popover.tsx new file mode 100644 index 0000000000000..1f9a41c1139cd --- /dev/null +++ b/x-pack/plugins/apm/public/components/app/correlations/ml_latency_correlations_help_popover.tsx @@ -0,0 +1,64 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React, { useState } from 'react'; +import { i18n } from '@kbn/i18n'; +import { FormattedMessage } from '@kbn/i18n/react'; +import { HelpPopover, HelpPopoverButton } from '../help_popover/help_popover'; + +export function LatencyCorrelationsHelpPopover() { + const [isPopoverOpen, setIsPopoverOpen] = useState(false); + + return ( + { + setIsPopoverOpen(!isPopoverOpen); + }} + /> + } + closePopover={() => setIsPopoverOpen(false)} + isOpen={isPopoverOpen} + title={i18n.translate('xpack.apm.correlations.latencyPopoverTitle', { + defaultMessage: 'Latency correlations', + })} + > +

+ +

+

+ +

+

+ +

+

+ +

+

+ +

+
+ ); +} diff --git a/x-pack/plugins/apm/public/components/app/error_group_details/index.tsx b/x-pack/plugins/apm/public/components/app/error_group_details/index.tsx index 344393d42506f..225186cab12c8 100644 --- a/x-pack/plugins/apm/public/components/app/error_group_details/index.tsx +++ b/x-pack/plugins/apm/public/components/app/error_group_details/index.tsx @@ -17,7 +17,6 @@ import { import { i18n } from '@kbn/i18n'; import React from 'react'; import { euiStyled } from '../../../../../../../src/plugins/kibana_react/common'; -import { useTrackPageview } from '../../../../../observability/public'; import { NOT_AVAILABLE_LABEL } from '../../../../common/i18n'; import { useUrlParams } from '../../../context/url_params_context/use_url_params'; import { useErrorGroupDistributionFetcher } from '../../../hooks/use_error_group_distribution_fetcher'; @@ -128,9 +127,6 @@ export function ErrorGroupDetails({ groupId, }); - useTrackPageview({ app: 'apm', path: 'error_group_details' }); - useTrackPageview({ app: 'apm', path: 'error_group_details', delay: 15000 }); - if (!errorGroupData || !errorDistributionData) { return ; } diff --git a/x-pack/plugins/apm/public/components/app/error_group_overview/index.tsx b/x-pack/plugins/apm/public/components/app/error_group_overview/index.tsx index 4c622758e6c8b..8d8d0cb9c107c 100644 --- a/x-pack/plugins/apm/public/components/app/error_group_overview/index.tsx +++ b/x-pack/plugins/apm/public/components/app/error_group_overview/index.tsx @@ -14,7 +14,6 @@ import { } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; -import { useTrackPageview } from '../../../../../observability/public'; import { useUrlParams } from '../../../context/url_params_context/use_url_params'; import { useErrorGroupDistributionFetcher } from '../../../hooks/use_error_group_distribution_fetcher'; import { useFetcher } from '../../../hooks/use_fetcher'; @@ -60,12 +59,6 @@ export function ErrorGroupOverview({ serviceName }: ErrorGroupOverviewProps) { [environment, kuery, serviceName, start, end, sortField, sortDirection] ); - useTrackPageview({ - app: 'apm', - path: 'error_group_overview', - }); - useTrackPageview({ app: 'apm', path: 'error_group_overview', delay: 15000 }); - if (!errorDistributionData || !errorGroupListData) { return null; } diff --git a/x-pack/plugins/apm/public/components/app/help_popover/help_popover.tsx b/x-pack/plugins/apm/public/components/app/help_popover/help_popover.tsx new file mode 100644 index 0000000000000..def310f1d8140 --- /dev/null +++ b/x-pack/plugins/apm/public/components/app/help_popover/help_popover.tsx @@ -0,0 +1,72 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React, { ReactNode } from 'react'; +import { i18n } from '@kbn/i18n'; +import { + EuiButtonIcon, + EuiLinkButtonProps, + EuiPopover, + EuiPopoverProps, + EuiPopoverTitle, + EuiText, +} from '@elastic/eui'; +import { euiStyled } from '../../../../../../../src/plugins/kibana_react/common'; + +const PopoverContent = euiStyled(EuiText)` + max-width: 480px; + max-height: 40vh; +`; + +export function HelpPopoverButton({ + onClick, +}: { + onClick: EuiLinkButtonProps['onClick']; +}) { + return ( + + ); +} + +export function HelpPopover({ + anchorPosition, + button, + children, + closePopover, + isOpen, + title, +}: { + anchorPosition?: EuiPopoverProps['anchorPosition']; + button: EuiPopoverProps['button']; + children: ReactNode; + closePopover: EuiPopoverProps['closePopover']; + isOpen: EuiPopoverProps['isOpen']; + title?: string; +}) { + return ( + + {title && {title}} + + {children} + + ); +} diff --git a/x-pack/plugins/console_extensions/server/config.ts b/x-pack/plugins/apm/public/components/app/help_popover/index.tsx similarity index 56% rename from x-pack/plugins/console_extensions/server/config.ts rename to x-pack/plugins/apm/public/components/app/help_popover/index.tsx index 15b06bf93ffbe..b1d53722c7bb5 100644 --- a/x-pack/plugins/console_extensions/server/config.ts +++ b/x-pack/plugins/apm/public/components/app/help_popover/index.tsx @@ -5,10 +5,4 @@ * 2.0. */ -import { schema, TypeOf } from '@kbn/config-schema'; - -export type ConfigType = TypeOf; - -export const config = schema.object({ - enabled: schema.boolean({ defaultValue: true }), -}); +export { HelpPopoverButton, HelpPopover } from './help_popover'; diff --git a/x-pack/plugins/apm/public/components/app/service_inventory/index.tsx b/x-pack/plugins/apm/public/components/app/service_inventory/index.tsx index cac94885511c1..ef0a5f2df0434 100644 --- a/x-pack/plugins/apm/public/components/app/service_inventory/index.tsx +++ b/x-pack/plugins/apm/public/components/app/service_inventory/index.tsx @@ -9,7 +9,6 @@ import { EuiFlexGroup, EuiFlexItem, EuiLink } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React, { useEffect } from 'react'; import { toMountPoint } from '../../../../../../../src/plugins/kibana_react/public'; -import { useTrackPageview } from '../../../../../observability/public'; import { useAnomalyDetectionJobsContext } from '../../../context/anomaly_detection_jobs/use_anomaly_detection_jobs_context'; import { useApmPluginContext } from '../../../context/apm_plugin/use_apm_plugin_context'; import { useUrlParams } from '../../../context/url_params_context/use_url_params'; @@ -92,13 +91,6 @@ export function ServiceInventory() { const { core } = useApmPluginContext(); const { servicesData, servicesStatus } = useServicesFetcher(); - // The page is called "service inventory" to avoid confusion with the - // "service overview", but this is tracked in some dashboards because it's the - // initial landing page for APM, so it stays as "services_overview" (plural.) - // for backward compatibility. - useTrackPageview({ app: 'apm', path: 'services_overview' }); - useTrackPageview({ app: 'apm', path: 'services_overview', delay: 15000 }); - const { anomalyDetectionJobsData, anomalyDetectionJobsStatus, diff --git a/x-pack/plugins/apm/public/components/app/service_map/index.tsx b/x-pack/plugins/apm/public/components/app/service_map/index.tsx index 582eafe7553af..22adb10512d7a 100644 --- a/x-pack/plugins/apm/public/components/app/service_map/index.tsx +++ b/x-pack/plugins/apm/public/components/app/service_map/index.tsx @@ -13,7 +13,6 @@ import { } from '@elastic/eui'; import React, { PropsWithChildren, ReactNode } from 'react'; import { isActivePlatinumLicense } from '../../../../common/license_check'; -import { useTrackPageview } from '../../../../../observability/public'; import { invalidLicenseMessage, SERVICE_MAP_TIMEOUT_ERROR, @@ -106,9 +105,6 @@ export function ServiceMap({ const PADDING_BOTTOM = 24; const heightWithPadding = height - PADDING_BOTTOM; - useTrackPageview({ app: 'apm', path: 'service_map' }); - useTrackPageview({ app: 'apm', path: 'service_map', delay: 15000 }); - if (!license) { return null; } diff --git a/x-pack/plugins/apm/public/components/app/service_overview/index.tsx b/x-pack/plugins/apm/public/components/app/service_overview/index.tsx index fce543b05c6c3..374b2d59ea347 100644 --- a/x-pack/plugins/apm/public/components/app/service_overview/index.tsx +++ b/x-pack/plugins/apm/public/components/app/service_overview/index.tsx @@ -7,7 +7,6 @@ import { EuiFlexGroup, EuiFlexItem, EuiPanel } from '@elastic/eui'; import React from 'react'; -import { useTrackPageview } from '../../../../../observability/public'; import { isRumAgentName, isIosAgentName } from '../../../../common/agent_name'; import { AnnotationsContextProvider } from '../../../context/annotations/annotations_context'; import { useApmServiceContext } from '../../../context/apm_service/use_apm_service_context'; @@ -35,9 +34,6 @@ interface ServiceOverviewProps { export function ServiceOverview({ serviceName }: ServiceOverviewProps) { const { agentName } = useApmServiceContext(); - useTrackPageview({ app: 'apm', path: 'service_overview' }); - useTrackPageview({ app: 'apm', path: 'service_overview', delay: 15000 }); - // The default EuiFlexGroup breaks at 768, but we want to break at 992, so we // observe the window width and set the flex directions of rows accordingly const { isMedium } = useBreakPoints(); diff --git a/x-pack/plugins/apm/public/components/app/trace_overview/index.tsx b/x-pack/plugins/apm/public/components/app/trace_overview/index.tsx index d280b36a603ba..ccb5fea72432c 100644 --- a/x-pack/plugins/apm/public/components/app/trace_overview/index.tsx +++ b/x-pack/plugins/apm/public/components/app/trace_overview/index.tsx @@ -6,7 +6,6 @@ */ import React from 'react'; -import { useTrackPageview } from '../../../../../observability/public'; import { useUrlParams } from '../../../context/url_params_context/use_url_params'; import { FETCH_STATUS, useFetcher } from '../../../hooks/use_fetcher'; import { APIReturnType } from '../../../services/rest/createCallApmApi'; @@ -43,9 +42,6 @@ export function TraceOverview() { [environment, kuery, start, end] ); - useTrackPageview({ app: 'apm', path: 'traces_overview' }); - useTrackPageview({ app: 'apm', path: 'traces_overview', delay: 15000 }); - return ( <> diff --git a/x-pack/plugins/apm/public/components/app/transaction_details/index.tsx b/x-pack/plugins/apm/public/components/app/transaction_details/index.tsx index 1e13e224a511a..40f50e768e76e 100644 --- a/x-pack/plugins/apm/public/components/app/transaction_details/index.tsx +++ b/x-pack/plugins/apm/public/components/app/transaction_details/index.tsx @@ -9,7 +9,6 @@ import { EuiHorizontalRule, EuiPanel, EuiSpacer, EuiTitle } from '@elastic/eui'; import { flatten, isEmpty } from 'lodash'; import React from 'react'; import { useHistory } from 'react-router-dom'; -import { useTrackPageview } from '../../../../../observability/public'; import { ChartPointerEventContextProvider } from '../../../context/chart_pointer_event/chart_pointer_event_context'; import { useUrlParams } from '../../../context/url_params_context/use_url_params'; import { FETCH_STATUS } from '../../../hooks/use_fetcher'; @@ -41,9 +40,6 @@ export function TransactionDetails() { } = useWaterfallFetcher(); const { transactionName } = urlParams; - useTrackPageview({ app: 'apm', path: 'transaction_details' }); - useTrackPageview({ app: 'apm', path: 'transaction_details', delay: 15000 }); - const selectedSample = flatten( distributionData.buckets.map((bucket) => bucket.samples) ).find( diff --git a/x-pack/plugins/apm/public/components/app/transaction_overview/index.tsx b/x-pack/plugins/apm/public/components/app/transaction_overview/index.tsx index 041c12822357c..2435e5fc5a1f6 100644 --- a/x-pack/plugins/apm/public/components/app/transaction_overview/index.tsx +++ b/x-pack/plugins/apm/public/components/app/transaction_overview/index.tsx @@ -17,7 +17,6 @@ import { FormattedMessage } from '@kbn/i18n/react'; import { Location } from 'history'; import React from 'react'; import { useLocation } from 'react-router-dom'; -import { useTrackPageview } from '../../../../../observability/public'; import { useApmServiceContext } from '../../../context/apm_service/use_apm_service_context'; import { IUrlParams } from '../../../context/url_params_context/types'; import { useUrlParams } from '../../../context/url_params_context/use_url_params'; @@ -62,8 +61,6 @@ export function TransactionOverview({ serviceName }: TransactionOverviewProps) { // redirect to first transaction type useRedirect(getRedirectLocation({ location, transactionType, urlParams })); - useTrackPageview({ app: 'apm', path: 'transaction_overview' }); - useTrackPageview({ app: 'apm', path: 'transaction_overview', delay: 15000 }); const { transactionListData, transactionListStatus, diff --git a/x-pack/plugins/apm/public/components/routing/app_root.tsx b/x-pack/plugins/apm/public/components/routing/app_root.tsx index 8fc59a01eeca0..a924c1f31cbef 100644 --- a/x-pack/plugins/apm/public/components/routing/app_root.tsx +++ b/x-pack/plugins/apm/public/components/routing/app_root.tsx @@ -9,7 +9,7 @@ import { ApmRoute } from '@elastic/apm-rum-react'; import euiDarkVars from '@elastic/eui/dist/eui_theme_dark.json'; import euiLightVars from '@elastic/eui/dist/eui_theme_light.json'; import React from 'react'; -import { Route, Router, Switch } from 'react-router-dom'; +import { Route, RouteComponentProps, Router, Switch } from 'react-router-dom'; import { DefaultTheme, ThemeProvider } from 'styled-components'; import { APP_WRAPPER_CLASS } from '../../../../../../src/core/public'; import { @@ -17,20 +17,21 @@ import { RedirectAppLinks, useUiSetting$, } from '../../../../../../src/plugins/kibana_react/public'; +import { HeaderMenuPortal } from '../../../../observability/public'; import { ScrollToTopOnPathChange } from '../../components/app/Main/ScrollToTopOnPathChange'; +import { AnomalyDetectionJobsContextProvider } from '../../context/anomaly_detection_jobs/anomaly_detection_jobs_context'; import { ApmPluginContext, ApmPluginContextValue, } from '../../context/apm_plugin/apm_plugin_context'; +import { useApmPluginContext } from '../../context/apm_plugin/use_apm_plugin_context'; import { LicenseProvider } from '../../context/license/license_context'; import { UrlParamsProvider } from '../../context/url_params_context/url_params_context'; import { useApmBreadcrumbs } from '../../hooks/use_apm_breadcrumbs'; import { ApmPluginStartDeps } from '../../plugin'; -import { HeaderMenuPortal } from '../../../../observability/public'; import { ApmHeaderActionMenu } from '../shared/apm_header_action_menu'; -import { useApmPluginContext } from '../../context/apm_plugin/use_apm_plugin_context'; -import { AnomalyDetectionJobsContextProvider } from '../../context/anomaly_detection_jobs/anomaly_detection_jobs_context'; import { apmRouteConfig } from './apm_route_config'; +import { TelemetryWrapper } from './telemetry_wrapper'; export function ApmAppRoot({ apmPluginContextValue, @@ -62,9 +63,18 @@ export function ApmAppRoot({ - {apmRouteConfig.map((route, i) => ( - - ))} + {apmRouteConfig.map((route, i) => { + const { component, render, ...rest } = route; + return ( + { + return TelemetryWrapper({ route, props }); + }} + /> + ); + })} diff --git a/x-pack/plugins/apm/public/components/routing/telemetry_wrapper.tsx b/x-pack/plugins/apm/public/components/routing/telemetry_wrapper.tsx new file mode 100644 index 0000000000000..fc3fc6a338d18 --- /dev/null +++ b/x-pack/plugins/apm/public/components/routing/telemetry_wrapper.tsx @@ -0,0 +1,33 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import React from 'react'; +import { RouteComponentProps } from 'react-router-dom'; +import { useTrackPageview } from '../../../../observability/public'; +import { APMRouteDefinition } from '../../application/routes'; +import { redirectTo } from './redirect_to'; + +export function TelemetryWrapper({ + route, + props, +}: { + route: APMRouteDefinition; + props: RouteComponentProps; +}) { + const { component, render, path } = route; + const pathAsString = path as string; + + useTrackPageview({ app: 'apm', path: pathAsString }); + useTrackPageview({ app: 'apm', path: pathAsString, delay: 15000 }); + + if (component) { + return React.createElement(component, props); + } + if (render) { + return <>{render(props)}; + } + return <>{redirectTo('/')}; +} diff --git a/x-pack/plugins/apm/public/components/shared/apm_header_action_menu/alerting_popover_flyout.tsx b/x-pack/plugins/apm/public/components/shared/apm_header_action_menu/alerting_popover_flyout.tsx index ca73f6ddd05b3..4abd36a277311 100644 --- a/x-pack/plugins/apm/public/components/shared/apm_header_action_menu/alerting_popover_flyout.tsx +++ b/x-pack/plugins/apm/public/components/shared/apm_header_action_menu/alerting_popover_flyout.tsx @@ -66,7 +66,6 @@ export function AlertingPopoverAndFlyout({ const button = ( - + {i18n.translate('xpack.apm.settingsLinkLabel', { defaultMessage: 'Settings', })} diff --git a/x-pack/plugins/apm/server/lib/alerts/test_utils/index.ts b/x-pack/plugins/apm/server/lib/alerts/test_utils/index.ts index 1366503ea1428..679f33707b5b5 100644 --- a/x-pack/plugins/apm/server/lib/alerts/test_utils/index.ts +++ b/x-pack/plugins/apm/server/lib/alerts/test_utils/index.ts @@ -70,8 +70,14 @@ export const createRuleTypeMocks = () => { executor: async ({ params }: { params: Record }) => { return alertExecutor({ services, - rule: { consumer: APM_SERVER_FEATURE_ID }, params, + rule: { + consumer: APM_SERVER_FEATURE_ID, + name: 'name', + producer: 'producer', + ruleTypeId: 'ruleTypeId', + ruleTypeName: 'ruleTypeName', + }, startedAt: new Date(), }); }, diff --git a/x-pack/plugins/apm/server/lib/fleet/sync_agent_configs_to_apm_package_policies.ts b/x-pack/plugins/apm/server/lib/fleet/sync_agent_configs_to_apm_package_policies.ts index 4294c5b82cd63..1365ddc28ddb2 100644 --- a/x-pack/plugins/apm/server/lib/fleet/sync_agent_configs_to_apm_package_policies.ts +++ b/x-pack/plugins/apm/server/lib/fleet/sync_agent_configs_to_apm_package_policies.ts @@ -10,6 +10,7 @@ import { CoreStart, SavedObjectsClientContract, } from 'kibana/server'; +import { TelemetryUsageCounter } from '../../routes/typings'; import { APMPluginStartDependencies } from '../../types'; import { getInternalSavedObjectsClient } from '../helpers/get_internal_saved_objects_client'; import { Setup } from '../helpers/setup_request'; @@ -21,11 +22,19 @@ export async function syncAgentConfigsToApmPackagePolicies({ core, fleetPluginStart, setup, + telemetryUsageCounter, }: { core: { setup: CoreSetup; start: () => Promise }; fleetPluginStart: NonNullable; setup: Setup; + telemetryUsageCounter?: TelemetryUsageCounter; }) { + if (telemetryUsageCounter) { + telemetryUsageCounter.incrementCounter({ + counterName: 'sync_agent_config_to_apm_package_policies', + counterType: 'success', + }); + } const coreStart = await core.start(); const esClient = coreStart.elasticsearch.client.asInternalUser; const [ diff --git a/x-pack/plugins/apm/server/routes/register_routes/index.ts b/x-pack/plugins/apm/server/routes/register_routes/index.ts index 8e6070de722be..16e77f59f4d02 100644 --- a/x-pack/plugins/apm/server/routes/register_routes/index.ts +++ b/x-pack/plugins/apm/server/routes/register_routes/index.ts @@ -18,9 +18,12 @@ import { routeValidationObject, } from '@kbn/server-route-repository'; import { mergeRt, jsonRt } from '@kbn/io-ts-utils'; -import { UsageCollectionSetup } from '../../../../../../src/plugins/usage_collection/server'; import { pickKeys } from '../../../common/utils/pick_keys'; -import { APMRouteHandlerResources, InspectResponse } from '../typings'; +import { + APMRouteHandlerResources, + InspectResponse, + TelemetryUsageCounter, +} from '../typings'; import type { ApmPluginRequestHandlerContext } from '../typings'; const inspectRt = t.exact( @@ -56,9 +59,7 @@ export function registerRoutes({ repository: ServerRouteRepository; config: APMRouteHandlerResources['config']; ruleDataClient: APMRouteHandlerResources['ruleDataClient']; - telemetryUsageCounter?: ReturnType< - UsageCollectionSetup['createUsageCounter'] - >; + telemetryUsageCounter?: TelemetryUsageCounter; }) { const routes = repository.getRoutes(); @@ -104,6 +105,7 @@ export function registerRoutes({ logger, core, plugins, + telemetryUsageCounter, params: merge( { query: { diff --git a/x-pack/plugins/apm/server/routes/settings/agent_configuration.ts b/x-pack/plugins/apm/server/routes/settings/agent_configuration.ts index 05eec47893793..f50770cb5ded7 100644 --- a/x-pack/plugins/apm/server/routes/settings/agent_configuration.ts +++ b/x-pack/plugins/apm/server/routes/settings/agent_configuration.ts @@ -79,7 +79,7 @@ const deleteAgentConfigurationRoute = createApmServerRoute({ }), handler: async (resources) => { const setup = await setupRequest(resources); - const { params, logger, core } = resources; + const { params, logger, core, telemetryUsageCounter } = resources; const { service } = params.body; @@ -106,6 +106,7 @@ const deleteAgentConfigurationRoute = createApmServerRoute({ core, fleetPluginStart: await resources.plugins.fleet.start(), setup, + telemetryUsageCounter, }); logger.info( `Updated Fleet integration policy for APM to remove the deleted agent configuration.` @@ -128,7 +129,7 @@ const createOrUpdateAgentConfigurationRoute = createApmServerRoute({ ]), handler: async (resources) => { const setup = await setupRequest(resources); - const { params, logger, core } = resources; + const { params, logger, core, telemetryUsageCounter } = resources; const { body, query } = params; // if the config already exists, it is fetched and updated @@ -162,6 +163,7 @@ const createOrUpdateAgentConfigurationRoute = createApmServerRoute({ core, fleetPluginStart: await resources.plugins.fleet.start(), setup, + telemetryUsageCounter, }); logger.info( `Saved latest agent settings to Fleet integration policy for APM.` diff --git a/x-pack/plugins/apm/server/routes/typings.ts b/x-pack/plugins/apm/server/routes/typings.ts index 56a5950c27367..4279cfd84328c 100644 --- a/x-pack/plugins/apm/server/routes/typings.ts +++ b/x-pack/plugins/apm/server/routes/typings.ts @@ -18,6 +18,7 @@ import type { RacApiRequestHandlerContext } from '../../../rule_registry/server' import { LicensingApiRequestHandlerContext } from '../../../licensing/server'; import { APMConfig } from '..'; import { APMPluginDependencies } from '../types'; +import { UsageCollectionSetup } from '../../../../../src/plugins/usage_collection/server'; export interface ApmPluginRequestHandlerContext extends RequestHandlerContext { licensing: LicensingApiRequestHandlerContext; @@ -47,6 +48,10 @@ export interface APMRouteCreateOptions { }; } +export type TelemetryUsageCounter = ReturnType< + UsageCollectionSetup['createUsageCounter'] +>; + export interface APMRouteHandlerResources { request: KibanaRequest; context: ApmPluginRequestHandlerContext; @@ -68,4 +73,5 @@ export interface APMRouteHandlerResources { }; }; ruleDataClient: RuleDataClient; + telemetryUsageCounter?: TelemetryUsageCounter; } diff --git a/x-pack/plugins/canvas/public/components/function_reference_generator/function_reference_generator.tsx b/x-pack/plugins/canvas/public/components/function_reference_generator/function_reference_generator.tsx index 81532816d9c83..eb394801f549c 100644 --- a/x-pack/plugins/canvas/public/components/function_reference_generator/function_reference_generator.tsx +++ b/x-pack/plugins/canvas/public/components/function_reference_generator/function_reference_generator.tsx @@ -29,7 +29,7 @@ export const FunctionReferenceGenerator: FC = ({ functionRegistry }) => { }; return ( - + Generate function reference ); diff --git a/x-pack/plugins/canvas/public/components/help_menu/help_menu.tsx b/x-pack/plugins/canvas/public/components/help_menu/help_menu.tsx index 2877ccf41056d..af1850beb5290 100644 --- a/x-pack/plugins/canvas/public/components/help_menu/help_menu.tsx +++ b/x-pack/plugins/canvas/public/components/help_menu/help_menu.tsx @@ -46,13 +46,13 @@ export const HelpMenu: FC = ({ functionRegistry }) => { return ( <> - + {strings.getKeyboardShortcutsLinkLabel()} {FunctionReferenceGenerator ? ( - + ) : null} diff --git a/x-pack/plugins/canvas/public/components/workpad_header/edit_menu/__stories__/__snapshots__/edit_menu.stories.storyshot b/x-pack/plugins/canvas/public/components/workpad_header/edit_menu/__stories__/__snapshots__/edit_menu.stories.storyshot index cc33ae3526c0c..f2bc9c57cbcc6 100644 --- a/x-pack/plugins/canvas/public/components/workpad_header/edit_menu/__stories__/__snapshots__/edit_menu.stories.storyshot +++ b/x-pack/plugins/canvas/public/components/workpad_header/edit_menu/__stories__/__snapshots__/edit_menu.stories.storyshot @@ -9,7 +9,7 @@ exports[`Storyshots components/WorkpadHeader/EditMenu 2 elements selected 1`] = >