Commit graph

32470 commits

Author SHA1 Message Date
gchaps d45d78016a
[DOCS] Alerting PagerDuty benefits (#63652)
* [DOCS] Alerting PagerDuty benefits

* [DOCS] Fixes broken link

* [DOCS] Organization changes

* [DOCS] Changes to meet template and incorporate review comments

* [DOCS] Fixed formatting of bulleted list

* [DOCS] Incorporates review comments

* Update docs/user/alerting/action-types/pagerduty.asciidoc

Co-Authored-By: Mike Côté <mikecote@users.noreply.github.com>

* [DOCS] Fixes naming and other formatting issues

Co-authored-by: Mike Côté <mikecote@users.noreply.github.com>
2020-04-20 09:09:49 -07:00
Yara Tercero 7db7597a1d
[SIEM][Detection Engine] - Move All Rules tabs to match other tabs UI (#63920)
### Summary 

Restructure All Rules table tabs to be outside of the table, similar to other tabbed tables in UI.
2020-04-20 12:04:22 -04:00
Uladzislau Lasitsa e8c42095d2
Index pattern management UI -> TypeScript and New Platform Ready (create edit field) (#63836)
* Converted to react. Moved routes to edit_index_pattern

* Added withRouter for navigation. Fixed index_header.

* Fixed comments

* Fixed comments.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-20 19:03:01 +03:00
Melissa Alvarez 784b8beb2f
[ML] DF Analytics Classification exploration: replace table with data grid (#63757)
* update classification result to use datagrid

* consider isTraining in docCount fetch

* fix translations
2020-04-20 11:51:53 -04:00
spalger 32c6fd777f Revert "[platform] serve plugins from /bundles/plugin:${id}"
This reverts commit d538929ed9.
2020-04-20 08:21:11 -07:00
Joe Reuter 878cc8b14e
Add redirect function to kibana_legacy legacy application service (#63702) 2020-04-20 16:26:48 +02:00
Vadim Dalecky 8f7bb05169
[Discuss] Remove expressions plugin's dependency on inspector plugin (#63841)
* refactor: 💡 use inspector service in visualizations to open it

* refactor: 💡 remove expressions plugin dependency on inspector

* test: 💍 fix Jest mock

* fix: 🐛 remove Inspectore from Expressions plugin dependency inf

* docs: ✏️ add JSDocs for createStartServicesGetter() method

* test: 💍 fix TypeScript errors in expressions mocks
2020-04-20 15:04:14 +02:00
Aleh Zasypkin 21dda535eb
Upgrade papaparse dependency (4.6.35.2.0). (#63879) 2020-04-20 14:08:04 +02:00
Alejandro Fernández Haro 9226d4cc94
[Telemetry] Use staging if it's not a distributable release (#63875)
* [Telemetry] Use staging if it's not a distributable release (instead of 'dev' vs. 'prod' approach)

* Rename isProd to isDistributable and useProdKey
2020-04-20 12:43:34 +01:00
Shahzad 7c7fbc70cd
[Uptime] Refactor folder structure (#63442)
* update structure

* update connected structure

* update connected structure

* update code structure

* update types

* update imports

* update folder

* update trans

* fixed snapshot

* updated code

* refacto monitor list container

* update types

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-20 11:12:17 +02:00
Ahmad Bamieh 7b57caf62b
[i18n] add localization section in CONTRIBUTING file (#63668)
* add localization section

* upadte TOC

* Update CONTRIBUTING.md
2020-04-20 09:32:03 +03:00
Liza Katz 796421f600
[SEARCH] Cleanup fetch soon (#63320)
* move old code to legacy folder

* Use search service directly from search source

* Move get search params to fetch folder

* Delete search strategy folder

* Doc update

* Minor cleanups

* Moved es client to legacy folder

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

* Updated tests

* strings update

* Fix jest test

* re-arrange runSearch function

* re-arrange runSearch function

* fix jest tests

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-19 17:58:45 +03:00
spalger fe6b13b83c skip flaky suite (#58692) 2020-04-18 12:35:04 -07:00
spalger f2bdd01853 Merge branch 'master' of github.com:elastic/kibana 2020-04-18 12:34:38 -07:00
Shahzad c59320c7dd
[Uptime] Refresh index and also show more info to user regardi… (#62606)
* Refresh index and also show more info to user

* updated type

* updated type

* updated test

* updated formatting

* update text

* updated types

* updated translation

* update

* fixed types

* updated code

* fixed types

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-18 13:41:11 +02:00
Anton Dosov 73548bd473
[Drilldowns] Fix back button by removing panels from url in dashboard in view mode (#62415)
* remove panels from url

* review nits

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-18 10:34:17 +02:00
spalger d538929ed9 [platform] serve plugins from /bundles/plugin:${id} 2020-04-17 17:14:11 -07:00
Yuliia Naumenko 055d1fb7d4
[Alerting] Documentation for how to pre-configure connectors. (#63807)
* [Alerting] Documentation for how to pre-configure connectors.

* small fix

* Adjusted titles

* Fixed wrong link

* fixed warning

* Fixed ci issues

* [DOCS] Edits preconfigured connector docs

* Replaced words 'pre-configured' with 'preconfigured'

Co-authored-by: gchaps <chappell_5@yahoo.com>
2020-04-17 17:04:02 -07:00
spalger 2e45234eff skip flaky suite (#63621) 2020-04-17 16:41:54 -07:00
spalger 5bba0221d1 Revert "skip flaky suite (#63747)"
This reverts commit 3405d54e3a.
2020-04-17 16:27:18 -07:00
spalger 3405d54e3a skip flaky suite (#63747) 2020-04-17 16:16:53 -07:00
Yara Tercero 24c253e10b
[SIEM][Detections Engine] - Update rule.lists to be rule.exceptions_list (#63717)
### Summary [63717]

This PR updates the rules lists param to be `exceptions_list`. This is done in an attempt to make the terminology less confusing as lists will generally be referring to the big lists values. It should also make it more clear that the `exceptions_list` logic is being applied as a double not.
2020-04-17 18:58:35 -04:00
Ryland Herrick 38217b6352
[SIEM] Flaky test fix: Bump find_statuses timeout (#63900)
* Increase time between creating a rule and retrieving its status

We need to wait for ES to become consistent.

* Prefer sequential `await`s to .then()
2020-04-17 17:17:43 -05:00
Justin Kambic 4242fe5400
[Uptime] Add cert API request and runtime type checking (#63062)
* Add cert API request and runtime type checking.

* Collapse on sha256 field instead of common_name.

* Add basic wildcard search capabilities.

* Support searching.

* Update fields and queries, remove server response validation.

* Update API to utilize x509 fields.

* Add new fields to certs API request, provide defaults.

* Add api test for cert api.

* Add unload command to certs test.

* Extract API params interface to io-ts type.

* Rename a functional test.

* Fix broken type.
2020-04-17 17:58:27 -04:00
Wylie Conlon 561c0f9fed
[Lens] Allow table to scroll horizontally (#63805)
* [Lens] Allow table to scroll horizontally

* Fixing scrolling pt. 2

Co-authored-by: cchaos <caroline.horn@elastic.co>
2020-04-17 17:03:33 -04:00
Chris Cowan bb49c96167
[Metrics UI] Allow users to create alerts from the central Alerts UI (#63803) 2020-04-17 13:45:26 -07:00
Aaron Caldwell f179ec4069
Migrate legacy maps licensing (x-pack/tilemap) to NP (#63539)
* Move logic to NP and add basic plugin structure

* Remove unused server-side licensing logic and old index

* Set license in maps_legacy via new plugin

* Change add to set for service settings queryParams function

* Fix accidentally changed emsClient method call

* Require at least a basic license

* Type updates

* Remove unneeded legacy license test

* Remove unused headers in test
2020-04-17 13:56:20 -06:00
Andrea Del Rio c13a026b01
[Alerting] "Create alert" and alert list design improvements (#63515)
* added header to actions section

* adjusted some spacing in Create Alert

* lighter text in Actions section headings

* fixed bulk actions dropdown

* improve alert collapsed item actions

* improve dropdown and adjust some buttos

* adjust font size of steps to match hierarchy

* need to check master

* improve collapsed actions menu

* added periods to help texts

* going back to EuiButtonEmpty to be able to use isLoading

* fix prop

* remove Fragment

* remove translations we're not using

* Fix functional tests

Co-authored-by: Mike Cote <mikecote@users.noreply.github.com>
2020-04-17 12:15:04 -07:00
Wylie Conlon dc9bfb5d0f
[Lens] Fix existence for dotted paths in _source (#63752) 2020-04-17 14:27:40 -04:00
Vadim Dalecky b5762eb5ff
Example plugins in X-Pack (#63823)
* feat: 🎸 add example plugin ability to X-Pack

* style: 💄 spread array items from one array

* chore: 🤖 add x-pack/examples tsconfigs to global list

* fix: 🐛 don't import non-existing plugin

* fix: 🐛 fix TypeScript error

* test: 💍 update Jest snapshot
2020-04-17 20:15:36 +02:00
Melissa Alvarez dc5c2f0e3f
[ML] Migrate Mocha unit tests to Jest: migrate job utils and query utils tests (#63775)
* migrate mocha tests to jest for query utils

* update jobUtils test to jest from mocha

* update tests to use jest syntax
2020-04-17 13:55:46 -04:00
Robert Austin c0c21d1ba4
Endpoint: middleware receive immutable versions of state and actions (#63802)
Middleware receive state and actions, but they shouldn't mutate either. With this PR, middleware using the `substateMiddlewareFactory` helper will have this enforced via typescript.

* replace `MiddlewareFactory` with `ImmutableMiddlewareFactory`
* Added types: `ImmutableMiddleware` and `ImmutableMiddlewareAPI` which are similar to the ones built into redux but which enforce that state and actions aren't mutated (and which allow `Immutable` versions of actions to be dispatched.

No changes to runtime code.
2020-04-17 13:52:20 -04:00
Tiago Costa a8c32b703e
chore(NA): increase max listeners on log reporter (#63845) 2020-04-17 18:35:59 +01:00
Ryland Herrick 40f82229f0
[SIEM] Server cutover to New Platform (#63430)
* Move server code into NP folder

* NP config is not yet used
* Relative imports are somewhat broken

* Move common folder into NP

* Move cypress folder into NP

* Move scripts folder into NP

* Move misc. config into NP folder

A few of these were moved into the cypress folder as they're
cypress-specific.

I tried to update all the relative paths but some are likely broken. I'm
not going to know until other stuff is fixed, though.

* Move value for siem index pattern into common/constants

The other default values live in there, this is no different.

* Update paths following file move

If this was referencing the full project, it now references both paths
(legacy for UI, and NP for server).

* Fix typescript errors related to module resolution

These are mostly updating imports to the common/ folder on the UI side
(since things changed relative to those files).

* Replace Legacy Config with NP Config

* Updates plugin to use NP config
  * defines new config previously coming from savedObjects config
* cleans up legacy types

 Conflicts:
	x-pack/plugins/siem/server/lib/detection_engine/routes/rules/export_rules_route.ts
	x-pack/plugins/siem/server/lib/detection_engine/routes/rules/import_rules_route.ts
	x-pack/plugins/siem/server/lib/detection_engine/rules/types.ts
	x-pack/plugins/siem/server/plugin.ts
	x-pack/plugins/siem/server/routes/index.ts
	x-pack/plugins/siem/server/types.ts

* Remove local SIEM tsconfig

This was originally added to address an issue with tsserver, but that
issue is no longer relevant. The presence of this file confuses
typescript into thinking that siem is a separate TS project.

* Update kibana.json to declare our dependencies

These are not necessarily correct in terms of what's required/optional,
but this is what's declared in our types.

* Remove legacy plugin instantiation

* Removes legacy instantiation of server plugin, which is now handled by
NP
* Loosens legacy config spec so we no longer have to duplicate config
types

* Update tests with NP config

These were written against the old Hapi config function; now, we just
have a POJO.

* Update es_archiver helpers' paths

I'm not quite sure if these are working yet, but they're no longer
throwing errors.

* Ignore restricted path on script

This was cribbed from infra, who has made a similar change.

* Ignore restricted path on temporary savedObject mappings import

This will be changed subsequently when we switch to the NP form of
savedObject type registration.

* Add symlink to lockfile

* Fix paths on circular deps script

* Add separate config for Rule and Timeline saved objects

We had previously used the savedObjects' config, but those are not
currently exposed to us on New Platform. For now, we're going to split
this into two sets of values for the SOs we deal with
importing/exporting within the SIEM app, with the same defaults as
savedObjects.

* Fixing relative paths within cypress

These are strings that wouldn't be caught by typescript.
2020-04-17 12:31:54 -05:00
Zacqary Adam Xeper 980e58e5fa
[Metrics Alerts] Fix saving doc count alerts(#63750) 2020-04-17 12:13:29 -05:00
Yuliia Naumenko 2af91b3c51
Added server api tests for event log service (#63540)
* Added server api tests for event log service

* fixed tests

* fixed type check issue

* Fixed failing tests

* fixed jest tests

* Fixed due to comments

* Removed flackiness tests

* fixed type check error

* Fixed func test
2020-04-17 09:50:08 -07:00
Cauê Marcondes 675c5898ca
[APM] Reparenting spans to support inferred spans (#63695)
* reparening spans

* adding unit test

* adding unit test
2020-04-17 18:19:19 +02:00
Robert Oskamp 1992716086
[ML] Functional tests - refactor test resources (#63724)
This PR changes the way how test resources like indices and saved objects are used in ML and Transform functional tests. No actual test logic is changed.
2020-04-17 18:10:46 +02:00
Wylie Conlon fb1ff02ed3
Fix task manager cancel warning (#63756)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-17 12:07:51 -04:00
Joe Reuter 550d6af2cb
Migrate rollup client side code (#63227) 2020-04-17 18:07:27 +02:00
Justin Kambic 7efe7e88d3
[Uptime] Remove monitor states graphql (#62853)
* WIP replacing GQL with redux/rest.

* Finish implementing migration.

* Introduce new connected component for ping list.

* Replace GraphQL type with io-ts.

* Update some broken tests.

* Add test for new helper function.

* Write test snapshots.

* Migrate api tests from graphql to rest.

* Update fixtures that rely on pings.

* Move ping types to runtime_types folder with rest of io-ts files.

* Update Ping type location and imports, type checking.

* Remove reliance on fixtures for ping functional API tests.

* Fix broken unit tests.

* Fix broken types.

* Remove local state storage from parent components.

* Add functional test to cover Ping List functionality.

* Fix monitor page functional test that was broken by merge conflicts.

* Fix broken tests.

* Fix broken API test.

* Replace a test with a describe block that will pre-navigate all tests.

* Delete unused reducer keys.

* Re-introduce loading to ping list reducer.

* Inroduce code that will cause PingList to re-fetch when refresh button is pressed.

* Update expanded rows to support multiple concurrent expanded rows.

* Modify pingList reducer to have singular optional error field.

* Delete unnecessary helper code.

* Delete unused interface.

* Add runtime_type to parse getPings params, fix pagination index.

* Add dedicated monitor type to runtime_types.

* Fix broken tests.

* Fix broken tests.

* Rename '@timestamp' property to 'timestamp' on Ping type.

* Fix broken type and key pings list table on document ID instead of timestamp.

* Fix broken unit tests.

* Fix broken tests and types.

* Fix broken functional test.

* Add REST endpoint for monitor states.

* Add REST route to constants file.

* Introduce io-ts typing for monitor states.

* Remove remaining GraphQL types.

* Update monitor states types to use io-ts types.

* Add state management for monitor states.

* Introduce connected monitor list component.

* Fixup runtime types for monitor states.

* Remove all remaining references to apollo graphql.

* Update URL generator function tests to use inline snapshots instead of snapshot files.

* Fix missing imports and small type issues.

* Prefer inline snapshot to object literal comparison.

* Add type check and console log to API response.

* Update README to remove graphql references.

* Fix type error.

* Make monitor list refresh when global refresh button is pressed.

* Fix broken types.

* Rename `@timestamp` field to `timestamp`.

* Change spelling of var.

* Add timestamp map for `@timestamp` field in monitor states fetcher.

* Remove need for `monito_states` fixture.

* Write test code that allows for deletion of the `monitor_states_id_filtered` fixture.

* Rewrite pagination tests to no longer rely on monitor states page fixtures.

* Skip test that is causing other functional tests to fail.

* Remove unused translations.

* Fix broken test snapshots.

* Fix stale error reporting errors.

* Remove runtime validation from REST handler.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-17 11:50:20 -04:00
Pierre Gayvallet c4ddd00540
Add isConfigSchema typeguard and stop using instanceof Type checks in core (#63821)
* add isConfigSchema type guard

* replace instanceof checks with isConfigSchema

* add dummy test plugin using a route with validation schema

* remove `?.` prop access

* remove test plugin

* fix test description
2020-04-17 17:39:06 +02:00
Devon Thomson 3f98f0f849
Duplicate panel feature (#61367)
Added a new cloning feature for panels on a dashboard.
2020-04-17 11:35:27 -04:00
Radu Gheorghe cf7da3cdb7
Add headers to the sample curl (#63548)
* Add headers to the sample curl

At least in 7.x it doesn't work without the kbn-xsrf and json headers.

* More headers to curl commands

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-17 10:01:30 -05:00
CJ Cenizal 7e7884e01f
Add body validation to update follower index API endpoint. (#63653) 2020-04-17 07:37:50 -07:00
Jean-Louis Leysens c57121ba79
Relax error requirement of ECONNREFUSED (#63835)
Also added a test for the different errors that could occur
at a lower network level.
2020-04-17 16:05:46 +02:00
Yara Tercero 954dda1662
[SIEM][Detections] - Update KQL/Lucene search to include lists exceptions (#63264)
[SIEM][Detections] - Update KQL/Lucene search to include lists exceptions (#63264)

### Summary 

This PR adds logic to include the lists values in search so we can now filter off of lists.

- does work with KQL search
- does work with Lucene search
- does NOT yet filter off of large lists (will be separate PR)
- does NOT yet work on ML search (will be separate PR)
2020-04-17 10:04:48 -04:00
Sonja Krause-Harder 1385cce3b7
[EPM] Improve object handling in index template mappings (#63688)
* Unit-test current mapping for object types

* Handle 'enabled' attribute for object fields

* Handle 'dynamic' attribute for object fields

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-17 15:16:20 +02:00
Sonja Krause-Harder f91c795e30
[EPM] Handle multi fields in index template generation (#63112)
* Add unit test stub for multi fields.

* Add multi field handling to mapping generation.

* Start documenting index template generation.

* Add unit tests.

* Remove stub for fields.yml documentation

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-17 13:23:30 +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