Commit graph

322 commits

Author SHA1 Message Date
Rudolf Meijering dfb6a308cf
Remove SO root property index signature (#64434)
* Remove SO root property index signature

* Update documentation
2020-04-27 16:08:27 +02:00
Pierre Gayvallet 3d78b1bcf9
Remove SO autocreateindex error and error page (#64037)
* remove autocreateIndex error and error page

* update generated doc

* delete unused keys

* remove sass import

* add missing graph import

* remove unused method
2020-04-27 10:02:40 +02:00
Alexey Antonov d53997742b
[FieldFormats] Cleanup: rename IFieldFormatType -> FieldFormatInstanceType (#64193)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-24 10:32:34 +03:00
Luke Elmers e2baff36b8
[data.search.aggs]: Create agg types function for terms agg. (#63541)
* Minor cleanup on AggConfigJson interface.

* Add types for terms agg params & mapping.

* Add terms agg expression function.

* Register agg functions with expressions service.

* Add unit tests for terms expression function.

* Update API docs.

* AggConfigJson -> AggConfigSerialized

* Add serialize(), enforce serializable params, fix subexpressions in terms agg fn.

* Simplify getAggTypesFunctions

* it() -> test()

* Add help text.

* Ensure serialize() is used by agg param type.

* Add toExpressionAst to AggConfig.

* Add json arg to terms agg fn.

* Update docs.

* Fix typo which caused functional test failures.

* Add AggParam.toExpressionAst so AggConfig.toExpressionAst can return function ast instead of expression ast.

* Clean up overlooked items.
2020-04-23 11:39:38 -06:00
Alexey Antonov 0a6da70a89
[Regression] Histogram aggregation always shows an error message (#63484)
* WIP [Regression] Histogram aggregation always shows an error message

Closes: #62624

* make getInternalStartServices private

* fix ts issues

* remove createSearchSource from static contract

* fix some jest test

* move searh_source to static contract

* fix types

* fix function tests

* fix jest / add createStartServicesGetter

* fix comments: saved_object_management

* maps: fix PR comments

* maps: update types

* fix heck_published_api_changes

* move searchSource into runtime contract

* cleanup

* fix ts error

* cleanup

* remove extra dependencies

* fix Discover

* fix Discover JEST

* fix PR comments

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-22 19:21:14 +03:00
Peter Pisljar 222fdc5029
refactor action filter creation utils (#62969) 2020-04-22 10:41:58 +02:00
Liza Katz 796421f600
[SEARCH] Cleanup fetch soon (#63320)
* move old code to legacy folder

* Use search service directly from search source

* Move get search params to fetch folder

* Delete search strategy folder

* Doc update

* Minor cleanups

* Moved es client to legacy folder

* Clean up some unused code (isViable, old search function)

* Updated tests

* strings update

* Fix jest test

* re-arrange runSearch function

* re-arrange runSearch function

* fix jest tests

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-19 17:58:45 +03:00
Joe Portner d72de0ea16
Refactor saved object types to use namespaceType (#63217)
Remove `namespaceAgnostic` field that was deprecated in #54605,
use `namespaceType` instead.
2020-04-16 14:37:55 -04:00
Mikhail Shustov af09fedaf2
[NP] add http resources sub-service (#61797)
* add HttpResources basic implementation

* expose http resources to plugins

* add mocks

* move http resources to a separate service

* hide rendering service

* adopt internal types

* expose HttpResources service to plugins

* update platform mocks

* plugins start using HttpResources API

* remove RenderingServiceSetup export

* RenderingServiceSetup --> InternalRenderingServiceSetup

* improve types

* remove httpRespources leftovers from http service

* remove rendering types from RequestHanlderContext

* fix security plugin tests

* add unit tests for httpResources service

* add unit tests

* remove outdated cache-control header

* restructure http resources service

* merge getUiPlugins and discover

* static route declaration shouldnt require auth & validate

* update docs

* use HttpResources service instad of rendering

* address comments

* update docs

* roll back unnecessary changes

* use getVars for rendering

* dont pass app. it is not public API

* remove static registers

* update migration guide
2020-04-16 16:09:39 +02:00
Uladzislau Lasitsa ce9c6e258a
Index pattern management UI -> TypeScript and New Platform Ready (indexed_fields_table) (#63364)
* MIgrated indexed_fields_table to typescript.

* Updated docs

* Fixed comments

* Fixed types
2020-04-16 10:32:28 +03:00
Matthew Kime 69ed664dd9
Index Pattern Field class - factor out copy_field code for future typescripting (#63083)
* Index Pattern Field class - factor out copy_field code for future typescripting
2020-04-14 06:58:56 -05:00
Pierre Gayvallet bd159c7d59
fix ScopedHistory.createHref to prepend location with scoped history basePath (#62407)
* fix createHref to prepend with scoped history basePath + add option to exclude it.

* fix prependBasePath behavior

* fix test plugins urls

* add pathname to endpoint url builder methods

* Revert "add pathname to endpoint url builder methods"

This reverts commit 7604932b

* adapt createHref instead of prependBasePath

* use object options for createHref

* update generated doc
2020-04-11 09:27:45 +02:00
Joe Portner 97d1685c3d
Sharing saved-objects phase 1 (#54605)
Co-authored-by: kobelb <brandon.kobel@elastic.co>
2020-04-09 23:18:18 -04:00
Joe Reuter 8d21b6b6f3
Move search source parsing and serializing to data (#59919) 2020-04-09 14:06:01 +02:00
Josh Dover f84773faed
Add basic StatusService (#60335) 2020-04-08 13:16:32 -06:00
Alexey Antonov 008b0fda64
[data.search.aggs] Remove service getters from agg types (#61628)
* [data.search.aggs] Remove service getters from agg types

Part of #60333

* new portion of changes

* pass dependencies to MetricAgg Type through constructor

* update docs

* refactoring buckets

* remove unused mockDataServices

* Remove service getters from metrics

* Some fixes

* remove temporary code

* moved notifications to the getInternalStartServices

* fixed karma lock

* update docs

* Fixed tests

* fix broken CI

* fix PR comment

* fix typo

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Uladzislau Lasitsa <Uladzislau_Lasitsa@epam.com>
2020-04-07 13:39:30 +03:00
Lukas Olson 80417f6888
[Search] Fix async search to encode index pattern in path (#61374)
* Fix async search to encode index in path

* Update docs

* Review feedback & fixing types
2020-03-27 08:31:34 -07:00
Peter Pisljar 7b0c66f7f1
move visualizations plugin to new platform (#60403) 2020-03-27 13:02:06 +01:00
Pierre Gayvallet 468de51153
Add plugin start contract to getStartServices return value (#61216)
* add plugin own contract as third element of getStartServices result

* adapt plugins code

* update tests

* revert unknown to use void again

* update generated doc

* fix UT

* update mock to allow non-object `pluginStartContract`

* add @typeParam documentation
2020-03-26 10:49:05 +01:00
Josh Dover 4b012fb21a
Fix running Kibana Platform migrations in development (#61325) 2020-03-25 15:27:26 -06:00
Rudolf Meijering 0d45d9b53f
Update core migration docs links (#61251) 2020-03-25 22:22:21 +01:00
Liza Katz c7c6eba079
Add async search notification (#60706)
* 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>
2020-03-24 17:41:31 +02:00
Pierre Gayvallet babefb5737
introduce StartServicesAccessor type for CoreSetup.getStartServices (#60748)
* create StartServicesAccessor type

* update generated doc

* update usages to use new type

* add missing public annotation
2020-03-24 14:33:31 +01:00
Peter Pisljar ed55531207
cleanup visualizations api (#59958) 2020-03-23 19:19:39 +01:00
Devon Thomson 05c995a939
Support Histogram Data Type (#59387)
Added the histogram field type to Kibana, to be used in the percentiles, percentiles ranks, and median aggregations.
2020-03-23 11:53:51 -04:00
Chandler Prall 0bf62cbf3e
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>
2020-03-20 14:07:04 -06:00
Daniil Suleiman 1a1e2e7b2e
[NP] Remove ui/agg_types dependencies and move paginated table to kibana_legacy (#60276)
* 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>
2020-03-20 18:39:44 +03:00
Liza Katz ef0935ff45
Add addInfo toast to core notifications service (#60574)
* 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>
2020-03-20 08:38:02 +02:00
Liza Katz 2eda06e770
Introduce search interceptor (#60523)
* 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>
2020-03-19 10:28:43 +02:00
Alexey Antonov a708d69f50
[Visualize] Duplicated query filters in es request (#60106)
* [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>
2020-03-18 18:06:59 +03:00
Lukas Olson ac5e323af8
[Search service] Asynchronous ES search strategy (#53538)
* 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>
2020-03-17 18:47:54 -07:00
CJ Cenizal 4deea08f23
Publish getIsNavDrawerLocked$ method on core chrome service. (#60191)
* Remove isCollapsed, getIsCollapsed, and global_nav_state.
2020-03-17 18:15:26 -07:00
Larry Gregory 9318862f19
Allow kbn-config-schema to ignore unknown keys (#59560)
* allow kbn-config-schema to ignore unknown keys

* Consolidate unknown key configuration

* updates following merge

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-17 12:30:17 -04:00
Nathan Reese ef3261132a
[Maps] move MapSavedObject type out of telemetry (#60127)
* [Maps] move MapSavedObject type out of telemetry

* move SavedObject from server to core/types

* review feedback

* results from check_published_api_changes
2020-03-16 15:40:52 -06:00
Mikhail Shustov dd7531deb4
Add UiSettings validation & Kibana default route redirection (#59694)
* 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 14:30:20 +01:00
Rudolf Meijering 6e6325b1df
Expose Elasticsearch from start and deprecate from setup (#59886)
* Expose Elasticsearch from start and deprecate from setup

* Expose client under legacy namespace, add deprecated note

* Update migration guide
2020-03-13 21:17:38 +01:00
Luke Elmers 5d428b0d80
Search Service: cutover agg types to the new platform (#59605) 2020-03-13 09:12:20 -06:00
Rudolf Meijering 80e6ff729a
Make context.core required argument to context providers (#59996)
* Make context.core required argument to context providers

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

* Update docs
2020-03-12 20:39:29 +01:00
Liza Katz 66455316bb
Clear out old rollup strategy (#59423)
* 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>
2020-03-11 18:03:27 +02:00
Joe Portner a2c002d130
Regenerate core api docs (#59814) 2020-03-10 17:24:05 -04:00
Pierre Gayvallet f1272b5ffe
Add SavedObject management section registration in core (#59291)
* 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 11:13:45 +01:00
Liza Katz 28d0cf4485
Generate docs from data plugin (#56955)
* 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
2020-03-10 11:34:06 +02:00
Mikhail Shustov 5c436534d6
Add an optional authentication mode for HTTP resources (#58589)
* 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 11:55:20 +01:00
Pierre Gayvallet b1cb92f822
Expose metrics service to public API (#59294)
* expose metrics service to public API

* update generated doc
2020-03-04 20:15:35 +01:00
Pierre Gayvallet 7130a0405f
Expose savedObject import / export utility methods (#58882)
* add getImportExportObjectLimit to so setup

* expose static method for so import / export

* improve functions naming

* fix mocked reference
2020-03-04 12:10:29 +01:00
Mikhail Shustov 4226b6f373
Allow disabling xsrf protection per an endpoint (#58717)
* 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 15:46:50 +01:00
Pierre Gayvallet 64ffae3ec5
Add core metrics service (#58623)
* 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 10:54:03 +01:00
Josh Dover 48a33abdee
Remove appBasePath from docs + add mock for AppMountParameters (#58775) 2020-03-02 15:51:33 -07:00
Pierre Gayvallet 2b9dc43158
add dynamic property to type definition (#58852) 2020-02-28 16:39:06 +01:00
Pierre Gayvallet ce45647ea2
block SO setup API calls after startup (#58718) 2020-02-28 09:20:51 +01:00