Commit graph

300 commits

Author SHA1 Message Date
Mikhail Shustov
8d654bfbb0
Make SameSite cookie's attribute configurable (#68108) (#68989)
* support 'SameSite: None' in http service

* add tests

* allow to configure SameSite attribute for security cookie

* update docs

* fix test suite name

* remove false from samesite options

* document xpack.security.sameSiteCookies

* address comments

* address comments

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
# Conflicts:
#	x-pack/plugins/security/server/config.ts
2020-06-12 12:18:22 +02:00
Alexey Antonov
112a605103
[Data plugin] Add configuration property to enable / disable autocomplete (#67847) (#68224)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
# Conflicts:
#	src/plugins/data/public/plugin.ts
#	src/plugins/data/public/public.api.md
#	src/plugins/data/server/server.api.md
2020-06-04 14:15:27 +03:00
Lukas Olson
503f643bd7
[Search] Fix async search to encode index pattern in path (#61374) (#61648)
* Fix async search to encode index in path

* Update docs

* Review feedback & fixing types

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-27 15:20:35 -07:00
Josh Dover
4a2a616dd7
Fix running Kibana Platform migrations in development (#61325) (#61360) 2020-03-25 17:37:33 -06:00
Liza Katz
5e94e89640
[7.x] Add async search notification (#60706) (#61098)
* notifications ui

* increase timeout to 10s

* trigger notification from search interceptor

* added an enhanced interceptor

* added an enhanced interceptor

* docs

* docs

* fix ts

* Fix jest tests for interceptor

* update docs

* docs

* Fix handling syntax error in discover

* docs and translations

* fix scripted fields err

Co-authored-by: Lukas Olson <olson.lukas@gmail.com>

Co-authored-by: Lukas Olson <olson.lukas@gmail.com>
2020-03-24 20:16:15 +02:00
Pierre Gayvallet
6bc866a9b1
introduce StartServicesAccessor type for CoreSetup.getStartServices (#60748) (#61070)
* create StartServicesAccessor type

* update generated doc

* update usages to use new type

* add missing public annotation
2020-03-24 16:30:16 +01:00
Devon Thomson
ab37910a16
Support Histogram Data Type (#59387) (#60926)
Added the histogram field type to Kibana, to be used in the percentiles, percentiles ranks, and median aggregations.
2020-03-24 10:13:38 +01:00
Peter Pisljar
80a7fc3d71
cleanup visualizations api (#59958) (#60959) 2020-03-24 08:29:03 +01:00
Chandler Prall
fa0c700c92
[7.x] Upgrade EUI to 21.0.1 (#60282) (#60809)
* Upgrade EUI to 21.0.1 (#60282)

* update to eui 21.0.1

* most changes needed for search bar ts changes

* Passing types

* snapshots

* jest tests

* Removed IQuery placeholder types

* Updated functional test to only look at table headers with content

* Moved 'filters' definition around in api docs

* Update types

* update snapshot

* typo

* Move DATA_FRAME_TASK_STATE enum to its own file to fix x-pack functional test config imports

* merge public api 'changes'

Co-authored-by: patrykkopycinski <patryk.kopycinski@elastic.co>
Co-authored-by: Patryk Kopycinski <contact@patrykkopycinski.com>

* unit test update

Co-authored-by: patrykkopycinski <patryk.kopycinski@elastic.co>
Co-authored-by: Patryk Kopycinski <contact@patrykkopycinski.com>
2020-03-20 23:09:36 -06:00
Liza Katz
2f081a2adb
Introduce search interceptor (#60523) (#60723)
* Add async search strategy

* Add async search

* Fix async strategy and add tests

* Move types to separate file

* Revert changes to demo search

* Update demo search strategy to use async

* Add async es search strategy

* Return response as rawResponse

* Poll after initial request

* Add cancellation to search strategies

* Add tests

* Simplify async search strategy

* Move loadingCount to search strategy

* Update abort controller library

* Bootstrap

* Abort when the request is aborted

* Add utility and update value suggestions route

* Fix bad merge conflict

* Update tests

* Move to data_enhanced plugin

* Remove bad merge

* Revert switching abort controller libraries

* Revert package.json in lib

* Move to previous abort controller

* Add support for frozen indices

* Fix test to use fake timers to run debounced handlers

* Revert changes to example plugin

* Fix loading bar not going away when cancelling

* Call getSearchStrategy instead of passing  directly

* Add async demo search strategy

* Fix error with setting state

* Update how aborting works

* Fix type checks

* Add test for loading count

* Attempt to fix broken example test

* Revert changes to test

* Fix test

* Update name to camelCase

* Fix failing test

* Don't require data_enhanced in example plugin

* Actually send DELETE request

* Use waitForCompletion parameter

* Use default search params

* Add support for rollups

* Only make changes needed for frozen indices/rollups

* Only make changes needed for frozen indices/rollups

* Add back in async functionality

* Fix tests/types

* Fix issue with sending empty body in GET

* Don't include skipped in loaded/total

* Don't wait before polling the next time

* Add search interceptor for bulk managing searches

* Simplify search logic

* Fix merge error

* Review feedback

* Add service for running beyond timeout

* Refactor abort utils

* Remove unneeded changes

* Add tests

* cleanup mocks

* Update src/legacy/core_plugins/kibana/public/dashboard/np_ready/dashboard_app.html

Co-Authored-By: Lukas Olson <olson.lukas@gmail.com>

Co-authored-by: Lukas Olson <olson.lukas@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Lukas Olson <olson.lukas@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-20 21:58:06 +02:00
Daniil Suleiman
7f362e6e18
[NP] Remove ui/agg_types dependencies and move paginated table to kibana_legacy (#60276) (#60769)
* fix agg type shims and move paginated table to kibana_legacy

* fix types

* fix i18n ids

* fix unit tests

* Update imports

* Remove ui/agg_types imports

* Clean up vis_default_editor plugin

* Remove agg_types imports in vis_type_table

* Clean up x-pack

* Clean up vis_type_vislib

* Last cleanups

* Update docs

* Mock Schemas in vis_type_metric

* Use data plugin mocks

* Remove ui/directives/paginate reference

* Remove snapshot

* Remove shallow

Co-authored-by: Joe Reuter <johannes.reuter@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
# Conflicts:
#	src/legacy/core_plugins/kibana/public/dashboard/np_ready/dashboard_state.test.ts
2020-03-20 22:02:00 +03:00
Liza Katz
ffba422fe1
Add addInfo toast to core notifications service (#60574) (#60724)
* addInfo toast

* md files

* fis types

* Added options to toast methods

* Export ToastOptions

* Export ToastOptions

* added test

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-20 14:50:00 +02:00
Lukas Olson
3bfabb0fab
[Search service] Asynchronous ES search strategy (#53538) (#60469)
* Add async search strategy

* Add async search

* Fix async strategy and add tests

* Move types to separate file

* Revert changes to demo search

* Update demo search strategy to use async

* Add async es search strategy

* Return response as rawResponse

* Poll after initial request

* Add cancellation to search strategies

* Add tests

* Simplify async search strategy

* Move loadingCount to search strategy

* Update abort controller library

* Bootstrap

* Abort when the request is aborted

* Add utility and update value suggestions route

* Fix bad merge conflict

* Update tests

* Move to data_enhanced plugin

* Remove bad merge

* Revert switching abort controller libraries

* Revert package.json in lib

* Move to previous abort controller

* Add support for frozen indices

* Fix test to use fake timers to run debounced handlers

* Revert changes to example plugin

* Fix loading bar not going away when cancelling

* Call getSearchStrategy instead of passing  directly

* Add async demo search strategy

* Fix error with setting state

* Update how aborting works

* Fix type checks

* Add test for loading count

* Attempt to fix broken example test

* Revert changes to test

* Fix test

* Update name to camelCase

* Fix failing test

* Don't require data_enhanced in example plugin

* Actually send DELETE request

* Use waitForCompletion parameter

* Use default search params

* Add support for rollups

* Only make changes needed for frozen indices/rollups

* Only make changes needed for frozen indices/rollups

* Add back in async functionality

* Fix tests/types

* Fix issue with sending empty body in GET

* Don't include skipped in loaded/total

* Don't wait before polling the next time

* Simplify search logic

* Fix merge error

* Review feedback

* Fix issue with hits.total

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-20 11:20:44 +02:00
CJ Cenizal
68eafd6715
Publish getIsNavDrawerLocked$ method on core chrome service. (#60191) (#60593)
* Remove isCollapsed, getIsCollapsed, and global_nav_state.
2020-03-18 21:59:01 -07:00
Rudolf Meijering
aca82ec668
Re-backport and re-generate typescript docs (#60507) 2020-03-18 23:14:23 +01:00
Alexey Antonov
dd378a9d31
[Visualize] Duplicated query filters in es request (#60106) (#60519)
* [Visualize] Duplicated query filters in es request

Closes: #59630

* Fix CI

* fix CI

* move uniq_filters to common

* fix scripts/check_published_api_changes

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-18 21:31:48 +03:00
Mikhail Shustov
80b58a589d
Add UiSettings validation & Kibana default route redirection (#59694) (#60257)
* add schema to ui settings params

* add validation for defaults and overrides

* validate in ui settings client

* ui settings routes validation

* clean up tests

* use schema for defaultRoutes

* move URL redirection to NP

* fix spaces test

* update docs

* update kbn pm

* fix karma test

* fix tests

* address comments

* get rid of getDEfaultRoute

* regen docs

* fix tests

* fix enter-spaces test

* validate on relative url format

* update i18n

* fix enter-spoace test

* move relative url validation to utils

* add CoreApp containing application logic

* extract public uiSettings params in a separate type

* make schema required

* update docs
2020-03-16 18:09:51 +01:00
Rudolf Meijering
66d5b223b5
Expose Elasticsearch from start and deprecate from setup (#59886) (#60163)
* Expose Elasticsearch from start and deprecate from setup

* Expose client under legacy namespace, add deprecated note

* Update migration guide

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-16 12:33:37 +01:00
Luke Elmers
7cf974c44d
Search Service: cutover agg types to the new platform (#59605) (#60112) 2020-03-13 13:02:25 -06:00
Rudolf Meijering
d0ab21145c
Make context.core required argument to context providers (#59996) (#60061)
* Make context.core required argument to context providers

* Refactor plugins: context.core isn't optional anymore

* Update docs
2020-03-12 22:44:00 +01:00
Liza Katz
c6c5103e6c
Clear out old rollup strategy (#59423) (#59921)
* Old search strategy cleanup

* restore rollup strategy

* Remove hasSearchStategyForIndexPattern

* ts

* fix jest tests

* cleanup exports

* pass index pattern type to server for rollups

* merge fix

* Fix types

* ts fixes

* oss strategy error handling

* update translations

* jest test fix

* Use indexType instead of index

* code review 1

* updated docs

* jest test

* jest snapshot

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-12 09:58:10 +02:00
Liza Katz
6956091adf
Generate docs from data plugin (#56955) (#59729)
* Add doc building for data plugin

* Added data server md file

* index file for suggestion component

* Clear out internal imports from public API

* Remove FunctionalComponent usage

* comment out working docs

* Added fixes following @octogonz feedback

* new docs

* Clean up

* Clean up 2

* fix jest

* rename docs script file

* update tasks

* tasks

* update docs
# Conflicts:
#	src/dev/run_check_published_api_changes.ts
2020-03-10 14:00:28 +02:00
Pierre Gayvallet
4a08acbb4a
Add SavedObject management section registration in core (#59291) (#59731)
* add management section to SavedObjectsType

* adapt import/export routes to get types accessor

* add documentation

* update generated doc

* update migration guide

* use request context to access exportable types

* update generated doc

* adapt SavedObjectsManagement to use the registry

* stop magical tricks about the config type, register it as any other so type.

* fix FTR assertions

* fix so_mixin tests

* register the `config` type from the uiSettings service

* nits and comments

* update generated doc

* remove true from dynamic property definition, use force-cast back for config type

* remove obsolete test comment
2020-03-10 12:57:34 +01:00
Mikhail Shustov
1582299967
Add an optional authentication mode for HTTP resources (#58589) (#59614)
* add authRequred: 'optional'

* expose auth status via request context

* update security plugin to use notHandled auth outcome

* capabilities service uses optional auth

* update tests

* attach security headers only to unauthorised response

* add isAuthenticated tests for 'optional' auth mode

* security plugin relies on http.auth.isAuthenticated to calc capabilities

* generate docs

* reword test suit names

* update tests

* update test checking isAuth on optional auth path

* address Oleg comments

* add test for auth: try

* fix

* pass isAuthenticted as boolean via context

* remove response header from notHandled

* update docs

* add redirected for auth interceptor

* security plugin uses t.redirected to be compat with auth: optional

* update docs

* require location header in the interface

* address comments #1

* declare isAuthenticated on KibanaRequest

* remove auth.isAuthenticated from scope

* update docs

* remove unnecessary comment

* do not fail on FakrRequest

* small improvements
2020-03-07 20:15:48 +01:00
Pierre Gayvallet
f6beb1e838
Expose metrics service to public API (#59294) (#59355)
* expose metrics service to public API

* update generated doc
2020-03-04 23:17:45 +01:00
Pierre Gayvallet
e1b8938f1f
Expose savedObject import / export utility methods (#58882) (#59295)
* add getImportExportObjectLimit to so setup

* expose static method for so import / export

* improve functions naming

* fix mocked reference
2020-03-04 14:50:25 +01:00
Mikhail Shustov
0fdb6e520a
Allow disabling xsrf protection per an endpoint (#58717) (#59151)
* add xsrfRequired flag to a route definition interface

* update tests

* deprecate server.xsrf.whitelist

It meant to be used for IdP endpoints only, which we are going to refactor to disable xsrf requirement per a specific endpoint.

* update docs

* do not fail on manual KibanaRequest creation

* address comments

* update tests

* address comments

* make xsrfRequired available only for destructive methods

* update docs

* another isSafeMethod usage
2020-03-03 17:47:12 +01:00
Josh Dover
b5eb0912a7
[7.x] Remove appBasePath from docs + add mock for AppMountPara… (#59097) 2020-03-03 07:57:17 -07:00
Pierre Gayvallet
321952f998
Add core metrics service (#58623) (#59122)
* create base service and collectors

* wire the service into server, add mock

* add collector tests

* add main collector test

* export metric types from server

* add service and server tests

* updates generated doc

* improve doc

* nits and comments

* add disconnected requests test
2020-03-03 14:52:16 +01:00
Pierre Gayvallet
30fca567f6
add dynamic property to type definition (#58852) (#58886) 2020-02-28 18:36:25 +01:00
Pierre Gayvallet
85fd92aa5c
block SO setup API calls after startup (#58718) (#58844) 2020-02-28 16:22:09 +01:00
Josh Dover
cbb96a7213
[7.x] Add ScopedHistory to AppMountParams (#56705) (#58639) 2020-02-26 14:57:03 -07:00
Pierre Gayvallet
b4009fcfd2
Allow savedObjects types registration from NP (#57430) (#58602)
* expose `registerType` API

* expose `getTypeRegistry` API

* change SavedObjectMigrationFn signature to add context

* fix exported types

* update generated doc

* update migration documentation

* fix legacy service test

* fix typings

* update service setup description

* add saved_objects server folder convention

* fix unit test

* documentation NITs

* add typeRegistry to SavedObjectClientWrapperOptions
2020-02-26 18:17:51 +01:00
Mikhail Shustov
fc6674ad1e
force savedObject API consumers to define SO type explicitly (#58022) (#58281)
* force savedObject consumers to define type explicitly

* address comments

* regen docs
2020-02-22 07:36:20 +01:00
Josh Dover
6a86b57242
Expose serverBasePath on client-side (#58070) (#58185)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-21 15:03:35 -07:00
Mikhail Shustov
325a4e3d77
Saved Objects testing (#56965) (#58202)
* Expose core/public savedObjectsServiceMock

* Test docs for Saved Objects unit and integration tests

* Review comments

* Update api types / docs

Co-authored-by: Rudolf Meijering <skaapgif@gmail.com>
2020-02-21 12:01:42 +01:00
Mikhail Shustov
9b6b1402c2
Expose elasticsearch config schema (#57655) (#58199)
* expose elasticsearch config schema

* update docs

* mark export as alpha since it can be deleted

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-21 11:30:20 +01:00
Pierre Gayvallet
a43ce0aa65
[7.x] Use app id instead of pluginId to generate navlink from legacy apps (#57542) (#57670)
* Use app id instead of pluginId to generate navlink from legacy apps (#57542)

* properly use app id instead of pluginId to generate navlink

* extract convertToNavLink, add more tests

* use distinct mapping methods

* fix linkToLastSubUrl default value

* nits & doc

* update generated doc
2020-02-14 14:57:01 +01:00
Pierre Gayvallet
6f6cc356f9
Preserve the original error name instead of returning raw AbortError (#57550) (#57653)
* Preserve the original error name instead of returning raw AbortError

* use Error as the default error name
2020-02-14 11:50:16 +01:00
Pierre Gayvallet
07ceb70278
add absolute option to getUrlForApp (#57193) (#57543) 2020-02-13 12:28:03 +01:00
Ahmad Bamieh
d02fb7a928
[7.x] [Telemetry] Migrate public to NP (#56285) (#57534) 2020-02-13 11:41:31 +02:00
Pierre Gayvallet
181862c191
Restructure SavedObject types internal representation (#56378) (#56953)
* adapt types and tests to prepare for new NP api

* rename and export public types

* update generated doc

* first implementation of registerMappings

* adapt es archiver to convert legacy mappings

* update generated doc

* fix more tests

* add unit tests

* add legacy-compat unit test

* add documentation and examples

* Introduce SavedObjectTypeRegistry and SavedObjectType types

* add and fix tests

* expose createSerializer API and fix usages

* remove registerMappings API, add internal registerType

* revert changes to migration guide

* adapt ES-archiver migrator creation

* export serializer-related types

* update generated doc

* add and use convertTypesToLegacySchema

* remove / move to internal some mapping types

* fix forEach closure context

* add missing docs

* fix core path

* some nits

* fix so_mixin tests

* fix integration tests

* fix integration tests for real

* add documentation on serializer + restructure files and types

* nit

* add and use the ISavedObjectTypeRegistry interface

* Add documentation, deprecates migrationLogger#warning

* better typing for SavedObjectsRawDoc._source

* nits

* update generated doc

* remove exposition of SavedObjectsTypeMappingDefinitions, update doc

* creates so internal contracts mocks

* improve documentation
2020-02-06 12:10:31 +01:00
Greg Thompson
13476af53f
Upgrade EUI to v18.3.0 (#56228) (#56702)
* eui to 18.3.0

* ts interface update

* src snapshot updates

* x-pack snapshot updates

* icons in nav

* Homepage updates, nav drawer and tests

* feedback

* more feedback

* euiIconType for observability and security

* remove unused translations

Co-authored-by: dave.snider@gmail.com <dave.snider@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: dave.snider@gmail.com <dave.snider@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-04 09:15:53 -06:00
Nick Partridge
af577cc79c
Kibana property config migrations (#55937) (#56720)
* Move defaultAppId config param into kibanaLegacy
* Move disableWelcomeScreen config param into Home plugin
* Update api and docs with silent option for renameFromRoot
2020-02-04 08:04:04 -06:00
Pierre Gayvallet
e5a0477542
Add getServerInfo API to http setup contract (#56636) (#56721)
* add getServerInfo http setup api

* update generated doc
2020-02-04 09:27:14 +01:00
Joe Reuter
23757f3f6f
Add flag to opt out from sub url tracking (#55672) (#56169) 2020-01-28 18:24:08 +01:00
Josh Dover
5bbf2cfc59
Add isSystemRequest support to Kibana Platform (#53734) (#55927) 2020-01-28 07:33:11 -07:00
Mikhail Shustov
7a53f8bd29
Normalize EOL symbol in platform docs (#56021) (#56041)
* use api-extractor generate command with api-documenter config

* update docs

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-27 21:04:26 +01:00
Mikhail Shustov
e1bf90916a
[NP] Platform exposes API to get authenticated user data (#55327) (#55998)
* expose auth.get/isAuthenticated. move getAuthHeaders to internal type

* update mocks

* update docs

* update docs

* add integration test for auth
2020-01-27 15:19:31 +01:00
spalger
2ffbbcb1e8 Revert "[7.x] [csp] allow blob styles when running from source (#54991) (#55597)"
This reverts commit d198bb521b.
2020-01-23 23:33:02 -07:00