Adds a new experimental Kibana setting called `csp.disableUnsafeEval` which will default to `false`. When set to `true`, it will remove `unsafe-eval` from our CSP.
Also introduces a new module called `@kbn/handlebars` which is a replacement for the official `handlebars` module used in the frontend. This new module is necessary in order to avoid calling `eval`/`new Function` from within `handlebars` which is not allowed once `unsafe-eval` is removed from our CSP.
The `@kbn/handlebars` module is simply an extension of the main `handlebars` module which adds a new compile function called `compileAST` (as an alternative to the regular `compile` function). This new function will not use code-generation from strings to compile the template but will instead generate an AST and return a render function with the same API as the function returned by the regular `compile` function.
This is a little bit slower method, but since this is only meant to be used client-side, the slowdown should not be an issue.
The following limitations exists when using `@kbn/handlebars`:
The Inline partials handlebars template feature is not supported.
Only the following compile options will be supported:
- `knownHelpers`
- `knownHelpersOnly`
- `strict`
- `assumeObjects`
- `noEscape`
- `data`
Only the following runtime options will be supported:
- `helpers`
- `blockParams`
- `data`
Closes#36311
* Create a specific route for fetching mappings, aliases, templates, etc...
* Encapsulate data streams
* Encapsulate the mappings data into a class
* Setup up autocompleteInfo service and provide its instance through context
* Migrate the logic from mappings.js to Kibana server
* Translate the logic to consume the appropriate ES client method
* Update related test cases
* Lint
* Address comments
* Fix server proxy/mock
* Add API integration tests for /api/console/autocomplete_entities
* Lint
* Add tests
* Add API integration tests for autocomplete_entities API
* Add deleted tests
Co-authored-by: Muhammad Ibragimov <muhammad.ibragimov@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Use response-ops GitHub team everywhere, no more alerting services
* Update x-pack/test/plugin_api_integration/plugins/event_log/kibana.json
Co-authored-by: Ying Mao <ying.mao@elastic.co>
Co-authored-by: Ying Mao <ying.mao@elastic.co>
* remove allowed space setting
* set allowedSpaces as unused setting
* mock unused function in deprecation tests
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Fix type in alerting_framework_health field name
So that it's set in accordance with the documentation
https://www.elastic.co/guide/en/kibana/current/get-alerting-framework-health-api.html
* ENH: Make sure to return the older field as well to avoid breaking existing code
* DOC: Document the typo field "alerting_framework_heath"
* ENH: Add a _deprecated field in the typo field response
* fixed es lint spaces issues
* fixed more spaces issues
* fixed scope issue
* fixed scope issue
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: YulNaumenko <jo.naumenko@gmail.com>
* [Uptime] prefix internal APIs with /internal [relates to #116334]
* [Uptime] move hard-coded URL paths to rest_api constants [relates to #116334]
* [Uptime] use API_URLS from constants in API integration tests [relates to #116334]
* [Uptime] Remove unnecessary filters route test
* [Uptime] prefix internal RUM routes with /internal and /ux [relates to #116334]
* [User Experience] update API docs for prefixed internal UX APIs
* Renaming alert instance summary to alert summary
* api docs
* fixing types
* updating functional test
* Updating i18n and data test sub
* fixing functional tests
* Cleanup
* Fixing unit tests
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Write plugin directory doc as part of api docs build.
* Replace service folder with the new name for index patterns
* Updated docs
* small update
* update docs
* Remove timelion app and stuff which related to it
* Fix CI
* Fix lint
* Fix tests
* Fix tests
* Fis tests
* Fix some comments
* Clean up
* fix CI
* fix some comments
* Fix deprecation examples
* Return `enabled` property in config for timelion vis
* Remove unused angular lib
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Alexey Antonov <alexwizp@gmail.com>
* Move to vis_types folder part 2
* fix jest tests
* do some tests
* revert
* Test Tiago's fix
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Fixes
- Fix bad formatting of deprecated apis by plugin
- Collect deprecated apis recursively
- Include unreferenced apis in Deprecated apis by API page.
* Fix unreferenced dep list
* check in updated docs
* Fix the issue with saved objects management plugin docs not being included
* adding the new docs after fixing some docs missing
* update api docs