Commit graph

948 commits

Author SHA1 Message Date
Pierre Gayvallet
31bb2c7fc5
expose retry_on_conflict for SOR.update (#131371)
* expose `retry_on_conflict` for `SOR.update`

* update generated doc

* stop using preflight check for version check for other methods too.

* remove unused ignore
2022-05-18 16:27:10 +02:00
Alejandro Fernández Haro
7226982759
[EBT] Add Elastic V3 Shippers (#130696)
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-05-04 09:22:34 -07:00
Josh Dover
1c47b2349c
Add refresh option to SavedObjectsImporter (#131339) 2022-05-03 11:23:18 +02:00
Pierre Gayvallet
a02c00b8a3
Change ContextContainer to lazily initialize providers (#129896)
* Change ContextContainer to lazily initialize providers

* Introduce CustomRequestHandlerContext, start adapting usages

* adapt IContextProvider's return type

* start fixing violations

* fixing violations - 2

* adapt home routes

* fix remaining core violation

* fix violations on core tests

* fixing more violations

* fixing more violations

* update generated doc...

* fix more violations

* adapt remaining RequestHandlerContext

* fix more violations

* fix non-async method

* more fixes

* fix another await in non async method

* add yet another missing async

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* add yet yet another missing async

* update fleet's endpoints

* fix telemetry endpoints

* fix event_log endpoints

* fix some security unit tests

* adapt canvas routes

* adapt alerting routes

* adapt more so_tagging routes

* fix data_enhanced routes

* fix license_management routes

* fix file_upload routes

* fix index_management routes

* fix lists routes

* fix snapshot_restore routes

* fix rule_registry routes

* fix ingest_pipelines routes

* fix remote_clusters routes

* fix index_lifecycle_management routes

* improve and fix the lazy implementation

* fix triggers_actions_ui endpoints

* start fixing unit tests

* fix cases routes

* fix transform routes

* fix upgrade_assistant routes

* fix uptime route wrapper

* fix uptime route wrapper bis

* update osquery routes

* update cross_cluster_replication routes

* fix some ML routes / wrappers

* adapt maps routes

* adapt rollup routes

* fix some canvas unit tests

* fix more canvas unit tests

* fix observability wrapper

* fix (?) infra type hell

* start fixing monitoring

* fix a few test plugins

* woups

* fix yet more violations

* fixing UA  tests

* fix logstash handlers

* fix fleet unit tests

* lint?

* one more batch

* update security_solution endpoints

* start fixing security_solution mocks

* start fixing security_solution tests

* fix more security_solution tests

* fix more security_solution tests

* just one more

* fix last (?) security_solution tests

* fix timelion javascript file

* fix more test plugins

* fix transforms context type

* fix ml context type

* fix context tests

* fix securitySolution withEndpointAuthz tests

* fix features unit tests

* fix actions unit tests

* fix imports

* fix duplicate import

* fix some merge problems

* fix new usage

* fix new test

* introduces context.resolve

* down the rabbit hole again

* start fixing test type failures

* more test type failures fixes

* move import comment back to correct place

* more test type failures fixes, bis

* use context.resolve for security solution rules routes

* fix new violations due to master merge

* remove comment

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-04-22 13:15:58 +02:00
Joe Portner
cde42887d3
Change updateObjectsSpaces API to prevent multiple objects w/ same origin (#128269) 2022-04-19 13:50:33 -07:00
Nathan Reese
fa89c459ac
[Maps] fix vector tile load errors not displayed in legend (#130395)
* [Maps] fix vector tile load errors not displayed in legend

* revert unneeded change

* update API docs

* add error integration test

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* eslint and fix jest test

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* cleanup

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-04-18 16:20:55 -06:00
Pierre Gayvallet
ae31d2a07b
Add validation for the /api/core/capabilities endpoint (#129564)
* Add validation for the /api/core/capabilities endpoint

* update doc for app.id

* also allow `:`

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-04-07 16:02:04 +02:00
Joe Portner
6acf7c0481
Avoid loading all plugins on anonymous pages (#129555) 2022-04-07 09:07:42 -04:00
Alejandro Fernández Haro
fcf862220b
Create @elastic/analytics package (#128407)
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-04-05 08:21:57 -07:00
Pierre Gayvallet
158c6170ae
Update @elastic/elasticsearch to v8.2.0-canary.2 (#128633)
* Update @elastic/elasticsearch to v8.2.0-canary.2

* fix core violation

* add optional properties to our type

* update generated doc

* add another ts-ignore

* remove unused ts-expect-error

* add ts-expect-error for type typo

* add ts-expect-error infra code

* fix more errors
2022-04-04 09:49:11 +02:00
Christiane (Tina) Heiligers
efd5ce361e
Adds navigation flags to reload a page unconditionally (#128671)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-04-01 07:58:00 -07:00
Pierre Gayvallet
dd0a19033f
Allow nested declaration for exposeToBrowser (#128864)
* Allow nested declaration for `exposeToBrowser`

* update generated doc

* add utest
2022-03-30 17:22:40 +02:00
Devon Thomson
c0a8bfaf37
[Controls] Do not Close Flyouts on Outside Click (#128548)
Do not close on outside click for controls flyouts
2022-03-28 11:26:23 -04:00
Joe Portner
4920ace1d5
Add enhancements for legacy URL aliases (#125960) 2022-03-18 13:11:11 -07:00
Gerard Soldevila
bbddc4233b
Allow customizing ES client maxSockets (#126937)
* Allow customizing ES client maxSockets

* Make maxSockets required (schema defaults to Infinity)

* Fix UTs

* Misc tweaks + extra UTs

* Update asciidoc

* Code cleanup

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-03-16 11:16:22 -07:00
Alejandro Fernández Haro
b96dfb698a
[Core] Deprecated APIs audit (#127744) 2022-03-16 05:04:14 -07:00
Or Ouziel
06e453ef78
add updatedAt to SimpleSavedObject (#126359) 2022-03-09 11:22:11 +02:00
Alejandro Fernández Haro
eb4cd4a2ff
Remove deprecated & unused ElasticsearchServiceStart.legacy (#127050) 2022-03-09 09:47:41 +01:00
Alejandro Fernández Haro
565454c64e
Remove deprecated & unused HttpServiceSetup.auth (#127056)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-03-09 09:44:01 +01:00
Alejandro Fernández Haro
22369fd874
Remove deprecated & unused public-AsyncPlugin (#127048) 2022-03-09 08:09:26 +01:00
Alejandro Fernández Haro
b9b4dc0a8d
Remove deprecated & unused SavedObjectsImportFailure.title (#127043) 2022-03-09 08:00:55 +01:00
Mike Côté
a4febd7709
Allow access to ElasticsearchClient's child function from core's TS interface (#126731)
* Expose child from core ElasticsearchClient

* Update docs

* Fix typecheck

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-03-07 11:38:58 -05:00
Or Ouziel
23f7cff88a
fix SO client bulkUpdate return type (#126349) 2022-03-06 20:18:09 +02:00
Liza Katz
d5416ed4ae
APM execution context - app, page, entitiy id (#124996)
* Client side execution app level context propagation

* context$ + apm rum integration

* invert the context parent \ child relationship (cc @mikhail)
move more things to top level context

* Pass down context to apm on server

* types

* eslint

* parent <> child

* docs + eslint + jest

* execution context mock

* eslint

* jest

* jest

* server jest

* check

* jest

* storybook

* jest

* report the current space

* fix server side context container

* Remove spaces for now

* docssss

* jest

* lint

* test

* docs

* revert file

* doc

* all context params are optional

* clear on page change

* lint

* ts

* skipped test again

* testing fixes

* oops

* code review #1

* code review #2

* getAsLabels

* maps inherit dashboard context

* docs

* ts

* Give common context to all vis editors

* fix test

* ts \ es \ tests

* labels

* missing types

* docsy docs

* cr #3

* improve jest

* Use editor name

* Update src/plugins/visualizations/public/visualize_app/components/visualize_editor.tsx

Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>

* fix maps context

* jest tests for maps

* cr

* docs

* Update execution_context.test.ts

* docs

* lint

Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>
2022-03-03 10:57:38 +02:00
Liza Katz
724e3b2ebf
Reverse parent child context relationship (#125486)
* reverse parent child context relationship

* bad merge

* ts

* ts

* fix jest

* try unblocking flaky test

* doc
2022-02-15 16:21:37 +02:00
Stratoula Kalafateli
d364f237c5
[TSVB][Lens] Navigate to Lens with your current configuration (#114794)
* [Lens][TSVB] Convert to Lens

* Add logic for multiple series

* Basic formula

* Fix circular dependencies

* Minor cleanup

* Fix types

* fix jest tests

* Fix test

* Change the schema, add more styling options, fix bugs

* Supports time shift and custom date interval

* Fix types

* Fix some types

* Move edit in lens button to top nav menu

* Cleanup

* Further cleanup

* Add try it badge in menu, controlled by localStorage

* Add go back to app button

* Discard changes modal and go back to TSVB

* Update by value and by reference visualizations, delete existing by ref

* Fix bug

* Apply some changes

* get title and description only if has context

* Pass originating app, title and description from the savedVis

* By ref TSVB to by ref Lens

* Match TSVB cardinality with Lens unique_count function

* Support moving average

* Fix test

* Support derivative

* Support cumulative_sum

* Add overall functions

* Support filter ratio

* Refactor code for easier testing

* Fix bug with auto interval

* Fetch types from visualizations plugin

* Pipeline aggs compatible with percentile

* Add some bugs

* Support nesred aggs

* Mini refactor and support all aggregations to Math

* Transfer terms sorting options

* Transfer axis position

* Fix translations keys

* Revert

* Fix redirectToOrigin buttion when the there is no embeddableId but comes from dashboard

* Improve context identification

* Support yExtents

* Fix bug in formula caused by changes in the main branch

* Support formatters

* Support custom label

* Cleaning up

* Fix terms bugs

* Support filter breakdown by

* Fixes math bug and escapes filter ratio query

* Add some unit tests

* Testing triggerOptions payload

* Fix console warning

* Add more unit tests on TSVB function helpers

* Adds a unit test on the vis top nav menu testing the new menu item

* Add unit tests

* Fix unsupported palette bug, clean up, add a unit test case

* Add final unit tests

* Support timeScale in derivative

* Add functional tests

* Cleanup

* Fix jest test

* Fix some bugs

* Fix some math agg bugs

* Fix more bugs

* Fixes jest test

* Fix the problem with the dashboard state

* Hides the badge and link instead of disabling it

* Changes the text

* Adds menu item vertical separator

* Enhance the appLeace confirm modal to change the confirm button text and color

* Fixes CI

* Adress code review comments

* Address some of the comments

* Fix more bugs

* Fix more bugs

* Zero decimals for formatting

* fix tests

* Navigate from dashboard to TSVB to Lens hides the appLeave modal

* Adds support for terms on a date field

* Support filter by

* Move the trigger to the visualizations plugin

* Minor

* Fix CI

* Support percentage charts

* Improve the vertical separator

* Fixes on the appLeave logic

* Remove unecessary import

* Add badge to the nav item level

* Fix jest test

* Fi filter ratio and filter by bug

* Replace all occurences of a variable

* Nest badge into the button level

* Design improvements

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-02-14 19:10:17 +02:00
Pierre Gayvallet
6627bd8b3a
Elasticsearch client: no longer default to using meta: true (#124488)
* Use `Client` interface instead of `KibanaClient`

* get rid of getKibanaEsClient and convertToKibanaClient

* get rid of last KibanaClient usages

* update usages and types in @kbn/securitysolution-es-utils

* fix some violations

* add sugar method around client mock

* update SO repository calls

* adapt more core usages

* export mock types

* batch 1

* batch 2

* batch 3

* batch 4

* batch 5

* batch 6

* batch 7

* batch 8

* batch 9

* security - batch 1

* security - batch 2

* security - batch 3

* last batch of initial violations

* fix resolve_time_pattern

* update generated doc

* fix /internal/index-pattern-management/preview_scripted_field endpoint

* fix monitoring's getLegacyClusterShim

* fix /api/snapshot_restore/privileges route

* fix UptimeESClient

* fix transforms/_nodes endpoint

* lint

* unit test fix - batch 1

* unit test fix - batch 2

* unit test fix - batch 3

* integration test fix - batch 1

* lint

* adapt ML client

* unit test fix - batch 4

* fix uptime test helper

* fix /api/transform/transforms/{transformId}/_update route

* fix ES client FTR test

* fix uptime unit test

* fix type errors on last unit tests

* fix RollupSearchStrategy call

* fix /internal/security/fields/{query} route

* fix GET /api/index_lifecycle_management/policies route

* fix mlClient.getDataFrameAnalytics

* fix APMEventClient

* fix security solution getBootstrapIndexExists

* fix data_enhanced's getSearchStatus

* remove unused @ts-expect-error

* fix unit tests due to latest code changes

* fix more calls in security_solution routes

* fix more calls in ml routes

* fix POST /api/index_management/component_templates route

* fix unit tests due to latest changes

* fix rule_registry's ResourceInstaller.createOrUpdateIndexTemplate

* fix more fleet client calls

* fix UA's GET cloud_backup_status route

* fix createLifecycleExecutorApiTest

* fix hasFleetServers

* fix unit tests due to latest changes

* changes due to last merge

* fix ml modelProvider.getModelsPipelines

* fix security_solution LifecycleQuery.search

* fix new CoreUsageDataService usage

* fix security solution's StatsQuery.search

* improve ml FTR assertions

* fix security_solution's EventsQuery.search

* fix EsClient type as we're keeping transport

* NITs

* clean RepositoryEsClient type

* update generated doc

* review comments

* adapt mlClient.anomalySearch signature

* remove unnecessary .then((body) => body)

* nit

* add unit tests for the client mocking functions

* fix new upgrade assistant /remote_clusters endpoint
2022-02-12 09:19:44 +01:00
Tobias Stadler
ca9c004f1a
Always allow internal urls in Vega (#124705) 2022-02-08 15:04:25 +01:00
Christiane (Tina) Heiligers
ad7c8de75a
Appends the saved objects documents count to the CoreUsageData service (#124308)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-02-03 07:56:39 -07:00
Andrew Tate
62c76b9700
[Lens] use data plugin migrations for search sources in legacy visualizations (#123005) 2022-02-01 08:01:41 -06:00
Pierre Gayvallet
b4e53f44c3
Create server-side docLinks service (#123818)
* extract docLinks service to a package

* adapt unit tests for docLinks service

* initial server-side docLinks implementation

* add server-side service mock

* fix internal mocks

* update generated doc

* add unit tests for server-side service

* adapt server mocks

* update links due to rebase

* add base tests for new package

* update links from merge

* set kibana-docs team as owners for new package

* split concrete and type import

* update tsdoc

* update links due to merge

* update generated doc
2022-02-01 10:37:15 +01:00
Pierre Gayvallet
1eea7a32d4
Allow to enable compression for communications with ES (#124009)
* Allow to enable compression for communications with ES

* update generated doc

* fix types in test

* update another snapshot
2022-02-01 08:02:29 +01:00
Alison Goryachev
821f0710a6
[Upgrade Assistant] Update upgrade guide doc links (#123953) (#124029) 2022-01-31 09:52:58 -05:00
Scotty Bollinger
eeeef83ea4
[Enterprise Search] Fix bug where no content when user has no Enterprise Search access (#123877)
* Add docs link for kibana xpack-security

* Add callout when user has no Enterprise Search access

* Updated API documentation and the API review file
2022-01-27 08:35:52 -06:00
Joe Reuter
38de5842a9
[Lens] Implement rare terms (#121500) 2022-01-18 16:33:35 +01:00
Pierre Gayvallet
b6060544cc
Add API to refresh authc headers and retry ES request when 401 is encountered (#120677)
* initial POC

* remove test code

* update the header holding logic

* add new API to plugin context

* introduce the IAuthHeadersStorage interface

* fix some types, mocks and tests

* export types from server entrypoint

* also export error type

* more doc

* update generated doc

* Fix ES service tests

* add tests for createInternalErrorHandler

* fix type in cli_setup

* generated doc

* add tests for configureClient

* add unit tests for custom transport class

* fix handler propagation to initial clients

* lint

* address review comments
2022-01-18 14:40:12 +01:00
Lisa Cawley
55b8c80a87
Add URLs from ui_settings.ts to doc link service (#122408) 2022-01-10 17:12:22 -08:00
Luke Elmers
ca05637afa
Adds validations for Saved Object types when calling create or bulkCreate. (#118969) 2022-01-04 22:40:42 -07:00
Mikhail Shustov
38feafad72
Update ES client to canary.37 (#119791)
* upgrade es client to canary 37

* fix error in core

* mute error in test/

* mute incompatible errors

* unskip request_entity_too_large_exception test

* commit autofix

* unskip batch_size_bytes_exceeds_es_content_length test

* fix errors in Core code

* fix or mute errors in data plugin

* fix data_view_management

* fix error index_management

* fix x-pack/test errors

* fix watcher

* fix event_log

* fix data_enhanced

* fix uptime

* fix triggers_actions_ui

* fix transform

* fix reporting

* fix rule_registry

* fix timeline

* fix task_manager

* fix security_solution

* fix rule_registry

* fix fleet

* fix index_management

* fix lens

* fix maps

* fix ml

* fix observability

* bump to canary 8.1-2

* fix error in packages

* fix errors in core

* fix errors in data

* fix errors in discover

* fix some discover tests

* fix errors in telemetry

* fix alerting

* fix errors in apm

* fix errors in event_log

* fix errors in fleet

* fix errors in infra

* fix errors in lists

* mute errors in maps

* fix errors in ml

* fix errors in osquery

* fix errors in security_solution

* fix errors in stack_alerts

* fix errors in task_manager

* fix errors in timelines

* fix errors in transform

* fix errors in watcher

* fix errors in tests

* update docs

* adjust fleet code

* fix problem in fleet

* remove outdated _type from data plugin tests

* fix packages tests

* update type

* fix tests part 2

* Adds product header back to elasticsearch

* Updates API docs

* Fix Discover tests

* update alerting typings

* Fix type errors

* Import Sort type

* Update x-pack/plugins/security_solution/common/endpoint/data_loaders/index_fleet_server.ts

Co-authored-by: Steph Milovic <stephanie.milovic@elastic.co>

* Remove double negation

* Fix snapshot conflict issues after merge from "main"

Co-authored-by: Christiane Heiligers <christiane.heiligers@elastic.co>
Co-authored-by: Matthias Wilhelm <matthias.wilhelm@elastic.co>
Co-authored-by: Dario Gieselaar <dario.gieselaar@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Alejandro Fernández Haro <afharo@gmail.com>
Co-authored-by: Steph Milovic <stephanie.milovic@elastic.co>
Co-authored-by: Alejandro Fernández Haro <alejandro.haro@elastic.co>
2021-12-24 14:43:53 +01:00
David Sánchez
9fe39bad91
[Security solution] [Endpoint] Event filters license downgrade experience (#121738)
* Hide assignment section and show a banner when license has been downgraded. Also fixes some edge cases on trusted apps

* Adds unit tests for licence downgrade experience

* Adds more tests

* Adds tests and move code outside form to be in flyout component

* Fixes unit test and added api mocks for event filter calls

* Updates API docs

* Revert Trusted Apps changes because they need to be included in a separated pr

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-12-22 12:55:44 +01:00
Muhammad Ibragimov
076f23a30e
[Console] Add links to docs (#121066)
* Add links to docs

Co-authored-by: Muhammad Ibragimov <muhammad.ibragimov@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-12-16 16:11:13 +05:00
Alejandro Fernández Haro
ab2fdb17b1
@kbn/config: Clear empty-object properties after their props are unset (#120889) 2021-12-10 13:25:58 +00:00
Sébastien Loix
d0f7d7c21d
[Mappings editor] Add support for the _size parameter (#119365) 2021-12-07 17:15:23 +00:00
Scotty Bollinger
062be17447
[Workplace Search] Add API Keys view to replace Access tokens (#120147) 2021-12-06 20:39:41 -06:00
Tyler Smalley
92a8636f0f
Upgrade Typescript to 4.3.5 (#104470)
Co-authored-by: Mikhail Shustov <restrry@gmail.com>
Co-authored-by: Dario Gieselaar <dario.gieselaar@elastic.co>
Co-authored-by: CJ Cenizal <cj@cenizal.com>
Co-authored-by: Justin Kambic <justin.kambic@elastic.co>
Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
Co-authored-by: Jean-Louis Leysens <jloleysens@gmail.com>
Co-authored-by: Kyle Pollich <kpollich1@gmail.com>
Co-authored-by: Xavier Mouligneau <189600+XavierM@users.noreply.github.com>
Co-authored-by: Kevin Qualters <kevin.qualters@elastic.co>
Co-authored-by: Candace Park <candace.park@elastic.co>
Co-authored-by: Brian Seeders <brian.seeders@elastic.co>
Co-authored-by: spalger <spencer@elastic.co>
2021-12-02 16:27:41 -08:00
Oleksiy Kovyrin
392325ceae
Remove links to docs about different auth methods in Enterprise Search (#120127)
* Remove links to docs about different auth methods in Enterprise Search
2021-12-02 13:29:31 -05:00
Lisa Cawley
db7423506c
Add workplace search links to doc link service (#118814)
Co-authored-by: Scotty Bollinger <scotty.bollinger@elastic.co>
2021-11-29 11:46:33 -08:00
Julia Bardi
a66551e81b
[Fleet] updated agent standalone instructions (#119629)
* updated agent standalone instructions

* updated for kubernetes

* updated public api md

* fix import

* fixed doc link

* removed unused translations

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-11-25 14:27:56 +01:00
Mark Hopkin
9eabc926e4
[Fleet] Revert "Add link to integration data retention documentation (#115353)" (#119015)
* Revert "[Fleet] Add link to integration data retention documentation (#115353)"

This reverts commit a266b2d426.

* remove unused translations

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-11-22 14:28:20 -07:00
Thom Heymann
fa5ccfedbd
interactive setup compatibility check (#119059)
* use root CA for interactive setup

* Use intermediate CA for end-to-end test

* Align setup CLI enrollment token param with ES

* Add CA private key to certificate

* Check cluster version during interactive setup

* Fix setup CLI

* add updated docs

* Added suggestions rom code review

* Update docs

* Fix paths

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-11-19 18:08:06 +00:00