diff --git a/.eslintignore b/.eslintignore index 4b5e781c26971..d983c4bedfaab 100644 --- a/.eslintignore +++ b/.eslintignore @@ -26,6 +26,7 @@ target /src/plugins/data/common/es_query/kuery/ast/_generated_/** /src/plugins/vis_type_timelion/public/_generated_/** /src/plugins/vis_type_timelion/public/webpackShims/jquery.flot.* +/src/plugins/timelion/public/webpackShims/jquery.flot.* /x-pack/legacy/plugins/**/__tests__/fixtures/** /x-pack/plugins/apm/e2e/**/snapshots.js /x-pack/plugins/apm/e2e/tmp/* diff --git a/.i18nrc.json b/.i18nrc.json index 9af7f17067b8e..e8431fdb3f0e1 100644 --- a/.i18nrc.json +++ b/.i18nrc.json @@ -44,7 +44,7 @@ "src/plugins/telemetry_management_section" ], "tileMap": "src/plugins/tile_map", - "timelion": ["src/legacy/core_plugins/timelion", "src/plugins/vis_type_timelion"], + "timelion": ["src/plugins/timelion", "src/plugins/vis_type_timelion"], "uiActions": "src/plugins/ui_actions", "visDefaultEditor": "src/plugins/vis_default_editor", "visTypeMarkdown": "src/plugins/vis_type_markdown", diff --git a/.sass-lint.yml b/.sass-lint.yml index 56b85adca8a71..50cbe81cc7da2 100644 --- a/.sass-lint.yml +++ b/.sass-lint.yml @@ -1,7 +1,7 @@ files: include: - 'src/legacy/core_plugins/metrics/**/*.s+(a|c)ss' - - 'src/legacy/core_plugins/timelion/**/*.s+(a|c)ss' + - 'src/plugins/timelion/**/*.s+(a|c)ss' - 'src/plugins/vis_type_vislib/**/*.s+(a|c)ss' - 'src/plugins/vis_type_xy/**/*.s+(a|c)ss' - 'x-pack/plugins/canvas/**/*.s+(a|c)ss' diff --git a/NOTICE.txt b/NOTICE.txt index 94312d46c35ec..56280e6e3883e 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -147,6 +147,70 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +--- +Detection Rules +Copyright 2020 Elasticsearch B.V. + +--- +This product bundles rules based on https://github.com/BlueTeamLabs/sentinel-attack +which is available under a "MIT" license. The files based on this license are: + +- defense_evasion_via_filter_manager +- discovery_process_discovery_via_tasklist_command +- persistence_priv_escalation_via_accessibility_features +- persistence_via_application_shimming +- defense_evasion_execution_via_trusted_developer_utilities + +MIT License + +Copyright (c) 2019 Edoardo Gerosa, Olaf Hartong + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- +This product bundles rules based on https://github.com/FSecureLABS/leonidas +which is available under a "MIT" license. The files based on this license are: + +- credential_access_secretsmanager_getsecretvalue.toml + +MIT License + +Copyright (c) 2020 F-Secure LABS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + --- This product bundles bootstrap@3.3.6 which is available under a "MIT" license. @@ -220,38 +284,6 @@ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ---- -This product bundles rules based on https://github.com/BlueTeamLabs/sentinel-attack -which is available under a "MIT" license. The files based on this license are: - -- windows_defense_evasion_via_filter_manager.json -- windows_process_discovery_via_tasklist_command.json -- windows_priv_escalation_via_accessibility_features.json -- windows_persistence_via_application_shimming.json -- windows_execution_via_trusted_developer_utilities.json - -MIT License - -Copyright (c) 2019 Edoardo Gerosa, Olaf Hartong - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - --- This product includes code that is adapted from mapbox-gl-js, which is available under a "BSD-3-Clause" license. diff --git a/STYLEGUIDE.md b/STYLEGUIDE.md index 48d4f929b6851..4ea7b04ebef6d 100644 --- a/STYLEGUIDE.md +++ b/STYLEGUIDE.md @@ -3,11 +3,18 @@ This guide applies to all development within the Kibana project and is recommended for the development of all Kibana plugins. +- [General](#general) +- [HTML](#html) +- [API endpoints](#api-endpoints) +- [TypeScript/JavaScript](#typeScript/javaScript) +- [SASS files](#sass-files) +- [React](#react) + Besides the content in this style guide, the following style guides may also apply to all development within the Kibana project. Please make sure to also read them: -- [Accessibility style guide](https://elastic.github.io/eui/#/guidelines/accessibility) -- [SASS style guide](https://elastic.github.io/eui/#/guidelines/sass) +- [Accessibility style guide (EUI Docs)](https://elastic.github.io/eui/#/guidelines/accessibility) +- [SASS style guide (EUI Docs)](https://elastic.github.io/eui/#/guidelines/sass) ## General @@ -582,6 +589,39 @@ Do not use setters, they cause more problems than they can solve. [sideeffect]: http://en.wikipedia.org/wiki/Side_effect_(computer_science) +## SASS files + +When writing a new component, create a sibling SASS file of the same name and import directly into the **top** of the JS/TS component file. Doing so ensures the styles are never separated or lost on import and allows for better modularization (smaller individual plugin asset footprint). + +All SASS (.scss) files will automatically build with the [EUI](https://elastic.github.io/eui/#/guidelines/sass) & Kibana invisibles (SASS variables, mixins, functions) from the [`globals_[theme].scss` file](src/legacy/ui/public/styles/_globals_v7light.scss). + +While the styles for this component will only be loaded if the component exists on the page, +the styles **will** be global and so it is recommended to use a three letter prefix on your +classes to ensure proper scope. + +**Example:** + +```tsx +// component.tsx + +import './component.scss'; +// All other imports below the SASS import + +export const Component = () => { + return ( +
+ ); +} +``` + +```scss +// component.scss + +.plgComponent { ... } +``` + +Do not use the underscore `_` SASS file naming pattern when importing directly into a javascript file. + ## React The following style guide rules are specific for working with the React framework. diff --git a/docs/developer/getting-started/index.asciidoc b/docs/developer/getting-started/index.asciidoc index ff1623e22f1eb..47c4a52daf303 100644 --- a/docs/developer/getting-started/index.asciidoc +++ b/docs/developer/getting-started/index.asciidoc @@ -29,7 +29,7 @@ you can switch to the correct version when using nvm by running: ---- nvm use ---- - + Install the latest version of https://yarnpkg.com[yarn]. Bootstrap {kib} and install all the dependencies: @@ -93,13 +93,13 @@ yarn es snapshot --license trial `trial` will give you access to all capabilities. -Read about more options for <string[]
| An array of fields to include in the results |
| [filter](./kibana-plugin-core-public.savedobjectsfindoptions.filter.md) | string
| |
| [hasReference](./kibana-plugin-core-public.savedobjectsfindoptions.hasreference.md) | {
type: string;
id: string;
}
| |
+| [namespaces](./kibana-plugin-core-public.savedobjectsfindoptions.namespaces.md) | string[]
| |
| [page](./kibana-plugin-core-public.savedobjectsfindoptions.page.md) | number
| |
| [perPage](./kibana-plugin-core-public.savedobjectsfindoptions.perpage.md) | number
| |
| [preference](./kibana-plugin-core-public.savedobjectsfindoptions.preference.md) | string
| An optional ES preference value to be used for the query \* |
diff --git a/docs/development/core/public/kibana-plugin-core-public.savedobjectsfindoptions.namespaces.md b/docs/development/core/public/kibana-plugin-core-public.savedobjectsfindoptions.namespaces.md
new file mode 100644
index 0000000000000..9cc9d64db1f65
--- /dev/null
+++ b/docs/development/core/public/kibana-plugin-core-public.savedobjectsfindoptions.namespaces.md
@@ -0,0 +1,11 @@
+
+
+[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [SavedObjectsFindOptions](./kibana-plugin-core-public.savedobjectsfindoptions.md) > [namespaces](./kibana-plugin-core-public.savedobjectsfindoptions.namespaces.md)
+
+## SavedObjectsFindOptions.namespaces property
+
+Signature:
+
+```typescript
+namespaces?: string[];
+```
diff --git a/docs/development/core/server/kibana-plugin-core-server.httpservicesetup.md b/docs/development/core/server/kibana-plugin-core-server.httpservicesetup.md
index b12983836d9e5..474dc6b7d6f28 100644
--- a/docs/development/core/server/kibana-plugin-core-server.httpservicesetup.md
+++ b/docs/development/core/server/kibana-plugin-core-server.httpservicesetup.md
@@ -88,8 +88,9 @@ async (context, request, response) => {
| [csp](./kibana-plugin-core-server.httpservicesetup.csp.md) | ICspConfig
| The CSP config used for Kibana. |
| [getServerInfo](./kibana-plugin-core-server.httpservicesetup.getserverinfo.md) | () => HttpServerInfo
| Provides common [information](./kibana-plugin-core-server.httpserverinfo.md) about the running http server. |
| [registerAuth](./kibana-plugin-core-server.httpservicesetup.registerauth.md) | (handler: AuthenticationHandler) => void
| To define custom authentication and/or authorization mechanism for incoming requests. |
-| [registerOnPostAuth](./kibana-plugin-core-server.httpservicesetup.registeronpostauth.md) | (handler: OnPostAuthHandler) => void
| To define custom logic to perform for incoming requests. |
-| [registerOnPreAuth](./kibana-plugin-core-server.httpservicesetup.registeronpreauth.md) | (handler: OnPreAuthHandler) => void
| To define custom logic to perform for incoming requests. |
+| [registerOnPostAuth](./kibana-plugin-core-server.httpservicesetup.registeronpostauth.md) | (handler: OnPostAuthHandler) => void
| To define custom logic after Auth interceptor did make sure a user has access to the requested resource. |
+| [registerOnPreAuth](./kibana-plugin-core-server.httpservicesetup.registeronpreauth.md) | (handler: OnPreAuthHandler) => void
| To define custom logic to perform for incoming requests before the Auth interceptor performs a check that user has access to requested resources. |
| [registerOnPreResponse](./kibana-plugin-core-server.httpservicesetup.registeronpreresponse.md) | (handler: OnPreResponseHandler) => void
| To define custom logic to perform for the server response. |
+| [registerOnPreRouting](./kibana-plugin-core-server.httpservicesetup.registeronprerouting.md) | (handler: OnPreRoutingHandler) => void
| To define custom logic to perform for incoming requests before server performs a route lookup. |
| [registerRouteHandlerContext](./kibana-plugin-core-server.httpservicesetup.registerroutehandlercontext.md) | <T extends keyof RequestHandlerContext>(contextName: T, provider: RequestHandlerContextProvider<T>) => RequestHandlerContextContainer
| Register a context provider for a route handler. |
diff --git a/docs/development/core/server/kibana-plugin-core-server.httpservicesetup.registeronpostauth.md b/docs/development/core/server/kibana-plugin-core-server.httpservicesetup.registeronpostauth.md
index 01294693e282f..eff53b7b75fa5 100644
--- a/docs/development/core/server/kibana-plugin-core-server.httpservicesetup.registeronpostauth.md
+++ b/docs/development/core/server/kibana-plugin-core-server.httpservicesetup.registeronpostauth.md
@@ -4,7 +4,7 @@
## HttpServiceSetup.registerOnPostAuth property
-To define custom logic to perform for incoming requests.
+To define custom logic after Auth interceptor did make sure a user has access to the requested resource.
Signature:
@@ -14,5 +14,5 @@ registerOnPostAuth: (handler: OnPostAuthHandler) => void;
## Remarks
-Runs the handler after Auth interceptor did make sure a user has access to the requested resource. The auth state is available at stage via http.auth.get(..) Can register any number of registerOnPreAuth, which are called in sequence (from the first registered to the last). See [OnPostAuthHandler](./kibana-plugin-core-server.onpostauthhandler.md).
+The auth state is available at stage via http.auth.get(..) Can register any number of registerOnPreRouting, which are called in sequence (from the first registered to the last). See [OnPostAuthHandler](./kibana-plugin-core-server.onpostauthhandler.md).
diff --git a/docs/development/core/server/kibana-plugin-core-server.httpservicesetup.registeronpreauth.md b/docs/development/core/server/kibana-plugin-core-server.httpservicesetup.registeronpreauth.md
index f11453c8cda98..ce4cacb1c8749 100644
--- a/docs/development/core/server/kibana-plugin-core-server.httpservicesetup.registeronpreauth.md
+++ b/docs/development/core/server/kibana-plugin-core-server.httpservicesetup.registeronpreauth.md
@@ -4,7 +4,7 @@
## HttpServiceSetup.registerOnPreAuth property
-To define custom logic to perform for incoming requests.
+To define custom logic to perform for incoming requests before the Auth interceptor performs a check that user has access to requested resources.
Signature:
@@ -14,5 +14,5 @@ registerOnPreAuth: (handler: OnPreAuthHandler) => void;
## Remarks
-Runs the handler before Auth interceptor performs a check that user has access to requested resources, so it's the only place when you can forward a request to another URL right on the server. Can register any number of registerOnPostAuth, which are called in sequence (from the first registered to the last). See [OnPreAuthHandler](./kibana-plugin-core-server.onpreauthhandler.md).
+Can register any number of registerOnPostAuth, which are called in sequence (from the first registered to the last). See [OnPreRoutingHandler](./kibana-plugin-core-server.onpreroutinghandler.md).
diff --git a/docs/development/core/server/kibana-plugin-core-server.httpservicesetup.registeronprerouting.md b/docs/development/core/server/kibana-plugin-core-server.httpservicesetup.registeronprerouting.md
new file mode 100644
index 0000000000000..bdf5f15828669
--- /dev/null
+++ b/docs/development/core/server/kibana-plugin-core-server.httpservicesetup.registeronprerouting.md
@@ -0,0 +1,18 @@
+
+
+[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [HttpServiceSetup](./kibana-plugin-core-server.httpservicesetup.md) > [registerOnPreRouting](./kibana-plugin-core-server.httpservicesetup.registeronprerouting.md)
+
+## HttpServiceSetup.registerOnPreRouting property
+
+To define custom logic to perform for incoming requests before server performs a route lookup.
+
+Signature:
+
+```typescript
+registerOnPreRouting: (handler: OnPreRoutingHandler) => void;
+```
+
+## Remarks
+
+It's the only place when you can forward a request to another URL right on the server. Can register any number of registerOnPreRouting, which are called in sequence (from the first registered to the last). See [OnPreRoutingHandler](./kibana-plugin-core-server.onpreroutinghandler.md).
+
diff --git a/docs/development/core/server/kibana-plugin-core-server.md b/docs/development/core/server/kibana-plugin-core-server.md
index 8d4c0c915437e..a665327454c1a 100644
--- a/docs/development/core/server/kibana-plugin-core-server.md
+++ b/docs/development/core/server/kibana-plugin-core-server.md
@@ -122,7 +122,8 @@ The plugin integrates with the core system via lifecycle events: `setup`
| [OnPreAuthToolkit](./kibana-plugin-core-server.onpreauthtoolkit.md) | A tool set defining an outcome of OnPreAuth interceptor for incoming request. |
| [OnPreResponseExtensions](./kibana-plugin-core-server.onpreresponseextensions.md) | Additional data to extend a response. |
| [OnPreResponseInfo](./kibana-plugin-core-server.onpreresponseinfo.md) | Response status code. |
-| [OnPreResponseToolkit](./kibana-plugin-core-server.onpreresponsetoolkit.md) | A tool set defining an outcome of OnPreAuth interceptor for incoming request. |
+| [OnPreResponseToolkit](./kibana-plugin-core-server.onpreresponsetoolkit.md) | A tool set defining an outcome of OnPreRouting interceptor for incoming request. |
+| [OnPreRoutingToolkit](./kibana-plugin-core-server.onpreroutingtoolkit.md) | A tool set defining an outcome of OnPreRouting interceptor for incoming request. |
| [OpsMetrics](./kibana-plugin-core-server.opsmetrics.md) | Regroups metrics gathered by all the collectors. This contains metrics about the os/runtime, the kibana process and the http server. |
| [OpsOsMetrics](./kibana-plugin-core-server.opsosmetrics.md) | OS related metrics |
| [OpsProcessMetrics](./kibana-plugin-core-server.opsprocessmetrics.md) | Process related metrics |
@@ -256,7 +257,8 @@ The plugin integrates with the core system via lifecycle events: `setup`
| [MutatingOperationRefreshSetting](./kibana-plugin-core-server.mutatingoperationrefreshsetting.md) | Elasticsearch Refresh setting for mutating operation |
| [OnPostAuthHandler](./kibana-plugin-core-server.onpostauthhandler.md) | See [OnPostAuthToolkit](./kibana-plugin-core-server.onpostauthtoolkit.md). |
| [OnPreAuthHandler](./kibana-plugin-core-server.onpreauthhandler.md) | See [OnPreAuthToolkit](./kibana-plugin-core-server.onpreauthtoolkit.md). |
-| [OnPreResponseHandler](./kibana-plugin-core-server.onpreresponsehandler.md) | See [OnPreAuthToolkit](./kibana-plugin-core-server.onpreauthtoolkit.md). |
+| [OnPreResponseHandler](./kibana-plugin-core-server.onpreresponsehandler.md) | See [OnPreRoutingToolkit](./kibana-plugin-core-server.onpreroutingtoolkit.md). |
+| [OnPreRoutingHandler](./kibana-plugin-core-server.onpreroutinghandler.md) | See [OnPreRoutingToolkit](./kibana-plugin-core-server.onpreroutingtoolkit.md). |
| [PluginConfigSchema](./kibana-plugin-core-server.pluginconfigschema.md) | Dedicated type for plugin configuration schema. |
| [PluginInitializer](./kibana-plugin-core-server.plugininitializer.md) | The plugin
export at the root of a plugin's server
directory should conform to this interface. |
| [PluginName](./kibana-plugin-core-server.pluginname.md) | Dedicated type for plugin name/id that is supposed to make Map/Set/Arrays that use it as a key or value more obvious. |
diff --git a/docs/development/core/server/kibana-plugin-core-server.onpreauthtoolkit.md b/docs/development/core/server/kibana-plugin-core-server.onpreauthtoolkit.md
index 4097cb32c397a..8031dbc64fa6d 100644
--- a/docs/development/core/server/kibana-plugin-core-server.onpreauthtoolkit.md
+++ b/docs/development/core/server/kibana-plugin-core-server.onpreauthtoolkit.md
@@ -17,5 +17,4 @@ export interface OnPreAuthToolkit
| Property | Type | Description |
| --- | --- | --- |
| [next](./kibana-plugin-core-server.onpreauthtoolkit.next.md) | () => OnPreAuthResult
| To pass request to the next handler |
-| [rewriteUrl](./kibana-plugin-core-server.onpreauthtoolkit.rewriteurl.md) | (url: string) => OnPreAuthResult
| Rewrite requested resources url before is was authenticated and routed to a handler |
diff --git a/docs/development/core/server/kibana-plugin-core-server.onpreauthtoolkit.rewriteurl.md b/docs/development/core/server/kibana-plugin-core-server.onpreauthtoolkit.rewriteurl.md
deleted file mode 100644
index 7ecde62f88302..0000000000000
--- a/docs/development/core/server/kibana-plugin-core-server.onpreauthtoolkit.rewriteurl.md
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [OnPreAuthToolkit](./kibana-plugin-core-server.onpreauthtoolkit.md) > [rewriteUrl](./kibana-plugin-core-server.onpreauthtoolkit.rewriteurl.md)
-
-## OnPreAuthToolkit.rewriteUrl property
-
-Rewrite requested resources url before is was authenticated and routed to a handler
-
-Signature:
-
-```typescript
-rewriteUrl: (url: string) => OnPreAuthResult;
-```
diff --git a/docs/development/core/server/kibana-plugin-core-server.onpreresponsehandler.md b/docs/development/core/server/kibana-plugin-core-server.onpreresponsehandler.md
index e7eab8ee34d6f..10696fb79a2f6 100644
--- a/docs/development/core/server/kibana-plugin-core-server.onpreresponsehandler.md
+++ b/docs/development/core/server/kibana-plugin-core-server.onpreresponsehandler.md
@@ -4,7 +4,7 @@
## OnPreResponseHandler type
-See [OnPreAuthToolkit](./kibana-plugin-core-server.onpreauthtoolkit.md).
+See [OnPreRoutingToolkit](./kibana-plugin-core-server.onpreroutingtoolkit.md).
Signature:
diff --git a/docs/development/core/server/kibana-plugin-core-server.onpreresponsetoolkit.md b/docs/development/core/server/kibana-plugin-core-server.onpreresponsetoolkit.md
index 8e33e945b4ef9..306c375ba4a3c 100644
--- a/docs/development/core/server/kibana-plugin-core-server.onpreresponsetoolkit.md
+++ b/docs/development/core/server/kibana-plugin-core-server.onpreresponsetoolkit.md
@@ -4,7 +4,7 @@
## OnPreResponseToolkit interface
-A tool set defining an outcome of OnPreAuth interceptor for incoming request.
+A tool set defining an outcome of OnPreRouting interceptor for incoming request.
Signature:
diff --git a/docs/development/core/server/kibana-plugin-core-server.onpreroutinghandler.md b/docs/development/core/server/kibana-plugin-core-server.onpreroutinghandler.md
new file mode 100644
index 0000000000000..46016bcd5476a
--- /dev/null
+++ b/docs/development/core/server/kibana-plugin-core-server.onpreroutinghandler.md
@@ -0,0 +1,13 @@
+
+
+[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [OnPreRoutingHandler](./kibana-plugin-core-server.onpreroutinghandler.md)
+
+## OnPreRoutingHandler type
+
+See [OnPreRoutingToolkit](./kibana-plugin-core-server.onpreroutingtoolkit.md).
+
+Signature:
+
+```typescript
+export declare type OnPreRoutingHandler = (request: KibanaRequest, response: LifecycleResponseFactory, toolkit: OnPreRoutingToolkit) => OnPreRoutingResult | KibanaResponse | Promise() => OnPreRoutingResult
| To pass request to the next handler |
+| [rewriteUrl](./kibana-plugin-core-server.onpreroutingtoolkit.rewriteurl.md) | (url: string) => OnPreRoutingResult
| Rewrite requested resources url before is was authenticated and routed to a handler |
+
diff --git a/docs/development/core/server/kibana-plugin-core-server.onpreroutingtoolkit.next.md b/docs/development/core/server/kibana-plugin-core-server.onpreroutingtoolkit.next.md
new file mode 100644
index 0000000000000..7fb0b2ce67ba5
--- /dev/null
+++ b/docs/development/core/server/kibana-plugin-core-server.onpreroutingtoolkit.next.md
@@ -0,0 +1,13 @@
+
+
+[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [OnPreRoutingToolkit](./kibana-plugin-core-server.onpreroutingtoolkit.md) > [next](./kibana-plugin-core-server.onpreroutingtoolkit.next.md)
+
+## OnPreRoutingToolkit.next property
+
+To pass request to the next handler
+
+Signature:
+
+```typescript
+next: () => OnPreRoutingResult;
+```
diff --git a/docs/development/core/server/kibana-plugin-core-server.onpreroutingtoolkit.rewriteurl.md b/docs/development/core/server/kibana-plugin-core-server.onpreroutingtoolkit.rewriteurl.md
new file mode 100644
index 0000000000000..346a12711c723
--- /dev/null
+++ b/docs/development/core/server/kibana-plugin-core-server.onpreroutingtoolkit.rewriteurl.md
@@ -0,0 +1,13 @@
+
+
+[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [OnPreRoutingToolkit](./kibana-plugin-core-server.onpreroutingtoolkit.md) > [rewriteUrl](./kibana-plugin-core-server.onpreroutingtoolkit.rewriteurl.md)
+
+## OnPreRoutingToolkit.rewriteUrl property
+
+Rewrite requested resources url before is was authenticated and routed to a handler
+
+Signature:
+
+```typescript
+rewriteUrl: (url: string) => OnPreRoutingResult;
+```
diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsfindoptions.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsfindoptions.md
index 6db16d979f1fe..67e931f0cb3b3 100644
--- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsfindoptions.md
+++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsfindoptions.md
@@ -8,7 +8,7 @@
Signature:
```typescript
-export interface SavedObjectsFindOptions extends SavedObjectsBaseOptions
+export interface SavedObjectsFindOptions
```
## Properties
@@ -19,6 +19,7 @@ export interface SavedObjectsFindOptions extends SavedObjectsBaseOptions
| [fields](./kibana-plugin-core-server.savedobjectsfindoptions.fields.md) | string[]
| An array of fields to include in the results |
| [filter](./kibana-plugin-core-server.savedobjectsfindoptions.filter.md) | string
| |
| [hasReference](./kibana-plugin-core-server.savedobjectsfindoptions.hasreference.md) | {
type: string;
id: string;
}
| |
+| [namespaces](./kibana-plugin-core-server.savedobjectsfindoptions.namespaces.md) | string[]
| |
| [page](./kibana-plugin-core-server.savedobjectsfindoptions.page.md) | number
| |
| [perPage](./kibana-plugin-core-server.savedobjectsfindoptions.perpage.md) | number
| |
| [preference](./kibana-plugin-core-server.savedobjectsfindoptions.preference.md) | string
| An optional ES preference value to be used for the query \* |
diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsfindoptions.namespaces.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsfindoptions.namespaces.md
new file mode 100644
index 0000000000000..cae707baa58c0
--- /dev/null
+++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsfindoptions.namespaces.md
@@ -0,0 +1,11 @@
+
+
+[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsFindOptions](./kibana-plugin-core-server.savedobjectsfindoptions.md) > [namespaces](./kibana-plugin-core-server.savedobjectsfindoptions.namespaces.md)
+
+## SavedObjectsFindOptions.namespaces property
+
+Signature:
+
+```typescript
+namespaces?: string[];
+```
diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.find.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.find.md
index 8b89c802ec9ce..6c41441302c0b 100644
--- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.find.md
+++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.find.md
@@ -7,14 +7,14 @@
Signature:
```typescript
-findSavedObjectsFindOptions
| |
+| { search, defaultSearchOperator, searchFields, hasReference, page, perPage, sortField, sortOrder, fields, namespaces, type, filter, preference, } | SavedObjectsFindOptions
| |
Returns:
diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.md
index b9a92561f29fb..5b02707a3c0f4 100644
--- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.md
+++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.md
@@ -23,7 +23,7 @@ export declare class SavedObjectsRepository
| [delete(type, id, options)](./kibana-plugin-core-server.savedobjectsrepository.delete.md) | | Deletes an object |
| [deleteByNamespace(namespace, options)](./kibana-plugin-core-server.savedobjectsrepository.deletebynamespace.md) | | Deletes all objects from the provided namespace. |
| [deleteFromNamespaces(type, id, namespaces, options)](./kibana-plugin-core-server.savedobjectsrepository.deletefromnamespaces.md) | | Removes one or more namespaces from a given multi-namespace saved object. If no namespaces remain, the saved object is deleted entirely. This method and \[addToNamespaces
\][SavedObjectsRepository.addToNamespaces()](./kibana-plugin-core-server.savedobjectsrepository.addtonamespaces.md) are the only ways to change which Spaces a multi-namespace saved object is shared to. |
-| [find({ search, defaultSearchOperator, searchFields, hasReference, page, perPage, sortField, sortOrder, fields, namespace, type, filter, preference, })](./kibana-plugin-core-server.savedobjectsrepository.find.md) | | |
+| [find({ search, defaultSearchOperator, searchFields, hasReference, page, perPage, sortField, sortOrder, fields, namespaces, type, filter, preference, })](./kibana-plugin-core-server.savedobjectsrepository.find.md) | | |
| [get(type, id, options)](./kibana-plugin-core-server.savedobjectsrepository.get.md) | | Gets a single object |
| [incrementCounter(type, id, counterFieldName, options)](./kibana-plugin-core-server.savedobjectsrepository.incrementcounter.md) | | Increases a counter field by one. Creates the document if one doesn't exist for the given id. |
| [update(type, id, attributes, options)](./kibana-plugin-core-server.savedobjectsrepository.update.md) | | Updates an object |
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.baseformatterspublic.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.baseformatterspublic.md
index ddbf1a8459d1f..25f046983cbce 100644
--- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.baseformatterspublic.md
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.baseformatterspublic.md
@@ -7,5 +7,5 @@
Signature:
```typescript
-baseFormattersPublic: (import("../../common").FieldFormatInstanceType | typeof DateFormat)[]
+baseFormattersPublic: (import("../../common").FieldFormatInstanceType | typeof DateNanosFormat | typeof DateFormat)[]
```
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.fieldformats.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.fieldformats.md
index 45fc1a608e8ca..0dddc65f4db92 100644
--- a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.fieldformats.md
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.fieldformats.md
@@ -13,7 +13,6 @@ fieldFormats: {
BoolFormat: typeof BoolFormat;
BytesFormat: typeof BytesFormat;
ColorFormat: typeof ColorFormat;
- DateNanosFormat: typeof DateNanosFormat;
DurationFormat: typeof DurationFormat;
IpFormat: typeof IpFormat;
NumberFormat: typeof NumberFormat;
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.irequesttypesmap.es.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.irequesttypesmap.es.md
deleted file mode 100644
index 9cebff05dc9db..0000000000000
--- a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.irequesttypesmap.es.md
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [IRequestTypesMap](./kibana-plugin-plugins-data-server.irequesttypesmap.md) > [es](./kibana-plugin-plugins-data-server.irequesttypesmap.es.md)
-
-## IRequestTypesMap.es property
-
-Signature:
-
-```typescript
-[ES_SEARCH_STRATEGY]: IEsSearchRequest;
-```
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.irequesttypesmap.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.irequesttypesmap.md
deleted file mode 100644
index 3f5e4ba0f7799..0000000000000
--- a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.irequesttypesmap.md
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [IRequestTypesMap](./kibana-plugin-plugins-data-server.irequesttypesmap.md)
-
-## IRequestTypesMap interface
-
-The map of search strategy IDs to the corresponding request type definitions.
-
-Signature:
-
-```typescript
-export interface IRequestTypesMap
-```
-
-## Properties
-
-| Property | Type | Description |
-| --- | --- | --- |
-| [es](./kibana-plugin-plugins-data-server.irequesttypesmap.es.md) | IEsSearchRequest
| |
-
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.iresponsetypesmap.es.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.iresponsetypesmap.es.md
deleted file mode 100644
index 1154fc141d6c7..0000000000000
--- a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.iresponsetypesmap.es.md
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [IResponseTypesMap](./kibana-plugin-plugins-data-server.iresponsetypesmap.md) > [es](./kibana-plugin-plugins-data-server.iresponsetypesmap.es.md)
-
-## IResponseTypesMap.es property
-
-Signature:
-
-```typescript
-[ES_SEARCH_STRATEGY]: IEsSearchResponse;
-```
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.iresponsetypesmap.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.iresponsetypesmap.md
deleted file mode 100644
index 629ab4347eda8..0000000000000
--- a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.iresponsetypesmap.md
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [IResponseTypesMap](./kibana-plugin-plugins-data-server.iresponsetypesmap.md)
-
-## IResponseTypesMap interface
-
-The map of search strategy IDs to the corresponding response type definitions.
-
-Signature:
-
-```typescript
-export interface IResponseTypesMap
-```
-
-## Properties
-
-| Property | Type | Description |
-| --- | --- | --- |
-| [es](./kibana-plugin-plugins-data-server.iresponsetypesmap.es.md) | IEsSearchResponse
| |
-
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.isearch.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.isearch.md
deleted file mode 100644
index 96991579c1716..0000000000000
--- a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.isearch.md
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [ISearch](./kibana-plugin-plugins-data-server.isearch.md)
-
-## ISearch type
-
-Signature:
-
-```typescript
-export declare type ISearchAbortSignal
| An AbortSignal
that allows the caller of search
to abort a search request. |
+| [strategy](./kibana-plugin-plugins-data-server.isearchoptions.strategy.md) | string
| |
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.isearchoptions.strategy.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.isearchoptions.strategy.md
new file mode 100644
index 0000000000000..6df72d023e2c0
--- /dev/null
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.isearchoptions.strategy.md
@@ -0,0 +1,11 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [ISearchOptions](./kibana-plugin-plugins-data-server.isearchoptions.md) > [strategy](./kibana-plugin-plugins-data-server.isearchoptions.strategy.md)
+
+## ISearchOptions.strategy property
+
+Signature:
+
+```typescript
+strategy?: string;
+```
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.isearchsetup.registersearchstrategy.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.isearchsetup.registersearchstrategy.md
index c06b8b00806bf..73c575e7095ed 100644
--- a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.isearchsetup.registersearchstrategy.md
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.isearchsetup.registersearchstrategy.md
@@ -9,5 +9,5 @@ Extension point exposed for other plugins to register their own search strategie
Signature:
```typescript
-registerSearchStrategy: TRegisterSearchStrategy;
+registerSearchStrategy: (name: string, strategy: ISearchStrategy) => void;
```
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.isearchstart.getsearchstrategy.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.isearchstart.getsearchstrategy.md
index 0ba4bf578d6cc..970b2811a574b 100644
--- a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.isearchstart.getsearchstrategy.md
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.isearchstart.getsearchstrategy.md
@@ -9,5 +9,5 @@ Get other registered search strategies. For example, if a new strategy needs to
Signature:
```typescript
-getSearchStrategy: TGetSearchStrategy;
+getSearchStrategy: (name: string) => ISearchStrategy;
```
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.isearchstart.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.isearchstart.md
index abe72396f61e1..308ce3cb568bc 100644
--- a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.isearchstart.md
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.isearchstart.md
@@ -14,5 +14,6 @@ export interface ISearchStart
| Property | Type | Description |
| --- | --- | --- |
-| [getSearchStrategy](./kibana-plugin-plugins-data-server.isearchstart.getsearchstrategy.md) | TGetSearchStrategy
| Get other registered search strategies. For example, if a new strategy needs to use the already-registered ES search strategy, it can use this function to accomplish that. |
+| [getSearchStrategy](./kibana-plugin-plugins-data-server.isearchstart.getsearchstrategy.md) | (name: string) => ISearchStrategy
| Get other registered search strategies. For example, if a new strategy needs to use the already-registered ES search strategy, it can use this function to accomplish that. |
+| [search](./kibana-plugin-plugins-data-server.isearchstart.search.md) | (context: RequestHandlerContext, request: IKibanaSearchRequest, options: ISearchOptions) => Promise<IKibanaSearchResponse>
| |
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.isearchstart.search.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.isearchstart.search.md
new file mode 100644
index 0000000000000..1c2ae91699559
--- /dev/null
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.isearchstart.search.md
@@ -0,0 +1,11 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [ISearchStart](./kibana-plugin-plugins-data-server.isearchstart.md) > [search](./kibana-plugin-plugins-data-server.isearchstart.search.md)
+
+## ISearchStart.search property
+
+Signature:
+
+```typescript
+search: (context: RequestHandlerContext, request: IKibanaSearchRequest, options: ISearchOptions) => PromiseISearchCancel<T>
| |
-| [search](./kibana-plugin-plugins-data-server.isearchstrategy.search.md) | ISearch<T>
| |
+| [cancel](./kibana-plugin-plugins-data-server.isearchstrategy.cancel.md) | (context: RequestHandlerContext, id: string) => Promise<void>
| |
+| [search](./kibana-plugin-plugins-data-server.isearchstrategy.search.md) | (context: RequestHandlerContext, request: IEsSearchRequest, options?: ISearchOptions) => Promise<IEsSearchResponse>
| |
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.isearchstrategy.search.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.isearchstrategy.search.md
index 34a17ca87807a..1a225d0c9aeab 100644
--- a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.isearchstrategy.search.md
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.isearchstrategy.search.md
@@ -7,5 +7,5 @@
Signature:
```typescript
-search: ISearch {
auth?: { isAuthenticated: boolean };
@@ -161,7 +161,7 @@ const createLifecycleResponseFactoryMock = (): jest.MockedThis is a long title
' +
- '' +
- '
'
- );
-
- vegaVis.destroy();
-
- tooltip = document.getElementById('vega-kibana-tooltip');
- expect(tooltip).to.not.be.ok();
- } finally {
- vegaVis.destroy();
- }
- });
-
- it('should show vega blank rectangle on top of a map (vegamap)', async () => {
- let vegaVis;
- try {
- vegaVis = new VegaVisualization(domNode, vis);
- const vegaParser = new VegaParser(
- vegaMapGraph,
- new SearchAPI({
- search: npStart.plugins.data.search,
- uiSettings: npStart.core.uiSettings,
- injectedMetadata: npStart.core.injectedMetadata,
- })
- );
- await vegaParser.parseAsync();
-
- domNode.style.width = '256px';
- domNode.style.height = '256px';
-
- await vegaVis.render(vegaParser, vis.params, { data: true });
- const mismatchedPixels = await compareImage(vegaMapImage256);
- expect(mismatchedPixels).to.be.lessThan(PIXEL_DIFF);
- } finally {
- vegaVis.destroy();
- }
- });
-
- it('should add a small subpixel value to the height of the canvas to avoid getting it set to 0', async () => {
- let vegaVis;
- try {
- vegaVis = new VegaVisualization(domNode, vis);
- const vegaParser = new VegaParser(
- `{
- "$schema": "https://vega.github.io/schema/vega/v5.json",
- "marks": [
- {
- "type": "text",
- "encode": {
- "update": {
- "text": {
- "value": "Test"
- },
- "align": {"value": "center"},
- "baseline": {"value": "middle"},
- "xc": {"signal": "width/2"},
- "yc": {"signal": "height/2"}
- fontSize: {value: "14"}
- }
- }
- }
- ]
- }`,
- new SearchAPI({
- search: npStart.plugins.data.search,
- uiSettings: npStart.core.uiSettings,
- injectedMetadata: npStart.core.injectedMetadata,
- })
- );
- await vegaParser.parseAsync();
-
- domNode.style.width = '256px';
- domNode.style.height = '256px';
-
- await vegaVis.render(vegaParser, vis.params, { data: true });
- const vegaView = vegaVis._vegaView._view;
- expect(vegaView.height()).to.be(250.00000001);
- } finally {
- vegaVis.destroy();
- }
- });
- });
-
- async function compareImage(expectedImageSource) {
- const elementList = domNode.querySelectorAll('canvas');
- expect(elementList.length).to.equal(1);
- const firstCanvasOnMap = elementList[0];
- return imageComparator.compareImage(firstCanvasOnMap, expectedImageSource, THRESHOLD);
- }
-
- function setupDOM(width, height) {
- domNode = document.createElement('div');
- domNode.style.top = '0';
- domNode.style.left = '0';
- domNode.style.width = width;
- domNode.style.height = height;
- domNode.style.position = 'fixed';
- domNode.style.border = '1px solid blue';
- domNode.style['pointer-events'] = 'none';
- document.body.appendChild(domNode);
- }
-
- function teardownDOM() {
- domNode.innerHTML = '';
- document.body.removeChild(domNode);
- }
-});
diff --git a/src/legacy/core_plugins/kibana/public/__tests__/vis_type_vega/vegalite_graph.hjson b/src/legacy/core_plugins/kibana/public/__tests__/vis_type_vega/vegalite_graph.hjson
deleted file mode 100644
index 2132b0f77e6bc..0000000000000
--- a/src/legacy/core_plugins/kibana/public/__tests__/vis_type_vega/vegalite_graph.hjson
+++ /dev/null
@@ -1,45 +0,0 @@
-{
- $schema: https://vega.github.io/schema/vega-lite/v4.json
- data: {
- format: {property: "aggregations.time_buckets.buckets"}
- values: {
- aggregations: {
- time_buckets: {
- buckets: [
- {key: 1512950400000, doc_count: 0}
- {key: 1513036800000, doc_count: 0}
- {key: 1513123200000, doc_count: 0}
- {key: 1513209600000, doc_count: 4545}
- {key: 1513296000000, doc_count: 4667}
- {key: 1513382400000, doc_count: 4660}
- {key: 1513468800000, doc_count: 133}
- {key: 1513555200000, doc_count: 0}
- {key: 1513641600000, doc_count: 0}
- {key: 1513728000000, doc_count: 0}
- ]
- }
- }
- status: 200
- }
- }
- mark: line
- encoding: {
- x: {
- field: key
- type: temporal
- axis: null
- }
- y: {
- field: doc_count
- type: quantitative
- axis: null
- }
- }
- config: {
- range: {
- category: {scheme: "elastic"}
- }
- mark: {color: "#54B399"}
- }
- autosize: {type: "fit", contains: "padding"}
-}
diff --git a/src/legacy/core_plugins/kibana/public/__tests__/vis_type_vega/vegalite_image_256.png b/src/legacy/core_plugins/kibana/public/__tests__/vis_type_vega/vegalite_image_256.png
deleted file mode 100644
index 8f2d146287b08..0000000000000
Binary files a/src/legacy/core_plugins/kibana/public/__tests__/vis_type_vega/vegalite_image_256.png and /dev/null differ
diff --git a/src/legacy/core_plugins/kibana/public/__tests__/vis_type_vega/vegalite_image_512.png b/src/legacy/core_plugins/kibana/public/__tests__/vis_type_vega/vegalite_image_512.png
deleted file mode 100644
index 82077a1096b99..0000000000000
Binary files a/src/legacy/core_plugins/kibana/public/__tests__/vis_type_vega/vegalite_image_512.png and /dev/null differ
diff --git a/src/legacy/core_plugins/timelion/index.ts b/src/legacy/core_plugins/timelion/index.ts
deleted file mode 100644
index 9c8ab156d1a79..0000000000000
--- a/src/legacy/core_plugins/timelion/index.ts
+++ /dev/null
@@ -1,189 +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 { resolve } from 'path';
-import { i18n } from '@kbn/i18n';
-import { Legacy } from 'kibana';
-import { LegacyPluginApi, LegacyPluginInitializer } from 'src/legacy/plugin_discovery/types';
-import { DEFAULT_APP_CATEGORIES } from '../../../core/server';
-
-const experimentalLabel = i18n.translate('timelion.uiSettings.experimentalLabel', {
- defaultMessage: 'experimental',
-});
-
-const timelionPluginInitializer: LegacyPluginInitializer = ({ Plugin }: LegacyPluginApi) =>
- new Plugin({
- require: ['kibana', 'elasticsearch'],
- config(Joi: any) {
- return Joi.object({
- enabled: Joi.boolean().default(true),
- ui: Joi.object({
- enabled: Joi.boolean().default(false),
- }).default(),
- graphiteUrls: Joi.array()
- .items(Joi.string().uri({ scheme: ['http', 'https'] }))
- .default([]),
- }).default();
- },
- // @ts-ignore
- // https://github.com/elastic/kibana/pull/44039#discussion_r326582255
- uiCapabilities() {
- return {
- timelion: {
- save: true,
- },
- };
- },
- publicDir: resolve(__dirname, 'public'),
- uiExports: {
- app: {
- title: 'Timelion',
- order: 8000,
- icon: 'plugins/timelion/icon.svg',
- euiIconType: 'timelionApp',
- main: 'plugins/timelion/app',
- category: DEFAULT_APP_CATEGORIES.kibana,
- },
- styleSheetPaths: resolve(__dirname, 'public/index.scss'),
- hacks: [resolve(__dirname, 'public/legacy')],
- uiSettingDefaults: {
- 'timelion:showTutorial': {
- name: i18n.translate('timelion.uiSettings.showTutorialLabel', {
- defaultMessage: 'Show tutorial',
- }),
- value: false,
- description: i18n.translate('timelion.uiSettings.showTutorialDescription', {
- defaultMessage: 'Should I show the tutorial by default when entering the timelion app?',
- }),
- category: ['timelion'],
- },
- 'timelion:es.timefield': {
- name: i18n.translate('timelion.uiSettings.timeFieldLabel', {
- defaultMessage: 'Time field',
- }),
- value: '@timestamp',
- description: i18n.translate('timelion.uiSettings.timeFieldDescription', {
- defaultMessage: 'Default field containing a timestamp when using {esParam}',
- values: { esParam: '.es()' },
- }),
- category: ['timelion'],
- },
- 'timelion:es.default_index': {
- name: i18n.translate('timelion.uiSettings.defaultIndexLabel', {
- defaultMessage: 'Default index',
- }),
- value: '_all',
- description: i18n.translate('timelion.uiSettings.defaultIndexDescription', {
- defaultMessage: 'Default elasticsearch index to search with {esParam}',
- values: { esParam: '.es()' },
- }),
- category: ['timelion'],
- },
- 'timelion:target_buckets': {
- name: i18n.translate('timelion.uiSettings.targetBucketsLabel', {
- defaultMessage: 'Target buckets',
- }),
- value: 200,
- description: i18n.translate('timelion.uiSettings.targetBucketsDescription', {
- defaultMessage: 'The number of buckets to shoot for when using auto intervals',
- }),
- category: ['timelion'],
- },
- 'timelion:max_buckets': {
- name: i18n.translate('timelion.uiSettings.maximumBucketsLabel', {
- defaultMessage: 'Maximum buckets',
- }),
- value: 2000,
- description: i18n.translate('timelion.uiSettings.maximumBucketsDescription', {
- defaultMessage: 'The maximum number of buckets a single datasource can return',
- }),
- category: ['timelion'],
- },
- 'timelion:default_columns': {
- name: i18n.translate('timelion.uiSettings.defaultColumnsLabel', {
- defaultMessage: 'Default columns',
- }),
- value: 2,
- description: i18n.translate('timelion.uiSettings.defaultColumnsDescription', {
- defaultMessage: 'Number of columns on a timelion sheet by default',
- }),
- category: ['timelion'],
- },
- 'timelion:default_rows': {
- name: i18n.translate('timelion.uiSettings.defaultRowsLabel', {
- defaultMessage: 'Default rows',
- }),
- value: 2,
- description: i18n.translate('timelion.uiSettings.defaultRowsDescription', {
- defaultMessage: 'Number of rows on a timelion sheet by default',
- }),
- category: ['timelion'],
- },
- 'timelion:min_interval': {
- name: i18n.translate('timelion.uiSettings.minimumIntervalLabel', {
- defaultMessage: 'Minimum interval',
- }),
- value: '1ms',
- description: i18n.translate('timelion.uiSettings.minimumIntervalDescription', {
- defaultMessage: 'The smallest interval that will be calculated when using "auto"',
- description:
- '"auto" is a technical value in that context, that should not be translated.',
- }),
- category: ['timelion'],
- },
- 'timelion:graphite.url': {
- name: i18n.translate('timelion.uiSettings.graphiteURLLabel', {
- defaultMessage: 'Graphite URL',
- description:
- 'The URL should be in the form of https://www.hostedgraphite.com/UID/ACCESS_KEY/graphite',
- }),
- value: (server: Legacy.Server) => {
- const urls = server.config().get('timelion.graphiteUrls') as string[];
- if (urls.length === 0) {
- return null;
- } else {
- return urls[0];
- }
- },
- description: i18n.translate('timelion.uiSettings.graphiteURLDescription', {
- defaultMessage:
- '{experimentalLabel} The URL of your graphite host',
- values: { experimentalLabel: `[${experimentalLabel}]` },
- }),
- type: 'select',
- options: (server: Legacy.Server) => server.config().get('timelion.graphiteUrls'),
- category: ['timelion'],
- },
- 'timelion:quandl.key': {
- name: i18n.translate('timelion.uiSettings.quandlKeyLabel', {
- defaultMessage: 'Quandl key',
- }),
- value: 'someKeyHere',
- description: i18n.translate('timelion.uiSettings.quandlKeyDescription', {
- defaultMessage: '{experimentalLabel} Your API key from www.quandl.com',
- values: { experimentalLabel: `[${experimentalLabel}]` },
- }),
- category: ['timelion'],
- },
- },
- },
- });
-
-// eslint-disable-next-line import/no-default-export
-export default timelionPluginInitializer;
diff --git a/src/legacy/core_plugins/timelion/package.json b/src/legacy/core_plugins/timelion/package.json
deleted file mode 100644
index 8b138e3b76d1a..0000000000000
--- a/src/legacy/core_plugins/timelion/package.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "author": "Rashid Khan ' +
- 'fieldA: value of fld1 ' +
- 'fld2: 42
markup).
- * - The Range and Selection APIs ignore newlines when providing caret position, so there is
- * literally no way to insert suggestions into the correct place in a multiline expression
- * that has more than a single consecutive newline.
- */
-
-import _ from 'lodash';
-import $ from 'jquery';
-import PEG from 'pegjs';
-import grammar from 'raw-loader!../../../../../plugins/vis_type_timelion/common/chain.peg';
-import timelionExpressionInputTemplate from './timelion_expression_input.html';
-import {
- SUGGESTION_TYPE,
- Suggestions,
- suggest,
- insertAtLocation,
-} from './timelion_expression_input_helpers';
-import { comboBoxKeys } from '@elastic/eui';
-import { npStart } from 'ui/new_platform';
-
-const Parser = PEG.generate(grammar);
-
-export function TimelionExpInput($http, $timeout) {
- return {
- restrict: 'E',
- scope: {
- rows: '=',
- sheet: '=',
- updateChart: '&',
- shouldPopoverSuggestions: '@',
- },
- replace: true,
- template: timelionExpressionInputTemplate,
- link: function (scope, elem) {
- const argValueSuggestions = npStart.plugins.visTypeTimelion.getArgValueSuggestions();
- const expressionInput = elem.find('[data-expression-input]');
- const functionReference = {};
- let suggestibleFunctionLocation = {};
-
- scope.suggestions = new Suggestions();
-
- function init() {
- $http.get('../api/timelion/functions').then(function (resp) {
- Object.assign(functionReference, {
- byName: _.keyBy(resp.data, 'name'),
- list: resp.data,
- });
- });
- }
-
- function setCaretOffset(caretOffset) {
- // Wait for Angular to update the input with the new expression and *then* we can set
- // the caret position.
- $timeout(() => {
- expressionInput.focus();
- expressionInput[0].selectionStart = expressionInput[0].selectionEnd = caretOffset;
- scope.$apply();
- }, 0);
- }
-
- function insertSuggestionIntoExpression(suggestionIndex) {
- if (scope.suggestions.isEmpty()) {
- return;
- }
-
- const { min, max } = suggestibleFunctionLocation;
- let insertedValue;
- let insertPositionMinOffset = 0;
-
- switch (scope.suggestions.type) {
- case SUGGESTION_TYPE.FUNCTIONS: {
- // Position the caret inside of the function parentheses.
- insertedValue = `${scope.suggestions.list[suggestionIndex].name}()`;
-
- // min advanced one to not replace function '.'
- insertPositionMinOffset = 1;
- break;
- }
- case SUGGESTION_TYPE.ARGUMENTS: {
- // Position the caret after the '='
- insertedValue = `${scope.suggestions.list[suggestionIndex].name}=`;
- break;
- }
- case SUGGESTION_TYPE.ARGUMENT_VALUE: {
- // Position the caret after the argument value
- insertedValue = `${scope.suggestions.list[suggestionIndex].name}`;
- break;
- }
- }
-
- const updatedExpression = insertAtLocation(
- insertedValue,
- scope.sheet,
- min + insertPositionMinOffset,
- max
- );
- scope.sheet = updatedExpression;
-
- const newCaretOffset = min + insertedValue.length;
- setCaretOffset(newCaretOffset);
- }
-
- function scrollToSuggestionAt(index) {
- // We don't cache these because the list changes based on user input.
- const suggestionsList = $('[data-suggestions-list]');
- const suggestionListItem = $('[data-suggestion-list-item]')[index];
- // Scroll to the position of the item relative to the list, not to the window.
- suggestionsList.scrollTop(suggestionListItem.offsetTop - suggestionsList[0].offsetTop);
- }
-
- function getCursorPosition() {
- if (expressionInput.length) {
- return expressionInput[0].selectionStart;
- }
- return null;
- }
-
- async function getSuggestions() {
- const suggestions = await suggest(
- scope.sheet,
- functionReference.list,
- Parser,
- getCursorPosition(),
- argValueSuggestions
- );
-
- // We're using ES6 Promises, not $q, so we have to wrap this in $apply.
- scope.$apply(() => {
- if (suggestions) {
- scope.suggestions.setList(suggestions.list, suggestions.type);
- scope.suggestions.show();
- suggestibleFunctionLocation = suggestions.location;
- $timeout(() => {
- const suggestionsList = $('[data-suggestions-list]');
- suggestionsList.scrollTop(0);
- }, 0);
- return;
- }
-
- suggestibleFunctionLocation = undefined;
- scope.suggestions.reset();
- });
- }
-
- function isNavigationalKey(key) {
- const keyCodes = _.values(comboBoxKeys);
- return keyCodes.includes(key);
- }
-
- scope.onFocusInput = () => {
- // Wait for the caret position of the input to update and then we can get suggestions
- // (which depends on the caret position).
- $timeout(getSuggestions, 0);
- };
-
- scope.onBlurInput = () => {
- scope.suggestions.hide();
- };
-
- scope.onKeyDownInput = (e) => {
- // If we've pressed any non-navigational keys, then the user has typed something and we
- // can exit early without doing any navigation. The keyup handler will pull up suggestions.
- if (!isNavigationalKey(e.key)) {
- return;
- }
-
- switch (e.keyCode) {
- case comboBoxKeys.ARROW_UP:
- if (scope.suggestions.isVisible) {
- // Up and down keys navigate through suggestions.
- e.preventDefault();
- scope.suggestions.stepForward();
- scrollToSuggestionAt(scope.suggestions.index);
- }
- break;
-
- case comboBoxKeys.ARROW_DOWN:
- if (scope.suggestions.isVisible) {
- // Up and down keys navigate through suggestions.
- e.preventDefault();
- scope.suggestions.stepBackward();
- scrollToSuggestionAt(scope.suggestions.index);
- }
- break;
-
- case comboBoxKeys.TAB:
- // If there are no suggestions or none is selected, the user tabs to the next input.
- if (scope.suggestions.isEmpty() || scope.suggestions.index < 0) {
- // Before letting the tab be handled to focus the next element
- // we need to hide the suggestions, otherwise it will focus these
- // instead of the time interval select.
- scope.suggestions.hide();
- return;
- }
-
- // If we have suggestions, complete the selected one.
- e.preventDefault();
- insertSuggestionIntoExpression(scope.suggestions.index);
- break;
-
- case comboBoxKeys.ENTER:
- if (e.metaKey || e.ctrlKey) {
- // Re-render the chart when the user hits CMD+ENTER.
- e.preventDefault();
- scope.updateChart();
- } else if (!scope.suggestions.isEmpty()) {
- // If the suggestions are open, complete the expression with the suggestion.
- e.preventDefault();
- insertSuggestionIntoExpression(scope.suggestions.index);
- }
- break;
-
- case comboBoxKeys.ESCAPE:
- e.preventDefault();
- scope.suggestions.hide();
- break;
- }
- };
-
- scope.onKeyUpInput = (e) => {
- // If the user isn't navigating, then we should update the suggestions based on their input.
- if (!isNavigationalKey(e.key)) {
- getSuggestions();
- }
- };
-
- scope.onClickExpression = () => {
- getSuggestions();
- };
-
- scope.onClickSuggestion = (index) => {
- insertSuggestionIntoExpression(index);
- };
-
- scope.getActiveSuggestionId = () => {
- if (scope.suggestions.isVisible && scope.suggestions.index > -1) {
- return `timelionSuggestion${scope.suggestions.index}`;
- }
- return '';
- };
-
- init();
- },
- };
-}
diff --git a/src/legacy/core_plugins/timelion/public/directives/timelion_grid.js b/src/legacy/core_plugins/timelion/public/directives/timelion_grid.js
deleted file mode 100644
index 256c35331d016..0000000000000
--- a/src/legacy/core_plugins/timelion/public/directives/timelion_grid.js
+++ /dev/null
@@ -1,67 +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 $ from 'jquery';
-
-const app = require('ui/modules').get('apps/timelion', []);
-app.directive('timelionGrid', function () {
- return {
- restrict: 'A',
- scope: {
- timelionGridRows: '=',
- timelionGridColumns: '=',
- },
- link: function ($scope, $elem) {
- function init() {
- setDimensions();
- }
-
- $scope.$on('$destroy', function () {
- $(window).off('resize'); //remove the handler added earlier
- });
-
- $(window).resize(function () {
- setDimensions();
- });
-
- $scope.$watchMulti(['timelionGridColumns', 'timelionGridRows'], function () {
- setDimensions();
- });
-
- function setDimensions() {
- const borderSize = 2;
- const headerSize = 45 + 35 + 28 + 20 * 2; // chrome + subnav + buttons + (container padding)
- const verticalPadding = 10;
-
- if ($scope.timelionGridColumns != null) {
- $elem.width($elem.parent().width() / $scope.timelionGridColumns - borderSize * 2);
- }
-
- if ($scope.timelionGridRows != null) {
- $elem.height(
- ($(window).height() - headerSize) / $scope.timelionGridRows -
- (verticalPadding + borderSize * 2)
- );
- }
- }
-
- init();
- },
- };
-});
diff --git a/src/legacy/core_plugins/timelion/public/directives/timelion_help/timelion_help.js b/src/legacy/core_plugins/timelion/public/directives/timelion_help/timelion_help.js
deleted file mode 100644
index 25f3df13153ba..0000000000000
--- a/src/legacy/core_plugins/timelion/public/directives/timelion_help/timelion_help.js
+++ /dev/null
@@ -1,168 +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 template from './timelion_help.html';
-import { i18n } from '@kbn/i18n';
-import { uiModules } from 'ui/modules';
-import _ from 'lodash';
-import moment from 'moment';
-import '../../components/timelionhelp_tabs_directive';
-
-const app = uiModules.get('apps/timelion', []);
-
-app.directive('timelionHelp', function ($http) {
- return {
- restrict: 'E',
- template,
- controller: function ($scope) {
- $scope.functions = {
- list: [],
- details: null,
- };
-
- $scope.activeTab = 'funcref';
- $scope.activateTab = function (tabName) {
- $scope.activeTab = tabName;
- };
-
- function init() {
- $scope.es = {
- invalidCount: 0,
- };
-
- $scope.translations = {
- nextButtonLabel: i18n.translate('timelion.help.nextPageButtonLabel', {
- defaultMessage: 'Next',
- }),
- previousButtonLabel: i18n.translate('timelion.help.previousPageButtonLabel', {
- defaultMessage: 'Previous',
- }),
- dontShowHelpButtonLabel: i18n.translate('timelion.help.dontShowHelpButtonLabel', {
- defaultMessage: `Don't show this again`,
- }),
- strongNextText: i18n.translate('timelion.help.welcome.content.strongNextText', {
- defaultMessage: 'Next',
- }),
- emphasizedEverythingText: i18n.translate(
- 'timelion.help.welcome.content.emphasizedEverythingText',
- {
- defaultMessage: 'everything',
- }
- ),
- notValidAdvancedSettingsPath: i18n.translate(
- 'timelion.help.configuration.notValid.advancedSettingsPathText',
- {
- defaultMessage: 'Management / Kibana / Advanced Settings',
- }
- ),
- validAdvancedSettingsPath: i18n.translate(
- 'timelion.help.configuration.valid.advancedSettingsPathText',
- {
- defaultMessage: 'Management/Kibana/Advanced Settings',
- }
- ),
- esAsteriskQueryDescription: i18n.translate(
- 'timelion.help.querying.esAsteriskQueryDescriptionText',
- {
- defaultMessage: 'hey Elasticsearch, find everything in my default index',
- }
- ),
- esIndexQueryDescription: i18n.translate(
- 'timelion.help.querying.esIndexQueryDescriptionText',
- {
- defaultMessage: 'use * as the q (query) for the logstash-* index',
- }
- ),
- strongAddText: i18n.translate('timelion.help.expressions.strongAddText', {
- defaultMessage: 'Add',
- }),
- twoExpressionsDescriptionTitle: i18n.translate(
- 'timelion.help.expressions.examples.twoExpressionsDescriptionTitle',
- {
- defaultMessage: 'Double the fun.',
- }
- ),
- customStylingDescriptionTitle: i18n.translate(
- 'timelion.help.expressions.examples.customStylingDescriptionTitle',
- {
- defaultMessage: 'Custom styling.',
- }
- ),
- namedArgumentsDescriptionTitle: i18n.translate(
- 'timelion.help.expressions.examples.namedArgumentsDescriptionTitle',
- {
- defaultMessage: 'Named arguments.',
- }
- ),
- groupedExpressionsDescriptionTitle: i18n.translate(
- 'timelion.help.expressions.examples.groupedExpressionsDescriptionTitle',
- {
- defaultMessage: 'Grouped expressions.',
- }
- ),
- };
-
- getFunctions();
- checkElasticsearch();
- }
-
- function getFunctions() {
- return $http.get('../api/timelion/functions').then(function (resp) {
- $scope.functions.list = resp.data;
- });
- }
- $scope.recheckElasticsearch = function () {
- $scope.es.valid = null;
- checkElasticsearch().then(function (valid) {
- if (!valid) $scope.es.invalidCount++;
- });
- };
-
- function checkElasticsearch() {
- return $http.get('../api/timelion/validate/es').then(function (resp) {
- if (resp.data.ok) {
- $scope.es.valid = true;
- $scope.es.stats = {
- min: moment(resp.data.min).format('LLL'),
- max: moment(resp.data.max).format('LLL'),
- field: resp.data.field,
- };
- } else {
- $scope.es.valid = false;
- $scope.es.invalidReason = (function () {
- try {
- const esResp = JSON.parse(resp.data.resp.response);
- return _.get(esResp, 'error.root_cause[0].reason');
- } catch (e) {
- if (_.get(resp, 'data.resp.message')) return _.get(resp, 'data.resp.message');
- if (_.get(resp, 'data.resp.output.payload.message'))
- return _.get(resp, 'data.resp.output.payload.message');
- return i18n.translate('timelion.help.unknownErrorMessage', {
- defaultMessage: 'Unknown error',
- });
- }
- })();
- }
- return $scope.es.valid;
- });
- }
- init();
- },
- };
-});
diff --git a/src/legacy/core_plugins/timelion/public/header.svg b/src/legacy/core_plugins/timelion/public/header.svg
deleted file mode 100644
index 56f2f0dc51a6e..0000000000000
--- a/src/legacy/core_plugins/timelion/public/header.svg
+++ /dev/null
@@ -1,227 +0,0 @@
-
-
diff --git a/src/legacy/core_plugins/timelion/public/icon.svg b/src/legacy/core_plugins/timelion/public/icon.svg
deleted file mode 100644
index ba9a704b3ade2..0000000000000
--- a/src/legacy/core_plugins/timelion/public/icon.svg
+++ /dev/null
@@ -1,97 +0,0 @@
-
-
-
-
diff --git a/src/legacy/core_plugins/timelion/public/legacy.ts b/src/legacy/core_plugins/timelion/public/legacy.ts
deleted file mode 100644
index 7980291e2d462..0000000000000
--- a/src/legacy/core_plugins/timelion/public/legacy.ts
+++ /dev/null
@@ -1,35 +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 { PluginInitializerContext } from 'kibana/public';
-import { npSetup, npStart } from 'ui/new_platform';
-import { plugin } from '.';
-import { TimelionPluginSetupDependencies } from './plugin';
-import { LegacyDependenciesPlugin } from './shim';
-
-const setupPlugins: Readonly