diff --git a/.ci/Jenkinsfile_visual_baseline b/.ci/Jenkinsfile_visual_baseline index 2a16c499fa168..7c7cc8d98c306 100644 --- a/.ci/Jenkinsfile_visual_baseline +++ b/.ci/Jenkinsfile_visual_baseline @@ -21,5 +21,6 @@ kibanaPipeline(timeoutMinutes: 120) { } kibanaPipeline.sendMail() + slackNotifications.onFailure() } } diff --git a/.eslintrc.js b/.eslintrc.js index 8d979dc0f8645..4425ad3a12659 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -906,6 +906,18 @@ module.exports = { }, }, + /** + * Enterprise Search overrides + */ + { + files: ['x-pack/plugins/enterprise_search/**/*.{ts,tsx}'], + excludedFiles: ['x-pack/plugins/enterprise_search/**/*.{test,mock}.{ts,tsx}'], + rules: { + 'react-hooks/exhaustive-deps': 'off', + '@typescript-eslint/no-explicit-any': 'error', + }, + }, + /** * disable jsx-a11y for kbn-ui-framework */ diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 4aab9943022d4..f053c6da9c29b 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -201,6 +201,11 @@ x-pack/plugins/telemetry_collection_xpack/schema/xpack_plugins.json @elastic/kib # Design **/*.scss @elastic/kibana-design +# Enterprise Search +/x-pack/plugins/enterprise_search/ @elastic/app-search-frontend @elastic/workplace-search-frontend +/x-pack/test/functional_enterprise_search/ @elastic/app-search-frontend @elastic/workplace-search-frontend +/x-pack/plugins/enterprise_search/**/*.scss @elastic/ent-search-design + # Elasticsearch UI /src/plugins/dev_tools/ @elastic/es-ui /src/plugins/console/ @elastic/es-ui diff --git a/docs/images/canvas-add-image.gif b/docs/canvas/images/canvas-add-image.gif similarity index 100% rename from docs/images/canvas-add-image.gif rename to docs/canvas/images/canvas-add-image.gif diff --git a/docs/images/canvas-add-pages.gif b/docs/canvas/images/canvas-add-pages.gif similarity index 100% rename from docs/images/canvas-add-pages.gif rename to docs/canvas/images/canvas-add-pages.gif diff --git a/docs/images/canvas-autoplay-interval.png b/docs/canvas/images/canvas-autoplay-interval.png similarity index 100% rename from docs/images/canvas-autoplay-interval.png rename to docs/canvas/images/canvas-autoplay-interval.png diff --git a/docs/images/canvas-background-color-picker.png b/docs/canvas/images/canvas-background-color-picker.png similarity index 100% rename from docs/images/canvas-background-color-picker.png rename to docs/canvas/images/canvas-background-color-picker.png diff --git a/docs/images/canvas-change-your-expression-chart-no-legend.png b/docs/canvas/images/canvas-change-your-expression-chart-no-legend.png similarity index 100% rename from docs/images/canvas-change-your-expression-chart-no-legend.png rename to docs/canvas/images/canvas-change-your-expression-chart-no-legend.png diff --git a/docs/images/canvas-change-your-expression-chart.png b/docs/canvas/images/canvas-change-your-expression-chart.png similarity index 100% rename from docs/images/canvas-change-your-expression-chart.png rename to docs/canvas/images/canvas-change-your-expression-chart.png diff --git a/docs/images/canvas-chart-element.png b/docs/canvas/images/canvas-chart-element.png similarity index 100% rename from docs/images/canvas-chart-element.png rename to docs/canvas/images/canvas-chart-element.png diff --git a/docs/images/canvas-create-URL.gif b/docs/canvas/images/canvas-create-URL.gif similarity index 100% rename from docs/images/canvas-create-URL.gif rename to docs/canvas/images/canvas-create-URL.gif diff --git a/docs/images/canvas-element-select.gif b/docs/canvas/images/canvas-element-select.gif similarity index 100% rename from docs/images/canvas-element-select.gif rename to docs/canvas/images/canvas-element-select.gif diff --git a/docs/images/canvas-export-workpad.png b/docs/canvas/images/canvas-export-workpad.png similarity index 100% rename from docs/images/canvas-export-workpad.png rename to docs/canvas/images/canvas-export-workpad.png diff --git a/docs/images/canvas-fullscreen.png b/docs/canvas/images/canvas-fullscreen.png similarity index 100% rename from docs/images/canvas-fullscreen.png rename to docs/canvas/images/canvas-fullscreen.png diff --git a/docs/images/canvas-functions-can-take-arguments-donut-chart.png b/docs/canvas/images/canvas-functions-can-take-arguments-donut-chart.png similarity index 100% rename from docs/images/canvas-functions-can-take-arguments-donut-chart.png rename to docs/canvas/images/canvas-functions-can-take-arguments-donut-chart.png diff --git a/docs/images/canvas-functions-can-take-arguments-pie-chart.png b/docs/canvas/images/canvas-functions-can-take-arguments-pie-chart.png similarity index 100% rename from docs/images/canvas-functions-can-take-arguments-pie-chart.png rename to docs/canvas/images/canvas-functions-can-take-arguments-pie-chart.png diff --git a/docs/images/canvas-generate-pdf.gif b/docs/canvas/images/canvas-generate-pdf.gif similarity index 100% rename from docs/images/canvas-generate-pdf.gif rename to docs/canvas/images/canvas-generate-pdf.gif diff --git a/docs/images/canvas-gs-example.png b/docs/canvas/images/canvas-gs-example.png similarity index 100% rename from docs/images/canvas-gs-example.png rename to docs/canvas/images/canvas-gs-example.png diff --git a/docs/images/canvas-image-element.png b/docs/canvas/images/canvas-image-element.png similarity index 100% rename from docs/images/canvas-image-element.png rename to docs/canvas/images/canvas-image-element.png diff --git a/docs/images/canvas-map-embed.gif b/docs/canvas/images/canvas-map-embed.gif similarity index 100% rename from docs/images/canvas-map-embed.gif rename to docs/canvas/images/canvas-map-embed.gif diff --git a/docs/images/canvas-metric-element.png b/docs/canvas/images/canvas-metric-element.png similarity index 100% rename from docs/images/canvas-metric-element.png rename to docs/canvas/images/canvas-metric-element.png diff --git a/docs/images/canvas-refresh-interval.png b/docs/canvas/images/canvas-refresh-interval.png similarity index 100% rename from docs/images/canvas-refresh-interval.png rename to docs/canvas/images/canvas-refresh-interval.png diff --git a/docs/images/canvas-timefilter-element.png b/docs/canvas/images/canvas-timefilter-element.png similarity index 100% rename from docs/images/canvas-timefilter-element.png rename to docs/canvas/images/canvas-timefilter-element.png diff --git a/docs/images/canvas-zoom-controls.png b/docs/canvas/images/canvas-zoom-controls.png similarity index 100% rename from docs/images/canvas-zoom-controls.png rename to docs/canvas/images/canvas-zoom-controls.png diff --git a/docs/images/canvas_element_options.png b/docs/canvas/images/canvas_element_options.png similarity index 100% rename from docs/images/canvas_element_options.png rename to docs/canvas/images/canvas_element_options.png diff --git a/docs/images/canvas_save_element.png b/docs/canvas/images/canvas_save_element.png similarity index 100% rename from docs/images/canvas_save_element.png rename to docs/canvas/images/canvas_save_element.png diff --git a/docs/images/settings.png b/docs/dev-tools/console/images/settings.png similarity index 100% rename from docs/images/settings.png rename to docs/dev-tools/console/images/settings.png diff --git a/docs/images/jenkins/job_view.png b/docs/developer/images/job_view.png similarity index 100% rename from docs/images/jenkins/job_view.png rename to docs/developer/images/job_view.png diff --git a/docs/images/jenkins/pipeline_steps_view.png b/docs/developer/images/pipeline_steps_view.png similarity index 100% rename from docs/images/jenkins/pipeline_steps_view.png rename to docs/developer/images/pipeline_steps_view.png diff --git a/docs/developer/testing/interpreting-ci-failures.asciidoc b/docs/developer/testing/interpreting-ci-failures.asciidoc index bc237928cf5aa..c47a59217d89b 100644 --- a/docs/developer/testing/interpreting-ci-failures.asciidoc +++ b/docs/developer/testing/interpreting-ci-failures.asciidoc @@ -17,7 +17,7 @@ Clicking the link next to the check in the conversation tab of a pull request wi To view the results of a job execution in Jenkins, either click the link in the comment left by `@elasticmachine` or search for the `kibana-ci` check in the list at the bottom of the PR. This link will take you to the top-level page for the specific job execution that failed. -image::images/jenkins/job_view.png[] +image::images/job_view.png[] 1. *Git Changes:* the list of commits that were in this build which weren't in the previous build. For Pull Requests this list is calculated by comparing against the most recent Pull Request which was tested, it is not limited to build for this specific Pull Request, so it's not very useful. 2. *Test Results:* A link to the test results screen, and shortcuts to the failed tests. Functional tests capture and store the log output from each specific test, and make it visible at these links. For other test runners only the error message is visible and log output must be tracked down in the *Pipeline Steps*. @@ -29,6 +29,6 @@ image::images/jenkins/job_view.png[] To view the logs for a failed specific ciGroup, jest, mocha, type checkers, linters, etc., click on the *Pipeline Steps* link in from the Job page. -image::images/jenkins/pipeline_steps_view.png[] +image::images/pipeline_steps_view.png[] Scroll down the page until you find a failed step *(1)*, and then look up a few lines for the `Branch:` step to see which specific job this is. If this is the job you're looking for click the little terminal icon next to the failed step *(1)* to view the logs for that specific step in the Pipeline. \ No newline at end of file diff --git a/docs/development/core/server/kibana-plugin-core-server.auditableevent.md b/docs/development/core/server/kibana-plugin-core-server.auditableevent.md new file mode 100644 index 0000000000000..aa109c5064887 --- /dev/null +++ b/docs/development/core/server/kibana-plugin-core-server.auditableevent.md @@ -0,0 +1,25 @@ + + +[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [AuditableEvent](./kibana-plugin-core-server.auditableevent.md) + +## AuditableEvent interface + +Event to audit. + +Signature: + +```typescript +export interface AuditableEvent +``` + +## Remarks + +Not a complete interface. + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [message](./kibana-plugin-core-server.auditableevent.message.md) | string | | +| [type](./kibana-plugin-core-server.auditableevent.type.md) | string | | + diff --git a/docs/development/core/server/kibana-plugin-core-server.auditableevent.message.md b/docs/development/core/server/kibana-plugin-core-server.auditableevent.message.md new file mode 100644 index 0000000000000..3ac4167c6998b --- /dev/null +++ b/docs/development/core/server/kibana-plugin-core-server.auditableevent.message.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [AuditableEvent](./kibana-plugin-core-server.auditableevent.md) > [message](./kibana-plugin-core-server.auditableevent.message.md) + +## AuditableEvent.message property + +Signature: + +```typescript +message: string; +``` diff --git a/docs/development/core/server/kibana-plugin-core-server.auditableevent.type.md b/docs/development/core/server/kibana-plugin-core-server.auditableevent.type.md new file mode 100644 index 0000000000000..3748748366684 --- /dev/null +++ b/docs/development/core/server/kibana-plugin-core-server.auditableevent.type.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [AuditableEvent](./kibana-plugin-core-server.auditableevent.md) > [type](./kibana-plugin-core-server.auditableevent.type.md) + +## AuditableEvent.type property + +Signature: + +```typescript +type: string; +``` diff --git a/docs/development/core/server/kibana-plugin-core-server.auditor.add.md b/docs/development/core/server/kibana-plugin-core-server.auditor.add.md new file mode 100644 index 0000000000000..40245a93753fc --- /dev/null +++ b/docs/development/core/server/kibana-plugin-core-server.auditor.add.md @@ -0,0 +1,36 @@ + + +[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [Auditor](./kibana-plugin-core-server.auditor.md) > [add](./kibana-plugin-core-server.auditor.add.md) + +## Auditor.add() method + +Add a record to audit log. Service attaches to a log record: - metadata about an end-user initiating an operation - scope name, if presents + +Signature: + +```typescript +add(event: AuditableEvent): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| event | AuditableEvent | | + +Returns: + +`void` + +## Example + +How to add a record in audit log: + +```typescript +router.get({ path: '/my_endpoint', validate: false }, async (context, request, response) => { + context.core.auditor.withAuditScope('my_plugin_operation'); + const value = await context.core.elasticsearch.legacy.client.callAsCurrentUser('...'); + context.core.add({ type: 'operation.type', message: 'perform an operation in ... endpoint' }); + +``` + diff --git a/docs/development/core/server/kibana-plugin-core-server.auditor.md b/docs/development/core/server/kibana-plugin-core-server.auditor.md new file mode 100644 index 0000000000000..191a34df647ab --- /dev/null +++ b/docs/development/core/server/kibana-plugin-core-server.auditor.md @@ -0,0 +1,21 @@ + + +[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [Auditor](./kibana-plugin-core-server.auditor.md) + +## Auditor interface + +Provides methods to log user actions and access events. + +Signature: + +```typescript +export interface Auditor +``` + +## Methods + +| Method | Description | +| --- | --- | +| [add(event)](./kibana-plugin-core-server.auditor.add.md) | Add a record to audit log. Service attaches to a log record: - metadata about an end-user initiating an operation - scope name, if presents | +| [withAuditScope(name)](./kibana-plugin-core-server.auditor.withauditscope.md) | Add a high-level scope name for logged events. It helps to identify the root cause of low-level events. | + diff --git a/docs/development/core/server/kibana-plugin-core-server.auditor.withauditscope.md b/docs/development/core/server/kibana-plugin-core-server.auditor.withauditscope.md new file mode 100644 index 0000000000000..0ae0c48ab92f4 --- /dev/null +++ b/docs/development/core/server/kibana-plugin-core-server.auditor.withauditscope.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [Auditor](./kibana-plugin-core-server.auditor.md) > [withAuditScope](./kibana-plugin-core-server.auditor.withauditscope.md) + +## Auditor.withAuditScope() method + +Add a high-level scope name for logged events. It helps to identify the root cause of low-level events. + +Signature: + +```typescript +withAuditScope(name: string): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| name | string | | + +Returns: + +`void` + diff --git a/docs/development/core/server/kibana-plugin-core-server.auditorfactory.asscoped.md b/docs/development/core/server/kibana-plugin-core-server.auditorfactory.asscoped.md new file mode 100644 index 0000000000000..4a60931e60940 --- /dev/null +++ b/docs/development/core/server/kibana-plugin-core-server.auditorfactory.asscoped.md @@ -0,0 +1,22 @@ + + +[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [AuditorFactory](./kibana-plugin-core-server.auditorfactory.md) > [asScoped](./kibana-plugin-core-server.auditorfactory.asscoped.md) + +## AuditorFactory.asScoped() method + +Signature: + +```typescript +asScoped(request: KibanaRequest): Auditor; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| request | KibanaRequest | | + +Returns: + +`Auditor` + diff --git a/docs/development/core/server/kibana-plugin-core-server.auditorfactory.md b/docs/development/core/server/kibana-plugin-core-server.auditorfactory.md new file mode 100644 index 0000000000000..fd4760caa3552 --- /dev/null +++ b/docs/development/core/server/kibana-plugin-core-server.auditorfactory.md @@ -0,0 +1,20 @@ + + +[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [AuditorFactory](./kibana-plugin-core-server.auditorfactory.md) + +## AuditorFactory interface + +Creates [Auditor](./kibana-plugin-core-server.auditor.md) instance bound to the current user credentials. + +Signature: + +```typescript +export interface AuditorFactory +``` + +## Methods + +| Method | Description | +| --- | --- | +| [asScoped(request)](./kibana-plugin-core-server.auditorfactory.asscoped.md) | | + diff --git a/docs/development/core/server/kibana-plugin-core-server.audittrailsetup.md b/docs/development/core/server/kibana-plugin-core-server.audittrailsetup.md new file mode 100644 index 0000000000000..50885232a088e --- /dev/null +++ b/docs/development/core/server/kibana-plugin-core-server.audittrailsetup.md @@ -0,0 +1,18 @@ + + +[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [AuditTrailSetup](./kibana-plugin-core-server.audittrailsetup.md) + +## AuditTrailSetup interface + +Signature: + +```typescript +export interface AuditTrailSetup +``` + +## Methods + +| Method | Description | +| --- | --- | +| [register(auditor)](./kibana-plugin-core-server.audittrailsetup.register.md) | Register a custom [AuditorFactory](./kibana-plugin-core-server.auditorfactory.md) implementation. | + diff --git a/docs/development/core/server/kibana-plugin-core-server.audittrailsetup.register.md b/docs/development/core/server/kibana-plugin-core-server.audittrailsetup.register.md new file mode 100644 index 0000000000000..36695844ced73 --- /dev/null +++ b/docs/development/core/server/kibana-plugin-core-server.audittrailsetup.register.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [AuditTrailSetup](./kibana-plugin-core-server.audittrailsetup.md) > [register](./kibana-plugin-core-server.audittrailsetup.register.md) + +## AuditTrailSetup.register() method + +Register a custom [AuditorFactory](./kibana-plugin-core-server.auditorfactory.md) implementation. + +Signature: + +```typescript +register(auditor: AuditorFactory): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| auditor | AuditorFactory | | + +Returns: + +`void` + diff --git a/docs/development/core/server/kibana-plugin-core-server.audittrailstart.md b/docs/development/core/server/kibana-plugin-core-server.audittrailstart.md new file mode 100644 index 0000000000000..4fb9f5cb93549 --- /dev/null +++ b/docs/development/core/server/kibana-plugin-core-server.audittrailstart.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [AuditTrailStart](./kibana-plugin-core-server.audittrailstart.md) + +## AuditTrailStart type + +Signature: + +```typescript +export declare type AuditTrailStart = AuditorFactory; +``` diff --git a/docs/development/core/server/kibana-plugin-core-server.coresetup.audittrail.md b/docs/development/core/server/kibana-plugin-core-server.coresetup.audittrail.md new file mode 100644 index 0000000000000..1aa7a75b7a086 --- /dev/null +++ b/docs/development/core/server/kibana-plugin-core-server.coresetup.audittrail.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [CoreSetup](./kibana-plugin-core-server.coresetup.md) > [auditTrail](./kibana-plugin-core-server.coresetup.audittrail.md) + +## CoreSetup.auditTrail property + +[AuditTrailSetup](./kibana-plugin-core-server.audittrailsetup.md) + +Signature: + +```typescript +auditTrail: AuditTrailSetup; +``` diff --git a/docs/development/core/server/kibana-plugin-core-server.coresetup.md b/docs/development/core/server/kibana-plugin-core-server.coresetup.md index 32221a320d2a1..597bb9bc2376a 100644 --- a/docs/development/core/server/kibana-plugin-core-server.coresetup.md +++ b/docs/development/core/server/kibana-plugin-core-server.coresetup.md @@ -16,6 +16,7 @@ export interface CoreSetupAuditTrailSetup | [AuditTrailSetup](./kibana-plugin-core-server.audittrailsetup.md) | | [capabilities](./kibana-plugin-core-server.coresetup.capabilities.md) | CapabilitiesSetup | [CapabilitiesSetup](./kibana-plugin-core-server.capabilitiessetup.md) | | [context](./kibana-plugin-core-server.coresetup.context.md) | ContextSetup | [ContextSetup](./kibana-plugin-core-server.contextsetup.md) | | [elasticsearch](./kibana-plugin-core-server.coresetup.elasticsearch.md) | ElasticsearchServiceSetup | [ElasticsearchServiceSetup](./kibana-plugin-core-server.elasticsearchservicesetup.md) | diff --git a/docs/development/core/server/kibana-plugin-core-server.corestart.audittrail.md b/docs/development/core/server/kibana-plugin-core-server.corestart.audittrail.md new file mode 100644 index 0000000000000..879e0df836190 --- /dev/null +++ b/docs/development/core/server/kibana-plugin-core-server.corestart.audittrail.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [CoreStart](./kibana-plugin-core-server.corestart.md) > [auditTrail](./kibana-plugin-core-server.corestart.audittrail.md) + +## CoreStart.auditTrail property + +[AuditTrailSetup](./kibana-plugin-core-server.audittrailsetup.md) + +Signature: + +```typescript +auditTrail: AuditTrailStart; +``` diff --git a/docs/development/core/server/kibana-plugin-core-server.corestart.md b/docs/development/core/server/kibana-plugin-core-server.corestart.md index acd23f0f47386..610c85c71e362 100644 --- a/docs/development/core/server/kibana-plugin-core-server.corestart.md +++ b/docs/development/core/server/kibana-plugin-core-server.corestart.md @@ -16,6 +16,7 @@ export interface CoreStart | Property | Type | Description | | --- | --- | --- | +| [auditTrail](./kibana-plugin-core-server.corestart.audittrail.md) | AuditTrailStart | [AuditTrailSetup](./kibana-plugin-core-server.audittrailsetup.md) | | [capabilities](./kibana-plugin-core-server.corestart.capabilities.md) | CapabilitiesStart | [CapabilitiesStart](./kibana-plugin-core-server.capabilitiesstart.md) | | [elasticsearch](./kibana-plugin-core-server.corestart.elasticsearch.md) | ElasticsearchServiceStart | [ElasticsearchServiceStart](./kibana-plugin-core-server.elasticsearchservicestart.md) | | [http](./kibana-plugin-core-server.corestart.http.md) | HttpServiceStart | [HttpServiceStart](./kibana-plugin-core-server.httpservicestart.md) | diff --git a/docs/development/core/server/kibana-plugin-core-server.httpserverinfo.hostname.md b/docs/development/core/server/kibana-plugin-core-server.httpserverinfo.hostname.md new file mode 100644 index 0000000000000..194a8aea16269 --- /dev/null +++ b/docs/development/core/server/kibana-plugin-core-server.httpserverinfo.hostname.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [HttpServerInfo](./kibana-plugin-core-server.httpserverinfo.md) > [hostname](./kibana-plugin-core-server.httpserverinfo.hostname.md) + +## HttpServerInfo.hostname property + +The hostname of the server + +Signature: + +```typescript +hostname: string; +``` diff --git a/docs/development/core/server/kibana-plugin-core-server.legacyclusterclient._constructor_.md b/docs/development/core/server/kibana-plugin-core-server.legacyclusterclient._constructor_.md index 823f34bd7dd23..6a56d31bbd55f 100644 --- a/docs/development/core/server/kibana-plugin-core-server.legacyclusterclient._constructor_.md +++ b/docs/development/core/server/kibana-plugin-core-server.legacyclusterclient._constructor_.md @@ -9,7 +9,7 @@ Constructs a new instance of the `LegacyClusterClient` class Signature: ```typescript -constructor(config: LegacyElasticsearchClientConfig, log: Logger, getAuthHeaders?: GetAuthHeaders); +constructor(config: LegacyElasticsearchClientConfig, log: Logger, getAuditorFactory: () => AuditorFactory, getAuthHeaders?: GetAuthHeaders); ``` ## Parameters @@ -18,5 +18,6 @@ constructor(config: LegacyElasticsearchClientConfig, log: Logger, getAuthHeaders | --- | --- | --- | | config | LegacyElasticsearchClientConfig | | | log | Logger | | +| getAuditorFactory | () => AuditorFactory | | | getAuthHeaders | GetAuthHeaders | | diff --git a/docs/development/core/server/kibana-plugin-core-server.legacyclusterclient.md b/docs/development/core/server/kibana-plugin-core-server.legacyclusterclient.md index 4f218ae552c99..c51f1858c97a5 100644 --- a/docs/development/core/server/kibana-plugin-core-server.legacyclusterclient.md +++ b/docs/development/core/server/kibana-plugin-core-server.legacyclusterclient.md @@ -15,7 +15,7 @@ export declare class LegacyClusterClient implements ILegacyClusterClient | Constructor | Modifiers | Description | | --- | --- | --- | -| [(constructor)(config, log, getAuthHeaders)](./kibana-plugin-core-server.legacyclusterclient._constructor_.md) | | Constructs a new instance of the LegacyClusterClient class | +| [(constructor)(config, log, getAuditorFactory, getAuthHeaders)](./kibana-plugin-core-server.legacyclusterclient._constructor_.md) | | Constructs a new instance of the LegacyClusterClient class | ## Properties diff --git a/docs/development/core/server/kibana-plugin-core-server.legacyscopedclusterclient._constructor_.md b/docs/development/core/server/kibana-plugin-core-server.legacyscopedclusterclient._constructor_.md index bd1cd1e9f3d9b..ffadab7656602 100644 --- a/docs/development/core/server/kibana-plugin-core-server.legacyscopedclusterclient._constructor_.md +++ b/docs/development/core/server/kibana-plugin-core-server.legacyscopedclusterclient._constructor_.md @@ -9,7 +9,7 @@ Constructs a new instance of the `LegacyScopedClusterClient` class Signature: ```typescript -constructor(internalAPICaller: LegacyAPICaller, scopedAPICaller: LegacyAPICaller, headers?: Headers | undefined); +constructor(internalAPICaller: LegacyAPICaller, scopedAPICaller: LegacyAPICaller, headers?: Headers | undefined, auditor?: Auditor | undefined); ``` ## Parameters @@ -19,4 +19,5 @@ constructor(internalAPICaller: LegacyAPICaller, scopedAPICaller: LegacyAPICaller | internalAPICaller | LegacyAPICaller | | | scopedAPICaller | LegacyAPICaller | | | headers | Headers | undefined | | +| auditor | Auditor | undefined | | diff --git a/docs/development/core/server/kibana-plugin-core-server.legacyscopedclusterclient.md b/docs/development/core/server/kibana-plugin-core-server.legacyscopedclusterclient.md index f3d8a69b8ed05..c4a94d8661c47 100644 --- a/docs/development/core/server/kibana-plugin-core-server.legacyscopedclusterclient.md +++ b/docs/development/core/server/kibana-plugin-core-server.legacyscopedclusterclient.md @@ -15,7 +15,7 @@ export declare class LegacyScopedClusterClient implements ILegacyScopedClusterCl | Constructor | Modifiers | Description | | --- | --- | --- | -| [(constructor)(internalAPICaller, scopedAPICaller, headers)](./kibana-plugin-core-server.legacyscopedclusterclient._constructor_.md) | | Constructs a new instance of the LegacyScopedClusterClient class | +| [(constructor)(internalAPICaller, scopedAPICaller, headers, auditor)](./kibana-plugin-core-server.legacyscopedclusterclient._constructor_.md) | | Constructs a new instance of the LegacyScopedClusterClient class | ## Methods diff --git a/docs/development/core/server/kibana-plugin-core-server.md b/docs/development/core/server/kibana-plugin-core-server.md index f73595ea0a8ff..8d4c0c915437e 100644 --- a/docs/development/core/server/kibana-plugin-core-server.md +++ b/docs/development/core/server/kibana-plugin-core-server.md @@ -56,6 +56,10 @@ The plugin integrates with the core system via lifecycle events: `setup` | --- | --- | | [AssistanceAPIResponse](./kibana-plugin-core-server.assistanceapiresponse.md) | | | [AssistantAPIClientParams](./kibana-plugin-core-server.assistantapiclientparams.md) | | +| [AuditableEvent](./kibana-plugin-core-server.auditableevent.md) | Event to audit. | +| [Auditor](./kibana-plugin-core-server.auditor.md) | Provides methods to log user actions and access events. | +| [AuditorFactory](./kibana-plugin-core-server.auditorfactory.md) | Creates [Auditor](./kibana-plugin-core-server.auditor.md) instance bound to the current user credentials. | +| [AuditTrailSetup](./kibana-plugin-core-server.audittrailsetup.md) | | | [Authenticated](./kibana-plugin-core-server.authenticated.md) | | | [AuthNotHandled](./kibana-plugin-core-server.authnothandled.md) | | | [AuthRedirected](./kibana-plugin-core-server.authredirected.md) | | @@ -150,7 +154,7 @@ The plugin integrates with the core system via lifecycle events: `setup` | [SavedObjectsBulkUpdateResponse](./kibana-plugin-core-server.savedobjectsbulkupdateresponse.md) | | | [SavedObjectsClientProviderOptions](./kibana-plugin-core-server.savedobjectsclientprovideroptions.md) | Options to control the creation of the Saved Objects Client. | | [SavedObjectsClientWrapperOptions](./kibana-plugin-core-server.savedobjectsclientwrapperoptions.md) | Options passed to each SavedObjectsClientWrapperFactory to aid in creating the wrapper instance. | -| [SavedObjectsComplexFieldMapping](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.md) | See [SavedObjectsFieldMapping](./kibana-plugin-core-server.savedobjectsfieldmapping.md) for documentation.Note: this type intentially doesn't include a type definition for defining the dynamic mapping parameter. Saved Object fields should always inherit the dynamic: 'strict' paramater. If you are unsure of the shape of your data use type: 'object', enabled: false instead. | +| [SavedObjectsComplexFieldMapping](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.md) | See [SavedObjectsFieldMapping](./kibana-plugin-core-server.savedobjectsfieldmapping.md) for documentation. | | [SavedObjectsCoreFieldMapping](./kibana-plugin-core-server.savedobjectscorefieldmapping.md) | See [SavedObjectsFieldMapping](./kibana-plugin-core-server.savedobjectsfieldmapping.md) for documentation. | | [SavedObjectsCreateOptions](./kibana-plugin-core-server.savedobjectscreateoptions.md) | | | [SavedObjectsDeleteByNamespaceOptions](./kibana-plugin-core-server.savedobjectsdeletebynamespaceoptions.md) | | @@ -212,6 +216,7 @@ The plugin integrates with the core system via lifecycle events: `setup` | Type Alias | Description | | --- | --- | | [AppenderConfigType](./kibana-plugin-core-server.appenderconfigtype.md) | | +| [AuditTrailStart](./kibana-plugin-core-server.audittrailstart.md) | | | [AuthenticationHandler](./kibana-plugin-core-server.authenticationhandler.md) | See [AuthToolkit](./kibana-plugin-core-server.authtoolkit.md). | | [AuthHeaders](./kibana-plugin-core-server.authheaders.md) | Auth Headers map | | [AuthResult](./kibana-plugin-core-server.authresult.md) | | diff --git a/docs/development/core/server/kibana-plugin-core-server.requesthandlercontext.core.md b/docs/development/core/server/kibana-plugin-core-server.requesthandlercontext.core.md index b09fb121b8a63..2d31c24a077cb 100644 --- a/docs/development/core/server/kibana-plugin-core-server.requesthandlercontext.core.md +++ b/docs/development/core/server/kibana-plugin-core-server.requesthandlercontext.core.md @@ -20,5 +20,6 @@ core: { uiSettings: { client: IUiSettingsClient; }; + auditor: Auditor; }; ``` diff --git a/docs/development/core/server/kibana-plugin-core-server.requesthandlercontext.md b/docs/development/core/server/kibana-plugin-core-server.requesthandlercontext.md index 55d6e931ac158..07e6dcbdae125 100644 --- a/docs/development/core/server/kibana-plugin-core-server.requesthandlercontext.md +++ b/docs/development/core/server/kibana-plugin-core-server.requesthandlercontext.md @@ -18,5 +18,5 @@ export interface RequestHandlerContext | Property | Type | Description | | --- | --- | --- | -| [core](./kibana-plugin-core-server.requesthandlercontext.core.md) | {
savedObjects: {
client: SavedObjectsClientContract;
typeRegistry: ISavedObjectTypeRegistry;
};
elasticsearch: {
legacy: {
client: ILegacyScopedClusterClient;
};
};
uiSettings: {
client: IUiSettingsClient;
};
} | | +| [core](./kibana-plugin-core-server.requesthandlercontext.core.md) | {
savedObjects: {
client: SavedObjectsClientContract;
typeRegistry: ISavedObjectTypeRegistry;
};
elasticsearch: {
legacy: {
client: ILegacyScopedClusterClient;
};
};
uiSettings: {
client: IUiSettingsClient;
};
auditor: Auditor;
} | | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectscomplexfieldmapping.dynamic.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectscomplexfieldmapping.dynamic.md new file mode 100644 index 0000000000000..b01da3c62fda6 --- /dev/null +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectscomplexfieldmapping.dynamic.md @@ -0,0 +1,15 @@ + + +[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsComplexFieldMapping](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.md) > [dynamic](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.dynamic.md) + +## SavedObjectsComplexFieldMapping.dynamic property + +The dynamic property of the mapping, either `false` or `'strict'`. If unspecified `dynamic: 'strict'` will be inherited from the top-level index mappings. + +Note: To limit the number of mapping fields Saved Object types should \*never\* use `dynamic: true`. + +Signature: + +```typescript +dynamic?: false | 'strict'; +``` diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectscomplexfieldmapping.enabled.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectscomplexfieldmapping.enabled.md new file mode 100644 index 0000000000000..08513aa2a849b --- /dev/null +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectscomplexfieldmapping.enabled.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsComplexFieldMapping](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.md) > [enabled](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.enabled.md) + +## SavedObjectsComplexFieldMapping.enabled property + +Signature: + +```typescript +enabled?: boolean; +``` diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectscomplexfieldmapping.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectscomplexfieldmapping.md index cb81686b424ec..fc262cad54f18 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectscomplexfieldmapping.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectscomplexfieldmapping.md @@ -6,8 +6,6 @@ See [SavedObjectsFieldMapping](./kibana-plugin-core-server.savedobjectsfieldmapping.md) for documentation. -Note: this type intentially doesn't include a type definition for defining the `dynamic` mapping parameter. Saved Object fields should always inherit the `dynamic: 'strict'` paramater. If you are unsure of the shape of your data use `type: 'object', enabled: false` instead. - Signature: ```typescript @@ -19,6 +17,8 @@ export interface SavedObjectsComplexFieldMapping | Property | Type | Description | | --- | --- | --- | | [doc\_values](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.doc_values.md) | boolean | | +| [dynamic](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.dynamic.md) | false | 'strict' | The dynamic property of the mapping, either false or 'strict'. If unspecified dynamic: 'strict' will be inherited from the top-level index mappings.Note: To limit the number of mapping fields Saved Object types should \*never\* use dynamic: true. | +| [enabled](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.enabled.md) | boolean | | | [properties](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.properties.md) | SavedObjectsMappingProperties | | | [type](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.type.md) | string | | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.enabled.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.enabled.md deleted file mode 100644 index c0b556e99ebc3..0000000000000 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.enabled.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsCoreFieldMapping](./kibana-plugin-core-server.savedobjectscorefieldmapping.md) > [enabled](./kibana-plugin-core-server.savedobjectscorefieldmapping.enabled.md) - -## SavedObjectsCoreFieldMapping.enabled property - -Signature: - -```typescript -enabled?: boolean; -``` diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.md index b9e726eac799d..e9b9c2bcf51b5 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.md @@ -17,7 +17,6 @@ export interface SavedObjectsCoreFieldMapping | Property | Type | Description | | --- | --- | --- | | [doc\_values](./kibana-plugin-core-server.savedobjectscorefieldmapping.doc_values.md) | boolean | | -| [enabled](./kibana-plugin-core-server.savedobjectscorefieldmapping.enabled.md) | boolean | | | [fields](./kibana-plugin-core-server.savedobjectscorefieldmapping.fields.md) | {
[subfield: string]: {
type: string;
ignore_above?: number;
};
} | | | [index](./kibana-plugin-core-server.savedobjectscorefieldmapping.index.md) | boolean | | | [null\_value](./kibana-plugin-core-server.savedobjectscorefieldmapping.null_value.md) | number | boolean | string | | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectstypemappingdefinition.dynamic.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectstypemappingdefinition.dynamic.md index 74efa75768f9c..70775760ac77d 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectstypemappingdefinition.dynamic.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectstypemappingdefinition.dynamic.md @@ -4,7 +4,7 @@ ## SavedObjectsTypeMappingDefinition.dynamic property -The dynamic property of the mapping. either `false` or 'strict'. Defaults to `false` +The dynamic property of the mapping, either `false` or `'strict'`. If unspecified `dynamic: 'strict'` will be inherited from the top-level index mappings. Signature: diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectstypemappingdefinition.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectstypemappingdefinition.md index 77ded4389c0a0..3d3b73880fa7f 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectstypemappingdefinition.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectstypemappingdefinition.md @@ -41,6 +41,6 @@ const typeDefinition: SavedObjectsTypeMappingDefinition = { | Property | Type | Description | | --- | --- | --- | -| [dynamic](./kibana-plugin-core-server.savedobjectstypemappingdefinition.dynamic.md) | false | 'strict' | The dynamic property of the mapping. either false or 'strict'. Defaults to false | +| [dynamic](./kibana-plugin-core-server.savedobjectstypemappingdefinition.dynamic.md) | false | 'strict' | The dynamic property of the mapping, either false or 'strict'. If unspecified dynamic: 'strict' will be inherited from the top-level index mappings. | | [properties](./kibana-plugin-core-server.savedobjectstypemappingdefinition.properties.md) | SavedObjectsMappingProperties | The underlying properties of the type mapping | diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.getquerylog.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.getquerylog.md deleted file mode 100644 index e933245e81623..0000000000000 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.getquerylog.md +++ /dev/null @@ -1,25 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [getQueryLog](./kibana-plugin-plugins-data-public.getquerylog.md) - -## getQueryLog() function - -Signature: - -```typescript -export declare function getQueryLog(uiSettings: IUiSettingsClient, storage: IStorageWrapper, appName: string, language: string): PersistedLog; -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| uiSettings | IUiSettingsClient | | -| storage | IStorageWrapper | | -| appName | string | | -| language | string | | - -Returns: - -`PersistedLog` - diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.getsearchparamsfromrequest.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.getsearchparamsfromrequest.md index 1923f0e2e4ea1..5bd1694cbeea3 100644 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.getsearchparamsfromrequest.md +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.getsearchparamsfromrequest.md @@ -10,16 +10,7 @@ export declare function getSearchParamsFromRequest(searchRequest: SearchRequest, dependencies: { injectedMetadata: CoreStart['injectedMetadata']; uiSettings: IUiSettingsClient; -}): { - rest_total_hits_as_int: boolean; - ignore_unavailable: boolean; - ignore_throttled: boolean; - max_concurrent_shard_requests: any; - preference: any; - timeout: string | undefined; - index: any; - body: any; -}; +}): ISearchRequestParams; ``` ## Parameters @@ -31,14 +22,5 @@ export declare function getSearchParamsFromRequest(searchRequest: SearchRequest, Returns: -`{ - rest_total_hits_as_int: boolean; - ignore_unavailable: boolean; - ignore_throttled: boolean; - max_concurrent_shard_requests: any; - preference: any; - timeout: string | undefined; - index: any; - body: any; -}` +`ISearchRequestParams` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.iessearchrequest.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.iessearchrequest.md index ed24ca613cdf6..fee34378339af 100644 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.iessearchrequest.md +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.iessearchrequest.md @@ -15,5 +15,5 @@ export interface IEsSearchRequest extends IKibanaSearchRequest | Property | Type | Description | | --- | --- | --- | | [indexType](./kibana-plugin-plugins-data-public.iessearchrequest.indextype.md) | string | | -| [params](./kibana-plugin-plugins-data-public.iessearchrequest.params.md) | SearchParams | | +| [params](./kibana-plugin-plugins-data-public.iessearchrequest.params.md) | ISearchRequestParams | | diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.iessearchrequest.params.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.iessearchrequest.params.md index 2ca8c83d3f1ef..24107faa28e8c 100644 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.iessearchrequest.params.md +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.iessearchrequest.params.md @@ -7,5 +7,5 @@ Signature: ```typescript -params: SearchParams; +params?: ISearchRequestParams; ``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.iessearchresponse.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.iessearchresponse.md index a5027ef292ef8..ea7e2aef00d6e 100644 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.iessearchresponse.md +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.iessearchresponse.md @@ -7,12 +7,12 @@ Signature: ```typescript -export interface IEsSearchResponse extends IKibanaSearchResponse +export interface IEsSearchResponse extends IKibanaSearchResponse ``` ## Properties | Property | Type | Description | | --- | --- | --- | -| [rawResponse](./kibana-plugin-plugins-data-public.iessearchresponse.rawresponse.md) | SearchResponse<Hits> | | +| [rawResponse](./kibana-plugin-plugins-data-public.iessearchresponse.rawresponse.md) | SearchResponse<any> | | diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.iessearchresponse.rawresponse.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.iessearchresponse.rawresponse.md index 8f6563a1cea84..d7912f377ca9f 100644 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.iessearchresponse.rawresponse.md +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.iessearchresponse.rawresponse.md @@ -7,5 +7,5 @@ Signature: ```typescript -rawResponse: SearchResponse; +rawResponse: SearchResponse; ``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.irequesttypesmap.es.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.irequesttypesmap.es.md deleted file mode 100644 index 0b31968f06425..0000000000000 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.irequesttypesmap.es.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [IRequestTypesMap](./kibana-plugin-plugins-data-public.irequesttypesmap.md) > [es](./kibana-plugin-plugins-data-public.irequesttypesmap.es.md) - -## IRequestTypesMap.es property - -Signature: - -```typescript -[ES_SEARCH_STRATEGY]: IEsSearchRequest; -``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.irequesttypesmap.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.irequesttypesmap.md deleted file mode 100644 index 4ca5e9eab665a..0000000000000 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.irequesttypesmap.md +++ /dev/null @@ -1,19 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [IRequestTypesMap](./kibana-plugin-plugins-data-public.irequesttypesmap.md) - -## IRequestTypesMap interface - -Signature: - -```typescript -export interface IRequestTypesMap -``` - -## Properties - -| Property | Type | Description | -| --- | --- | --- | -| [es](./kibana-plugin-plugins-data-public.irequesttypesmap.es.md) | IEsSearchRequest | | -| [SYNC\_SEARCH\_STRATEGY](./kibana-plugin-plugins-data-public.irequesttypesmap.sync_search_strategy.md) | ISyncSearchRequest | | - diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.irequesttypesmap.sync_search_strategy.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.irequesttypesmap.sync_search_strategy.md deleted file mode 100644 index 28b87111a75ad..0000000000000 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.irequesttypesmap.sync_search_strategy.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [IRequestTypesMap](./kibana-plugin-plugins-data-public.irequesttypesmap.md) > [SYNC\_SEARCH\_STRATEGY](./kibana-plugin-plugins-data-public.irequesttypesmap.sync_search_strategy.md) - -## IRequestTypesMap.SYNC\_SEARCH\_STRATEGY property - -Signature: - -```typescript -[SYNC_SEARCH_STRATEGY]: ISyncSearchRequest; -``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.iresponsetypesmap.es.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.iresponsetypesmap.es.md deleted file mode 100644 index 8056d0b16a66e..0000000000000 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.iresponsetypesmap.es.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [IResponseTypesMap](./kibana-plugin-plugins-data-public.iresponsetypesmap.md) > [es](./kibana-plugin-plugins-data-public.iresponsetypesmap.es.md) - -## IResponseTypesMap.es property - -Signature: - -```typescript -[ES_SEARCH_STRATEGY]: IEsSearchResponse; -``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.iresponsetypesmap.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.iresponsetypesmap.md deleted file mode 100644 index b6ec3aa38c96a..0000000000000 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.iresponsetypesmap.md +++ /dev/null @@ -1,19 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [IResponseTypesMap](./kibana-plugin-plugins-data-public.iresponsetypesmap.md) - -## IResponseTypesMap interface - -Signature: - -```typescript -export interface IResponseTypesMap -``` - -## Properties - -| Property | Type | Description | -| --- | --- | --- | -| [es](./kibana-plugin-plugins-data-public.iresponsetypesmap.es.md) | IEsSearchResponse | | -| [SYNC\_SEARCH\_STRATEGY](./kibana-plugin-plugins-data-public.iresponsetypesmap.sync_search_strategy.md) | IKibanaSearchResponse | | - diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.iresponsetypesmap.sync_search_strategy.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.iresponsetypesmap.sync_search_strategy.md deleted file mode 100644 index c9fad4ced534c..0000000000000 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.iresponsetypesmap.sync_search_strategy.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [IResponseTypesMap](./kibana-plugin-plugins-data-public.iresponsetypesmap.md) > [SYNC\_SEARCH\_STRATEGY](./kibana-plugin-plugins-data-public.iresponsetypesmap.sync_search_strategy.md) - -## IResponseTypesMap.SYNC\_SEARCH\_STRATEGY property - -Signature: - -```typescript -[SYNC_SEARCH_STRATEGY]: IKibanaSearchResponse; -``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.isearch.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.isearch.md index 1a58b41052caf..79f667a70571a 100644 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.isearch.md +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.isearch.md @@ -7,5 +7,5 @@ Signature: ```typescript -export declare type ISearch = (request: IRequestTypesMap[T], options?: ISearchOptions) => Observable; +export declare type ISearch = (request: IKibanaSearchRequest, options?: ISearchOptions) => Observable; ``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.isearchgeneric.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.isearchgeneric.md index e118dac31c296..cdf19cd15a298 100644 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.isearchgeneric.md +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.isearchgeneric.md @@ -7,5 +7,5 @@ Signature: ```typescript -export declare type ISearchGeneric = (request: IRequestTypesMap[T], options?: ISearchOptions, strategy?: T) => Observable; +export declare type ISearchGeneric = (request: IEsSearchRequest, options?: IStrategyOptions) => Observable; ``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.isearchstrategy.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.isearchstrategy.md deleted file mode 100644 index 9e74bc0e60a73..0000000000000 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.isearchstrategy.md +++ /dev/null @@ -1,20 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [ISearchStrategy](./kibana-plugin-plugins-data-public.isearchstrategy.md) - -## ISearchStrategy interface - -Search strategy interface contains a search method that takes in a request and returns a promise that resolves to a response. - -Signature: - -```typescript -export interface ISearchStrategy -``` - -## Properties - -| Property | Type | Description | -| --- | --- | --- | -| [search](./kibana-plugin-plugins-data-public.isearchstrategy.search.md) | ISearch<T> | | - diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.isearchstrategy.search.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.isearchstrategy.search.md deleted file mode 100644 index e2e4264b7c6e0..0000000000000 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.isearchstrategy.search.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [ISearchStrategy](./kibana-plugin-plugins-data-public.isearchstrategy.md) > [search](./kibana-plugin-plugins-data-public.isearchstrategy.search.md) - -## ISearchStrategy.search property - -Signature: - -```typescript -search: ISearch; -``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.isyncsearchrequest.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.isyncsearchrequest.md deleted file mode 100644 index 29befdbf295dc..0000000000000 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.isyncsearchrequest.md +++ /dev/null @@ -1,18 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [ISyncSearchRequest](./kibana-plugin-plugins-data-public.isyncsearchrequest.md) - -## ISyncSearchRequest interface - -Signature: - -```typescript -export interface ISyncSearchRequest extends IKibanaSearchRequest -``` - -## Properties - -| Property | Type | Description | -| --- | --- | --- | -| [serverStrategy](./kibana-plugin-plugins-data-public.isyncsearchrequest.serverstrategy.md) | string | | - diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.isyncsearchrequest.serverstrategy.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.isyncsearchrequest.serverstrategy.md deleted file mode 100644 index f30f274a3b9b6..0000000000000 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.isyncsearchrequest.serverstrategy.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [ISyncSearchRequest](./kibana-plugin-plugins-data-public.isyncsearchrequest.md) > [serverStrategy](./kibana-plugin-plugins-data-public.isyncsearchrequest.serverstrategy.md) - -## ISyncSearchRequest.serverStrategy property - -Signature: - -```typescript -serverStrategy: 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 feeb686a1f5ed..7cb6ef64431bf 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 @@ -38,7 +38,6 @@ | --- | --- | | [getDefaultQuery(language)](./kibana-plugin-plugins-data-public.getdefaultquery.md) | | | [getEsPreference(uiSettings, sessionId)](./kibana-plugin-plugins-data-public.getespreference.md) | | -| [getQueryLog(uiSettings, storage, appName, language)](./kibana-plugin-plugins-data-public.getquerylog.md) | | | [getSearchErrorType({ message })](./kibana-plugin-plugins-data-public.getsearcherrortype.md) | | | [getSearchParamsFromRequest(searchRequest, dependencies)](./kibana-plugin-plugins-data-public.getsearchparamsfromrequest.md) | | | [getTime(indexPattern, timeRange, options)](./kibana-plugin-plugins-data-public.gettime.md) | | @@ -67,11 +66,7 @@ | [IKibanaSearchResponse](./kibana-plugin-plugins-data-public.ikibanasearchresponse.md) | | | [IndexPatternAttributes](./kibana-plugin-plugins-data-public.indexpatternattributes.md) | Use data plugin interface instead | | [IndexPatternTypeMeta](./kibana-plugin-plugins-data-public.indexpatterntypemeta.md) | | -| [IRequestTypesMap](./kibana-plugin-plugins-data-public.irequesttypesmap.md) | | -| [IResponseTypesMap](./kibana-plugin-plugins-data-public.iresponsetypesmap.md) | | | [ISearchOptions](./kibana-plugin-plugins-data-public.isearchoptions.md) | | -| [ISearchStrategy](./kibana-plugin-plugins-data-public.isearchstrategy.md) | Search strategy interface contains a search method that takes in a request and returns a promise that resolves to a response. | -| [ISyncSearchRequest](./kibana-plugin-plugins-data-public.isyncsearchrequest.md) | | | [KueryNode](./kibana-plugin-plugins-data-public.kuerynode.md) | | | [OptionedValueProp](./kibana-plugin-plugins-data-public.optionedvalueprop.md) | | | [Query](./kibana-plugin-plugins-data-public.query.md) | | @@ -83,6 +78,7 @@ | [RefreshInterval](./kibana-plugin-plugins-data-public.refreshinterval.md) | | | [SavedQuery](./kibana-plugin-plugins-data-public.savedquery.md) | | | [SavedQueryService](./kibana-plugin-plugins-data-public.savedqueryservice.md) | | +| [SearchInterceptorDeps](./kibana-plugin-plugins-data-public.searchinterceptordeps.md) | | | [SearchSourceFields](./kibana-plugin-plugins-data-public.searchsourcefields.md) | | | [TabbedAggColumn](./kibana-plugin-plugins-data-public.tabbedaggcolumn.md) | \* | | [TabbedTable](./kibana-plugin-plugins-data-public.tabbedtable.md) | \* | @@ -118,7 +114,6 @@ | [QueryStringInput](./kibana-plugin-plugins-data-public.querystringinput.md) | | | [search](./kibana-plugin-plugins-data-public.search.md) | | | [SearchBar](./kibana-plugin-plugins-data-public.searchbar.md) | | -| [SYNC\_SEARCH\_STRATEGY](./kibana-plugin-plugins-data-public.sync_search_strategy.md) | | | [syncQueryStateWithUrl](./kibana-plugin-plugins-data-public.syncquerystatewithurl.md) | Helper to setup syncing of global data with the URL | | [UI\_SETTINGS](./kibana-plugin-plugins-data-public.ui_settings.md) | | diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.querystringinput.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.querystringinput.md index a25f4a0c373b2..e139b326b7500 100644 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.querystringinput.md +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.querystringinput.md @@ -7,5 +7,5 @@ Signature: ```typescript -QueryStringInput: React.FC> +QueryStringInput: React.FC> ``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.search.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.search.md index 67c4eac67a9e6..6c8f7fbdb170b 100644 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.search.md +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.search.md @@ -21,6 +21,7 @@ search: { })[]; InvalidEsCalendarIntervalError: typeof InvalidEsCalendarIntervalError; InvalidEsIntervalFormatError: typeof InvalidEsIntervalFormatError; + Ipv4Address: typeof Ipv4Address; isDateHistogramBucketAggConfig: typeof isDateHistogramBucketAggConfig; isNumberType: (agg: import("./search").AggConfig) => boolean; isStringType: (agg: import("./search").AggConfig) => boolean; diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchinterceptor._constructor_.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchinterceptor._constructor_.md index 6eabefb9eb912..6f5dd1076fb40 100644 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchinterceptor._constructor_.md +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchinterceptor._constructor_.md @@ -9,14 +9,13 @@ This class should be instantiated with a `requestTimeout` corresponding with how Signature: ```typescript -constructor(toasts: ToastsStart, application: ApplicationStart, requestTimeout?: number | undefined); +constructor(deps: SearchInterceptorDeps, requestTimeout?: number | undefined); ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | -| toasts | ToastsStart | | -| application | ApplicationStart | | +| deps | SearchInterceptorDeps | | | requestTimeout | number | undefined | | diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchinterceptor.application.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchinterceptor.application.md deleted file mode 100644 index e44910161aa60..0000000000000 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchinterceptor.application.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [SearchInterceptor](./kibana-plugin-plugins-data-public.searchinterceptor.md) > [application](./kibana-plugin-plugins-data-public.searchinterceptor.application.md) - -## SearchInterceptor.application property - -Signature: - -```typescript -protected readonly application: ApplicationStart; -``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchinterceptor.deps.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchinterceptor.deps.md new file mode 100644 index 0000000000000..b517fb036798a --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchinterceptor.deps.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [SearchInterceptor](./kibana-plugin-plugins-data-public.searchinterceptor.md) > [deps](./kibana-plugin-plugins-data-public.searchinterceptor.deps.md) + +## SearchInterceptor.deps property + +Signature: + +```typescript +protected readonly deps: SearchInterceptorDeps; +``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchinterceptor.getpendingcount_.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchinterceptor.getpendingcount_.md index 59b107c92424f..db2c5d6957ad7 100644 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchinterceptor.getpendingcount_.md +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchinterceptor.getpendingcount_.md @@ -9,5 +9,5 @@ Returns an `Observable` over the current number of pending searches. This could Signature: ```typescript -getPendingCount$: () => import("rxjs").Observable; +getPendingCount$: () => Observable; ``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchinterceptor.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchinterceptor.md index 0c7b123be72af..4d2fac0287035 100644 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchinterceptor.md +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchinterceptor.md @@ -14,20 +14,28 @@ export declare class SearchInterceptor | Constructor | Modifiers | Description | | --- | --- | --- | -| [(constructor)(toasts, application, requestTimeout)](./kibana-plugin-plugins-data-public.searchinterceptor._constructor_.md) | | This class should be instantiated with a requestTimeout corresponding with how many ms after requests are initiated that they should automatically cancel. | +| [(constructor)(deps, requestTimeout)](./kibana-plugin-plugins-data-public.searchinterceptor._constructor_.md) | | This class should be instantiated with a requestTimeout corresponding with how many ms after requests are initiated that they should automatically cancel. | ## Properties | Property | Modifiers | Type | Description | | --- | --- | --- | --- | | [abortController](./kibana-plugin-plugins-data-public.searchinterceptor.abortcontroller.md) | | AbortController | abortController used to signal all searches to abort. | -| [application](./kibana-plugin-plugins-data-public.searchinterceptor.application.md) | | ApplicationStart | | -| [getPendingCount$](./kibana-plugin-plugins-data-public.searchinterceptor.getpendingcount_.md) | | () => import("rxjs").Observable<number> | Returns an Observable over the current number of pending searches. This could mean that one of the search requests is still in flight, or that it has only received partial responses. | +| [deps](./kibana-plugin-plugins-data-public.searchinterceptor.deps.md) | | SearchInterceptorDeps | | +| [getPendingCount$](./kibana-plugin-plugins-data-public.searchinterceptor.getpendingcount_.md) | | () => Observable<number> | Returns an Observable over the current number of pending searches. This could mean that one of the search requests is still in flight, or that it has only received partial responses. | | [hideToast](./kibana-plugin-plugins-data-public.searchinterceptor.hidetoast.md) | | () => void | | | [longRunningToast](./kibana-plugin-plugins-data-public.searchinterceptor.longrunningtoast.md) | | Toast | The current long-running toast (if there is one). | +| [pendingCount](./kibana-plugin-plugins-data-public.searchinterceptor.pendingcount.md) | | number | The number of pending search requests. | +| [pendingCount$](./kibana-plugin-plugins-data-public.searchinterceptor.pendingcount_.md) | | BehaviorSubject<number> | Observable that emits when the number of pending requests changes. | | [requestTimeout](./kibana-plugin-plugins-data-public.searchinterceptor.requesttimeout.md) | | number | undefined | | -| [search](./kibana-plugin-plugins-data-public.searchinterceptor.search.md) | | (search: ISearchGeneric, request: IKibanaSearchRequest, options?: ISearchOptions | undefined) => import("rxjs").Observable<import("../../common/search").IEsSearchResponse<unknown>> | Searches using the given search method. Overrides the AbortSignal with one that will abort either when cancelPending is called, when the request times out, or when the original AbortSignal is aborted. Updates the pendingCount when the request is started/finalized. | | [showToast](./kibana-plugin-plugins-data-public.searchinterceptor.showtoast.md) | | () => void | | -| [timeoutSubscriptions](./kibana-plugin-plugins-data-public.searchinterceptor.timeoutsubscriptions.md) | | Set<Subscription> | The subscriptions from scheduling the automatic timeout for each request. | -| [toasts](./kibana-plugin-plugins-data-public.searchinterceptor.toasts.md) | | ToastsStart | | +| [timeoutSubscriptions](./kibana-plugin-plugins-data-public.searchinterceptor.timeoutsubscriptions.md) | | Subscription | The subscriptions from scheduling the automatic timeout for each request. | + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [runSearch(request, combinedSignal)](./kibana-plugin-plugins-data-public.searchinterceptor.runsearch.md) | | | +| [search(request, options)](./kibana-plugin-plugins-data-public.searchinterceptor.search.md) | | Searches using the given search method. Overrides the AbortSignal with one that will abort either when cancelPending is called, when the request times out, or when the original AbortSignal is aborted. Updates the pendingCount when the request is started/finalized. | +| [setupTimers(options)](./kibana-plugin-plugins-data-public.searchinterceptor.setuptimers.md) | | | diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchinterceptor.pendingcount.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchinterceptor.pendingcount.md new file mode 100644 index 0000000000000..7dd2bd3e6703f --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchinterceptor.pendingcount.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [SearchInterceptor](./kibana-plugin-plugins-data-public.searchinterceptor.md) > [pendingCount](./kibana-plugin-plugins-data-public.searchinterceptor.pendingcount.md) + +## SearchInterceptor.pendingCount property + +The number of pending search requests. + +Signature: + +```typescript +protected pendingCount: number; +``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchinterceptor.pendingcount_.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchinterceptor.pendingcount_.md new file mode 100644 index 0000000000000..dad0fca0bfe08 --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchinterceptor.pendingcount_.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [SearchInterceptor](./kibana-plugin-plugins-data-public.searchinterceptor.md) > [pendingCount$](./kibana-plugin-plugins-data-public.searchinterceptor.pendingcount_.md) + +## SearchInterceptor.pendingCount$ property + +Observable that emits when the number of pending requests changes. + +Signature: + +```typescript +protected pendingCount$: BehaviorSubject; +``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchinterceptor.runsearch.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchinterceptor.runsearch.md new file mode 100644 index 0000000000000..385d4f6a238d4 --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchinterceptor.runsearch.md @@ -0,0 +1,23 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [SearchInterceptor](./kibana-plugin-plugins-data-public.searchinterceptor.md) > [runSearch](./kibana-plugin-plugins-data-public.searchinterceptor.runsearch.md) + +## SearchInterceptor.runSearch() method + +Signature: + +```typescript +protected runSearch(request: IEsSearchRequest, combinedSignal: AbortSignal): Observable; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| request | IEsSearchRequest | | +| combinedSignal | AbortSignal | | + +Returns: + +`Observable` + diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchinterceptor.search.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchinterceptor.search.md index 80c98ab84fb40..38ddda7b4e184 100644 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchinterceptor.search.md +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchinterceptor.search.md @@ -2,12 +2,24 @@ [Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [SearchInterceptor](./kibana-plugin-plugins-data-public.searchinterceptor.md) > [search](./kibana-plugin-plugins-data-public.searchinterceptor.search.md) -## SearchInterceptor.search property +## SearchInterceptor.search() method Searches using the given `search` method. Overrides the `AbortSignal` with one that will abort either when `cancelPending` is called, when the request times out, or when the original `AbortSignal` is aborted. Updates the `pendingCount` when the request is started/finalized. Signature: ```typescript -search: (search: ISearchGeneric, request: IKibanaSearchRequest, options?: ISearchOptions | undefined) => import("rxjs").Observable>; +search(request: IEsSearchRequest, options?: ISearchOptions): Observable; ``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| request | IEsSearchRequest | | +| options | ISearchOptions | | + +Returns: + +`Observable` + diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchinterceptor.setuptimers.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchinterceptor.setuptimers.md new file mode 100644 index 0000000000000..fe35655258b4c --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchinterceptor.setuptimers.md @@ -0,0 +1,28 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [SearchInterceptor](./kibana-plugin-plugins-data-public.searchinterceptor.md) > [setupTimers](./kibana-plugin-plugins-data-public.searchinterceptor.setuptimers.md) + +## SearchInterceptor.setupTimers() method + +Signature: + +```typescript +protected setupTimers(options?: ISearchOptions): { + combinedSignal: AbortSignal; + cleanup: () => void; + }; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| options | ISearchOptions | | + +Returns: + +`{ + combinedSignal: AbortSignal; + cleanup: () => void; + }` + diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchinterceptor.timeoutsubscriptions.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchinterceptor.timeoutsubscriptions.md index 072f67591f097..12f200e037784 100644 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchinterceptor.timeoutsubscriptions.md +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchinterceptor.timeoutsubscriptions.md @@ -9,5 +9,5 @@ The subscriptions from scheduling the automatic timeout for each request. Signature: ```typescript -protected timeoutSubscriptions: Set; +protected timeoutSubscriptions: Subscription; ``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchinterceptor.toasts.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchinterceptor.toasts.md deleted file mode 100644 index 4953d17c89c39..0000000000000 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchinterceptor.toasts.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [SearchInterceptor](./kibana-plugin-plugins-data-public.searchinterceptor.md) > [toasts](./kibana-plugin-plugins-data-public.searchinterceptor.toasts.md) - -## SearchInterceptor.toasts property - -Signature: - -```typescript -protected readonly toasts: ToastsStart; -``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchinterceptordeps.application.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchinterceptordeps.application.md new file mode 100644 index 0000000000000..a8cd1b170a595 --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchinterceptordeps.application.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [SearchInterceptorDeps](./kibana-plugin-plugins-data-public.searchinterceptordeps.md) > [application](./kibana-plugin-plugins-data-public.searchinterceptordeps.application.md) + +## SearchInterceptorDeps.application property + +Signature: + +```typescript +application: ApplicationStart; +``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchinterceptordeps.http.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchinterceptordeps.http.md new file mode 100644 index 0000000000000..1146179c13d63 --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchinterceptordeps.http.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [SearchInterceptorDeps](./kibana-plugin-plugins-data-public.searchinterceptordeps.md) > [http](./kibana-plugin-plugins-data-public.searchinterceptordeps.http.md) + +## SearchInterceptorDeps.http property + +Signature: + +```typescript +http: CoreStart['http']; +``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchinterceptordeps.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchinterceptordeps.md new file mode 100644 index 0000000000000..abd57f3a9568b --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchinterceptordeps.md @@ -0,0 +1,21 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [SearchInterceptorDeps](./kibana-plugin-plugins-data-public.searchinterceptordeps.md) + +## SearchInterceptorDeps interface + +Signature: + +```typescript +export interface SearchInterceptorDeps +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [application](./kibana-plugin-plugins-data-public.searchinterceptordeps.application.md) | ApplicationStart | | +| [http](./kibana-plugin-plugins-data-public.searchinterceptordeps.http.md) | CoreStart['http'] | | +| [toasts](./kibana-plugin-plugins-data-public.searchinterceptordeps.toasts.md) | ToastsStart | | +| [uiSettings](./kibana-plugin-plugins-data-public.searchinterceptordeps.uisettings.md) | CoreStart['uiSettings'] | | + diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchinterceptordeps.toasts.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchinterceptordeps.toasts.md new file mode 100644 index 0000000000000..0023b34af10c3 --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchinterceptordeps.toasts.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [SearchInterceptorDeps](./kibana-plugin-plugins-data-public.searchinterceptordeps.md) > [toasts](./kibana-plugin-plugins-data-public.searchinterceptordeps.toasts.md) + +## SearchInterceptorDeps.toasts property + +Signature: + +```typescript +toasts: ToastsStart; +``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchinterceptordeps.uisettings.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchinterceptordeps.uisettings.md new file mode 100644 index 0000000000000..425e177ec9300 --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchinterceptordeps.uisettings.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [SearchInterceptorDeps](./kibana-plugin-plugins-data-public.searchinterceptordeps.md) > [uiSettings](./kibana-plugin-plugins-data-public.searchinterceptordeps.uisettings.md) + +## SearchInterceptorDeps.uiSettings property + +Signature: + +```typescript +uiSettings: CoreStart['uiSettings']; +``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.sync_search_strategy.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.sync_search_strategy.md deleted file mode 100644 index 3681fe6d6274c..0000000000000 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.sync_search_strategy.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [SYNC\_SEARCH\_STRATEGY](./kibana-plugin-plugins-data-public.sync_search_strategy.md) - -## SYNC\_SEARCH\_STRATEGY variable - -Signature: - -```typescript -SYNC_SEARCH_STRATEGY = "SYNC_SEARCH_STRATEGY" -``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.ui_settings.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.ui_settings.md index a48f4920b3d26..e515c3513df6c 100644 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.ui_settings.md +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.ui_settings.md @@ -8,32 +8,33 @@ ```typescript UI_SETTINGS: { - META_FIELDS: string; - DOC_HIGHLIGHT: string; - QUERY_STRING_OPTIONS: string; - QUERY_ALLOW_LEADING_WILDCARDS: string; - SEARCH_QUERY_LANGUAGE: string; - SORT_OPTIONS: string; - COURIER_IGNORE_FILTER_IF_FIELD_NOT_IN_INDEX: string; - COURIER_SET_REQUEST_PREFERENCE: string; - COURIER_CUSTOM_REQUEST_PREFERENCE: string; - COURIER_MAX_CONCURRENT_SHARD_REQUESTS: string; - COURIER_BATCH_SEARCHES: string; - SEARCH_INCLUDE_FROZEN: string; - HISTOGRAM_BAR_TARGET: string; - HISTOGRAM_MAX_BARS: string; - HISTORY_LIMIT: string; - SHORT_DOTS_ENABLE: string; - FORMAT_DEFAULT_TYPE_MAP: string; - FORMAT_NUMBER_DEFAULT_PATTERN: string; - FORMAT_PERCENT_DEFAULT_PATTERN: string; - FORMAT_BYTES_DEFAULT_PATTERN: string; - FORMAT_CURRENCY_DEFAULT_PATTERN: string; - FORMAT_NUMBER_DEFAULT_LOCALE: string; - TIMEPICKER_REFRESH_INTERVAL_DEFAULTS: string; - TIMEPICKER_QUICK_RANGES: string; - INDEXPATTERN_PLACEHOLDER: string; - FILTERS_PINNED_BY_DEFAULT: string; - FILTERS_EDITOR_SUGGEST_VALUES: string; + readonly META_FIELDS: "metaFields"; + readonly DOC_HIGHLIGHT: "doc_table:highlight"; + readonly QUERY_STRING_OPTIONS: "query:queryString:options"; + readonly QUERY_ALLOW_LEADING_WILDCARDS: "query:allowLeadingWildcards"; + readonly SEARCH_QUERY_LANGUAGE: "search:queryLanguage"; + readonly SORT_OPTIONS: "sort:options"; + readonly COURIER_IGNORE_FILTER_IF_FIELD_NOT_IN_INDEX: "courier:ignoreFilterIfFieldNotInIndex"; + readonly COURIER_SET_REQUEST_PREFERENCE: "courier:setRequestPreference"; + readonly COURIER_CUSTOM_REQUEST_PREFERENCE: "courier:customRequestPreference"; + readonly COURIER_MAX_CONCURRENT_SHARD_REQUESTS: "courier:maxConcurrentShardRequests"; + readonly COURIER_BATCH_SEARCHES: "courier:batchSearches"; + readonly SEARCH_INCLUDE_FROZEN: "search:includeFrozen"; + readonly HISTOGRAM_BAR_TARGET: "histogram:barTarget"; + readonly HISTOGRAM_MAX_BARS: "histogram:maxBars"; + readonly HISTORY_LIMIT: "history:limit"; + readonly SHORT_DOTS_ENABLE: "shortDots:enable"; + readonly FORMAT_DEFAULT_TYPE_MAP: "format:defaultTypeMap"; + readonly FORMAT_NUMBER_DEFAULT_PATTERN: "format:number:defaultPattern"; + readonly FORMAT_PERCENT_DEFAULT_PATTERN: "format:percent:defaultPattern"; + readonly FORMAT_BYTES_DEFAULT_PATTERN: "format:bytes:defaultPattern"; + readonly FORMAT_CURRENCY_DEFAULT_PATTERN: "format:currency:defaultPattern"; + readonly FORMAT_NUMBER_DEFAULT_LOCALE: "format:number:defaultLocale"; + readonly TIMEPICKER_REFRESH_INTERVAL_DEFAULTS: "timepicker:refreshIntervalDefaults"; + readonly TIMEPICKER_QUICK_RANGES: "timepicker:quickRanges"; + readonly TIMEPICKER_TIME_DEFAULTS: "timepicker:timeDefaults"; + readonly INDEXPATTERN_PLACEHOLDER: "indexPattern:placeholder"; + readonly FILTERS_PINNED_BY_DEFAULT: "filters:pinnedByDefault"; + readonly FILTERS_EDITOR_SUGGEST_VALUES: "filterEditor:suggestValues"; } ``` diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.search.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.search.md index 6020498fdcb6d..09563358100b3 100644 --- a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.search.md +++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.search.md @@ -12,6 +12,7 @@ search: { dateHistogramInterval: typeof dateHistogramInterval; InvalidEsCalendarIntervalError: typeof InvalidEsCalendarIntervalError; InvalidEsIntervalFormatError: typeof InvalidEsIntervalFormatError; + Ipv4Address: typeof Ipv4Address; isValidEsInterval: typeof isValidEsInterval; isValidInterval: typeof isValidInterval; parseEsInterval: typeof parseEsInterval; diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.ui_settings.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.ui_settings.md index 855cfd11d00ea..e419b64cd43aa 100644 --- a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.ui_settings.md +++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.ui_settings.md @@ -8,32 +8,33 @@ ```typescript UI_SETTINGS: { - META_FIELDS: string; - DOC_HIGHLIGHT: string; - QUERY_STRING_OPTIONS: string; - QUERY_ALLOW_LEADING_WILDCARDS: string; - SEARCH_QUERY_LANGUAGE: string; - SORT_OPTIONS: string; - COURIER_IGNORE_FILTER_IF_FIELD_NOT_IN_INDEX: string; - COURIER_SET_REQUEST_PREFERENCE: string; - COURIER_CUSTOM_REQUEST_PREFERENCE: string; - COURIER_MAX_CONCURRENT_SHARD_REQUESTS: string; - COURIER_BATCH_SEARCHES: string; - SEARCH_INCLUDE_FROZEN: string; - HISTOGRAM_BAR_TARGET: string; - HISTOGRAM_MAX_BARS: string; - HISTORY_LIMIT: string; - SHORT_DOTS_ENABLE: string; - FORMAT_DEFAULT_TYPE_MAP: string; - FORMAT_NUMBER_DEFAULT_PATTERN: string; - FORMAT_PERCENT_DEFAULT_PATTERN: string; - FORMAT_BYTES_DEFAULT_PATTERN: string; - FORMAT_CURRENCY_DEFAULT_PATTERN: string; - FORMAT_NUMBER_DEFAULT_LOCALE: string; - TIMEPICKER_REFRESH_INTERVAL_DEFAULTS: string; - TIMEPICKER_QUICK_RANGES: string; - INDEXPATTERN_PLACEHOLDER: string; - FILTERS_PINNED_BY_DEFAULT: string; - FILTERS_EDITOR_SUGGEST_VALUES: string; + readonly META_FIELDS: "metaFields"; + readonly DOC_HIGHLIGHT: "doc_table:highlight"; + readonly QUERY_STRING_OPTIONS: "query:queryString:options"; + readonly QUERY_ALLOW_LEADING_WILDCARDS: "query:allowLeadingWildcards"; + readonly SEARCH_QUERY_LANGUAGE: "search:queryLanguage"; + readonly SORT_OPTIONS: "sort:options"; + readonly COURIER_IGNORE_FILTER_IF_FIELD_NOT_IN_INDEX: "courier:ignoreFilterIfFieldNotInIndex"; + readonly COURIER_SET_REQUEST_PREFERENCE: "courier:setRequestPreference"; + readonly COURIER_CUSTOM_REQUEST_PREFERENCE: "courier:customRequestPreference"; + readonly COURIER_MAX_CONCURRENT_SHARD_REQUESTS: "courier:maxConcurrentShardRequests"; + readonly COURIER_BATCH_SEARCHES: "courier:batchSearches"; + readonly SEARCH_INCLUDE_FROZEN: "search:includeFrozen"; + readonly HISTOGRAM_BAR_TARGET: "histogram:barTarget"; + readonly HISTOGRAM_MAX_BARS: "histogram:maxBars"; + readonly HISTORY_LIMIT: "history:limit"; + readonly SHORT_DOTS_ENABLE: "shortDots:enable"; + readonly FORMAT_DEFAULT_TYPE_MAP: "format:defaultTypeMap"; + readonly FORMAT_NUMBER_DEFAULT_PATTERN: "format:number:defaultPattern"; + readonly FORMAT_PERCENT_DEFAULT_PATTERN: "format:percent:defaultPattern"; + readonly FORMAT_BYTES_DEFAULT_PATTERN: "format:bytes:defaultPattern"; + readonly FORMAT_CURRENCY_DEFAULT_PATTERN: "format:currency:defaultPattern"; + readonly FORMAT_NUMBER_DEFAULT_LOCALE: "format:number:defaultLocale"; + readonly TIMEPICKER_REFRESH_INTERVAL_DEFAULTS: "timepicker:refreshIntervalDefaults"; + readonly TIMEPICKER_QUICK_RANGES: "timepicker:quickRanges"; + readonly TIMEPICKER_TIME_DEFAULTS: "timepicker:timeDefaults"; + readonly INDEXPATTERN_PLACEHOLDER: "indexPattern:placeholder"; + readonly FILTERS_PINNED_BY_DEFAULT: "filters:pinnedByDefault"; + readonly FILTERS_EDITOR_SUGGEST_VALUES: "filterEditor:suggestValues"; } ``` diff --git a/docs/development/plugins/kibana_utils/common/state_containers/kibana-plugin-plugins-kibana_utils-common-state_containers.comparator.md b/docs/development/plugins/kibana_utils/common/state_containers/kibana-plugin-plugins-kibana_utils-common-state_containers.comparator.md index 12af33756fb19..f429866848aa4 100644 --- a/docs/development/plugins/kibana_utils/common/state_containers/kibana-plugin-plugins-kibana_utils-common-state_containers.comparator.md +++ b/docs/development/plugins/kibana_utils/common/state_containers/kibana-plugin-plugins-kibana_utils-common-state_containers.comparator.md @@ -4,7 +4,7 @@ ## Comparator type -Used to compare state. see [useContainerSelector](./kibana-plugin-plugins-kibana_utils-common-state_containers.usecontainerselector.md) +Used to compare state, see [useContainerSelector](./kibana-plugin-plugins-kibana_utils-common-state_containers.usecontainerselector.md). Signature: diff --git a/docs/development/plugins/kibana_utils/common/state_containers/kibana-plugin-plugins-kibana_utils-common-state_containers.connect.md b/docs/development/plugins/kibana_utils/common/state_containers/kibana-plugin-plugins-kibana_utils-common-state_containers.connect.md index e05f1fb392fe6..ca68c47ddaa7e 100644 --- a/docs/development/plugins/kibana_utils/common/state_containers/kibana-plugin-plugins-kibana_utils-common-state_containers.connect.md +++ b/docs/development/plugins/kibana_utils/common/state_containers/kibana-plugin-plugins-kibana_utils-common-state_containers.connect.md @@ -4,7 +4,7 @@ ## Connect type -Similar to `connect` from react-redux, allows to map state from state container to component's props +Similar to `connect` from react-redux, allows to map state from state container to component's props. Signature: diff --git a/docs/development/plugins/kibana_utils/common/state_containers/kibana-plugin-plugins-kibana_utils-common-state_containers.createstatecontainer_1.md b/docs/development/plugins/kibana_utils/common/state_containers/kibana-plugin-plugins-kibana_utils-common-state_containers.createstatecontainer_1.md index 794bf63588312..8aadd0a234a8a 100644 --- a/docs/development/plugins/kibana_utils/common/state_containers/kibana-plugin-plugins-kibana_utils-common-state_containers.createstatecontainer_1.md +++ b/docs/development/plugins/kibana_utils/common/state_containers/kibana-plugin-plugins-kibana_utils-common-state_containers.createstatecontainer_1.md @@ -4,7 +4,7 @@ ## createStateContainer() function -Creates a state container with transitions, but without selectors +Creates a state container with transitions, but without selectors. Signature: diff --git a/docs/development/plugins/kibana_utils/common/state_containers/kibana-plugin-plugins-kibana_utils-common-state_containers.createstatecontainer_2.md b/docs/development/plugins/kibana_utils/common/state_containers/kibana-plugin-plugins-kibana_utils-common-state_containers.createstatecontainer_2.md index 1946baae202f1..bb06ca18e808a 100644 --- a/docs/development/plugins/kibana_utils/common/state_containers/kibana-plugin-plugins-kibana_utils-common-state_containers.createstatecontainer_2.md +++ b/docs/development/plugins/kibana_utils/common/state_containers/kibana-plugin-plugins-kibana_utils-common-state_containers.createstatecontainer_2.md @@ -4,7 +4,7 @@ ## createStateContainer() function -Creates a state container with transitions and selectors +Creates a state container with transitions and selectors. Signature: diff --git a/docs/development/plugins/kibana_utils/common/state_containers/kibana-plugin-plugins-kibana_utils-common-state_containers.createstatecontaineroptions.freeze.md b/docs/development/plugins/kibana_utils/common/state_containers/kibana-plugin-plugins-kibana_utils-common-state_containers.createstatecontaineroptions.freeze.md index 4f772c7c54d08..0b05775ad1458 100644 --- a/docs/development/plugins/kibana_utils/common/state_containers/kibana-plugin-plugins-kibana_utils-common-state_containers.createstatecontaineroptions.freeze.md +++ b/docs/development/plugins/kibana_utils/common/state_containers/kibana-plugin-plugins-kibana_utils-common-state_containers.createstatecontaineroptions.freeze.md @@ -4,7 +4,7 @@ ## CreateStateContainerOptions.freeze property -Function to use when freezing state. Supply identity function. If not provided, default deepFreeze is use. +Function to use when freezing state. Supply identity function. If not provided, default `deepFreeze` is used. Signature: diff --git a/docs/development/plugins/kibana_utils/common/state_containers/kibana-plugin-plugins-kibana_utils-common-state_containers.createstatecontaineroptions.md b/docs/development/plugins/kibana_utils/common/state_containers/kibana-plugin-plugins-kibana_utils-common-state_containers.createstatecontaineroptions.md index d328d306e93e1..8dba1b647edf4 100644 --- a/docs/development/plugins/kibana_utils/common/state_containers/kibana-plugin-plugins-kibana_utils-common-state_containers.createstatecontaineroptions.md +++ b/docs/development/plugins/kibana_utils/common/state_containers/kibana-plugin-plugins-kibana_utils-common-state_containers.createstatecontaineroptions.md @@ -16,5 +16,5 @@ export interface CreateStateContainerOptions | Property | Type | Description | | --- | --- | --- | -| [freeze](./kibana-plugin-plugins-kibana_utils-common-state_containers.createstatecontaineroptions.freeze.md) | <T>(state: T) => T | Function to use when freezing state. Supply identity function. If not provided, default deepFreeze is use. | +| [freeze](./kibana-plugin-plugins-kibana_utils-common-state_containers.createstatecontaineroptions.freeze.md) | <T>(state: T) => T | Function to use when freezing state. Supply identity function. If not provided, default deepFreeze is used. | diff --git a/docs/development/plugins/kibana_utils/common/state_containers/kibana-plugin-plugins-kibana_utils-common-state_containers.md b/docs/development/plugins/kibana_utils/common/state_containers/kibana-plugin-plugins-kibana_utils-common-state_containers.md index e74ff2c6885be..7cabb72cecb31 100644 --- a/docs/development/plugins/kibana_utils/common/state_containers/kibana-plugin-plugins-kibana_utils-common-state_containers.md +++ b/docs/development/plugins/kibana_utils/common/state_containers/kibana-plugin-plugins-kibana_utils-common-state_containers.md @@ -11,8 +11,8 @@ State containers are Redux-store-like objects meant to help you manage state in | Function | Description | | --- | --- | | [createStateContainer(defaultState)](./kibana-plugin-plugins-kibana_utils-common-state_containers.createstatecontainer.md) | Creates a state container without transitions and without selectors. | -| [createStateContainer(defaultState, pureTransitions)](./kibana-plugin-plugins-kibana_utils-common-state_containers.createstatecontainer_1.md) | Creates a state container with transitions, but without selectors | -| [createStateContainer(defaultState, pureTransitions, pureSelectors, options)](./kibana-plugin-plugins-kibana_utils-common-state_containers.createstatecontainer_2.md) | Creates a state container with transitions and selectors | +| [createStateContainer(defaultState, pureTransitions)](./kibana-plugin-plugins-kibana_utils-common-state_containers.createstatecontainer_1.md) | Creates a state container with transitions, but without selectors. | +| [createStateContainer(defaultState, pureTransitions, pureSelectors, options)](./kibana-plugin-plugins-kibana_utils-common-state_containers.createstatecontainer_2.md) | Creates a state container with transitions and selectors. | ## Interfaces @@ -20,8 +20,8 @@ State containers are Redux-store-like objects meant to help you manage state in | --- | --- | | [BaseStateContainer](./kibana-plugin-plugins-kibana_utils-common-state_containers.basestatecontainer.md) | Base state container shape without transitions or selectors | | [CreateStateContainerOptions](./kibana-plugin-plugins-kibana_utils-common-state_containers.createstatecontaineroptions.md) | State container options | -| [ReduxLikeStateContainer](./kibana-plugin-plugins-kibana_utils-common-state_containers.reduxlikestatecontainer.md) | Fully featured state container which matches Redux store interface. Extends [StateContainer](./kibana-plugin-plugins-kibana_utils-common-state_containers.statecontainer.md) Allows to use state container with redux libraries | -| [StateContainer](./kibana-plugin-plugins-kibana_utils-common-state_containers.statecontainer.md) | Fully featured state container with [Selectors](./kibana-plugin-plugins-kibana_utils-common-state_containers.selector.md) and . Extends [BaseStateContainer](./kibana-plugin-plugins-kibana_utils-common-state_containers.basestatecontainer.md) | +| [ReduxLikeStateContainer](./kibana-plugin-plugins-kibana_utils-common-state_containers.reduxlikestatecontainer.md) | Fully featured state container which matches Redux store interface. Extends [StateContainer](./kibana-plugin-plugins-kibana_utils-common-state_containers.statecontainer.md). Allows to use state container with redux libraries. | +| [StateContainer](./kibana-plugin-plugins-kibana_utils-common-state_containers.statecontainer.md) | Fully featured state container with [Selectors](./kibana-plugin-plugins-kibana_utils-common-state_containers.selector.md) and . Extends [BaseStateContainer](./kibana-plugin-plugins-kibana_utils-common-state_containers.basestatecontainer.md). | ## Variables @@ -36,8 +36,8 @@ State containers are Redux-store-like objects meant to help you manage state in | Type Alias | Description | | --- | --- | | [BaseState](./kibana-plugin-plugins-kibana_utils-common-state_containers.basestate.md) | Base [StateContainer](./kibana-plugin-plugins-kibana_utils-common-state_containers.statecontainer.md) state shape | -| [Comparator](./kibana-plugin-plugins-kibana_utils-common-state_containers.comparator.md) | Used to compare state. see [useContainerSelector](./kibana-plugin-plugins-kibana_utils-common-state_containers.usecontainerselector.md) | -| [Connect](./kibana-plugin-plugins-kibana_utils-common-state_containers.connect.md) | Similar to connect from react-redux, allows to map state from state container to component's props | +| [Comparator](./kibana-plugin-plugins-kibana_utils-common-state_containers.comparator.md) | Used to compare state, see [useContainerSelector](./kibana-plugin-plugins-kibana_utils-common-state_containers.usecontainerselector.md). | +| [Connect](./kibana-plugin-plugins-kibana_utils-common-state_containers.connect.md) | Similar to connect from react-redux, allows to map state from state container to component's props. | | [Dispatch](./kibana-plugin-plugins-kibana_utils-common-state_containers.dispatch.md) | Redux like dispatch | | [EnsurePureSelector](./kibana-plugin-plugins-kibana_utils-common-state_containers.ensurepureselector.md) | | | [EnsurePureTransition](./kibana-plugin-plugins-kibana_utils-common-state_containers.ensurepuretransition.md) | | diff --git a/docs/development/plugins/kibana_utils/common/state_containers/kibana-plugin-plugins-kibana_utils-common-state_containers.reduxlikestatecontainer.md b/docs/development/plugins/kibana_utils/common/state_containers/kibana-plugin-plugins-kibana_utils-common-state_containers.reduxlikestatecontainer.md index 0e08119c1eae4..1229f4c2998f8 100644 --- a/docs/development/plugins/kibana_utils/common/state_containers/kibana-plugin-plugins-kibana_utils-common-state_containers.reduxlikestatecontainer.md +++ b/docs/development/plugins/kibana_utils/common/state_containers/kibana-plugin-plugins-kibana_utils-common-state_containers.reduxlikestatecontainer.md @@ -4,7 +4,7 @@ ## ReduxLikeStateContainer interface -Fully featured state container which matches Redux store interface. Extends [StateContainer](./kibana-plugin-plugins-kibana_utils-common-state_containers.statecontainer.md) Allows to use state container with redux libraries +Fully featured state container which matches Redux store interface. Extends [StateContainer](./kibana-plugin-plugins-kibana_utils-common-state_containers.statecontainer.md). Allows to use state container with redux libraries. Signature: diff --git a/docs/development/plugins/kibana_utils/common/state_containers/kibana-plugin-plugins-kibana_utils-common-state_containers.statecontainer.md b/docs/development/plugins/kibana_utils/common/state_containers/kibana-plugin-plugins-kibana_utils-common-state_containers.statecontainer.md index 23ec1c8e5be01..5d47540c824b0 100644 --- a/docs/development/plugins/kibana_utils/common/state_containers/kibana-plugin-plugins-kibana_utils-common-state_containers.statecontainer.md +++ b/docs/development/plugins/kibana_utils/common/state_containers/kibana-plugin-plugins-kibana_utils-common-state_containers.statecontainer.md @@ -4,7 +4,7 @@ ## StateContainer interface -Fully featured state container with [Selectors](./kibana-plugin-plugins-kibana_utils-common-state_containers.selector.md) and . Extends [BaseStateContainer](./kibana-plugin-plugins-kibana_utils-common-state_containers.basestatecontainer.md) +Fully featured state container with [Selectors](./kibana-plugin-plugins-kibana_utils-common-state_containers.selector.md) and . Extends [BaseStateContainer](./kibana-plugin-plugins-kibana_utils-common-state_containers.basestatecontainer.md). Signature: diff --git a/docs/development/plugins/kibana_utils/public/state_sync/index.md b/docs/development/plugins/kibana_utils/public/state_sync/index.md index 4b345d9130bd5..5625e4a4b5eb8 100644 --- a/docs/development/plugins/kibana_utils/public/state_sync/index.md +++ b/docs/development/plugins/kibana_utils/public/state_sync/index.md @@ -8,5 +8,5 @@ | Package | Description | | --- | --- | -| [kibana-plugin-plugins-kibana\_utils-public-state\_sync](./kibana-plugin-plugins-kibana_utils-public-state_sync.md) | State syncing utilities are a set of helpers for syncing your application state with URL or browser storage.They are designed to work together with state containers (). But state containers are not required.State syncing utilities include:- util which: - Subscribes to state changes and pushes them to state storage. - Optionally subscribes to state storage changes and pushes them to state. - Two types of storage compatible with syncState: - - Serializes state and persists it to URL's query param in rison or hashed format. Listens for state updates in the URL and pushes them back to state. - - Serializes state and persists it to browser storage.Refer [here](https://github.com/elastic/kibana/tree/master/src/plugins/kibana_utils/docs/state_sync) for a complete guide and examples | +| [kibana-plugin-plugins-kibana\_utils-public-state\_sync](./kibana-plugin-plugins-kibana_utils-public-state_sync.md) | State syncing utilities are a set of helpers for syncing your application state with browser URL or browser storage.They are designed to work together with [state containers](https://github.com/elastic/kibana/tree/master/src/plugins/kibana_utils/docs/state_containers). But state containers are not required.State syncing utilities include:\* util which: \* Subscribes to state changes and pushes them to state storage. \* Optionally subscribes to state storage changes and pushes them to state. \* Two types of storages compatible with syncState: \* - Serializes state and persists it to URL's query param in rison or hashed format. Listens for state updates in the URL and pushes them back to state. \* - Serializes state and persists it to browser storage.Refer [here](https://github.com/elastic/kibana/tree/master/src/plugins/kibana_utils/docs/state_sync) for a complete guide and examples. | diff --git a/docs/development/plugins/kibana_utils/public/state_sync/kibana-plugin-plugins-kibana_utils-public-state_sync.ikbnurlstatestorage.flush.md b/docs/development/plugins/kibana_utils/public/state_sync/kibana-plugin-plugins-kibana_utils-public-state_sync.ikbnurlstatestorage.flush.md index e0e6aa9be4368..dfeef1cdce22c 100644 --- a/docs/development/plugins/kibana_utils/public/state_sync/kibana-plugin-plugins-kibana_utils-public-state_sync.ikbnurlstatestorage.flush.md +++ b/docs/development/plugins/kibana_utils/public/state_sync/kibana-plugin-plugins-kibana_utils-public-state_sync.ikbnurlstatestorage.flush.md @@ -4,7 +4,7 @@ ## IKbnUrlStateStorage.flush property -synchronously runs any pending url updates returned boolean indicates if change occurred +Synchronously runs any pending url updates, returned boolean indicates if change occurred. Signature: diff --git a/docs/development/plugins/kibana_utils/public/state_sync/kibana-plugin-plugins-kibana_utils-public-state_sync.ikbnurlstatestorage.md b/docs/development/plugins/kibana_utils/public/state_sync/kibana-plugin-plugins-kibana_utils-public-state_sync.ikbnurlstatestorage.md index 56cefebd2acfe..371f7b7c15362 100644 --- a/docs/development/plugins/kibana_utils/public/state_sync/kibana-plugin-plugins-kibana_utils-public-state_sync.ikbnurlstatestorage.md +++ b/docs/development/plugins/kibana_utils/public/state_sync/kibana-plugin-plugins-kibana_utils-public-state_sync.ikbnurlstatestorage.md @@ -4,7 +4,11 @@ ## IKbnUrlStateStorage interface -KbnUrlStateStorage is a state storage for [syncState()](./kibana-plugin-plugins-kibana_utils-public-state_sync.syncstate.md) utility which: 1. Keeps state in sync with the URL. 2. Serializes data and stores it in the URL in one of the supported formats: \* Rison encoded. \* Hashed URL: In URL we store only the hash from the serialized state, but the state itself is stored in sessionStorage. See kibana's advanced option for more context state:storeInSessionStorage 3. Takes care of listening to the URL updates and notifies state about the updates. 4. Takes care of batching URL updates to prevent redundant browser history records. [GUIDE](https://github.com/elastic/kibana/blob/master/src/plugins/kibana_utils/docs/state_sync/storages/kbn_url_storage.md) +KbnUrlStateStorage is a state storage for [syncState()](./kibana-plugin-plugins-kibana_utils-public-state_sync.syncstate.md) utility which: + +1. Keeps state in sync with the URL. 2. Serializes data and stores it in the URL in one of the supported formats: \* Rison encoded. \* Hashed URL: In URL we store only the hash from the serialized state, but the state itself is stored in sessionStorage. See Kibana's `state:storeInSessionStorage` advanced option for more context. 3. Takes care of listening to the URL updates and notifies state about the updates. 4. Takes care of batching URL updates to prevent redundant browser history records. + +[Refer to this guide for more info](https://github.com/elastic/kibana/blob/master/src/plugins/kibana_utils/docs/state_sync/storages/kbn_url_storage.md) Signature: @@ -18,7 +22,7 @@ export interface IKbnUrlStateStorage extends IStateStorage | --- | --- | --- | | [cancel](./kibana-plugin-plugins-kibana_utils-public-state_sync.ikbnurlstatestorage.cancel.md) | () => void | cancels any pending url updates | | [change$](./kibana-plugin-plugins-kibana_utils-public-state_sync.ikbnurlstatestorage.change_.md) | <State = unknown>(key: string) => Observable<State | null> | | -| [flush](./kibana-plugin-plugins-kibana_utils-public-state_sync.ikbnurlstatestorage.flush.md) | (opts?: {
replace?: boolean;
}) => boolean | synchronously runs any pending url updates returned boolean indicates if change occurred | +| [flush](./kibana-plugin-plugins-kibana_utils-public-state_sync.ikbnurlstatestorage.flush.md) | (opts?: {
replace?: boolean;
}) => boolean | Synchronously runs any pending url updates, returned boolean indicates if change occurred. | | [get](./kibana-plugin-plugins-kibana_utils-public-state_sync.ikbnurlstatestorage.get.md) | <State = unknown>(key: string) => State | null | | | [set](./kibana-plugin-plugins-kibana_utils-public-state_sync.ikbnurlstatestorage.set.md) | <State>(key: string, state: State, opts?: {
replace: boolean;
}) => Promise<string | undefined> | | diff --git a/docs/development/plugins/kibana_utils/public/state_sync/kibana-plugin-plugins-kibana_utils-public-state_sync.inullablebasestatecontainer.md b/docs/development/plugins/kibana_utils/public/state_sync/kibana-plugin-plugins-kibana_utils-public-state_sync.inullablebasestatecontainer.md index ca69609936405..d81694484c3c0 100644 --- a/docs/development/plugins/kibana_utils/public/state_sync/kibana-plugin-plugins-kibana_utils-public-state_sync.inullablebasestatecontainer.md +++ b/docs/development/plugins/kibana_utils/public/state_sync/kibana-plugin-plugins-kibana_utils-public-state_sync.inullablebasestatecontainer.md @@ -14,7 +14,7 @@ export interface INullableBaseStateContainer extends Ba ## Remarks -State container for stateSync() have to accept "null" for example, set() implementation could handle null and fallback to some default state this is required to handle edge case, when state in storage becomes empty and syncing is in progress. state container will be notified about about storage becoming empty with null passed in +State container for `stateSync()` have to accept `null` for example, `set()` implementation could handle null and fallback to some default state this is required to handle edge case, when state in storage becomes empty and syncing is in progress. State container will be notified about about storage becoming empty with null passed in. ## Properties diff --git a/docs/development/plugins/kibana_utils/public/state_sync/kibana-plugin-plugins-kibana_utils-public-state_sync.istatestorage.cancel.md b/docs/development/plugins/kibana_utils/public/state_sync/kibana-plugin-plugins-kibana_utils-public-state_sync.istatestorage.cancel.md index ce771d52a6e60..13bacfae9ef56 100644 --- a/docs/development/plugins/kibana_utils/public/state_sync/kibana-plugin-plugins-kibana_utils-public-state_sync.istatestorage.cancel.md +++ b/docs/development/plugins/kibana_utils/public/state_sync/kibana-plugin-plugins-kibana_utils-public-state_sync.istatestorage.cancel.md @@ -4,7 +4,7 @@ ## IStateStorage.cancel property -Optional method to cancel any pending activity syncState() will call it, if it is provided by IStateStorage +Optional method to cancel any pending activity [syncState()](./kibana-plugin-plugins-kibana_utils-public-state_sync.syncstate.md) will call it during destroy, if it is provided by IStateStorage Signature: diff --git a/docs/development/plugins/kibana_utils/public/state_sync/kibana-plugin-plugins-kibana_utils-public-state_sync.istatestorage.md b/docs/development/plugins/kibana_utils/public/state_sync/kibana-plugin-plugins-kibana_utils-public-state_sync.istatestorage.md index 2c34a185fb7b1..82f7949dfdc03 100644 --- a/docs/development/plugins/kibana_utils/public/state_sync/kibana-plugin-plugins-kibana_utils-public-state_sync.istatestorage.md +++ b/docs/development/plugins/kibana_utils/public/state_sync/kibana-plugin-plugins-kibana_utils-public-state_sync.istatestorage.md @@ -18,7 +18,7 @@ export interface IStateStorage | Property | Type | Description | | --- | --- | --- | -| [cancel](./kibana-plugin-plugins-kibana_utils-public-state_sync.istatestorage.cancel.md) | () => void | Optional method to cancel any pending activity syncState() will call it, if it is provided by IStateStorage | +| [cancel](./kibana-plugin-plugins-kibana_utils-public-state_sync.istatestorage.cancel.md) | () => void | Optional method to cancel any pending activity [syncState()](./kibana-plugin-plugins-kibana_utils-public-state_sync.syncstate.md) will call it during destroy, if it is provided by IStateStorage | | [change$](./kibana-plugin-plugins-kibana_utils-public-state_sync.istatestorage.change_.md) | <State = unknown>(key: string) => Observable<State | null> | Should notify when the stored state has changed | | [get](./kibana-plugin-plugins-kibana_utils-public-state_sync.istatestorage.get.md) | <State = unknown>(key: string) => State | null | Should retrieve state from the storage and deserialize it | | [set](./kibana-plugin-plugins-kibana_utils-public-state_sync.istatestorage.set.md) | <State>(key: string, state: State) => any | Take in a state object, should serialise and persist | diff --git a/docs/development/plugins/kibana_utils/public/state_sync/kibana-plugin-plugins-kibana_utils-public-state_sync.md b/docs/development/plugins/kibana_utils/public/state_sync/kibana-plugin-plugins-kibana_utils-public-state_sync.md index 2b02c98e0d605..52919f78a035c 100644 --- a/docs/development/plugins/kibana_utils/public/state_sync/kibana-plugin-plugins-kibana_utils-public-state_sync.md +++ b/docs/development/plugins/kibana_utils/public/state_sync/kibana-plugin-plugins-kibana_utils-public-state_sync.md @@ -4,28 +4,28 @@ ## kibana-plugin-plugins-kibana\_utils-public-state\_sync package -State syncing utilities are a set of helpers for syncing your application state with URL or browser storage. +State syncing utilities are a set of helpers for syncing your application state with browser URL or browser storage. -They are designed to work together with state containers (). But state containers are not required. +They are designed to work together with [state containers](https://github.com/elastic/kibana/tree/master/src/plugins/kibana_utils/docs/state_containers). But state containers are not required. State syncing utilities include: -- [syncState()](./kibana-plugin-plugins-kibana_utils-public-state_sync.syncstate.md) util which: - Subscribes to state changes and pushes them to state storage. - Optionally subscribes to state storage changes and pushes them to state. - Two types of storage compatible with `syncState`: - [IKbnUrlStateStorage](./kibana-plugin-plugins-kibana_utils-public-state_sync.ikbnurlstatestorage.md) - Serializes state and persists it to URL's query param in rison or hashed format. Listens for state updates in the URL and pushes them back to state. - [ISessionStorageStateStorage](./kibana-plugin-plugins-kibana_utils-public-state_sync.isessionstoragestatestorage.md) - Serializes state and persists it to browser storage. +\*[syncState()](./kibana-plugin-plugins-kibana_utils-public-state_sync.syncstate.md) util which: \* Subscribes to state changes and pushes them to state storage. \* Optionally subscribes to state storage changes and pushes them to state. \* Two types of storages compatible with `syncState`: \* [IKbnUrlStateStorage](./kibana-plugin-plugins-kibana_utils-public-state_sync.ikbnurlstatestorage.md) - Serializes state and persists it to URL's query param in rison or hashed format. Listens for state updates in the URL and pushes them back to state. \* [ISessionStorageStateStorage](./kibana-plugin-plugins-kibana_utils-public-state_sync.isessionstoragestatestorage.md) - Serializes state and persists it to browser storage. -Refer [here](https://github.com/elastic/kibana/tree/master/src/plugins/kibana_utils/docs/state_sync) for a complete guide and examples +Refer [here](https://github.com/elastic/kibana/tree/master/src/plugins/kibana_utils/docs/state_sync) for a complete guide and examples. ## Functions | Function | Description | | --- | --- | -| [syncState({ storageKey, stateStorage, stateContainer, })](./kibana-plugin-plugins-kibana_utils-public-state_sync.syncstate.md) | Utility for syncing application state wrapped in state container with some kind of storage (e.g. URL) Refer [here](https://github.com/elastic/kibana/tree/master/src/plugins/kibana_utils/docs/state_sync) for a complete guide and examples | +| [syncState({ storageKey, stateStorage, stateContainer, })](./kibana-plugin-plugins-kibana_utils-public-state_sync.syncstate.md) | Utility for syncing application state wrapped in state container with some kind of storage (e.g. URL)Go [here](https://github.com/elastic/kibana/tree/master/src/plugins/kibana_utils/docs/state_sync) for a complete guide and examples. | | [syncStates(stateSyncConfigs)](./kibana-plugin-plugins-kibana_utils-public-state_sync.syncstates.md) | | ## Interfaces | Interface | Description | | --- | --- | -| [IKbnUrlStateStorage](./kibana-plugin-plugins-kibana_utils-public-state_sync.ikbnurlstatestorage.md) | KbnUrlStateStorage is a state storage for [syncState()](./kibana-plugin-plugins-kibana_utils-public-state_sync.syncstate.md) utility which: 1. Keeps state in sync with the URL. 2. Serializes data and stores it in the URL in one of the supported formats: \* Rison encoded. \* Hashed URL: In URL we store only the hash from the serialized state, but the state itself is stored in sessionStorage. See kibana's advanced option for more context state:storeInSessionStorage 3. Takes care of listening to the URL updates and notifies state about the updates. 4. Takes care of batching URL updates to prevent redundant browser history records. [GUIDE](https://github.com/elastic/kibana/blob/master/src/plugins/kibana_utils/docs/state_sync/storages/kbn_url_storage.md) | +| [IKbnUrlStateStorage](./kibana-plugin-plugins-kibana_utils-public-state_sync.ikbnurlstatestorage.md) | KbnUrlStateStorage is a state storage for [syncState()](./kibana-plugin-plugins-kibana_utils-public-state_sync.syncstate.md) utility which:1. Keeps state in sync with the URL. 2. Serializes data and stores it in the URL in one of the supported formats: \* Rison encoded. \* Hashed URL: In URL we store only the hash from the serialized state, but the state itself is stored in sessionStorage. See Kibana's state:storeInSessionStorage advanced option for more context. 3. Takes care of listening to the URL updates and notifies state about the updates. 4. Takes care of batching URL updates to prevent redundant browser history records.[Refer to this guide for more info](https://github.com/elastic/kibana/blob/master/src/plugins/kibana_utils/docs/state_sync/storages/kbn_url_storage.md) | | [INullableBaseStateContainer](./kibana-plugin-plugins-kibana_utils-public-state_sync.inullablebasestatecontainer.md) | Extension of with one constraint: set state should handle null as incoming state | | [ISessionStorageStateStorage](./kibana-plugin-plugins-kibana_utils-public-state_sync.isessionstoragestatestorage.md) | [IStateStorage](./kibana-plugin-plugins-kibana_utils-public-state_sync.istatestorage.md) for storing state in browser [guide](https://github.com/elastic/kibana/blob/master/src/plugins/kibana_utils/docs/state_sync/storages/session_storage.md) | | [IStateStorage](./kibana-plugin-plugins-kibana_utils-public-state_sync.istatestorage.md) | Any StateStorage have to implement IStateStorage interface StateStorage is responsible for: \* state serialisation / deserialization \* persisting to and retrieving from storageFor an example take a look at already implemented [IKbnUrlStateStorage](./kibana-plugin-plugins-kibana_utils-public-state_sync.ikbnurlstatestorage.md) and [ISessionStorageStateStorage](./kibana-plugin-plugins-kibana_utils-public-state_sync.isessionstoragestatestorage.md) state storages | diff --git a/docs/development/plugins/kibana_utils/public/state_sync/kibana-plugin-plugins-kibana_utils-public-state_sync.syncstate.md b/docs/development/plugins/kibana_utils/public/state_sync/kibana-plugin-plugins-kibana_utils-public-state_sync.syncstate.md index d095c3fffc512..10dc4d0e18746 100644 --- a/docs/development/plugins/kibana_utils/public/state_sync/kibana-plugin-plugins-kibana_utils-public-state_sync.syncstate.md +++ b/docs/development/plugins/kibana_utils/public/state_sync/kibana-plugin-plugins-kibana_utils-public-state_sync.syncstate.md @@ -4,7 +4,9 @@ ## syncState() function -Utility for syncing application state wrapped in state container with some kind of storage (e.g. URL) Refer [here](https://github.com/elastic/kibana/tree/master/src/plugins/kibana_utils/docs/state_sync) for a complete guide and examples +Utility for syncing application state wrapped in state container with some kind of storage (e.g. URL) + +Go [here](https://github.com/elastic/kibana/tree/master/src/plugins/kibana_utils/docs/state_sync) for a complete guide and examples. Signature: @@ -24,13 +26,9 @@ export declare function syncState ({ tab: s.tab }); diff --git a/docs/images/Discover-ContextView.png b/docs/discover/images/Discover-ContextView.png similarity index 100% rename from docs/images/Discover-ContextView.png rename to docs/discover/images/Discover-ContextView.png diff --git a/docs/images/Discover-Start.png b/docs/discover/images/Discover-Start.png similarity index 100% rename from docs/images/Discover-Start.png rename to docs/discover/images/Discover-Start.png diff --git a/docs/images/Expanded-Document.png b/docs/discover/images/Expanded-Document.png similarity index 100% rename from docs/images/Expanded-Document.png rename to docs/discover/images/Expanded-Document.png diff --git a/docs/images/Histogram-Time.png b/docs/discover/images/Histogram-Time.png similarity index 100% rename from docs/images/Histogram-Time.png rename to docs/discover/images/Histogram-Time.png diff --git a/docs/images/NegativeFilter.jpg b/docs/discover/images/NegativeFilter.jpg similarity index 100% rename from docs/images/NegativeFilter.jpg rename to docs/discover/images/NegativeFilter.jpg diff --git a/docs/images/PositiveFilter.jpg b/docs/discover/images/PositiveFilter.jpg similarity index 100% rename from docs/images/PositiveFilter.jpg rename to docs/discover/images/PositiveFilter.jpg diff --git a/docs/images/Timepicker-View.png b/docs/discover/images/Timepicker-View.png similarity index 100% rename from docs/images/Timepicker-View.png rename to docs/discover/images/Timepicker-View.png diff --git a/docs/images/edit_filter_query_json.png b/docs/discover/images/edit_filter_query_json.png similarity index 100% rename from docs/images/edit_filter_query_json.png rename to docs/discover/images/edit_filter_query_json.png diff --git a/docs/images/filter-field.png b/docs/discover/images/filter-field.png similarity index 100% rename from docs/images/filter-field.png rename to docs/discover/images/filter-field.png diff --git a/docs/images/time-filter-bar.png b/docs/discover/images/time-filter-bar.png similarity index 100% rename from docs/images/time-filter-bar.png rename to docs/discover/images/time-filter-bar.png diff --git a/docs/images/time-filter-calendar.png b/docs/discover/images/time-filter-calendar.png similarity index 100% rename from docs/images/time-filter-calendar.png rename to docs/discover/images/time-filter-calendar.png diff --git a/docs/images/tutorial-dashboard.png b/docs/getting-started/images/tutorial-dashboard.png similarity index 100% rename from docs/images/tutorial-dashboard.png rename to docs/getting-started/images/tutorial-dashboard.png diff --git a/docs/images/tutorial-discover-2.png b/docs/getting-started/images/tutorial-discover-2.png similarity index 100% rename from docs/images/tutorial-discover-2.png rename to docs/getting-started/images/tutorial-discover-2.png diff --git a/docs/images/tutorial-discover-3.png b/docs/getting-started/images/tutorial-discover-3.png similarity index 100% rename from docs/images/tutorial-discover-3.png rename to docs/getting-started/images/tutorial-discover-3.png diff --git a/docs/images/tutorial-full-inspect1.png b/docs/getting-started/images/tutorial-full-inspect1.png similarity index 100% rename from docs/images/tutorial-full-inspect1.png rename to docs/getting-started/images/tutorial-full-inspect1.png diff --git a/docs/images/tutorial-pattern-1.png b/docs/getting-started/images/tutorial-pattern-1.png similarity index 100% rename from docs/images/tutorial-pattern-1.png rename to docs/getting-started/images/tutorial-pattern-1.png diff --git a/docs/images/tutorial-visualize-bar-1.5.png b/docs/getting-started/images/tutorial-visualize-bar-1.5.png similarity index 100% rename from docs/images/tutorial-visualize-bar-1.5.png rename to docs/getting-started/images/tutorial-visualize-bar-1.5.png diff --git a/docs/images/tutorial-visualize-map-2.png b/docs/getting-started/images/tutorial-visualize-map-2.png similarity index 100% rename from docs/images/tutorial-visualize-map-2.png rename to docs/getting-started/images/tutorial-visualize-map-2.png diff --git a/docs/images/tutorial-visualize-md-2.png b/docs/getting-started/images/tutorial-visualize-md-2.png similarity index 100% rename from docs/images/tutorial-visualize-md-2.png rename to docs/getting-started/images/tutorial-visualize-md-2.png diff --git a/docs/images/tutorial-visualize-pie-2.png b/docs/getting-started/images/tutorial-visualize-pie-2.png similarity index 100% rename from docs/images/tutorial-visualize-pie-2.png rename to docs/getting-started/images/tutorial-visualize-pie-2.png diff --git a/docs/images/tutorial-visualize-pie-3.png b/docs/getting-started/images/tutorial-visualize-pie-3.png similarity index 100% rename from docs/images/tutorial-visualize-pie-3.png rename to docs/getting-started/images/tutorial-visualize-pie-3.png diff --git a/docs/images/tutorial-visualize-wizard-step-1.png b/docs/getting-started/images/tutorial-visualize-wizard-step-1.png similarity index 100% rename from docs/images/tutorial-visualize-wizard-step-1.png rename to docs/getting-started/images/tutorial-visualize-wizard-step-1.png diff --git a/docs/images/AddFieldButton.jpg b/docs/images/AddFieldButton.jpg deleted file mode 100644 index efd4f50e34a0b..0000000000000 Binary files a/docs/images/AddFieldButton.jpg and /dev/null differ diff --git a/docs/images/CollapseButton.jpg b/docs/images/CollapseButton.jpg deleted file mode 100644 index 38bb350d49746..0000000000000 Binary files a/docs/images/CollapseButton.jpg and /dev/null differ diff --git a/docs/images/Dashboard_Resize_Menu.png b/docs/images/Dashboard_Resize_Menu.png deleted file mode 100644 index 835d23afe40e9..0000000000000 Binary files a/docs/images/Dashboard_Resize_Menu.png and /dev/null differ diff --git a/docs/images/Dashboard_visualization_data.png b/docs/images/Dashboard_visualization_data.png deleted file mode 100644 index 9792fedf1a51a..0000000000000 Binary files a/docs/images/Dashboard_visualization_data.png and /dev/null differ diff --git a/docs/images/Discover-ContextView-FilterMontage.png b/docs/images/Discover-ContextView-FilterMontage.png deleted file mode 100644 index c990d314a6ba1..0000000000000 Binary files a/docs/images/Discover-ContextView-FilterMontage.png and /dev/null differ diff --git a/docs/images/Discover-FieldStats.jpg b/docs/images/Discover-FieldStats.jpg deleted file mode 100644 index 4092b0d7caafd..0000000000000 Binary files a/docs/images/Discover-FieldStats.jpg and /dev/null differ diff --git a/docs/images/Discover-MoveColumn.jpg b/docs/images/Discover-MoveColumn.jpg deleted file mode 100644 index 630f2a0f18dbe..0000000000000 Binary files a/docs/images/Discover-MoveColumn.jpg and /dev/null differ diff --git a/docs/images/EditVis.png b/docs/images/EditVis.png deleted file mode 100644 index 3013168200860..0000000000000 Binary files a/docs/images/EditVis.png and /dev/null differ diff --git a/docs/images/ExistsButton.jpg b/docs/images/ExistsButton.jpg deleted file mode 100644 index 0d4ede0101e73..0000000000000 Binary files a/docs/images/ExistsButton.jpg and /dev/null differ diff --git a/docs/images/ExpandButton.jpg b/docs/images/ExpandButton.jpg deleted file mode 100644 index 1ed389a25dd36..0000000000000 Binary files a/docs/images/ExpandButton.jpg and /dev/null differ diff --git a/docs/images/NYCTA-Table.jpg b/docs/images/NYCTA-Table.jpg deleted file mode 100644 index 6b4987ef4b437..0000000000000 Binary files a/docs/images/NYCTA-Table.jpg and /dev/null differ diff --git a/docs/images/NewDashboard.png b/docs/images/NewDashboard.png deleted file mode 100644 index 08e5159250134..0000000000000 Binary files a/docs/images/NewDashboard.png and /dev/null differ diff --git a/docs/images/RemoveFieldButton.jpg b/docs/images/RemoveFieldButton.jpg deleted file mode 100644 index a260dc3cff62e..0000000000000 Binary files a/docs/images/RemoveFieldButton.jpg and /dev/null differ diff --git a/docs/images/Start-Page.png b/docs/images/Start-Page.png deleted file mode 100644 index 706d4aafd75e2..0000000000000 Binary files a/docs/images/Start-Page.png and /dev/null differ diff --git a/docs/images/TimeFilter.jpg b/docs/images/TimeFilter.jpg deleted file mode 100644 index 1c8700bc05616..0000000000000 Binary files a/docs/images/TimeFilter.jpg and /dev/null differ diff --git a/docs/images/VizEditor.jpg b/docs/images/VizEditor.jpg deleted file mode 100644 index 8aabfe544a0cd..0000000000000 Binary files a/docs/images/VizEditor.jpg and /dev/null differ diff --git a/docs/images/add-column-button.png b/docs/images/add-column-button.png deleted file mode 100644 index 6f44d0facf41f..0000000000000 Binary files a/docs/images/add-column-button.png and /dev/null differ diff --git a/docs/images/add_filter_field.png b/docs/images/add_filter_field.png deleted file mode 100644 index 2052559cf5273..0000000000000 Binary files a/docs/images/add_filter_field.png and /dev/null differ diff --git a/docs/images/add_filter_operator.png b/docs/images/add_filter_operator.png deleted file mode 100644 index fd7d42a9d1b98..0000000000000 Binary files a/docs/images/add_filter_operator.png and /dev/null differ diff --git a/docs/images/add_filter_value.png b/docs/images/add_filter_value.png deleted file mode 100644 index d357c6e5a3013..0000000000000 Binary files a/docs/images/add_filter_value.png and /dev/null differ diff --git a/docs/images/auto_format_after.png b/docs/images/auto_format_after.png deleted file mode 100644 index 018e82951b64f..0000000000000 Binary files a/docs/images/auto_format_after.png and /dev/null differ diff --git a/docs/images/auto_format_before.png b/docs/images/auto_format_before.png deleted file mode 100644 index 2535aa1af5240..0000000000000 Binary files a/docs/images/auto_format_before.png and /dev/null differ diff --git a/docs/images/auto_format_bulk.png b/docs/images/auto_format_bulk.png deleted file mode 100644 index 92cb688473ab7..0000000000000 Binary files a/docs/images/auto_format_bulk.png and /dev/null differ diff --git a/docs/images/autorefresh-intervals.png b/docs/images/autorefresh-intervals.png deleted file mode 100644 index 49be46fefd4aa..0000000000000 Binary files a/docs/images/autorefresh-intervals.png and /dev/null differ diff --git a/docs/images/autorefresh-pause.png b/docs/images/autorefresh-pause.png deleted file mode 100644 index 5a83c4587c961..0000000000000 Binary files a/docs/images/autorefresh-pause.png and /dev/null differ diff --git a/docs/images/autorefresh.png b/docs/images/autorefresh.png deleted file mode 100644 index 9a6225b9007bd..0000000000000 Binary files a/docs/images/autorefresh.png and /dev/null differ diff --git a/docs/images/bar-terms-agg.png b/docs/images/bar-terms-agg.png deleted file mode 100644 index b0b62b9e53213..0000000000000 Binary files a/docs/images/bar-terms-agg.png and /dev/null differ diff --git a/docs/images/bar-terms-subagg.png b/docs/images/bar-terms-subagg.png deleted file mode 100644 index 37cf5486eff1e..0000000000000 Binary files a/docs/images/bar-terms-subagg.png and /dev/null differ diff --git a/docs/images/canvas-align-elements.gif b/docs/images/canvas-align-elements.gif deleted file mode 100644 index 0081308d68795..0000000000000 Binary files a/docs/images/canvas-align-elements.gif and /dev/null differ diff --git a/docs/images/canvas-background-color-picker.gif b/docs/images/canvas-background-color-picker.gif deleted file mode 100644 index bd22941b35f5d..0000000000000 Binary files a/docs/images/canvas-background-color-picker.gif and /dev/null differ diff --git a/docs/images/canvas-click-drag-element.gif b/docs/images/canvas-click-drag-element.gif deleted file mode 100644 index 34f4268caf6f5..0000000000000 Binary files a/docs/images/canvas-click-drag-element.gif and /dev/null differ diff --git a/docs/images/canvas-distribute-elements.gif b/docs/images/canvas-distribute-elements.gif deleted file mode 100644 index 685d76ba22e40..0000000000000 Binary files a/docs/images/canvas-distribute-elements.gif and /dev/null differ diff --git a/docs/images/canvas-download-json.gif b/docs/images/canvas-download-json.gif deleted file mode 100644 index c0c0025e508c1..0000000000000 Binary files a/docs/images/canvas-download-json.gif and /dev/null differ diff --git a/docs/images/canvas-ecommerce.png b/docs/images/canvas-ecommerce.png deleted file mode 100644 index 58c0612881341..0000000000000 Binary files a/docs/images/canvas-ecommerce.png and /dev/null differ diff --git a/docs/images/canvas-element-order.gif b/docs/images/canvas-element-order.gif deleted file mode 100644 index e2911367e7dfa..0000000000000 Binary files a/docs/images/canvas-element-order.gif and /dev/null differ diff --git a/docs/images/canvas-embed_workpad.gif b/docs/images/canvas-embed_workpad.gif deleted file mode 100644 index 97a79d775fe36..0000000000000 Binary files a/docs/images/canvas-embed_workpad.gif and /dev/null differ diff --git a/docs/images/canvas-fullscreen.gif b/docs/images/canvas-fullscreen.gif deleted file mode 100644 index 2eebd3b511000..0000000000000 Binary files a/docs/images/canvas-fullscreen.gif and /dev/null differ diff --git a/docs/images/canvas-move-pixel.gif b/docs/images/canvas-move-pixel.gif deleted file mode 100644 index 228f0f7b7e18c..0000000000000 Binary files a/docs/images/canvas-move-pixel.gif and /dev/null differ diff --git a/docs/images/canvas-resize-element.gif b/docs/images/canvas-resize-element.gif deleted file mode 100644 index d2d2ab06bbb42..0000000000000 Binary files a/docs/images/canvas-resize-element.gif and /dev/null differ diff --git a/docs/images/canvas-zoom.gif b/docs/images/canvas-zoom.gif deleted file mode 100644 index 584118d75a43f..0000000000000 Binary files a/docs/images/canvas-zoom.gif and /dev/null differ diff --git a/docs/images/canvas_create_image.png b/docs/images/canvas_create_image.png deleted file mode 100644 index 7b7c38102e4c9..0000000000000 Binary files a/docs/images/canvas_create_image.png and /dev/null differ diff --git a/docs/images/canvas_map-time-filter.gif b/docs/images/canvas_map-time-filter.gif deleted file mode 100644 index 301d7f4b44158..0000000000000 Binary files a/docs/images/canvas_map-time-filter.gif and /dev/null differ diff --git a/docs/images/canvas_share_autoplay_480.gif b/docs/images/canvas_share_autoplay_480.gif deleted file mode 100644 index 84a108e58d3dc..0000000000000 Binary files a/docs/images/canvas_share_autoplay_480.gif and /dev/null differ diff --git a/docs/images/canvas_share_hidetoolbar_480.gif b/docs/images/canvas_share_hidetoolbar_480.gif deleted file mode 100644 index 282783057776a..0000000000000 Binary files a/docs/images/canvas_share_hidetoolbar_480.gif and /dev/null differ diff --git a/docs/images/canvas_workpad_3_page.png b/docs/images/canvas_workpad_3_page.png deleted file mode 100644 index 9a60ed3d00f60..0000000000000 Binary files a/docs/images/canvas_workpad_3_page.png and /dev/null differ diff --git a/docs/images/canvas_workpad_edit_style.png b/docs/images/canvas_workpad_edit_style.png deleted file mode 100644 index d12ae2cd81b8f..0000000000000 Binary files a/docs/images/canvas_workpad_edit_style.png and /dev/null differ diff --git a/docs/images/canvas_workpad_weblog.png b/docs/images/canvas_workpad_weblog.png deleted file mode 100755 index 7b6ebee5c9554..0000000000000 Binary files a/docs/images/canvas_workpad_weblog.png and /dev/null differ diff --git a/docs/images/controls/controls_options.png b/docs/images/controls/controls_options.png deleted file mode 100644 index aab93d5cd4be0..0000000000000 Binary files a/docs/images/controls/controls_options.png and /dev/null differ diff --git a/docs/images/controls/dropdown_control_editor.png b/docs/images/controls/dropdown_control_editor.png deleted file mode 100644 index 36a360dcd275e..0000000000000 Binary files a/docs/images/controls/dropdown_control_editor.png and /dev/null differ diff --git a/docs/images/controls/range_slider_editor.png b/docs/images/controls/range_slider_editor.png deleted file mode 100644 index 8d6c5a68d1d24..0000000000000 Binary files a/docs/images/controls/range_slider_editor.png and /dev/null differ diff --git a/docs/images/discover-compass.png b/docs/images/discover-compass.png deleted file mode 100644 index 0e3c80ff75a74..0000000000000 Binary files a/docs/images/discover-compass.png and /dev/null differ diff --git a/docs/images/edit_filter_query.png b/docs/images/edit_filter_query.png deleted file mode 100644 index 367a2a8578b8b..0000000000000 Binary files a/docs/images/edit_filter_query.png and /dev/null differ diff --git a/docs/images/filter-actions.png b/docs/images/filter-actions.png deleted file mode 100644 index 92feef2f0dbbb..0000000000000 Binary files a/docs/images/filter-actions.png and /dev/null differ diff --git a/docs/images/filter-allbuttons.png b/docs/images/filter-allbuttons.png deleted file mode 100644 index 3d6951812daa7..0000000000000 Binary files a/docs/images/filter-allbuttons.png and /dev/null differ diff --git a/docs/images/filter-sample.png b/docs/images/filter-sample.png deleted file mode 100644 index 9d2540720a5a2..0000000000000 Binary files a/docs/images/filter-sample.png and /dev/null differ diff --git a/docs/images/goal.png b/docs/images/goal.png deleted file mode 100644 index 04f16e8cd3e74..0000000000000 Binary files a/docs/images/goal.png and /dev/null differ diff --git a/docs/images/history.png b/docs/images/history.png deleted file mode 100644 index 8e6674e1f2c69..0000000000000 Binary files a/docs/images/history.png and /dev/null differ diff --git a/docs/images/labelbutton.png b/docs/images/labelbutton.png deleted file mode 100644 index 287a588802384..0000000000000 Binary files a/docs/images/labelbutton.png and /dev/null differ diff --git a/docs/images/lens_remove_layer.png b/docs/images/lens_remove_layer.png deleted file mode 100644 index 4184e5b846870..0000000000000 Binary files a/docs/images/lens_remove_layer.png and /dev/null differ diff --git a/docs/images/management-index-management.png b/docs/images/management-index-management.png deleted file mode 100644 index 1b1ff9226147c..0000000000000 Binary files a/docs/images/management-index-management.png and /dev/null differ diff --git a/docs/images/management-license.png b/docs/images/management-license.png deleted file mode 100644 index 3347aec8632e4..0000000000000 Binary files a/docs/images/management-license.png and /dev/null differ diff --git a/docs/images/management-upgrade-assistant-8.0.png b/docs/images/management-upgrade-assistant-8.0.png deleted file mode 100644 index 4b37262414039..0000000000000 Binary files a/docs/images/management-upgrade-assistant-8.0.png and /dev/null differ diff --git a/docs/images/management-watcher-buttons.png b/docs/images/management-watcher-buttons.png deleted file mode 100644 index ce114ccf1bac9..0000000000000 Binary files a/docs/images/management-watcher-buttons.png and /dev/null differ diff --git a/docs/images/management_rolled_dashboard.png b/docs/images/management_rolled_dashboard.png deleted file mode 100755 index db731420fb96a..0000000000000 Binary files a/docs/images/management_rolled_dashboard.png and /dev/null differ diff --git a/docs/images/management_rollups_visualization.png b/docs/images/management_rollups_visualization.png deleted file mode 100755 index bba3b6e91a953..0000000000000 Binary files a/docs/images/management_rollups_visualization.png and /dev/null differ diff --git a/docs/images/markdown-example.png b/docs/images/markdown-example.png deleted file mode 100644 index 79daa1298883d..0000000000000 Binary files a/docs/images/markdown-example.png and /dev/null differ diff --git a/docs/images/multiple_requests.png b/docs/images/multiple_requests.png deleted file mode 100644 index e4fd010d54b4b..0000000000000 Binary files a/docs/images/multiple_requests.png and /dev/null differ diff --git a/docs/images/regionmap.png b/docs/images/regionmap.png deleted file mode 100644 index 97f2594e8bee6..0000000000000 Binary files a/docs/images/regionmap.png and /dev/null differ diff --git a/docs/images/search-button.jpg b/docs/images/search-button.jpg deleted file mode 100644 index b7787cac4bf6a..0000000000000 Binary files a/docs/images/search-button.jpg and /dev/null differ diff --git a/docs/images/security_base_all.png b/docs/images/security_base_all.png deleted file mode 100644 index 2aef42132ef21..0000000000000 Binary files a/docs/images/security_base_all.png and /dev/null differ diff --git a/docs/images/share-short-link.png b/docs/images/share-short-link.png deleted file mode 100644 index bf7f7782c4e2a..0000000000000 Binary files a/docs/images/share-short-link.png and /dev/null differ diff --git a/docs/images/time-filter-absolute.jpg b/docs/images/time-filter-absolute.jpg deleted file mode 100644 index bc54d57f0f737..0000000000000 Binary files a/docs/images/time-filter-absolute.jpg and /dev/null differ diff --git a/docs/images/time-filter-relative.jpg b/docs/images/time-filter-relative.jpg deleted file mode 100644 index 77beca3a3fd46..0000000000000 Binary files a/docs/images/time-filter-relative.jpg and /dev/null differ diff --git a/docs/images/time-filter.jpg b/docs/images/time-filter.jpg deleted file mode 100644 index e437f314d849d..0000000000000 Binary files a/docs/images/time-filter.jpg and /dev/null differ diff --git a/docs/images/time-picker-step.jpg b/docs/images/time-picker-step.jpg deleted file mode 100644 index 90c749776bb5d..0000000000000 Binary files a/docs/images/time-picker-step.jpg and /dev/null differ diff --git a/docs/images/time-picker.jpg b/docs/images/time-picker.jpg deleted file mode 100644 index 25830082d5919..0000000000000 Binary files a/docs/images/time-picker.jpg and /dev/null differ diff --git a/docs/images/timelion-arg-help.jpg b/docs/images/timelion-arg-help.jpg deleted file mode 100644 index 3e471c861d46b..0000000000000 Binary files a/docs/images/timelion-arg-help.jpg and /dev/null differ diff --git a/docs/images/timelion-read-only-badge.png b/docs/images/timelion-read-only-badge.png deleted file mode 100644 index 19ffbfed6335a..0000000000000 Binary files a/docs/images/timelion-read-only-badge.png and /dev/null differ diff --git a/docs/images/timelion-save01.png b/docs/images/timelion-save01.png deleted file mode 100644 index 47a33c2d36d43..0000000000000 Binary files a/docs/images/timelion-save01.png and /dev/null differ diff --git a/docs/images/timelion-save02.png b/docs/images/timelion-save02.png deleted file mode 100644 index 348b084ee5259..0000000000000 Binary files a/docs/images/timelion-save02.png and /dev/null differ diff --git a/docs/images/tsvb-annotations.png b/docs/images/tsvb-annotations.png deleted file mode 100644 index 22238db7e9e91..0000000000000 Binary files a/docs/images/tsvb-annotations.png and /dev/null differ diff --git a/docs/images/tsvb-data-tab-derivative-example.png b/docs/images/tsvb-data-tab-derivative-example.png deleted file mode 100644 index 66368baf1e16a..0000000000000 Binary files a/docs/images/tsvb-data-tab-derivative-example.png and /dev/null differ diff --git a/docs/images/tsvb-data-tab-label.png b/docs/images/tsvb-data-tab-label.png deleted file mode 100644 index 43d1fc64f4446..0000000000000 Binary files a/docs/images/tsvb-data-tab-label.png and /dev/null differ diff --git a/docs/images/tsvb-data-tab-series-options-time-series.png b/docs/images/tsvb-data-tab-series-options-time-series.png deleted file mode 100644 index 4c7ddadd38d95..0000000000000 Binary files a/docs/images/tsvb-data-tab-series-options-time-series.png and /dev/null differ diff --git a/docs/images/tsvb-data-tab-series-options.png b/docs/images/tsvb-data-tab-series-options.png deleted file mode 100644 index afadc3349bfe4..0000000000000 Binary files a/docs/images/tsvb-data-tab-series-options.png and /dev/null differ diff --git a/docs/images/tutorial-full-inspect2.png b/docs/images/tutorial-full-inspect2.png deleted file mode 100644 index 23c840f545ec3..0000000000000 Binary files a/docs/images/tutorial-full-inspect2.png and /dev/null differ diff --git a/docs/images/tutorial-sample-discover-2.png b/docs/images/tutorial-sample-discover-2.png deleted file mode 100644 index 4f4b2dc920ccb..0000000000000 Binary files a/docs/images/tutorial-sample-discover-2.png and /dev/null differ diff --git a/docs/images/tutorial-sample-inspect2.png b/docs/images/tutorial-sample-inspect2.png deleted file mode 100644 index b487d21e5cc02..0000000000000 Binary files a/docs/images/tutorial-sample-inspect2.png and /dev/null differ diff --git a/docs/images/tutorial-visualize-pie-1.png b/docs/images/tutorial-visualize-pie-1.png deleted file mode 100644 index 109829c01f28c..0000000000000 Binary files a/docs/images/tutorial-visualize-pie-1.png and /dev/null differ diff --git a/docs/images/visualize-flow.png b/docs/images/visualize-flow.png deleted file mode 100644 index bc00ff52a8d6e..0000000000000 Binary files a/docs/images/visualize-flow.png and /dev/null differ diff --git a/docs/images/visualize-icon.png b/docs/images/visualize-icon.png deleted file mode 100644 index af7ad18e9bf79..0000000000000 Binary files a/docs/images/visualize-icon.png and /dev/null differ diff --git a/docs/images/visualize_coordinate_map_example.png b/docs/images/visualize_coordinate_map_example.png deleted file mode 100644 index 24f03376adade..0000000000000 Binary files a/docs/images/visualize_coordinate_map_example.png and /dev/null differ diff --git a/docs/images/visualize_region_map_example.png b/docs/images/visualize_region_map_example.png deleted file mode 100644 index cf89e92625ece..0000000000000 Binary files a/docs/images/visualize_region_map_example.png and /dev/null differ diff --git a/docs/images/viz-fit-bounds.png b/docs/images/viz-fit-bounds.png deleted file mode 100644 index 9c0ddb89d7ddd..0000000000000 Binary files a/docs/images/viz-fit-bounds.png and /dev/null differ diff --git a/docs/images/viz-lat-long-filter.png b/docs/images/viz-lat-long-filter.png deleted file mode 100644 index 30c139b224565..0000000000000 Binary files a/docs/images/viz-lat-long-filter.png and /dev/null differ diff --git a/docs/images/viz-zoom.png b/docs/images/viz-zoom.png deleted file mode 100644 index 661e053130882..0000000000000 Binary files a/docs/images/viz-zoom.png and /dev/null differ diff --git a/docs/images/follower_indices.png b/docs/management/alerting/images/follower_indices.png similarity index 100% rename from docs/images/follower_indices.png rename to docs/management/alerting/images/follower_indices.png diff --git a/docs/images/actions_icon.png b/docs/management/images/actions_icon.png similarity index 100% rename from docs/images/actions_icon.png rename to docs/management/images/actions_icon.png diff --git a/docs/images/add_remote_cluster.png b/docs/management/images/add_remote_cluster.png similarity index 100% rename from docs/images/add_remote_cluster.png rename to docs/management/images/add_remote_cluster.png diff --git a/docs/images/auto_follow_pattern.png b/docs/management/images/auto_follow_pattern.png similarity index 100% rename from docs/images/auto_follow_pattern.png rename to docs/management/images/auto_follow_pattern.png diff --git a/docs/images/colorformatter.png b/docs/management/images/colorformatter.png similarity index 100% rename from docs/images/colorformatter.png rename to docs/management/images/colorformatter.png diff --git a/docs/images/cross-cluster-replication-list-view.png b/docs/management/images/cross-cluster-replication-list-view.png similarity index 100% rename from docs/images/cross-cluster-replication-list-view.png rename to docs/management/images/cross-cluster-replication-list-view.png diff --git a/docs/images/index-lifecycle-policies-create.png b/docs/management/images/index-lifecycle-policies-create.png similarity index 100% rename from docs/images/index-lifecycle-policies-create.png rename to docs/management/images/index-lifecycle-policies-create.png diff --git a/docs/images/index_lifecycle_policies_options.png b/docs/management/images/index_lifecycle_policies_options.png similarity index 100% rename from docs/images/index_lifecycle_policies_options.png rename to docs/management/images/index_lifecycle_policies_options.png diff --git a/docs/images/index_management_add_policy.png b/docs/management/images/index_management_add_policy.png similarity index 100% rename from docs/images/index_management_add_policy.png rename to docs/management/images/index_management_add_policy.png diff --git a/docs/images/management-create-rollup-bar-chart.png b/docs/management/images/management-create-rollup-bar-chart.png similarity index 100% rename from docs/images/management-create-rollup-bar-chart.png rename to docs/management/images/management-create-rollup-bar-chart.png diff --git a/docs/images/management-index-patterns.png b/docs/management/images/management-index-patterns.png similarity index 100% rename from docs/images/management-index-patterns.png rename to docs/management/images/management-index-patterns.png diff --git a/docs/images/management-index-read-only-badge.png b/docs/management/images/management-index-read-only-badge.png similarity index 100% rename from docs/images/management-index-read-only-badge.png rename to docs/management/images/management-index-read-only-badge.png diff --git a/docs/images/management-index-templates-mappings.png b/docs/management/images/management-index-templates-mappings.png similarity index 100% rename from docs/images/management-index-templates-mappings.png rename to docs/management/images/management-index-templates-mappings.png diff --git a/docs/images/management-index-templates.png b/docs/management/images/management-index-templates.png similarity index 100% rename from docs/images/management-index-templates.png rename to docs/management/images/management-index-templates.png diff --git a/docs/management/images/management-license.png b/docs/management/images/management-license.png new file mode 100644 index 0000000000000..8df9402939b2e Binary files /dev/null and b/docs/management/images/management-license.png differ diff --git a/docs/images/management-rollup-index-pattern.png b/docs/management/images/management-rollup-index-pattern.png similarity index 100% rename from docs/images/management-rollup-index-pattern.png rename to docs/management/images/management-rollup-index-pattern.png diff --git a/docs/images/management-saved-objects.png b/docs/management/images/management-saved-objects.png similarity index 100% rename from docs/images/management-saved-objects.png rename to docs/management/images/management-saved-objects.png diff --git a/docs/images/management-upgrade-assistant-9.0.png b/docs/management/images/management-upgrade-assistant-9.0.png similarity index 100% rename from docs/images/management-upgrade-assistant-9.0.png rename to docs/management/images/management-upgrade-assistant-9.0.png diff --git a/docs/images/management_create_rollup_job.png b/docs/management/images/management_create_rollup_job.png similarity index 100% rename from docs/images/management_create_rollup_job.png rename to docs/management/images/management_create_rollup_job.png diff --git a/docs/images/management_create_rollup_menu.png b/docs/management/images/management_create_rollup_menu.png similarity index 100% rename from docs/images/management_create_rollup_menu.png rename to docs/management/images/management_create_rollup_menu.png diff --git a/docs/images/management_index_create_wizard.png b/docs/management/images/management_index_create_wizard.png similarity index 100% rename from docs/images/management_index_create_wizard.png rename to docs/management/images/management_index_create_wizard.png diff --git a/docs/images/management_index_details.png b/docs/management/images/management_index_details.png similarity index 100% rename from docs/images/management_index_details.png rename to docs/management/images/management_index_details.png diff --git a/docs/images/management_index_labels.png b/docs/management/images/management_index_labels.png similarity index 100% rename from docs/images/management_index_labels.png rename to docs/management/images/management_index_labels.png diff --git a/docs/images/management_rollup_job_dashboard.png b/docs/management/images/management_rollup_job_dashboard.png similarity index 100% rename from docs/images/management_rollup_job_dashboard.png rename to docs/management/images/management_rollup_job_dashboard.png diff --git a/docs/images/management_rollup_job_details.png b/docs/management/images/management_rollup_job_details.png similarity index 100% rename from docs/images/management_rollup_job_details.png rename to docs/management/images/management_rollup_job_details.png diff --git a/docs/images/management_rollup_job_vis.png b/docs/management/images/management_rollup_job_vis.png similarity index 100% rename from docs/images/management_rollup_job_vis.png rename to docs/management/images/management_rollup_job_vis.png diff --git a/docs/images/management_rollup_list.png b/docs/management/images/management_rollup_list.png similarity index 100% rename from docs/images/management_rollup_list.png rename to docs/management/images/management_rollup_list.png diff --git a/docs/images/remote-clusters-list-view.png b/docs/management/images/remote-clusters-list-view.png similarity index 100% rename from docs/images/remote-clusters-list-view.png rename to docs/management/images/remote-clusters-list-view.png diff --git a/docs/images/settings-read-only-badge.png b/docs/management/images/settings-read-only-badge.png similarity index 100% rename from docs/images/settings-read-only-badge.png rename to docs/management/images/settings-read-only-badge.png diff --git a/docs/images/tutorial-ilm-custom-policy.png b/docs/management/images/tutorial-ilm-custom-policy.png similarity index 100% rename from docs/images/tutorial-ilm-custom-policy.png rename to docs/management/images/tutorial-ilm-custom-policy.png diff --git a/docs/images/tutorial-ilm-delete-phase-creation.png b/docs/management/images/tutorial-ilm-delete-phase-creation.png similarity index 100% rename from docs/images/tutorial-ilm-delete-phase-creation.png rename to docs/management/images/tutorial-ilm-delete-phase-creation.png diff --git a/docs/images/tutorial-ilm-delete-rollover.png b/docs/management/images/tutorial-ilm-delete-rollover.png similarity index 100% rename from docs/images/tutorial-ilm-delete-rollover.png rename to docs/management/images/tutorial-ilm-delete-rollover.png diff --git a/docs/images/tutorial-ilm-hotphaserollover-default.png b/docs/management/images/tutorial-ilm-hotphaserollover-default.png similarity index 100% rename from docs/images/tutorial-ilm-hotphaserollover-default.png rename to docs/management/images/tutorial-ilm-hotphaserollover-default.png diff --git a/docs/images/tutorial-ilm-modify-default-warm-phase-rollover.png b/docs/management/images/tutorial-ilm-modify-default-warm-phase-rollover.png similarity index 100% rename from docs/images/tutorial-ilm-modify-default-warm-phase-rollover.png rename to docs/management/images/tutorial-ilm-modify-default-warm-phase-rollover.png diff --git a/docs/management/managing-licenses.asciidoc b/docs/management/managing-licenses.asciidoc index 6cd6657a0aaeb..99cfd12eeade9 100644 --- a/docs/management/managing-licenses.asciidoc +++ b/docs/management/managing-licenses.asciidoc @@ -1,28 +1,27 @@ [[managing-licenses]] == License Management -When you install the default distribution of {kib}, you receive a basic license -with no expiration date. For the full list of free features that are included in -the basic license, refer to https://www.elastic.co/subscriptions[the subscription page]. +When you install the default distribution of {kib}, you receive free features +with no expiration date. For the full list of features, refer to +{subscriptions}. -If you want to try out the full set of platinum features, you can activate a -30-day trial license. To view the -status of your license, start a trial, or install a new license, open the menu, then go to *Stack Management > {es} > License Management*. +If you want to try out the full set of features, you can activate a free 30-day +trial. To view the status of your license, start a trial, or install a new +license, open the menu, then go to *Stack Management > {es} > License Management*. NOTE: You can start a trial only if your cluster has not already activated a trial license for the current major product version. For example, if you have already activated a trial for 6.0, you cannot start a new trial until -7.0. You can, however, contact `info@elastic.co` to request an extended trial -license. +7.0. You can, however, request an extended trial at {extendtrial}. When you activate a new license level, new features appear in *Stack Management*. [role="screenshot"] image::images/management-license.png[] -At the end of the trial period, the platinum features operate in a -<>. You can revert to a basic license, -extend the trial, or purchase a subscription. +At the end of the trial period, some features operate in a +<>. You can revert to Basic, extend the trial, +or purchase a subscription. TIP: If {security-features} are enabled, unless you have a trial license, you must configure Transport Layer Security (TLS) in {es}. diff --git a/docs/images/add-data-fv.png b/docs/setup/images/add-data-fv.png similarity index 100% rename from docs/images/add-data-fv.png rename to docs/setup/images/add-data-fv.png diff --git a/docs/images/add-data-tutorials.png b/docs/setup/images/add-data-tutorials.png similarity index 100% rename from docs/images/add-data-tutorials.png rename to docs/setup/images/add-data-tutorials.png diff --git a/docs/images/data-viz-homepage.jpg b/docs/setup/images/data-viz-homepage.jpg similarity index 100% rename from docs/images/data-viz-homepage.jpg rename to docs/setup/images/data-viz-homepage.jpg diff --git a/docs/images/kibana-status-page-7_5_0.png b/docs/setup/images/kibana-status-page-7_5_0.png similarity index 100% rename from docs/images/kibana-status-page-7_5_0.png rename to docs/setup/images/kibana-status-page-7_5_0.png diff --git a/docs/uptime-guide/alerting.asciidoc b/docs/uptime-guide/alerting.asciidoc deleted file mode 100644 index bf9e7693fc7a5..0000000000000 --- a/docs/uptime-guide/alerting.asciidoc +++ /dev/null @@ -1,33 +0,0 @@ -[role="xpack"] -[[uptime-alerting]] - -=== Uptime alerting - -The Uptime app integrates with Kibana's {kibana-ref}/alerting-getting-started.html[alerting and actions] -feature. It provides a set of built-in actions and Uptime specific threshold alerts for you to use -and enables central management of all alerts from {kibana-ref}/management.html[Kibana Management]. - -[role="screenshot"] -image::images/create-alert.png[Create alert] - -[float] -==== Monitor status alerts - -To receive alerts when a monitor goes down, use the alerting menu at the top of the -overview page. Use a query in the alert flyout to determine which monitors to check -with your alert. If you already have a query in the overview page search bar it will -be carried over into this box. - -[role="screenshot"] -image::images/monitor-status-alert.png[Create monitor status alert flyout] - -[float] -==== TLS alerts - -Uptime also provides the ability to create an alert that will notify you when one or -more of your monitors have a TLS certificate that will expire within some threshold, -or when its age exceeds a limit. The values for these thresholds are configurable on -the <>. - -[role="screenshot"] -image::images/tls-alert.png[Create TLS alert flyout] diff --git a/docs/uptime-guide/app-overview.asciidoc b/docs/uptime-guide/app-overview.asciidoc deleted file mode 100644 index 692489a7ad311..0000000000000 --- a/docs/uptime-guide/app-overview.asciidoc +++ /dev/null @@ -1,70 +0,0 @@ -[role="xpack"] -[[uptime-app]] -== Uptime app - -The Uptime app in {kib} enables you to monitor the status of network endpoints via HTTP/S, TCP, and ICMP. -You can explore endpoint status over time, drill down into specific monitors, -and view a high-level snapshot of your environment at any point in time. - -[role="screenshot"] -image::images/uptime-overview.png[Uptime app overview] - -[role="xpack"] -[[uptime-app-overview]] -=== Overview - -The Uptime overview helps you quickly identify and diagnose outages and -other connectivity issues within your network or environment. You can use the date range -selection that is global to the Uptime app, to highlight -an absolute date range, or a relative one, similar to other areas of {kib}. - -[float] -=== Filter bar - -The Filter bar enables you to quickly view specific groups of monitors, or even -an individual monitor if you have defined many. - -This control allows you to use automated filter options, as well as input custom filter -text to select specific monitors by field, URL, ID, and other attributes. - -[role="screenshot"] -image::images/filter-bar.png[Filter bar] - -[float] -=== Snapshot panel - -The Snapshot panel displays the overall -status of the environment you're monitoring or a subset of those monitors. -You can see the total number of detected monitors within the selected -Uptime date range, along with the number of monitors -in an `up` or `down` state, which is based on the last check reported by Heartbeat -for each monitor. - -Next to the counts, there is a histogram displaying the change over time throughout the -selected date range. - -[role="screenshot"] -image::images/snapshot-view.png[Snapshot view] - -[float] -=== Monitor list - -Information about individual monitors is displayed in the monitor list and provides a quick -way to navigate to a more in-depth visualization for interesting hosts or endpoints. - -The information displayed includes the recent status of a host or endpoint, when the monitor was last checked, its -ID and URL, and its IP address. There is also sparkline showing its check status over time. - -[role="screenshot"] -image::images/monitor-list.png[Monitor list] - -[float] -=== Observability integrations - -The Monitor list also contains a menu of available integrations. When Uptime detects Kubernetes or -Docker related host information, it provides links to open the Metrics app or Logs app pre-filtered -for this host. Additionally, to help you quickly determine if these solutions contain data relevant to you, -this feature contains links to filter the other views on the host's IP address. - -[role="screenshot"] -image::images/observability_integrations.png[Observability integrations] diff --git a/docs/uptime-guide/certificates.asciidoc b/docs/uptime-guide/certificates.asciidoc deleted file mode 100644 index 58db91aa080eb..0000000000000 --- a/docs/uptime-guide/certificates.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[role="xpack"] -[[uptime-certificates]] - -=== Certificates - -The certificates page enables you to visualize TLS certificate data in your indices. In addition to the -common name, associated monitors, issuer information, and SHA fingerprints, Uptime also assigns a status -derived from the threshold values in the <>. - -Several of the columns on this page are sortable. You can use the search bar at the top of the view -to find values in most of the TLS-related fields in your Uptime indices. Additionally, using the `Alerts` -dropdown at the top of the page you can create a TLS alert. - -[role="screenshot"] -image::images/certificates-page.png[Certificates] diff --git a/docs/uptime-guide/deployment-arch.asciidoc b/docs/uptime-guide/deployment-arch.asciidoc deleted file mode 100644 index c1b2f596c6665..0000000000000 --- a/docs/uptime-guide/deployment-arch.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -[role="xpack"] -[[uptime-deployment-arch]] -== Deployment Architecture - -There are multiple ways to deploy Uptime and Heartbeat. -Use the information in this section to determine the best deployment for you. -A guiding principle is that when an outage takes down the service being monitored it should not also take down Heartbeat. -You want Heartbeat to be functioning even when your service is not, so the guidelines here help you maximize this possibility. - -Heartbeat is commonly run as a centralized service within a data center. -While it is possible to run it as a separate "sidecar" process paired with each process/container, we recommend against it. -Running Heartbeat centrally ensures you will still be able to see monitoring data in the event of an overloaded, disconnected, or otherwise malfunctioning server. - -For further redundancy, you may want to deploy multiple Heartbeats across geographic and network boundaries to provide more data. -To do so, specify Heartbeat's observer {heartbeat-ref}/configuration-observer-options.html[geo options]. - -Some examples might be: - -* **A site served from a content delivery network (CDN) with points of presence (POPs) around the globe:** -To check if your site is reachable via CDN POPS, you may want to have multiple Heartbeat instances at different data centers around the world. -* **A service within a single data center that is accessed across multiple VPNs:** -Set up one Heartbeat instance within the VPN the service operates from, and another within an additional VPN that users access the service from. -Having both instances helps pinpoint network errors in the event of an outage. -* **A single service running primarily in a US east coast data center, with a hot failover located in a US west coast data center:** -In each data center, run a Heartbeat instance that checks both the local copy of the service and its counterpart across the country. -Set up two monitors in each region, one for the local service and one for the remote service. -In the event of a data center failure it will be immediately apparent if the service had a connectivity issue to the outside world or if the failure was only internal. diff --git a/docs/uptime-guide/images/cert-exp.png b/docs/uptime-guide/images/cert-exp.png deleted file mode 100644 index cd87668db96dd..0000000000000 Binary files a/docs/uptime-guide/images/cert-exp.png and /dev/null differ diff --git a/docs/uptime-guide/images/certificates-page.png b/docs/uptime-guide/images/certificates-page.png deleted file mode 100644 index 598aae982cd6a..0000000000000 Binary files a/docs/uptime-guide/images/certificates-page.png and /dev/null differ diff --git a/docs/uptime-guide/images/check-history.png b/docs/uptime-guide/images/check-history.png deleted file mode 100644 index aac5efd9b91d3..0000000000000 Binary files a/docs/uptime-guide/images/check-history.png and /dev/null differ diff --git a/docs/uptime-guide/images/create-alert.png b/docs/uptime-guide/images/create-alert.png deleted file mode 100644 index 54a0c400cad4c..0000000000000 Binary files a/docs/uptime-guide/images/create-alert.png and /dev/null differ diff --git a/docs/uptime-guide/images/crosshair-example.png b/docs/uptime-guide/images/crosshair-example.png deleted file mode 100644 index f9e89c4f622e0..0000000000000 Binary files a/docs/uptime-guide/images/crosshair-example.png and /dev/null differ diff --git a/docs/uptime-guide/images/filter-bar.png b/docs/uptime-guide/images/filter-bar.png deleted file mode 100644 index b7c424d3d0d91..0000000000000 Binary files a/docs/uptime-guide/images/filter-bar.png and /dev/null differ diff --git a/docs/uptime-guide/images/indices.png b/docs/uptime-guide/images/indices.png deleted file mode 100644 index 4090747b6726c..0000000000000 Binary files a/docs/uptime-guide/images/indices.png and /dev/null differ diff --git a/docs/uptime-guide/images/monitor-charts.png b/docs/uptime-guide/images/monitor-charts.png deleted file mode 100644 index 522f34662657e..0000000000000 Binary files a/docs/uptime-guide/images/monitor-charts.png and /dev/null differ diff --git a/docs/uptime-guide/images/monitor-list.png b/docs/uptime-guide/images/monitor-list.png deleted file mode 100644 index c9a8eccf01f6e..0000000000000 Binary files a/docs/uptime-guide/images/monitor-list.png and /dev/null differ diff --git a/docs/uptime-guide/images/monitor-status-alert.png b/docs/uptime-guide/images/monitor-status-alert.png deleted file mode 100644 index 847a0f58f02ce..0000000000000 Binary files a/docs/uptime-guide/images/monitor-status-alert.png and /dev/null differ diff --git a/docs/uptime-guide/images/observability_integrations.png b/docs/uptime-guide/images/observability_integrations.png deleted file mode 100644 index 3b23aa2dbd2a5..0000000000000 Binary files a/docs/uptime-guide/images/observability_integrations.png and /dev/null differ diff --git a/docs/uptime-guide/images/settings.png b/docs/uptime-guide/images/settings.png deleted file mode 100644 index d19b7f842ea68..0000000000000 Binary files a/docs/uptime-guide/images/settings.png and /dev/null differ diff --git a/docs/uptime-guide/images/snapshot-view.png b/docs/uptime-guide/images/snapshot-view.png deleted file mode 100644 index b6f07fb0721aa..0000000000000 Binary files a/docs/uptime-guide/images/snapshot-view.png and /dev/null differ diff --git a/docs/uptime-guide/images/status-bar.png b/docs/uptime-guide/images/status-bar.png deleted file mode 100644 index fd72e2b78c2a0..0000000000000 Binary files a/docs/uptime-guide/images/status-bar.png and /dev/null differ diff --git a/docs/uptime-guide/images/tls-alert.png b/docs/uptime-guide/images/tls-alert.png deleted file mode 100644 index 19efe07838903..0000000000000 Binary files a/docs/uptime-guide/images/tls-alert.png and /dev/null differ diff --git a/docs/uptime-guide/images/uptime-multi-deployment.png b/docs/uptime-guide/images/uptime-multi-deployment.png deleted file mode 100644 index 5440d91e48e23..0000000000000 Binary files a/docs/uptime-guide/images/uptime-multi-deployment.png and /dev/null differ diff --git a/docs/uptime-guide/images/uptime-overview.png b/docs/uptime-guide/images/uptime-overview.png deleted file mode 100644 index 25c88b2d14287..0000000000000 Binary files a/docs/uptime-guide/images/uptime-overview.png and /dev/null differ diff --git a/docs/uptime-guide/images/uptime-setup.png b/docs/uptime-guide/images/uptime-setup.png deleted file mode 100644 index 398125202fc4a..0000000000000 Binary files a/docs/uptime-guide/images/uptime-setup.png and /dev/null differ diff --git a/docs/uptime-guide/images/uptime-simple-deployment.png b/docs/uptime-guide/images/uptime-simple-deployment.png deleted file mode 100644 index f46dfdb2b8b86..0000000000000 Binary files a/docs/uptime-guide/images/uptime-simple-deployment.png and /dev/null differ diff --git a/docs/uptime-guide/index.asciidoc b/docs/uptime-guide/index.asciidoc deleted file mode 100644 index 01a93cb454ea9..0000000000000 --- a/docs/uptime-guide/index.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ - -include::{asciidoc-dir}/../../shared/versions/stack/{source_branch}.asciidoc[] -include::{asciidoc-dir}/../../shared/attributes.asciidoc[] - -= Uptime monitoring guide - -include::overview.asciidoc[] - -include::install.asciidoc[] - -include::deployment-arch.asciidoc[] - -include::app-overview.asciidoc[] - -include::monitor.asciidoc[] - -include::settings.asciidoc[] - -include::certificates.asciidoc[] - -include::alerting.asciidoc[] - diff --git a/docs/uptime-guide/install.asciidoc b/docs/uptime-guide/install.asciidoc deleted file mode 100644 index 05b9c6665562f..0000000000000 --- a/docs/uptime-guide/install.asciidoc +++ /dev/null @@ -1,74 +0,0 @@ -[[install-uptime]] -== Install Uptime - -The easiest way to get started with Elastic Uptime is by using our hosted {es} Service on Elastic Cloud. -The {es} Service is available on both AWS and GCP, -and automatically configures {es} and {kib}. - -[float] -=== Hosted Elasticsearch Service - -Skip managing your own {es} and {kib} instance by using our -https://www.elastic.co/cloud/elasticsearch-service[hosted {es} Service] on -Elastic Cloud. - -{ess-trial}[Try out the {es} Service for free], -then jump straight to <>. - -[float] -[[before-installation]] -=== Install the stack yourself - -If you'd rather install the stack yourself, -first see the https://www.elastic.co/support/matrix[Elastic Support Matrix] for information about supported operating systems and product compatibility. - -* <> -* <> -* <> - -[[install-elasticsearch]] -=== Step 1: Install Elasticsearch - -Install an {es} cluster, start it up, and make sure it's running. - -. Verify that your system meets the -https://www.elastic.co/support/matrix#matrix_jvm[minimum JVM requirements] for {es}. -. {stack-gs}/get-started-elastic-stack.html#install-elasticsearch[Install Elasticsearch]. -. {stack-gs}/get-started-elastic-stack.html#_make_sure_elasticsearch_is_up_and_running[Make sure elasticsearch is up and running]. - -[[install-kibana]] -=== Step 2: Install Kibana - -Install {kib}, start it up, and open up the web interface: - -. {stack-gs}/get-started-elastic-stack.html#install-kibana[Install Kibana]. -. {stack-gs}/get-started-elastic-stack.html#_launch_the_kibana_web_interface[Launch the Kibana Web Interface]. - -[[install-heartbeat]] -=== Step 3: Install and configure Heartbeat - -Uptime requires the setup of monitors in Heartbeat. -These monitors provide the data you'll be visualizing in the {kibana-ref}/xpack-uptime.html[Uptime app]. - -For instructions on installing and configuring Heartbeat, see the *Setup Instructions* in {kib}. -Additional information is available in {heartbeat-ref}/heartbeat-configuration.html[Configure Heartbeat]. - -[role="screenshot"] -image::images/uptime-setup.png[Installation instructions on the Uptime page in Kibana] - -[[setup-security]] -=== Step 4: Set up Security - -Secure your installation by following the {heartbeat-ref}/securing-heartbeat.html[Secure Heartbeat] documentation. - -[float] -==== Important considerations - -* Make sure you're using the same major versions of Heartbeat and {kib}. - -* Index patterns tell {kib} which {es} indices you want to explore. -The Uptime app requires a +heartbeat-{major-version-only}*+ index pattern. -If you have configured a different index pattern, you can use {ref}/indices-aliases.html[index aliases] to ensure data is recognized by the Uptime app. - -After you install and configure Heartbeat, -the {kibana-ref}/xpack-uptime.html[Uptime app] is automatically populated with the Heartbeat monitors. diff --git a/docs/uptime-guide/monitor.asciidoc b/docs/uptime-guide/monitor.asciidoc deleted file mode 100644 index bb5d315cf63eb..0000000000000 --- a/docs/uptime-guide/monitor.asciidoc +++ /dev/null @@ -1,59 +0,0 @@ -[role="xpack"] -[[uptime-monitor]] -=== Monitor - -The Monitor page helps you gain insights into the performance -of a specific network endpoint. A detailed visualization of -the monitor's request duration over time, as well as the `up`/`down` -status over time, is displayed. By configuring Machine Learning jobs -on this page, you can also also detect anomalies in response time data. - - -==== Status panel - -The Status panel displays a quick summary of the latest information -regarding your monitor. You can view its latest status, click a link to -visit the targeted URL, see its most recent request duration, and determine the -amount of time that has elapsed since the last check. - -When two Heartbeat instances are configured in different geographic locations -the map will show each location as a pinpoint on the map, along with the -amount of time elapsed since data was last received from that location. - -[role="screenshot"] -image::images/status-bar.png[Status bar] - - -[float] -==== Monitor charts - -The Monitor charts visualize information over the time specified in the -date range. These charts help you gain insights into how quickly requests are being resolved -by the targeted endpoint, and give you a sense of how frequently a host or endpoint -was down in your selected timespan. - -[role="screenshot"] -image::images/monitor-charts.png[Monitor charts] - -The Monitor duration chart displays request duration information for your monitor. -The area surrounding the line is the range of request time for the corresponding -bucket. The line is the average time. In the upper right hand of this panel -you can enable Anomaly detection using Machine Learning. When response times change -in an unexpected way the time range in which they occurred are highlighted with a color. - -The pings over time chart is a graphical representation of the check statuses over time. -Hover over the charts to display crosshairs with specific numeric data. - -[role="screenshot"] -image::images/crosshair-example.png[Chart crosshair] - -[float] -==== Check history - -The Check history table lists the total count of this monitor's checks for the selected -date range. To help find recent problems on a per-check basis, you can filter the checks -by status and location. This table can help you gain some insight into more granular details -about recent individual data points that Heartbeat is logging about your host or endpoint. - -[role="screenshot"] -image::images/check-history.png[Check history view] diff --git a/docs/uptime-guide/overview.asciidoc b/docs/uptime-guide/overview.asciidoc deleted file mode 100644 index ab230b27f8cda..0000000000000 --- a/docs/uptime-guide/overview.asciidoc +++ /dev/null @@ -1,57 +0,0 @@ -[role="xpack"] -[[uptime-overview]] -== Elastic Uptime overview - -++++ -Overview -++++ - -Elastic Uptime enables you to monitor the availability and response times of applications and services in real time and to detect problems before they affect users. - -Elastic Uptime helps you to understand uptime and response time characteristics for your services and applications. -It can be deployed both inside and outside your organization's network, so that you can analyze problems from multiple vantage points. - -Elastic Uptime uses these components: *Heartbeat*, *Elasticsearch* and *Kibana*. - -[float] -=== Heartbeat - -{heartbeat-ref}/index.html[Heartbeat] is an open source data shipper that performs uptime monitoring. -Elastic Uptime uses Heartbeat to collect monitoring data from your target applications and services, and ship it to Elasticsearch. - -[float] -=== Elasticsearch - -{ref}/index.html[Elasticsearch] is a highly scalable, open source, search and analytics engine. -Elasticsearch can store, search, and analyze large volumes of data in near real-time. -Elastic Uptime uses Elasticsearch to store monitoring data from Heartbeat in Elasticsearch documents. - -[float] -=== Kibana - -{kibana-ref}/index.html[Kibana] is an open source analytics and visualization platform designed to work with Elasticsearch. -You can use Kibana to search, view, and interact with data stored in Elasticsearch. -You can easily perform advanced data analysis and visualize your data in a variety of charts, tables, and maps. - -The {kibana-ref}/xpack-uptime.html[Elasticsearch Uptime app] in Kibana provides a dedicated user interface for viewing uptime data and identifying problem areas. - -[float] -=== Example deployments -// ++ I like the Infra/logging diagram which shows Metrics and Logging apps as separate components inside Kibana -// ++ In diagram, should be Uptime app, not Uptime UI, possibly even Elastic Uptime? Also applies to Metrics/Logging/APM. -// ++ Need more whitespace around components. - -In this simple deployment, a single instance of Heartbeat is deployed at a single monitoring location to monitor a single service. -The Heartbeat instance sends the monitoring data to Elasticsearch. -Then you can use the Uptime app in Kibana to view the data from Heartbeat and determine the status of the service. - -image::images/uptime-simple-deployment.png[Uptime simple deployment] - -In this deployment, two instances of Heartbeat are deployed at two different monitoring locations. -Both instances monitor the same service. -The Heartbeat instances send the monitoring data to Elasticsearch. -As before, you can use the Uptime app in Kibana to view the Heartbeat data and determine the status of the service. -When a failure occurs, the multiple monitoring locations enable you to pinpoint the area in which the failure has occurred. - -image::images/uptime-multi-deployment.png[Uptime multiple server deployment] - diff --git a/docs/uptime-guide/settings.asciidoc b/docs/uptime-guide/settings.asciidoc deleted file mode 100644 index 59f9af631bfa7..0000000000000 --- a/docs/uptime-guide/settings.asciidoc +++ /dev/null @@ -1,51 +0,0 @@ -[role="xpack"] -[[uptime-settings]] - -=== Settings - -The Uptime settings page lets you change which Heartbeat indices are displayed -by the uptime app. Users must have the 'all' permission to modify items on this page. -Uptime settings apply to the current space only. Use different settings in different -spaces to segment different uptime use cases and domains. - -==== Indices - -Imagine your organization has one team for internal IT services, and another -for public services. Each team operates independently and is only responsible for its -own services. In this scenario, you might set up separate Heartbeat instances for each team, -writing out to index patterns named `it-heartbeat-\*`, and `external-heartbeat-\*`. You would -create separate roles and users for each in Elasticsearch, each with access to their own spaces, -named `it` and `external` respectively. Within each space you would navigate to the settings page -and set the correct index pattern to match only the indices that space is allowed to access. - -Note: The pattern set here only restricts what the Uptime app shows. Users may still be able -to manually query Elasticsearch for data outside this pattern. - -[role="screenshot"] -image::images/indices.png[Heartbeat indices] - -See the {kibana-ref}/uptime-security.html[Uptime security] and {heartbeat-ref}/securing-heartbeat.html[Heartbeat security] -docs for more information. - -==== Certificate thresholds - -You can modify settings in this section to control how Uptime will visualize your TLS values in -the <>. These settings also determine which certificates will be -selected by any TLS alert you define. - -There are two fields, `age` and `expiration`. Use the `age` threshold to specify when Uptime should warn -you about certificates that have been valid for too long. Use the `expiration` threshold to specify when Uptime should warn you -about certificates that have approaching expiration dates. - -For example, a common security requirement is to make sure that none of your organization's TLS certificates have been -valid for longer than one year. Modifying the `Age limit` field's value to 365 days will help you keep track of which -certificates you may want to refresh. - -Likewise, to see which of your TLS certificates are close to expiring ahead of time, specify -an `Expiration threshold` on this page. When the count of a certificate's remaining valid days falls -below this threshold, Uptime will consider it in a warning state. When you define a TLS alert, you receive a -notification from Uptime about the certificate. - -[role="screenshot"] -image::images/cert-exp.png[Certification expiration thresholds] - diff --git a/docs/user/alerting/action-types/pagerduty.asciidoc b/docs/user/alerting/action-types/pagerduty.asciidoc index 0468ab042e57e..5fd85a1045265 100644 --- a/docs/user/alerting/action-types/pagerduty.asciidoc +++ b/docs/user/alerting/action-types/pagerduty.asciidoc @@ -68,11 +68,11 @@ Then, select the *Integrations* tab and click the *New Integration* button. * If you are creating a new service for your integration, go to https://support.pagerduty.com/docs/services-and-integrations#section-configuring-services-and-integrations[Configuring Services and Integrations] -and follow the steps outlined in the *Create a New Service* section, selecting *Elastic* as the *Integration Type* in step 4. +and follow the steps outlined in the *Create a New Service* section, selecting *Elastic Alerts* as the *Integration Type* in step 4. Continue with the <> section once you have finished these steps. . Enter an *Integration Name* in the format Elastic-service-name (for example, Elastic-Alerting or Kibana-APM-Alerting) -and select Elastic from the *Integration Type* menu. +and select *Elastic Alerts* from the *Integration Type* menu. . Click *Add Integration* to save your new integration. + You will be redirected to the *Integrations* tab for your service. An Integration Key is generated on this screen. diff --git a/docs/images/Dashboard_add_new_visualization.png b/docs/user/dashboard/images/Dashboard_add_new_visualization.png similarity index 100% rename from docs/images/Dashboard_add_new_visualization.png rename to docs/user/dashboard/images/Dashboard_add_new_visualization.png diff --git a/docs/images/Dashboard_add_visualization.png b/docs/user/dashboard/images/Dashboard_add_visualization.png similarity index 100% rename from docs/images/Dashboard_add_visualization.png rename to docs/user/dashboard/images/Dashboard_add_visualization.png diff --git a/docs/images/Dashboard_example.png b/docs/user/dashboard/images/Dashboard_example.png similarity index 100% rename from docs/images/Dashboard_example.png rename to docs/user/dashboard/images/Dashboard_example.png diff --git a/docs/images/Dashboard_inspect.png b/docs/user/dashboard/images/Dashboard_inspect.png similarity index 100% rename from docs/images/Dashboard_inspect.png rename to docs/user/dashboard/images/Dashboard_inspect.png diff --git a/docs/images/clone_panel.gif b/docs/user/dashboard/images/clone_panel.gif similarity index 100% rename from docs/images/clone_panel.gif rename to docs/user/dashboard/images/clone_panel.gif diff --git a/docs/images/dashboard-read-only-badge.png b/docs/user/dashboard/images/dashboard-read-only-badge.png similarity index 100% rename from docs/images/dashboard-read-only-badge.png rename to docs/user/dashboard/images/dashboard-read-only-badge.png diff --git a/docs/images/time_range_per_panel.gif b/docs/user/dashboard/images/time_range_per_panel.gif similarity index 100% rename from docs/images/time_range_per_panel.gif rename to docs/user/dashboard/images/time_range_per_panel.gif diff --git a/docs/images/intro-dashboard.png b/docs/user/introduction/images/intro-dashboard.png similarity index 100% rename from docs/images/intro-dashboard.png rename to docs/user/introduction/images/intro-dashboard.png diff --git a/docs/images/intro-data-tutorial.png b/docs/user/introduction/images/intro-data-tutorial.png similarity index 100% rename from docs/images/intro-data-tutorial.png rename to docs/user/introduction/images/intro-data-tutorial.png diff --git a/docs/images/intro-discover.png b/docs/user/introduction/images/intro-discover.png similarity index 100% rename from docs/images/intro-discover.png rename to docs/user/introduction/images/intro-discover.png diff --git a/docs/images/intro-kibana.png b/docs/user/introduction/images/intro-kibana.png similarity index 100% rename from docs/images/intro-kibana.png rename to docs/user/introduction/images/intro-kibana.png diff --git a/docs/images/intro-management.png b/docs/user/introduction/images/intro-management.png similarity index 100% rename from docs/images/intro-management.png rename to docs/user/introduction/images/intro-management.png diff --git a/docs/images/intro-spaces.jpg b/docs/user/introduction/images/intro-spaces.jpg similarity index 100% rename from docs/images/intro-spaces.jpg rename to docs/user/introduction/images/intro-spaces.jpg diff --git a/docs/images/monitoring-dashboard.png b/docs/user/monitoring/images/monitoring-dashboard.png similarity index 100% rename from docs/images/monitoring-dashboard.png rename to docs/user/monitoring/images/monitoring-dashboard.png diff --git a/docs/images/report-automate-csv.png b/docs/user/reporting/images/report-automate-csv.png similarity index 100% rename from docs/images/report-automate-csv.png rename to docs/user/reporting/images/report-automate-csv.png diff --git a/docs/images/report-automate-pdf.png b/docs/user/reporting/images/report-automate-pdf.png similarity index 100% rename from docs/images/report-automate-pdf.png rename to docs/user/reporting/images/report-automate-pdf.png diff --git a/docs/images/add-bucket.png b/docs/visualize/images/add-bucket.png similarity index 100% rename from docs/images/add-bucket.png rename to docs/visualize/images/add-bucket.png diff --git a/docs/images/apply-changes-button.png b/docs/visualize/images/apply-changes-button.png similarity index 100% rename from docs/images/apply-changes-button.png rename to docs/visualize/images/apply-changes-button.png diff --git a/docs/images/color-picker.png b/docs/visualize/images/color-picker.png similarity index 100% rename from docs/images/color-picker.png rename to docs/visualize/images/color-picker.png diff --git a/docs/images/dashboard-controls.png b/docs/visualize/images/dashboard-controls.png similarity index 100% rename from docs/images/dashboard-controls.png rename to docs/visualize/images/dashboard-controls.png diff --git a/docs/images/gauge.png b/docs/visualize/images/gauge.png similarity index 100% rename from docs/images/gauge.png rename to docs/visualize/images/gauge.png diff --git a/docs/images/lens_data_info.png b/docs/visualize/images/lens_data_info.png similarity index 100% rename from docs/images/lens_data_info.png rename to docs/visualize/images/lens_data_info.png diff --git a/docs/images/lens_drag_drop.gif b/docs/visualize/images/lens_drag_drop.gif similarity index 100% rename from docs/images/lens_drag_drop.gif rename to docs/visualize/images/lens_drag_drop.gif diff --git a/docs/images/lens_suggestions.gif b/docs/visualize/images/lens_suggestions.gif similarity index 100% rename from docs/images/lens_suggestions.gif rename to docs/visualize/images/lens_suggestions.gif diff --git a/docs/images/lens_tutorial_1.png b/docs/visualize/images/lens_tutorial_1.png similarity index 100% rename from docs/images/lens_tutorial_1.png rename to docs/visualize/images/lens_tutorial_1.png diff --git a/docs/images/lens_tutorial_2.png b/docs/visualize/images/lens_tutorial_2.png similarity index 100% rename from docs/images/lens_tutorial_2.png rename to docs/visualize/images/lens_tutorial_2.png diff --git a/docs/images/lens_tutorial_3.png b/docs/visualize/images/lens_tutorial_3.png similarity index 100% rename from docs/images/lens_tutorial_3.png rename to docs/visualize/images/lens_tutorial_3.png diff --git a/docs/images/lens_viz_types.png b/docs/visualize/images/lens_viz_types.png similarity index 100% rename from docs/images/lens_viz_types.png rename to docs/visualize/images/lens_viz_types.png diff --git a/docs/images/markdown_example_1.png b/docs/visualize/images/markdown_example_1.png similarity index 100% rename from docs/images/markdown_example_1.png rename to docs/visualize/images/markdown_example_1.png diff --git a/docs/images/markdown_example_2.png b/docs/visualize/images/markdown_example_2.png similarity index 100% rename from docs/images/markdown_example_2.png rename to docs/visualize/images/markdown_example_2.png diff --git a/docs/images/markdown_example_3.png b/docs/visualize/images/markdown_example_3.png similarity index 100% rename from docs/images/markdown_example_3.png rename to docs/visualize/images/markdown_example_3.png diff --git a/docs/images/markdown_example_4.png b/docs/visualize/images/markdown_example_4.png similarity index 100% rename from docs/images/markdown_example_4.png rename to docs/visualize/images/markdown_example_4.png diff --git a/docs/images/timelion-conditional01.png b/docs/visualize/images/timelion-conditional01.png similarity index 100% rename from docs/images/timelion-conditional01.png rename to docs/visualize/images/timelion-conditional01.png diff --git a/docs/images/timelion-conditional02.png b/docs/visualize/images/timelion-conditional02.png similarity index 100% rename from docs/images/timelion-conditional02.png rename to docs/visualize/images/timelion-conditional02.png diff --git a/docs/images/timelion-conditional03.png b/docs/visualize/images/timelion-conditional03.png similarity index 100% rename from docs/images/timelion-conditional03.png rename to docs/visualize/images/timelion-conditional03.png diff --git a/docs/images/timelion-conditional04.png b/docs/visualize/images/timelion-conditional04.png similarity index 100% rename from docs/images/timelion-conditional04.png rename to docs/visualize/images/timelion-conditional04.png diff --git a/docs/images/timelion-create01.png b/docs/visualize/images/timelion-create01.png similarity index 100% rename from docs/images/timelion-create01.png rename to docs/visualize/images/timelion-create01.png diff --git a/docs/images/timelion-create02.png b/docs/visualize/images/timelion-create02.png similarity index 100% rename from docs/images/timelion-create02.png rename to docs/visualize/images/timelion-create02.png diff --git a/docs/images/timelion-create03.png b/docs/visualize/images/timelion-create03.png similarity index 100% rename from docs/images/timelion-create03.png rename to docs/visualize/images/timelion-create03.png diff --git a/docs/images/timelion-customize01.png b/docs/visualize/images/timelion-customize01.png similarity index 100% rename from docs/images/timelion-customize01.png rename to docs/visualize/images/timelion-customize01.png diff --git a/docs/images/timelion-customize02.png b/docs/visualize/images/timelion-customize02.png similarity index 100% rename from docs/images/timelion-customize02.png rename to docs/visualize/images/timelion-customize02.png diff --git a/docs/images/timelion-customize03.png b/docs/visualize/images/timelion-customize03.png similarity index 100% rename from docs/images/timelion-customize03.png rename to docs/visualize/images/timelion-customize03.png diff --git a/docs/images/timelion-customize04.png b/docs/visualize/images/timelion-customize04.png similarity index 100% rename from docs/images/timelion-customize04.png rename to docs/visualize/images/timelion-customize04.png diff --git a/docs/images/timelion-math01.png b/docs/visualize/images/timelion-math01.png similarity index 100% rename from docs/images/timelion-math01.png rename to docs/visualize/images/timelion-math01.png diff --git a/docs/images/timelion-math02.png b/docs/visualize/images/timelion-math02.png similarity index 100% rename from docs/images/timelion-math02.png rename to docs/visualize/images/timelion-math02.png diff --git a/docs/images/timelion-math03.png b/docs/visualize/images/timelion-math03.png similarity index 100% rename from docs/images/timelion-math03.png rename to docs/visualize/images/timelion-math03.png diff --git a/docs/images/timelion-math04.png b/docs/visualize/images/timelion-math04.png similarity index 100% rename from docs/images/timelion-math04.png rename to docs/visualize/images/timelion-math04.png diff --git a/docs/images/timelion-math05.png b/docs/visualize/images/timelion-math05.png similarity index 100% rename from docs/images/timelion-math05.png rename to docs/visualize/images/timelion-math05.png diff --git a/docs/images/tsvb-gauge.png b/docs/visualize/images/tsvb-gauge.png similarity index 100% rename from docs/images/tsvb-gauge.png rename to docs/visualize/images/tsvb-gauge.png diff --git a/docs/images/tsvb-markdown.png b/docs/visualize/images/tsvb-markdown.png similarity index 100% rename from docs/images/tsvb-markdown.png rename to docs/visualize/images/tsvb-markdown.png diff --git a/docs/images/tsvb-metric.png b/docs/visualize/images/tsvb-metric.png similarity index 100% rename from docs/images/tsvb-metric.png rename to docs/visualize/images/tsvb-metric.png diff --git a/docs/images/tsvb-screenshot.png b/docs/visualize/images/tsvb-screenshot.png similarity index 100% rename from docs/images/tsvb-screenshot.png rename to docs/visualize/images/tsvb-screenshot.png diff --git a/docs/images/tsvb-table.png b/docs/visualize/images/tsvb-table.png similarity index 100% rename from docs/images/tsvb-table.png rename to docs/visualize/images/tsvb-table.png diff --git a/docs/images/tsvb-top-n.png b/docs/visualize/images/tsvb-top-n.png similarity index 100% rename from docs/images/tsvb-top-n.png rename to docs/visualize/images/tsvb-top-n.png diff --git a/docs/images/vega_lite_default.png b/docs/visualize/images/vega_lite_default.png similarity index 100% rename from docs/images/vega_lite_default.png rename to docs/visualize/images/vega_lite_default.png diff --git a/docs/images/visualize-date-histogram-split-1.png b/docs/visualize/images/visualize-date-histogram-split-1.png similarity index 100% rename from docs/images/visualize-date-histogram-split-1.png rename to docs/visualize/images/visualize-date-histogram-split-1.png diff --git a/docs/images/visualize-date-histogram-split-2.png b/docs/visualize/images/visualize-date-histogram-split-2.png similarity index 100% rename from docs/images/visualize-date-histogram-split-2.png rename to docs/visualize/images/visualize-date-histogram-split-2.png diff --git a/docs/images/visualize-date-histogram.png b/docs/visualize/images/visualize-date-histogram.png similarity index 100% rename from docs/images/visualize-date-histogram.png rename to docs/visualize/images/visualize-date-histogram.png diff --git a/docs/images/visualize-drag-reorder.png b/docs/visualize/images/visualize-drag-reorder.png similarity index 100% rename from docs/images/visualize-drag-reorder.png rename to docs/visualize/images/visualize-drag-reorder.png diff --git a/docs/images/visualize_heat_map_example.png b/docs/visualize/images/visualize_heat_map_example.png similarity index 100% rename from docs/images/visualize_heat_map_example.png rename to docs/visualize/images/visualize_heat_map_example.png diff --git a/examples/alerting_example/public/components/view_alert.tsx b/examples/alerting_example/public/components/view_alert.tsx index 75a515bfa1b25..0f7fc70648a9e 100644 --- a/examples/alerting_example/public/components/view_alert.tsx +++ b/examples/alerting_example/public/components/view_alert.tsx @@ -49,10 +49,10 @@ export const ViewAlertPage = withRouter(({ http, id }: Props) => { useEffect(() => { if (!alert) { - http.get(`${BASE_ALERT_API_PATH}/${id}`).then(setAlert); + http.get(`${BASE_ALERT_API_PATH}/alert/${id}`).then(setAlert); } if (!alertState) { - http.get(`${BASE_ALERT_API_PATH}/${id}/state`).then(setAlertState); + http.get(`${BASE_ALERT_API_PATH}/alert/${id}/state`).then(setAlertState); } }, [alert, alertState, http, id]); diff --git a/examples/alerting_example/public/components/view_astros_alert.tsx b/examples/alerting_example/public/components/view_astros_alert.tsx index 19f235a3f3e4e..b2d3cec269b72 100644 --- a/examples/alerting_example/public/components/view_astros_alert.tsx +++ b/examples/alerting_example/public/components/view_astros_alert.tsx @@ -55,10 +55,10 @@ export const ViewPeopleInSpaceAlertPage = withRouter(({ http, id }: Props) => { useEffect(() => { if (!alert) { - http.get(`${BASE_ALERT_API_PATH}/${id}`).then(setAlert); + http.get(`${BASE_ALERT_API_PATH}/alert/${id}`).then(setAlert); } if (!alertState) { - http.get(`${BASE_ALERT_API_PATH}/${id}/state`).then(setAlertState); + http.get(`${BASE_ALERT_API_PATH}/alert/${id}/state`).then(setAlertState); } }, [alert, alertState, http, id]); diff --git a/examples/demo_search/README.md b/examples/demo_search/README.md deleted file mode 100644 index f0b461e3287b4..0000000000000 --- a/examples/demo_search/README.md +++ /dev/null @@ -1,8 +0,0 @@ -## Demo search strategy - -This example registers a custom search strategy that simply takes a name string in the request and returns the -string `Hello {name}` - -To see the demo search strategy in action, navigate to the `Search explorer` app. - -To run these examples, use the command `yarn start --run-examples`. \ No newline at end of file diff --git a/examples/demo_search/common/index.ts b/examples/demo_search/common/index.ts deleted file mode 100644 index 8ea8d6186ee82..0000000000000 --- a/examples/demo_search/common/index.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { IKibanaSearchRequest, IKibanaSearchResponse } from '../../../src/plugins/data/public'; - -export const DEMO_SEARCH_STRATEGY = 'DEMO_SEARCH_STRATEGY'; -export const ASYNC_DEMO_SEARCH_STRATEGY = 'ASYNC_DEMO_SEARCH_STRATEGY'; - -export interface IDemoRequest extends IKibanaSearchRequest { - mood: string | 'sad' | 'happy'; - name: string; -} - -export interface IDemoResponse extends IKibanaSearchResponse { - greeting: string; -} - -export interface IAsyncDemoRequest extends IKibanaSearchRequest { - fibonacciNumbers: number; -} - -export interface IAsyncDemoResponse extends IKibanaSearchResponse { - fibonacciSequence: number[]; -} diff --git a/examples/demo_search/kibana.json b/examples/demo_search/kibana.json deleted file mode 100644 index f909ca47fcd55..0000000000000 --- a/examples/demo_search/kibana.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "id": "demoSearch", - "version": "0.0.1", - "kibanaVersion": "kibana", - "server": true, - "ui": true, - "requiredPlugins": ["data"], - "optionalPlugins": [], - "extraPublicDirs": ["common"] -} diff --git a/examples/demo_search/public/async_demo_search_strategy.ts b/examples/demo_search/public/async_demo_search_strategy.ts deleted file mode 100644 index 862324002840c..0000000000000 --- a/examples/demo_search/public/async_demo_search_strategy.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { Observable, from } from 'rxjs'; -import { CoreSetup } from 'kibana/public'; -import { flatMap } from 'rxjs/operators'; -import { ISearch } from '../../../src/plugins/data/public'; -import { ASYNC_SEARCH_STRATEGY } from '../../../x-pack/plugins/data_enhanced/public'; -import { ASYNC_DEMO_SEARCH_STRATEGY, IAsyncDemoResponse } from '../common'; -import { DemoDataSearchStartDependencies } from './types'; - -export function asyncDemoClientSearchStrategyProvider(core: CoreSetup) { - const search: ISearch = (request, options) => { - return from(core.getStartServices()).pipe( - flatMap((startServices) => { - const asyncStrategy = (startServices[1] as DemoDataSearchStartDependencies).data.search.getSearchStrategy( - ASYNC_SEARCH_STRATEGY - ); - return asyncStrategy.search( - { ...request, serverStrategy: ASYNC_DEMO_SEARCH_STRATEGY }, - options - ) as Observable; - }) - ); - }; - return { search }; -} diff --git a/examples/demo_search/public/demo_search_strategy.ts b/examples/demo_search/public/demo_search_strategy.ts deleted file mode 100644 index d56d827a5c0f8..0000000000000 --- a/examples/demo_search/public/demo_search_strategy.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { Observable, from } from 'rxjs'; -import { flatMap } from 'rxjs/operators'; -import { CoreSetup } from 'kibana/public'; -import { ISearch, SYNC_SEARCH_STRATEGY } from '../../../src/plugins/data/public'; -import { DEMO_SEARCH_STRATEGY, IDemoResponse } from '../common'; -import { DemoDataSearchStartDependencies } from './types'; - -/** - * This demo search strategy provider simply provides a shortcut for calling the DEMO_SEARCH_STRATEGY - * on the server side, without users having to pass it in explicitly, and it takes advantage of the - * already registered SYNC_SEARCH_STRATEGY that exists on the client. - * - * so instead of callers having to do: - * - * ``` - * data.search.search( - * { ...request, serverStrategy: DEMO_SEARCH_STRATEGY }, - * options, - * SYNC_SEARCH_STRATEGY - * ) as Observable, - *``` - - * They can instead just do - * - * ``` - * data.search.search(request, options, DEMO_SEARCH_STRATEGY); - * ``` - * - * and are ensured type safety in regard to the request and response objects. - */ -export function demoClientSearchStrategyProvider(core: CoreSetup) { - const search: ISearch = (request, options) => { - return from(core.getStartServices()).pipe( - flatMap((startServices) => { - const syncStrategy = (startServices[1] as DemoDataSearchStartDependencies).data.search.getSearchStrategy( - SYNC_SEARCH_STRATEGY - ); - return syncStrategy.search( - { ...request, serverStrategy: DEMO_SEARCH_STRATEGY }, - options - ) as Observable; - }) - ); - }; - return { search }; -} diff --git a/examples/demo_search/public/index.ts b/examples/demo_search/public/index.ts deleted file mode 100644 index 0a97ac6b72ea7..0000000000000 --- a/examples/demo_search/public/index.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { PluginInitializer } from 'kibana/public'; - -import { DemoDataPlugin } from './plugin'; - -export { DEMO_SEARCH_STRATEGY } from '../common'; - -export const plugin: PluginInitializer = () => new DemoDataPlugin(); diff --git a/examples/demo_search/public/plugin.ts b/examples/demo_search/public/plugin.ts deleted file mode 100644 index 5d074c19903e2..0000000000000 --- a/examples/demo_search/public/plugin.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { Plugin, CoreSetup } from '../../../src/core/public'; -import { - DEMO_SEARCH_STRATEGY, - IDemoRequest, - IDemoResponse, - ASYNC_DEMO_SEARCH_STRATEGY, - IAsyncDemoRequest, - IAsyncDemoResponse, -} from '../common'; -import { demoClientSearchStrategyProvider } from './demo_search_strategy'; -import { asyncDemoClientSearchStrategyProvider } from './async_demo_search_strategy'; -import { DemoDataSearchSetupDependencies, DemoDataSearchStartDependencies } from './types'; - -/** - * Add the typescript mappings for our search strategy to the request and - * response types. This allows typescript to require the right shapes if - * making the call: - * const response = context.search.search(request, {}, DEMO_SEARCH_STRATEGY); - * - * If the caller does not pass in the right `request` shape, typescript will - * complain. The caller will also get a typed response. - */ -declare module '../../../src/plugins/data/public' { - export interface IRequestTypesMap { - [DEMO_SEARCH_STRATEGY]: IDemoRequest; - [ASYNC_DEMO_SEARCH_STRATEGY]: IAsyncDemoRequest; - } - - export interface IResponseTypesMap { - [DEMO_SEARCH_STRATEGY]: IDemoResponse; - [ASYNC_DEMO_SEARCH_STRATEGY]: IAsyncDemoResponse; - } -} - -export class DemoDataPlugin - implements Plugin { - public setup(core: CoreSetup, { data }: DemoDataSearchSetupDependencies) { - const demoClientSearchStrategy = demoClientSearchStrategyProvider(core); - const asyncDemoClientSearchStrategy = asyncDemoClientSearchStrategyProvider(core); - data.search.registerSearchStrategy(DEMO_SEARCH_STRATEGY, demoClientSearchStrategy); - data.search.registerSearchStrategy(ASYNC_DEMO_SEARCH_STRATEGY, asyncDemoClientSearchStrategy); - } - - public start() {} - public stop() {} -} diff --git a/examples/demo_search/public/types.ts b/examples/demo_search/public/types.ts deleted file mode 100644 index 64725da7df870..0000000000000 --- a/examples/demo_search/public/types.ts +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { DataPublicPluginStart, DataPublicPluginSetup } from '../../../src/plugins/data/public'; - -export interface DemoDataSearchSetupDependencies { - data: DataPublicPluginSetup; -} - -export interface DemoDataSearchStartDependencies { - data: DataPublicPluginStart; -} diff --git a/examples/demo_search/server/async_demo_search_strategy.ts b/examples/demo_search/server/async_demo_search_strategy.ts deleted file mode 100644 index 2eda0f4d09e11..0000000000000 --- a/examples/demo_search/server/async_demo_search_strategy.ts +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { ISearchStrategy } from '../../../src/plugins/data/server'; -import { ASYNC_DEMO_SEARCH_STRATEGY, IAsyncDemoRequest } from '../common'; - -export const asyncDemoSearchStrategyProvider = (): ISearchStrategy< - typeof ASYNC_DEMO_SEARCH_STRATEGY -> => { - function getFibonacciSequence(n = 0) { - const beginning = [0, 1].slice(0, n); - return Array(Math.max(0, n)) - .fill(null) - .reduce((sequence, value, i) => { - if (i < 2) return sequence; - return [...sequence, sequence[i - 1] + sequence[i - 2]]; - }, beginning); - } - - const generateId = (() => { - let id = 0; - return () => `${id++}`; - })(); - - const loadedMap = new Map(); - const totalMap = new Map(); - - return { - search: async (context, request: IAsyncDemoRequest) => { - const id = request.id ?? generateId(); - - const loaded = (loadedMap.get(id) ?? 0) + 1; - loadedMap.set(id, loaded); - - const total = request.fibonacciNumbers ?? totalMap.get(id); - totalMap.set(id, total); - - const fibonacciSequence = getFibonacciSequence(loaded); - return { id, total, loaded, fibonacciSequence }; - }, - cancel: async (context, id) => { - loadedMap.delete(id); - totalMap.delete(id); - }, - }; -}; diff --git a/examples/demo_search/server/demo_search_strategy.ts b/examples/demo_search/server/demo_search_strategy.ts deleted file mode 100644 index 36280ad22e83c..0000000000000 --- a/examples/demo_search/server/demo_search_strategy.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { ISearchStrategy } from '../../../src/plugins/data/server'; -import { DEMO_SEARCH_STRATEGY, IDemoRequest } from '../common'; - -export const demoSearchStrategyProvider = (): ISearchStrategy => { - return { - search: (context, request: IDemoRequest) => { - return Promise.resolve({ - greeting: - request.mood === 'happy' - ? `Lovely to meet you, ${request.name}` - : `Hope you feel better, ${request.name}`, - }); - }, - }; -}; diff --git a/examples/demo_search/server/index.ts b/examples/demo_search/server/index.ts deleted file mode 100644 index 368575b705c90..0000000000000 --- a/examples/demo_search/server/index.ts +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { DemoDataPlugin } from './plugin'; - -export const plugin = () => new DemoDataPlugin(); diff --git a/examples/demo_search/server/plugin.ts b/examples/demo_search/server/plugin.ts deleted file mode 100644 index 8a72b5007f988..0000000000000 --- a/examples/demo_search/server/plugin.ts +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { Plugin, CoreSetup } from 'kibana/server'; -import { PluginSetup as DataPluginSetup } from 'src/plugins/data/server'; -import { demoSearchStrategyProvider } from './demo_search_strategy'; -import { - DEMO_SEARCH_STRATEGY, - IDemoRequest, - IDemoResponse, - ASYNC_DEMO_SEARCH_STRATEGY, - IAsyncDemoRequest, - IAsyncDemoResponse, -} from '../common'; -import { asyncDemoSearchStrategyProvider } from './async_demo_search_strategy'; - -interface IDemoSearchExplorerDeps { - data: DataPluginSetup; -} - -/** - * Add the typescript mappings for our search strategy to the request and - * response types. This allows typescript to require the right shapes if - * making the call: - * const response = context.search.search(request, DEMO_SEARCH_STRATEGY); - * - * If the caller does not pass in the right `request` shape, typescript will - * complain. The caller will also get a typed response. - */ -declare module '../../../src/plugins/data/server' { - export interface IRequestTypesMap { - [DEMO_SEARCH_STRATEGY]: IDemoRequest; - [ASYNC_DEMO_SEARCH_STRATEGY]: IAsyncDemoRequest; - } - - export interface IResponseTypesMap { - [DEMO_SEARCH_STRATEGY]: IDemoResponse; - [ASYNC_DEMO_SEARCH_STRATEGY]: IAsyncDemoResponse; - } -} - -export class DemoDataPlugin implements Plugin { - constructor() {} - - public setup(core: CoreSetup, deps: IDemoSearchExplorerDeps) { - deps.data.search.registerSearchStrategy(DEMO_SEARCH_STRATEGY, demoSearchStrategyProvider()); - deps.data.search.registerSearchStrategy( - ASYNC_DEMO_SEARCH_STRATEGY, - asyncDemoSearchStrategyProvider() - ); - } - - public start() {} - public stop() {} -} diff --git a/examples/demo_search/tsconfig.json b/examples/demo_search/tsconfig.json deleted file mode 100644 index 7fa03739119b4..0000000000000 --- a/examples/demo_search/tsconfig.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "outDir": "./target", - "skipLibCheck": true - }, - "include": [ - "index.ts", - "common/**/*.ts", - "public/**/*.ts", - "public/**/*.tsx", - "server/**/*.ts", - "../../typings/**/*" - ], - "exclude": [] -} diff --git a/examples/embeddable_examples/common/book_saved_object_attributes.ts b/examples/embeddable_examples/common/book_saved_object_attributes.ts new file mode 100644 index 0000000000000..62c08b7b81362 --- /dev/null +++ b/examples/embeddable_examples/common/book_saved_object_attributes.ts @@ -0,0 +1,28 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { SavedObjectAttributes } from '../../../src/core/types'; + +export const BOOK_SAVED_OBJECT = 'book'; + +export interface BookSavedObjectAttributes extends SavedObjectAttributes { + title: string; + author?: string; + readIt?: boolean; +} diff --git a/examples/embeddable_examples/common/index.ts b/examples/embeddable_examples/common/index.ts index 726420fb9bdc3..55715113a12a2 100644 --- a/examples/embeddable_examples/common/index.ts +++ b/examples/embeddable_examples/common/index.ts @@ -18,3 +18,4 @@ */ export { TodoSavedObjectAttributes } from './todo_saved_object_attributes'; +export { BookSavedObjectAttributes, BOOK_SAVED_OBJECT } from './book_saved_object_attributes'; diff --git a/examples/embeddable_examples/kibana.json b/examples/embeddable_examples/kibana.json index 486c6322fad93..8ae04c1f6c644 100644 --- a/examples/embeddable_examples/kibana.json +++ b/examples/embeddable_examples/kibana.json @@ -4,7 +4,7 @@ "kibanaVersion": "kibana", "server": true, "ui": true, - "requiredPlugins": ["embeddable"], + "requiredPlugins": ["embeddable", "uiActions"], "optionalPlugins": [], "extraPublicDirs": ["public/todo", "public/hello_world", "public/todo/todo_ref_embeddable"] } diff --git a/examples/embeddable_examples/public/book/book_component.tsx b/examples/embeddable_examples/public/book/book_component.tsx new file mode 100644 index 0000000000000..064e13c131a0a --- /dev/null +++ b/examples/embeddable_examples/public/book/book_component.tsx @@ -0,0 +1,90 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +import React from 'react'; +import { EuiFlexItem, EuiFlexGroup, EuiIcon } from '@elastic/eui'; + +import { EuiText } from '@elastic/eui'; +import { EuiFlexGrid } from '@elastic/eui'; +import { withEmbeddableSubscription } from '../../../../src/plugins/embeddable/public'; +import { BookEmbeddableInput, BookEmbeddableOutput, BookEmbeddable } from './book_embeddable'; + +interface Props { + input: BookEmbeddableInput; + output: BookEmbeddableOutput; + embeddable: BookEmbeddable; +} + +function wrapSearchTerms(task?: string, search?: string) { + if (!search || !task) return task; + const parts = task.split(new RegExp(`(${search})`, 'g')); + return parts.map((part, i) => + part === search ? ( + + {part} + + ) : ( + part + ) + ); +} + +export function BookEmbeddableComponentInner({ input: { search }, output: { attributes } }: Props) { + const title = attributes?.title; + const author = attributes?.author; + const readIt = attributes?.readIt; + + return ( + + + + {title ? ( + + +

