Commit graph

34183 commits

Author SHA1 Message Date
pgayvallet e48f3ad6a4 rename legacy client mocks 2020-06-30 23:06:41 +02:00
pgayvallet 71a27bb886 fix default port logic 2020-06-30 20:49:52 +02:00
pgayvallet 5a3fd9cea1 migrate version_check to new client 2020-06-30 17:15:19 +02:00
pgayvallet 41564116b7 more doc 2020-06-30 13:50:45 +02:00
pgayvallet 93d05ee8b3 add transport.request 2020-06-30 13:35:45 +02:00
pgayvallet c7ae6aad65 export client types 2020-06-30 13:30:57 +02:00
pgayvallet 2c5a48910d fix mock type 2020-06-30 13:19:11 +02:00
pgayvallet 73f68b8f1f wire new client to service & update mocks 2020-06-30 13:16:14 +02:00
pgayvallet f268e63bb7 rename currently unused config/client observable 2020-06-30 11:58:56 +02:00
pgayvallet b8935d7c09 rename legacy client to legacy in service 2020-06-30 11:45:53 +02:00
pgayvallet 193fecc80d fix API usages 2020-06-30 11:07:39 +02:00
pgayvallet c7a2cf1149 add some doc 2020-06-30 10:48:05 +02:00
pgayvallet 8c6c9fc938 add new client mocks 2020-06-30 10:29:51 +02:00
pgayvallet eecd780a3a add exports from client 2020-06-30 09:38:01 +02:00
pgayvallet cfa547a9c3 Merge remote-tracking branch 'upstream/master' into kbn-35508-add-new-es-client 2020-06-30 08:41:38 +02:00
pgayvallet 024f3dfd3d add back keepAlive 2020-06-30 08:41:09 +02: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
Mikhail Shustov 159369b719
Use ts-expect-error in platform code (#69883)
* ts-ignore --> ts-expect-error

* fix error with mutable array

* fix errors in consumers code

* update SOM

* fix FeatureConfig & Feature compatibility

* do not re-export from code. it breaks built version

* update docs

* add eslint rule for platform team code

* remove test. this is covered by ts-expect-error in unit tests

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-30 07:37:42 +02:00
Frank Hassanabad 7144db201f
[SIEM][Detection Engine][Lists] Moves getQueryFilter to common folder for use by both front and backend
## Summary

* Moves querying and tests from server to common

The function we are interested using on the front end is:

```ts
export const getQueryFilter = (
  query: Query,
  language: Language,
  filters: Array<Partial<Filter>>,
  index: Index,
  lists: ExceptionListItemSchema[]
) => {
```

### Checklist

- [x] [Unit or functional tests](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) were updated or added to match the most common scenarios
2020-06-29 20:44:27 -06:00
Kevin Logan b3f19dad74
[Ingest Manager][SECURITY SOLUTION] adjust config reassign link and add roundtrip to Reassignment flow (#70208) 2020-06-29 21:43:47 -04:00
Ryland Herrick 590fc8d2ff
[Security][Lists] Add API functions and react hooks for value list APIs (#69603)
* Add pure API functions and react hooks for value list APIs

This also adds a generic hook, useAsyncTask, that wraps an async
function to provide basic utilities:
  * loading state
  * error state
  * abort/cancel function

* Fix type errors in hook tests

These were not caught locally as I was accidentally running typescript
without the full project.

* Document current limitations of useAsyncTask

* Defines a new validation function that returns an Either instead of a tuple

This allows callers to further leverage fp-ts functions as needed.

* Remove duplicated copyright comment

* WIP: Perform request/response validations in the FP style

* leverages new validateEither fn which returns an Either
* constructs a pipeline that:
  * validates the payload
  * performs the API call
  * validates the response
and short-circuits if any of those produce a Left value.

It then converts the Either into a promise that either rejects with the
Left or resolves with the Right.

* Adds helper function to convert a TaskEither back to a Promise

This cleans up our validation pipeline considerably.

* Adds request/response validations to findLists

* refactors private API functions to accept the encoded request schema
(i.e. snake cased)
* refactors validateEither to use `schema.validate` instead of
`schema.decode` since we don't actually want the decoded value, we just
want to verify that it'll be able to be decoded on the backend.

* Refactor our API types

* Add request/response validation to import/export functions

* Fix type errors

* Continue to export decoded types without a qualifier
* pull types used by hooks from their new location
* Fix errors with usage of act()

* Attempting to reduce plugin bundle size

By pulling from the module directly instead of an index, we can
hopefully narrow down our dependencies until tree-shaking does this for
us.

* useAsyncFn's initiator does not return a promise

Rather than returning a promise and requiring the caller to handle a
rejection, we instead return nothing and require the user to watch the
hook's state.

* success can be handled with a useEffect on state.result
* errors can be handled with a useEffect on state.error

* Fix failing test

Assertion count wasn't updated following interface changes; we've now
got two inline expectations so this isn't needed.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-29 20:02:39 -05:00
Alison Goryachev 771f3ae098
[ILM] Fix bug when clearing priority field (#70154) 2020-06-29 20:34:33 -04:00
Garrett Spong e19b0b0262
[Platform][Security] Updates cluster_manager ignorePaths to include security scripts (#70139)
## Summary

Updates the cluster_manager `ignorePaths` to include security related script directories so that the server doesn't restart when modifying scripts like below... 🙂 

<p align="center">
  <img width="600" src="https://user-images.githubusercontent.com/2946766/85908688-4dd4de00-b7d3-11ea-9e64-38729a5cb63f.png" />
</p>
2020-06-29 18:07:17 -06:00
Nicolas Chaulet 88a41b2b1e
[IngestManager] Allow to filter agent by packages (#69731) 2020-06-29 18:48:18 -04:00
Dmitry Lemeshko 8e524477bc
[code coverage] exclude folders: test_helpers, tests_bundle (#70199) 2020-06-29 23:55:29 +02:00
Phillip Burch 470397075f
[Metrics UI] UX improvements for saved views (#69910)
* Works-ish

* Load the default view without throwing error

* Design feedback

* Update Saved Views design on Metrics explorer

* Fix types

* UX improvements when saving and editng

* Only load default view if there is no state from anywhere else.

* Add loading indicator and other polish

* Hide saved view menu when opening modals

* Fix typecheck

* Fix typo

* Fix translations
2020-06-29 16:53:36 -05:00
Brandon Morelli 3f44757973
[APM] docs: unique transaction troubleshooting (#69831)
* docs: draft

* docs: finishing touches
2020-06-29 14:51:38 -07:00
Rashmi Kulkarni d79a6883bf
Cross cluster search functional test with minimun privileges assigned to the test_user (#70007)
* using test_user with limited read permission to search profiler test

* gitcheck

* search profiler test using test_user

* using limited roles and privileges for CCR

* changed the global ccr role kibana section to be consistent with other roles with no feature controls

* removed canvas role

* changes to include pagination for 100 rows

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-29 14:42:49 -07:00
Nathan Reese 917598141f
[Maps] choropleth layer wizard (#69699)
* [Maps] choropleth layer wizard

* add boundaries radio group

* geo_index_pattern_select

* consolidate more logic into geo_index_pattern_select

* small clean-up

* left geo field and join field

* move EuiPanel into render wizard

* cleanup

* right panel

* createEmsChoroplethLayerDescriptor

* createEsChoroplethLayerDescriptor

* i18n cleanup

* tslint

* snapshot update

* review feedback

* review feedback

* update snapshot

* make EMS default source

* tslint

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-29 15:12:09 -06:00
John Schulz 7db95a1691
Make custom errors by extending Error (#69966)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-29 17:08:50 -04:00
Jen Huang d9fcc585cf
[Ingest Manager] Support updated package output structure (#69864)
* Update EPM package registry typings to reflect registry changes

* Change `dataset.id` references to `dataset.name`

* Fix RegistryStream

* Fix packageToConfigDatasourceInputs service

* Fix assignPackageStream service

* Fix validateDatasource service

* Fix configure data source components

* Fix variable

* Fix stream template installation

* Add support for `input[].dataset.type` and change `stream.dataset` mapping to be object containing `name` with instead of just a string

* Nest package information under `meta` in agent config yaml

* Move `dataset.type` to stream level instead of input level

* Make single call to fetch registry package information instead of doing it per stream

* Fix type issues

* Update endpoint test assertion

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-29 14:06:05 -07:00
Robert Austin ad9d3dcb9c
Resolver test coverage (#70246)
* Move AABB, Matrix3, and Vector2 modules from lib to models

* Add tests for AABB

* remove dead code
2020-06-29 17:04:29 -04:00
Lee Drengenberg 752fa6e01e
Async Discover search test (#64388)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-29 15:40:02 -05: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
nnamdifrankie f196546f4b
SECURITY-ENDPOINT: add host properties (#70238) 2020-06-29 16:03:02 -04:00
MadameSheema 04991d40c2
[SIEM] Fixes 'sets and reads the url state for timeline by id' Cypress test (#69882)
* fixes 'sets and reads the url state for timeline by id' test

* fixes merge issue

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-29 21:20:54 +02:00
Shahzad df44a3e779
[RUM Dashboard] Chart breakdowns (#69420)
Co-authored-by: Casper Hübertz <casper@formgeist.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-29 20:54:52 +02:00
Luke Elmers 6a69e19226
[data.search.aggs] Remove date histogram dependency on timefilter (#69858) 2020-06-29 12:52:13 -06:00
Wylie Conlon 736e64c60f
[Lens] Fix cross cluster bug and optimize existence query (#70132)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-29 13:47:08 -04:00
MadameSheema c2944855bd
renames 'detections' to 'alerts' (#70164) 2020-06-29 19:29:37 +02:00
Brandon Morelli 7de74f04e9
docs: update alerting (#69839) 2020-06-29 10:29:03 -07:00
MadameSheema 2a25df3f1c
[SIEM] Fixes Cypress 'Search Bar' test (#69952)
* fixes 'Search Bar' test

* [DEBUG] executes only Security Cypress tests

* Revert "[DEBUG] executes only Security Cypress tests"

This reverts commit e727790dbf.

* [DEBUG] executes only Security Cypress tests

* [DEBUG] fixes jenkins file

* [DEBUG] fixes Jenkinsfile

* Revert "[DEBUG] fixes Jenkinsfile"

This reverts commit 8f42e82edd.

* Revert "[DEBUG] fixes jenkins file"

This reverts commit 98487467eb.

* Revert "[DEBUG] executes only Security Cypress tests"

This reverts commit 6a089305e1.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-29 19:28:46 +02:00
Robert Austin 8ffdd4568b
[Security Solution] Resolver in Timeline (#69728)
Display Resolver in Security Solution's Timeline.
2020-06-29 13:10:39 -04:00
Gidi Meir Morris d3a0ab3db0
fixed eslint for alerting (#70171)
Fixed eslint in the alerting project
2020-06-29 18:00:58 +01:00
Joel Griffith c53f036f5d
Ensure that security is enabled before doing user authentication checks (#70127)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-29 09:26:11 -07:00
Mikhail Shustov 4fe60c4a0d
fix config update for root context (#70168)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-29 18:13:00 +02:00
Luke Elmers 851e7ff9b8
[data.search.aggs] Remove fieldFormats from AggConfig & AggConfigs (#69762) 2020-06-29 10:10:34 -06:00
Brian Seeders 462bf1520f skip flaky suite (#69617) 2020-06-29 11:48:39 -04:00
Vadim Dalecky 9f6ad5a8d8
"Explore underlying data" in-chart action kibana.yml flag (#70045)
* refactor: 💡 rename folder to "explore_data"

* style: 💄 check for "share" plugin in more semantic way

"explore data" actions use Discover URL generator, which is registered
in "share" plugin, which is optional plugin, so we check for its
existance, because otherwise URL generator is not available.

* refactor: 💡 move KibanaURL to a separate file

* feat: 🎸 add "Explore underlying data" in-chart action

* fix: 🐛 fix imports after refactor

* feat: 🎸 add start.filtersFromContext to embeddable plugin

* feat: 🎸 add type checkers to data plugin

* feat: 🎸 better handle empty filters in Discover URL generator

* feat: 🎸 implement .getUrl() method of explore data in-chart act

* feat: 🎸 add embeddable.filtersAndTimeRangeFromContext()

* feat: 🎸 improve getUrl() method of explore data action

* test: 💍 update test mock

* fix possible stale hashHistory.location in discover

* style: 💄 ensureHashHistoryLocation -> syncHistoryLocations

* docs: ✏️ update autogenerated docs

* test: 💍 add in-chart "Explore underlying data" unit tests

* test: 💍 add in-chart "Explore underlying data" functional tests

* test: 💍 clean-up custom time range after panel action tests

* chore: 🤖 fix embeddable plugin mocks

* chore: 🤖 fix another mock

* test: 💍 add support for new action to pie chart service

* feat: 🎸 add kibana.yml to disable in-chart "explore data" actio

Co-authored-by: Anton Dosov <anton.dosov@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-29 17:47:08 +02:00
Larry Gregory 28b70923df
Consolidate capabilities check for Stack Management (#69437)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-29 11:43:43 -04:00