Commit graph

1391 commits

Author SHA1 Message Date
Dmitry Lemeshko 8819644f13
bump geckodriver binary to 0.27 (#74638) 2020-08-10 18:15:28 +02:00
Vignesh Shanmugam 415a32c86f
fix: update apm agents to catch abort requests (#74658) 2020-08-10 18:06:20 +02:00
Mikhail Shustov 47fdd59e1c
bump babel deps to support TS v4 (#74495) 2020-08-06 22:00:40 +02:00
Spencer 79713b9b71
[browserslist] remove user-agent sniffing for IE support hint (#74464)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-08-06 10:57:29 -07:00
Mikhail Shustov 88c0631344
Update @typescript-eslint to ensure compatibility with TypeScript v3.9 (#74091)
* bump @typescript-eslint deps

* update rules

* fix errors in pacakges

* fix src/

* fix x-pack

* fix test

* fix typings

* fix examples

* allow _ as prefix and suffix

* roll back prefix and suffix changes

* add eslint-plugin-eslint-comments

* report unused rules

* remove unused eslint comments from tests

* remove unused eslint comments 2nd pass

* remove unused eslint comments from src/

* remove unused comments in x-pack

* use no-script-url and no-unsanitized/property for ts files

* remove unused eslint comments

* eui/href-or-on-click removed when not complained

* no import/* rules for ts files

* cleanup

* remove the unused eslint-disable

* rollback unnecessary changes

* allow underscore prefix & sufix in type name

* update docs

* fix type error in enterprise search plugin mocks

* rename platform hack __coreProvider --> _coreProvider

* rollback space removal in src/core/public/legacy/legacy_service.test.ts

* fix naming convention in APM
2020-08-05 17:32:19 +02:00
Spencer 0502fee651
[kbn/optimizer] remove unused modules (#74195)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-08-04 10:19:51 -07:00
Clint Andrew Hall 4f18f1dd86
[Canvas] Storybook Redux Addon (#73227)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-01 07:28:00 -04:00
Nathan Reese 7e2e78b54e
[Maps] upgrade turf (#73816)
* [Maps] upgrade turf

* clean up ts-ignore comments

* fix license check and review feedback

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-30 15:51:01 -06:00
Clint Andrew Hall 719c292a0c
[kbn-storybook] Update Storybook to 5.3.19 (#73320)
Co-authored-by: Spencer <email@spalger.com>
Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-07-29 10:00:53 -04:00
Larry Gregory f6a53f6805
Upgrade jimp to v0.14.0 (#73429) 2020-07-28 11:45:18 -04:00
Joe Portner 0149c65221
lodash 4.17.15 -> 4.17.19 (#73122) 2020-07-28 10:56:29 -04:00
MadameSheema 281c76767b
updates cypress to v4.11.0 (#73327)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-28 09:23:28 +02:00
Scotty Bollinger 2ae470e897
Add Kea.js support to Enterprise Search plugin (#72160)
* Add Kea packages

- kea and kea-waitfor

* Add Kea declarations and types

Hopefully TypeScript support coming soon from author

* Add Kea to entry point

* Add logic for overview

* Update components to use Kea

* Fix a couple of tests that weren’t getting complete coverage

* Remove kea-waitfor

Turns out we don’t need it

* Remove unused declaration

* Update x-pack/plugins/enterprise_search/public/applications/workplace_search/components/overview/overview_logic.ts

Co-authored-by: Constance <constancecchen@users.noreply.github.com>

* Update x-pack/plugins/enterprise_search/public/applications/workplace_search/components/overview/overview_logic.ts

Co-authored-by: Constance <constancecchen@users.noreply.github.com>

* Update x-pack/plugins/enterprise_search/public/applications/workplace_search/components/overview/__mocks__/overview_logic.mock.ts

Co-authored-by: Constance <constancecchen@users.noreply.github.com>

* Update x-pack/plugins/enterprise_search/public/applications/workplace_search/components/overview/overview_logic.test.ts

Co-authored-by: Constance <constancecchen@users.noreply.github.com>

* [Opinionated] Remove extra actions defs

- they're already being defined in IOverviewActions, so no need to repeat them

* DRY out a new reusable/generics IKeaLogic/Listeners interface

- Multiple logic files can now do IKeaListeners<SomeLogicActions> and not have to declare their own IListenerParams!

+ bonus IKeaSelectors just for consistency

* DRY out Kea reducers definitions to generics interface

* [Refactor] Improve KeaReducers generic to actually type-check/check key names

- Typescript will now throw an error if you put in a key name that isn't declared in your actions/values interface
- default & new states now will be type checked!! 🎉

* [Refactor] Update selectors() and listeners() to also check types and keys

* [Refactor] Move param defs to bottom of file instead of inline

- so that inline definitions mostly focus on type checks, and more boilerplate defs are DRYed out
- I played around with 2.1 obj definitions and got terrible results here :(

* Update tests and remove selectors per code review

* Remove last statsColumns instance

* Remove last instance of hideOnboarding

Co-authored-by: Constance <constancecchen@users.noreply.github.com>
Co-authored-by: Constance Chen <constance.chen.3@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-27 16:04:10 -05:00
Spencer dd4796cfdd
Remove karma (#73126)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-07-27 11:07:58 -07:00
Nathan L Smith d3ddcd2027
[APM] APM & Observability plugin lint improvements (#72702)
* [APM] APM & Observability plugin lint improvements

This is a large change, but most of it is automatic `eslint --fix` changes.

* Apply the same ESLint ovderrides in APM and Observability plugins.
* Remove the `no-unused-vars` rule. We can turn on the TypeScript check if needed.
* Check both JS and TS files.
* Add a rule for react function component definitions
* Upgrade eslint-plugin-react to include that rule
2020-07-27 08:18:36 -05:00
Spencer 8834ca3e9a
[src/dev/build] typescript-ify and convert tests to jest (#72525)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-07-23 10:58:04 -07:00
Mikhail Shustov 2771d69c96
[KP] bump es client to rc2 (#72448)
* bump es client to rc2

* update code for new typings
2020-07-20 20:32:46 +02:00
Dmitry Lemeshko 105e3a6c7e
update chromedriver to 84 (#72228)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-18 17:47:53 +02:00
Dima Arnautov 8f442f8318
[ML] Fix HTML named characters encoding (#72060)
* [ML] improve special characters encoding

* [ML] update renovate.json5
2020-07-17 16:37:10 +02:00
Mikhail Shustov 937314ad11
Bump @elastic/elasticsearch to v7.9.0-rc1 (#72231)
* bump @elastic/elasticsearch to 7.9.0-rc1

* bump other packages using @elastic/elasticsearch
2020-07-17 16:14:55 +02:00
Spencer d518ce27e0
upgrade re2 and use RE2_DOWNLOAD_MIRROR to prevent CI download issues (#71974)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-16 08:17:39 -07:00
Ashik Meerankutty 5f6389af60
Convert vis_type_vega to Typescript (#68915) 2020-07-15 15:23:03 +02:00
Thomas Watson fc5bc6b6a2
Add @elastic/safer-lodash-set as an alternative to lodash.set (#67452) 2020-07-15 10:29:57 +02:00
Spencer a0f7dced13
[kbn/optimizer] report sizes of assets produced by optimizer (#71319)
* Revert "Report page load asset size (#66224)"

This reverts commit 6f57fa0b2d.

* [kbn/optimizer] report sizes of assets produced by optimizer

* coalese the fast-glob versions we're using to prevent additional installs

* update kbn/pm dist

* Revert "update kbn/pm dist"

This reverts commit 68e24f0fad.

* Revert "coalese the fast-glob versions we're using to prevent additional installs"

This reverts commit 4201fb60b6.

* remove fast-glob, just recursivly call readdirSync()

* update integration tests to use new chunk filename

Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-14 17:23:14 -07:00
spalger 8d86a74ba8 Revert "Bump lodash package version (#71392)"
This reverts commit 60032b81ca.
2020-07-13 13:17:42 -07:00
Marco Liberati 4e9d9812c7
Fix TSVB table trend slope value (#71087)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-13 14:27:48 +02:00
Søren Louv-Jansen 3a17e81626
Bump backport to 5.5.1 (#71408) 2020-07-13 13:59:13 +02:00
Joe Portner 60032b81ca
Bump lodash package version (#71392) 2020-07-13 05:03:25 -04:00
Greg Thompson 9537a823eb
Upgrade EUI to v26.3.1 (#70243)
* eui to 26.1.0

* Breadcrumb -> EuiBreadcrumb

* keyCode -> key

* src snapshot updates

* update header variables file location

* keyCode -> key in tests

* x-pack simple snapshot updates

* euitooltip updates

* euioverlaymask updates

* testbed keycode -> key

* fixed header sass mixin

* euidatagrid test workaround

* euioverlapmask mock

* euipaginationbutton markup

* nav snapshot update

* eui to 26.3.0

* flyout z-index fix

* euiflyout snapshot updates

* style snapshot updates

* table actions have machine readable text

* table actions have machine readable text

* core api docs update

* table actions snapshot update

* eui to 26.3.1

* update table actions type

* mock issue links; timeout done

* breadcrumb -> euibreadcrumb

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-09 19:51:45 -07:00
Pierre Gayvallet f044856038
Add new elasticsearch client (#69905)
* add "@elastic/elasticsearch" to dependencies

* first POC of new client

* add logging

* add generation script for client facade API and implementation

* add back keepAlive

* add exports from client

* add new client mocks

* add some doc

* fix API usages

* rename legacy client to legacy in service

* rename currently unused config/client observable

* wire new client to service & update mocks

* fix mock type

* export client types

* add transport.request

* more doc

* migrate version_check to new client

* fix default port logic

* rename legacy client mocks

* move legacy client mocks to legacy folder

* start adding tests

* add configure_client tests

* add get_client_facade tests

* bump client to 7.8

* add cluster_client tests

* expose new client on internal contract only

* revert using the new client for es version check

* add service level test for new client

* update generated API

* Revert "rename legacy client mocks"

This reverts commit e48f3ad6

* address some review comments

* revert ts-expect-error from unowned files

* move response mocks to mocks.ts

* Remove generated facade, use ES Client directly

* log queries even in case of error

* nits

* use direct properties instead of accessors

* handle async closing of client

* review nits

* ElasticSearchClient -> ElasticsearchClient

* add test for encoded querystring

* adapt test file
2020-07-08 17:21:00 +02:00
Marco Vettorello a0a3e2f9ab
fix: remove only consecutive ticks in TSVB (#70981)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-08 11:10:03 +02:00
renovate[bot] 7026a50f52
Update dependency @elastic/charts to v19.8.0 (#70803)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-07-07 15:42:53 +02:00
Spencer eb84503d8a
upgrade caniuse-lite database (#70833)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-07-06 12:56:26 -07:00
Diana Derevyankina bd952721a4
Convert tag cloud tests to jest (#70066)
* Convert tag cloud tests to jest

* Add mocks to test_utils and remove tests from legacy

* Revert changes made by accident

* Update tag_cloud_visualization.test.js

* Update tag_cloud.test.js

* Update jsdom_svg_mocks.ts

* Add restoring previous value to window.SVGElement.prototype.transform

* Get rid of some deep imports

* Reimport jsdom_svg_mocks functions from test_utils/public

* Get rid of ExprVis by inlining some of its params to vis object

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Alexey Antonov <alexwizp@gmail.com>
2020-07-06 21:02:26 +03:00
renovate[bot] 97ca7bfc2e
Update dependency @elastic/charts to v19.7.0 (#69791)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-07-03 17:56:37 +02:00
Tiago Costa 6c62c686cf
chore(NA): upgrade to lodash@4 (#69868)
* chore(NA): upgrade oss to lodash4

chore(NA): migrate cli, cli_plugin, cli_keystore,  dev, test_utils and apm src script to lodash4

chore(NA): missing file for cli plugin

chore(NA): add src core

chore(NA): es archiver and fixtures

chore(NA): try to fix functional test failure

chore(NA): migrate src/legacy entirely to lodash4 except src/legacy/core_plugins

chore(NA): move legacy core plugins to lodash4

chore(NA): upgrade optimize to lodash4

chore(NA): upgrade to lodash4 on advanced_settings, charts, console and dashboard

chore(NA): migrate to lodash4 on dev_tools, discover, embeddable, es_ui)shared, expressions, home plugins

chore(NA): upgrade data plugin to lodash4

chore(NA): upgrade usage_collection, ui_actions, tile_map, telemtry, share, saved_objects, saved_objects_management, region_map and navigation to lodash4

chore(NA): missing data upgrades to lodash4

Revert "chore(NA): upgrade usage_collection, ui_actions, tile_map, telemtry, share, saved_objects, saved_objects_management, region_map and navigation to lodash4"

This reverts commit 137055c5fed2fc52bb26547e0bc1ad2e3d4fe309.

Revert "Revert "chore(NA): upgrade usage_collection, ui_actions, tile_map, telemtry, share, saved_objects, saved_objects_management, region_map and navigation to lodash4""

This reverts commit f7e73688782998513d9fb6d7e8f0765e9beb28d1.

Revert "chore(NA): missing data upgrades to lodash4"

This reverts commit 92b85bf947a89bfc70cc4052738a6b2128ffb076.

Revert "chore(NA): upgrade data plugin to lodash4"

This reverts commit 88fdb075ee1e26c4ac979b6681d8a2b002df74c6.

chore(NA): upgrade idx_pattern_mgt, input_control_vis, inspector, kbn_legacy, kbn_react, kbn_usage_collections, kbn_utils, management and maps_legacy to lodash4

chore(NA): map src plugin data to lodash3

chore(NA): missing lodash.clonedeep dep

chore(NA): change packages kbn-config-schema deps

chore(NA): update renovate config

chore(NA): upgrade vis_type plugins to lodash4

chore(NA): move vis_type_vislib to lodash3

chore(NA): update visualizations and visualize to lodash4

chore(NA): remove lodash 3 types from src and move test to lodash4

chore(NA): move home, usage_collection and management to lodash 3

Revert "chore(NA): move home, usage_collection and management to lodash 3"

This reverts commit f86e8585f02d21550746569af54215b076a79a3d.

chore(NA): move kibana_legacy, saved_objects saved_objects_management into lodash3

chore(NA): update x-pack test to mock lodash4

Revert "chore(NA): move kibana_legacy, saved_objects saved_objects_management into lodash3"

This reverts commit 2d10fe450533e1b36db21d99cfae3ce996a244e0.

* chore(NA): move x-pack and packages to lodash 4

* chore(NA): remove mention to lodash from main package.json

* chore(NA): remove helper alias for lodash4 and make it the default lodash

* chore(NA): fix last failing types in the repo

* chore(NA): fix public api

* chore(NA): fix types for agg_row.tsx

* chore(NA): fix increment of optimizer modules in the rollup plugin

* chore(NA): migrate `src/core/public/http/fetch.ts` (#5)

* omit undefined query props

* just remove merge usage

* fix types

* chore(NA): fixes for feedback from apm team

* chore(NA): recover old behaviour on apm LoadingIndeicatorContext.tsx

* chore(NA): fixes for feedback from watson

* Platform lodash4 tweaks (#6)

* chore(NA): fix types and behaviour on src/core/server/elasticsearch/errors.ts

* Canvas fixes for lodash upgrade

* [APM] Adds unit test for APM service maps transform (#7)

* Adds a snapshot unit test for getConnections and rearranges some code to make testing easier

* reverts `ArrayList` back to `String[]` in the painless script within `fetch_service_paths_from_trace_ids.ts`

* chore(NA): update yarn.lock

* chore(NA): remove any and use a real type for alerts task runner

Co-authored-by: Gidi Meir Morris <github@gidi.io>

* chore(NA): used named import for triggers_actions_ui file

* chore(NA): fix eslint

* chore(NA): fix types

* Delete most uptime lodash references.

* Simplify. Clean up types.

* [Uptime] Delete most uptime lodash references (#8)

* Delete most uptime lodash references.

* Simplify. Clean up types.

* chore(NA): add eslint rule to avoid using lodash3

* chore(NA): apply changes on feedback from es-ui team

* fix some types (#9)

* Clean up some expressions types.

* chore(NA): missing ts-expect-error statements

* Upgrade lodash 4 vislib (#11)

* replace lodash 3 with lodash 4 on vislib plugin

* Further changes

* further replacement of lodash3 to 4

* further work on upgrading to lodash 4

* final changes to update lodash

* chore(NA): upgrade data plugin to lodash4

chore(NA): upgrade data plugin public to lodash4

chore(NA): fix typecheck task

chore(NA): fix agg_config with hasIn

chore(NA): assign to assignIn and has to hasIn

chore(NA): upgrade data plugin server to lodash4

chore(NA): new signature for core api

fix(NA): match behaviour between lodash3 and lodash4 for set in search_source

* chore(NA): remove lodash3 completely from the repo

* chore(NA): fix x-pack/test/api_integration/apis/metrics_ui/snapshot.ts missing content

* chore(NA): fix lodash usage on apm

* chore(NA): fix typecheck for maps

* Patch lodash template (#12)

* Applying changes from https://github.com/elastic/kibana/pull/64985

* Using isIterateeCall, because it seems less brittle

* Also patching `lodash/template` and `lodash/fp/template`

* Reorganizing some files...

* Revising comment

* Ends up `_` is a function also... I hate JavaScript

Co-authored-by: Pierre Gayvallet <pierre.gayvallet@gmail.com>
Co-authored-by: Josh Dover <me@joshdover.com>
Co-authored-by: Clint Andrew Hall <clint.hall@elastic.co>
Co-authored-by: Oliver Gupte <ogupte@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Gidi Meir Morris <github@gidi.io>
Co-authored-by: Justin Kambic <justin.kambic@elastic.co>
Co-authored-by: Stratoula Kalafateli <stratoula1@gmail.com>
Co-authored-by: Luke Elmers <luke.elmers@elastic.co>
Co-authored-by: Brandon Kobel <brandon.kobel@gmail.com>
Co-authored-by: kobelb <brandon.kobel@elastic.co>
2020-07-03 01:30:13 +01:00
Nick Partridge f8ba824ebc
Fix discover, tsvb and Lens chart theming issues (#69695) 2020-07-02 09:02:30 -05:00
Pierre Gayvallet 8485d2fbac
Implement recursive plugin discovery (#68811)
* implements recursive scanning in plugin discovery system

* update optimizer to find plugins in sub-directories

* update renovate

* update optimizer IT snapshot

* refactor processPluginSearchPaths$ and add test for inaccessible manifest

* add symlink test

* add maxDepth to the optimizer

* adapt mockFs definitions

* remove `flat` usage
2020-06-30 07:51:12 +02:00
Spencer 9c965fef72
[ui-shared-deps] include styled-components (#69322)
* [ui-shared-deps] include styled-components

* update snapshots caused by react-is upgrade

* fix jest snapshots

* declare react-is dep in x-pack too so it uses the right version

Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-29 13:06:14 -07:00
patrykkopycinski 821aa9903b
Bump react-router (#69608) 2020-06-29 16:55:38 +02:00
Pierre Gayvallet 7e5cff4be9
[GS] add application result provider (#68488)
* add application result provider

* remove empty contracts & cache searchable apps

* fix types
2020-06-29 15:17:00 +02:00
Christos Nasikas 6808903d57
[SIEM][CASE] Persist callout when dismissed (#68372) 2020-06-26 21:31:41 +03:00
Kevin Qualters 9ebf41c77c
[Endpoint] use rbush to only render to DOM resolver nodes that are in view (#68957)
* [Endpoint] use rbush to only render resolver nodes that are in view in the DOM

* Add related events code back

* Change processNodePositionsAndEdgeLineSegments selector to return a function that takes optional bounding box

* Refactor selectors to not break original, and not run as often

* Memoize rtree search selector, fix tests

* Update node styles to use style hook, update jest tests

* Fix type change issue in jest test
2020-06-26 09:42:10 -04:00
Aleh Zasypkin f1a1178328
Upgrade elliptic dependency (6.5.26.5.3). (#70054) 2020-06-26 15:15:02 +02:00
Gidi Meir Morris 68cf857193
[Encrypted Saved Objects] Adds support for migrations in ESO (#69513)
Introduces migrations into Encrypted Saved Objects.

The two main changes here are:
1. The addition of a createMigration api on the EncryptedSavedObjectsPluginSetup.
2. A change in SavedObjects migration to ensure they don't block the event loop.
2020-06-25 17:23:31 +01:00
Søren Louv-Jansen dcc264eba2
Bump backport to 5.4.6 (#69880) 2020-06-25 10:34:39 +02:00
patrykkopycinski cc4c1729d1
Bump jest related packages (#58095) 2020-06-20 21:05:09 +02:00
Nicolas Chaulet 0c477478a4
[Ingest Manager] Use long polling for agent checkin (#68922) 2020-06-18 14:42:27 -04:00
Mikhail Shustov 9f9a5c69f9
Remove unused deps (#69243)
* remove unused deps

* move types in devDeps
2020-06-18 08:53:16 +02:00
Dima Arnautov 1dd5db2cf0
[ML] Add Anomaly Swimlane Embeddable to the dashboard from the Anomaly Explorer page (#68784)
* [ML] WIP attach swimlane embeddable to dashboard from the explorer page

* [ML] fix deps

* [ML] getDefaultPanelTitle

* [ML] fix TS issue

* [ML] DashboardService

* [ML] unit tests

* [ML] redirect to the dashboard

* [ML] swimlane_panel

* [ML] Anomaly Timeline panel

* [ML] swimlane container

* [ML] fix ts

* [ML] Add multiple swimlanes

* [ML] fix SwimlaneType usage

* [ML] disable edit button on update

* [ML] fix i18n translation key

* [ML] use ViewMode enum

* [ML] use navigateToUrl

* [ML] TODO for edit dashboard

* [ML] check kibana dashboard capabilities

* [ML] mlApiServicesProvider

* [ML] mlResultsServiceProvider

* [ML] fix alignment

* [ML] labels and tooltips

* [ML] fix ts issue for proxyHttpStart

* [ML] canEditDashboards check

* [ML] fix TS

* [ML] update add_to_dashboard_control.tsx

* [ML] add form label, disable control on empty swimlanes selection

* [ML] resolve PR review comments

* [ML] e2e test

* [ML] increase panel padding

* [ML] position in row

* [ML] update e2e

* [ML] add data-test-subj for search box

* [ML] PR remarks
2020-06-17 21:25:37 +02:00
Marco Vettorello f9f1158e1f
Update dependency @elastic/charts to v19.5.2 (#69126)
Update @elastic/charts to 19.5.2

Co-authored-by: nickofthyme <nick.ryan.partridge@gmail.com>
2020-06-17 16:02:34 +02:00
patrykkopycinski fb97d91789
Bump react-redux (#69182) 2020-06-16 18:44:34 +02:00
Vignesh Shanmugam f43d51d41b
feat: instrument navigation changes using RUM agent (#67633)
* feat: instrument navigation changes using RUM agent

* chore: rebase and change application contract

* chore: fix type tests

* docs: update public.md doc

* chore: remove internal application export
2020-06-16 17:24:40 +02:00
Alexey Antonov c98845c7c7
Update vega version (#68639)
* update vega version

* a11y skip test

* a11y skip test attempt 2

* adding back all a11y tests

* fix failed karma test

* remove extra  0BSD license

* coalesce yarn.lock versions a little

* update kbn/pm dist

* fix CI

* fix Vega View for ML

Co-authored-by: Michail Yasonik <michail.yasonik@elastic.co>
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-16 12:35:34 +03:00
Spencer cc1758dd96
[release-notes] add script to generate release notes from PRs (#68816)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-15 16:27:56 -07:00
Anton Dosov 3d0552e03c
Embed dashboard by value example & some embeddable clean up (#67783)
Added example for using dashboard container by value
1.1 Refactored embeddable explorer e2e test to use new example, removed not needed kbn_tp_embeddable_explorer plugin.
For embeddable explorer examples went away from using getFactoryById() to improve type checks
There is new component a replacement for EmbeddableFactoryRenderer with slightly more flexible api: EmbeddableRenderer.
3.1 We can improve it going forward to support more use case
2020-06-15 17:13:31 +02:00
Joe Portner 6f084dfa92
Bump webpack packages (#68716)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-06-12 18:57:28 -04:00
Mikhail Shustov f593455a62
Bump TypeScript to v3.9 (#67666)
* add babel support for export type

* bump ts version to 3.9.3

* rebuild kbn-pm

* bump typescript-eslint

* fix error in security plugin UI

* check export as works

* fix app migration type

* use correct test subj attribute

* fix errors from the old PR

* embeddable is already passed in props

* explicitly define type of fetch

* add some types for viz

* fix fetch type p.2

* add null to allow spreading without type errors due to override

* add type guard to fix type error

* cast to any, since cannot assign unknown

* add timestamp to known types

* fix type error in fetch

* fix type error. id is always defined in attibutes

* declare a type

* move ts-ignore to the lines with errors

* declare tuple type explicitly

* mute type error. cannot assign unknown

* fix errors. id is always defined

* fix error type

* fix override errors. id is always defined

* fix error. extends any doesn't work anymore

* fix type error. type is always defined

* env doesn't always contain values

* fix type error

* cast to string

* add: logs is already declared in getNodeLogsUrl

* state is already  passed in props

* fix some errors in timelion

* number of fragments is always defined

* 'absolute' is not just string, but value

* TEMP: option is always defined

* always true if cast to promise manually

* both props are always defined

* explicitly define returned SO type

* workaround type

* bump tslib to be compatible with ts v3.9

* test private property

* rebuild kbn-pm

* Fix ts errors for beats management

* Fix type inference broken by the TS 3.9 upgrade

* Fix ingest manager saved object attributes typings

* Fix TS errors in cross_cluster_replication and index_management.

* Fix TS error in Watcher.

* roll back colorRange wrong type

* fix security plugin types

* TypeScript 3.9 fixes for APM

* Fix ColorRange types.

* fix actions & alerts errors. ByGidi

* fix lists error

* More APM fixes

* Remove paramaterization from `removeEmpty in agent config SettingsPage component (it's only used there and doesn't need to be parameterized.)
* Add option chain for case in registerTransactionDurationAlertType
* Cast `overallValue` in transform_metrics_chart
* Use more specific type for custom link filters
* Add more option chaining for local UI filters buckets response
* Remove unused parameters from routes
* Fix getProjection type parameter
* Use destructuring in serviceNodesLocalFiltersRoute to hide `never` error
* Revert `UnionToIntersection` change in `AggregationResponseMap`

Fixes #67804.

* fix platform type error

* Fix visualizations types.

* Fix data plugin types.

* bump TS version to 3.9.5

* Fix telemetry TS errors

* Fix dashboard code

* Adding Canvas Fixes for TS 3.9

* Fix case and security_solution types

* roll back to the old export syntax. new one might cause problems in api-extractor

* update docs

* Fix timelion code

* Fix meta

* Fix types

* fix type errors om ingest_manager

* bump babel deps

* enable private props & methods syntax

* update kbn-pm dist

* whitelist 0BSD license

* use @babel/plugin-proposal-private-methods in default set as well

* disable new babel plugins

* Revert "disable new babel plugins"

This reverts commit 04d959431d.

* cleanup security_solution types

* Fixes type error for newer TypeScript

* update docs

Co-authored-by: Nicolas Chaulet <nicolas.chaulet@elastic.co>
Co-authored-by: Felix Stürmer <stuermer@weltenwort.de>
Co-authored-by: CJ Cenizal <cj@cenizal.com>
Co-authored-by: Larry Gregory <larry.gregory@elastic.co>
Co-authored-by: Nathan L Smith <smith@nlsmith.com>
Co-authored-by: Walter Rafelsberger <walter@elastic.co>
Co-authored-by: Luke Elmers <luke.elmers@elastic.co>
Co-authored-by: Alejandro Fernández Haro <alejandro.haro@elastic.co>
Co-authored-by: Tim Roes <tim.roes@elastic.co>
Co-authored-by: Clint Andrew Hall <clint.hall@elastic.co>
Co-authored-by: Patryk Kopycinski <contact@patrykkopycinski.com>
Co-authored-by: FrankHassanabad <frank.hassanabad@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-11 10:04:09 +02:00
Nathan Reese 332a1386d0
[Maps] bump @elastic/ems-client and incorporate types (#68444)
* [Maps] bump @elastic/ems-client and incorporate types

* tslint

* update to ems-client 7.9.2

* bump to 7.9.3

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-10 10:57:23 -06:00
Brandon Kobel e616935d0b
Using re2 for Timelion regular expressions (#67416)
* Revert "Revert "Using re2 for Timelion regular expressions (#55208)""

This reverts commit c90293d03f.

* Updating re2 to 1.14.0. Still need to update build patching

* Extract the gzip to the destination, supporting multiple extract methods

* Adding 'node' to jest's moduleFileExtensions

'node' is in the defaults, not sure why we aren't using the defaults...
https://jestjs.io/docs/en/configuration#modulefileextensions-arraystring

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-10 09:55:42 -07:00
Greg Thompson 0306c7a8cf
Upgrade EUI to v24.1.0 (#68141)
* eui to 24.1.0

* src snapshot updates

* x-pack snapshot updates

* euiPaletteColorBlind param updates

* euiPaletteColorBlind ts-ignore

* fix collapsibleNav close button click for functional testing

* await focus

* increase legacy sass build timeout value

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-09 15:07:40 -06:00
Peter Pisljar 0a73891714
bumping makelogs version to v6.0.0 (#66163) 2020-06-09 12:21:42 +02:00
dependabot[bot] 9208708b53
Bump websocket-extensions from 0.1.3 to 0.1.4 (#68414)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-09 06:14:02 -04:00
Spencer ab226f02ae
[kbn/pm] log levels (#68203)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-06-08 15:53:16 -07:00
Spencer 25e71c1096
upgrade npm-run-path (#68539)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-06-08 11:29:09 -07:00
Joe Portner c29fcbb46b
Bump decompress package version (#68386) 2020-06-08 09:45:06 -04:00
Joe Portner 77ab709976
Bump pdfmake package version (#68395) 2020-06-08 09:19:32 -04:00
Robert Austin c98cfda890
upgrade eslint-plugin-react-hooks from 2.3.0 to 4.0.4 (#68295)
* updates `eslint-plugin-react-hooks` from `v2.3.0` to `v4.0.4`. 
* Disable rules on failing lines
2020-06-05 12:43:55 -04:00
Dmitry Lemeshko 6f57fa0b2d
Report page load asset size (#66224)
* performance_tests: draft version

* update cli runner and script

* ingest metrics

* save asset type for plugins

* Update src/dev/performance/ingest_metrics.ts

Co-authored-by: Spencer <email@spalger.com>

* follow review comments

* fix size calc, add FTR config, move src to kbn/test

* fix import, remove unused interface

* Update packages/kbn-test/src/page_load_metrics/capture_page_load_metrics.ts

Co-authored-by: Spencer <email@spalger.com>

* start chromium with no-sandbox

* add logging

* check page contains expected element, cut apps to 5

* fix locator & typo

* Update packages/kbn-test/src/page_load_metrics/navigation.ts

Co-authored-by: Spencer <email@spalger.com>

* Update navigation.ts

* Update navigation.ts

* bump puppeteer version

* fix typo

* update navigation script

* update config file

* update yarn.lock

* fix

* take screenshot on failure

* update screenshot title

* fix screenshot saving and error

* invalid locator

* Revert "invalid locator"

This reverts commit 3007539a69.

* run script in a loop 10 times

* Revert "run script in a loop 10 times"

This reverts commit 6cfa219140.

* path config value directly

* fix screenshots directory setup

* update maps locator, common for landing and new map

Co-authored-by: Spencer <email@spalger.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Mikhail Shustov <restrry@gmail.com>
2020-06-05 16:42:55 +02:00
Spencer 3b43821401
upgrade elastic/numeral and complete migration away from numeral (#68035)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-06-03 10:07:11 -07:00
Christos Nasikas 92237517be
[SIEM] Update cypress to 4.5.0 (#67961) 2020-06-02 20:01:39 +03:00
Brian Seeders 81d55f8822
[CI] Bump chromedriver and use DETECT_CHROMEDRIVER_VERSION (#67642) 2020-05-29 14:58:40 -04:00
Spencer 6288096f62
[kbn/optimizer] use execa to fork workers (#67730)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-05-29 10:34:58 -07:00
Brian Seeders 2c70571c72
Revert "[CI] Bump chromedriver and use DETECT_CHROMEDRIVER_VERSION (#67182)"
This reverts commit 2bf3a592f4.
2020-05-27 17:26:23 -04:00
Brian Seeders 2bf3a592f4
[CI] Bump chromedriver and use DETECT_CHROMEDRIVER_VERSION (#67182) 2020-05-27 10:37:33 -04:00
Vignesh Shanmugam faaafd69a2
fix: rum agent should work correctly on new platform (#67037)
* fix: rum agent should work correctly on new platform

* chore: add IS_KIBANA_DISTRIBUTABLE flag back

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-05-25 13:13:58 +02:00
restrry 64ad4f3f92 bump prettier version to v2 2020-05-22 08:51:10 +02:00
Greg Thompson 204fd5b5a2
Upgrade EUI to v23.3.1 (#65877)
* eui to 23.2.0

* nav drawer ts updates

* eui to 23.3.0

* src snapshot updates

* makeId -> htmlIdGenerator mocks

* EuiCodeBlock testenv element lookup

* x-pack snapshot updates

* remove obsolete EuiCode and EuiCodeBlock mocks

* eui to 23.3.1

* patch updates

* searchbar type update

* docViewer tabs use valid DOMString id

* docViewer snapshot

* header updates

* cert_search field wrapper update
2020-05-21 14:31:26 -05:00
Tyler Smalley c675301a87
[build] Removes commonjs transforms (#66506)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-05-21 09:43:31 -07:00
Brandon Kobel 0e55b248d3
Revert "Integration of a static filesystem for the node_modules (#47998)" (#67124)
This reverts commit 33376fc368.
2020-05-20 12:11:02 -07:00
patrykkopycinski 2d32034f96
Bump styled-component dependencies (#66611) 2020-05-20 16:03:44 +02:00
patrykkopycinski 871196c2b0
Bump react-markdown dependencies (#66615) 2020-05-20 16:02:30 +02:00
Xavier Mouligneau bcfc02987f
[SIEMDPOINT] Move endpoint to siem (#66907)
* adds the stuff

* keeps moving stuff

* finishes moving the stuff

* moves tests

* fix type

* try moving it all at once. BROKEN

* move endpoint to siem

* fix package coming from endpoint

* missing scripts + change url

* fix eslint

* temporary disable functional testing for endpoint

* fix api integration types

* allow api integration test + comment functional test

* fix internationalization

* fix internationalization II

* fix jest test

* fix x-pack test

* fix i18n

* fix api integration

* fix circular dependency

* add new dependency to cypress test

Co-authored-by: Davis Plumlee <davis.plumlee@elastic.co>
Co-authored-by: oatkiller <robert.austin@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-05-19 11:24:53 -04:00
Tiago Costa a8e82118c8
chore(NA): bump static-fs to 1.0.2 (#66775)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-05-15 21:32:27 +01:00
Spencer 4e0921d41e
[kbn/plugin-helpers] typescript-ify (#66513) 2020-05-15 10:35:44 -07:00
patrykkopycinski 65a0b44785
[SIEM] Eliminate Superfluous Untitled Timelines (#65783) 2020-05-13 22:05:26 +02:00
Josh Dover fd4074f2cd
Remove slapshot contract tests (#66277) 2020-05-12 14:30:47 -06:00
Joe Reuter 5394fa43fe
Tsvb less update (#65467) 2020-05-08 16:53:42 +02:00
spalger 3e9a12cf33 Revert "[SIEM] Eliminate Superfluous Untitled Timelines (#64341)"
This reverts commit a06c02f606.
2020-05-06 08:11:04 -07:00
patrykkopycinski a06c02f606
[SIEM] Eliminate Superfluous Untitled Timelines (#64341) 2020-05-06 14:56:09 +02:00
Gidi Meir Morris 94127d803a
[Alerting] migrates acceptance and functional test fixtures to KP (#64888)
This PR migrates the vast majority of Alerting legacy code to the Kibana Platform.

This includes:

1. Removed legacy Task Manager
2. Migrates Fixture plugins in Alerting, Triggers UI and Task Manager Perf

This does not includes:

1. The PagerDuty simulator due to a lack of support for custom responses in the platform. issue opened. https://github.com/elastic/kibana/issues/65045
2. The Webhooks simulator due to a lack of support for custom authorisation. Requires investigation.
2020-05-06 09:57:26 +01:00
Michail Yasonik 35e10273d3
New nav (#64018)
Notably, also removes aria-hidden from many visualizations
2020-05-05 23:14:14 -05:00
Tiago Costa 33376fc368
Integration of a static filesystem for the node_modules (#47998)
* feat(NA): added new build step to generate a static file system for node_modules and monkey patch the bin start files to include the static file system loader on begining.

* chore(NA): updated lockfile.

* chore(NA): replace import to the correct static-fs files.

* fix(NA): resolve for a correct static fs loader.

* chore(NA): last static-fs working version.

* feat(NA): changed patched entryPoints.

* chore(NA): update to last static fs.

* fix(NA): fix imports on webpack shims. chore(NA): added new static-fs version.

* chore(NA): update to static-fs with stat and statSync.

* fix(NA): vendor chunk filtering in order to include default node modules and static node modules.

* refact(NA): major refact on create static modules fs task.

* fix(NA): remove global from clean empty folders task.

* chore(NA): change args order for deleteAll.

* chore(NA): move to the new static fs

* feat(NA): migrate to last apis of static fs

* fix(NA): patch correct entry file.

* chore(NA): last stable integration with static-fs task

* chore(NA): rollback some unecessary changes

* chore(NA): remove changes on sinon webpackshim

* chore(NA): integrate with official static-fs version

* chore(NA): integrate last thread-loader version

* chore(NA): added last static-fs version

* chore(NA): upgrade to last static-fs version

* chore(NA): upgrade to last static-fs version 1.1.1

* chore(NA): rever static-fs version to 1.1.0

* chore(NA): upgrade static-fs to 1.1.1

* chore(NA): upgrade static-fs for last 1.2.0 version

* chore(NA): update package.json

* chore(NA): run apm after patched environment

* chore(NA): specify rule to disable eslint for

* chore(NA): remove changes in the src/apm file

* chore(NA): change apm order in the dev scripts

* chore(na): update static-fs versin

* chore(NA): bump static fs version

* chore(NA): correctly lint task file

* chore(NA): move away from rimraf to del

* chore(NA): bump static-fs version

* chore(NA): bump static-fs version

* chore(NA): bump static-fs version

* chore(NA): bump static-fs version

* chore(NA): bump to last static-fs version

* chore(NA): apply changed according PR review feedback

* chore(NA): remove changes to base optimizer

* chore(NA): fix discover pattern

* chore(NA): bump static-fs version

* chore(NA): bump static fs to 1.6.3

* chore(NA): bump static-fs to 1.6.4

* chore(NA): bump static-fs to last version

* chore(NA): bump static-fs to last version

* chore(NA): bump static-fs to last version

* chore(NA): bump static-fs to last version

* chore(NA): bump static-fs to last version

* chore(NA): bump static-fs to last version

* chore(NA): bump static-fs for 1.8.3

* chore(NA): bump static-fs to 1.9.0

* chore(NA): bump static-fs to 1.9.1

* chore(NA): update to last static-fs version 1.10.0

* chore(NA): moving to @elastic/static-fs package

* fix(NA): change import to the new package

* chore(NA): bump elastic static-fs to 1.0.1

Co-authored-by: spalger <email@spalger.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-05-05 20:16:47 +01:00
dependabot[bot] 23282a2f37
Bump jquery from 3.4.1 to 3.5.0 (#64884) 2020-05-05 13:31:49 -04:00
Marco Vettorello 4928978557
update elastic/charts to 19.2.0 (#65279) 2020-05-05 19:14:25 +02:00
Marco Vettorello 2d4dc801c3
Update dependency @elastic/charts to v19.1.2 (#64759)
* build: upgrade @elastic/charts to 19.0.0

* refactor: onBrushEnd breaking changes

* fix: missing onBrushEnd argument changes

* fix: update ech to 19.1.1

* fix: lens onBrushEnd breaking changes

* update to 19.1.2
2020-05-04 18:42:58 -05:00
Josh Dover 306a5fe55e
Use brotli compression for some KP assets (#64367) 2020-05-04 10:53:06 -06:00
Thomas Watson 86c64af553
Bump mapbox-gl dependency from 1.9.0 to 1.10.0 (#64670) 2020-05-04 18:16:48 +02:00
Søren Louv-Jansen 007b16793d
Bump backport to 5.4.1 (#65041) 2020-05-04 12:18:19 +02:00
Ryland Herrick f8e01bd3a1
[SIEM][NP] Fixes bug in ML signals promotion (#64720)
* Add set-value as an explicit dependency

This is a more robust solution than lodash's set().

* Replace lodash.set() with set-value's equivalent

* Rebuild renovate config

We added set-value to our dependencies.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-29 11:58:46 -05:00
Ryland Herrick 4cc5b3a4d3
[SIEM] Client NP Cutover (#64251)
* Move SIEM public/ folder to NP plugin

This is solely renames; fixes come next.

* Update relative imports in our API tests

* Fix linter errors following move to NP folder

These paths got a little shorter, so some lines could be collapsed.

* Move client dependencies to NP package.json

I'm removing the @types/js-yaml for now because I'm not sure we need it;
I'll add it back later if we do.

* Fix relative imports to other plugins

* Fix errant uses of ui/chrome

* Remove legacy plugin shim

* Move feature registration into plugin

This previously had to be part of legacy bootstrapping due to an order
of operations issue.

* Disconnect legacy plugin

The index file should now be redundant with what's in the plugin:

* app registration
* feature registration

* Move public gitattributes

* Remove references to legacy embeddables

We can now use the NP API. Maps embeddable will not work here until
their work is merged, but this should prevent us from importing legacy
code and thus breaking the build.

* Add our frontend dependencies to kibana.json

These are all required for now, because that's how they're typed. If
they _should_ be optional (and I think several should), we need to
update the type and handle the null case within the app.

* Replace use of ui/new_platform mocks in embeddable utils

* Fix remaining jest tests

* Replace build-breaking ui/new_platform mocks with equivalents in core
proper
* Remove unnecessary mocks of ui/new_platform

* Remove references to legacy SIEM folder

* I left the reference in CODEOWNERS in case someone tries to sneak
something back
* I left the .gitignore reference for the same reason

* Fix mocks of relative paths

These were not caught by typescript and were causing test failures.

* Export our client plugin contracts

They're empty for now.

* Move from deprecated appmount API

The new one dropped a param we weren't using.

* Add missing mock causing test failures

* Don't re-export core types from our plugin

Import them from core where we need them, instead

* Move Actions UI registry outside of mount

This is already imported, there's no benefit (and potential timing
issues) with doing this inside the mount.

* Add security's setup contract to our StartServices

This doesn't change what's used, only how we're typing it. The types are now a
little more truthful as:

* our StartPlugins don't include setup contracts
* our StartServices includes everything we use at Start time, including
the one setup plugin.

* Add order and icon back to the sidebar link

* Replace plugin class properties with constants

These are shared, and should be consistent.

* Enable our UI on NP

* Add missed plugin dependencies

We're not using their contracts, but we are importing code from them.

* Revert use of constant in translation

Can't do that, whoops

* i18n our feature catalogue entry

* Remove unnecessary array from single element

* Remove unused keys

These were the legacy translations used... well, I don't know where they
were used.

* Ignore circular dependencies in external plugins

* Normalize exclusions

* Add undeclared dependencies to kibana.json

We import our maps embeddable from maps, and we pass inspector to the
embeddable. I just missed these in my audit. This was causing errors in
the map embeddable.

* Await our call to setLayerList

This is an async call that we need to complete before we can render.

* Reduce siem plugin size

When we load our initial plugin (before our app is loaded), were were
implicitly importing all of kibana_react with this import. While a
global module prevents this from affecting our bundle size currently,
that could change in the future. Since we only need a reference to our
class, we just import that instead.
2020-04-27 17:59:21 -05:00
Spencer 00ec971b6e
Implement basic CI metric reporting (#64263) 2020-04-27 13:24:52 -07:00
Thomas Watson 8c05a724e7
Bump cypress dev-dependency from 4.2.0 to 4.4.1 (#64408) 2020-04-27 14:23:33 +02:00
Thomas Watson a6fff8b298
Bump karma-mocha dev-dependency from 1.3.0 to 2.0.0 (#64407) 2020-04-27 12:25:03 +02:00
Thomas Watson 568f7034eb
Fix issue with yarn.lock (#64496)
This was brought on by merging #64401, #64403, #64406, and #64433.
2020-04-27 09:40:14 +02:00
Thomas Watson 3aa73d1236
Bump @hapi/boom dependency from 7.4.2 to 7.4.11 (#64433) 2020-04-27 08:47:19 +02:00
Thomas Watson b666f0acc8
Bump gonzales-pe dev-dependency from 4.2.4 to 4.3.0 (#64401) 2020-04-27 08:44:42 +02:00
Thomas Watson 3c5eee7526
Bump karma dev-dependency from 3.1.4 to 5.0.2 (#64403) 2020-04-27 08:41:17 +02:00
Thomas Watson 9eca4026f9
Bump iedriver dev-dependency from 3.14.1 to 3.14.2 (#64406) 2020-04-27 08:35:56 +02:00
Nick Partridge 3a898a159c
update charts library to 18.4.2 (#64438) 2020-04-24 17:47:59 -05:00
Thomas Watson cbf006c2a0
Bump handlebars dependency from 4.5.3 to 4.7.6 (#64402) 2020-04-24 19:20:15 +02:00
Tiago Costa e3ee02c687
chore(NA): reduce siem bundle size using babel-plugin-transfor… (#63269)
* chore(NA): reduce siem bundle size using babel-plugin-transform-imports for lodash

* fix(NA): dont use preventFullImport

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-23 17:43:34 -07:00
Nick Peihl 9e11bcb592
Add Oil Rig Icon from @elastic/maki (#64364) 2020-04-23 15:35:50 -07:00
Nick Partridge bc6291349c
Update elastic charts v18.4.1 (#64257) 2020-04-23 11:59:19 -05:00
Chandler Prall 126d187429
Upgrade to EUI v22.3.0 (#62963)
* snapshot updates

* bump to eui 22.3.0

* snapshots

* Fix css selector in test to match EUI internal DOM change

* Updated snapshots

* Insert react-beautiful-dnd@10 into top-level kibana to force siem's node_modules to hold its correct version

* More snapshot updates, resolved a typescript issue

* Move react-beautiful-dnd dependency around to make things happy again

* Use SearchFilterConfig from the top-level eui export

* Swallow 'ResizeObserver error does not have an err object' error in canvas

* Swallow ResizeObserver error cross-browser
2020-04-22 11:01:49 -06:00
Aleh Zasypkin 21dda535eb
Upgrade papaparse dependency (4.6.35.2.0). (#63879) 2020-04-20 14:08:04 +02:00
Cauê Marcondes 90f5ce0ef3
[APM]Upgrade apm-rum agent to latest version to fix full page reload (#63723) 2020-04-17 11:15:28 +02:00
Nick Partridge 4e8ff57355
update elastic charts to 18.3.0 (#63732) 2020-04-16 17:00:36 -05:00
Dmitry Lemeshko 464a3c23ba
[FTR]: add chromium-based Edge browser support (#63566) 2020-04-16 19:06:33 +03:00
Dima Arnautov 7058070e15
[ML] Extract apiDoc params from the schema definitions (#62933)
* [ML] WIP apiDoc schema extractor

* [ML] extract actual type

* [ML] refactor schema definitions

* [ML] Update README.md

* [ML] extract nested

* [ML] call job validation endpoint with complete payload

* [ML] escape special chars and fix line breaks

* [ML] clean up extractDocEntries

* [ML] serializeWithType

* [ML] add missing annotations

* [ML] fix parent schema assigment

* [ML] support object composition

* [ML] support multiple schemas per block

* [ML] fix for collections

* [ML] fix calendarIdsSchema

* [ML] add ml package.json with apidoc commands

* [ML] use the single output markdown file

* [ML] fix typo

* [ML] change the Calendars order

* [ML] adjust the order in adidoc.json

* [ML] update api version

* [ML] update tsconfig.json include

* [ML] update packages/kbn-pm/dist/index.js

* [ML] update ML overrides in .eslintrc.js

* [ML] yarn.lock symlink

* Revert "[ML] yarn.lock symlink"

This reverts commit 07f06801

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-15 18:40:34 +02:00
Dmitry Lemeshko 637a9e11a2
Revert FTR: add chromium-based Edge browser support (#61684) (#63448) 2020-04-14 13:25:26 +02:00
Dmitry Lemeshko eb3fe8eb50
update chromedriver dependency to 81.0.0 (#63266) 2020-04-10 23:05:20 +03:00
Ahmad Bamieh ed5dd0a325
[Telemetry] use prod keys (#63263) 2020-04-10 22:18:11 +03:00
Dmitry Lemeshko 330956ec1a
Code coverage: fix missing coverage after merging oss & x-pack data (#63178)
* update nyc & istanbul-babel deps

* update index.js in kbn-pm

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-10 02:55:28 +03:00
Marco Vettorello 93b34632c0
[TSVB] Fix wrongly display stacked as percentage charts (#62654)
Update to  elastic-charts 18.2.2 with the valid 0% rendering
2020-04-09 23:53:47 +02:00
Dmitry Lemeshko 578e443bdd
FTR: add chromium-based Edge browser support (#61684)
* bump dependency, add edge support in ftr services

* add config files

* fix browser version for msedge

* use npm ms-chromium-edge-driver

* download edge driver aside from session creation

* move dependency to dev

* update dist/index file

* bump edge-driver version

* change type to msedge to match w3c spec

* fix discover tests for Edge

* Revert "fix discover tests for Edge"

This reverts commit 87e7fdd256.

* bump driver version up

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-09 00:08:21 +03:00
Ahmad Bamieh e16885c3ad
[Telemetry] update crypto packages (#62469)
* update crypto packages

* as type for return value

* get default export

* add if checks

* wrap errors in i18n

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-07 00:36:15 +03:00
Spencer e6c23ea9b2
[kbn/ui-shared-deps] expand and split (#62364)
* [kbn/ui-shared-deps] expand and split

* add two import styles for eui/react-dom that are new

Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-03 14:11:36 -07:00
Søren Louv-Jansen 2df0b41959
[backport] Bump to 5.1.3 (#62286) 2020-04-02 14:49:59 +02:00
Robert Austin 3fdddea286
Revert "Endpoint: Add ts-node dev dependency (#61884)" (#62197)
This reverts commit 4899aaf565.
2020-04-01 11:51:15 -07:00
Aaron Caldwell b06eaf4874
[Maps] Update ems client dependency to 7.8.0 (#62181) 2020-04-01 11:13:58 -06:00
liza-mae dc77759f4b
Update percy agent to latest version (#62089)
* Update percy agent to latest version

* Update kbn-pm index

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-01 09:33:17 -06:00
Søren Louv-Jansen 3b3e3f539b
[backport] Bump to 5.1.2 (#62117) 2020-04-01 14:10:16 +02:00
Cauê Marcondes a8425e2481
[APM] .apm-agent-configuration is not created if Kibana is started while ES is not ready (#61610)
* adding retry functionaty when creating index

* adding p-retry module to x-pack package.json

* addressing pr comments

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-01 13:27:26 +02:00
Robert Austin 4899aaf565
Endpoint: Add ts-node dev dependency (#61884)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Used to run CLI scripts written in Typescript
2020-03-31 11:01:06 -04:00
Spencer 7d58f95953
[optimizer] validate the syntax of bundled node_modules (#59972)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-30 15:59:43 -07:00
Joe Portner e3b394def1
Upgrade acorn (#61708) 2020-03-30 09:05:08 -04:00
Tiago Costa 207c0d2e96
chore(NA): update es legacy client versions (#61477) 2020-03-27 16:25:09 +00:00
Mikhail Shustov ab39ceba8f
Serve static assets from NP (#60490)
* add hapi.inert plugin to NP

* update tests

* move serving static assets

* update tests

* add functional tests

* fix type errors. Hapi.Request doesn't support typings for payload

* update docs

* remove comment

* move assets to NP

* update all assets references

* address Spencer's comments

* move ui settings migration to migration examples

* document legacy plugin spec

* move platform assets test to integration_tests

* address Spencer's comment p.2

* try to fix type errors

* fix merge commit

* update tests
2020-03-27 14:24:28 +01:00
Marco Vettorello ba3d639201
fix(line_annotation): keep the spec in state after chart rerender (#61499) 2020-03-27 12:01:20 +01:00
Joe Portner 7fe06f7bea
Upgrade vega-util (#61125) 2020-03-26 15:02:37 -04:00
Thomas Watson 672a81032a
Bump @elastic/makelogs from v5.0.0 to v5.0.1 (#61396) 2020-03-26 17:40:17 +01:00
Thomas Watson c21419c6d4
Bump glob-all from v3.1.0 to v3.2.1 (#61215) 2020-03-26 17:39:19 +01:00
Thomas Watson fe2ae7ea0d
Bump extract-zip from v1.6.7 to v1.7.0 (#61209)
This commit also consolidates our versions of the mkdirp sub-dependency
to use the newest 0.5.x version (v0.5.4) wherever possible.
2020-03-26 07:07:42 +01:00
Thomas Watson 9dd7ac2de9
Bump cypress dev-dependency from 4.0.2 to 4.2.0 (#61128) 2020-03-26 06:59:13 +01:00
Nathan L Smith 43d95da464
Make global service map zoom toward center (#61340)
* Make global service map zoom toward center

Calculate the center of the graph when there's not a primary node.

Also update to latest version of types.

Fixes #61176.

* Fix types
2020-03-25 18:24:15 -05:00
Thomas Watson 7c18d70b2e
Use renamed @mapbox/geojson-rewind instead of geojson-rewind module (#61139) 2020-03-25 17:11:53 +01:00
Mikhail Shustov a8f92c5e0b
bump up babel version (#61037)
* bump babel version

* build kbm-pm

* refresh transitive @babel/* versions to kick yarn into shape

* update kbn/pm dist

Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-03-25 16:37:30 +01:00
Thomas Watson e42956151b
Bump mapbox-gl from 1.3.1 to 1.9.0 (#61135)
This commit also consolidates our versions of pbf to all use the latest
3.x (v3.2.1) and ieee754 to all use the latest 1.x (v1.1.13).
2020-03-25 06:24:39 +01:00
Nick Peihl 49c7518976
Bump ems-client to 7.7.1 (#61153)
* Bump ems-client to 7.7.1

* Update in x-pack dir, too

* erg, yarn lock

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-24 16:50:09 -07:00
Thomas Watson 34bfc1bfc7
Bump core-js and jimp (#61124)
This commit bumps the following dependencies:

- core-js (prod-dependency): 3.2.1 -> 3.6.4
- jimp (dev-dependency): 0.8.4 -> 0.9.6
2020-03-24 21:59:27 +01:00
Brandon Kobel 676a03d8c5
Update crypto-js to 3.3.0 (#58911)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-24 10:11:51 -07:00
Nathan Reese e55ee76b26
[Maps] convert layer utils to TS (#60791)
* [Maps] convert layer utils to TS

* clean up

* renovate changes

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-24 09:38:00 -06:00
Brandon Kobel 4b9126b2c3
Updating our direct usage of https-proxy-agent to 5.0.0 (#58296)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-24 07:57:50 -07:00
Shahzad d31e5f524f
[Uptime] Ml detection of duration anomalies (#59785)
* add flyout

* add state

* update state

* ad job

* update

* updat

* add ml analyze button

* update api

* use differential colors for duration chart

* remove duration chart gql

* update type

* type fix

* fix tyoe

* update translation

* update test

* update conflicts

* update anomaly record

* chart

* added annotations

* update error handling

* update

* update types

* fixed types

* fix types

* update types

* update

* update

* remove unnecessary change

* remove unnecessary change

* fix type

* update

* save

* update pr

* update tets

* update job deletion

* update

* update tets

* upadte tests

* fix types

* update title text

* update types

* fixed tests

* update tests and types

* updated types

* fix PR feedback

* unit test

* update more types

* update test and manage  job

* resolve conflicts

* types

* remove unnecessary change

* revert ml code

* revert ml code

* fixed formatting issues pointed by pr feedback
2020-03-24 12:34:43 +01:00
Thomas Watson e96ed69bf6
Upgrade mocha dev-dependency from 6.2.2 to 7.1.1 (#60779)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-03-24 08:26:09 +01:00
Spencer 33af1c154b
[npm] upgrade elastic/maki (#60829)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-03-21 17:37:55 -07: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
Marco Vettorello 88612743a9
Update dependency @elastic/charts to v18.1.0 (#60578) 2020-03-20 17:37:11 +01:00
renovate[bot] b9d2affc73
Update dependency nock to v12 (#60422)
* Update dependency nock to v12

* update yarn.lock file

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-18 17:48:42 -07:00
Spencer cc8f7c43dd
upgrade execa to get stdout/stderr in error messages (#60537)
* upgrade execa to get stdout/stderr in error messages

* rebuild kbn/pm

Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-18 17:45:04 -07:00
Thomas Watson 59a522b4ef
Upgrade @types/node to match Node.js runtime (#60368)
Kibana uses Node.js v10.19.0. The closest version of @types/node to this
version is currently v10.17.17.

This commit updates the resolutions field in package.json to ensure that
the latest version less than 10.20.0 is always used.
2020-03-18 14:27:56 +01:00
Spencer 32b3861580
[kbn/pm] don't fail when plugins are outside repo (#60164)
* [kbn/pm] don't fail when plugins are outside repo

* remove unused import

Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-17 15:25:44 -07:00
Spencer 2367d749c1
upgrade react-use (#60427)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-17 15:24:59 -07:00
Nick Peihl 928454afa4
Update the ems-client dependency to 7.7.0 (#59936)
* Update the ems-client dependency

This PR adds the `appName` and `appVersion` parameters used by ems-client. The `appVersion` parameter replaces the now deprecated `kbnVersion` parameter in ems-client.

* Review feedback

* Fix borked merge

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-17 11:51:17 -07:00
patrykkopycinski 55003b61dd
[SIEM] Fix Timeline footer styling (#59587) 2020-03-17 11:50:34 +01:00
Nathan Reese 6cbfa274cf
[Maps] add draw control to create distance filter (#58163)
* [Maps] add distance filter to draw controls

* create distance filter

* update jest snapshot

* remove duplicated code

* reset circle draw when user hits escape

* i18n cleanup

* ts MultiIndexGeoFieldSelect

* ts DistanceFilterForm

* remove unused prop

* make interface a type

* move geo_field_with_index to components folder

* convert draw_circle to TS

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-16 13:33:40 -06:00
Thomas Watson 6a648658ce
Bump acorn sub-dependency to version ^7.1.1 (#60239) 2020-03-16 16:58:17 +01:00
spalger c90293d03f Revert "Using re2 for Timelion regular expressions (#55208)"
This reverts commit 728d073c12.
2020-03-13 09:14:20 -07:00
Alexey Antonov 9d00427aef
Downgrade to query-string v5.1.1 (#59633)
* Downgrade to query-string v5.1.1

* update lib version for x-pack

* fix JEST

* fix functional tests

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-13 17:27:09 +03:00
John Schulz 96f74e6e7a
[Ingest] Add Fleet & EPM features (#59376)
* [EPM] Documentation of HTTP routes & TS types for Ingest (#48798)

* Add beginning models and two routes for Ingest

* Update types & models per discussion w/Ruflin
Also reviewed data structures listed at https://docs.google.com/document/d/1IBR3f9dpHqJmXYEdg06WV34KSMd3g5k4aMGa4jde_Eg/edit#

* Update: /policies always returns array. /policy returns single policy

* Add pagination for /policy & /datasources. Uses per_page & page params

* Add API metadata. Standardize policy_id param name.

* Update descriptions to match Google Doc. Move use case to Policy.

Disabled the '@typescript-eslint/array-type' rule because it was going around in circles. It didn't like Datasource[] or Array<Datasource>

* Return to initial TS annotation for Arrays

Remove the line disabling @typescript-eslint/array-type now that it's behaving normally again 🤷

* [EPM] Add directory structure for server/lib. (#50469)

* Add directory structure for server/lib.

* 'tests' seems to be more common than 'test'

* Make CI happy

* [EPM] Add basic documentation directory (#50478)

* [EPM] Add basic documentation directory

Having the doc directory around allows us to easily add docs from here on to document how EPM works.

To run the docs build, use the following command from the kibana directory:

```
../docs/build_docs --doc docs/epm/index.asciidoc --open
```

The above assumes that docs (https://github.com/elastic/docs) are checked out in the same directory as Kibana.

With this change, the EPM docs build is not included yet in the overall docs build. For this adjustments to https://github.com/elastic/docs/blob/master/conf.yaml must be made.

* [EPM] Add basic index template (#50471)

This PR adds the very basic index template we will use for the packages. It contains all the basic settings and some examples. The examples will be remove as soon as we have an actual implementation with packages but for now is convenient to see if it is a valid package.

This code is put into the lib directory as it does not tie directly into any handlers.

It also adds an functional tests for loading a template. This means we have a way to check if a template is valid in Elasticsearch. Based on this we can check in the future all our generated templates for validity with Elasticsearch.

To run the functional test, go to the Kibana x-pack directory. Start the first command:

```
node scripts/functional_tests_server.js --config test/epm_api_integration/config.ts
```

Keep the above running and switch to an other Terminal. Now run:

```
node scripts/functional_test_runner.js --config x-pack/test/epm_api_integration/config.ts
```

* 40752 rewrite ingest pipeline (#50627)

* Add directory structure for server/lib.

* 'tests' seems to be more common than 'test'

* Make CI happy

* Implement pipeline rewriting.

* Add more testcases

* For posterity (comment change)

* Allow beats-style template delimiters

* Be more succinct

* Document better

* Replace AssetType enum with union type (#50696)

See https://github.com/elastic/kibana/pull/50609#discussion_r346080439

Discussed in Slack and agree to revert for now. Can track down the issues & restore later

* Remove unnecessary await if we can return the promise (#50329)

* Fix whitespace per figma comments. Closes #47348 (#47350)

* Add fix & comment for TS 3.7.2 regression

* [EPM] cleanup assets, filter assets for those currently supported (#50609)

* cleanup assets, filter assets for those currently supported

* removed unused type

* fix type

* add comment for better type

* change type name to be more descriptive

* hardcode image width for ie11 (#49796)

* hardcode image width for ie11

* eslint

* improve comment

* add maxWidth

* [EPM] useKibana hook & render in plugin.start (#50110)

* plugin.start now does reactdom.render vs returning react element

export plugin function from public/index

* Move setClient call from plugin.start to plugin.setup

* Use `useUiSetting$` from `useKibana` hooks

* Fix broken app due to bad hooks usage

Can't use useKibana outside a React component.

Reverting to prior approach since it's still NP. Can revisit context usage in a followup PR

* [EPM] Install package from detail view on button click (#50735)

* Support basic "click button -> show spinner -> installed" install flow

* Remove incorrect comments. Add TS return types to data functions.

* [EPM] Use NP feature_catalogue.register (#50108)

* Use NP feature_catalogue.register

* Use type from NP plugin

* fix linting

* fix types

* fix headers in Fleet

* skipping test due to ES param change

* Revert "skipping test due to ES param change"

This reverts commit d05f20decf.

* remove type field

* remove unused import

* [EPM] Final(?) update from integrations_manager -> EPM (#50976)

* Update (all remaining?) references from integrations_manager to EPM

* Update path in i18n file

* [EPM] update compatibility section (#50975)

* change min max version to single range value

* add elastic stack icon and change text

* remove badge from version and use code font

* remove euistyled

* add back version component lost in merge

* remove euiStyled

* remove old file

* Restore RequirementVersionRange type

* Disable test for elasticsearch username.

Temporary work around until we know how the stack wants to add the permissions we need. Either adding to the kibana user or creating a new user.

* Revert "Disable test for elasticsearch username."

This reverts commit f1020e4eab.

* Disable test for elasticsearch username.

    Temporary work around until we know how the stack wants to add the permissions we need. Either adding to the kibana user or creating a new user.

* Fix EPM typing issues in register feature

* Fix typings after master merge

* [EPM] CI fixes (#51284)

* Initialize es in test.

* Add it(), no es.init()

* Clean up.

* [EPM] add confirmation modal (#51172)

* add confirmation modal, move install state to Header

* update callout to use title

* move components only used in detail view to detail dir

* use better variable names

* update to more descriptive  variable names

* Restore prior response vaulues for install & delete package (#51252)

Discussed this with @skh https://github.com/elastic/kibana/pull/51112#commitcomment-35961413 & https://github.com/elastic/kibana/pull/51112#commitcomment-35970664 as well as in a video call

Also added some TS type annotations for data fetching functions to make the contracts more explicit

* [EPM] /package API only lists installable assets. Restore enums. (#51414)

* API only shows installable assets. Server types to own file. Restore enums

* Fix type imports

* Only return installable asset types (kibana for now)

* server/types now only has code from hapi which shouldn't go to client

* Add more restricted TS types to DisplayAssets object

* Flip order of arguments to Extract

In these cases it still works the same, but looking at https://www.typescriptlang.org/docs/handbook/advanced-types.html the signature is

`Extract<T, U>` - Extract from `T` those types that are assignable to `U`

so the larger set should be first

* [Fleet] Enrollment api key UI (#51495)

* Make button pretty in dark mode as well. (#51610)

* [EPM] Add docs entry about registryUrl config (#51697)

This documentation is at the moment mainly for internal use. I found myself searching for this URL several times in the code or PRs so I thought I rather add it to the docs for now.

* [EPM] Remove encoding of Kibana objects as not needed anymore

* [Fleet] Move agent status server side and API to get aggregated status for a policy (#51673)

* [EPM] Add basic docs around install/delete API endpoint (#51728)

This is mainly for internal usage at the moment to look up.

* Ingest/policy (#51741)

* wip policy

* tweaks

* tweaks

* FIX TYPOS

* WIP move policy => agent config conversion to fleet, WIP policy changed method

* fix tests and bugs

* updates tests and snaps

* more fixes

* use AGENT_POLLING_INTERVAL

* cleanup and fix some formatting

* Update x-pack/legacy/plugins/ingest/server/libs/datasources.ts

Co-Authored-By: John Schulz <github.com@jfsiii.org>

* Update x-pack/legacy/plugins/ingest/server/libs/datasources.ts

Co-Authored-By: John Schulz <github.com@jfsiii.org>

* Update x-pack/legacy/plugins/ingest/server/libs/outputs.ts

Co-Authored-By: John Schulz <github.com@jfsiii.org>

* Update x-pack/legacy/plugins/fleet/server/libs/policy.ts

Co-Authored-By: John Schulz <github.com@jfsiii.org>

* fix things broken by PR review suggestions

* remove unused field

* fix types

* fix mappings

* add datasource mappings

* Fix mappings and remove get full policy from checkin

* Fix ingest api integration tests

* run es-lint to fix fleet

* Fix typescript issues

* [EPM] Track package install state and add toast notification (#51734)

* add notifications from core to plugin

* add package install state hook

* fix type error

* use toMountPoint helper to add jsx to notification

* add warning notification to failed install

* make notifications dependency explicit prop

* move PackageInstall provider lower

* add comment about InstallStatus type overlapping InstallationStatus

* use InstallStatus type in InstallationButton component

* fix type

* [Ingest] Adds support for a working default output (#51841)

* aadding config

* add working settings to the default output

* remove default username and password

* update libs

* [EPM] Add basics for creating the ILM setup (#50474)

This contains the basic objects to setup ILM

* Create index and alias with a write index
* Get the policy

The code does not contain any functional tests yet as it is still open on how to do it best. I suggest to get this in as a foundation and then iterate on top of it.

* [EPM] Add datasource (ingest pipeline) from package (#51851)

## Summary

This mixes a few concerns but I think it's worth it to show the parts working together.

Take a look at the individual commits for a better separation of features.

This adds 
 - the `/datasource/install/{pkgkey}` endpoint which installs ingest pipelines from a package into ES and saves a reference to them in the EPM state Saved Object
 - Connects the "Add datasource" button in the successful installation Toast to the new API
 - Adds a toast notification to inform the user the datasource was added correctly
 - Adds a "Delete Package" button on the details page so we can uninstall a package while we're waiting for the separate view which allows deletes
 - b99eda6 Pushes logic that was in the detail view into `InstallationButton`. This consolidates the logic in one component (or one component & the existing hook) and, iiic, means we can put `<InstallationButton package={...} />` on any view and get the same behavior

I'm marking this as a normal PR so people can merge if they wish

![add-datasource-delete-package-small](https://user-images.githubusercontent.com/57655/69775686-7fb39280-1167-11ea-8d41-e2b8a02252a1.gif)

* [EPM] Add basic processing of fields.yml file (#51148)

The fields.yml is used to generate the Elasticsearch template and Kibana index pattern. This PR adds a very basic implementation of processing the fields.yml and then create an Elasticsearch template out of it. The only fields that are supported at the moment are keyword fields, more will be added as a follow up.

The testing was implemented with a golden file. The output from the method is compared to a json file. If the input is changed or the method is changed, it is possible to regenerate the files with the `-generate` flag as following:

```
node scripts/jest  ./legacy/plugins/epm/server/lib/template/template.test.ts -generate
```

This will allow us to quickly test many inputs / outputs in the future, make adjustments to the existing files and generate the new outputs. We then can compare it in the diff it the changes make sense.

* [EPM] Create basic implementation to merge input template and dataset manifest (#51803)

* [EPM] Create basic implementation to merge input template and dataset manifest

With this code it is possible to take an input template for the agent and merge it with the config variables from the dataset manifest file. Currently only the name and the default value are merged. Later on we must implement to be able to pass user configured variables to it and make decision based on OS selection.

Closing https://github.com/elastic/kibana/issues/51794

* [EPM] Refactoring of lib structure (#51885)

This refactors the structure of lib. As so far all the lib parts are related to assets in the package, it is organised the same way with the same structure. Each directory has its own tests directory if it needs one. This makes it possible to (almost) not need relative paths for tests.

* [EPM] Allow to read files from fields directory (#51958)

This change allows to also extract files from the `fields` directory. Previously this was not possible because it always assumed a service must be there.

* [EPM] Install Elasticsearch Index Template for data source (#51878)

This installs the Elasticsearch index template for each dataset in a package. For now the names are hardcoded based on package key and dataset name but will be more dynamic later on when we pass the full dataset information.

The dataset extractions is a bit "hacky" at the moment and we should get a full implementation of dataset at a later stage and replace this code.

* [Fleet] Policy list, details, create, edit UIs (#51950)

* Set up simple policies list view

* Adjust spec to return single policy

* Set up simple policy details page

* Add demo stats/chart to policy details

* Add description string

* Initial setup of policy form and create policy UI

* Policy create/edit form; integrate policy list api

* Integrate create policy api

* Integrate policy detail, agent status, and policy edit APIs; adjust policy list api integration in agent enrollment

* Fix edit policy mock meta

* Fix policy list search bar

* PR and linting fixes; use typings from ingest plugin

* Fix i18n

* [EPM] Add datasource saved object type (#51871)

## Summary

This PR makes a few assumptions, and contains a lot of refactoring. It might be beneficial to look at the resulting directory structure under `server` first to get the (new) big picture.

Assumptions:
- our API deals with several concerns, for now these are packages and datasources
- we manage our own HTTP API endpoints for these concerns (in particular, don't use the ingest plugin for that)
- we manage (for now) the Kibana saved object in which datasources are saved. importing and calling methods from the ingest plugin to do that down the road will (hopefully) be a manageable change

This led to the following decisions:
- the code is separated into subdirectories by concern, containing all the route handlers and tightly coupled code
- for now, these directories are in `server/packages` and `server/datasources`. I'm tempted to move them into `server/api/{packages,datasources}` but wanted to limit the amount of refactoring in one PR
- shared code lives in `server/lib`
- some code from `server/packages` has been almost duplicated to handle saving to Datasource saved objects, some has been refactored and is used from both places. The deduplication needs further improvement
- maybe `server/registry` should also move under `server/lib` (but see above, I'm trying to not move everything around all at once)

Testing:

* Please note that this is a breaking change because the saved object type for package information
has also been renamed. You'll need to start with a fresh `.kibana-*` index. Restarting `yarn es snapshot` (withouth specifying a data directory) should do the trick.

* Package installation should still work, e.g. with a GET request to `http://localhost:5601/api/epm/package/coredns-1.0.1`. The saved objects for packages can be inspected with a GET request to `http://localhost:5601/api/saved_objects/epm-package/$PKG_KEY`, e.g. `http://localhost:5601/api/saved_objects/epm-package/coredns-1.0.1`
* Datasource creation should still work, e.g. with a GET request to `http://localhost:5601/api/epm/datasource/install/coredns-1.0.1`. The saved objects for datasources can be inspected with a GET to `http://localhost:5601/api/saved_objects/epm-datasource/$PKG_KEY`, e.g. `http://localhost:5601/api/saved_objects/epm-datasource/coredns-1.0.1`

* [Fleet] Expose policy during agent checkin (#51968)

* [EPM] Add /epr prefix to the tar.gz download path (#51881)

The registry slightly changed the .tar.gz path because of download stats reason. This adjusts for it. See https://github.com/elastic/package-registry/pull/169

* [EPM] Move template installation to lib and add asset helper  (#52049)

* [EPM] Move template installation to lib and add asset helper

All the logic related to the installation of the templates for a package should be inside the template library folder. This moves the logic into this folder.

A few refactorings were made to simplify installation:

* Introduction of DataSet interface: This interface is needed to extract the data sets inside a package and install one template per data set.
* Pass package instead of package key to installation process: Passing the package instead of the package key means fetching of package information is decoupled from the installation process and abstracted. This separates the two concerns and should simplify testing.
* getAsssets method: The getAssets methods works on top of the package object to extract asset paths. It is inspired by get_objects methods but supports passing a package and a dataset.

Currently one problem with testing that exists is that to fetch the content of an asset is not decoupled yet.

* [EPM] Reduce data source to one type (#52061)

Between Fleet / Ingest / EPM there had been several interface definitions of Datasource and the related types. This reduces it to one place for the definition. The same applies to the policy definition.

The goal of this is that from now on we all rely on the same definition. If we make changes, we make them in all parts of the code.

In this PR is only the minimal change needed to get us all on one interface. Further changes will be needed that we all rely on the same saved objects etc.

* add export command

* revert 2 more files to rely on export

* revert imports

* Fix types for Datasource Saved Object

* merge in master

* fix type check

* Run VSCode's organize imports on EPM files (#52234)

Learned about it on Slack from https://twitter.com/ryanchenkie/status/1201883268527927301

Blog at https://code.visualstudio.com/updates/v1_23#_run-code-actions-on-save

Basically does the order we've been loosely following (3rd party, then relative) & alphabetic by location and variable name.

It's not customizable but it's reasonable and, afaict, consistent.

* [EPM] More realistic datasource SO. Error if package not installed. (#52229)

* Move cache 'hack' into getAssetsData

* p -> pkg. package is reserved. pkgkey is used in many places

* Remove unnecessary type cast

* Clarify reasons behind asset path manipulation

* Return the Datasource; not the Saved Object.

* Use real values from package in fake datasource SO

* Error if /datasource/install before /package/install

```
> curl --user elastic:changeme localhost:5601/api/epm/datasource/install/coredns-1.0.1
{
  "statusCode": 403,
  "error": "Forbidden",
  "message": "coredns-1.0.1 is not installed"
}

> curl --user elastic:changeme localhost:5601/api/epm/install/coredns-1.0.1
[
  {
    "id": "53aa1f70-443e-11e9-8548-ab7fbe04f038",
    "type": "dashboard"
  },
  {
    "id": "Metricbeat-CoreDNS-Dashboard-ecs",
    "type": "dashboard"
  },
  {
    "id": "75743f70-443c-11e9-8548-ab7fbe04f038",
    "type": "visualization"
  },
  {
    "id": "36e08510-53c4-11e9-b466-9be470bbd327-ecs",
    "type": "visualization"
  },
  {
    "id": "277fc650-67a9-11e9-a534-715561d0bf42",
    "type": "visualization"
  },
  {
    "id": "cfde7fb0-443d-11e9-8548-ab7fbe04f038",
    "type": "visualization"
  },
  {
    "id": "a19df590-53c4-11e9-b466-9be470bbd327-ecs",
    "type": "visualization"
  },
  {
    "id": "a58345f0-7298-11e9-b0d0-414c3011ddbb",
    "type": "visualization"
  },
  {
    "id": "9dc640e0-4432-11e9-8548-ab7fbe04f038",
    "type": "visualization"
  },
  {
    "id": "3ad75810-4429-11e9-8548-ab7fbe04f038",
    "type": "visualization"
  },
  {
    "id": "57c74300-7308-11e9-b0d0-414c3011ddbb",
    "type": "visualization"
  },
  {
    "id": "27da53f0-53d5-11e9-b466-9be470bbd327-ecs",
    "type": "visualization"
  },
  {
    "id": "86177430-728d-11e9-b0d0-414c3011ddbb",
    "type": "visualization"
  },
  {
    "id": "4804eaa0-7315-11e9-b0d0-414c3011ddbb",
    "type": "visualization"
  }
]

> curl --user elastic:changeme localhost:5601/api/epm/datasource/install/coredns-1.0.1
[
  {
    "id": "coredns_1_0_1_dataset_log_elasticsearch_ingest_pipeline_pipeline_plaintext_json",
    "type": "ingest-pipeline"
  },
  {
    "id": "coredns_1_0_1_dataset_log_elasticsearch_ingest_pipeline_pipeline_json_json",
    "type": "ingest-pipeline"
  },
  {
    "id": "coredns_1_0_1_dataset_log_elasticsearch_ingest_pipeline_pipeline_entry_json",
    "type": "ingest-pipeline"
  }
]
```

* fix duplicated imports

* [EPM] Move golden files generation over to jest snapshot (#52203)

* [EPM] Move golden files generation over to jest snapshot

I initially used my own implementation to write the generated files. It runs out jest has a feature to write snapshots which simplifies the code a lot.

I added a loop with an additional test file so in the future we can just keep adding test files without having to modify the test code.

To updated the snapshots, the param `-u` has to be used:

```
node scripts/jest legacy/plugins/epm/server/lib/fields/field.test.ts -u
```

* [EPM] Create metrics-* and logs-* Kibana index pattern (#52277)

This creates the very basic Kibana index patterns metrics-* and logs-* for Kibana. At the moment it is overwritten every time. We need to change this in the future to take the fields from all installed data sources and regenerate it.

* [EPM] Create helper for elasticsearch asset names (#52265)

Most of the Elasticsearch assets have the same base name. This creates a helper to get the base name for the assets. In case we decide to change the base name in the future, we can change it in one place.

* fix tests and destructing

* [EPM] Update Registry types. Prevent errors installing certain datasources. (#52285)

* Update RegistryPackage type

* Use download key from EPR to fetch archive

* Fix errors caused by correcting the Registry types.

The issues were largely that some Registry types like `title, `datasets` and `assets` where marked as required, but are actually optional. This highlighted area in the code were we relied on them always being present.

We added to the issue by wrapping Registry types in `Required` which made those items which were correctly listed as optional, required for EPM code. Updated EPM types to reflect the largely pass-through nature of the EPM types.

There are two properties which we ensure are in every EPM response, those were put into their own (unexported) type.

Confirm by trying to add a datasource to a package which has no datasources, like apache-1.0.1 or system-2.0.1. In `feature-ingest` and the earlier version of this PR, the `/datasource/install` call returns a 500. In this PR it succeeds.

* [EPM] Add setup of default ILM policies (#52272)

This creates two ILM policies: logs-default and metrics-default. These are the default ILM policies used. Currently the policy content is hardcoded in the code but should be fetched from the base package in the future. The setup happens as part of the datasource installation. When a data source is installed it is a good time to check if the assets are there but we might extract this to a better place in the future.

* [EPM] 52075 add data source first page (#52320)

* Update RegistryPackage type

* add first page of add data source

* fix for ie11 flex min width bug

* remove toDetailViewRelative

* remove unneeded spread

* Update TS type names for EPR search results (#52512)


 * `RegistryList -> RegistrySearchResults`
 * `RegistryListItem -> RegistrySearchResult`

* Restore import sort order from #52234 (#52548)

Many of the changes from #52234 were lost. Presumably due to PR(s) merging which were based on branches which had the previous unsorted order.

* [EPM] Replace wildcard export (#52554)


 * PackageNotInstalledError -> packages/index.ts
 * pkgToPkgKey -> registry/index.ts (will convert existing `${name}-${version}` instances later)

* Replace export * from packages.

There's an argument that the import sites should be updated to import from `packages/get`, `packages/install`, etc but that can wait for a later PR.

* [EPM] Reduce usage of epm-package SavedObject (#52576)

* Delete existing Installation type. Rename InstallationAttributes to Installation

* Reduce usage of EPM SO. Add getInstallation().

Replaced two calls of getInstallationObject() with getInstallation().

Two less places with knowledge of SO internals.

Lots of potential improvements for EPM TS types remain (refactoring/removing Installable, etc), but this is a good incremental step, IMO

* [EPM] Fix missing export link (#52628)

Without it, things break. I am surprised CI did not catch this.

* [EPM] Cleanup ILM loading (#52632)

Before the check for the ILM policy to exist triggered an exception. With this change it is a normal response also if the policy does not exist yet.

A follow up issue will be created in Elasticsearch to get a HEAD request for this available.

* [EPM] Switch to staging URL for registry (#52626)

The old cluster with the registry will be removed as soon as this is merged.

* [EPM] Use Dataset interface to generate template (#52255)

This will make sure we have to pass much feature params and can fully rely on the datasource object to create names for assets.

* [Fleet] Use agent events to compute agent health (#52513)

* [EPM] Data source integration tests (#52542)

* Add fixtures for data source integration test.

* Move test setup to beforeEach

* Add test for datasource creation

* Handle pipelines in yml format.

* Make integration test for adding a data source pass.

* Use EPR staging URL with CDN. (#52776)

See https://github.com/elastic/kibana/pull/52626#pullrequestreview-330622868

* [EPM] Add Data Source page updates (#52705)

* remove dupe type RegistryPackage

* change switches to checkboxes, use datasets to create checkboxes, add some local form state

* update types

* [EPM] redirect after package install (#52771)

* add callback after successful installation and redirect

* add temp data sources tab content to access add data source page

* remove assets tab for mvp

* hide data sources link and redirect from data sources tab if package not installed

* change callback name

* remove commented out assets logic

* add redirect to hook

* fix type

* Use ingest datasource api (#52964)

Incremental change. Uses HTTP API for datasource creation. Will do follow-up PR which uses JS function instead

* Remove duplicate fetchInfo & installTemplates

I think this was from a bad merge, but pretty sure we don't want these functions called twice in the same function

* WIP. Pushing so others can see

* Improve correctness/flexibility of absolute URL

* Disable datasource test & template installation

* [Ingest] Data source APIs (#52448)

* Clean up ingest imports and remove unneeded mock_spec files

* Initial pass at datasources lib and API endpoints

* Add add/remove datasource to/from policy API endpoints

* Add datasource contract tests and related policy contract tests; update snapshots

* Fix tests

* Fix tests again

* Fix tests 3

* Adjust routes, PR feedback

* modify epm createDatasource endpoint to use user data (#52971)

* change epm/datasource/install/{pkg} to POST, send user data to endpoint, install pipelines and templates based on user selected datasets

* change test to post for installing a datasource

* change some names and types around

* delete request.headers['transfer-encoding'] being passed through from epm request

* [EPM] Don't share CreateFakeDatasource type (#53068)

It's not shared between client & server so it doesn't need to be in common. Also, it imports server code which would try to bring server types to the client. It's types so they're compiled away but it's important to keep common to what's truly common. Breaking this separation is why we thought enums broke the client. A lint rule just landed in master to prevent this.

* [EPM] Index template generation fixes (#53104)

* Only add keyword type field to mappings.

* Index template installation

* Handle empty fields definition files
* Re-enable index template installation

* [Fleet] Assign/Unassign data source from policy UI (#53058)

* Add index files to export various modules; normalize imports

* Clean up unused files; extract datasources table component from policy details page

* Expose http client to frontend libs; remove unused types; import ES UI's useRequest lib

* Adjust shape of rest api adapter interface to better match with rest of kibana; remove unused node adapter; change per_page param to perPage in agent events route

* Initial pass at assign data sources flyout

* Initial pass at unassigning data sources from policy

* Make data sources table searchable by package values

* Fix enrollment key lib for rest adapter param changes

* Fix imports and types

* `yarn.lock` changes after bootstrapping

* [EPM] Implement getConfig for dataset (#53261)

* [EPM] Implement getConfig for dataset

* Implements a getConfig method on a dataset object. 
* Build the configuration for each dataset in a package.
* construct and save streams into datasource saved object

* [EPM] Fix template installation (#53272)

As dataset.package was not set, the installed templates contained undefined in the template name. This changes fixes this.

* [EM] Refactor ingest pipeline installation (#53309)

* Refactor ingest pipeline installation

* Only install index templates for requested datasets

* Add index.default_pipeline to index template

* Hook up pipeline rewriting

* Add correct types.

* change POST create datasources path (#53165)

* change POST create datasources path

* remove pkgkey from params

* Fix creation of a data source with a custom ID (#53537)

* [Ingest] Return associated policy IDs in data source info (#53350)

* Return number of policies from data source, surface in assign data source UI

* Update snapshots

* [EPM]: Assign data source to policy in UI (#53597)

* Let ES generate source ids. Refactor along the way.
* Datasource.id isn't optional. It's just missing before we send to Ingest
* Delete EPM's mapping of datasources saved object. Ingest handles that.
* Keep datasource object-related work in constructDatasource
* Move asset installation into own function. Keep entry point high-level.
* More descriptive (less ambiguous) names for these two functions
* Use enum values from Ingest instead of plain strings
* Limit the 'type' key of references to known asset types.
* Update variable names to clarify that we're merging arrays of references
* Use [].flat instead .reduce + .concat to avoid error on empty arrays.
* Pass PackageInfo value directly to component vs pulling off n properties
* Name handlers/options based on the data, not the UI element
* Populate policy combo box based on values from Ingest policy API
* Mark Dataset.vars as optional.
* Add TODOs

* Add commands to run API tests to README (#53847)

* Limit functions to 3 params max. Update those which used more (#53848)

* [EPM] Code in 'common' directories shouldn't import server code (#53854)

* [Fleet] Code in 'common' directories shouldn't import server code (#53938)

* [Fleet] Remove server code from common folder in fleet
* [Fleet] Fix typescript issues after master merge
* [EPM] Fix typescript issues after master merge

* Fix eslint issues

* Fix typescript issues after merge

* Fix merge master missing line

* Fix merge conflict

* [Fleet] Fix registration of Ingest management section (#54065)

* Fix registration of Ingest management section

* Fix i18n key

* [Fleet] Remove server code from common folder in ingest (#53969)

* [Fleet] Connect fleet to policy change update (#53201)

* [Fleet] Send created event when a policy is created
* [Fleet] updated created event when a policy is created
* [Fleet] Send deleted event when a policy is deleted

* [Fleet] Rename output.url => output.hosts (#54258)

* [Ingest] Remove policies UI (#54308)

* Remove meta field UI from policy add/edit form

* Initial pass at policy bulk+single delete UI and API

* Adjust policy links from agent list and detail pages so that links are only active if policy exists

* Add delete policy UI to policy detail page

* Disable policy delete button for default policy

* Commit updated kbn-pm artifact.

CI is failing with messages like
14:52:28  ERROR: 'yarn kbn run build -i @kbn/pm' caused changes to the following files:
14:52:28
14:52:28  packages/kbn-pm/dist/index.js

Following advice from https://elastic.slack.com/archives/C0D8P2XK5/p1570032166063400 and running/committing build

* Update kbn/pm package

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>

* [EPM] create logs metrics index patterns (#54037)

* fixes bug in for loop returning too early and not looping through all yaml files creating incomplete index template, move loading yaml files to own function, other cleanup

* use reduce in place of for loop

* basic functionality for creating index patterns

* separate logs and metrics index patterns

* dedupe fields

* adjust flattenFields to rename nested fields with parent name path

* some tests

* use yml files for tests

* add awaits as part of installing the package

* optimize loading of yaml files

* fix typo

* change type packageName to package

* update tests to use all files from the beginning

* fix type errors

* fix test

* Use dataset.package from registry

https://github.com/elastic/kibana/pull/54037#pullrequestreview-340362812

* Form validation on add datasource page. (#53920)

* [Ingest] Add support for policy `label` field (#54413)

* Allow `label` field in policy APIs, update UIs to support `label` field

* PR review changes, typo fixes, update tests

* [Fleet] Fix api key creation (#54498)

* [Fleet] Move agent acks to his own endpoint (#54401)

* [Ingest] Fix MaxListenersExceededWarning during kibana boot (#54745)

* [Fleet] Create a default api key for the default output (#54658)

* [EPM] update index pattern fields (#54862)

* add DatasetType type

* move loadFieldsFromYaml to fields

* add logic to determine field values

* update tests

* add back accidentally removed readFromDocValues

* remove DatasetType and add IndexPatternType

* rename dedup to dedupe

* group tests

* use null coalescing operator

* Fix typing issues

* [Fleet] Support agent event subtype STOPPING (#55231)

* [EPM] Prevent double submit when creating data sources

Update installationRequested state after submit (#55100)

* [EPM] handle alias fields when creating kibana index pattern (#55254)

* add alias support, update flattenFields to handle alias copying, update and add tests

* update snapshot

* update findFieldByPath to return undefined if not leaf node

* remove temporary alias type from map

* [EPM] handle multi fields when creating index patterns (#55554)

* handle mult_fields

* move nested function out

* [Fleet] Fleet/spec docs (#55619)

* [EPM] Start to document definitions (#55361)

This is a first stab at creating a place where we define the terms we use across ingest management. This is not complete but defines a place where we can add all the future defintions.

* [EPM] Indexing strategy docs (#55301)

* [EPM] Indexing strategy docs

This documentation is to start documenting our new indexing strategy in a public place and have it versioned. This will allow us to share the current state of the indexing strategy more easily in a single place, track it when updated and also already have it ready for our future users to look it up and understand the benefits of it.

* update typos

* fix one more typo

* apply review feedback

* skip fields that are disabled (#55735)

* [Fleet] Fix fleet typing issues after merging master

* [EPM] Create fieldFormatMap in kibana index pattern (#55892)

* add support for fieldFormatMap

* output params must be camel case

* fix case

* add url_template param

* [Fleet] Use user from saved object to create apiKeys (#55458)

* [EPM] Document package upgrade behaviour (#56138)

This PR adds more detailed documentation on what should happen when a package is upgraded.

* Remove some explicit typing to pass type checks.

This abstraction will be removed in the single plugin going into master.

* remove readFromDocValues (#56227)

* Add symlink to yarn.lock to fix(?) CI

https://github.com/elastic/kibana/pull/56443/checks?check_run_id=418123781 failed saying EPM directory "MUST have a 'yarn.lock' symlink"

Seems to have originated with https://github.com/elastic/kibana/pull/55440

Following example from other legacy/plugins/* in that PR

* Like 441d9ed, but correct

* [Ingest] Convert `ingest` plugin to new platform `ingest_manager` plugin (#56262)

* Seed Ingest Manager as a new NP plugin

* Add contexts for core, deps, and config. Begin routing and nav UI

* Export NP ready request from top-level es_ui_shared/public/

* Add nav styling w/ theming, add useRequest hook

* Set up license and config server-side services; add test routes

* Move most types and constants into /common

* Initial pass at:
* data stream and agent config models
* data stream routes and schemas

* Initial pass at agent config api route handlers

* Change plugin id to camel case

* Fix circular schema dependency, add security as optional plugin

* Create appContext service, use request user info in agent config routes + libs

* Create default agent config

* Add default output host config, output typings, and create default output and its api key

* Move saved object mapping to new plugin

* Change data streams -> datasources

* Add legacy plugin to bootstrap mappings

* Adjust fleet's ingest dependencies

* Disable policies UI in Fleet

* Adjust EPM's ingest dependencies

* Adjust ingest manager base API route

* Adjust fleet's client side ingest dependencies

* Remove more ingest dependencies from fleet

* REMOVE MOST OF LEGACY INGEST PLUGIN

* Add section for agent configs in UI nav

* Allow useRequest and sendRequest consumers to specify typing for response

* Initial pass at porting over agent config list UI

* Port over agent config creation

* Port over delete agent config functionality

* Fix app routing

* Port over fleet setup routes

* Adjust fleet's ingest dependencies

* Make fleet happy path work, skip some tests (MESSY! :))

* Remove policy list UI code from fleet

* Change useRequestResponse error type

* Add missing agent config schemas and hooks

* Fix type check issues

* Register IM under management

* Fix type issues as a result of changes to use/sendRequest interfaces

* Make all ingest saved objects *not* space-aware

* Fix i18n path

* Fix app categories import

* Fix datasource package assets schema (array of asset objects)

* Seed Ingest Manager privileges to fix tests

* Change `features` to optional plugin instead of required

* Fix security privileges tests

* Fix feature test

* Fix duplicate enrollment key created for default agent config

* Fix fleet agent enrollment by catching agent config 404

* PR feedback

* [Fleet] Detailed docs of fleet <-> agents interactions (#56212)

* [EPM] update index patterns on install/uninstall of package (#56591)

* create index patterns functionality on install/uninstall of package

* update snapshots

* [Fleet] Generate an ES api key per agent per output (#56637)

* [Fleet] Remove unused enrollement rules (#56753)

* remove files related to creating data source (#56745)

* Fix typing issues after mergin master

* Fix api key authentication after master merge

* [EPM] NP Migration: Move server files and route handlers to ingest_manager (#56854)

* initial pass moving registry and categories endpoint

* moves all needed server files and gets list endpoint working

* add route list validation schema

* remove epm config

* use config to get the registryUrl

* clean up registry url

* gets file endpoint working

* add info endpoint

* get install package endpoint working

* support uninstall package endpoint

* add API response types

* move epm types to models

* move AssetType to IngestAsset type from ingest plugin

* remove redundant export

* update epm_api_integration tests to new endpoint paths in ingest manager

* fix imports

* [Ingest Management] Change indexing from {type}-{namespace}-{dataset} to {type}-{dataset}-{namespace} (#56132)

Currently we have the indexing strategy defined as `{type}-{namespace}-{dataset}`. In this PR I propose to change this to `{type}-{dataset}-{namespace}`. As all 3 fields are constant keyword fields, the orders does not matter in most cases.

The reason I propose this change is to better align the name of indices with the name of the other assets:

* ingest pipeline: {type}-{dataset}
* index template: {type}-{dataset}
  * Index pattern: {type}-{dataset}-*
* alias name: {type}-{dataset}-{namespace}

This makes it easier to remember the asset names conventions (at least for me).

It makes a difference when specifying security per namespace: To lock down security, previously it is `/(logs|metrics)-prod-$/` and becomes `/(logs|metrics)-[^-]+-prod-$/`. In any case, we should help / assist the user to get this right.

* [EPM] Remove epm plugin and directory (#57309)

* delete server files, move over epm saved object schemas and mapping, stop epm plugin loading in xpack

* updated yarn

* change to updated name

* remove epm dir, copy readme to ingest_manager

* move package.json over and update yarn.lock

* update package name

* add yarn.lock symlink

* fix yarn.lock symlink

* remove epm from security privileges map

* remove epm from feature endpoint and i18nrc

* [Fleet] Move fleet to the new platform and to ingest_manager plugin (#56803)

* [Fleet] NP migration public part (#57567)

* [EPM] EPM to new plugin, UI part (#56882)

* Move EPM home / list view over to ingest-manager

* Use react-router-dom in epm section.

* WIP: add package detail view.

* Use correct route.

* Only import needed types to public

* Remove obsolete file.

* Import type correctly

* Revert "Remove obsolete file."

This reverts commit 4b061102ebc62b49e7d1291060405ea8d23a3a8a.

* Routes are still needed, fix them.

* Import types correctly

* More type import fixes.

* update get categories hook

* remove no longer used getCategories function

* get list packages hook working

* delete routes.tsx, cleanup links

* add the usePackageInstall hook

* replace rest of api calls with use/send request

* remove tmp_routes

* bring over breadcrumbs

* remove comments and get styles working

* get ride side col loading

* temp type fix

* remove useCore

* add assets

* remove comment

* add public directory to legacy ingest_manager and update asset path

* Fix PackageInfo type. Use for API & UI vs a saved object type.

The `as PackageInfo` cast was required because the pipeline was typed as returning `Installed | NotInstalled` which are saved object response.

Updating that to PackageInfo allows the `as` to be removed but revealed an incompatibility between the `assets` properties of RegistryPackage and PackageInfo

```
Types of property 'assets' are incompatible.
  Type 'Record<"kibana", Record<KibanaAssetType, KibanaAssetParts[]>>' is missing the following properties from type 'string[]': length, pop, push, concat, and 28 more.
```

It seems the `RegistryPackage & PackageAdditions` didn't cause the PackageAdditions.assets to replace the RegistryPackage.assets property.

I changed the definition of PackageInfo to do what I initially thought it was doing. See comments in models/epm.ts for more about how the new type is constructed.

* remove comment

* fix paths

* fix public paths

* fix path

* remove ui types file

* fix types

Co-authored-by: Sandra Gonzales <neptunian@users.noreply.github.com>
Co-authored-by: John Schulz <github.com@jfsiii.org>

* [Fleet] AgentEvent change agent_id and remove data (#57818)

* Remove legacy `ingest` plugin completely (#58056)

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

* WIP. 1 type error (but >1 bugs) remaining.

* Add `callCluster` accessors for using ES vs appContext.getClusterClient()

* Undo (?) changes to kbn-pm/dist/index.js

* Run scripts/build_renovate_config for @types/tar

* Replace data w/ agent_id in server schema

* Different way to declare a saved object type

* Use a more specific path to the agent script

* Replace data with agent_id for agent checkin

* Restore internalSavedObjectsClient in app context

* Use project & HTTP TS types in scripts/dev_agent

* Remove ingestManager from FTR features

The plugin is disabled by default and not currently running the FTR tests. I believe we'll add this back when we restore the EPM integration tests.

* Move more variables to common/{constants,types}

* Remove ingestManager from default expected features

* Enable conditional routes. Adjust integration tests

EPM routes currently return a 500 for these tests. For now they `.expect(500)` when enabled and `.expect(404)` when disabled. We can look into the issue and get them to `.expect(200)` in later tests.

* Replace React.FC with React.FunctionComponent following new repo pattern

* Enable Fleet & Ingest FTR tests

* Remove duplicate *Response entries from server/types

* Update README instructions for CLI flags. Rearrange sections (#58363)

* Add instructions for CLI flags. Rearrange sections

Also added some more information about the plugin behavior with links to relevant code

* Add instructions for Ingest & Fleet FTR tests

* Restore search to EPM list page

* [Fleet] Allow to configure CA sha for kibana and elasticsearch (#58186)

* [Ingest] Adjust saved object mappings and rename policy -> config (#58670)

* Replace all reference to (agent) "policy"/"policies" with "config"/"configs"

* Adjust output and datasource saved object mappings

* Update schemas and types to match SO changes

* Fix type check

* Adjust default output object

* Fix property names in tests

* Move installing of index templates and ingest pipelines to package installation (#58619)

* update template and pipeline asset names, install on package install

* fix package install error handling messaging

* save references to installations to package saved object

* add epm.enabled flag for epm functional test runner

* don't add suffix to pipeline entry

* [Fleet] Add a schema of all of our saved objects (#58769)

* [Fleet] Do not use default id for saved objects that need to be encrypted (#57876)

* Adding events for index pattern generation (#58908)

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

* Fix yarn.lock after merge

* [Fleet] create agent config before enabling fleet user (#59166)

* support for top level elasticsearch assets installation (#58869)

* add support for ilm policy installation

* check if ilm policy exists

* handle prebuilt index templates, update tests

* cleanup

* update type in install

* fix installing index templates to create multiple ones for inheritance

* [Fleet] Create default output while creating default config (#59223)

* Use the new definitions from package-registry#176 (#59311)

* [Fleet] Remove our custom API key authentication  (#59212)

* [Ingest] Full agent config schema & API (#59262)

* Add schema for full agent config and business logic to convert SO agent config -> full agent config

* Adjust output properties in full agent config

* Whitelist full agent config output fields

* [Fleet] UI Agent enrollment flyout (#58524)

* Use POST vs GET for EPM install & remove (#59367)

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

* install default packages during setup (#59330)

* install default packages during setup

* check if package is already installed

* [Ingest] Updates to Agent Configuration List UI (#59374)

- Added search bar
- Sync of columns to design
- Actions per row in popup menu
- Connect pagination and per-page count to API request
- Support for `kuery` url param

* Update docs from /api/:section to /api/ingest_manager/:section (#59422)

* [EPM] Add Streams TS type to mirror EPR's (#59446)

* Add Streams TS type in EPM to mirror EPR's

Follows the changes add in https://github.com/elastic/package-registry/pull/230/files#diff-7dea786222588c32c19238bffffee9c2

* Add RegistryPackage.datasources

* Add more detailed shape for Registry Vars

* Don't code in modify src/plugins/management

See PR convo at c47975535f (r389042975)

* [Ingest] Add agent counts to each agent config output of `/agent_configs` API  (#59552)

* Added agent counts to getAgentConfigsHandler
* Show agent counts on Agent Config List

* [Fleet] Agent list header (#59487)

* [EPM] Use /packages & /packages/{pkgkey} (#59550)

* Use /packages & /packages/{pkgkey}

* Update paths in skipped tests

* Docs use /packages vs /package/{install,delete}

Some copy & code sample changes.

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

* [Ingest] Design sync for Agent Configuration Create Flyout (#59479)

* Match form to design
* Support URI route param to open flyout

* [Ingest] Create data source step 1 & 2 (#59590)

* Add Error and PackageIcon components

* Add create datasource layout+navigation, and select package step

* Add description field to datasource, remove assets and description from datasource package

* Add temporary datasources typing for EPM package info

* Initial pass at configure datasources step. Stream vars only (no input vars yet)

* First pass at input vars config; separate components

* Fix issue with adding more than one datasource to a config

* Add shell review step; save datasouce

* Remove assign/unassign datasource from agent config details UI, replace with add datasource buttons

* Remove actions column from datasource table

* Initial pass at create datasource from package

* Move package to config service to /common, add tests

* Rename VarsEntry to RegistryVarsEntry, add datasets and datasources to RegistrySearchResult definition

* Add typings to create datasource flow

* Add real count of agents to select agent config list

* Ensure the necessary package is installed at time of datasource creation

* Use lowercase pkgkey for consistency

* Update EPM file path to use /packages (#59693)

* fixed header padding (#59711)

* [EPM] Use icons from packages, if present (#59765)

* [Ingest] Create data source step 3 (#59822)

* Make app setup loading state prettier

* Add review step of datasource wizard

* Change name to ID in agent config datasources field

* Fix types

* Add stored datasource to agent datasource unit tests

* Adjustment of registry typings and which registry copy fields to show to sync with elastic/package-registry#242

* Fix `multi` vars not populating with array: elastic/kibana#59724

* Account for if a stream is enabled by default from registry package definition: elastic/kibana#59724

* Adjust tests to account for last two commits

* Fix review page back link

* Fix d'oh typo

* [Ingest] Agent Config Details header and sub tabs navigation (#59783)

- Syncs Agent Config Details header to design
- Includes sub navigation tabs connected to route URL
- Agent Config List Create data source row action enabled

* [Fleet] update agent list UI (#59685)

* [Fleet] ensure default packages are added to the default config (#59759)

* [Fleet] fix output rename api_token => api_key (#60001)

* [Ingest] Address #59376 feedback (#59961)

* Disable create/destroy CTAs if no write capability

Use `core.application.capabilities.ingestManager.write` to test user permissions

* Add -all & -read tags for HTTP routes

* Update test .expect() to match description

* Add useCapabilities hook. Fix two issues with hiding/disabling CTA.

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

* Missed one in e12a8ad8a4

* Use package icon as default when no other can be found (#60025)

* Remove duplicate xpack setting

FTR tests failing to start ES with error

```
ERROR ERROR: setting [xpack.security.authc.api_key.enabled] already set, saw [true] and [true]
```

https://github.com/elastic/kibana/pull/59376/checks?check_run_id=503930031 & https://github.com/elastic/kibana/pull/59376/checks?check_run_id=503975576 etc

It appears the xpack.security.authc.api_key.enabled flag was recently added to master in another part, so remove our instance of the setting to prevent the error

* Update EPM file tests to use /packages/{pkgkey}

These should have failed when the routes were changed. Will go back and see what happened.

* [Ingest] Add `revision` to agent configs & data sources (#59848)

* Add revision to agent config and datasource saved objects, add delete datasource service and datasource

* Add revision to full agent config output

* PR feedback

Co-authored-by: Sonja Krause-Harder <sonja.krause-harder@elastic.co>
Co-authored-by: Nicolas Ruflin <spam@ruflin.com>
Co-authored-by: Sandra Gonzales <neptunian@users.noreply.github.com>
Co-authored-by: Matt Apperson <me@mattapperson.com>
Co-authored-by: Nicolas Chaulet <nicolas.chaulet@elastic.co>
Co-authored-by: Nicolas Chaulet <n.chaulet@gmail.com>
Co-authored-by: Matt Apperson <matthew.apperson@elastic.co>
Co-authored-by: Jen Huang <its.jenetic@gmail.com>
Co-authored-by: Brian Seeders <brian.seeders@elastic.co>
Co-authored-by: Tyler Smalley <tyler.smalley@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: neptunian <sandra.gonzales@elastic.co>
Co-authored-by: Jonathan Buttner <56361221+jonathan-buttner@users.noreply.github.com>
Co-authored-by: Paul Tavares <56442535+paul-tavares@users.noreply.github.com>
Co-authored-by: Henry <henry.harding@elastic.co>
2020-03-12 18:52:06 -04:00
Brandon Kobel 728d073c12
Using re2 for Timelion regular expressions (#55208)
* Using re2 for Timelion's regexs

* Patching native modules

* Restructuring to be more generic

* Fixing download_node_builds_task tests

* Updating linux sha after properly gzipping the archive

* Using a Centos7 machine with devtoolset-6. That's what node does

* Using new archives which Travis built for us

* Not using a standard import to prevent Kibana from not starting up

If the "portable" version of RE2 for some reason isn't truly portable
and can't load, we don't want to prevent the rest of Kibana from working
properly. This will only prevent Timelion from working, which isn't
great, but is less worse

* Isolating the require even further

* Detecting the package version mismatches, thanks Larry!

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-12 11:38:53 -07:00
Larry Gregory fbbf580156
Revert less update (#59852)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-11 15:27:30 -04:00
Brandon Kobel 29eda20237
Updating svgo -> css-tree -> mdn-data, all so we get mdn-data > 2.0 (#58913)
* Updating svgo -> css-tree -> mdn-data, all so we get mdn-data > 2.0

* fix extra entry in yarn.lock file

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-03-10 12:17:48 -07:00
Spencer c874df1847
update typescript version in all packages to avoid warnings (#59787)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-03-10 11:37:02 -07:00
marshallmain 435cb0b959
[Endpoint] Sample data generator for endpoint app (#58936)
* scaffolding and notes.md

* add skeleton event generator to kibana

* add optional entityID param to generateEvent

* add tree generation

* add tests

* working tests

* fix up tests

* fix linting

* fix event types

* make process parent types consistent

* make generator match types

* move test resolver node out of common types

* fix random string generation

* fix typecheck errors

* remove extraneous stuff

* address PR comments

* add test for full resolver tree

* cleanup

* make tests clearer

* add seedrandom to endpoint plugin. contains DONOTMERGE example code

* remove robs test

* start replacing random with seedrandom

* use seeded random for uuidv4

* separate out IP randomization

* typecheck fixes

Co-authored-by: oatkiller <robert.austin@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-10 12:31:57 -04:00
Larry Gregory 914df7996d
Update misc dependencies (#59542)
* update deps

* updating to @hapi/good-squeeze

* consolidate fast-safe-stringify deps

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-10 08:19:14 -04:00
Thomas Watson a663f65bcc
Harden creation of child processes (#55697)
Add general protection against RCE vulnerabilities similar to the one
described in CVE-2019-7609.

Closes #49605
2020-03-10 07:51:57 +01:00
Chandler Prall 096dda6f34
Upgrade EUI to v20.0.2 (#59199)
* Updated EUI to 20.0.1; updated typescript usage

* snapshots

* Upgrade to eui 20.0.2, fix one more type

* PR feedback

* Update EUI icon usage to the correct types

* Updated with master
2020-03-05 12:27:52 -07:00
Oliver Gupte 5539d6955f
[APM] Service Map Layout (#59020)
* Addresses #55544.
- uses the core breadthfirst cytoscape layout
- rotates elements by -90degrees
- selects rum nodes as roots
- implements hover styles to show connected nodes
- fixes flash of unstyled cytoscape elements on initial load

* PR review feedback

* adds canned response for testing cytoscape layout in storybook

* update dep snapshot for removing cytoscape-dagre
2020-03-03 18:26:28 -08:00
Spencer bb6fd0bf4f
[kbn/optimizer] fix ui/* url rewrites in dist (#58627)
* [kbn/optimizer] fix ui/* url rewrites in dist

* add tests to verify styles are built correctly and ui-rewrites are happening

* clarify change to dirs creation

* create tested & shared parsePath helper

* update renovate config

* split implementation of parsePath for dir and file paths

* switch to valid css property

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-02 15:15:44 -07:00
Maja Grubic b7c8e3a252
Dashboard a11y tests (#58122)
* adding comprehensive dashboard tests

* fixing delete and adding dima changes

* Fixing some of the a11y test failures

* Fixing i18n issue

* Extracting exit fullscreen logic in a separate function

* Fixing typo

* Upgrading axe

* Fixing failing jest tests

* Removing main tag as it was causing a test to fail

* Adding focusable=false to a range control as well

* Update test/accessibility/apps/dashboard.ts

Co-Authored-By: Michail Yasonik <michail.yasonik@elastic.co>

* Fixing linting error

* Update src/legacy/core_plugins/input_control_vis/public/components/vis/list_control.tsx

Co-Authored-By: Michail Yasonik <michail.yasonik@elastic.co>

* Add comments

Co-authored-by: Bhavya RM <bhavya@elastic.co>
Co-authored-by: Michail Yasonik <michail@yasonik.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-02 20:56:07 +00:00
Spencer a3e68a1830
Revert "[SIEM] apollo@3 (#51926)" and "[SIEM][CASE] Init Confi… (#58806)
* Revert "[SIEM] apollo@3 (#51926)"

This reverts commit 320e292ea8.

* Revert "[SIEM][CASE] Init Configure Case Page (#58121)"

This reverts commit 967bef7b38.

* update a snapshot...
2020-02-28 11:42:34 -07:00
patrykkopycinski 320e292ea8
[SIEM] apollo@3 (#51926) 2020-02-27 09:25:37 +01:00
Wylie Conlon 07fec2f725
Documentation for numeral pattern formatting (#57616)
* Documentation for Elastic Numeral formatting

* Tweaks from feedback

* Updates from feedback

* Fix and update examples

* Add TODOs

* Fix typo

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-26 14:17:59 -05:00
patrykkopycinski 418c44a47e
[SIEM] Fix unnecessary re-renders on the Overview page (#56587) 2020-02-25 15:00:50 +01:00
MadameSheema 1a15d3ae83
[SIEM] Upgrades cypress to version 4.0.2 (#58400)
* upgrades cypress to version 4.0.2

* fixes failing tests
2020-02-25 09:05:22 +01:00
renovate[bot] 8ccbe87069
Update dependency @elastic/charts to ^17.1.1 (#57634) 2020-02-21 14:49:48 -06:00
Brandon Kobel c91b6ceebc
Updating to @elastic/lodash@3.10.1-kibana4 (#54662)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-21 07:27:40 -08:00
Joe Portner 2c78be3d44
Upgrade yargs (#57720) 2020-02-19 11:16:17 -05:00
Spencer 7cf33c14dd
[@kbn/optimizer] rewrite url(ui/*) in legacy scss files (#57869)
* [@kbn/optimizer] rewrite url(ui/*) in legacy scss files

* update kbn/pm dist
2020-02-18 12:43:55 -07:00
Kerry Gallagher 0a6c748cc8
[Logs / Metrics] New Platform migration (full cutover) (#54583)
* Fully migrates metrics and logs to the NP

Co-authored-by: Jason Rhodes <jason.matthew.rhodes@gmail.com>
Co-authored-by: John Schulz <github.com@jfsiii.org>
Co-authored-by: Felix Stürmer <weltenwort@users.noreply.github.com>
2020-02-18 19:22:27 +00:00
Lukas Olson f2478100ab
Revert switching abort controller libraries (#57216)
* Revert switching abort controller libraries

* Revert package.json in lib

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-18 11:19:07 -07:00
patrykkopycinski ad5daba2ea
[SIEM] Replace AutoSizer with use-resize-observer (#56588) 2020-02-18 14:53:31 +01:00
patrykkopycinski f4d29abf1c
Bump redux dependencies (#53348) 2020-02-17 09:58:54 +01:00
Dmitry Lemeshko 95b713e69d
update chromedriver to 80.0.1 (#57602)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-15 00:43:32 +01:00
Greg Thompson 0abfd3c72f
Upgrade EUI to v19.0.0 (#57284)
* eui to v19.0.0

* typescript updates; idAria removal

* src snapshot updates

* mock euicode and euicodeblock for jest

* x-pack snapshot updates

* mock euicode for jest

* more euicode snapshots

* mock euicode in storyshots

* types/enzyme yarn.lock

* sidenav type update
2020-02-14 13:06:31 -06:00
Robert Austin a790f61460
Resolver: Animate camera, add sidebar (#55590)
This PR adds a sidebar navigation. clicking the icons in the nav will focus the camera on the different nodes. There is an animation effect when the camera moves.
2020-02-14 09:41:22 -05:00
Spencer 4e8ab56497
build immutable bundles for new platform plugins (#53976)
* build immutable bundles for new platform plugins

* only inspect workers if configured to do so

* [navigation] use an index.scss file

* add yarn.lock symlink

* set pluginScanDirs in test so fixtures stay consistent

* cleanup helpers a little

* fix type error

* support KBN_OPTIMIZER_MAX_WORKERS for limiting workers via env

* test support for KBN_OPTIMIZER_MAX_WORKERS

* expand the available memory for workers when only running one or two

* add docs about KBN_OPTIMIZER_MAX_WORKERS environment variable

* fix README link

* update kbn/pm dist

* implement bundle caching/reuse

* update kbn/pm dist

* don't check for cache if --no-cache is passed

* update renovate config

* standardize on index.scss, move console styles over

* add support for --no-cache to cli

* include worker config vars in optimizer version

* ignore concatenated modules

* update integration test

* add safari to browserslist to avoid user-agent warnings in dev

* update docs, clean up optimizer message/misc naming

* always handle initialized messages, don't ignore states that are attached to specific events

* reword caching docs, add environment var to disable caching

* tweak logging and don't use optimizer.useBundleCache as that's disabled in dev

* handle change notifications

* batch changes for 1 second

* rename CompilerState type to CompilerMsg

* getChanges() no longer needs to assign changes to dirs

* remove unused deps

* split up run_worker.ts and share cacheKey generation logic

* add a couple docs

* update tests and remove unused imports

* specify files when creating bundle cache key

* remove one more unused import

* match existing dev cli output more closely

* update kbn/pm dist

* set KBN_NP_PLUGINS_BUILT to avoid warning in CI

* avoid extending global window type

* add note to keep pluginScanDirs in sync

* pass browserslistEnv in workerConfig so it is used for cache key

* load commons.bundle.js in parallel too

* emit initialized+success states if all bundles are cached

* load bootstraps as quickly as possible

* skip flaky suite

* bump

* update jest snapshots

* remove hashing from cache key generation

* remove unnecessary non-null assertion

* improve docs and break up Optimizer#run()

* remove unused import

* refactor kbn/optimizer to break up observable logic, implement more helpful cache invalidation logic with logging

* fix tests

* add initializing phase

* avoid rxjs observable constructor

* remove unnecessary rxjs helper, add tests for bundle cache

* update consumers of optimizer

* update readme with new call style

* replace "new platform" with "kibana platform"

* fix a couple more renames

* add support for several plain-text file formats

* fix naming of OptimizerMsg => OptimizerUpdate, use "store" naming too

* one more OptimizerMsg update

* ensure bundles are not cached when cache config is false

* test for initializing states and bundle cache events

* remove unnecessary timeout change

* Remove unnecessary helpers

* Add tests for BundleCache class

* Add tests for Bundle class

* test summarizeEvent$

* missing paths are no longer listed in mtimes map

* add tests for optimizer/cache_keys

* Add some extra docs

* Remove labeled loop

* add integration test for kbn-optimizer watcher components

* querystring-browser removed

* tweak logging a smidge, improve info and final message

* remove unused imports

* remove duplication of getModuleCount() method

* move type annotation that validates things

* clear up the build completion message

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-12 19:42:42 -07:00
Alexey Antonov deda49e9f0
[ui/utils/query_string]: Remove unused methods & migrate apps to querystring lib (#56957)
* replace querystring (querystring-browser) -> query-string

* QueryString remove encode/decode methods

* remove query_string file

* remove querystring-browser from package.json

* add kibana_utils\url module

* cleanup

* update notice.txt

* fix merge conflict

* fix CI

* fix wrong import

* fix CI

* fix X-Pack firefox smoke test

* remove urlUtils.parseUrlQuery

* remove url.stringifyUrlQuery

* use url.encodeQuery

* Record<string, any> -> ParsedQuery

* Update src/plugins/console/public/application/containers/editor/legacy/console_editor/editor.tsx

Co-Authored-By: Luke Elmers <lukeelmers@gmail.com>

* add more tests for APM

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Luke Elmers <lukeelmers@gmail.com>
2020-02-12 19:51:03 +03:00