{wrapSearchTerms(title, search)},

+
+
+ ) : null} + {author ? ( + + +
-{wrapSearchTerms(author, search)}
+
+
+ ) : null} + {readIt ? ( + + + + ) : ( + + + + )} +
+
+
+ ); +} + +export const BookEmbeddableComponent = withEmbeddableSubscription< + BookEmbeddableInput, + BookEmbeddableOutput, + BookEmbeddable, + {} +>(BookEmbeddableComponentInner); diff --git a/examples/embeddable_examples/public/book/book_embeddable.tsx b/examples/embeddable_examples/public/book/book_embeddable.tsx new file mode 100644 index 0000000000000..d49bd3280d97d --- /dev/null +++ b/examples/embeddable_examples/public/book/book_embeddable.tsx @@ -0,0 +1,123 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +import React from 'react'; +import ReactDOM from 'react-dom'; +import { Subscription } from 'rxjs'; +import { + Embeddable, + EmbeddableInput, + IContainer, + EmbeddableOutput, + SavedObjectEmbeddableInput, + AttributeService, +} from '../../../../src/plugins/embeddable/public'; +import { BookSavedObjectAttributes } from '../../common'; +import { BookEmbeddableComponent } from './book_component'; + +export const BOOK_EMBEDDABLE = 'book'; +export type BookEmbeddableInput = BookByValueInput | BookByReferenceInput; +export interface BookEmbeddableOutput extends EmbeddableOutput { + hasMatch: boolean; + attributes: BookSavedObjectAttributes; +} + +interface BookInheritedInput extends EmbeddableInput { + search?: string; +} + +export type BookByValueInput = { attributes: BookSavedObjectAttributes } & BookInheritedInput; +export type BookByReferenceInput = SavedObjectEmbeddableInput & BookInheritedInput; + +/** + * Returns whether any attributes contain the search string. If search is empty, true is returned. If + * there are no savedAttributes, false is returned. + * @param search - the search string + * @param savedAttributes - the saved object attributes for the saved object with id `input.savedObjectId` + */ +function getHasMatch(search?: string, savedAttributes?: BookSavedObjectAttributes): boolean { + if (!search) return true; + if (!savedAttributes) return false; + return Boolean( + (savedAttributes.author && savedAttributes.author.match(search)) || + (savedAttributes.title && savedAttributes.title.match(search)) + ); +} + +export class BookEmbeddable extends Embeddable { + public readonly type = BOOK_EMBEDDABLE; + private subscription: Subscription; + private node?: HTMLElement; + private savedObjectId?: string; + private attributes?: BookSavedObjectAttributes; + + constructor( + initialInput: BookEmbeddableInput, + private attributeService: AttributeService< + BookSavedObjectAttributes, + BookByValueInput, + BookByReferenceInput + >, + { + parent, + }: { + parent?: IContainer; + } + ) { + super(initialInput, {} as BookEmbeddableOutput, parent); + + this.subscription = this.getInput$().subscribe(async () => { + const savedObjectId = (this.getInput() as BookByReferenceInput).savedObjectId; + const attributes = (this.getInput() as BookByValueInput).attributes; + if (this.attributes !== attributes || this.savedObjectId !== savedObjectId) { + this.savedObjectId = savedObjectId; + this.reload(); + } else { + this.updateOutput({ + attributes: this.attributes, + hasMatch: getHasMatch(this.input.search, this.attributes), + }); + } + }); + } + + public render(node: HTMLElement) { + if (this.node) { + ReactDOM.unmountComponentAtNode(this.node); + } + this.node = node; + ReactDOM.render(, node); + } + + public async reload() { + this.attributes = await this.attributeService.unwrapAttributes(this.input); + + this.updateOutput({ + attributes: this.attributes, + hasMatch: getHasMatch(this.input.search, this.attributes), + }); + } + + public destroy() { + super.destroy(); + this.subscription.unsubscribe(); + if (this.node) { + ReactDOM.unmountComponentAtNode(this.node); + } + } +} diff --git a/examples/embeddable_examples/public/book/book_embeddable_factory.tsx b/examples/embeddable_examples/public/book/book_embeddable_factory.tsx new file mode 100644 index 0000000000000..f4a32fb498a2d --- /dev/null +++ b/examples/embeddable_examples/public/book/book_embeddable_factory.tsx @@ -0,0 +1,127 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import React from 'react'; +import { i18n } from '@kbn/i18n'; +import { BookSavedObjectAttributes, BOOK_SAVED_OBJECT } from '../../common'; +import { toMountPoint } from '../../../../src/plugins/kibana_react/public'; +import { + EmbeddableFactoryDefinition, + EmbeddableStart, + IContainer, + AttributeService, + EmbeddableFactory, +} from '../../../../src/plugins/embeddable/public'; +import { + BookEmbeddable, + BOOK_EMBEDDABLE, + BookEmbeddableInput, + BookEmbeddableOutput, + BookByValueInput, + BookByReferenceInput, +} from './book_embeddable'; +import { CreateEditBookComponent } from './create_edit_book_component'; +import { OverlayStart } from '../../../../src/core/public'; + +interface StartServices { + getAttributeService: EmbeddableStart['getAttributeService']; + openModal: OverlayStart['openModal']; +} + +export type BookEmbeddableFactory = EmbeddableFactory< + BookEmbeddableInput, + BookEmbeddableOutput, + BookEmbeddable, + BookSavedObjectAttributes +>; + +export class BookEmbeddableFactoryDefinition + implements + EmbeddableFactoryDefinition< + BookEmbeddableInput, + BookEmbeddableOutput, + BookEmbeddable, + BookSavedObjectAttributes + > { + public readonly type = BOOK_EMBEDDABLE; + public savedObjectMetaData = { + name: 'Book', + includeFields: ['title', 'author', 'readIt'], + type: BOOK_SAVED_OBJECT, + getIconForSavedObject: () => 'pencil', + }; + + private attributeService?: AttributeService< + BookSavedObjectAttributes, + BookByValueInput, + BookByReferenceInput + >; + + constructor(private getStartServices: () => Promise) {} + + public async isEditable() { + return true; + } + + public async create(input: BookEmbeddableInput, parent?: IContainer) { + return new BookEmbeddable(input, await this.getAttributeService(), { + parent, + }); + } + + public getDisplayName() { + return i18n.translate('embeddableExamples.book.displayName', { + defaultMessage: 'Book', + }); + } + + public async getExplicitInput(): Promise> { + const { openModal } = await this.getStartServices(); + return new Promise>((resolve) => { + const onSave = async (attributes: BookSavedObjectAttributes, useRefType: boolean) => { + const wrappedAttributes = (await this.getAttributeService()).wrapAttributes( + attributes, + useRefType + ); + resolve(wrappedAttributes); + }; + const overlay = openModal( + toMountPoint( + { + onSave(attributes, useRefType); + overlay.close(); + }} + /> + ) + ); + }); + } + + private async getAttributeService() { + if (!this.attributeService) { + this.attributeService = await (await this.getStartServices()).getAttributeService< + BookSavedObjectAttributes, + BookByValueInput, + BookByReferenceInput + >(this.type); + } + return this.attributeService; + } +} diff --git a/examples/embeddable_examples/public/book/create_edit_book_component.tsx b/examples/embeddable_examples/public/book/create_edit_book_component.tsx new file mode 100644 index 0000000000000..7e2d3cb9d88ab --- /dev/null +++ b/examples/embeddable_examples/public/book/create_edit_book_component.tsx @@ -0,0 +1,88 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +import React, { useState } from 'react'; +import { EuiModalBody, EuiCheckbox } from '@elastic/eui'; +import { EuiFieldText } from '@elastic/eui'; +import { EuiButton } from '@elastic/eui'; +import { EuiModalFooter } from '@elastic/eui'; +import { EuiModalHeader } from '@elastic/eui'; +import { EuiFormRow } from '@elastic/eui'; +import { BookSavedObjectAttributes } from '../../common'; + +export function CreateEditBookComponent({ + savedObjectId, + attributes, + onSave, +}: { + savedObjectId?: string; + attributes?: BookSavedObjectAttributes; + onSave: (attributes: BookSavedObjectAttributes, useRefType: boolean) => void; +}) { + const [title, setTitle] = useState(attributes?.title ?? ''); + const [author, setAuthor] = useState(attributes?.author ?? ''); + const [readIt, setReadIt] = useState(attributes?.readIt ?? false); + return ( + + +

{`${savedObjectId ? 'Create new ' : 'Edit '}`}

+
+ + + setTitle(e.target.value)} + /> + + + setAuthor(e.target.value)} + /> + + + setReadIt(event.target.checked)} + /> + + + + onSave({ title, author, readIt }, false)} + > + {savedObjectId ? 'Unlink from library item' : 'Save and Return'} + + onSave({ title, author, readIt }, true)} + > + {savedObjectId ? 'Update library item' : 'Save to library'} + + +
+ ); +} diff --git a/examples/embeddable_examples/public/book/edit_book_action.tsx b/examples/embeddable_examples/public/book/edit_book_action.tsx new file mode 100644 index 0000000000000..222f70e0be60f --- /dev/null +++ b/examples/embeddable_examples/public/book/edit_book_action.tsx @@ -0,0 +1,93 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +import React from 'react'; +import { OverlayStart } from 'kibana/public'; +import { i18n } from '@kbn/i18n'; +import { BookSavedObjectAttributes, BOOK_SAVED_OBJECT } from '../../common'; +import { createAction } from '../../../../src/plugins/ui_actions/public'; +import { toMountPoint } from '../../../../src/plugins/kibana_react/public'; +import { + ViewMode, + EmbeddableStart, + SavedObjectEmbeddableInput, +} from '../../../../src/plugins/embeddable/public'; +import { + BookEmbeddable, + BOOK_EMBEDDABLE, + BookByReferenceInput, + BookByValueInput, +} from './book_embeddable'; +import { CreateEditBookComponent } from './create_edit_book_component'; + +interface StartServices { + openModal: OverlayStart['openModal']; + getAttributeService: EmbeddableStart['getAttributeService']; +} + +interface ActionContext { + embeddable: BookEmbeddable; +} + +export const ACTION_EDIT_BOOK = 'ACTION_EDIT_BOOK'; + +export const createEditBookAction = (getStartServices: () => Promise) => + createAction({ + getDisplayName: () => + i18n.translate('embeddableExamples.book.edit', { defaultMessage: 'Edit Book' }), + type: ACTION_EDIT_BOOK, + order: 100, + getIconType: () => 'documents', + isCompatible: async ({ embeddable }: ActionContext) => { + return ( + embeddable.type === BOOK_EMBEDDABLE && embeddable.getInput().viewMode === ViewMode.EDIT + ); + }, + execute: async ({ embeddable }: ActionContext) => { + const { openModal, getAttributeService } = await getStartServices(); + const attributeService = getAttributeService< + BookSavedObjectAttributes, + BookByValueInput, + BookByReferenceInput + >(BOOK_SAVED_OBJECT); + const onSave = async (attributes: BookSavedObjectAttributes, useRefType: boolean) => { + const newInput = await attributeService.wrapAttributes(attributes, useRefType, embeddable); + if (!useRefType && (embeddable.getInput() as SavedObjectEmbeddableInput).savedObjectId) { + // Remove the savedObejctId when un-linking + newInput.savedObjectId = null; + } + embeddable.updateInput(newInput); + if (useRefType) { + // Ensures that any duplicate embeddables also register the changes. This mirrors the behavior of going back and forth between apps + embeddable.getRoot().reload(); + } + }; + const overlay = openModal( + toMountPoint( + { + overlay.close(); + onSave(attributes, useRefType); + }} + /> + ) + ); + }, + }); diff --git a/examples/embeddable_examples/public/book/index.ts b/examples/embeddable_examples/public/book/index.ts new file mode 100644 index 0000000000000..46f44926e2152 --- /dev/null +++ b/examples/embeddable_examples/public/book/index.ts @@ -0,0 +1,21 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +export * from './book_embeddable'; +export * from './book_embeddable_factory'; diff --git a/examples/embeddable_examples/public/create_sample_data.ts b/examples/embeddable_examples/public/create_sample_data.ts index bd5ade18aa91e..d598c32a182fe 100644 --- a/examples/embeddable_examples/public/create_sample_data.ts +++ b/examples/embeddable_examples/public/create_sample_data.ts @@ -18,9 +18,9 @@ */ import { SavedObjectsClientContract } from 'kibana/public'; -import { TodoSavedObjectAttributes } from '../common'; +import { TodoSavedObjectAttributes, BookSavedObjectAttributes, BOOK_SAVED_OBJECT } from '../common'; -export async function createSampleData(client: SavedObjectsClientContract) { +export async function createSampleData(client: SavedObjectsClientContract, overwrite = true) { await client.create( 'todo', { @@ -30,7 +30,20 @@ export async function createSampleData(client: SavedObjectsClientContract) { }, { id: 'sample-todo-saved-object', - overwrite: true, + overwrite, + } + ); + + await client.create( + BOOK_SAVED_OBJECT, + { + title: 'Pillars of the Earth', + author: 'Ken Follett', + readIt: true, + }, + { + id: 'sample-book-saved-object', + overwrite, } ); } diff --git a/examples/embeddable_examples/public/index.ts b/examples/embeddable_examples/public/index.ts index ec007f7c626f0..86f50f2b6e114 100644 --- a/examples/embeddable_examples/public/index.ts +++ b/examples/embeddable_examples/public/index.ts @@ -26,6 +26,8 @@ export { export { ListContainer, LIST_CONTAINER, ListContainerFactory } from './list_container'; export { TODO_EMBEDDABLE, TodoEmbeddableFactory } from './todo'; +export { BOOK_EMBEDDABLE } from './book'; + import { EmbeddableExamplesPlugin } from './plugin'; export { diff --git a/examples/embeddable_examples/public/plugin.ts b/examples/embeddable_examples/public/plugin.ts index d65ca1e8e7e8d..95f4f5b41e198 100644 --- a/examples/embeddable_examples/public/plugin.ts +++ b/examples/embeddable_examples/public/plugin.ts @@ -17,14 +17,19 @@ * under the License. */ -import { EmbeddableSetup, EmbeddableStart } from '../../../src/plugins/embeddable/public'; -import { CoreSetup, CoreStart, Plugin } from '../../../src/core/public'; import { + EmbeddableSetup, + EmbeddableStart, + CONTEXT_MENU_TRIGGER, +} from '../../../src/plugins/embeddable/public'; +import { Plugin, CoreSetup, CoreStart } from '../../../src/core/public'; +import { + HelloWorldEmbeddableFactory, HELLO_WORLD_EMBEDDABLE, HelloWorldEmbeddableFactoryDefinition, - HelloWorldEmbeddableFactory, } from './hello_world'; import { TODO_EMBEDDABLE, TodoEmbeddableFactory, TodoEmbeddableFactoryDefinition } from './todo'; + import { MULTI_TASK_TODO_EMBEDDABLE, MultiTaskTodoEmbeddableFactory, @@ -46,9 +51,17 @@ import { TodoRefEmbeddableFactory, TodoRefEmbeddableFactoryDefinition, } from './todo/todo_ref_embeddable_factory'; +import { ACTION_EDIT_BOOK, createEditBookAction } from './book/edit_book_action'; +import { BookEmbeddable, BOOK_EMBEDDABLE } from './book/book_embeddable'; +import { + BookEmbeddableFactory, + BookEmbeddableFactoryDefinition, +} from './book/book_embeddable_factory'; +import { UiActionsStart } from '../../../src/plugins/ui_actions/public'; export interface EmbeddableExamplesSetupDependencies { embeddable: EmbeddableSetup; + uiActions: UiActionsStart; } export interface EmbeddableExamplesStartDependencies { @@ -62,6 +75,7 @@ interface ExampleEmbeddableFactories { getListContainerEmbeddableFactory: () => ListContainerFactory; getTodoEmbeddableFactory: () => TodoEmbeddableFactory; getTodoRefEmbeddableFactory: () => TodoRefEmbeddableFactory; + getBookEmbeddableFactory: () => BookEmbeddableFactory; } export interface EmbeddableExamplesStart { @@ -69,6 +83,12 @@ export interface EmbeddableExamplesStart { factories: ExampleEmbeddableFactories; } +declare module '../../../src/plugins/ui_actions/public' { + export interface ActionContextMapping { + [ACTION_EDIT_BOOK]: { embeddable: BookEmbeddable }; + } +} + export class EmbeddableExamplesPlugin implements Plugin< @@ -121,6 +141,20 @@ export class EmbeddableExamplesPlugin getEmbeddableFactory: (await core.getStartServices())[1].embeddable.getEmbeddableFactory, })) ); + this.exampleEmbeddableFactories.getBookEmbeddableFactory = deps.embeddable.registerEmbeddableFactory( + BOOK_EMBEDDABLE, + new BookEmbeddableFactoryDefinition(async () => ({ + getAttributeService: (await core.getStartServices())[1].embeddable.getAttributeService, + openModal: (await core.getStartServices())[0].overlays.openModal, + })) + ); + + const editBookAction = createEditBookAction(async () => ({ + getAttributeService: (await core.getStartServices())[1].embeddable.getAttributeService, + openModal: (await core.getStartServices())[0].overlays.openModal, + })); + deps.uiActions.registerAction(editBookAction); + deps.uiActions.attachAction(CONTEXT_MENU_TRIGGER, editBookAction.id); } public start( diff --git a/examples/embeddable_examples/server/book_saved_object.ts b/examples/embeddable_examples/server/book_saved_object.ts new file mode 100644 index 0000000000000..f0aca57f7925f --- /dev/null +++ b/examples/embeddable_examples/server/book_saved_object.ts @@ -0,0 +1,40 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { SavedObjectsType } from 'kibana/server'; + +export const bookSavedObject: SavedObjectsType = { + name: 'book', + hidden: false, + namespaceType: 'agnostic', + mappings: { + properties: { + title: { + type: 'keyword', + }, + author: { + type: 'keyword', + }, + readIt: { + type: 'boolean', + }, + }, + }, + migrations: {}, +}; diff --git a/examples/embeddable_examples/server/plugin.ts b/examples/embeddable_examples/server/plugin.ts index d956b834d0d3c..1308ac9e0fc5e 100644 --- a/examples/embeddable_examples/server/plugin.ts +++ b/examples/embeddable_examples/server/plugin.ts @@ -19,10 +19,12 @@ import { Plugin, CoreSetup, CoreStart } from 'kibana/server'; import { todoSavedObject } from './todo_saved_object'; +import { bookSavedObject } from './book_saved_object'; export class EmbeddableExamplesPlugin implements Plugin { public setup(core: CoreSetup) { core.savedObjects.registerType(todoSavedObject); + core.savedObjects.registerType(bookSavedObject); } public start(core: CoreStart) {} diff --git a/examples/embeddable_explorer/public/embeddable_panel_example.tsx b/examples/embeddable_explorer/public/embeddable_panel_example.tsx index b2807f9a4c346..ca9675bb7f5a1 100644 --- a/examples/embeddable_explorer/public/embeddable_panel_example.tsx +++ b/examples/embeddable_explorer/public/embeddable_panel_example.tsx @@ -33,6 +33,7 @@ import { EmbeddableStart, IEmbeddable } from '../../../src/plugins/embeddable/pu import { HELLO_WORLD_EMBEDDABLE, TODO_EMBEDDABLE, + BOOK_EMBEDDABLE, MULTI_TASK_TODO_EMBEDDABLE, SearchableListContainerFactory, } from '../../embeddable_examples/public'; @@ -72,6 +73,35 @@ export function EmbeddablePanelExample({ embeddableServices, searchListContainer tasks: ['Go to school', 'Watch planet earth', 'Read the encyclopedia'], }, }, + '4': { + type: BOOK_EMBEDDABLE, + explicitInput: { + id: '4', + savedObjectId: 'sample-book-saved-object', + }, + }, + '5': { + type: BOOK_EMBEDDABLE, + explicitInput: { + id: '5', + attributes: { + title: 'The Sympathizer', + author: 'Viet Thanh Nguyen', + readIt: true, + }, + }, + }, + '6': { + type: BOOK_EMBEDDABLE, + explicitInput: { + id: '6', + attributes: { + title: 'The Hobbit', + author: 'J.R.R. Tolkien', + readIt: false, + }, + }, + }, }, }; diff --git a/examples/search_explorer/README.md b/examples/search_explorer/README.md deleted file mode 100644 index 0e5a48cf22dc1..0000000000000 --- a/examples/search_explorer/README.md +++ /dev/null @@ -1,8 +0,0 @@ -## Search explorer - -This example search explorer app shows how to use different search strategies in order to retrieve data. - -One demo uses the built in elasticsearch search strategy, and runs a search against data in elasticsearch. The -other demo uses the custom demo search strategy, a custom search strategy registerd inside the [demo_search plugin](../demo_search). - -To run this example, use the command `yarn start --run-examples`. \ No newline at end of file diff --git a/examples/search_explorer/kibana.json b/examples/search_explorer/kibana.json deleted file mode 100644 index e22d4e2756d11..0000000000000 --- a/examples/search_explorer/kibana.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "id": "searchExplorer", - "version": "0.0.1", - "kibanaVersion": "kibana", - "server": false, - "ui": true, - "requiredPlugins": ["data", "demoSearch", "developerExamples"], - "optionalPlugins": [] -} diff --git a/examples/search_explorer/public/application.tsx b/examples/search_explorer/public/application.tsx deleted file mode 100644 index a7072936f268d..0000000000000 --- a/examples/search_explorer/public/application.tsx +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import React from 'react'; -import ReactDOM from 'react-dom'; -import { BrowserRouter as Router, Route, withRouter, RouteComponentProps } from 'react-router-dom'; - -import { - EuiPage, - EuiPageSideBar, - // @ts-ignore - EuiSideNav, -} from '@elastic/eui'; - -import { AppMountParameters, CoreStart } from '../../../src/core/public'; -import { EsSearchTest } from './es_strategy'; -import { Page } from './page'; -import { DemoStrategy } from './demo_strategy'; -import { AsyncDemoStrategy } from './async_demo_strategy'; -import { DocumentationPage } from './documentation'; -import { SearchApiPage } from './search_api'; -import { AppPluginStartDependencies, SearchBarComponentParams } from './types'; - -const Home = () => ; - -interface PageDef { - title: string; - id: string; - component: React.ReactNode; -} - -type NavProps = RouteComponentProps & { - navigateToApp: CoreStart['application']['navigateToApp']; - pages: PageDef[]; -}; - -const Nav = withRouter(({ history, navigateToApp, pages }: NavProps) => { - const navItems = pages.map((page) => ({ - id: page.id, - name: page.title, - onClick: () => history.push(`/${page.id}`), - 'data-test-subj': page.id, - })); - - return ( - - ); -}); - -const buildPage = (page: PageDef) => {page.component}; - -const SearchApp = ({ basename, data, application }: SearchBarComponentParams) => { - const pages: PageDef[] = [ - { - id: 'home', - title: 'Home', - component: , - }, - { - title: 'Search API', - id: 'searchAPI', - component: , - }, - { - title: 'ES search strategy', - id: 'esSearch', - component: , - }, - { - title: 'Demo search strategy', - id: 'demoSearch', - component: , - }, - { - title: 'Async demo search strategy', - id: 'asyncDemoSearch', - component: , - }, - ]; - - const routes = pages.map((page, i) => ( - buildPage(page)} /> - )); - - return ( - - - -