Commit graph

10770 commits

Author SHA1 Message Date
Jean-Louis Leysens 0e28dae410
convert processor labels to sentence case (#75278) 2020-08-18 15:42:43 +02:00
Jean-Louis Leysens 36f0c75088
[Monaco] Refactor the way XJSON grammar checker gets registered (#75160)
* Refactor the way XJSON grammar checker gets registered

- avoid registering multiple model add listeners
- remove regsiterGrammarChecker from public API!
- fix getWorker handler to register XJSON only for XJSON models

* remove unused import

* updateAnnos -> updateAnnotations
2020-08-18 15:13:15 +02:00
Melissa Alvarez 2a212cbad8
Clarify no documents error message when filtering by is_training (#75227) 2020-08-18 08:58:15 -04:00
Marta Bondyra e04e05aa56
[Lens] Fix crash when two layers xychart switches to pie (#75267)
* [Lens] fix crash on two layers and add a functional test with two layers switching to pie chart
2020-08-18 14:27:43 +02:00
Shahzad ce8a92ea1f
[Observability Homepage] Fix console error because of side effect (#75258) 2020-08-18 14:07:18 +02:00
Robert Oskamp 834a287379
[ML] Functional tests - re-activate DFA test suites (#75257)
This PR re-enables the DFA test suites for cloning, regression creation and classification creation.
2020-08-18 12:32:13 +02:00
Pierre Gayvallet c844187ee9
GS providers improvements (#75174)
* exclude apps with non visible navlinks from results

* change SO provider to prefix search

* fix service tests
2020-08-18 12:24:48 +02:00
Pierre Gayvallet 890fc31dff
Beats Management plugin: migrate server-side code (#70930)
* move all the legacy codebase to KP plugin

* fix imports

* add empty handler context & rename routes folder

* start migrating routes

* migrate rest of the routes

* migrate adapters

* remove beats from legacy xpack plugin

* use nullable + replace response.custom

* fix wrapRouteWithSecurity, remove incorrect header validation

* remove comment

* updating generated plugin list

* fix typos in doc

* adapt readme too.

* remove old commented routes from route files

* remove eslint disabling

* use camel case for plugin id

* update generated doc

Co-authored-by: Josh Dover <me@joshdover.com>
2020-08-18 12:00:39 +02:00
Patryk Kopyciński 7b785c62e4
[Security Solution] Fix unit tests (#75165) 2020-08-18 09:00:50 +02:00
Aleh Zasypkin e46e66210f
Implement Server-Side sessions (#68117) 2020-08-18 08:38:23 +02:00
CJ Cenizal ec6cc14a9f
Allow Watcher index actions to be configured without specifying an index name. (#74684) 2020-08-17 19:29:38 -07:00
Brent Kimmel b8dc0a02a0
[Security Solution][Resolver] Enzyme tests for graph layout (#75010)
* [Security Solution][Resolver] Enzyme tests for graph layout

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Robert Austin <robert.austin@elastic.co>
2020-08-17 18:07:19 -04:00
Joe Portner 8a110a3c15
lodash 4.17.19 -> 4.17.20 (#75205) 2020-08-17 16:56:32 -04:00
Marshall Main 24773f3a00
[Security solution][Exceptions] Add separate io-ts types for endpoint exceptions (#74468)
* Add separate io-ts types for endpoint exception entries

* Fix text typos

* Fix test

* address review comments

* Add extra entry validation when adding items to endpoint_list

* fix test

* fix tests again

* really actually fix the tests

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-17 16:42:04 -04:00
Nathan L Smith 4b4050c8db
APM and Observability storybook fixes (#75168)
In APM:

* Fix stories crashing with errors
* Hide some additional prop tables
* Fix node severites story to show correct node severites
* Fix Service Map Popover story
* Use knobs on sync badge story

In Observability:

* Remove an extra stray paren in decorators

There's additional refactoring and fixes that can be done but this just gets everything in working order.
2020-08-17 14:33:00 -05:00
Tiago Costa df9b28a4ce
skip flaky suite (#75124) 2020-08-17 20:25:22 +01:00
Pierre Gayvallet 57a802c43f
expose es config on es setup contract (#73055)
* expose es config on es setup contract

* move config$ back to legacy
2020-08-17 21:08:27 +02:00
Alison Goryachev 156692cbfb
[Ingest pipelines] Add KibanaContextProvider as dependency of processor editor (#75018) 2020-08-17 14:25:26 -04:00
Constance 0b28dc2f48
[Enterprise Search][tech debt] Refactor external URL generation to a single DRY helper (#75093)
* Set up App Search routes constants file

* Create new helper/generator for external URLs

* Update plugin to pass externalUrl helper in KibanaContext

* Update AS & WS navs to use new external url generator

* Update App Search views to use new externalUrl.getAppSearchUrl helper

* Update Workplace Search to use externalUrl.getWorkplaceSearchUrl helper

+ remove old useRoutes.getWSRoute helper, which was the inspiration for this

* Rename top-level enterpriseSearchUrl to config.host

- This allows us to more clearly separate concerns between the URL set in config.host and externalUrl.enterpriseSearchUrl (used for front-end links, may be a vanity/public URL)
- This change also enables us to not mutate Kibana's config obj, which is much cleaner

Misc tech debt:
- Reorder renderApp args (from least to most likely to change)
- Rename our public url methods/vars to more generic "init data" names - this is in preparation for upcoming changes where we pull more than just external_url from our client endpoint

* Fix broken Workplace Search nav links

- that require a hash for routing to work

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-17 09:37:21 -07:00
Nathan Reese 4ac0e81554
[Maps] fix double fetch when filters are modified (#74893)
* [Maps] fix double fetch when filters are modified

* add unit tests

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-17 09:44:08 -06:00
Nathan Reese b07db9dec8
[Maps] convert kibana_services to TS (#74901)
* [Maps] convert kibana_services to TS

* tslint

* fix jest test

* tslint

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-17 09:41:08 -06:00
Chris Roberson 4c2f0760dc
Use actual link for cluster listing page (#75016)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-17 11:27:41 -04:00
Alejandro Fernández Gómez cf65b6ba8c
Track "view in context" usage (#74752)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-17 17:06:13 +02:00
Peter Pisljar a987cef583
preparing datatable for unifying with kibana_datatable (#73654) 2020-08-17 15:47:37 +02:00
Nathan Reese ea545312e9
[Maps] allow for extensible sourceDescriptor typings (#74758)
* [Maps] allow for extensible sourceDescriptor typings

* revert changes to blended_vector_layer.test

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-17 07:23:57 -06:00
Anton Dosov 3c5f2e7e7b
[Drilldowns] Trigger picker (#74751)
Drilldowns now support trigger picker. It allows to create a drilldown and specify which trigger it should be attached to.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-17 14:47:25 +02:00
Gidi Meir Morris fcb1a2848a
[Task Manager] Handles case where buffer receives multiple entities with the same ID (#74943)
Handles the case where two operations for the same entity make it into a single batched bulk operation and avoid the clashing ID issue that could cause the poller to hang and stop poling for work).
2020-08-17 13:19:04 +01:00
Robert Oskamp a9860f3675 [ML] Functional tests - skip regression and classification tests 2020-08-17 09:51:17 +02:00
Sandra Gonzales 46a268fb99
[Ingest Manager] fix removing ingest pipelines from elasticsearch (#75092)
* fix removing ingest pipelines bug

* undo unneeded changes to default.yml entry pipeline
2020-08-15 16:18:24 -05:00
Sandra Gonzales 48deb7b0a1
move tests for placeholder indices to setup (#75096)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-15 16:16:08 -05:00
Spencer cf93604e43
[jest] temporarily extend default test timeout (#75118)
* [jest] temporarily extend default test timeout

* fix, 30 seconds

Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-08-15 13:31:37 -07:00
spalger d4f52471bf skip flaky suite (#75044) 2020-08-14 17:29:07 -07:00
Tim Sullivan ef5c95ea37 [Reporting/Flaky Test] Skip test for paging list of reports (#75075) 2020-08-14 15:49:14 -07:00
Brian Seeders df7221245d skip flaky suite (#74814) 2020-08-14 17:37:23 -04:00
Yuliia Naumenko 52bd6d98ea
Actions add proxy support (#74289)
* Added proxy support for action types

* Fixed tests

* added rejectUnauthorizedCertificates config setting

* removed slack not used code

* Fixed Slack proxy

* fixed typecheck errors

* Cleanup code

* Fixed slack

* Added unit tests

* added proxy server for test

* Fixed build

* Added functional tests

* fixed due to comments

* Fixed tests and some changes due to comments

* Fixed functional tests

* fixed circular deps

* Added proxy unit test to action type
2020-08-14 14:20:12 -07:00
Yulia Čech 64b8b88c64
[ILM] TS conversion of Edit policy components (#74747)
* [ILM] Convert node allocation component to TS and use hooks

* [ILM] Fix jest tests

* [ILM] Fix i18n check

* [ILM] Implement code review suggestions

* [ILM] Fix type check, docs link and button maxWidth in NodeAllocation component

* Fix internaliation error

* [ILM] Convert node details flyout to TS

* [ILM] Fix useState declaration

* [ILM] Fix useState declaration

* [ILM] Fix jest test

* [ILM] Change error message when unable to load node attributes

* [ILM] Change error message when unable to load node details

* [ILM] Delete a period in error callout

* [ILM] Delete a period in error callout

* [ILM] Convert node details flyout to TS

* [ILM] Fix i18n check

* [ILM] Fix useState declaration

* [ILM] Fix useState declaration

* [ILM] Fix jest test

* [ILM] Change error message when unable to load node details

* [ILM] Delete a period in error callout

* [ILM] edit components

* [ILM] Fix review suggestions

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-14 23:12:01 +02:00
Robert Austin 459e9d603d
[Resolver] simulator tests select elements directly instead of using descendant selectors. (#75058)
Our tests shouldn't rely on the DOM structure of Resolver (when its arbitrary) because that will make them brittle. If the user doesn't care about the DOM structure, then neither should our tests.

Note: sometimes the user does care about the DOM structure, and in those cases the tests should as well.
2020-08-14 16:31:28 -04:00
Scotty Bollinger ac04e0546a
[Enterprise Search] Add Workplace Search side navigation (#74894)
* Add routes

* Add version for use in doc link

* Set up basic router layout + WorkplaceSearchNav

* Update views to account for Layout

* Move version to common folder

* Fix version path

* Remove product button

No longer needed since we have all top-level app links in Kibana as a part of this PR

* You know, for search

* Remove comment

* Remove unused i18n properties from JSON

Tests were failing after removing component:
https://kibana-ci.elastic.co/job/elastic+kibana+pipeline-pull-request/67797/execution/node/382/log/

* Revert button and i18n copy  removal

This reverts commit ba0535187e.

* Move Overview out of layout to hide nav

For now, the route for groups was added to avoid having comment out the code. Will add the groups component in a future PR

* Revert layout changes to Overview

Since there is no nav, the padding was missing and the view looked off. Reverting to the 7.9, centered column view

* Remove extra Overview component

Was causing tests to fail

* Revert error state to use EuiPage

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-14 15:28:34 -05:00
Steph Milovic 1626490c36
[Security solution] Sourcerer: Kibana index pattern selector for security views (#74706) 2020-08-14 13:09:47 -05:00
Felix Stürmer 0f1128281e
[Logs UI] Remove apollo deps from log link-to routes (#74502)
This replaces the use of the old graphql-based `useSource` hook with the new plain JSON `useLogSource` hook.

It also fixes two more problems:

- A rendering problem with the source configuration loading screen and a `setState` race condition in the `useLogSource` hook.
- A non-backwards-compatible change of the `/link-to/:sourceId/logs` route in #61162.
2020-08-14 19:50:20 +02:00
Lee Drengenberg 5627ab3193
[functional test][saved objects] update tests for additional copy saved objects to space (#74907)
Co-authored-by: Larry Gregory <lgregorydev@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-14 12:20:38 -05:00
Mike Côté d56b792e9c
Make the alerts plugin support generics (#72716)
* Initial work

* Expand generic support to alert instances

* Convert index threshold to use generics

* Make fixture alert types use generics

* Make alert instance related types use unknown

* Fix typecheck failures

* Cleanup + add instance generic support to registry.get API

* Shallow clone

* Rename some TS variables

* Fix failing api integration tests

* Change code for easier review and keep more history

* Fix

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-14 12:52:42 -04:00
Melissa Alvarez 8559ed87d1
[ML] DF Analytics creation: display explain error message (#75006)
* display explain error message to the user

* fix translation

* update error message
2020-08-14 12:44:42 -04:00
Greg Thompson bbee1f92b0
Upgrade EUI to v27.4.0 (#74004)
* eui to 27.1.0

* eui to 27.2.0

* buttoniconside type

* euiselectable type

* update onScroll callback and polyfill size references

* findTestSubject ts

* buttoncontent and collapsiblenav src snapshot updates

* update prop retrieval

* xpack snapshots

* jest updates

* type fixes

* more snapshots

* virtual list changes

* more virtualization changes

* merge

* fix functional tests

* data-test-subj for indexPatter-switcher

* storyshots

* eui to 27.3.1

* Fix unit tests

* Fix broken unit test

* Updated snapshots

* Fixed types

* search for value in euiselectable before selection

* select the correct element

* mock virtualized dep

* ts fix

* reinstate storyshot

* ts fix

Co-authored-by: Chandler Prall <chandler.prall@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-14 10:31:15 -06:00
Jean-Louis Leysens 344e1de7e1
[Upgrade Assistant] Fix potentially long URI (#74485)
* _cluster/state/metadata/* and added a comment to function

* add another comment regarding why we are asking for *

* update jest test

* refactor and clean up use of cluster status to get index state

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-14 17:14:03 +02:00
Wylie Conlon ec5112b9cc
[Lens] Fix table sorting bug (#74902)
* [Lens] Fix table sorting bug

* Fix types
2020-08-14 10:54:43 -04:00
Kevin Logan 8aa8b04cee
[SECURITY_SOLUTION] Retry on ingest setup (#75000) 2020-08-14 10:06:51 -04:00
Nathan Reese 187a13075b
[file upload] lazy load to reduce page load size (#74967)
* [file upload] lazy load to reduce page load size

* tslint
2020-08-14 07:15:16 -06:00
Patrick Mueller 67e28ac8b4
[EventLog] Populate alert instances view with event log data (#68437)
resolves https://github.com/elastic/kibana/issues/57446

Adds a new API (AlertClient and HTTP endpoint) `getAlertStatus()` which returns
alert data calculated from the event log.
2020-08-14 08:34:26 -04:00
Anton Dosov 7bd014abb3
[UiActions] pass trigger into action execution context (#74363)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-14 12:07:04 +02:00
Cauê Marcondes bcf8719824
Adding API test for custom link transaction example (#74238)
* Adding api test for custom link transaction example

* expecting specific fields

* expecting specific fields

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-14 09:55:39 +02:00
Shahzad 7cf0e49c89
[Uptime] Singular alert (#74659)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-14 09:45:02 +02:00
Chris Cowan 1632391f35
[Metrics UI] Remove TSVB dependency from Metrics Explorer APIs (#74804)
* [Metrics UI] Remove TSVB dependency from Metrics Explorer APIs

* Update x-pack/plugins/infra/public/pages/metrics/metrics_explorer/components/chart_title.tsx

Co-authored-by: Zacqary Adam Xeper <Zacqary@users.noreply.github.com>

* Update x-pack/plugins/infra/server/lib/metrics/lib/calculate_bucket_size/calculate_auto.ts

Co-authored-by: Zacqary Adam Xeper <Zacqary@users.noreply.github.com>

* Update x-pack/plugins/infra/server/lib/metrics/lib/calculate_bucket_size/calculate_auto.ts

Co-authored-by: Zacqary Adam Xeper <Zacqary@users.noreply.github.com>

* Update x-pack/plugins/infra/server/lib/metrics/lib/convert_histogram_buckets_to_timeseries.ts

Co-authored-by: Zacqary Adam Xeper <Zacqary@users.noreply.github.com>

* Update x-pack/plugins/infra/server/lib/metrics/lib/convert_histogram_buckets_to_timeseries.ts

Co-authored-by: Zacqary Adam Xeper <Zacqary@users.noreply.github.com>

* Update x-pack/plugins/infra/server/routes/metrics_explorer/lib/find_interval_for_metrics.ts

Co-authored-by: Zacqary Adam Xeper <Zacqary@users.noreply.github.com>

* Fixing some names, changing some units

* Reverting TSVB calculate_auto; fixing names in infra

* Fixing translation names

* Fixing typo

Co-authored-by: Zacqary Adam Xeper <Zacqary@users.noreply.github.com>

Co-authored-by: Zacqary Adam Xeper <Zacqary@users.noreply.github.com>
2020-08-13 18:45:47 -07:00
Tim Sullivan 447854d992
[Reporting/Functional] unskip pagination test (#74973)
* [Reporting/Functional] unskip pagination test

* change to js file for flaky test runner

* fix ts
2020-08-13 15:06:59 -07:00
Robert Austin 1729091ddf
[Resolver] Stale query string values are removed when resolver's component instance ID changes. (#74979)
The app can show more than 1 Resolver at a time. Each instance has a unique ID called the `resolverComponentInstanceID`. 
When the user interacts with Resolver it will add values to the query string. The query string values will contain the `resolverComponentInstanceID`. This allows each Resolver to keep its state separate. When resolver unmounts it will remove any query string values related to it.

If Resolver's `resolverComponentInstanceID` changes it should remove query string values related to the old instance ID. It does not. This PR fixes that. 

Note: I don't know if it was possible for this bug to actually happen. I can't make it happen, but depending on how Resolver is mounted by its consumers it *could*
2020-08-13 17:50:10 -04:00
Scotty Bollinger 875f7701c3
Add public url to Workplace Search plugin (#74991) 2020-08-13 16:45:16 -05:00
Tim Sullivan a8ed1f4b16
[Reporting] Update more Server Types for TaskManager (#74915)
* [Reporting] Update more Server Types for TaskManager

* remove some task manager references

* more strict

* more strict 2

* simplify

* fix test

* fix test

* routing validation unused types cleanup

* remove more casting in route handlers

* feedback changes

* original comment was fine

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-13 14:33:27 -07:00
Ahmad Bamieh ee9a8d29b1
[I18n] verify select icu-message options are in english (#74963)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-13 23:44:17 +03:00
Luke Elmers fe017f52dd
Make data.search.aggs available on the server. (#74472) 2020-08-13 13:38:16 -06:00
Michael Olorunnisola c34e30ed0b
[Security Solution][Resolver] Graph Control Tests and Update Simulator Selectors (#74680)
Co-authored-by: oatkiller <robert.austin@elastic.co>
2020-08-13 14:55:43 -04:00
Melissa Alvarez 479a991b98
[ML] DF Analytics: allow failed job to be stopped by force via the UI (#74710)
* allow force stop from ui if job is failed

* update wording in confirm modal
2020-08-13 14:17:33 -04:00
Zacqary Adam Xeper cdc7d25561
[Metrics UI] Fix inventory footer misalignment (#74707) 2020-08-13 12:21:29 -05:00
Spencer 4c810be335
Remove legacy optimizer (#73154)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-13 09:08:44 -07:00
Jonathan Budzenski 6a85e893f7 skip test Reporting paginates content #74922 2020-08-13 10:31:11 -05:00
Zacqary Adam Xeper 8095c7ba15
[Metrics UI] Add Jest tests for alert previews (#74890) 2020-08-13 09:32:14 -05:00
Jean-Louis Leysens 50f332867a
[Ingest Pipelines] Processor forms for processors A-D (#72849)
* First few processors of the first batch

- Also refactored options to live in scoped objects to avoid
  overriding type (important fix!)
- Have not polished copy or form layout.

* add type to shared imports

* Refactors for repeated fields and added forms

- date_index_name
- dissect
- dot_expander
- drop

Fields refactored:

- Field
- Ignore missing

* Fix broken imports and some other small refactors

* added text editor field and updated pattern and if fields

* Large copy improvements and updates and other small refactors

- Added help text for all fields
- Updated layout so that required fields are always on first
- Replaced circle radio group with a select drop down

* update circle shape type field to select

* Added "long" option for convert type

* fix path import

* fix types and i18n

* add validation for dot expander fix append value to be a combobox

* fix i18n

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-13 14:57:04 +02:00
Cauê Marcondes c7a46d583a
[Observability] change ingest manager link (#74928)
* chaning ingest manager link

* chaning ingest manager link
2020-08-13 13:41:39 +02:00
Gidi Meir Morris eb03295f85
[Task manager] Prevents edge case where already running tasks are reschedule every polling interval (#74606)
Fixes flaky tests in Task Manager and Alerting.

The fix in #73244 was correct, but it missed an edge case which causes the already running task to be rescheduled over and over.

This prevents that edge case which was effecting both TM in general and Alerting specifically.
2020-08-13 12:20:38 +01:00
Angela Chuang 1a09c878b1
[Security Solution] Fix the status of timelines' bulk actions (#74560)
* fix bulk actions

* fix lint error

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-13 10:24:40 +01:00
Liza Katz 290f9bfde2
Data plugin: Suggested enhance pattern (#74505)
* improve test stability

* Enhance pattern

* fix tests

* fix test

* Rename enhance to __enhance

* Deleted unnecessary attribute

* ISearchInterceptor interface

* docs

* Clean up internal docs

* jest

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-13 11:28:39 +03:00
Walter Rafelsberger b249af128e
Use jest.useFakeTimers instead of hard coded timeout for tooltip tests. (#74642)
Refactor to use jest.useFakeTimers().
2020-08-13 09:38:15 +02:00
Frank Hassanabad db357a212d
[Security Solution][lists] Adds tests for exception lists and items part 2 (#74815)
## Summary

This is the basics of end to end tests, so there could be a lot more, but this ties to cover the basics of the tests.

Test with:
```ts
node scripts/functional_tests --config x-pack/test/lists_api_integration/security_and_spaces/config.ts
```

Adds these tests for the route counter parts:
* create_exception_list_items.ts
* create_exception_lists.ts
* delete_exception_list_items.ts
* delete_exception_lists.ts
* find_exception_list_items.ts
* find_exception_lists.ts
* read_exception_list_items.ts
* read_exception_lists.ts
* update_exception_list_items.ts
* update_exception_lists.ts

Fixes a few minor strings, other tests, but no large bugs found with these tests

### Checklist

- [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
2020-08-12 22:32:05 -06:00
Brent Kimmel e2ef219a7c
[Security Solution][Resolver] fix presentation role on edgeline (#74869)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-12 21:02:00 -04:00
Ryland Herrick 4ca52e678a
[Security Solution][Detections] Refactor ML calls for newest ML permissions (#74582)
## Summary

Addresses https://github.com/elastic/kibana/issues/73567.

ML Users (role: `machine_learning_user`) were previously able to invoke the ML Recognizer API, which we use to get not-yet-installed ML Jobs relevant to our index patterns. As of https://github.com/elastic/kibana/pull/64662 this is not true, and so we receive errors from components using the underlying hook, `useSiemJobs`.

To solve this I've created two separate hooks to replace `useSiemJobs`:

* `useSecurityJobs`
  * used on ML Popover
  * includes uninstalled ML Jobs
  * checks (and returns) `isMlAdmin` before fetching data
* `useInstalledSecurityJobs`
  * used on ML Jobs Dropdown and Anomalies Table
  * includes only installed ML Jobs
  * checks (and returns) `isMlUser` before fetching data

Note that we while we now receive the knowledge to do so, we do not always inform the user in the case of invalid permissions, and instead have the following behaviors:

#### User has insufficient license
* ML Popover:  shows an upgrade CTA
* Anomalies Tables: show no data
* Rule Creation: ML Rule option is disabled, shows upgrade CTA
* Rule Details: ML Job Id is displayed as text
#### User is ML User
* ML Popover:  not shown
* Anomalies Tables: show no data
* Rule Creation: ML Rule option is disabled
* Rule Details: ML Job Id is displayed as text
#### User is ML Admin
* ML Popover:  shown
* Anomalies Tables: show data __for installed ML Jobs__
  * This is the same as previous logic, but worth calling out that you can't view historical anomalies
* Rule Creation: ML Rule option is enabled, all ML Jobs available
* Rule Details: ML Job Id is displayed as hyperlink, job status badge shown

### 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

### For maintainers

- [ ] This was checked for breaking API changes and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)
2020-08-12 18:26:06 -06:00
Josh Dover 0eee111cf3
[reporting] Pass along generic parameters in high-order route handler (#74892) 2020-08-12 15:24:29 -06:00
Yuliia Naumenko 124bd126f8
Migrated last pieces of legacy fixture code (#74470)
* Migrated last pieces of legacy fixture code

* Implemented own server for webhook simulator

* Fixed type checks. Moved slack simulator to own server

* close server after tests run

* Fixed due to comments

* fixed failing tests
2020-08-12 14:08:02 -07:00
Caroline Horn 5b64a4cdfe
Empty index patterns page re-design (#68819)
Empty index patterns page re-design
2020-08-12 15:58:16 -05:00
Josh Dover 5d82ac15cb
Revert "[reporting] Pass along generic parameters in high-order route handler" (#74891)
This reverts commit 041b78cec1.
2020-08-12 12:46:13 -06:00
Josh Dover 041b78cec1
[reporting] Pass along generic parameters in high-order route handler (#74879) 2020-08-12 12:45:38 -06:00
Constance 6ee2460ebc
[Enterprise Search] Add solution-level side navigation (#74705)
* Add basic layout/sidebar blocking

- note: we should *not* set left: 0 / top: 0 etc., as this can interfere with Kibana's existing UI (e.g. docked navigation, telemetry callout)

* Add sidebar styles + static links

* Refactor SideNav to be a reusable component

- So that Workplace Search can reuse the same layout but pass in their own custom nav
+ Refactor AppSearch to use Layout in router

* Refactor all views to account for in-router Layout

* Fix root redirects not working as expected

- If enterpriseSearchUrl hasn't been set, all pages should redirect to SetupGuide, not just root
- The engines redirect simply wasn't working at all - it would always show a blank page when '/' was clicked in the Kibana breadcrumbs. Not sure if this is a Kibana issue - had to change to a component load to fix
+ Simplify index.test.tsx (probably unreasonable and not super helpful to add assertions for each new route)

* Implement active styling for links

* Fix failing location tests

- By adding a new useLocation mock
+ add SideNavLink active class test

TODO: I should probably rename react_router_history.mock to just react_router.mock

* Add responsive toggle + styling

* Add navigation accessibility attributes/controls

* [Feedback] Update mobile UX to close menu on link click/navigation

- This requires updating our EUI/React Router components to accept and run custom onClick events
- Also requires adding a new ReactContext to pass down closeNavigation, but that's not too onerous thanks to useContext
2020-08-12 09:33:10 -07:00
Brent Kimmel 34195271c5
[Security Solution][Resolver]Enzyme test related events closing (#74811) 2020-08-12 11:56:05 -04:00
Jean-Louis Leysens 0e5ac40b00
Support sentence case names for known processors (#74847) 2020-08-12 17:45:12 +02:00
Steph Milovic fb2b9a46af
[Security Solution] [Cases] Bugfix for special character tags filtering (#74849) 2020-08-12 10:41:12 -05:00
Angela Chuang be7e21c925
[Security Solution] put back savedObjectId in error message (#74775)
* put back savedObjectId in error message

* fix type error
2020-08-12 16:14:48 +01:00
MadameSheema 64b609b081
[SIEM] Adds pin event to timeline cypress test (#74256)
* adds 'pin event' cypress test

* refactors code

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-12 17:09:16 +02:00
Kerry Gallagher 2e38f5a705
[Logs UI] Return 403s rather than 500s for ML privilege errors (#74506)
* Add ML privileges error checks to all routes
2020-08-12 15:22:00 +01:00
Kevin Logan 7f33e72ba7
[SECURITY_SOLUTION] fix unenrolled query (#74798) 2020-08-12 09:20:55 -04:00
Nathan Reese ed69f9b85a
[maps] implement save and return from dashboard (#74303)
* pass originatingApp into App

* save and return top nav option

* clean up

* navigate to originating app

* functional test

* tslint

* cutOriginatingAppConnection

* add functional test for cutting originating app flow

* one more fix for cutting originator app and another functional test to verify

* typo

* review feedback

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-12 07:09:49 -06:00
Robert Oskamp 178afd71fc
[ML] Functional tests - stabilize DFA dependent variable input (#74829)
This PR stabilizes the dependent variable input during tests by explicitly waiting for the options to load.
2020-08-12 13:42:43 +02:00
James Gowdy a81059b14b
[ML] Removing full lodash library imports (#74742)
* [ML] Removing full lodash library imports

* more has

* fixing missing filter

* removing _

* removing unused file

* removing first use

* removing comment
2020-08-12 09:24:43 +01:00
Liza Katz 506e9537bf
[Search] Server strategy example (#71679)
* Server strategy example

* Add tsconfig
Renamed is_partial to isPartial
Added isPartial and isRunning to OSS response type

* Docs + remove unused sample code

* Fix test naming of arguments

* ts

* ts fix

* Add filters and query input selector

* Update examples/search_examples/public/components/app.tsx

Co-authored-by: Lukas Olson <olson.lukas@gmail.com>

* Use new service

* exapmle plugin ts

* unsubscribe + use timefilter

* typo

* docs

* Add comments and use agg config

* Added agg configs
Added field selector
Added a custom input param

* Adding getEsQuery to query service (??)

* Add server side example

* docs

* caps

* list plugin in examples page

* fix typo

* Update examples/search_examples/public/application.tsx

Co-authored-by: Lukas Olson <olson.lukas@gmail.com>

* Update examples/search_examples/public/application.tsx

Co-authored-by: Lukas Olson <olson.lukas@gmail.com>

* Update examples/search_examples/public/components/app.tsx

Co-authored-by: Lukas Olson <olson.lukas@gmail.com>

* Update examples/search_examples/public/components/app.tsx

Co-authored-by: Lukas Olson <olson.lukas@gmail.com>

* Update examples/search_examples/public/components/app.tsx

Co-authored-by: Lukas Olson <olson.lukas@gmail.com>

* eslint

Co-authored-by: Lukas Olson <olson.lukas@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-11 23:28:43 +03:00
Tim Sullivan d78644229e
[Reporting] Fix and test for Listing of Reports (#74453)
* [Reporting] Fix and test for Listing of Reports

* add sleeps

* await selector instead of sleep

* reduce changes

* cleanup after csv generated

* fix snapshot
2020-08-11 12:59:23 -07:00
Nathan Reese 7d3a1ff218
[maps] fix drawing shapes (#74689)
* [maps] fix drawing shapes

* prevent re-render on state change
2020-08-11 12:27:24 -06:00
Robert Austin bd8761ee15
[Resolver] Improve simulator. Add more click-through tests and panel tests. (#74601)
### Improved the simulator.
* Replace `mapStateTransitions` with `map`. The usage and interface are the same, but `map` is not dependent on redux state. This will work for parts of the app that don't use redux (aka EUI). `map` also forces any `AutoSizer` instances used by EUI to show their full contents. `AutoSizer` works but it doesn't behave as expected in JSDOM. With this hack in place, we can bypass `AutoSizer`. Going forward, we should make sure to use something other than `EuiSelectable` for the dropdowns
* Removed the `connectEnzymeWrapperAndStore` test helper. The new `map` simulator method doesn't rely on redux so we no longer need this explicit sync.
* The simulator can receive a memory history instance. This allows tests to pass in a precreated / controlled memory instance. Useful for testing the query string. This design is not final. Instead we could have an 'intiialHistorySearch' parameter that sets the query string on instantiation as well as 'pushHistory' and 'replaceHistory' methods?
* `findInDom` is now called `domNodes`.
* `processNodeElementLooksSelected` and `processNodeElementLooksUnselected` are gone. Instead use `selectedProcessNode` and `unselectedProcessNode` to find the wrappers and  assert that they wrappers contain the nodes you are interested in.
* Added `processNodeSubmenu` method that gets the submenu that comes up when you click the events button on a process node.
* Added `nodeListElement` method. This returns the list of nodes that shows up in the panel. Name is not final.
* Added `nodeListItems` method. This returns the list item elements in the node list. Name is not final.
* Added `nodeListNodeLinks` method. This returns the links in the items in the node list. Name is not final.
* Added `nodeDetailElement` method. This gets the element that contains details about a node. Name is not final.
* Added `nodeDetailBreadcrumbNodeListLink` method. Returns the link rendered in the breadcrumbs of the node detail view. Takes the user to the node list. Name is not final.
* Added `nodeDetailViewTitle` method. This returns the title of the node detail view. Name is not final.
* Added `nodeDetailDescriptionListEntries` method. This returns an entries list of the details in the node detail view. Name is not final
* Added `resolveWrapper` method. Pass this a function that returns a `ReactWrapper`. The method will evaluate the returned wrapper after each event loop and return it once it isn't empty.

### Improved our mocks
* We had a DataAccessLayer and ResolverTree mock named 'one_ancestor_two_children` that actually had no ancestors. Renamed them to `no_ancestors_two_children`.
* New DataAccessLayer mock called `noAncestorsTwoChildrenWithRelatedEventsOnOrigin`

### Added new 'clickthrough' suite test
* Added new test in the 'clickthrough' suite that asserts that a user can click the 'related events' button on a node and see the list of related event categories in the submenu.

### Improved the Resolver event model
* Added `timestampAsDateSafeVersion` to the event model. This gets a `Date` object for the timestamp. (We still need make it clear that this model is ResolverSpecific)

### New `urlSearch` test helper.
Use `urlSearch` when testing Resolver's interaction with the browser location. It calculates the expected 'search' value based on some Resolver specific parameters.
* Use this to calculate a URL and then populate the memory history with this URL. This will allow you to see if Resolver loads correctly based on the URL state.
* Use this to calculate the expected URL based on Resolver's current state.

### Added new 'panel' test
* If Resolver is loaded with a url search parameter that selects a node, the node's details are shown in the panel.
* When a history.push occurs that sets a search parameter that selects a node, the details of that node are shown.
* Check that the url search is updated when the user interacts with the panel
* Check that the panel shows the correct details for a node. (except for the timestamp. See TODO)

### Changed `data-test-subj`s
* Removed `resolver:panel`. This was used on a wrapper element that we expect to remove soon. 
* Added `resolver:node-detail:breadcrumbs:node-list-link` for the buttons in the breadcrumb in the panel.
* Added `resolver:node-detail:title` for the title element in the node detail view.
* Added `resolver:node-detail:entry-title` and `resolver:node-detail:entry-description` for the details shown about a process in the node detail view. 
* Added `resolver:node-list:node-link`. This is the link shown for each node in the node list.
* added `resolver:node-list:item` to each list item in the node list view.

### Removed dead code
* `map.tsx` wasn't being used. It was renamed but the old version wasn't deleted.

### Improved the node detail view
* Show the timestamp for a node's process event even if the timestamp is the unix epoch. Note: this is technically a bug fix but the bug is very obscure. 
* Show the PID for a node's process event when the PID is 0. Note: this is a bug fix.
2020-08-11 13:57:56 -04:00
Alexey Antonov 489b134927
Deprecate schema-less specs in Vega (#73805)
* Deprecate schema-less specs in Vega

Closes #30951

* update an error Message

* update tests

* update error message

* Update vega_parser.ts

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-11 20:47:20 +03:00
Dan Panzarella 80a5c4bef7
[Security Solution] Rename Administration > Hosts subtab to Endpoints (#74287) 2020-08-11 13:31:59 -04:00
Stratoula Kalafateli 0cfc7b464c
[Lens] Add styling options for x and y axes on the settings popover (#71829)
* [Lens] Add styling options for x axis on the settings popover

* ts related changes

* Changes to the popover's design and y-axis implementatin

* fix types and add unit tests

* Add extra translations

* Fix functional test and change the logic of the yTitle

* fixes

* fix showTitle settings bug

* Fix ticklabels bug on y axes

* fix some tests

* Change the user flow on x and y titles on settings popover and enable the gridlines by default

* disable linter warning

* PR Comments

* Add a comment to callback to explain the decision to listen only to open changes

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-11 20:10:35 +03:00
Nathan Reese 75b8a3cb71
[Maps] add initial location option that fits to data bounds (#74583)
* [Maps] add initial location option that fits to data bounds

* update navigation_panel snapshot

* add functional test to ensure sync is called when auto fit to bounds with no data

* add functional test for auto fit to bounds on map load

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-11 10:18:36 -06:00
Corey Robertson bc0b4821ad
[Canvas][tech-debt] Convert renderers (#74134)
* Convert renderers to typescript

* Fix typo

* Fix type issues

* Fixes

* Fix issue with data table render

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-11 11:36:08 -04:00
Frank Hassanabad 461d68418c
[security solutions][lists] Adds end to end tests (#74473)
## Summary

Adds initial set of end to end tests for lists

You can run all of these with the command from kibana root:

```ts
node scripts/functional_tests --config x-pack/test/lists_api_integration/security_and_spaces/config.ts
```

Fixes a few minor bugs found such as...
* Validation for importing lists was not checking if the indexes were created first
* Some wording for the error messages had duplicate words within them

### 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-08-11 09:25:04 -06:00
Brittany Joiner f621b0e2b6
pluralized for occurrences vs occurrence (#74564)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-11 09:20:15 -05:00
Alison Goryachev bf666910b0
[Ingest pipelines] Implement tabs in processor flyout (#74469) 2020-08-11 10:03:41 -04:00
Gidi Meir Morris 67025579ba
[Event log] Use Alerts client & Actions client when fetching these types of SOs (#73257)
Introduces a pluggable API to Event Log which allows custom Providers for Saved Objects which is used to ensure a user is authorised to get the Saved Object referenced in the Event Log whenever the find api is called.
2020-08-11 15:00:02 +01:00
Tyler Smalley 9782ac4b7f
Bump chalk to 4.1.0 (#73397)
https://github.com/chalk/chalk/releases

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

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-11 06:47:33 -07:00
Matthew Kime 6c63b0d40b
Index pattern field list - transition away from extending array - introduce and use getAll() (#74718)
- Introduce `indexPattern.fields.getAll()` and use where possible
- Rename `index_patterns/fields/fields.mocks.ts.ts => index_patterns/fields/fields.mocks.ts`
- FieldSpec - make `count` and `scripted` fields optional
- use `indexPattern.fields.getByName` instead of filter where possible
2020-08-11 07:54:58 -05:00
Xavier Mouligneau d91e024f66
[SECURITY] Bugs css/inspect (#74711)
* Fix inspection button when using topN

* css left over
2020-08-11 08:52:38 -04:00
igoristic 5665ce2cd2
Fixed grammar (#74725) 2020-08-11 06:40:22 -04:00
Yulia Čech a4ec4332c6
[ILM] Convert node details flyout to TS (#73707)
* [ILM] Convert node allocation component to TS and use hooks

* [ILM] Fix jest tests

* [ILM] Fix i18n check

* [ILM] Implement code review suggestions

* [ILM] Fix type check, docs link and button maxWidth in NodeAllocation component

* Fix internaliation error

* [ILM] Convert node details flyout to TS

* [ILM] Fix useState declaration

* [ILM] Fix useState declaration

* [ILM] Fix jest test

* [ILM] Change error message when unable to load node attributes

* [ILM] Change error message when unable to load node details

* [ILM] Delete a period in error callout

* [ILM] Delete a period in error callout

* [ILM] Convert node details flyout to TS

* [ILM] Fix i18n check

* [ILM] Fix useState declaration

* [ILM] Fix useState declaration

* [ILM] Fix jest test

* [ILM] Change error message when unable to load node details

* [ILM] Delete a period in error callout

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-11 11:32:05 +02:00
Jean-Louis Leysens 92289b63ef
[Ingest Node Pipelines] Sentence-case processor names (#74645)
* wip on fixing processor names

* added comment

* fix Jest test element selector

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-11 10:05:54 +02:00
Thomas Watson ce6011e4d5
Bump angular dependency from 1.7.9 to 1.8.0 (#74482) 2020-08-11 10:05:44 +02:00
James Gowdy 8d9bafeb57
[ML] Fixing schema for custom rule conditions (#74676)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-11 09:01:19 +01:00
James Gowdy 01d8f00b50
[ML] Refactor in preparation for new es client (#74552)
* [ML] Refactor in preparation for new es client

* removing commented out code

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-11 08:53:16 +01:00
James Gowdy 6bea373e8f
[ML] Adding initial file analysis overrides (#74376)
* [ML] Adding initial file analysis overrides

* using common default sample lines

* correcting bottom padding

* adding missed padding

* code clean up

* fixing translations

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-11 08:47:26 +01:00
Joel Griffith ae529879f2
Allow any hostname for chromium proxy bypass (#74693)
* Allow any hostname for chromium proxy bypass

* Adds a test for the proxy bypass config

* Add wildcard to test
2020-08-10 16:07:12 -07:00
Melissa Alvarez 4ee483be23
[ML] ML on Kibana Management: Add ability to pass a group ID filter to job management page (#74533)
* handle group id in url for anomaly detection

* filter analytics list by group id.

* handle list of groupIds

* ensure analytics can handle jobid in url. rename util function

* add tests for getSelectedIdFromUrl and getGroupQueryText

* keep groupIds as array of strings and jobId as single string

* fix tests and update types
2020-08-10 17:18:36 -04:00
Zacqary Adam Xeper 8f15621cbd
[Metrics UI] Fix No Data preview pluralization (#74399)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-10 14:35:44 -05:00
Michael Olorunnisola 6eb0d116b0
[Bug][Security_Solution][Telemetry] Capitalize S in macOS (#74688) 2020-08-10 15:30:22 -04:00
Sandra Gonzales 543109b601
[Ingest Manager] stop creating events-* index pattern and placeholder index (#74683)
* stop creating events-* index pattern and indices

* add integration test to check for placeholder indices
2020-08-10 13:52:30 -05:00
Constance 697cd6412e
[Enterprise Search] Update the browser/document title on plugin navigation (#74392)
* Rename kibana_breadcrumbs to kibana_chrome

- in anticipation of upcoming refactor where SetPageChrome now handles document title as well as Kibana breadcrumbs
+ cleanup exports

* Add generate_title helpers

- will be used by new set_chrome helper

* Add setDocTitle context + behavior to set_chrome

+ refactor set_chrome.test.tsx:
  - add title tests
  - add SetWorkplaceSearchChrome test to increase coverage
  - clean up inner/outer call in favor of simpler mocks/imports
  - simplify isRoot tests

* Update plugins to set product titles
- on mount but before render

* Copy feedback - change pipe separator to hyphen

- to match ' - Elastic'

* Add functional tests confirming that document titles updated
2020-08-10 10:37:12 -07:00
Nathan Reese ed34d6fe30
[maps] convert vector style properties to TS (#74553)
* [maps] convert vector style properties to TS

* more conversionts

* tslint cleanup

* final tslint fixes

* update snapshots for bug fix

* review feedback

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-10 10:46:11 -06:00
Vignesh Shanmugam 415a32c86f
fix: update apm agents to catch abort requests (#74658) 2020-08-10 18:06:20 +02:00
Jonathan Buttner 7fd2c2bed2
[Security Solution] Resolver children pagination (#74603)
* Handle info and change events for children

* Adding sequence

* Fixing children pagination

* Fixing tests

* Adding docs
2020-08-10 11:54:22 -04:00
Melissa Alvarez a6615c6141
add memoryStatus to df analytics page and analytics table in management (#74570) 2020-08-10 11:50:18 -04:00
Jonathan Buttner b4b6428c1c
[Ingest Manager] Allow prerelease in package version (#74452)
* Allow prerelease in version

* Adding integration test for prerelease version of a package

* Tests for invalid package key

* Removing inter-test dependency
2020-08-10 11:18:30 -04:00
Joe Reuter c1b55d5739
[Lens] Clear out all attribute properties before updating (#74483) 2020-08-10 15:06:58 +02:00
Shahzad 244ed04b24
[Uptime] Fix full reloads while navigating to alert/ml (#73796)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-10 15:02:35 +02:00
Robert Oskamp f7f2988aa2
[ML] Functional tests - stabilize DFA job type check (#74631)
This PR stabilizes the data frame analytics job type assertion by adding a retry.
2020-08-10 13:04:57 +02:00
Dmitry Lemeshko ce025732a1
add retry for checking Add button (#74551)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-10 10:09:30 +02:00
Clint Andrew Hall c6c300e8f8
[Canvas][tech-debt] Add Typescript to apps directory (#73766)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-07 11:21:44 -04:00
Robert Austin 7dc33f9ba8
[Resolver] UI tests for the panel and bug fix (#74421)
* Change the way the resolver simulator works
* refactor resolver tree and data access layer mocks
* Fix bug where timestamp and pid sometimes don't show in the node detail view
* add a few tests for the panel (not done, but worth committing.)
2020-08-07 09:15:35 -04:00
Sandra Gonzales 5d9f329a36
[Ingest Manager] Integration tests for updating a package (#74593)
* add integration tests for updating a package's assets

* update to update tests and change to dataset to data_stream

* add datastream test
2020-08-07 08:03:13 -05:00
Xavier Mouligneau fbd79ea726
skip query of detections page when we do not have .siem-signals index (#74580)
* skip query of detections page when we do not have .siem-signals index

* review I
2020-08-06 19:41:18 -04:00
Yara Tercero 979bdaa56f
[Security Solution][Tech Debt] - Cleans up error formatter to not return duplicate error messages (#74600)
## Summary

Using the `formatErrors` util would result in duplicate error messages sometimes. Was noticing this in particular when using union types, where the type validation would check every item in a union and report an error for each one. This resulted in large, repeating errors. 

Used `uniq` to filter out duplicates. Updated unit tests.
2020-08-06 19:37:38 -04:00
Shahzad ccf8e2b045
[uptime] Ping Redirects (#65292) 2020-08-06 22:45:55 +02:00
Kevin Qualters 810ff87afb
[Security Solution][Resolver] standardize resolver panel component naming (#74537) 2020-08-06 16:29:09 -04:00
Mikhail Shustov 47fdd59e1c
bump babel deps to support TS v4 (#74495) 2020-08-06 22:00:40 +02:00
Chris Roberson e807ddd1c1
[Monitoring] Handle getClient call throwing an exception (#74550)
* This call can throw an exception in dist builds with ssl disabled

* Fix typo
2020-08-06 15:33:24 -04:00
Sonja Krause-Harder ebe46c0580
Make test less brittle when registry is changed. (#74554) 2020-08-06 21:30:24 +02:00
Nathan Reese b71b9c249a
[maps] fix swap hidden/show icons in layer action panel (#74549) 2020-08-06 12:08:57 -06:00
Devon Thomson dad5c72a0c
[Fix] Lose OriginatingApp Connection on Save After Create new (#74420)
Fixed typo created in #72725 which caused the originatingApp connection not to be lost properly after Create new
2020-08-06 13:24:54 -04:00
Marta Bondyra fa2251dd31
[Lens] Add functional tests on chart transitions and pie chart (#74083) 2020-08-06 18:52:21 +02:00
Jen Huang 042254f026
[Ingest Manager] Update dataset.* to data_stream.* in package config SO attributes (#74414)
* Update `dataset.*` to `data_stream.*` in full agent config yaml

* Replace `dataset.*` with `data_stream.*` in package config saved object attributes
2020-08-06 09:17:20 -07:00
Yulia Čech d7644991d9
[ILM] Convert node allocation component to TS and use hooks (#72888)
* [ILM] Convert node allocation component to TS and use hooks

* [ILM] Fix jest tests

* [ILM] Fix i18n check

* [ILM] Implement code review suggestions

* [ILM] Fix type check, docs link and button maxWidth in NodeAllocation component

* Fix internaliation error

* [ILM] Change error message when unable to load node attributes

* [ILM] Delete a period in error callout

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-06 18:06:13 +02:00
Xavier Mouligneau d00035422a
[SECURITY] Fix imports (#74528)
* simple solution to avoid duplicate request

* fix import of deepEqual
2020-08-06 11:44:14 -04:00
Walter Rafelsberger 11c74bc03f
[ML] Fix analytics list on management page. (#74254)
The analytics job page in the Kibana management section didn't have the context provided by React Router and Kibana's own history object so the page crashed on load. The context is necessary to construct the correct URLs to navigate to the ML plugin itself.
This PR fixes it by wrapping the management page in <Router history={history} />. Also adds functional tests to cover navigating to the jobs list pages in stack management.
2020-08-06 15:35:53 +02:00
Anton Dosov 3064c6eceb
Improve state sync error handling (#74264)
Fixes #71461 regression since 7.7

New state syncing utils didn't properly handle errors,
Errors happening during URL parsing or writing wasn't handled, so state syncing could stop or in worth case blow out. (see #71461)

There are not much scenarios where missing proper error handling could really impact users, except the one described in #71461:

Kibana users state:storeInSessionStorage
Users often intuitively share hashed dashboard urls directly
When someone opens those urls - there is a blank screen with warning
In 7.6 - dashboard would still load with default state.
Since 7.7 these still could be achieved by removing query params for URL, but it is not obvious for regular users.

This PR makes sure that behaviour is similar to one we had before 7.7.


Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-06 15:34:32 +02:00
Robert Austin d43d45d77a
[Resolver] Safer types (#74366)
All mappings in Elasticsearch support arrays. They can also return null values or be missing. For example, a `keyword` mapping could return `null` or `[null]` or `[]` or `'hi'`, or `['hi', 'there']`. We need to handle these cases in order to avoid throwing an error. 

Specific and nuanced handling of these cases isn't the goal of this PR. This PR just introduces some helper types that can be used to assist you in writing defensive code. 

When dealing with an value that comes from ES, wrap the underlying type in `ECSField`. For example, if you have a `keyword` or `text` value coming from ES, cast it to `ECSField<string>`.

### Added New Resolver specific types
`ResolverEvent` has a new safe equivalent `SafeResolverEvent`. The constituent parts of `ResolverEvent` also have safe equivalents: `SafeEndpointEvent` and `SafeLegacyEndpointEvent`. Use these in your code for added type safety.

### New safe event methods
The event methods accept the unsafe `ResolverEvent`. Create new methods that accept the safe `SafeResolverEvent`. By keeping copies of both methods around we can gradually transition to the safe versions:

* `isLegacyEvent` has `isLegacyEventSafeVersion`
* `eventTimestamp` has `timestampSafeVersion`
* `eventName` has `processNameSafeVersion`
* `eventId` has `eventIDSafeVersion`
* `entityId` has `entityIDSafeVersion`
* `parentEntityId` has `parentEntityIDSafeVersion`
2020-08-06 09:26:00 -04:00
Xavier Mouligneau 8f98b72df8
[SECURITY] Bug investigate timeline (#74429)
* simple solution to avoid duplicate request

* fix investigate template timeline from template timeline
2020-08-06 09:19:59 -04:00
Felix Stürmer 152f41c3b0
[Logs UI] Replace deprecated getInjectedVar with NP spaces API (#74280)
* Replace getInjectedVar() with NP spaces API

* Fix typo in comment

* Fix typo in comment

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-06 15:18:49 +02:00
Vadim Dalecky bbfc4922d2
Disable in-chart "Explore underlying data" by default (#74332)
* fix: 🐛 disable in-chart "Explore underlying data" by default

* test: 💍 disable in-chart action functional test suite

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-06 15:07:14 +02:00
Joe Reuter 9186171ad1
[Lens] Document UI terminology (#72423) 2020-08-06 14:02:37 +02:00
Oliver Gupte 13fd9e39ea
Observability Overview fix extra basepath prepend for alerting fetch (#74465) 2020-08-06 10:12:48 +02:00
Marta Bondyra 626fbc2948
[Lens] Clean and inline disabling of react-hooks/exhaustive-deps eslint rule (#70010) 2020-08-06 10:10:09 +02:00
Matthias Wilhelm aa75f80afd
Skip "space with index pattern management disabled" functional test for cloud env (#74073)
* Skipped due to occasional flakiness in cloud env, cause by ingest management tests
2020-08-06 08:07:19 +02:00
Ryland Herrick f5c9aa8860
Filter out non-security jobs when collecting Detections telemetry (#74456)
Our jobs summary call returns all installed jobs regardless of group;
passing groups as jobIds does not perform group filtering.

This adds a helper predicate function on which to filter these results,
and updates tests accordingly.
2020-08-05 18:55:23 -05:00
Brent Kimmel dfad75ff1a
[Security Solution][Test] Enzyme test for related events button (#74411)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-05 18:46:56 -04:00
Kevin Logan 4ae6746c0b
[SECURITY_SOLUTION] add z-index to get over nav bar (#74427) 2020-08-05 18:32:22 -04:00
Jen Huang 9ef04e7fb2
Rename package configs SO to package policies (#74422) 2020-08-05 15:28:03 -07:00
spalger b001301f5a skip flaky suite (#71390)
(cherry picked from commit d0afbd887d)
2020-08-05 15:02:24 -07:00
Melissa Alvarez af358c94a3
[ML] DF Analytics: adds functional tests for edit form (#73885)
* add edit analytics functional test

* adds edit test service

* update edit test wording for clarity

* check flyout closes after edit

* rename testSubj for consitency
2020-08-05 17:58:40 -04:00
Jen Huang c655f50950
Rename agent configs SO to agent policies (#74397) 2020-08-05 12:51:58 -07:00
Zacqary Adam Xeper 0737241dec
[Metrics UI] Fix validating Metrics Explorer URL (#74311) 2020-08-05 13:13:22 -05:00
Eric Davis 1c428ffed7
fixing encoding issue with \ for enroll command (#74379) 2020-08-05 14:11:27 -04:00
Nicolas Ruflin c0bb5375e0
[Ingest Manager] Update package registry for testing to f6b01d (#74341)
Many changes went into the registry and the packages recently. This is updating to the most recent version of the registry distribution currently in production.


Co-authored-by: Sonja Krause-Harder <sonja.krause-harder@elastic.co>
2020-08-05 20:01:52 +02:00
Tim Roes c8597ec84b
Change experimental message for visualizations (#74354) 2020-08-05 19:52:00 +02:00
Gidi Meir Morris 41e3128ecd
[Alerting] Reload the Alerts List when alerts are deleted (#73715)
Reloads the entire Alerts list when alerts are deleted through the UI.
2020-08-05 18:48:09 +01:00
Constance 47b9aba3bf
[Enterprise Search] Fix/DRY out plugin i18n strings (#74323)
* i18n refactor

- DRY out plugin details to constants and correctly i18n-ize front-end-facing strings

* DRY out new i18n constants

- refactor instances of i18n.translate to use new constants

* Fix non-i18n'd breadcrumb strings

* PR feedback: swap out more plugin ID strings for constants
2020-08-05 10:12:25 -07:00
Melissa Alvarez 4150a234c8
update empty prompt in analytics list (#74174) 2020-08-05 12:43:58 -04:00
Gidi Meir Morris 5c770e5930
[Task Manager] Correctly handle running tasks when calling RunNow and reduce flakiness in related tests (#73244)
This PR addresses two issues which caused several tests to be flaky in TM.

When `runNow` was introduced to TM we added a pinned query which returned specific tasks by ID.
This query does not have the filter applied to it which causes task to return when they're already marked as `running` but we didn't address these correctly which caused flakyness in the tests.
This didn't cause a broken beahviour, but it did cause beahviour that was hard to reason about - we now address them correctly.

It seems that sometimes, especially if the ES queue is overworked, it can take some time for the update to the underlying task to be visible (we don't user `refresh:true` on purpose), so adding a wait for the index to refresh to make sure the task is updated in time for the next stage of the test.
2020-08-05 17:35:38 +01:00
Marta Bondyra cf6413ab2f
[Lens] fix chart switching when on VisualizationDimensionEditor (#70689) 2020-08-05 18:25:16 +02:00
Yara Tercero e23c5eafa1
[Security Solution][Exceptions] - Fixes builder overflow and updates ux for nested entries (#74262)
## Summary

- updates the builder nested entries so that the children do not display the parent path - so instead of `parent.child` it just shows `child`
- updates the builder to fix overflow issue
2020-08-05 12:10:28 -04:00
MadameSheema 549c256390
[SIEM] Adds rule override Cypress tests (#74367)
* implements rule override test

* refactors the code
2020-08-05 17:45:30 +02: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
Melissa Alvarez 3fb77fb546
[ML] DF Analytics creation wizard: show link to results (#74025)
* show view results card once job complete

* update types

* update types and move css to own file
2020-08-05 10:31:47 -04:00
Alison Goryachev bf22fe54e1
[Ingest Node Pipelines] Refactor pipeline simulator code (#72328) 2020-08-05 09:21:57 -04:00
Tim Roes f9fc83fb1d
Add README files for Kibana app plugins (#74277)
* Add README files for Kibana app plugins

* Update src/plugins/timelion/README.md

Co-authored-by: Matthias Wilhelm <ankertal@gmail.com>

* Update src/plugins/vis_type_vislib/README.md

Co-authored-by: Matthias Wilhelm <ankertal@gmail.com>

Co-authored-by: Matthias Wilhelm <ankertal@gmail.com>
2020-08-05 14:28:56 +02:00
Cauê Marcondes 7a1b09dcf1
[APM] Average for transaction error rate includes null values (#74345) 2020-08-05 14:28:13 +02:00
Sonja Krause-Harder b26bd6175d
[Ingest Manager] Adjust dataset aggs to use datastream fields instead (#74342)
* [Ingest Manager] Adjust dataset aggs to use datastream fields instead

Elastic Agent and Elasticsearch are switching over from using dataset.* to datastream.*. This adjust the aggregation on the dataset page to get the datastreams.

For this to work properly, the most recent version of Elasticsearch 7.9 must be used and is pending updates on all the packages to ship also the datastream fields, see https://github.com/elastic/integrations/pull/213

* Update datastream to data_stream

* Update data stream name generation

* Fix typo

* Temporarily use datastream instead of data_stream

* updating to use `data_stream` instead of `datastream`

Co-authored-by: ruflin <spam@ruflin.com>
Co-authored-by: Jen Huang <its.jenetic@gmail.com>
2020-08-05 13:48:11 +02:00
Dima Arnautov 8231b0ccfc
[ML] Fix initial plugin's bundle size (#74047)
* [ML] use dynamic imports

* [ML] fix react-use imports

* [ML] change embeddables imports

* [ML] embeddable exports

* [ML] move SCSS import

* [ML] management page styles

* [ML] refactor with types and constants files

* [ML] move declarations
2020-08-05 13:18:29 +02:00
John Schulz beb7b8245d
[Ingest Manager] prevent crash on unhandled rejection from setupIngestManager (#74300)
* Add test to ensure setup rejects if errors thrown.

* Return the promise from setup so test passes
2020-08-05 07:08:04 -04:00
Alejandro Fernández 22d6f09d31
[Logs UI] Correct trial period duration in anomaly splash screen (#74249) 2020-08-05 11:19:41 +02:00
spalger 7c60b09baa skip flaky suite (#74327) 2020-08-05 00:05:27 -07:00
Garrett Spong 22809274eb
[Security Solution][Detections] Fixes Severity Override not matching for Elastic Endpoint Security rule (#74317)
## Summary

Fixes an issue where the `Severity Override` would not match for the `Elastic Endpoint Security` rule. This is a temporary fix until we can provide more robust comparisons between the user provided `severityMapping.value` (string) and the `severityMapping.field`'s type.  

### 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-08-04 19:36:34 -06:00
Yara Tercero 6a77bec233
[Security Solution][Exceptions] - Fixes exceptions builder nested deletion issue and adds unit tests (#74250)
### Summary

- Updates logic for deleting exception item entries in the builder - found that there was a bug in deleting nested entries
- Adds more unit tests
2020-08-04 20:06:30 -04:00
Yuliia Naumenko 36f25e66e8
Fixed Alert details does not update page title and breadcrumb (#74214)
* Fixed Alert details does not update page title and breadcrumb

* Added alert name to details breadcrumb as a dynamic title

* Update x-pack/plugins/triggers_actions_ui/public/application/lib/breadcrumb.ts

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

Co-authored-by: Mike Côté <mikecote@users.noreply.github.com>
2020-08-04 16:00:56 -07:00
Tim Sullivan 372d8817a7
[Reporting] Shorten asset path to help CLI FS Watcher (#74185) 2020-08-04 14:27:44 -07:00
Angela Chuang 2eb67130f3
[Security Solution] styling for notes' panel (#74274)
* styling for notes' pannel

* styling

* remove additional const

* styling
2020-08-04 21:19:05 +01:00
Frank Hassanabad f506279a55
[Security Solution][Tech Debt] cleans up ts-ignore issues and some smaller linter issues (#74268)
## Summary

* Removes ts-ignore where it is not being used
* Replaces ts-ignore with the better alternative which is the ts-expect-error
2020-08-04 14:04:45 -06:00
Mike Côté 54e13ad6f6
Make the actions plugin support generics (#71439)
* Initial attempt at making the actions plugin support generics

* Export WebhookMethods

* Fix typings for registry

* Usage of Record<string, unknown>

* Apply feedback from Gidi

* Cleanup

* Fix validate_with_schema

* Cleanup pt2

* Fix failing tests

* Add generics to ActionType for ActionTypeExecutorResult

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-04 15:50:17 -04:00
Angela Chuang 8e0e228dbf
[Security Solution] Keep original note creator (#74203)
* keep original note creator

* unit test

* fix types

* typo

* wording
2020-08-04 15:35:00 -04:00
Chris Roberson de22caa0f6
[Monitoring] Ensure setup mode works on cloud but only for alerts (#73127)
* Ensure setup mode works on cloud but only for alerts

* Update snapshot

* Update translations

* Restructure tests to understand the failure better

* PR feedback

* Backwards, whoops

* Remove commented out code

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-04 13:32:21 -04:00
Thomas Neirynck 3067184c45
[Maps] Custom color ramps should show correctly on the map for mvt layers (#74169) 2020-08-04 13:30:09 -04:00
Brian Seeders 0ca8e99a9f
[CI] Add pipeline task queue framework and merge workers into one (#71268) 2020-08-04 13:13:51 -04:00
Jonathan Buttner 2dea17a8d0
Using msearch for tree api endpoint (#73813) 2020-08-04 12:54:20 -04:00
Kerry Gallagher 89dba39273
Handle modifier keys (#74237) 2020-08-04 17:13:32 +01:00
Angela Chuang b42f64d1a2
[Security Solution] Load prepackage timelines by default (#74209)
* load prepackage timelines by default

* fix unit tests
2020-08-04 16:57:53 +01:00
Sandra Gonzales 8e0ae5ffd1
add force install option (#74172) 2020-08-04 10:54:11 -05:00
Ben Skelker f3fbb7d79f
[Security Solution]Updates exception options and setting text (#73769)
* updates exception text

* updates modal text

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-04 17:42:51 +03:00
Poff Poffenberger 7208a5746a
[Canvas] Fix Custom Element functional test (and remove skip) (#73727)
* Remove skip of custom elements
2020-08-04 09:18:47 -05:00
Patryk Kopyciński ecc7fcec40
[Security Solution] Fix Fullscreen view (#74236) 2020-08-04 15:56:18 +02:00