Commit graph

3926 commits

Author SHA1 Message Date
James Gowdy ede8432ac7
[ML] Improvements to job saved object sync (#101899)
* [ML] Improvements to job saved object sync

* refactor

* adding testsadding testsadding testsadding testsadding testsadding testsadding testsadding tests

* updating test label

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-15 14:10:24 +01:00
Alejandro Fernández Gómez 0d6ce5da27
[Uptime] Skip flaky test (#102163) 2021-06-15 06:38:52 -04:00
Thomas Neirynck 6456c49e2c
[Maps] Remove jitter from bounds-coordinates (#100717) 2021-06-15 11:13:27 +02:00
Joe Reuter e418a895c3
reduce inner timeout (#102081) 2021-06-15 09:44:43 +02:00
Jean-Louis Leysens f70542abe2
[Fleet] Adjust add integration flow (#101714)
* Initial commit, very WIP

- added link to the integrations UI instead of add integration
  in fleet
- added a new piece of route state that gets passed to integration
  from fleet when browsing integrations for a policy
- when the integration is being added the page will send the user
  back to the policy overview instead of back to integrations UI

* remove unnecessary agent policy clear function

* added # to path so that navigation is correctly handled

* added logic to read the forward agent policy id

* remove inline select integration package from fleet add integration

* updated toast notification

* using query parameter to pass policy id back to create policy package page

* removed policyId from route path

* fix type issue

* updated the select agent field layout per the designs

* simpified item rendering in combobox and fixed combobox z-index issue

* added comment

* fix types and i18n

* updated icon and removed unused i18n

* refactor to using styled components for cusomt z-index styling

* attempt to fix integration test

* added scroll functionality for dealing with fixed footers that might be obstructing content

* fix scroll direction!

* attempting another scroll algorithm

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-15 09:26:37 +02:00
Apoorva Joshi 35f9625265
[ML] Adds Authentication module with six ML jobs for ECS data (Auditbeat, Winlogbeat, Filebeat and Logs) (#101840)
* Adding Security Authentication jobs in 7.14

* Renamed some jobs

* Changing memory limits and linting change

* Linting fix

* Changed the order

* Adding module to ml_modules.tsx

* Update recognize_module.ts

this test modules uses older Auditbeat data which predates the event.category field so the test has to be skipped per https://elastic.zoom.us/j/93000943632?pwd=TmpvNWhtYUNzMUc0c0N6Tlc2QlVPZz09

* Update recognize_module.ts

needs to be a single line

* Update recognize_module.ts

Some linters want spaces and some linters want no spaces. This linter wants spaces.

* descriptions

added description text

* Update auth_rare_hour_for_a_user.json

removed a wayward newline char

* Minor nitpicking

* memory limits

raised memory limits to 128mb which is larger than the highest observed peak model bytes for the most memory hungry jobs in this event class.

Co-authored-by: Craig <mailredirector36@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-14 12:36:08 -07:00
Domenico Andreoli 8bdc0d7b25
Fix esArchiver path in the Jenkins context (#102095) 2021-06-14 21:31:57 +02:00
Kerry Gallagher 8f5dad98a1
[Logs / Metrics UI] Convert logs and metrics pages to the new Observability page template (#101239)
* Convert Logs and Metrics pages to use the Observability page template
2021-06-14 19:28:08 +01:00
Dario Gieselaar 0993a1c321
[APM] Display automatic deployment annotations correctly (#102020) 2021-06-14 15:26:13 +02:00
Robert Oskamp 150198404a
[ML] Functional tests - stabilize alerting flyout test (#102030)
This PR stabilizes and re-activates the ML alerting flyout test suite.
2021-06-14 14:55:26 +02:00
Gidi Meir Morris daa3f62cda
[Task Manager] adds capacity estimation to the TM health endpoint (#100475)
Adds Capacity Estimation to the Task Manager Health Endpoint.
Below is a diagram depicting what information we use to estimate the varying capacity variables.

Please use the user facing docs to understand how it fits together. If the docs aren't clear enough - make a review comment and I'll clarify in the docs.
2021-06-14 13:52:30 +01:00
Tiago Costa b60a438dd3
skip flaky suite (#100438) 2021-06-14 12:51:58 +01:00
James Gowdy f6ce964d9c
[ML] Switching to new datafeed preview (#101780)
* [ML] Switching to new datafeed preview

* fixing wizard test button

* adding schema validator

* fixing tests

* adding check for empty detectors list

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-14 12:31:55 +01:00
Tyler Smalley 344b6310d7 skip flaky suite (#102012) 2021-06-12 06:49:27 -07:00
Steph Milovic de07e98663
[Observability] [Cases] Cases in the observability app (#101487) 2021-06-10 16:39:27 -06:00
Yuliia Naumenko e55a93ce58
[Event Log] Populated rule.* ECS fields for alert events. (#101132)
* [Event Log] Populated rule.* ECS fields for alert events.

* added mappings

* changed the params passing

* fixed tests

* fixed type checks

* used kibanaVersion for version event rule

* fixed typos

* fixed tests

* fixed tests

* fixed tests

* fixed tests

* fixed jest tests

* removed references

* removed not populated fields

* fixed tests

* fixed tests

* fixed tests
2021-06-10 12:33:32 -07:00
Stacey Gammon e9a4028005
Add comments to some alerting plugin public API items (#101551)
* Add comments. Remove ruleType as the second param, not needed.

* Add comments. Remove ruleType as the second param, not needed.

* Fix bad type check and update docs

* update docs

* Remove unused import

* change exports to type to avoid increasing bundle size

* Update x-pack/plugins/alerting/public/plugin.ts

Co-authored-by: ymao1 <ying.mao@elastic.co>

* Update x-pack/plugins/alerting/public/plugin.ts

Co-authored-by: ymao1 <ying.mao@elastic.co>

* Update x-pack/plugins/alerting/public/plugin.ts

Co-authored-by: ymao1 <ying.mao@elastic.co>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: ymao1 <ying.mao@elastic.co>
2021-06-10 15:15:53 -04:00
Caroline Horn 61677f7a77
Fix AppContainer layout (#101793)
* Fixing app_container
* Use EUI mixin  `euiHeaderAffordForFixed()` to maintain parity
* Adding `aria-busy` when `showSpinner`
* i18n for the loading aria-label
2021-06-10 14:18:35 -04:00
Shahzad ddccace87e
[Uptime] Unskip alert functional test (#101562) 2021-06-10 20:01:21 +02:00
Joe Reuter fe3c761b40
stabilize opening of Lens from listing page (#101569) 2021-06-10 16:30:37 +02:00
Wylie Conlon b35cde568b
[Lens] Formula editor (#99297)
* 💄 Hack to fix suggestion box

* 🐛 Fix validation messages

* 🐛 Relax operations check for managedReferences

* Change completion params

* 🏷️ Fix missing arg issue

*  Add more tinymath fns

* 🐛 Improved validation around math operations + multiple named arguments

* 🐛 Use new onError feature in math expression

* ♻️ Refactor namedArguments validation

* 🐛 Fix circular dependency issue in tests + minor fixes

* Move formula into a tab

* 🔥 Leftovers from previous merge

*  Move over namedArgs from previous function

*  Add tests for transferable scenarios

*  Fixed broken test

*  Use custom label for axis

* Allow switching back and forth to formula tab

* Add a section for the function reference

* Add modal editor and markdown docs

* Change the way math nodes are validated

* Use custom portal to fix monaco positioning

* Fix model sharing issues

* Provide signature help

* 🐛 Fix small test issue

* 🐛 Mark pow arguments as required

* 🐛 validate on first render only if a formula is present

* 🔥 Remove log10 fn for now

*  Improved math validation + add tests for math functions

* Fix mount/unmount issues with Monaco

* [Lens] Fully unmount React when flyout closes

* Fix bug with editor frame unmounting

* Fix type

* Add tests for monaco providers, add hover provider

* Add test for last_value

* Usability improvements

* Add KQL and Lucene named parameters

* Add kql, lucene completion and validation

* Fix autocomplete on weird characters and properly connect KQL

* Highlight functions that have additional requirements after validating

* Fix type error and move help text to popover

* Fix escape characters inside KQL

* 🐛 Fix dataType issue when moving over to Formula

* Automatically insert single quotes on every named param

* Only insert single quotes when typing kql= or lucene=

* Reorganize help popover

* Fix merge issues

* Update grammar for formulas

* Fix bad merge

* Rough fullscreen mode

* Type updates

* Pass through fullscreen state

* Remove more chrome from full screen mode

* Fix minor bugs in formula typing

* 🐛 Decouple column order of references and output

* 🔧 Fix tests and types

*  Add first functional test

* Fix copying formulas and empty formula

* Trigger suggestion prompt when hitting enter on function or typing kql=

* 🐛 Prevent flyout from closing while interacting with monaco

* refactoring

* move main column generation into parse module

* fix tests

* refactor small formula styles and markup

* documentation

* adjustments in formula footer

* Formula refactoring (#12)

* refactoring

* move main column generation into parse module

* fix tests

* more style and markup tweak for custom formula

* Fix tests

* [Expressions] Use table column ID instead of name when set

* [Lens] Create managedReference type for formulas

* Fix test failures

* Fix i18n types

* fix fullscreen flex issues

* Delete managedReference when replacing

* refactor css and markup; add button placeholders

* [Lens] Formulas

* Tests for formula

Co-authored-by: Marco Liberati <marco.liberati@elastic.co>

* added error count placeholder

* Add tooltips

* Refactoring from code review

* Fix some editor issues

* Update ID matching to match by name sometimes

* Improve performance of Monaco, fix formulas with 0, update labels

* Improve performance of full screen toggle

* Fix formula tests

* fix stuff

* Add an extra case to prevent insertion of duplicate column

* Simplify logic and add test for output ID

* add telemetry for Lens formula (#15)

* Respond to review comments

*  Improve the signatures with better documentation and examples

* adjust border styles to account for docs collapse

* refactor docs markup; restructure docs obj; styles

* Fix formula auto reordering (#18)

* fix formula auto reordering

* add unit test

* Fix and improve suggestion experience in Formula (#19)

*  Revisit documentation and suggestions

* 👌 Integrated feedback

*  Add query validation for quotes

* Usability updates & type fixes

* add search to formula

* fix form styles to match designs

* fix text styles; revert to Markdown for control

* 👌 Integrated more feedback

* improve search

* improve suggestions

* improve suggestions even more

* 🐛 Fix i18n issues (#22)

* Persist formula on leave, fix fullscreen and popovers

* Fix documentation tests

* 🏷️ fix type issue

* 🐛 Remove hidden operations from valid functions list

* 🐛 Fix empty string query edge case

* 🐛 Enable more suggestions + extends validation

* Fix tests that depended on setState being called without function

* Error state and text wrapping updates

*  Add new module to CodeEditor for brackets matching (#25)

* Fix type

* show warning

* keep current quick function

*  Improve suggestions within kql query

* 📷 Fix snapshot editor test

* 🐛 Improved suggestion for single quote and refactored debounce

* Fix lodash usage

* Fix tests

* Revert "keep current quick function"

This reverts commit ed477054c5.

* Improve performance of dispatch by using timeout

* Improve memoization of datapanel

* Fix escape characters

* fix reduced suggestions

* fix responsiveness

* fix unit test

* Fix autocomplete on nested math

* Show errors and warnings on first render

* fix transposing column crash

* Update comment

* 🐛 Fix field error message

* fix test types

* 📝 Fix i18n name

* 💄 Manage wordwrap via react component

* Fix selector for palettes that interferes with quick functions

* Use word wrapping by default

* Errors for managed references are handled at the top level

* 🐛 Move the cursor just next to new inserted text

* ⚗️ First pass for performance

* 🐛 Fix unwanted change

*  Memoize as many combobox props as possible

*  More memoization

* Show errors in hover

* Use temporary invalid state when moving away from formula

* Remove setActiveDimension and shouldClose, fixed by async setters

* Fix test dependency

* do not show quick functions tab

* increase documentation popover width

* fix functional test

* Call setActiveDimension when updating visualization

* Simplify handling of flyout with incomplete columns

* Fix test issues

* add description to formula telemetry

* fix schema

* Update from design feedback

* More review comments

* Hide callout border from v7 theme

Co-authored-by: dej611 <dej611@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Joe Reuter <johannes.reuter@elastic.co>
Co-authored-by: Michael Marcialis <michael.marcialis@elastic.co>
Co-authored-by: Joe Reuter <email@johannes-reuter.de>
Co-authored-by: Marco Liberati <marco.liberati@elastic.co>
Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>
2021-06-10 10:09:16 -04:00
Christos Nasikas 144e014dbf
[Cases] Improve connectors mapping (#101145) 2021-06-10 11:45:25 +03:00
Domenico Andreoli 7b51debbbb
Fix es_archives path (#101737) 2021-06-10 09:39:07 +02:00
Spencer 7917e3c9d9
[kbnArchiver] convert archive names to root-relative paths (#101839)
* [kbnArchiver] convert archive names to root-relative paths

* ensure that newly multiline hooks are explicitly async

* missed a newly multiline hook

* fix exists check

* avoid extra lines by wrapping arrow body in {}

* one block more

* fix errant `name` variable

Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-06-09 20:13:00 -04:00
Tim Sullivan 3559d375b6
[Reporting] Make "ScreenCapturePanel" shareable for Canvas (#100623)
* use ScreenCapturePanel component in Canvas

* use smaller state object

* add comment about canvas-specific shared component

* fix example

* fix toast error

* fix i18n

* fix data-test-subj

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-09 17:08:33 -07:00
Yuliia Naumenko 274bbdc628
[Alerting UI] Converted Rules and Connectors management pages to new layout. (#101697)
* [Alerting UI] Converted Rules and Connectors management pages to new layout.

* fixed tests

* fixed tests

* fixed tests

* fixed tests
2021-06-09 16:56:30 -07:00
Frank Hassanabad 1cb17d025b
[Security Solution][Detections] Update detection alert mappings to ECS v1.10.0 (#101680)
## Summary

* Grabbed the ECS mappings from [v1.10.0 tag]( https://github.com/elastic/ecs/blob/v1.10.0/generated/elasticsearch/7/template.json)
* Updated the fields that had `constant_keyword` to `keyword` since we do many to 1 of source to signals index
* Wrote a unit tests which tests to ensure we don't have any `constant_keyword` fields
* Updated the `SIGNALS_TEMPLATE_VERSION` version by an increment of 10.

This should mostly fix:
https://github.com/elastic/kibana/issues/101572

Since agents add their data into `_source` even though they have a `constant_keyword`. When agents do not include the values in `_source` we will have to merge `fields` into `_source` before copying which are still planning on doing before release.

### 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
2021-06-09 18:06:10 -04:00
Frank Hassanabad 8c03ccf1f0
Unskips migration tests now that elastic search is fixed (#101682)
## Summary

Unskips signal migration tests now that elastic search is fixed get alias bug

ES ticket about get alias bug:
https://github.com/elastic/elasticsearch/pull/72953

Tickets related that should be fixed now:
https://github.com/elastic/kibana/issues/99915
https://github.com/elastic/kibana/issues/100305

### 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
2021-06-09 14:02:47 -06:00
ymao1 a12ff5d65d
[Alerting][Event log] Persisting duration information for active alerts in event log (#101387)
* WIP

* Storing start, duration and end in alert state

* Writing to event log

* Updating unit tests

* Adding unit tests

* Fixing uuid in tests

* Updating functional test

* Adding functional test

* Removing console logs

* Fixing unit tests

* PR fixes

* Removing uuid from alert information

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-09 11:09:05 -04:00
Nathan Reese d415357f73
Change file data visualizer links to point to new location in home application (#101393)
* Link to home file data visualizer

* remove unused import

* i18n cleanup

* remove unused import from EmptyState

* use const

* remove ml functional test cases checking for ml_file_data_visualizer

* more clean-up of ml_file_data_visualizer

* jest snapshot and nav to home page in no_ml_access tests

* revert change to functional test dual_privileges_all at everything_space

* revert another change to security_and_spaces/tests/catalogue.ts

* revert changes to x-pack/test/ui_capabilities/security_only/tests/catalogue.ts

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-09 08:30:40 -06:00
Marco Liberati e3c3b6f334
[Lens] New summary row feature for datatable (#101075)
*  New summary row feature for datatable

*  Allow empty strings behind flag + tests

* 🐛 Address the transition problem + refactor

*  Add some unit tests

*  Add first functional tests

* 👌 first feedback addressed

*  Make it handle numeric array values

* 📝 Improved message

*  Fix functional test

* 🔥 Remove warning message for last value

* 🚨 Remove unused import

* 🐛 Fix a bug with last value

* 👌 Integrated feedback

* 💄 Migrated to combobox

*  Fix unit tests + restore right data-test-id

* 🏷️ Fix type issue

* 👌 Address all issues reported

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-09 14:27:49 +02:00
Dmitry Shevchenko 16e66b82b0
Implement "select all" rules feature (#100554) 2021-06-09 11:32:45 +02:00
Tyler Smalley c225aaaaa5 [FTR] Updates esArchive paths
PR's merged after #101345

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2021-06-08 21:10:36 -07:00
Tyler Smalley aa8f7f3af2 [FTR] Updates esArchive paths
PR's merged after #101345

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2021-06-08 21:06:50 -07:00
Frank Hassanabad 4021576436
[Security Solution][Detection Engine] Adds runtime field tests (#101664)
## Summary

Adds runtime field tests with skips around the tests that we do not support just yet.

* Adds tests around corner cases involving ".", "..", ".foo", "foo.", etc...
* Adds tests around overriding values from the runtime fields within the source document
* Adds tests around ambiguity for when we override an array in a runtime field
* Fixes minor wording around previous tests
* Fixes one line string when we do testing in one area

### 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
2021-06-08 17:31:54 -06:00
Nicolas Chaulet 8c2c83cb7d
[Fleet] Add fleet server telemetry (#101400) 2021-06-08 18:55:48 -04:00
Spencer f466ebf1a3
[esArchiver] drop support for --dir, use repo-relative paths instead (#101345)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-06-08 17:37:42 -04:00
spalger 686ade7808 Revert "[xpack/test] restore incremental: false in ts project"
This reverts commit 3c68a0c810.
2021-06-08 14:26:26 -07:00
spalger 3c68a0c810 [xpack/test] restore incremental: false in ts project 2021-06-08 13:30:42 -07:00
Quynh Nguyen 65b8dda157
[ML] Move Index Data Visualizer into separate plugin (Part 1) (#100922)
* [ML] Add index visualizer

* [ML] Readd support for global state

* [ML] Add time buckets & fix dependencies

* [ML] Working ver

* [ML] Add back and boolean support

* [ML] Remove old files inside ml

* [ML] Rename files

* [ML] Move field type icon

* [ML] Create new folder structure

* [ML] Organize index_data_visualizer

* [ML] Move types into index_data_visualizer folder

* [ML] Move more files into file_data_visualizer

* [ML] Move more files into index_data_visualizer

* [ML] Add new data visualizer model

* [ML] Remove getVisualizerFieldStats which is not used by dv

* [ML] Delete redundant folder

* [ML] Copy old data visualizer routes to new plugin

* [ML] Remove old routes

* [ML] Disable for ml job cards tests for now

* [ML] Remove todos

* [ML] Move the toast error to the UI component

* [ML] Fix map styling

* [ML] Add runtime_mappings for internal/file_upload/time_field_range

* [ML] Move routes into folder

* [ML] Update permissions

* [ML] Update texts

* [ML] Update schemas import and api get_field_stats

* [ML] Reorg folders into common

* [ML] Update types & tests

* [ML] Update internal/data_visualizer permissions and action panel tests

* [ML] Update imports after #100863

* [ML] Fix CI

* [ML] Rename folder from file_data_visualizer to data_visualizer

* [ML] Rename i18n ids

* [ML] Update fileDataVisualizer -> dataVisualizer dependency name in ml plugin

* [ML] Remove ml prefix in data test subjs

* [ML] Fix settings and docs

* [ML] Update plugin description

* [ML] Remove mlContext dependency completely

* [ML] Set query to optional

* Revert "[ML] Update plugin description"

This reverts commit 4ab1a25c

* [ML] Update plugins list docs

* [ML] Fix types and i18n

* [ML] Revert ml data test subj/class name changes

* [ML] Split up data visualizer model, remove Logger

* [ML] Remove empty file and indexPatternFieldEditor

* [ML] Move imports of file_upload

* [ML] Update plugin dependencies

* Re-add missing data_visualizer.json

* Remove capabilities in data_visualizer

* Fix test subjs

* Update ownership for data_visualizer and file_upload code to be ml

* Update estypes after 98266

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-08 14:50:14 -05:00
Spencer bdafd27e19
[ts] migrate x-pack/test to composite ts project (#101441)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-06-08 12:54:05 -04:00
Tyler Smalley ec212c0618
[es-archiver] Use alias for Kibana mappings (#101537)
In 7.x, when saved objects point to an index and not an alias it will
assume it's pre-6.8 and perform a legacy migration. This causes issues
with the removal of oss builds. This update prevents that from happening
by using an alias.

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2021-06-08 08:48:43 -07:00
Mikhail Shustov d920682e4e
Update @elastic/elasticsearch to 8.0.0-canary13 (#98266)
* bump @elastic/elasticsearch to canary.7

* address errors in core

* address errors in data plugin

* address errors in Alerting team plugins

* remove outdated messages in Lens

* remove unnecessary comments in ML

* address errors in Observability plugin

* address errors in reporting plugin

* address errors in Rule registry plugin

* fix errors in Security plugins

* fix errors in ES-UI plugin

* remove unnecessary union.

* update core tests

* fix kbn-es-archiver

* update to canary 8

* bump to v9

* use new typings

* fix new errors in core

* fix errors in core typeings

* fix type errors in data plugin

* fix type errors in telemetray plugin

* fix data plugin tests

* fix search examples type error

* fix errors in discover plugin

* fix errors in index_pattern_management

* fix type errors in vis_type_*

* fix errors in typings/elasticsearch

* fix type errors in actions plugin

* fix type errors in alerting and apm plugins

* fix type errors in canvas and cases

* fix errors in event_log

* fix type errors in ILM and ingest_pipelines

* fix errors in lens plugin

* fix errors in lists plugin

* fix errors in logstash

* fix errors in metrics_entities

* fix errors in o11y

* fix errors in watcher

* fix errors in uptime

* fix errors in upgrade_assistant

* fix errors in task_manager

* fix errors in stack_alerts

* fix errors in security_solution

* fix errors in rule_registry

* fix errors in snapshot_restore

* fix remaining errors

* fix search intergration tests

* adjust assetion

* bump version to canary.10

* adapt code to new naming schema

* use mapping types provided by the client library

* Revert "adjust assetion"

This reverts commit 19b8fe0464.

* fix so intergration tests

* fix http integration tests

* bump version to canary 11

* fix login test

* fix http integration test

* fix apm test

* update docs

* fixing some ml types

* fix new errors in data plugin

* fix new errors in alerting plugin

* fix new errors in lists plugin

* fix new errors in reporting

* fix or mute errors in rule_registry plugin

* more ML type fixes

* bump to canary 12

* fix errors after merge conflict

* additional ML fixes

* bump to canary 13

* fix errors in apm plugin

* fix errors in fleet plugin

* fix errors in infra plugin

* fix errors in monitoring plugin

* fix errors in osquery plugin

* fix errors in security solution plugins

* fix errors in transform plugin

* Update type imports for ES

* fix errors in x-pack plugins

* fix errors in tests

* update docs

* fix errors in x-pack/test

* update error description

* fix errors after master merge

* update comment in infra plugin

* fix new errors on xpack tests/

Co-authored-by: James Gowdy <jgowdy@elastic.co>
Co-authored-by: Dario Gieselaar <dario.gieselaar@elastic.co>
2021-06-08 15:06:06 +02:00
Yulia Čech 2d3340b543
Unskip the test (#101414)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-08 11:38:12 +02:00
Matthias Wilhelm 65251051fd
[Discover] Deangularize discover controller (#96766)
Co-authored-by: Tim Roes <mail@timroes.de>
2021-06-08 11:27:00 +02:00
renovate[bot] 4fbb6f0baa
Update dependency @elastic/charts to v30 (master) (#101409)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: nickofthyme <nick.ryan.partridge@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Marco Vettorello <vettorello.marco@gmail.com>
2021-06-08 10:49:31 +02:00
Devon Thomson b3ed014c1a
[Dashboard] Rebuild State Management (#97941)
* Rebuilt dashboard state management system with RTK.
2021-06-07 15:17:24 -04:00
Joe Reuter f5dc9d198f
[Lens] Increase timings for drag and drop tests (#101380) 2021-06-07 17:02:09 +02:00
Kyle Pollich dc1d98ba17
[Fleet] Move integrations to a separate app (#99848)
* WIP: Re-create separation of integrations app

* Fix breadcrumbs

* Fix add integration button/routing

* Fix integrations test paths

* Fix failing policy tab tests

* Fix type errors

* Fix more type errors

* Fix integrations home page redirect

* Fix circular import

* Fix i18n errors

* Fix FTR paths

* Fix more deep fleet import paths

* Remove unneeded state set

* Fix more type errors

* Fix failing security_solutions tests

* Address redirect back path todo

* Fix page path in FTR

* Fix type error

* 🤞 Fix FTR failures

* Fix package details path in endpoint tests

* Fix test import

* Fix add integration route + breadcrumbs

* Fix missing layout for create package policy page

* Fixup Kibana feature declaration + fix app registry arrays

* Fix Kibana startup error from feature registration

* Fix telemetry schema

* Remove integrations from privilege tests

* Increase Fleet bundle limit by 20kb to fix CI error

* Use correct updated Fleet bundle limit

* Update limits.yml via script

* Address design feedback

* Fix i18n error

* Fix failing security solution tests

* Fix type error

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-07 10:43:44 -04:00
Jonathan Buttner b6c982c3b0
[Cases] RBAC (#95058)
* Adding feature flag for auth

* Hiding SOs and adding consumer field

* First pass at adding security changes

* Consumer as the app's plugin ID

* Create addConsumerToSO migration helper

* Fix mapping's SO consumer

* Add test for CasesActions

* Declare hidden types on SO client

* Restructure integration tests

* Init spaces_only integration tests

* Implementing the cases security string

* Adding security plugin tests for cases

* Rough concept for authorization class

* Adding comments

* Fix merge

* Get requiredPrivileges for classes

* Check privillages

* Ensure that all classes are available

* Success if hasAllRequested is true

* Failure if hasAllRequested is false

* Adding schema updates for feature plugin

* Seperate basic from trial

* Enable SIR on integration tests

* Starting the plumbing for authorization in plugin

* Unit tests working

* Move find route logic to case client

* Create integration test helper functions

* Adding auth to create call

* Create getClassFilter helper

* Add class attribute to find request

* Create getFindAuthorizationFilter

* Ensure savedObject is authorized in find method

* Include fields for authorization

* Combine authorization filter with cases & subcases filter

* Fix isAuthorized flag

* Fix merge issue

* Create/delete spaces & users before and after tests

* Add more user and roles

* [Cases] Convert filters from strings to KueryNode (#95288)

* [Cases] RBAC: Rename class to scope (#95535)

* [Cases][RBAC] Rename scope to owner (#96035)

* [Cases] RBAC: Create & Find integration tests (#95511)

* [Cases] Cases client enchantment (#95923)

* [Cases] Authorization and Client Audit Logger (#95477)

* Starting audit logger

* Finishing auth audit logger

* Fixing tests and types

* Adding audit event creator

* Renaming class to scope

* Adding audit logger messages to create and find

* Adding comments and fixing import issue

* Fixing type errors

* Fixing tests and adding username to message

* Addressing PR feedback

* Removing unneccessary log and generating id

* Fixing module issue and remove expect.anything

* [Cases] Migrate sub cases routes to a client (#96461)

* Adding sub cases client

* Move sub case routes to case client

* Throw when attempting to access the sub cases client

* Fixing throw and removing user ans soclients

* [Cases] RBAC: Migrate routes' unit tests to integration tests (#96374)

Co-authored-by: Jonathan Buttner <jonathan.buttner@elastic.co>

* [Cases] Move remaining HTTP functionality to client (#96507)

* Moving deletes and find for attachments

* Moving rest of comment apis

* Migrating configuration routes to client

* Finished moving routes, starting utils refactor

* Refactoring utilites and fixing integration tests

* Addressing PR feedback

* Fixing mocks and types

* Fixing integration tests

* Renaming status_stats

* Fixing test type errors

* Adding plugins to kibana.json

* Adding cases to required plugin

* [Cases] Refactoring authorization (#97483)

* Refactoring authorization

* Wrapping auth calls in helper for try catch

* Reverting name change

* Hardcoding the saved object types

* Switching ensure to owner array

* [Cases] Add authorization to configuration & cases routes (#97228)

* [Cases] Attachments RBAC (#97756)

* Starting rbac for comments

* Adding authorization to rest of comment apis

* Starting the comment rbac tests

* Fixing some of the rbac tests

* Adding some integration tests

* Starting patch tests

* Working tests for comments

* Working tests

* Fixing some tests

* Fixing type issues from pulling in master

* Fixing connector tests that only work in trial license

* Attempting to fix cypress

* Mock return of array for configure

* Fixing cypress test

* Cleaning up

* Addressing PR comments

* Reducing operations

* [Cases] Add RBAC to remaining Cases APIs (#98762)

* Starting rbac for comments

* Adding authorization to rest of comment apis

* Starting the comment rbac tests

* Fixing some of the rbac tests

* Adding some integration tests

* Starting patch tests

* Working tests for comments

* Working tests

* Fixing some tests

* Fixing type issues from pulling in master

* Fixing connector tests that only work in trial license

* Attempting to fix cypress

* Mock return of array for configure

* Fixing cypress test

* Cleaning up

* Working case update tests

* Addressing PR comments

* Reducing operations

* Working rbac push case tests

* Starting stats apis

* Working status tests

* User action tests and fixing migration errors

* Fixing type errors

* including error in message

* Addressing pr feedback

* Fixing some type errors

* [Cases] Add space only tests (#99409)

* Starting spaces tests

* Finishing space only tests

* Refactoring createCaseWithConnector

* Fixing spelling

* Addressing PR feedback and creating alert tests

* Fixing mocks

* [Cases] Add security only tests (#99679)

* Starting spaces tests

* Finishing space only tests

* Refactoring createCaseWithConnector

* Fixing spelling

* Addressing PR feedback and creating alert tests

* Fixing mocks

* Starting security only tests

* Adding remainder security only tests

* Using helper objects

* Fixing type error for null space

* Renaming utility variables

* Refactoring users and roles for security only tests

* Adding sub feature

* [Cases] Cleaning up the services and TODOs (#99723)

* Cleaning up the service intialization

* Fixing type errors

* Adding comments for the api

* Working test for cases client

* Fix type error

* Adding generated docs

* Adding more docs and cleaning up types

* Cleaning up readme

* More clean up and links

* Changing some file names

* Renaming docs

* Integration tests for cases privs and fixes (#100038)

* [Cases] RBAC on UI (#99478)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

* Fixing case ids by alert id route call

* [Cases] Fixing UI feature permissions and adding UI tests (#100074)

* Integration tests for cases privs and fixes

* Fixing ui cases permissions and adding tests

* Adding test for collection failure and fixing jest

* Renaming variables

* Fixing type error

* Adding some comments

* Validate cases features

* Fix new schema

* Adding owner param for the status stats

* Fix get case status tests

* Adjusting permissions text and fixing status

* Address PR feedback

* Adding top level feature back

* Fixing feature privileges

* Renaming

* Removing uneeded else

* Fixing tests and adding cases merge tests

* [Cases][Security Solution] Basic license security solution API tests (#100925)

* Cleaning up the fixture plugins

* Adding basic feature test

* renaming to unsecuredSavedObjectsClient (#101215)

* [Cases] RBAC Refactoring audit logging (#100952)

* Refactoring audit logging

* Adding unit tests for authorization classes

* Addressing feedback and adding util tests

* return undefined on empty array

* fixing eslint

* [Cases] Cleaning up RBAC integration tests (#101324)

* Adding tests for space permissions

* Adding tests for testing a disable feature

Co-authored-by: Christos Nasikas <christos.nasikas@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-07 09:37:11 -04:00
Domenico Andreoli a4b4da3674
[master] More precise alerts matching (#99820)
* Split out test preparation and cleanup

* Load data on the remote cluster

* Update the rule to the new (remote) data
2021-06-07 14:41:33 +02:00
Frank Hassanabad 827442b4b0
[Security Solution][Detection Engine] Test cases for alias failure test cases where we don't copy aliases correctly (#101437)
## Summary

Test cases for signals and aliases, including a failure of where we do not copy alias data at the moment even if the target is an ECS compatible field.

For example with this mapping:

```json
{
  "dynamic": "strict",
  "properties": {
    "@timestamp": {
      "type": "date"
    },
    "host": {
      "properties": {
        "name": {
          "type": "alias",
          "path": "host_alias.name"
        }
      }
    },
    "host_alias": {
      "properties": {
        "name": {
          "type": "keyword"
        }
      }
    }
  }
}
```

If we detect this as a signal hit we should be copying over both:
* `host_alias.name` -> `host.name`
* `host_alias.name` -> `host_alias.name`

to the target signal index, but we only copy:
* `host_alias.name` -> `host_alias.name`

### 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
2021-06-04 22:34:52 -04:00
ymao1 c13ae7ea64
[Event Log] Adding type_id to saved object array in event log (#100939)
* Adding new fields to event log mapping

* Populating new event log fields when executing rules and actions

* Fixing functional tests

* Adding actionTypeId

* Putting type ids into saved object array

* Fixing functional tests

* Cleanup

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-04 18:55:18 -04:00
Frank Hassanabad e5944a3646
[Security Solutions][Detection Engine] Fixes timestamp bugs within source indexes when the formats are not ISO8601 format (#101349)
## Summary

We have a few bugs where when the source index for detections is not `"strict_date_optional_time"` it is possible that we will misinterpret the format to be epoch milliseconds when it could be epoch seconds or another ambiguous format or blow up when trying to write out the signals index. This fixes it to where we query for the source index format as an ISO8601 and when we copy the date time format we copy it back out as ISO8601 and insert it into the signal index as ISO8601.

See this [gist](https://gist.github.com/FrankHassanabad/f614ec9762d59cd1129b3269f5bae41c) for more details of how this was accidentally introduced when we added support for runtime fields and the general idea of the fix.

* Removes `docvalue_field` and we now only use `fields` in detection engine search requests
* Splits out the timestamp e2e tests into their own file for `timestamps` file
* Adds more tests to ensure we copy what we expect and we are converting to ISO8601 in the signals
* Removes `ts-expect-error` in a lot of areas including tests and then I fix the types and issues once it is removed. 

### 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
2021-06-04 16:19:59 -06:00
Frank Hassanabad 598e63b532
[Security Solutions][Detection Engine] Adds e2e tests for constant_keyword data type (#101234)
## Summary

Adds e2e tests for the `constant_keyword` regular `keyword` to compare between the two. Bugs found with these is one where we do not copy `constant_keyword` fields into signals which I added `.skip` to the tests now.

Tested these rule types:
* KQL
* EQL
* Threshold

For the mappings of the `constant_keyword` I use both the `constant_keyword` and the field `alias` like so:

```json
{
  "properties": {
    "@timestamp": {
      "type": "date"
    },
    "data_stream": {
      "properties": {
        "dataset": {
          "type": "constant_keyword",
          "value": "dataset_name_1"
        },
        "module": {
          "type": "constant_keyword",
          "value": "module_name_1"
        }
      }
    },
    "event": {
      "properties": {
        "category": {
          "type": "keyword"
        },
        "dataset": {
          "type": "alias",
          "path": "data_stream.dataset"
        },
        "module": {
          "type": "alias",
          "path": "data_stream.module"
        }
      }
    }
  }
}
``` 

To ensure we can detect against fields. I also mix them with regular const keyword fields in another index to ensure they work also in mixed use cases.

### 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
2021-06-04 14:05:51 -06:00
Dima Arnautov 0793753b9d
[Lens] Heatmap / Swim lane integration (#97978)
* heatmap wip

* format values on X axis

* format values for cells

* show labels

* support legend configuration

* render preview

* add icon

* [ML] update visualization

* [ML] init suggestions

* [ML] fix preview

* [ML] fix groupPosition for the legend control

* [ML] add formatter for Y-axis

* [ML] filterOperations for cell value

* [ML] fill all available height

* [ML] delete unused file

* [ML] fix suggestion state

* [ML] update suggestion, add hiding logic

* [ML] suggestions unit tests

* [ML] rename legend interface

* [ML] unit tests for visualization, add error messages

* [ML] fix typos in xy visualization tests

* [ML] support click event

* [ML] add xDomain for time series data

* [ML] support empty Y axis

* [ML] change legend default position

* [ML] getTimeZone util

* [ML] hide suggestions for reorder

* [ML] support brush event

* [ML] update unit tests

* [ML] render grid lines in preview

* [ML] don't display errors on init

* [ML] utilize chartsThemeService

* [ML] support histogram for the vertical axis

* [ML] fix clearLayer

* [ML] show empty placeholder on no data

* [ML] fix X domain min

* [ML] reject suggestions for 3 or more  buckets

* [ML] suggestions for histograms and histogram for Y-axis

* [ML] fix unit tests

* [ML] update suggestions for active heatmap

* [ML] chart data test for heatmap

* [ML] test for transitioning from heatmap to barchart

* [ML] disable xDomain

* [ML] support intervals in axes configurations

* [ML] hide label on the vertical axis when there is only a horizontal dimension

* [ML] set min cell height for better suggestions preview rendering

* [ML] fix tooltip for empty vertical axis config

* [ML] fix click and brushing for empty Y axis

* [ML] update functional test

* [ML] show beta label

* [ML] fix legend control

* [ML] dataIndex sort by default for the X axis

* [ML] use euiPaletteForTemperature with quantize color scale

* [ML] hide all suggestions

* [ML] fix chart data extension issue

* [ML] fix the caret symbol positioning

* [ML] update unit tests for the heatmap suggestions

* [ML] replace EuiBetaBadge with EuiBadge

* [ML] update functional test

* [ML] fix chart switch styles

* [ML] fix functional test

* [ML] return null instead of expression with a missing value accessor

* [ML] use table id as a chart id

* [ML] fix scale type for a single row of data

* [ML] filter out undefined values

* [ML] fix isXAxisLabelVisible

* [ML] update chart_switch styles

* show warning message for the array values

* remove unused code

* replace ts-ignore with manual type casting

* add unit tests for error and warning messages

* add css class for append, conditional flex group
2021-06-04 15:28:43 -04:00
Paul Tavares 36996634c3
[Security Solution][Endpoint] Add ability to isolate the Host from the Endpoint Details flyout (#100482)
* Add un-isolate form to the endpoint flyout
* Add Endpoint details flyout footer and action button
* Refactor hooks into a directory
* Refactor endpoint list actions into reusable list + add it to Take action on details
* Refactor Endpoint list row actions to use new common hook for items
* generate different values for isolation in endpoint generator
* move `isEndpointHostIsolated()` utility to a common folder
* refactor detections to also use common `isEndpointHostIsolated()`
* httpHandlerMockFactory can now handle API paths with params (`{id}`)
* Initial set of re-usable http mocks for endpoint hosts set of pages
* fix bug in `composeHttpHandlerMocks()`
* small improvements to test utilities
* Show API errors for isolate in Form standard place
2021-06-04 10:59:53 -04:00
Nathan Reese 93df9a32a4
[Maps] embeddable migrations (#101070)
* [Maps] embeddable migrations

* review feedback

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-04 08:00:41 -06:00
Spencer be9fcad655
[fix] import from the root of @kbn/expect (#101321)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-06-03 18:13:11 -04:00
Tiago Costa f69d63e8be
fix(NA): windows ts_project outside sandbox compilation (#100947)
* fix(NA): windows ts_project outside sandbox compilation adding tsconfig paths for packages

* chore(NA): missing @kbn paths for node_modules so types can work

* chore(NA): missing @kbn paths for node_modules so types can work

* chore(NA): organizing deps on non ts_project packages

* chore(NA): change order to find @kbn packages on node_modules first

* chore(NA): add @kbn/expect typings setting on package.json

* chore(NA): fix typechecking

* chore(NA): add missing change on tsconfig file

* chore(NA): unblock windows build by not depending on the pkg_npm rule symlink in the package.json

* chore(NA): add missing depedencies on BUILD.bazel file for io-ts-list-types

* chore(NA): remove rootDirs configs

* chore(NA): change kbn/monaco targets order

* chore(NA): update kbn-monaco build

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-03 17:53:39 +01:00
Thom Heymann 07ce6374ef
Bump packages (#101167)
* Bump mini-css-extract-plugin

* Removed unused dependency

* Remove unecessary types

* Don't match _meta field
2021-06-03 19:29:57 +03:00
Nicolas Chaulet 3b1e8b03f1
[Fleet] Install final pipeline (#100973) 2021-06-03 12:27:29 -04:00
Candace Park 0312839e34
[Security Solution][Endpoint][Host Isolation] Unisolate host minor refactors (#100889) 2021-06-03 12:27:06 -04:00
Devon Thomson a0c20ac7aa
[Dashboard] Fix Copy To Permission & Unskip RBAC tests (#100616)
* slightly better typing for dashboard permissions. Fixed typo, unskipped functional tests
2021-06-03 11:58:25 -04:00
Stratoula Kalafateli a9a9013120
[Pie] New implementation of the vislib pie chart with es-charts (#83929)
* es lint fix

* Add formatter on the buckets labels

* Config the new plugin, toggle tooltip

* Aff filtering on slice click

* minor fixes

* fix eslint error

* use legacy palette for now

* Add color picker to legend colors

* Fix ts error

* Add legend actions

* Fix bug on Color Picker and remove local state as it is unecessary

* Fix some bugs on colorPicker

* Add setting for the user to select between the legacy palette or the eui ones

* small enhancements, treat empty labels with (empty)

* Fix color picker bugs with multiple layers

* fixes on internationalization

* Create migration script for pie chart and legacy palette

* Add unit tests (wip) and a small refactoring

* Add unit tests and move some things to utils, useMemo and useCallback where it should

* Add jest config file

* Fix jest test

* fix api integration failure

* Fix to_ast_esaggs for new pie plugin

* Close legendColorPicker popover when user clicks outside

* Fix warning

* Remove getter/setters and refactor

* Remove kibanaUtils from pie plugin as it is not needed

* Add new values to the migration script

* Fix bug on not changing color for expty string

* remove from migration script as they don't need it

* Fix editor settings for old and new implementation

* fix uistate type

* Disable split chart for the new plugin for now

* Remove temp folder

* Move translations to the pie plugin

* Fix CI failures

* Add unit test for the editor config

* Types cleanup

* Fix types vol2

* Minor improvements

* Display data on the inspector

* Cleanup translations

* Add telemetry for new editor pie options

* Fix missing translation

* Use Eui component to detect click outside the color picker popover

* Retrieve color picker from editor and syncColors on dashboard

* Lazy load palette service

* Add the new plugin to ts references, fix tests, refactor

* Fix ci failure

* Move charts library switch to vislib plugin

* Remove cyclic dependencies

* Modify license headers

* Move charts library switch to visualizations plugin

* Fix i18n on the switch moved to visualizations plugin

* Update license

* Fix tests

* Fix bugs created by new charts version

* Fix the i18n switch problem

* Update the migration script

* Identify if colorIsOverwritten or not

* Small multiples, missing the click event

* Fixes the UX for small multiples part1

* Distinct colors per slice implementation

* Fix ts references problem

* Fix some small multiples bugs

* Add unit tests

* Fix ts ref problem

* Fix TS problems caused by es-charts new version

* Update the sample pie visualizations with the new eui palette

* Allows filtering by the small multiples value

* Apply sortPredicate on partition layers

* Fix vilib test

* Enable functional tests for new plugin

* Fix some functional tests

* Minor fix

* Fix functional tests

* Fix dashboard tests

* Fix all dashboard tests

* Apply some improvements

* Explicit params instead of visConfig Json

* Fix i18n failure

* Add top level setting

* Minor fix

* Fix jest tests

* Address PR comments

* Fix i18n error

* fix functional test

* Add an icon tip on the distinct colors per slice switch

* Fix some of the PR comments

* Address more PR comments

* Small fix

* Functional test

* address some PR comments

* Add padding to the pie container

* Add a max width to the container

* Improve dashboard functional test

* Move the labels expression function to the pie plugin

* Fix i18n

* Fix functional test

* Apply PR comments

* Do not forget to also add the migration to them embeddable too :D

* Fix distinct colors for IP range layer

* Remove console errors

* Fix small mulitples colors with multiple layers

* Fix lint problem

* Fix problems created from merging with master

* Address PR comments

* Change the config in order the pie chart to not appear so huge on the editor

* Address PR comments

* Change the max percentage digits to 4

* Change the max size to 1000

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-03 18:17:14 +03:00
spalger f5df40a5a1 skip flaky suite (#99581) 2021-06-03 06:33:27 -07:00
Shahzad 2ea4d5713c
[Uptime] Move uptime to new solution nav (#100905)
* Expose options to customize the route matching

* Add more comments

* move uptime to new solution nav

* push

* update test

* add an extra breadcrumb

Co-authored-by: Felix Stürmer <stuermer@weltenwort.de>
2021-06-03 15:19:35 +02:00
spalger 98527ad232 skip suite failing es promotion (#101219) 2021-06-02 14:14:58 -07:00
Tre dc5511f73b
[QA] Bind the retry to fixup error in it repo tests (#100948)
Verfiied via: https://internal-ci.elastic.co/view/All/job/elastic+integration-test+master/487/
2021-06-02 12:28:59 -06:00
Mike Côté e607b58590
Fix alerting health API to consider rules in all spaces (#100879)
* Initial commit

* Expand tests

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-02 13:08:09 -04:00
Bhavya RM 2dfda12af1
Unskip advanced settings a11y test (#100558) 2021-06-02 12:03:19 -04:00
Robert Oskamp f4f8ea73f9
[ML] Functional tests - reenable categorization tests (#101137)
This PR re-enables the categorization tests that have been temporarily skipped.
2021-06-02 16:32:53 +02:00
Joe Reuter 8cb3dbc4ab
[Lens] Time shift metrics (#98781) 2021-06-02 15:58:47 +02:00
CJ Cenizal ba4e0d259b
Migrate CCR to new ES JS client. (#100131)
* Update SectionError component to render error root causes correctly.
* Fix 404 error rendering.
* Add test for follower index update API route.
2021-06-01 16:26:01 -07:00
Corey Robertson b62848ce8a
[Canvas] Switch Canvas to use React Router (#100579)
* Switch Canvas to use React Router

* Fix typescript errors

* Remove @scant/router from package.json

* Fix tests

* Fix functional test

* Fix functional tests

* Fix bad merge in package.json

* Cleanup from code review comments

* Fix double basepath append

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-01 17:35:56 -04:00
Tyler Smalley 0f9debeba7
[FTR] Use importExport for saved_object/basic archive (#100244)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2021-06-01 11:50:49 -07:00
Thom Heymann 27f790c8f2
Create API keys with metadata (#100682) 2021-06-01 19:55:11 +03:00
Robert Oskamp 77f0a2a7ad
[ML] Functional tests - disable categorization tests (#101057)
This PR temporarily disables categorization tests.
2021-06-01 18:12:31 +02:00
Greg Thompson 38fd8a268a
Upgrade EUI to v33.0.0 (#99382)
* eui to 33.0.0

* resize observer type inclusion - revisit

* src snapshot updates

* x-pack snapshot updates

* table sort test updates

* code block language sh -> bash

* datagrid datetime sort inversion

* types

* kbn-crypto

* refractor yarn resolution

* refractor yarn resolution

* update cypress tests

* url state test

* trial

* Revert "trial"

This reverts commit adc3538145.

* trial anomaly timeout

* Revert "trial anomaly timeout"

This reverts commit 9a11711ba8.

* kbn-telemetry-tools

* Change a useMemo to useCallback so the code executes when intended

* Removed no-longer-used import

* exitOrFail already retries for longer than tryForTime

* Wait for loading indicator to disappear

* Intentionally adding `.only`

* Revert .only

* Increase wait time for the ML chart to load

* Remove unused var

* overflow

* chartWidth

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Alejandro Fernández Haro <alejandro.haro@elastic.co>
Co-authored-by: Chandler Prall <chandler.prall@gmail.com>
2021-06-01 10:53:07 -05:00
Jason Rhodes 8ed2add1a2
Re-enable _mb suffixed stack monitoring func tests (#98354)
* Reenabled _mb suffixed stack monitoring func tests

These tests were disabled temporarily in #98238 because of intermittent failures in master.

* use test_user instead of basic_monitoring_user

* remove security service

* remove logout and cleanup

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: neptunian <sandra.gonzales@elastic.co>
2021-06-01 10:58:39 -04:00
Tiago Costa 19b8aa798c
skip flaky suite (#90565) 2021-06-01 12:54:15 +01:00
Tiago Costa 25f569ae3d
skip flaky suite (#64473) 2021-06-01 12:49:51 +01:00
Tiago Costa 622bf0bf5a
skip flaky suite (#100570) 2021-05-31 16:23:58 +01:00
Joe Reuter 79fa4f405b
[Lens][Dashboard] Share session between lens and dashboard (#100214) 2021-05-31 11:14:31 +02:00
Robert Oskamp 3ef24aa56c
[ML] Functional tests - reenable DFA feature importance suite (#100850)
This PR re-enables the data frame analytics feature importance test suite.
2021-05-31 09:29:37 +02:00
Davis Plumlee 418a3d312c
[Security Solution][Detections] Update rule integration tests (#98512) 2021-05-28 21:40:57 -04:00
James Gowdy e93c18fea7
[ML] Fixing management app race condition (#100785)
* [ML] Fixing management app race condition

* updating test id

* translation id

* adding link to license page

* fixing tests

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-28 21:23:10 +01:00
Bhavya RM 4989ec266b
updating the saved objects test to include more saved object types (#100828) 2021-05-28 13:04:59 -04:00
Jonathan Buttner 692806aed8
Fixing ES archive mapping failure (#100835)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-28 12:21:34 -04:00
David Sánchez cec62cb706
[Security Solution][Endpoint] Add event filters summary card to the fleet endpoint tab (#100668)
* Shows event filters card on fleet page

* Uses aggs instead of while loop to retrieve summary data

* Add request and response types in the lists package

* Fixes old import

* Removes old i18n keys

* Removes more old i18n keys

* Use consts for exception lists url and endpoint event filter list id

* Uses event filters service to retrieve summary data

* Fixes addressed pr comments such as changing the route without underscore, adding aggs type, validating response, and more

* Uses useMemo instead of useState to memoize object

* Add new e2e test for summart endpoint

* Handle api errors on event filters and trusted apps summary api calls

* Add api error message to the toast

* Fix wrong i18n key

* Change span tag by react fragment

* Uses styled components instead of modify compontent style directly and small improvements on test -> ts

* Adds curls script for summary route

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-28 18:07:54 +02:00
Marco Liberati 51616e1b8d
[Lens] Adds dynamic table cell coloring (#95217)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Greg Thompson <thompson.glowe@gmail.com>
Co-authored-by: Michael Marcialis <michael@marcial.is>
2021-05-28 15:24:28 +02:00
Spencer 9538788611
[ftr] migrate "MenuToggle" service to FtrService class (#100608)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-28 07:10:32 +02:00
Yuliia Naumenko 134a3def03
[Actions] Converted rejectUnauthorized config usages to verificationMode. (#100179)
* [Actions] Converted `rejectUnauthorized` config usages to `verificationMode`.

* added new verificationMode config options for tls, proxy tls and custom hosts

* added unit tests

* added unit tests

* added kibana docker

* Apply suggestions from code review

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update alert-action-settings.asciidoc

* Apply suggestions from code review

Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com>

* removed legacyRegectUnauthorized logic from getNodeTLSOptions

* added deprecations

* fixed doc links

* fixed docs

* Update x-pack/plugins/actions/server/builtin_action_types/lib/send_email.ts

Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com>

* [DOCS] Fixes build error

* fixed deprecations to set custom message

* fixed doc

* changed to not throw exception on non existing verification mode

* added tests

* fixed tests

* fixed tests

* added integration tests for legacy rejectUnauthorized fale

* fixed tests

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com>
Co-authored-by: lcawl <lcawley@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-27 14:20:57 -07:00
spalger a6bbf1b219 skip suite failing es promotion (#100697) 2021-05-27 14:10:49 -07:00
ymao1 71379b755a
[Alerting] Split alerting feature privilege between rules and alerts and handle subfeature privilege specification (#100127)
* WIP - creating alerting authorization client factory and exposing authorization client on plugin start contract

* Updating alerting feature privilege builder to handle different alerting types

* Passing in alerting authorization type to AlertingActions class string builder

* Passing in authorization type in each function call

* Passing in exempt consumer ids. Adding authorization type to audit logger

* Changing alertType to ruleType

* Changing alertType to ruleType

* Updating unit tests

* Updating unit tests

* Passing field names into authorization query builder. Adding kql/es dsl option

* Converting to es query if requested

* Fixing functional tests

* Removing ability to specify feature privilege name in constructor

* Fixing some types and tests

* Consolidating alerting authorization kuery filter options

* Cleanup and tests

* Cleanup and tests

* Initial commit with changes needed for subfeature privilege

* Throwing error when AlertingAuthorizationClientFactory is not defined

* Renaming authorizationType to entity

* Renaming AlertsAuthorization to AlertingAuthorization

* Fixing unit tests

* Changing schema of alerting feature privilege

* Changing schema of alerting feature privilege

* Updating feature privilege iterator

* Updating feature privilege builder

* Fixing types check

* Updating privilege string terminology

* Updating privilege string terminology

* Wip

* Fixing unit tests

* Unit tests

* Updating README and removing stack subfeature privilege changes

* Fixing README

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-27 14:59:02 -04:00
Jonathan Budzenski f0e11bcd1b
Automated package testing (#88900)
Co-authored-by: Tyler Smalley <tylersmalley@me.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-27 13:37:43 -05:00
Anton Dosov 806566c62e
[Index Patterns] Migrate tests to the new es client (#100760) 2021-05-27 15:47:30 +02:00
Patrick Mueller 11b3ab167d
[alerting] add ignore_above to alerts params mappings to handle immense params (#100726)
resolves https://github.com/elastic/kibana/issues/100607

This fixes a problem when very large parameters (over 32K bytes) are saved with
an alert.  Before this fix, an error from elasticsearch would be thrown with
the following message, and a 400 returned from create (and presumably update).

    Document contains at least one immense term in field=\"alert.params\"
    (whose UTF8 encoding is longer than the max length 32766), all of which
    were skipped.

After the fix, alerts with immense params can be saved and executed.

Note that the immense params will not be searchable, since they won't be indexed,
but that seems both unavoidable, and not a severe issue.
2021-05-27 09:17:12 -04:00
Alejandro Fernández Gómez 83e5b6c689
[Fleet] Remove beats management plugin (#99789) 2021-05-27 11:30:15 +02:00
Pete Harverson f77ff2d396
[ML] Adds functional tests for anomaly detection job custom URLs (#100455)
* [ML] Adds functional tests for anomaly detection job custom URLs

* [ML] Remove debug test tag from custom URL tests

* [ML] Update custom URL editor Jest snapshots

* [ML] Clean up in embeddables tests to fix dashboard test

* [ML] Delete test dashboard after test suites complete

* [ML] Edits to custom URL tests following review

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-26 17:48:03 +01:00
Nathan Reese e49db7127d
[Maps] filter dashboard by map extent (#99860)
* [Maps] filter dashboard by map extent

* clean up

* remove warning from filter pill

* tslint

* API doc updates, i18n fixes, tslint

* only show context menu option in edit mode

* add functional test

* review feedback

* do not use search session when filtering by map bounds

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-26 08:51:39 -06:00
Sandra Gonzales ce6f923bb4
fix anomaly functional test (#100504)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-26 10:25:39 -04:00
Larry Gregory 5d5cc55b3a
Fix spaces test flakyness (#100605) 2021-05-26 06:47:28 -04:00
Nathan L Smith e61c6660f7
Open/Closed filter for observability alerts page (#99217) 2021-05-25 12:40:14 -05:00
Spencer 111e15a054
[ftr] implement FtrService classes and migrate common services (#99546)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-25 09:25:09 -07:00
David Sánchez ca324c63be
Removes event filters feature flag and exposes this feature by default (#100389)
* Removes event filters feature flag and expose this feature by default

* Fixes manifest unit test

* Fixes functional test adding event filter list case

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-25 15:19:42 +02:00
Sandra Gonzales 60b5c842cd
[Metrics UI] use EuiTooltip to control tooltip component and simplify ConditionalTooltip (#99224)
* use EuiTooltip to control tooltip component

* fix style

* update unit tests

* add functional waffle map tooltip tests

* remove reload() from useEffect

* fix type

* update unit test
2021-05-25 08:51:24 -04:00
Frank Hassanabad aa2f5b535d
[Security Solution] Utilizes constants package and deletes duplicate code (#100513)
## Summary

Utilizes constants package and deletes duplicate code

* Renames the `securitysolution-constants` to be `securitysolution-list-constants` to be specific
* Deletes duplicated code found during cleanup
* Moves more tests into the packages found along the way with the duplicated code
* Moves `parseScheduleDates` from `@kbn/securitysolution-io-ts-types` to `@kbn/securitysolution-io-ts-utils`

### 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
2021-05-24 18:38:14 -06:00
Mikhail Shustov 95e8eed7d1
security solution and lists to TS incremental builds (#100447)
* lists to ts incremental builds

* security_solution to ts incremental

* import ResizeObserver explicitly as it is not declared in dom types
2021-05-24 16:34:29 +02:00
ymao1 496999fbfc
[Alerting] Passing additional rule fields to rule executor (#99819)
* Passing additional rule fields to rule executor

* Fixing types check

* Api docs

* Adding enabled and actions

* Api docs

* Encapsulating rule information into RuleConfig type

* Functional tests

* Functional tests

* Adding producer, ruleTypeId and ruleTypeName

* Api docs

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-24 10:25:52 -04:00
Brian Seeders b1a95e4296 skip flaky suite (#100445) 2021-05-22 18:06:57 -04:00
Frank Hassanabad 9bf488e826
[Security Solutions] Re-arranges and adds more packages to remove copied code (#100310)
## Summary

* Creates a `securitysolution-list-utils` packaged and moves the first set of utilities into there
* Fixes a slight bug with `kbn-securitysolution-io-ts-list-types` where the wrong name was used
* Moves _all_ of the lists schemas and types into the package `kbn-securitysolution-io-ts-list-types`
* Removes copied code found in a few places

## Tech debt
* Some spots I have to use an `any` in the package as Kibana kbn packages don't have the types I need
* Some spots I copy constants until we can straighten out those pieces.
* I keep copied mock files until we figure out how to share mocks from these packages without adding weight or we create dedicated mock packages for all of this. 


### 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
2021-05-19 15:59:52 -06:00
Kevin Logan 00479968a1
[Security Solution] Add linux malware config options and migration (#100166) 2021-05-19 17:37:43 -04:00
liza-mae c28b5496a6
Upgrade functional test fixes (#100306)
* Upgrade functional test fixes

* Fix lint issues
2021-05-19 13:08:41 -06:00
spalger 4b0c01a732 skip flaky suite (#99581) 2021-05-19 09:34:14 -07:00
Kevin Logan 9da1a707d7
[Security Solution] Add supported field to ransomware (#100135) 2021-05-19 11:43:18 -04:00
Tiago Costa 8f1bf66a7b
skip flaky suite (#100296) 2021-05-19 13:13:07 +01:00
ymao1 0f0cee2510
[Alerting] Refactor alerts authorization client (#99078)
* WIP - creating alerting authorization client factory and exposing authorization client on plugin start contract

* Updating alerting feature privilege builder to handle different alerting types

* Passing in alerting authorization type to AlertingActions class string builder

* Passing in authorization type in each function call

* Passing in exempt consumer ids. Adding authorization type to audit logger

* Changing alertType to ruleType

* Changing alertType to ruleType

* Updating unit tests

* Updating unit tests

* Passing field names into authorization query builder. Adding kql/es dsl option

* Converting to es query if requested

* Fixing functional tests

* Removing ability to specify feature privilege name in constructor

* Fixing some types and tests

* Consolidating alerting authorization kuery filter options

* Cleanup and tests

* Cleanup and tests

* Throwing error when AlertingAuthorizationClientFactory is not defined

* Renaming authorizationType to entity

* Renaming AlertsAuthorization to AlertingAuthorization

* Fixing unit tests

* Updating privilege string terminology

* Updating privilege string terminology

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-18 18:32:43 -04:00
Frank Hassanabad 0f9766591f
[Security Solution] Re-adds a test that was skipped (#100273)
## Summary

Re-adds a test that was skipped. If it goes bonkers again, I will add more debugging information to it. I will keep an eye on the operations channel to see when/if this fails again. Originally this looked to be timeouts waiting, so I increased the global timeout to be 20 seconds instead of the original 10 seconds.

Resolves:
https://github.com/elastic/kibana/issues/89389

### 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
2021-05-18 13:03:49 -05:00
Kevin Logan 79c94d33fb
[Security Solution] Fix policy details test (#100260) 2021-05-18 13:14:31 -04:00
Thom Heymann 574b4559e7
Simplify deleting spaces (#99960)
* Simplify deleting spaces

* Fixed i18n

* Fix functional tests

* Update x-pack/plugins/spaces/public/management/spaces_management_app.tsx

Co-authored-by: Larry Gregory <lgregorydev@gmail.com>

* Fix snapshots

Co-authored-by: Larry Gregory <lgregorydev@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-18 11:37:18 +01:00
Frank Hassanabad e15b887e43
[Security Solutions] Replaces most deprecated io-ts alerting and list types (#100234)
## Summary

Replaces most of the deprecated io-ts alerting and list types within securitysolution as part of Phase 3 of 4 phases outlined in earlier PR's such as https://github.com/elastic/kibana/pull/99260

### 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
2021-05-17 23:28:06 -06:00
Dominique Clarke 6d4cca29a7
[Uptime] [Synthetics Integration] Add functional tests for Synthetics Integration (#100161)
* add functional tests for synthetics fleet package
2021-05-17 16:44:30 -04:00
Brian Seeders f1a2e6f251 skip flaky suite (#100236) 2021-05-17 15:53:20 -04:00
Tiago Costa cbab391bbe
skip failing es promotion suite (#99915) 2021-05-17 18:48:41 +01:00
Spencer 808b44f2c1
[kbn/test] move types/ftr into src (#99555)
* [kbn/test] move types/ftr into src

* Apply eslint updates

* fix import of Lifecycle type

Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-17 09:51:53 -07:00
Tiago Costa d079dae56d
skip failing es promotion suite (#99915) 2021-05-17 16:21:46 +01:00
Tiago Costa 839fc7b257
skip failing es promotion suite (#99915) 2021-05-17 16:19:56 +01:00
Dzmitry Lemechko e63c319032
[QA] fix dashboard lens by value test (#100196)
* [functional test] remove redundant navigation, wait for lens to be loaded

* fix navigation to new viz

* update test title

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-17 17:18:20 +02:00
Tiago Costa 8d85d72fef
skip flaky suite (#100012) 2021-05-17 16:12:08 +01:00
Dzmitry Lemechko ca2930c719
[status_page test] use navigateToApp (#100146) 2021-05-15 00:17:10 +02:00
Joe Portner b2d36b863b
Sharing saved objects phase 3 (#94383) 2021-05-14 14:46:17 -04:00
Dominique Clarke 25cad22b3d
[Uptime] Fix overview flaky tests (#99781)
* add retry logic and add describe.only to prepare for flaky test runner

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-14 14:33:46 -04:00
John Schulz 0364e8f5aa
[Fleet] Fix error when searching for keys whose names have spaces (#100056)
## Summary
fixes #99895

Can reproduce #99895 with something like
```shell
curl 'http://localhost:5601/api/fleet/enrollment-api-keys' \
  -H 'content-type: application/json' \
  -H 'kbn-version: 8.0.0' \
  -u elastic:changeme \
  --data-raw '{"name":"with spaces","policy_id":"d6a93200-b1bd-11eb-90ac-052b474d74cd"}'
```

Kibana logs this stack trace

```
server    log   [10:57:07.863] [error][fleet][plugins] KQLSyntaxError: Expected AND, OR, end of input but "\" found.
policy_id:"d6a93200-b1bd-11eb-90ac-052b474d74cd" AND name:with\ spaces*
--------------------------------------------------------------^
    at Object.fromKueryExpression (/Users/jfsiii/work/kibana/src/plugins/data/common/es_query/kuery/ast/ast.ts:52:13)
    at listEnrollmentApiKeys (/Users/jfsiii/work/kibana/x-pack/plugins/fleet/server/services/api_keys/enrollment_api_key.ts:37:69)
    at Object.generateEnrollmentAPIKey (/Users/jfsiii/work/kibana/x-pack/plugins/fleet/server/services/api_keys/enrollment_api_key.ts:160:31)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at postEnrollmentApiKeyHandler (/Users/jfsiii/work/kibana/x-pack/plugins/fleet/server/routes/enrollment_api_key/handler.ts:53:20)
    at Router.handle (/Users/jfsiii/work/kibana/src/core/server/http/router/router.ts:273:30)
    at handler (/Users/jfsiii/work/kibana/src/core/server/http/router/router.ts:228:11)
    at exports.Manager.execute (/Users/jfsiii/work/kibana/node_modules/@hapi/hapi/lib/toolkit.js:60:28)
    at Object.internals.handler (/Users/jfsiii/work/kibana/node_modules/@hapi/hapi/lib/handler.js:46:20)
    at exports.execute (/Users/jfsiii/work/kibana/node_modules/@hapi/hapi/lib/handler.js:31:20)
    at Request._lifecycle (/Users/jfsiii/work/kibana/node_modules/@hapi/hapi/lib/request.js:370:32)
    at Request._execute (/Users/jfsiii/work/kibana/node_modules/@hapi/hapi/lib/request.js:279:9) {
  shortMessage: 'Expected AND, OR, end of input but "\\" found.'
```

the `kuery` value which causes the `KQLSyntaxError` is
```
policy_id:\"d6a93200-b1bd-11eb-90ac-052b474d74cd\" AND name:with\\ spaces*
``` 

a value without spaces, e.g. `no_spaces` 

```
policy_id:\"d6a93200-b1bd-11eb-90ac-052b474d74cd\" AND name:no_spaces*
```

is converted to this query object

```
{
  "bool": {
    "filter": [
      {
        "bool": {
          "should": [
            {
              "match_phrase": {
                "policy_id": "d6a93200-b1bd-11eb-90ac-052b474d74cd"
              }
            }
          ],
          "minimum_should_match": 1
        }
      },
      {
        "bool": {
          "should": [
            {
              "query_string": {
                "fields": [
                  "name"
                ],
                "query": "no_spaces*"
              }
            }
          ],
          "minimum_should_match": 1
        }
      }
    ]
  }
```

I tried some other approaches for handling the spaces based on what I saw in the docs like `name:"\"with spaces\"` and `name:(with spaces)*`but they all failed as well, like

```
KQLSyntaxError: Expected AND, OR, end of input but "*" found.
policy_id:"d6a93200-b1bd-11eb-90ac-052b474d74cd" AND name:(with spaces)*
-----------------------------------------------------------------------^
    at Object.fromKueryExpression (/Users/jfsiii/work/kibana/src/plugins/data/common/es_query/kuery/ast/ast.ts:52:13)
    at listEnrollmentApiKeys (/Users/jfsiii/work/kibana/x-pack/plugins/fleet/server/services/api_keys/enrollment_api_key.ts:37:69)
    at Object.generateEnrollmentAPIKey (/Users/jfsiii/work/kibana/x-pack/plugins/fleet/server/services/api_keys/enrollment_api_key.ts:166:31)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at postEnrollmentApiKeyHandler (/Users/jfsiii/work/kibana/x-pack/plugins/fleet/server/routes/enrollment_api_key/handler.ts:53:20)
    at Router.handle (/Users/jfsiii/work/kibana/src/core/server/http/router/router.ts:273:30)
    at handler (/Users/jfsiii/work/kibana/src/core/server/http/router/router.ts:228:11)
    at exports.Manager.execute (/Users/jfsiii/work/kibana/node_modules/@hapi/hapi/lib/toolkit.js:60:28)
    at Object.internals.handler (/Users/jfsiii/work/kibana/node_modules/@hapi/hapi/lib/handler.js:46:20)
    at exports.execute (/Users/jfsiii/work/kibana/node_modules/@hapi/hapi/lib/handler.js:31:20)
    at Request._lifecycle (/Users/jfsiii/work/kibana/node_modules/@hapi/hapi/lib/request.js:370:32)
    at Request._execute (/Users/jfsiii/work/kibana/node_modules/@hapi/hapi/lib/request.js:279:9) {
  shortMessage: 'Expected AND, OR, end of input but "*" found.'
```

So I logged out the query object for a successful request, and put that in a function

```
{
  "query": {
    "bool": {
      "filter": [
        {
          "bool": {
            "should": [
              {
                "match_phrase": {
                  "policy_id": "d6a93200-b1bd-11eb-90ac-052b474d74cd"
                }
              }
            ],
            "minimum_should_match": 1
          }
        },
        {
          "bool": {
            "should": [
              {
                "query_string": {
                  "fields": [
                    "name"
                  ],
                  "query": "(with spaces) *"
                }
              }
            ],
            "minimum_should_match": 1
          }
        }
      ]
    }
  }
}
```


### 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
2021-05-13 17:32:14 -04:00
Mike Côté bb7057c343
Rename alert status OK to Recovered and fix some UX issues around disabling a rule while being in an error state (#98135)
* Fix UX when alert is disabled and in an error state

* Reset executionStatus to pending after enabling an alert

* Renames alert instance status OK to Recovered

* Fix end to end test

* Update doc screenshot

* Fix confusing test name

* Remove flakiness in integration test

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-13 14:16:36 -04:00
Dario Gieselaar bdde884d09
[RAC] Decouple registry from alerts-as-data client (#98935) 2021-05-13 17:12:47 +02:00
Justin Kambic e3f0afa4e0
Move functional tests off of legacy es client. (#99801)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-12 15:21:22 -04:00
Quynh Nguyen e99cfb5c0b
[ML] Stabilize anomaly chart embeddable tests (#99955)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-12 13:15:52 -05:00
Thom Heymann 4e5df8cf20
Handle session timeout and user activity (#98461)
* Handle session timeout and user activity

* Added suggestions form code review

* Fix i18n errors

* Moved session timeout calculation to server side

* fixed tests

* Added suggestions from code review

* fix types

* Removed unecessary response interceptor and improved copy

* Handle scenario when session does not exist correctly

* Do not show warning again if previously dismissed

* Added suggestions from code review

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-12 17:33:10 +01:00
Nathan Reese b097385707
[Lens] visualize in maps button (#98677)
* [Lens] visualize in maps button

* clean up dependency injection as suggested

* add custom workspace render for geo fields

* tslint and finish drag and drop for geo field

* convert react class to function component

* prevent page reload when clicking visualize in maps button

* filter allFields instead of using condition to populate fieldTypeNames to fix tslint

* clean up UI

* fix jest test

* globe illustration

* UI cleanup

* functional test

* Update x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/geo_field_workspace_panel.tsx

Co-authored-by: Michael Marcialis <michael@marcial.is>

* Update x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/geo_field_workspace_panel.scss

Co-authored-by: Michael Marcialis <michael@marcial.is>

* Update x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/geo_field_workspace_panel.tsx

Co-authored-by: Michael Marcialis <michael@marcial.is>

* Update x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/geo_field_workspace_panel.scss

Co-authored-by: Michael Marcialis <michael@marcial.is>

* Update x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/geo_field_workspace_panel.scss

Co-authored-by: Michael Marcialis <michael@marcial.is>

* Update x-pack/plugins/lens/public/indexpattern_datasource/field_item.tsx

Co-authored-by: Michael Marcialis <michael@marcial.is>

* updated globe svg

* remove unused

* better message for drop zone screen reader

* Update x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/geo_field_workspace_panel.tsx

Co-authored-by: Michael Marcialis <michael@marcial.is>

* tslint

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Michael Marcialis <michael@marcial.is>
2021-05-12 09:54:34 -06:00
igoristic 6d263162f0
[Monitoring] Added missing cgroup memory (#99602)
* Added missing cgroup memory

* Fixed tests

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-12 11:24:05 -04:00
Robert Oskamp c44e5f75a3
[ML] Functional tests - increase module test coverage (#99758)
This PR adds a couple API integrations tests to get, recognize and setup modules.
2021-05-12 13:18:36 +02:00
Jean-Louis Leysens c22d9fd690
[Reporting] Relax save requirement for CSV reports (#99313)
* update requirement to save csv report in ui

* update expectation that CSV reporting is disabled for new discover searches

* update test expectations (again)

* refactor to using props-driven approach

* provide a fallback title

* refine title a bit more

* added component level test

* return ISO string with offset

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-12 10:32:51 +02:00
Lukas Olson 7617642bba
Add partial results to search examples demo (#96366)
* Add partial results to search examples demo

* Add functional test

* Move types into separate file and separate custom strategies

* Review feedback

* Update test

* Try to fix test

* Attempt to fix test

* Try to fix observable error

* Sanity check

* Fix test

* Another attempt

* Remove rxjs from strategy
2021-05-11 12:41:21 -07:00
Nathan Reese 5dbc73f1b4
[Maps] use deep equals for mapbox filter expression equals check (#99673)
* [Maps] use deep equals for mapbox filter expression equals check

* cleanup
2021-05-11 09:38:40 -06:00
Tyler Smalley 9da9b8d4b9
[kbn-es] Allow overriding of Java heap (#99517)
* [kbn-es] Allow overriding of Java heap

Fixes #99494

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2021-05-11 07:36:20 -07:00
Domenico Andreoli 2d05d9f802
Add CCS integration test for security rules (#99042) 2021-05-11 16:19:32 +02:00
Alison Goryachev 72c25ea10f
[Index Management] Unskip indices API integration test (#99379) 2021-05-11 08:53:16 -04:00
Kyle Pollich baf11e8749
[Fleet] Remove timestamp field from component template (#99619)
* Remove timestamp field from component template

Elasticsearch bug fixed upstream allows us to remove this field from the
template: elastic/elasticsearch/#58956

Closes #71095

* Remove timestamp field from functional test
2021-05-10 14:11:23 -04:00
Dominique Clarke 2f90e73569
[Uptime] remove settings flaky test comment (#99402)
* remove outdated comment
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-10 10:15:01 -04:00