Commit graph

3926 commits

Author SHA1 Message Date
Chris Cowan aa281ffad7
[Metrics UI] Unskip Home Page Functional Test (#98085)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-27 09:36:27 -07:00
Walter Rafelsberger 18d9d435af
[ML] Transforms: Adds a link to discover from the transform list to the actions menu. (#97805)
Adds a link to discover from the transform list to the actions menu. Conditions for the link to be enabled:
- Kibana index pattern must be available
- Transform must have been started once and done some progress so there's the destination index available
2021-04-27 10:49:20 -04:00
James Gowdy c9832832df
[File Data Visualizer] Fixing missing css imports for file stats table (#98312)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-27 11:16:34 +01:00
Pierre Gayvallet 328febabd3
migrate logstash plugin to new ES client (#98064)
* migrate logstash plugin to new ES client

* handle 404s

* use default ES client
2021-04-27 10:25:50 +02:00
Sandra Gonzales aa7650699f
[Metrics UI] Anomaly Detection Flyout test (#98177)
* test anomaly detection flyout anomalies

* add date test

* date test no anomalies for k8s

* test the threshold for anomalies

* add metrics data so can test 'show in inventory' link

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-26 16:42:31 -04:00
Caroline Horn f07ebc822f
Reducing wrapping divs from RenderingService (#97017)
* Reducing wrapping divs from RenderingService

* Applying more styles to .kbnAppWrapper

Some being temporary and will need a better solution when introducing the page layout component

* Almost fixing tests for rendering service

Can’t figure out how to have a optional Observable
`Received: "kbnAppWrapper class-name”`

* Adding some comments

* [Dashboard] Using the APP_WRAPPER_CLASS

* fix test & ts types

* Fixin a few more tests that were using `.app-wrapper`

* Creating docs for new var and cleaning up some selectors

* Fixing reporting

* Fixing banner position and truncation

* Fixed CSS error in loading screen and jump in animation

* Fixing selectors in Canvas

* Remove unused var

* Added `APP_WRAPPER_CLASS` export from `server` and updated reporting to use it

* Fix monitoring icon clicks

* move APP_WRAPPER_CLASS definition to src/core/common

* Fixing Monitoring snapshots and wrapper class

* Moved `APP_WRAPPER_CLASS` utils but exported from `public` and `server`

* Remove old folder

* Fix dashboard test by only showing HR in edit mode

Co-authored-by: pgayvallet
Co-authored-by:  tsullivan
2021-04-26 16:06:06 -04:00
igoristic 27f2d4a260
[Monitoring] Added ability to possibly distinguish between Agent type metrics in APM (#95129)
* Added version and cloud check

* Fixed tests

* Code review feedback

* Fixed tests

* added versions

* added version

* ...

* Removed default version

* ..

* Fixed test

* fixed tests
2021-04-26 15:43:15 -04:00
Dima Arnautov 0cf3399e07
[ML] Check for the sort field type in Anomalies table before updating the URL state. (#98270)
* [ML] check sort field type

* [ML] functional tests for anomalies table pagination
2021-04-26 17:13:00 +02:00
Joe Reuter deb62d4479
Disable context menu "Explore underlying data" by default (#98039) 2021-04-26 13:20:43 +02:00
Brian Seeders 6fbc39d722
Skip flaky monitoring/*_mb tests (#98238) 2021-04-23 23:41:18 -04:00
Yuliia Naumenko 846aed54d9
Fixed Failing test for alerts list disable/mute operations. (#97057)
* Fixed Failing test for alerts list disable/mute operations.

* fixed tests

* removed awating check for switch status changed

* replaced api methos with ui call

* fixed merge

* reopen and close actions item menu

* fixed mute

* Update collapsed_item_actions.tsx

Remove changes

* removed retry

* add retry

* replaced try with try for time

* inceased retry

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-23 14:24:41 -07:00
Patrick Mueller 2ebb308753
[alerting] encode rule/connector ids in http requests made from alerting UI (#97854)
resolves: https://github.com/elastic/kibana/issues/97852

Adds `encodeURIComponent()` wrappers around references to rule, alert, and
connector ids.  Without this fix, if an alert id (which can contain
customer-generated data) contains a character that needs to be URL
encoded, the resulting API call from the web UI will fail.
2021-04-23 15:50:24 -04:00
Brian Seeders 7ebb731d41 skip flaky suite (#98190) 2021-04-23 14:01:00 -04:00
Melissa Alvarez d6e0251111
[ML] API Integration tests: adds test for Data Frame Analytics evaluate endpoint (#97856)
* wip: add api test for evaluate endpoint

* Add api test for evaluate endpoint

* add tests for view only and unauthorized user

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-23 12:44:27 -04:00
Chris Roberson c9ce295a0b
[Monitoring] Ensure Stack Monitoring UI works with metricbeat-* indices (#96205)
* WIP

* WIP

* Remove unnecessary fields

* Work on node detail page

* Cluster overview looking good

* Index page

* Fix types

* ML jobs

* CCR

* CCR

* We just need total here

* Standalone cluster fix

* Re-enable logstash

* FIx jest test

* Fix tests

* Fix tests

* Fix unused import

* Add new MB-based archives

* Add actual archives

* Fix types

* Add this file back in

* Fix tests and add more

* Update whitelist

* Renames

* Renames

* Only do ccs if enabled

* Updates

* Comment out

* More tests passing

* Another passing test

* More passing, yay

* Forgot to add the actual tests, wow

* CCR

* Fix CI issues

* Missed a field here

* Kibana tests passing

* Fix type issues

* Fix type

* Fix types

* Good chunk of logstash work

* Fix types

* Fix jest test

* Fix issue with get usage in logstash code

* Fix small bug here

* Update archives with proper mappings

* Handle both legacy and mb fields properly

* Fixes

* Fix jest test

* Fix issue

* Getting setup tests in a better state

* Only beats is failing now, which is good

* Progress on cluster listing

* Functional tests passing!

* More progress on cluster tests

* More cluster work

* Fix test

* Last recovery working

* Fix types

* Fix tests

* More tweaks

* Fix snapshot

* Use stats instead of kibana_stats

* Use node and node_stats for logstash

* Beats tests passing

* APM tests passing

* API tests passing!

* Fix types

* Fix tests

* Renames beats-with-restarted-instance archive dirs

Kebab case is disallowed for all newly added files.

* Renames logstash-pipeline dirs

Kebab case disallowed for all new files

* Renames multi-basic dirs

Kebab case disallowed for all new files

* Renames singlecluster-* dirs

Kebab case disallowed for all new files

* Fixes inaccurate path change for archive setup

* Reverts changes to rebuild_all script

Co-authored-by: Jason Rhodes <jason.matthew.rhodes@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-23 11:54:32 -04:00
Melissa Alvarez 51a50efe05
add explain api endpoint test (#98060) 2021-04-23 10:27:25 -04:00
Jonathan Budzenski fde12bf145 skip flaky suite. #97954 2021-04-22 16:22:42 -05:00
Spencer 6bb289368b
Revert skips added while triaging ES OOMs (#97876)
* Revert "skip flaky suite (#97382)"

This reverts commit e321f57f64.

* Revert "skip flaky suite (#97387)"

This reverts commit a89b756710.

* Revert "Skip test to try and stabilize master" (#97378)

This reverts commit 194355fdd3.

* upload heap dumps when they are created

Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-22 11:30:27 -07:00
Zacqary Adam Xeper 57f84f8593
[Fleet] Refactor setup to load default packages/policies with preconfiguration (#97328)
Co-authored-by: Nicolas Chaulet <nicolas.chaulet@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-22 11:25:10 -05:00
Dima Arnautov 49cdc9066d
[ML] Improve functional tests for Anomaly detection alert rule (#97998)
* [ML] ensureAdvancedSectionOpen for assertion

* [ML] delete alert rules after tests execution

* [ML] add isAdvancedSectionOpened
2021-04-22 11:16:54 -04:00
Angela Chuang f094d9fdc2
[Security Solution] Events integration test (#97519)
* events integration test

* add constants

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-22 12:50:35 +01:00
Nicolas Chaulet ee7ba71b43
[Fleet] Always create agent policy as active (#97874) 2021-04-21 17:13:48 -04:00
Cauê Marcondes e76987e13c
[APM] add comparison to Instances latency distribution (#97710)
* adding comparion data to chart

* fixing api test

* addressing comments

* refactoring
2021-04-21 16:47:03 -04:00
Marshall Main 1fb00900e1
[Security Solution][Detections] Fix flaky threshold API tests (#97768)
* Explicitly refreshes signals index for threshold api tests to prevent flakiness

* Unskip test suite
2021-04-21 16:13:15 -04:00
John Schulz 45255425f4
Add the more explicit & actionable text listed in ticket (#97857)
## Summary
closes #92591

Create a new `HostedAgentPolicyRestrictionRelatedError` which ensures the additional text from #92591 is included in all the appropriate places, but only specified once.

#### Some current examples
 * `Cannot update integrations of hosted agent policy ${id}`
 * `Cannot remove integrations of hosted agent policy ${id}`
 * `Cannot reassign an agent to hosted agent policy ${newAgentPolicy.id}`


#### In this PR are now
 * `Cannot update integrations of hosted agent policy ${id}  in Fleet because the agent policy is managed by an external orchestration solution, such as Elastic Cloud, Kubernetes, etc. Please make changes using your orchestration solution.`
 * `Cannot remove integrations of hosted agent policy ${id} in Fleet because the agent policy is managed by an external orchestration solution, such as Elastic Cloud, Kubernetes, etc. Please make changes using your orchestration solution.`
 * `Cannot reassign an agent to hosted agent policy ${newAgentPolicy.id} in Fleet because the agent policy is managed by an external orchestration solution, such as Elastic Cloud, Kubernetes, etc. Please make changes using your orchestration solution.`


### 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-04-21 15:52:02 -04:00
Spencer fad45022c1
[npm] upgrade all jest related dependencies (#96367)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-21 15:32:10 -04:00
Dima Arnautov 58d4334c71
[ML] UI enhancements for Anomaly detection rule type (#97626)
* [ML] update labels

* [ML] update job summary endpoint to return associated alert rules

* [ML] add alert rule icon to the table

* [ML] edit alert rules from ML UI

* [ML] register navigation

* [ML] support single job selection only

* [ML] remove groups options from the job selection

* [ML] deps on rule id to avoid re-rendering

* [ML] fix i18n

* [ML] add info message to the alert context

* [ML] fix typo

* [ML] register usage collection

* [ML] fix telemetry
2021-04-21 14:21:07 -04:00
spalger dfde5cbdf7 skip flaky suite (#97584) 2021-04-21 10:05:08 -07:00
ymao1 c27245b201
Removing unnecessary hit count check from es query alert (#97735)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-21 11:28:58 -04:00
Tiago Costa ffc3db5a30
skip flaky suite (#53575) 2021-04-21 13:38:14 +01:00
Tiago Costa 4811253576
skip flaky suite (#97403) 2021-04-21 13:33:15 +01:00
Anton Dosov bd4f461c70
[Search] Unify search plugin step 1 (#95811)
Remove the defaultStrategy override
Move async search strategy to data
Move EQL search strategy to data
Move rest of common/search/session data (Moving whole search/session is blocked by security and taskManager)
2021-04-21 14:23:49 +02:00
Uladzislau Lasitsa 4a17123ef8
Advanced JSON input in visualize editor is always light scheme (#97232)
* Use CodeEditor from react-utils which supports dark theme instead of deprecated EuiCodeEditor

* fix CI

* Fix CI

* Fix tests

* Update monaco_editor.ts

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-21 12:19:12 +03:00
Tim Sullivan 5a6eda2b22
[Reporting] Kibana Application Privileges for Reporting (#94966)
* Implement Reporting features as subfeatures of applications

* add setting to the docker list

* update doc images

* finish docs

* Apply suggestions from code review

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>

* Apply suggestions from code review

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>

* Apply suggestions from code review

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>

* typo fix

* "PDF / PNG Reports" => "Reporting"

* Update x-pack/plugins/reporting/server/config/index.ts

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

* Update x-pack/test/functional/apps/security/secure_roles_perm.js

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

* update ids of report privileges

* combine dashboard privileges into 1 group

* update jest snapshot

* fix tests

* fix tests

* updates from feedback

* add note

* update screenshot

* fix grammer

* fix bad link breaks in doc

* update doc heading

* Apply suggestions documentation feedback

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

* simplify

* use const assertions

* Apply text change suggestion from code review

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

* more test for oss_features and reporting subFeatures

* reduce loc diff

* fix snapshot

* fix flakiness in licensing plugin public functional tests

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>
Co-authored-by: Larry Gregory <lgregorydev@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
2021-04-20 20:44:24 -07:00
Mike Côté 0507ac5da0
Create task to cleanup action execution failures (#96971)
* Initial commit

* Add tests and support for concurrency

* Ability to disable functionality, use bulk APIs

* Fix type check

* Fix jest tests

* Cleanup

* Cleanup pt2

* Add unit tests

* Fix type check

* Fixes

* Update test failures

* Split schedule between cleanup and idle

* Add functional tests

* Add one more test

* Cleanup repeated code

* Remove duplicate actions plugin requirement

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-20 19:11:25 -04:00
Cauê Marcondes 6b70784f67
[APM] Service overview: Instances table metadata foldout (#96467)
* shows instance details

* shows instance details

* shows instance details

* shows instance details

* shows instance details

* adding api test

* addressing PR comments

* addressing PR comments

* addressing PR comments

* addressing PR comments

* fixing ts issues

* fixing ci

* fixing api tests

* fixing api test

* fixing api test

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-20 18:26:58 -04:00
Shahzad 5de8ee101d
[Exploratory view] use synthetics and rum indices settings (#97425) 2021-04-20 22:00:21 +02:00
Devin W. Hurley 4d2414e7f5
[Security Solution] [Detections] Combine multiple timestamp searches into single request (#96078)
* merge multiple timestamp queries into one single search

* fix types and unit tests

* remove unused code for sending secondary search

* removes unused excludeDocsWithTimestampOverride

* adds integration tests to cover cases that should / should not generate signals when timestamp override is present in rule

* adds integration test to ensure unmapped sort fields do not break search after functionality of detection rules

* Need to figure out why moving the tests around fixed them...

* updates tests with new es archive data and fixes bug where exclusion filter was hardcoded to event.ingested :yikes:

* remove dead commented out code

* fixes typo in test file, removes redundant delete signals call in integration test, fixes logic for possibility of receving a null value in sort ids, removes unused utility function for checking valid sort ids

* a unit test for checking if an empty string of a sort id is present was failing because we moved the logic for checking that out of the build search query function and up into the big loop. So I moved that unit test into the search after bulk create test file.

* fix types

* removes isEmpty since it doesn't check for empty strings
2021-04-20 15:16:01 -04:00
igoristic f3affd8bd4
[Monitoring] Added cgroup memory usage metric (#97076)
* Added cgroup memory usage metric

* Added memory usage and limit

* container_memory

* Fixed tests

* fixed instance tests

* fixed values

* skip failing test
2021-04-20 14:47:12 -04:00
Jen Huang 10e52bb582
[Fleet] Add instructions and generation of a service token for Fleet Server onboarding (#97585)
* Don't block standalone agent instructions when not using Fleet server yet

* Add service token instructions - UI only

* Add route for regenerating fleet server service token

* generate tokens instead of regenerate and add error catching and tests

* fix i18n typo

* i18n fix, add sudo, copy edits

* Fix commands

* Add missing test file

Co-authored-by: Nicolas Chaulet <nicolas.chaulet@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-20 13:53:18 -04:00
Ross Wolf 1925cea9a2
[Security][Fleet] Install the security_detection_engine package automatically (#97191)
* Automatically install the security_detection_engine package via fleet
* Update dockerImage to include the security_detection_engine package
* Update api/fleet/setup install test
* Update test data for Endpoint package
* Fix JSON token
* Update firis json entry in destination_index
* Update destination_index structure
* Update destination_index structure
* Change KQL query to unblock testing
* Restore KQL and fix JSON instead
* update timestamps to pass tests
2021-04-20 13:07:11 -04:00
Ahmad Bamieh 0f4538195f
[Usage collection] Collect non-default kibana configs (#97368)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-20 11:02:27 -04:00
Matthias Wilhelm 2ecbca0d8d
[Discover] Enable EuiDataGrid (#89264)
* Now the new EuiDataGrid based document table is the default

* Columns can be sorted by drag and drop

* Column width can be changed by drag and drop

* There's a fullscreen mode

* There's document selection 

* There's document navigation in the flyover of a expanded document

* Sorting is much more user friendly, less confusing and sort order can be changed by drag and drop
2021-04-20 14:43:02 +02:00
Angela Chuang f8a3ea64e7
unskip tls integration test (#97597) 2021-04-20 12:51:21 +01:00
Robert Oskamp a3c2aebb9f
[ML] Functional tests - stabilize anomaly charts embeddables test (#97452)
This PR stabilizes the anomaly charts embeddables test by adding a retry.
2021-04-20 11:38:16 +02:00
Angela Chuang e4bbdda129
use smaller piece of mock data (#96953)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-20 10:30:30 +01:00
Dima Arnautov 20b585d122
[ML] Anomaly detection rule lookback interval improvements (#97370)
* [ML] add advanced settings

* [ML] default advanced settings

* [ML] advanced settings validators

* [ML] range control for top n buckets

* [ML] execute rule with a new query for most recent anomalies

* [ML] find most anomalous bucket from the top N

* Revert "[ML] range control for top n buckets"

This reverts commit e039f250

* [ML] validate check interval against the lookback interval

* [ML] update descriptions

* [ML] fix test subjects

* [ML] update warning message

* [ML] add functional tests

* [ML] adjust unit tests, mark getLookbackInterval

* [ML] update lookback interval description and warning message

* [ML] update fetchResult tsDoc

* [ML] cleanup

* [ML] fix imports to reduce bundle size

* [ML] round up lookback interval

* [ML] update functional test assertion

* [ML] async import for validator
2021-04-20 10:52:54 +02:00
Yulia Čech bd5e9ba10a
[Remote Clusters] Added a11y tests and fixed violations (#96989)
* Added a11y tests for Remote Clusters plugin and fixed discovered violations

* Added an a11y test for a delete modal

* Updated payload type casting

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-20 08:51:28 +02:00
Nathan L Smith 042fa1a2ce
Remove alerting feature flag from advanced settings (#97265)
* Remove alerting feature flag from advanced settings

Make it so the alerting UI in Observability can only be turned on and off in kibana.yml with `xpack.observability.enableAlertingExperience`.

We no longer:

* Allow turning this on and off for the current space in the advanced settings in Kibana
* Allow turning this on on cloud
* Send telemetry on whether or not the flag is enabled

Add some docs in READMEs as well.
2021-04-19 22:09:51 -05:00
Angela Chuang 44eda0fa73
[SecuritySolution] Timeline http endpoints (#95036)
* add notes and pinned events routes

* add api endpoints on client side

* add apis

* fix get all timelines

* add decodeResponseFavoriteTimeline

* rm apolloClient

* fix unit tests

* remove unused routes

* update cypress task

* fix integration tests

* clean up type dependency

* fix types

* update snapshot

* remove graphql types dependency

* fix types

* remove graphql queries

* remove unused i18n

* fix types

* fix delete timelines

* fix types and rewrite timeline integration tests

* add readme

* fix unit test

* fix unit test

* update package.json

* rm x-pack/yarn.lock

* fix tests

* update yarn.lock

* update yarn.lock

* rm unused dependency

* fix types

* fix unit test

* update query params for getAllTimelines

* fix integration test

* wrap JSON.stringify with try/catch

* fix lint error

* fix type

* wrap JSON.stringify with try/catch

* fix unit test

* review

* review

* review

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-19 20:32:39 -04:00
Cauê Marcondes 83824ab13a
[APM] Stop fetching previous period data when comparison is disabled (#97469)
* stopping fetching previous period data when comparison is disabled

* addressing PR comments

* refactoring comparison and primary API names
2021-04-19 17:50:48 -04:00
Bhavya RM b5effc20a4
unskipping login and spaces a11y tests (#97190) 2021-04-19 16:59:51 -04:00
Marshall Main a90afbf1ec
[Security Solution][Detections] Add API integration tests for threshold and EQL rules (#97336)
* Add API integration tests for threshold rules and more tests for EQL rules

* Add API more tests for exceptions and value list exceptions

* Fix unit test and add EQL api test checking multiple signal generation

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-19 16:10:59 -04:00
Quynh Nguyen 71e8118984
[ML] Fix runtime mapping texts to runtime fields, add transform switch modal (#97008) 2021-04-19 13:46:18 -05:00
Vadim Dalecky 77fe59d58f
Drilldown cloning (#91959)
* refactor: 💡 remove switch statement

* feat: 🎸 improve <ListManageDrilldowns> stories

* refactor: 💡 remove <FlyoutListManageDrilldowns> component

* refactor: 💡 simplify <FlyoutDrilldownWizard> component

* feat: 🎸 introduce React context for drilldowns flyout

* refactor: 💡 rename drilldown manager component

* refactor: 💡 rename drilldown manager in example plugin

* refactor: 💡 rename folder to "containers"

* feat: 🎸 use drilldown context to store UI state

* chore: 🤖 fix linter errors

* refactor: 💡 move Drilldown Manager into its own folder

* feat: 🎸 add drilldown state management

* feat: 🎸 add <PresentablePicker> component

* chore: 🤖 clean up component props

* feat: 🎸 add <ActionFactoryPicker> component

* feat: 🎸 connect action factory picker component

* chore: 🤖 cleanup

* feat: 🎸 start work on <DrilldownForm>

* feat: 🎸 add <TriggerPicker> component

* test: 💍 add <TriggerPicker> stories

* feat: 🎸 add <DrilldownForm> component

* refactor: 💡 remove ActionFactory from <DrilldownForm>

* feat: 🎸 connect <DrilldownForm> component

* feat: 🎸 improve new drilldown connected form

* fix: 🐛 correct TypeScript types

* feat: 🎸 show trigger intersection in the UI

* feat: 🎸 add <ActionFactory> component

* feat: 🎸 show connected <ActionFactoryView> component

* feat: 🎸 use a single action factory control

* fix: 🐛 remove unused props

* refactor: 💡 improve create drilldown form

* fix: 🐛 correct hello bar close callback

* feat: 🎸 connect welcome message state to local storage

* fix: 🐛 correct TypeScript errors

* fix: 🐛 hide correctly hello bar

* feat: 🎸 add drilldown creation logic

* feat: 🎸 connect event list state

* fix: 🐛 correct story props

* fix: 🐛 correct typescript errors

* feat: 🎸 navigate to list view when drilldown is created

* feat: 🎸 add EUI tabs

* feat: 🎸 connect route state to tabs

* refactor: 💡 move flyout content into a separate component

* refactor: 💡 move manager tabs into a separate component

* chore: 🤖 delete unused variables

* feat: 🎸 make drilldowns title dynamic

* docs: ✏️ update README

* feat: 🎸 add <DrilldownManagerTitle> component

* feat: 🎸 make flyout footer dynamic

* refactor: 💡 make action factory state depend on the route

* feat: 🎸 create standalone new drilldown form

* fix: 🐛 support i18n in new drilldown form

* feat: 🎸 add space between action factory picker

* refactor: 💡 simplify <DrilldownManagerContent>

* feat: 🎸 add back chevron button to drilldown flyout

* chore: 🤖 remove unused translations

* chore: 🤖 delete unused translation file

* feat: 🎸 add <DrilldownManagerFooter> and improve title comp

* feat: 🎸 improve <CreateDrilldownForm>

* refactor: 💡 improve variable name

* feat: 🎸 add isValid() to drilldown state

* refactor: 💡 move drilldown hello bar into a seprate component

* feat: 🎸 show drilldown list on "Manage" tab

* refactor: 💡 improve drilldown list component

* feat: 🎸 connect drill list comp to delete and edit functional

* feat: 🎸 support form disabling when drill creation in progress

* feat: 🎸 connect drilldown edit form

* feat: 🎸 use /manage route for editing drilldowns

* fix: 🐛 render constant action factory in edit mode

* refactor: 💡 move drilldown footer submit button in a sep comp

* feat: 🎸 connect editing to drilldown edit form

* feat: 🎸 disable edit buttons when list has selection

* chore: 🤖 remove unused code

* feat: 🎸 show error if delete fails

* chore: 🤖 remove legacy code

* feat: 🎸 improve drilldown table component

* fix: 🐛 fix "Trigger" translation

* fix: 🐛 import correct drilldown table item

* feat: 🎸 handle empty name errors

* feat: 🎸 track config error in drilldown state

* feat: 🎸 track drilldown state trigger errors

* fix: 🐛 pre-select trigger if only one trigger is available

* feat: 🎸 add drilldown template interface

* feat: 🎸 progress on drilldown cloning list

* feat: 🎸 use table view to display drilldown cloning templates

* feat: 🎸 generate drilldown templates from embeddable siblings

* feat: 🎸 improve drilldown template generation logic

* feat: 🎸 improve drilldown template preview

* feat: 🎸 improve start from template table view

* feat: 🎸 show number of items to be cloned

* feat: 🎸 add ID to drilldown templates

* feat: 🎸 implement basic cloning functionality

* feat: 🎸 add ability to create drilldown from existing one

* feat: 🎸 improve cloning behaviour

* feat: 🎸 improve icon of templates

* feat: 🎸 remove "Start from template" accordion

* feat: 🎸 improve cloning table view

* feat: 🎸 add "Triggers" column

* feat: 🎸 enable drilldown actions in "edit" mode

* fix: 🐛 reset drilldown state cache by factory on new creation

* refactor: 💡 use in-memory table for drilldown template list

* feat: 🎸 add search box to drilldown template in-memory table

* feat: 🎸 show back chevron on no steps back, to close flyout

* feat: 🎸 show notification when drilldown was just cloned

* feat: 🎸 add i18n to cloning notification, and move to sep comp

* feat: 🎸 add support for plural and singular in translation

* feat: 🎸 make new drilldown names unique with (copy x) at end

* feat: 🎸 rename cloning to copying

* feat: 🎸 show incompatible trigger warning in template list

* refactor: 💡 craete text with icon component

* feat: 🎸 show trigger warning in manage view

* refactor: 💡 use <TextWithIcon> in drilldown table view

* feat: 🎸 add <TriggerLineItem> component

* feat: 🎸 show tooltip on incompatible icon hover

* feat: 🎸 unify tooltips in <TextWithIcon> component

* feat: 🎸 enable sorting in drilldown tables

* fix: 🐛 correct ui actions x-pack typescript errors

* fix: 🐛 correct ui actions example plugin errors

* docs: ✏️ update autogenerated docs

* chore: 🤖 remove unused translations

* test: 💍 remove implementation from todo placeholders

* test: 💍 fix dashboard drilldown functional test

* chore: 🤖 remove unused constants

* test: 💍 fix url drilldown functional test

* test: 💍 add drilldown manager state tests

* feat: 🎸 dont show back button when no more steps back

* feat: 🎸 pre-fill in drilldown name

* feat: 🎸 add copy suffix when creating new drilldown

* feat: 🎸 close flyout if opened in create mode

* feat: 🎸 dont close flyout if user navigated to "manage" tab

* feat: 🎸 show smaller notification message on cloning

* feat: 🎸 add "(copy X)" text when cloning/copying drilldowns

* feat: 🎸 make copy prefixes start from "(copy)"

* feat: 🎸 add link to dismiss notification

* feat: 🎸 rename "Clone (x)" button to "Copy (x)"

* feat: 🎸 rename tempalte table last column copy button

* feat: 🎸 use "copied" terminology in notification

* feat: 🎸 add "Copy existing drilldown" label to template picker

* feat: 🎸 use "auto" layout on drilldown template picker table

* test: 💍 add drilldown manager tests

* feat: 🎸 swap label for title
2021-04-19 19:26:05 +02:00
Joe Reuter a2620f1c47
[Lens] improve handling of mixed axes (#97236) 2021-04-19 16:35:15 +02:00
Joe Reuter 0ea0e40331
[Lens] Better defaults for top values odering (#97099) 2021-04-19 13:49:26 +02:00
Liza Katz 4c45ae0645
[Search] enable fun-ctional tests (#97398)
* only fun-ctional

* fix functional tests

* tests

* Type
2021-04-19 12:21:50 +03:00
Sonja Krause-Harder 05bd1c0cdb
[Fleet] Finer-grained error information from install/upgrade API (#95649)
* Intercept installation errors and add meta info.

* Adjust mock.

* Catch errors in all steps of install/upgrade.

* Adjust handler for direct package upload.

* Don't throw not-found errors on assets during rollback.

* Correctly catch errors from _installPackage()

* Propagate error from installResult in bulk install case.

* Add tests for rollback.

* Remove unused code.

* Skipping test that doesn't test what it says.

* Fix and reenable test.
2021-04-18 16:47:24 +02:00
Liza Katz 1a3e033c90
[Partial Results] Move other bucket into Search Source (#96384)
* Move inspector adapter integration into search source

* docs and ts

* Move other bucket to search source

* test ts + delete unused tabilfy function

* hierarchical param in aggconfig.
ts improvements
more inspector tests

* fix jest

* separate inspect
more tests

* jest

* inspector

* Error handling and more tests

* put the fun in functional tests

* code review

* Add functional test for other bucket in search example app

* test

* test

* ts

* test

* test

* ts

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-18 12:50:02 +03:00
Catherine Liu 3b31d81196
[Dashboard] Makes lens default editor for creating new panels (#96181)
* Makes lens default editor in dashboard

Added all editors menu to dashboard panel toolbar

Fixed toggle on editor menu

Removed unnecessary comments

Added data test subjects to editor menu buttons

Populated editor menu with vis types

Removed unused imports

Fixed imports

Adds showCreateNewMenu prop to AddPanelFlyout

Rearranged order of editor menu options

Fixed ts errors

Added groupnig to embeddable factory

Use embeddable state transfer service to redirect to editors

Added showGroups to TypeSelectionState

Fixed add panel flyout test

Fixed data test subjects

Fixed factory groupings

Removed unused import

Fixed page object

Added telemtry to dashboard toolbar

Added telemtry to editor menu

Fix ml embeddable functional tests

Fix lens dashboard test

Fix empty dashboard test

Fixed ts errors

Fixed time to visualize security test

Fixed empty dashboard test

Fixed clickAddNewEmbeddableLink in dashboardAddPanel service

Fixed agg based vis functional tests

Revert test changes

Fixed typo

Fix tests

Fix more tests

Fix ts errors

Fixed more tests

Fixed toolbar sizes and margins to align with lens

Fix tests

Fixed callbacks

Fixed button prop type

New vis modal copy updates

Added savedObjectMetaData to log stream embeddable factory

Addressed feedback

Fixed ts error

Fix more tests

Fixed ts errors

Updated dashboard empty prompt copy

Adds tooltip to log stream embeddable factory saved object meta data

Made icons monochrome in toolbar

Fixed icon colors in dark mode

Cleaned up css

Fixed ts errors

Updated snapshot

Fixed map icon color

* Added tooltips for ML embeddables

* Restored test

* Added empty dashboard panel test

* Fixed i18n id

* Fix dashboard_embedding test

* Removed unused service

* Fixed i18n error

* Added icon and description properties to embeddable factory definition

* Fixed ts errors

* Fixed expected value

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-17 22:29:27 -07:00
Tiago Costa a89b756710
skip flaky suite (#97387) 2021-04-17 15:52:32 +01:00
spalger e321f57f64 skip flaky suite (#97382) 2021-04-16 22:28:19 -07:00
spalger 1cbdb26cea skip flaky suite (#97355) 2021-04-16 12:11:12 -07:00
Tyler Smalley 194355fdd3 Skip test to try and stabilize master
https://github.com/elastic/kibana/issues/97378

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2021-04-16 10:57:29 -07:00
Liza Katz c187270b5e
[Search Sessions] Client side search cache (#92439)
* dev docs

* sessions tutorial

* title

* Update dev_docs/tutorials/data/search.mdx

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

* Update dev_docs/tutorials/data/search.mdx

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

* Update dev_docs/tutorials/data/search.mdx

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

* Update dev_docs/tutorials/data/search.mdx

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

* Update dev_docs/tutorials/data/search.mdx

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

* Update dev_docs/tutorials/data/search.mdx

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

* Update dev_docs/tutorials/data/search.mdx

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

* Update dev_docs/tutorials/data/search.mdx

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

* Update dev_docs/tutorials/data/search.mdx

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

* Update dev_docs/tutorials/data/search.mdx

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

* Update dev_docs/tutorials/data/search.mdx

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

* Update dev_docs/tutorials/data/search.mdx

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

* Update dev_docs/tutorials/data/search.mdx

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

* Update dev_docs/tutorials/data/search.mdx

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

* Update dev_docs/tutorials/data/search.mdx

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

* Update dev_docs/tutorials/data/search.mdx

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

* Update dev_docs/tutorials/data/search.mdx

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

* Update dev_docs/tutorials/data/search.mdx

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

* Update dev_docs/tutorials/data/search.mdx

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

* Update dev_docs/tutorials/data/search.mdx

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

* Update dev_docs/tutorials/data/search.mdx

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

* Update dev_docs/tutorials/data/search.mdx

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

* Code review

* client cache

* mock utils

* improve code

* Use cacheOnClient in Lens

* mock

* docs and types

* unit tests!

* Search response cache + tests

* remove cacheOnClient
evict cache on error

* test ts

* shouldCacheOnClient + improve tests

* remove unused

* clear subs

* dont unsubscribe on setItem

* caching mess

* t

* fix jest

* add size to bfetch response @ppisljar
use it to reduce the # of stringify in response cache

* ts

* ts

* docs

* simplify abort controller logic and extract it into a class

* docs

* delete unused tests

* use addAbortSignal

* code review

* Use shareReplay, fix tests

* code review

* bfetch test

* code review

* Leave the bfetch changes out

* docs + isRestore

* make sure to clean up properly

* Make sure that aborting in cache works correctly
Clearer restructuring of code

* fix test

* import

* code review round 1

* ts

* Added functional test for search request caching

* test

* skip before codefreeze

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-16 19:59:23 +03:00
Tyler Smalley 347882f01a skip flaky suite (#91360) 2021-04-15 22:05:14 -07:00
Ryland Herrick b5ae056ac4
[Security Solution][Detections] ML Rules accept multiple ML Job IDs (#97073)
* Adds helper to normalize legacy ML rule field to an array

This will be used on read of rules, to normalize legacy rules while
avoiding an explicit migration.

* Fix our detection-specific ML search function

Luckily this was just a translation layer to our anomaly call, and the
underlying functions already accepted an array of strings.

* WIP: Run rules against multiple ML Job IDs

We don't yet support creation of rules with multiple job ids, either on
the API or the UI, but when we do they will work.

Note: the logic was previously to generate an error if the underlying
job was not running, but to still query and generate alerts. Extending
that logic to multiple jobs: if any are not running, we generate an
error but continue querying and generating alerts.

* WIP: updating ml rule schemas to support multiple job IDs

* Simplify normalization method

We don't care about null or empty string values here; those were
holdovers from copying the logic of normalizeThreshold and don't apply
to this situation.

* Move normalized types to separate file to fix circular dependency

Our use of NonEmptyArray within common/schemas seemed to be causing the
above; this fixes it for now.

* Normalize ML job_ids param at the API layer

Previous changes to the base types already covered the majority of
routes; this updates the miscellaneous helpers that don't leverage those
shared utilities.

At the DB level, the forthcoming migration will ensure that we always
have "normalized" job IDs as an array.

* Count stopped ML Jobs as partial failure during ML Rule execution

Since we continue to query anomalies and potentially generate alerts, a
"failure" status is no longer the most accurate for this situation.

* Update 7.13 alerts migration to allow multi-job ML Rules

This ensures that we can assume string[] for this field during rule
execution.

* Display N job statuses on rule details

* WIP: converts MLJobSelect to a multiselect

Unfortunately, the SuperSelect does not allow multiselect so we need to
convert this to a combobox. Luckily we can reuse most of the code here
and remain relatively clean.

Since all combobox options must be the same (fixed) height, we're
somewhat more limited than before for displaying the rows. The
truncation appears fine, but I need to figure out a way to display the
full description as well.

* Update client-side logic to handle an array of ML job_ids

* Marginally more legible error message

* Conditionally call our normalize helper only if we have a value

This fixes a type error where TS could not infer that the return value
would not be undefined despite knowing that the argument was never
undefined. I tried some fancy conditional generic types, but that didn't
work.

This is more analogous to normalizeThresholdObject now, anyway.

* Fix remaining type error

* Clean up our ML executor tests with existing contract mocks

* Update ML Executor tests with new logic

We now record a partial failure instead of an error.

* Add and update tests for new ML normalization logic

* Add and update integration tests for ML Rules

Ensures that dealing with legacy job formats continues to work in the
API.

* Fix a type error

These params can no longer be strings.

* Update ML cypress test to create a rule with 2 ML jobs

If we can create a rule with 2 jobs, we should also be able to create a
rule with 1 job.

* Remove unused constant

* Persist a partial failure message written by a rule executor

We added the result.warning field as a way to indicate that a partial
failure was written to the rule, but neglected to account for that in the
main rule execution code, which caused a success status to immediately
overwrite the partial failure if the rule execution did not otherwise
fail/short-circuit.
2021-04-15 21:27:43 -05:00
John Schulz 6e5c9278ba
[Fleet] Use 'hosted agent policy' naming in UI & API messages (#97287)
## Summary

### What this PR _does_ change
 - [x] Replace all UI & API instances of "managed policy" with "hosted agent policy" #93504
 - [x] Replace all UI & API instances of "unmanaged policy" with "regular agent policy" #93504
 - [x] Update most variable names containing `managed` to `hosted`

<details><summary>screenshots</summary>

<img width="489" alt="Screen Shot 2021-04-15 at 10 54 01 AM" src="https://user-images.githubusercontent.com/57655/114898051-cac35980-9ddf-11eb-9c55-3fb5c0211c63.png">
<img width="339" alt="Screen Shot 2021-04-15 at 11 40 47 AM" src="https://user-images.githubusercontent.com/57655/114898053-cac35980-9ddf-11eb-8c60-3459aed3db6c.png">
<img width="714" alt="Screen Shot 2021-04-15 at 11 40 59 AM" src="https://user-images.githubusercontent.com/57655/114898054-cac35980-9ddf-11eb-912a-623eba9c3860.png">
</details>

### What this PR _does not_ change
  - [ ] The `is_managed` property of the agent policy saved object*
  - [ ] The updated error messages in https://github.com/elastic/kibana/issues/92591

<details><summary>*why not change the <code>is_managed</code> property?</summary>

<p>Changing the property will require a migration from 7.12. That's not a problem, but we haven't decided on <a href="https://github.com/elastic/kibana/issues/93504#issuecomment-790060997">a new name/approach</a> yet. Rather than update to <code>is_hosted: boolean</code> now and potentially something like <code>managed_by: enum</code> later, we'll update it when we have a decision.

<p><strong>TL;DR:</strong> It's a trivial update to make later and a minuscule amount of debt to pay until then. Less than cost of doing it twice.
 
</details>

### Checklist

- [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/master/packages/kbn-i18n/README.md)
- [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-04-15 21:01:28 -04:00
Nicolas Chaulet 78937e3bb4
[Fleet] Remove fleet agent routes and related services (#97206) 2021-04-15 17:15:43 -04:00
Dario Gieselaar 5bb9eecd26
[RAC] Populate Observability alerts table with data from alerts indices (#96692)
* Set up Observability rule APIs

* Populate alerts table with data from API

* Move field map types/utils to common

* Format reason/link in alert type

* Format reason/link in alert type

* Fix issues with tsconfigs

* Storybook cleanup for example alerts

* Use `MemoryRouter` in the stories and `useHistory` in the component to get the history
* Replace examples with ones from "real" data
* Use `() => {}` instead of `jest.fn()` in mock registry data

* Store/display evaluations, add active/recovered badge

* Some more story fixes

* Decode rule data with type from owning registry

* Use transaction type/environment in link to app

* Fix type issues

* Fix API tests

* Undo changes in task_runner.ts

* Remove Mutable<> wrappers for field map

* Remove logger.debug calls in alerting es client

* Add API test for recovery of alerts

* Revert changes to src/core/server/http/router

* Use type imports where possible

* Update limits

* Set limit to 100kb

Co-authored-by: Nathan L Smith <smith@nlsmith.com>
2021-04-15 18:25:50 +02:00
Frank Hassanabad ede8ed3f95
[Security Solutions ] Fixes failed to query DNS data - too_many_buckets_exception (#97069)
## Summary

Fixes a bug where on the DNS tab of networks you can get a `too_many_buckets_exception`. Worked through the query with @angorayc and together I think we figured out that the query could be re-written with aggregations in a way to get the same results without having to query a large amount of terms which causes the buckets exception.

Added a e2e test and one way of being able to call bsearch in the e2e when it returns the search is still in progress so we don't have the large query test cause flakiness 🤞 .

### 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-04-15 09:22:56 -06:00
Kerry Gallagher 9b456ac0fe
[Logs UI] Provide support for Kibana Index Patterns in the logs source configuration (#96454)
* Provide support for Kibana Index Patterns in the logs source configuration

Co-authored-by: Felix Stürmer <weltenwort@users.noreply.github.com>
2021-04-15 16:15:11 +01:00
Robert Oskamp d20ecaf939
[ML] Functional tests - fix transform _nodes API test for cloud (#97240)
This PR fixes the transform _node API tests for cloud, where more than one transform node could be available.
2021-04-15 16:32:27 +02:00
Thomas Neirynck e38a3dabf7
[Maps] Add cache control to mvt endpoints (#94861) 2021-04-15 09:07:34 -04:00
Robert Oskamp d5a4a708f9
[ML] Functional tests - stabilize swim lane pagination test (#97214)
This PR stabilizes the swim lane pagination test by adding a retry to the assertion.
2021-04-15 14:15:10 +02:00
Nicolas Chaulet b96172e27c
[Fleet] Fleet server onboarding UI (#96867) 2021-04-15 01:22:32 -04:00
John Schulz de4bcdb9d9
[Fleet] Rename force to revoke agent unenroll APIs (#97041)
## Summary

 - fcbc9d9 Rename `force` param to `revoke` for `/agents/{agent_id}/unenroll` & `/agents/bulk_unenroll`
 - 03b9b90 Add new `force` param

See https://github.com/elastic/kibana/issues/96873 for background

<table>
  <thead>
    <tr>
      <td rowspan="2"></td><td colspan="2">Unenroll Agent</td><td rowspan="2">Revoke API Keys</td>
    </tr>
    <tr>
      <td>Regular</td><td>Hosted</td></td>
    </tr>
  </thead>
  <tr><td colspan="4"><strong>Rename <code>force</code> to <code>revoke</code></strong></td></tr>
  <tr><td>Current <code>force=false|undefined</code></td><td></td><td></td><td></td></tr>
  <tr><td>Proposed <code>revoke=false|undefined</code></td><td></td><td></td><td></td></tr>
  <tr><td>Current <code>force=true</code></td><td></td><td></td><td></td></tr>
  <tr><td>Proposed <code>revoke=true</code></td><td></td><td></td><td></td></tr>
  <tr><td colspan="4"><strong>Change <code>force</code> param </strong></td></tr>
  <tr><td>Proposed <code>force=false|undefined</code></td><td></td><td></td><td></td></tr>
  <tr><td>Proposed <code>force=true</code></td><td></td><td></td><td></td></tr>
  <tr><td>Proposed <code>force=true</code> & <code>revoke=true</code></td><td></td><td></td><td></td></tr>
</table>

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

### Changes required for consumers
Any call to `/agents/{agent_id}/unenroll` & `/agents/bulk_unenroll` which passes the `force` param should change to `revoke` to maintain the current behavior.
2021-04-14 19:27:06 -04:00
Bhavya RM f92ce3074b
Test user for maps test verifying sample data maps (#96109)
test user for sample maps test & removing geoall_writer_role from add layer
2021-04-14 19:22:18 -04:00
Rashmi Kulkarni 3ba640403f
unskip accessibility - dashboard_edit_panel tests (#96710)
* unskip

* added render complete

* added render complete in couple other places

* minor corrections

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-14 15:05:12 -07:00
Alison Goryachev 813681eb08
[Upgrade Assistant] Redesign overview page (#95346) 2021-04-14 12:21:46 -04:00
Tim Sullivan 1615d5f62b
Reporting: Refactor functional tests with security roles checks (#96856)
* Reporting: Refactor functional tests with security roles checks

* consolidate initEcommerce calls

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-14 09:20:59 -07:00
Robert Oskamp ad628878b1
[ML] security_network module - fix type of defaultIndexPattern (#97096)
This PR fixes the defaultIndexPattern type in the security_network module definition.
2021-04-14 16:43:37 +02:00
John Schulz 58b1d10f0b
Copy esArchiver commands from ./reassign.ts to fix tests (#97012)
## Summary

Seeing failures like this locally for `x-pack/test/fleet_api_integration/apis/agents/unenroll.ts` tests
<details><summary>screenshot of error</summary>
<img width="1121" alt="Screen Shot 2021-04-13 at 10 06 51 AM" src="https://user-images.githubusercontent.com/57655/114592495-fec04280-9c58-11eb-939c-b84aa7469c2a.png">
</details>
Copied the `esArchiver` patterns from `x-pack/test/fleet_api_integration/apis/agents/reassign.ts` in https://github.com/elastic/kibana/pull/96837 and the error is gone

### 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-04-13 15:42:36 -04:00
Sébastien Loix 67e512fe27
[ILM] Add UI validation for min age value (#96718) 2021-04-13 18:47:20 +01:00
Mike Côté 8e9ca66520
Fix alerting flaky test by adding retryIfConflict to fixture APIs (#96226)
* Add retryIfConflict to fixture APIs

* Fix

* Fix import errors?

* Revert part of the fix

* Attempt fix

* Attempt 2

* Try again

* Remove dependency on core code

* Comment

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-13 13:29:22 -04:00
Nicolas Chaulet 0e7612dd1a
[Fleet] Fix Fleet API integration tests (#96837) 2021-04-13 11:16:32 -04:00
Tim Sullivan f67f0e80e7
Reporting: Fix _index and _id columns in CSV export (#96097)
* Reporting: Fix _index and _id columns in CSV export

* optimize - cache _columns and run getColumns once per execution

* Update x-pack/plugins/reporting/server/export_types/csv_searchsource/generate_csv/generate_csv.ts

Co-authored-by: Michael Dokolin <dokmic@gmail.com>

* feedback

* fix typescripts

* fix plugin list test

* fix plugin list

* take away the export interface to test CI build stats

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Michael Dokolin <dokmic@gmail.com>
2021-04-13 08:03:09 -07:00
Craig Chamberlain bedf92f001
Adds Network ML module with four ML jobs for ECS network data (#96480)
* network module

adds the network module with four ml jobs for the 7.13 release

* Update datafeed_high_count_network_denies.json

json formatting

* update test

added the security_network module to the list

* renames

module name change to security_network / Security: Network

* formatting

change hyphen char to underscores

* fixes and name changes

fixes to df queries, descriptions. created_by param

* update tests

tests need the security_network module added

* formatting

change hyphens to underscores

* descriptions

format descriptions

* Update datafeed_high_count_network_events.json

indentation fixes

* Update x-pack/plugins/ml/server/models/data_recognizer/modules/security_network/manifest.json

Co-authored-by: Lisa Cawley <lcawley@elastic.co>

* Update x-pack/plugins/ml/server/models/data_recognizer/modules/security_network/ml/high_count_network_denies.json

Co-authored-by: Lisa Cawley <lcawley@elastic.co>

* Update datafeed_high_count_network_events.json

change to a filter

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Lisa Cawley <lcawley@elastic.co>
2021-04-13 10:35:01 -04:00
Thomas Neirynck 25000b4091
[Maps] wrap flaky test in retry block (#96448) 2021-04-13 09:21:21 -04:00
Thom Heymann 69f013e2fb
Added ability to create API keys (#92610)
* Added ability to create API keys

* Remove hard coded colours

* Added unit tests

* Fix linting errors

* Display full base64 encoded API key

* Fix linting errors

* Fix more linting error and unit tests

* Added suggestions from code review

* fix unit tests

* move code editor field into separate component

* fixed tests

* fixed test

* Fixed functional tests

* replaced theme hook with eui import

* Revert to manual theme detection

* added storybook

* Additional unit and functional tests

* Added suggestions from code review

* Remove unused translations

* Updated docs and added detailed error description

* Removed unused messages

* Updated unit test

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Larry Gregory <larry.gregory@elastic.co>
2021-04-13 12:21:11 +01:00
Angela Chuang 3a7155eaa1
retry users integration test (#96772) 2021-04-13 09:58:26 +01:00
Angela Chuang 1ec21a5d88
wrap tests with retry (#96764) 2021-04-13 09:53:54 +01:00
Jean-Louis Leysens f31e13c426
[Ingest Pipelines] Migrate to new ES client (#96406)
* - migrated use of legacy.client to client
- removed use of isEsError to detect legacy errors
- refactored types to use types from @elastic/elasticsearch
  instead (where appropriate)

tested get, put, post, delete, simulate and documents endpoints
locally

* remove use of legacyEs service in functional test

* fixing type issues and API response object

* remove id from get all request!

* reinstated logic for handling 404 from get all pipelines request

* clarify error handling with comments and small variable name refactor

* updated delete error responses

* update functional test

* refactor use of legacyEs

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-13 10:51:43 +02:00
Rashmi Kulkarni cf2c62edf8
ccs_discover additional tests (#96669)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-12 12:23:46 -07:00
John Schulz cb3c4e3a21
[Fleet] support force flag to add/remove package_policies (#96713)
## Summary

Can now pass a `force=true` parameter to add & remove integrations on hosted policies as originally intended [1] & [2]

 * Add `force` param for `POST` `/api/fleet/package_policies` & `/api/fleet/package_policies/delete` to a policy. Update tests to confirm
 * Not strictly required, but "while I was in there"
   * Updated a few places to throw `IngestManagerError` vs `Error` for `400` response vs `500`. Updated tests.
   * removed a few unnecessary `await`s of sync function

[1] https://github.com/elastic/kibana/issues/92426#issuecomment-785092670
[2] https://github.com/elastic/kibana/issues/90445

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

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-12 14:05:39 -04:00
Rudolf Meijering f544d8d458
Migrations v2 ignore fleet agent events (#96690)
* migrationsv2: ignore fleet agent events and tsvb telemetry

* migrationsv1: ignore tsvb-validation-telemetry

* Skip fleet test that depends on fleet-agent-events

* Fix typescript errors

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-12 18:19:42 +02:00
John Schulz d338f1c3de
Allow integrations of hosted policies to be updated (#96705)
## Summary

Remove the restriction against updating integrations on hosted policies.

I described the current behavior and asked if it should change in [1]. Based on the responses in [2] & [3] and looking back at prior discussion around hosted policies, I don't think updates should be restricted.

Adding or removing integrations is still blocked for hosted policies. Updated API tests to confirm behavior. 


[1] https://github.com/elastic/kibana/issues/76843#issuecomment-816096760
[2] https://github.com/elastic/kibana/issues/76843#issuecomment-816153871
[3] https://github.com/elastic/kibana/issues/76843#issuecomment-816538672

## Screenshots
<details><summary>Current behavior</summary>

<h3>Error about updating integrations of a managed policy</h3>

<img width="1208" alt="Screen Shot 2021-04-08 at 3 23 37 PM" src="https://user-images.githubusercontent.com/57655/114084750-87686880-987e-11eb-91a9-081c45dbe871.png">

<details><summary>via flow A</summary>
<img width="1223" alt="Screen Shot 2021-04-08 at 3 01 32 PM" src="https://user-images.githubusercontent.com/57655/114082826-3a839280-987c-11eb-94d0-151ae93ab523.png">

<img width="1205" alt="Screen Shot 2021-04-08 at 3 13 24 PM" src="https://user-images.githubusercontent.com/57655/114083728-5c314980-987d-11eb-92be-195d7d44c037.png">
</details>

<details><summary>via flow B</summary>
<img width="1221" alt="Screen Shot 2021-04-08 at 3 19 52 PM" src="https://user-images.githubusercontent.com/57655/114084502-3fe1dc80-987e-11eb-8879-57718586ac95.png">
<img width="1198" alt="Screen Shot 2021-04-08 at 3 20 06 PM" src="https://user-images.githubusercontent.com/57655/114084503-3fe1dc80-987e-11eb-9fa9-512210b938cd.png">
</details>

</details>

<details><summary>This PR</summary>
<h3>Successful updates using either form</h3>
<img width="1301" alt="Screen Shot 2021-04-09 at 1 21 02 PM" src="https://user-images.githubusercontent.com/57655/114219370-8f84de80-9938-11eb-9b94-dfbeb18535b2.png">
<img width="1320" alt="Screen Shot 2021-04-09 at 1 05 10 PM" src="https://user-images.githubusercontent.com/57655/114219408-9f9cbe00-9938-11eb-96d2-2918332d1539.png">

</details>


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

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-12 11:01:38 -04:00
Alexey Antonov 98f40a216a
[TSVB] Visualize runtime fields (#95772)
* [TSVB] Visualize runtime fields

* fix CI

* Update visualization_error.tsx

* Update build_request_body.ts

* fix group by for table view

* fix issue on switching the index pattern mode

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-12 09:56:28 -04:00
Nicolas Chaulet 1de77ccb4e
[Fleet] Create enrollment API keys as current user (#96464) 2021-04-12 08:27:54 -04:00
Dario Gieselaar dfaf3ac8f5
[RAC] Rule registry plugin (#95903)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-09 10:35:44 +02:00
ymao1 71ed148cfe
[Alerting] Preconfigured alert history index connector (#94909)
* Adding preconfigured alert history index

* Adding functions to build alert history document

* Adding functions to build alert history document

* Moving index template creation to plugin start

* Adding unit tests

* Adding unit tests

* Adding unit tests

* Simplifying

* Revert "Merge branch 'master' of https://github.com/elastic/kibana into alerting/default-es-index-schema"

This reverts commit 957c333aa4, reversing
changes made to 4b1b78761e.

* Reverting some changes

* Reverting some changes

* Adding index override

* Updating UI with index override

* Only allow indexOverride for preconfigured alert history connector

* Handling preconfigured connector id clashes

* Cleanup

* UI unit tests

* Fixing default schema shown in UI

* Fixing functional tests

* Adding functional test

* Fixing functional tests

* Adding docs and link to docs

* Adding config to docker allowlist

* Fixing wrong typescript operator

* Changing default for config to false

* Cleanup

* Adding note about index privileges to docs

* Fixing i18n

* PR fixes

* PR fixes

* PR fixes

* PR fixes - wording

* PR fixes

* Fixing unit and functional tests

* Fixing types check

* ES -> Elasticsearch

* Moving files

* Adding kibana- to beginning of prefix

* Namespacing alert data within schema with kibana

* Fix i18n

* Updating docs

* Fixing unit tests

* Fixing doc links

* Fixing types check

* PR fixes

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-08 18:18:44 -04:00
dmlemeshko aab675b1ba
[loa testing] wait 60 sec b/w simulations (#96612)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-08 23:07:08 +02:00
Jonathan Budzenski 869fd9355a skip a11y spaces tests. #77933, #96625 2021-04-08 13:36:45 -05:00
Jonathan Budzenski 91e1acd98d skip flaky test blocking snapshot promotion. #96515 2021-04-08 13:23:05 -05:00
Jonathan Budzenski 128ed7f676 skip flaky a11y test 2021-04-08 12:39:15 -05:00
Quynh Nguyen 2582522c66
[ML] Stabilize Anomaly Explorer embeddable functional tests (#96421)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-08 11:08:45 -05:00
Jonathan Budzenski 879af7f14b skip flaky test. #77933 2021-04-08 11:05:13 -05:00
spalger afc1fd022e skip entire fleet_api_integration suite to unblock es promotion (#96515) 2021-04-08 08:14:01 -07:00
Dario Gieselaar bfc940c146
[APM] Extract server type utils to package (#96349) 2021-04-08 13:26:43 +02:00
spalger f9317281d1 skip suite blocking es promotion (#96515) 2021-04-08 02:09:29 -07:00
Ross Wolf 93965343e5
[Fleet] Install security_rule assets as saved objects (#95885)
* [Fleet] Install security_rule assets as saved objects

* Add security-rule to update_assets.ts

* Update UUIDs for security_rule asset

* Change .type to match the saved object type not the asset type

* Add saved object mapping for security-rule

* Make SO non-hidden

* Fix SO mapping for security-rule

* Make security-rule a non-hidden asset
2021-04-08 00:52:10 -04:00
spalger 0cf31ae22f skip suite block es promotion (#96515)
(cherry picked from commit f06be93a40)
2021-04-07 18:59:01 -07:00
spalger fc9f97e03b skip suites failing es promotion (#96515)
(cherry picked from commit 7fdf7e1d79)
2021-04-07 16:10:19 -07:00
Patrick Mueller ad06d16beb
[actions] adds proxyBypassHosts and proxyOnlyHosts Kibana config keys (#95365)
resolves https://github.com/elastic/kibana/issues/92949

This PR adds two new Kibana config keys to further customize when the proxy
is used when making HTTP requests.  Prior to this PR, if a proxy was set
via the `xpack.actions.proxyUrl` config key, all requests would be
proxied.

Now, there's a further refinement in that hostnames can be added
to the `xpack.actions.proxyBypassHosts` and `xpack.actions.proxyOnlyHosts`
config keys.  Only one of these config keys can be used at a time.

If the target URL hostname of the HTTP request is listed in the
`proxyBypassHosts` list, the proxy won't be used.

If the target URL hostname of the HTTP request is **NOT** listed in the
`proxyOnlyHosts` list, the proxy won't be used.

Depending on the customer's environment, it may be easier to list the hosts to
bypass, or easier to list the hosts that should only be proxied, so they can
choose either method.
2021-04-07 15:20:47 -04:00
Thomas Neirynck 324c6c05a4
[Maps] Support query-time runtime fields (#95701) 2021-04-07 15:00:55 -04:00
spalger 752308f6d8 skip flaky suite (#96372) 2021-04-07 09:16:50 -07:00
Jean-Louis Leysens 4d43a4f31d
[Rollup] Migrate to new ES client (#95926)
* initial pass at es client migration

* fixed potential for not passing in an error message and triggering an unhandled exception

* reworked ad hoc fixing of error response

* delete legacy client file and remove use of legacyEs service

* remove unused import

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-07 14:49:44 +02:00
Shahzad 6f7a7e4755
[Uptime] Migrate uptime query bar to global kuery bar (#93889) 2021-04-07 11:46:16 +02:00
Melissa Alvarez 40cbb1fe79
[ML] Data Frame Analytics: adds functional tests for runtime fields support (#96262)
* add basic runtime mapping functional tests to analyics

* confirm runtime mapping added correctly.
2021-04-06 12:06:36 -04:00
Walter Rafelsberger d9a475258b
[ML] Data Frame Analytics: Fix color assertion with risk of percentage being rounded to 0. (#95797)
- Fix color assertion with risk of percentage being rounded to 0.
- Better naming of attributes of expected values.
- Adds assertions to use the sample size dropdown and randomize query switch.
2021-04-06 15:21:23 +02:00
Pierre Gayvallet 251bd9afc6
Remove /src/legacy (#95510)
* starting removing stuff

* fix jest config

* disable CLI mode until other PR is merged

* fix the schema

* add deprecation for maxPayloadBytes

* fix legacy start logic

* deletes `env` from unknown args

* fix FTR test config

* some legacy service deletion

* move config validation

* remove legacy exports from entrypoint

* preserve legacy logging in core logging config

* try to fix uiSettings integration tests

* fix legacy service tests

* more type fix

* use fromRoot from @kbn/utils

* cleanup kibana.d.ts

* fix unit tests

* remove src/core/server/utils

* fix server script

* add integration test for `/{path*}` route

* add unit tests on legacy config

* adapt uiSetting IT bis

* fix tests

* update generated doc

* address some review comments

* move review comments

* fix some stuff

* fix some stuff

* fix some stuff

* fix some stuff bis

* generated doc

* add test for ensureValidConfiguration
2021-04-06 09:25:36 +02:00
Rashmi Kulkarni 7da1b82b7e
fixes a skipped management x-pack test (#96178)
* fixes a skipped management x-pack test

* modified the test to incoroporate the review comments

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-05 15:24:22 -07:00
Cauê Marcondes 9cebff1298
[OBS]home page is showing incorrect value of APM throughput (tpm) (#95991)
* fixing obs transaction per minute value

* addressing PR comments

* fixing unit test

* addressing PR comments

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-05 10:51:56 -04:00
Anton Dosov 8c8323abfd
[Search Sessions] fix updating deleting sessions from non-default space (#96123)
* add spaces test

* fix updating and deleting sessions in non-default space

* revert back to batch update

* Add space tests

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Liza K <liza.katz@elastic.co>
2021-04-05 15:01:24 +03:00
Alison Goryachev 91b7770b3a
[Rollups] Update API integration test (#96071) 2021-04-01 15:36:05 -04:00
Bhavya RM 39d1e62c7d
Test Export and Import saved objects between versions (#91908) 2021-04-01 15:22:14 -04:00
Joe Portner 574391985b
Fix and unskip functional test (#96004) 2021-04-01 14:06:17 -04:00
Oliver Gupte 2abd628f26
[APM] Correlations support for progressively loading sections (#95743)
* [APM] Correlations support for progressively loading sections (#95059)

* fixes type consistency

* - Adds progressive section loading for errors tab in correlations
- code improvements

* Tests for latency correlations and overall distribution APIs

* adds API test for error correlations endpoints

* renamed 'getOverallErrorDistribution' to 'getOverallErrorTimeseries'

* Code improvements

* fix whitespace
2021-04-01 10:54:05 -07:00
spalger 5a9cff2644 skip suite failing es promotion (#96000) 2021-03-31 18:23:46 -07:00
spalger 0cdf445718 skip suite failing es promotion (#96002) 2021-03-31 15:24:17 -07:00
spalger c66937d4c6 skip suite blocking es promotion (#96001) 2021-03-31 15:19:58 -07:00
spalger aa81dc52f6 skip flaky suite (#96000) 2021-03-31 15:13:06 -07:00
Tim Sullivan 0fce2427e5
[Reporting] CSV Export: fix and unskip failing test (#95824)
* [Reporting] CSV Export: fix and unskip failing test

* fix snapshot extra records

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-31 13:12:19 -07:00
spalger 2a3edb0adb skip flaky suite (#95591) 2021-03-31 13:06:04 -07:00
Kevin Qualters 03b104cc61
[Security Solution][RAC][Timeline] Timeline plugin skeleton and test plugin harness (#95683)
* [RAC][Security Solution] Initial timeline and test plugin harness

* Change plugin name from timeline to timelines
2021-03-31 15:33:19 -04:00
Devon Thomson fe17879ae3
[Time to Visualize] Allow By Value Flow Without Visualize Save Permissions (#95951)
* Made sure users can use by value workflow without visualize save permissions
2021-03-31 15:30:50 -04:00
Zacqary Adam Xeper f7caf44876
[Fleet] Match telemetry key names to UI agent states (#95567) 2021-03-31 15:10:46 -04:00
Ece Özalp 178c2de5fd
[Security Solution] Populates threat.indicator.event with _source.event (#951) (#95697)
* [Security Solution] Add event data to threat.indicator (elastic/security_team/#951)

* fixes mappings, updates tests

* refactor mappings
2021-03-31 11:37:24 -04:00
spalger 73109fb3ab Revert "[Time to Visualize] Allow By Value Flow Without Visualize Save Permissions (#93846)"
This reverts commit cfe5f9c016.
2021-03-31 07:25:57 -07:00
Joe Reuter 50d21dad8c
[Lens] Fix runtime field test flakiness (#95650) 2021-03-31 15:59:41 +02:00
Devon Thomson cfe5f9c016
[Time to Visualize] Allow By Value Flow Without Visualize Save Permissions (#93846)
* Made sure users can use by value workflow without visualize save permissions
2021-03-31 09:44:56 -04:00
Marco Liberati 004a9a14c8
[Lens] Unskip a11y test in Lens (#95904) 2021-03-31 15:31:29 +02:00
ymao1 7ef8be6031
Fixes Failing test: Chrome X-Pack UI Functional Tests.x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alerts_list·ts - Actions and Triggers app alerts list should unmute single alert (#95808)
* Unskipping test

* Adding retries

* Adding retries

* Adding retries
2021-03-31 07:43:48 -04:00
Jean-Louis Leysens 44a46358c2
[Snapshot Restore] Migrate to new ES client (#95499)
* wip, migrated routes and plugins

* refactored all ES error handling to use handleEsError and new isEsError detection

* - fixed Jest tests for new es client
- updated routes in light of new responses

* remove unused import

* remove unecessary isEsError check in rest api route handlers

* mute all incorrect types from client lib using @ts-expect-error

* reordered and clean up imports, removed legacy client code

* update legacy test runner

* updated use of legacyES

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-31 11:55:41 +02:00
Pierre Gayvallet ddac0e9501
add per space configuration to custom header banner (#94449)
* restore the banners ui settings

* fix banner init logic

* fix unit tests

* update telemetry schema

* add basic server-side plugin tests

* add FTR tests for banners plugin

* use keyword for sensitive setting

* update snapshots

* setting name consistency with configuration properties

* fix setting names in telemetry files

* open banner links in new tab

* add config.disableSpaceBanners property

* fix types

* add descriptions to banner settings

* change label and value header->top

* finishing header->top replacement

* doc nits

* add banners section to advanced options doc

* feedback on advanced options doc

* adapt deprecation to new format
2021-03-31 10:57:06 +02:00
Tiago Costa 50313f75f6
chore(NA): enable preserve symlinks for ts without breaking packages development (#95433)
* chore(NA): move elastic-datemath into a ts package

* chore(NA): finish elastic-datemath

* chore(NA): finish elastic-datemath

* chore(NA): source folder for elastic-datemath

* chore(NA): add source-maps ace, analytics, apm-config-loader and apm-utils packages

* chore(NA): add sourcemaps to packages on typescript

* chore(NA): move test fixtures within source

* chore(NA): correct exclusions on packages

* chore(NA): correct package.json on all packages

* chore(NA): correct package.json on all packages

* chore(NA): complete kbn pm

* chore(NA): default export on elastic-datemath

* chore(NA): include logs on kbn-logging

* chore(NA): update bundle ref module to last code used in the webpack upstream

* chore(NA): update bundle ref module to last code used in the webpack upstream - refactored

* chore(NA): remove override method for exportsArgument

* fix(NA): typechecking problems by use @internal at javascript import sources on kbn-test package

* fix(NA): typescript projects check

* fix(NA): run optimizer integration tests from source

* chore(NA): fix usage from target for kbn optimizer

* chore(NA): path on tsconfig

* chore(NA): move tsignore into ts-expect-error

* chore(NA): include souce maps on kbn cli dev

* chore(NA): include souce maps on kbn-crypto, kbn-server-http-tools and kbn-telemetry-tools

* chore(NA): add issue links into the ts-expect-error comments
2021-03-31 00:02:22 +01:00
Nathan Reese 81b46931f8
[file_upload] add has_import_permission route (#95190)
* [file_upload] add has_import_permission route

* remove ml hasImportPermissions

* fix tsconfig path

* tslint

* review feedback

* make pipeline check optional since geojson upload does not use pipeline

* ts cleanup

* make geojson permission failure message actionable

* revert privilege change in functional test

* add global_index_pattern_management_all permission to functional test

* rename hasPipeline to checkHasManagePipeline

* add api integration test

* tslint

* revert change to es_search_source

* simpilify error message when users can't create index pattern

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-30 07:48:07 -06:00
Tiago Costa 01bf004193
skip flaky suite (#95707) 2021-03-30 14:01:07 +01:00
Mike Côté 3abb79a179
Create new alerting HTTP APIs that use the new terminology (#93977)
* Move current alert HTTP APIs to legacy folder (#93943)

* Move current HTTP APIs to legacy folder

* Rename BASE_ALERT_API_PATH to LEGACY_BASE_ALERT_API_PATH

* Fix failing tests and extra files

* Create new rule HTTP APIs (#93980)

* Move current HTTP APIs to legacy folder

* Rename BASE_ALERT_API_PATH to LEGACY_BASE_ALERT_API_PATH

* Fix failing tests and extra files

* Move current alert HTTP APIs to legacy folder (#93943)

* Move current HTTP APIs to legacy folder

* Rename BASE_ALERT_API_PATH to LEGACY_BASE_ALERT_API_PATH

* Fix failing tests and extra files

* Add necessary files

* Create rule route

* Get rule API

* Update rule API

* Delete rule route

* Aggregate rules API

* Disable rule API

* Enable rule API

* Find rules API

* Fix Update API

* Get rule alert summary API

* Get rule state API

* Health API

* Rule types API

* Mute all API

* Mute alert API

* Unmute all API

* Unmute alert route

* Update API key API

* corrected tpye by making it much more complicated

* removed unneeded cocde

* Fixes

* Add back health route

* mutedInstanceIds -> mutedAlertIds

* lastRun -> last_run

* alert_type_state -> rule_type_state & alert_instances -> alerts

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

* Create docs for new rule HTTP APIs, deprecate old docs (#94745)

* Create docs for new APIs, deprecate old docs

* Remove connector_type_id

* Update docs

* Add link to legacy APIs from rules API docs

* Remove connector_type_id references

* [DOCS] Add legacy APIs to index.asciidoc

* Fix camel case

Co-authored-by: lcawl <lcawley@elastic.co>

* Make alerting tests use new rules APIs (#95159)

* Make API integration tests use new HTTP APIs

* Fix end to end tests

* Fix test failures

* Fix more test failures

* Rename some files

* Add tests for legacy APIs (#95333)

* Initial commit (#95457)

* Move some new alerting APIs to /internal (#95461)

* Initial commit

* Update README.md

* Use internal API

* Merge deprecated warning w/ alternative solution

* Update API docs

Co-authored-by: Gidi Meir Morris <github@gidi.io>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: lcawl <lcawley@elastic.co>
2021-03-30 08:27:28 -04:00
Mikhail Shustov 5b6927863a
Better error serialization for error provided to HTTP response factory (#95671)
* pass error reason for ES responses provided in HTTP response body

* add a test

* ML: update functional tests when index does not exist

* transform: fix integration test for error message
2021-03-30 12:46:17 +02:00
Angela Chuang 643760dfec
[SecuritySolution] Unskip uncommon_processes·ts (#95343)
* wrap with retry

* wrap with retry

* wrap tests with retry

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-30 11:20:52 +01:00
Robert Oskamp 3e4af77d5a
[ML] Functional tests - stabilize anomaly explorer tests for slow network (#95628)
This PR stabilizes the ML anomaly explorer functional tests for slow network environments.
2021-03-30 10:51:00 +02:00
Zacqary Adam Xeper 28410539b5
[Fleet] Configure Fleet packages and integrations through endpoint (#94509) 2021-03-29 21:41:27 -04:00
Søren Louv-Jansen 0defebd649
[APM] Improve api tests (#95636)
* [APM] Improve api tests

* Fix typo
2021-03-30 00:12:46 +02:00
Chandler Prall f667aa2d29
Upgrade EUI to v31.10.0 (#93796)
* Upgraded eui version, updated jest snaapshots

* Upgrade EUI to v31.10.0 & update tests

* increase expected histogram brush size result

* revert dev_server snap

* update baseline dashboard reporting png

* avoid multiple acton menu openings when verified that the action exists and is enabled

* update dashboard table expand button

* update dashboard tsvb baseline

* Adjust 2 cypress tests

* snapshot update

Co-authored-by: Greg Thompson <thompson.glowe@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-29 11:20:30 -06:00
Anton Dosov 92af812c82
[Search Sessions] Display time labels in search session popover (#95082) 2021-03-29 17:45:08 +02:00
James Gowdy 478ad3bad5
[Fleet] Adding ML module asset type (#94950)
* [Fleet] Adding ML module asset type

* adding test

* guessing asset ids

* better guess at IDs

* renaming asset ids

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-29 16:21:49 +01:00
Uladzislau Lasitsa 0e40b94348
[TSVB] Change the default mode from last value to entire timerange (#93608)
* Make 'enter time range' value as default and add telemetry for 'last value' mode

* Fix telemetry schema

* Fix test

* Add possibility count timeseries created from dashboard

* Fix remark

* Fix remark

* Fix problem with time_range_mode

* Fix tests

* Fix tests

* Fix tests for markdown and table

* exclude TSVB which have type as timeseries

* Add description for field in schema in telemetry

* Fix telemetry schema

* Fix some remarks

* Added check for hits

* fix CI

* fix CI

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Alexey Antonov <alexwizp@gmail.com>
2021-03-29 17:31:01 +03:00
Georgii Gorbachev d16101f377
[Event Log] Extend ECS event schema with fields needed for Detection Engine (#95067)
**Related to:** https://github.com/elastic/kibana/pull/94143

## Summary

This PR adds new fields to the schema (`EventSchema`, `IEvent`):

- standard ECS fields: `error.*`, `event.*`, `log.level`, `log.logger`, `rule.*`
- custom field set `kibana.detection_engine`

We need these fields on the Detections side to implement detection rule execution log. See the related proposal (https://github.com/elastic/kibana/pull/94143) for more details.

Also, this PR bumps ECS used in Event Log from `1.6.0` to the current `1.8.0` version. They are 100% same in terms of fields used in Event Log, so no changes in the schema were caused by this version increment.
2021-03-29 14:59:36 +02:00
Tiago Costa cf8ebe619b
skip flaky suite (#92358) 2021-03-29 13:11:33 +01:00
Marta Bondyra 755c186c28
[Lens] Multiple drop targets (#93616) 2021-03-29 14:07:39 +02:00
Tiago Costa a10e3d4f2b
skip flaky suite (#91450) 2021-03-29 13:05:33 +01:00
Alexey Antonov 4342f26eaf
[TSVB] Enable dual mode, support index patterns and strings (#92812)
* [TSVB] Enable `dual mode`, support index patterns and strings

* modify UI

* add migration script

* refactoring

* fix CI

* prefill the index pattern name

* modify UI

* modify UI

* update UI

* fix functional test

* some work

* remove callouts

* fix rollup test

* update UI

* fix typo

* add some unit tests

* add functional test

* fix CI

* correct labels

* fix ci group 12

* cleanup interface

* fix CI

* cleanup API

* fix some of PR comments

* move index patterns into so references

* remove wrong logic

* fix JEST

* fix some ui issues

* update sample data

* indexPatternObject -> indexPatternValue

* fix comments

* I have a dashboard with two TSVB viz. One with the default (haven't applied it to the combobox) and one with the logs. The filter contains fields only from the logs index pattern

* When I am on the string mode and try to write my index, sometimes some of the chars are not added or they are deleted while typing, something with the denounce maybe?

* fix merge conflicts

* Does this PR also supports runtime fields? I created one from the editor and I see that I can select it

* fix UI issue

* If I create a viz with the string mode and a wildcard e.g. kibana_sample*, the index patterns are not communicated correctly to the dashboard.

* fix import/export refs for dashboard

* remove MigrationPopover

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-29 04:32:01 -04:00
Søren Louv-Jansen 84adfe551b
[APM] Add elasticsearch queries to api response (#95146) 2021-03-29 07:50:27 +02:00
liza-mae b7d8ada65a
Fix reporting test (#95586) 2021-03-26 16:33:29 -06:00
Brian Seeders b95e5a996a skip failing suite blocking ES promotion (#95594) 2021-03-26 17:46:20 -04:00
Brian Seeders 1362561a03 skip flaky suite (#95592) 2021-03-26 17:40:01 -04:00
John Schulz 7f15931725
[Fleet] /bulk_unenroll response matches other bulk action APIs (#95571)
## Summary
`/agents/bulk_unenroll` should return a response with a result for each agent given; including invalid or missing ids. It currently returns an empty object. https://github.com/elastic/kibana/issues/90437


[TS type diff for response](dd34e4c5ef/x-pack/plugins/fleet/common/types/rest_spec/agent.ts (L124-L130))

```diff
- // eslint-disable-next-line @typescript-eslint/no-empty-interface
- export interface PostBulkAgentUnenrollResponse {}
+ export type PostBulkAgentUnenrollResponse = Record<
+   Agent['id'],
+   {
+     success: boolean;
+     error?: string;
+   }
+ >;
```

### 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-03-26 17:36:39 -04:00
Brian Seeders 173731b342 skip flaky suite (#95590) 2021-03-26 17:23:12 -04:00
Candace Park 4ff9bfd113
[Security Solution][Endpoint][Admin] Match endpoint list host status with fleet agent status (#95243) 2021-03-26 16:17:12 -04:00
Aaron Caldwell d89ede9834
[Maps] Add drawing index data endpoint (#94728) 2021-03-26 14:29:16 -04:00
Quynh Nguyen 95e308a473
[ML] Add Anomaly Explorer charts embeddable (#94396) 2021-03-26 13:10:19 -05:00
Aleh Zasypkin 796f679e92
Migrate away from legacyEs service in tests. (#95402) 2021-03-26 18:49:19 +01:00
Anton Dosov ce6641bac1
[Search Sessions] Rename search sessions functional tests. Remove wip mention (#95330) 2021-03-26 18:08:46 +01:00
John Schulz ab33df898a
[Fleet] Bulk upgrade api response change (#95236)
## Summary
`/agents/bulk_upgrade` should return a response with a result for each agent given; including invalid or missing ids. It currently returns an empty object.

This PR includes commits from open PR https://github.com/elastic/kibana/pull/95024. The additions from this PR are https://github.com/jfsiii/kibana/compare/bulk-reassign-response-should-include-all-given-agents..871ebcb

[TS type diff for response](https://github.com/jfsiii/kibana/compare/bulk-reassign-response-should-include-all-given-agents..871ebcb#diff-7006a6c170a608c8c7211fc218c0a6f4bc8ff642c170ea264db4b1b5545fb728)

```diff
- // eslint-disable-next-line @typescript-eslint/no-empty-interface
- export interface PostBulkAgentUpgradeResponse {}

+ export type PostBulkAgentUpgradeResponse = Record<
+   Agent['id'],
+   {
+     success: boolean;
+     error?: string;
+   }
+ >;
```

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

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-26 11:40:38 -05:00
Dima Arnautov 924724cf0b
[ML] Replace legacy es client in Transform API service for functional tests 2021-03-26 12:09:11 -04:00
renovate[bot] 33e213cb2b
Update dependency @elastic/charts to v26 (master) (#95184)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Marco Vettorello <vettorello.marco@gmail.com>
2021-03-26 16:30:10 +01:00
Shahzad b1525f0af7
[Lens] Allow modifying curve type for line/area series charts (#94675) 2021-03-26 16:23:41 +01:00
Larry Gregory dbd4b2bac8
Unskip flaky spaces tests (#95207)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-26 15:08:56 +01:00
Matthew Kime ae4dae46d9
Index pattern field editor - Add warning and type 'confirm' on delete or save (#95237)
* add runtime field change/delete confirm dialog
2021-03-26 09:03:13 -05:00
Cauê Marcondes 33b81b115c
[APM] Split All instances API adding a new API to return comparison statistics (#94767)
* adding comparison to instances table

* fixing tests

* adding api tests

* removing unnecessary files

* fixing ts issue

* fixing ts issue

* refactoring

* refactoring

* refactoring

* refactoring

* refactoring

* addressing PR comments

* addressing PR comments
2021-03-26 09:14:03 -04:00
Jonathan Buttner f4526ad88c
[Cases] Fix _find API total bug (#95235)
* Cherry-picking 7.12 find total fix

* Starting fix for total bug in master with new field

* Adding feature flag for sub cases

* Disabling case as a connector in security solution

* Adding additional tests for pagination

* Removing other api integration tests

* Fixing up problems from merge

* Fixing sub case tests and type errors

* Renaming comment tag for case connector
2021-03-26 08:46:07 -04:00
Marco Liberati 243a7f9b2b
[Lens] Rename operations to map exposed names for Formula (#94710)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-26 11:54:42 +01:00
Lukas Olson a10c4188b7
Re-enable skipped test (discover with async scripted fields) (#94653)
* Re-enable skipped test

* remove comment

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-25 12:24:36 -07:00
Ece Özalp d70d02ee83
Add a11y test coverage to Rule Creation Flow for Detections tab (#94377)
[Security Solution] Add a11y test coverage to Detections rule creation flow (#80060)
2021-03-25 15:05:23 -04:00
Nathan Reese c5e3e78de8
[Maps] do not track total hits for elasticsearch search requests (#91754)
* [Maps] do not track total hits for elasticsearch search requests

* set track_total_hits for es_search_source tooltip fetch

* tslint

* searchSource doc updates, set track_total_hits in MVT requests

* revert changes made to searchsourcefields docs

* tslint

* review feedback

* tslint

* remove Hits (Total) from functional tests

* remove sleep in functional test

* tslint

* fix method name

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-25 13:00:16 -06:00
Kerry Gallagher 6b6404954e
[Logs / Metrics UI] Separate logs / metrics source configuration awareness (#95334)
* Remove metrics awareness of logs fields
2021-03-25 18:59:18 +00:00
MadameSheema 6a571486fc
[Security Solution][Detections] Improves indicator match Cypress tests (#94913)
* updates the data used in the test

* adds matches test

* adds enrichment test

* improves speed and adds missing files

* fixes type check issue

* adds 'data-test-subj' for the json view tab

* refactor

* fixes typecheck issue

* updates tests with latest master changes

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-25 19:25:49 +01:00
Jonathan Budzenski 02fce98254 skip flaky test. #89389 2021-03-25 12:51:05 -05:00
Jonathan Buttner 07f32d03b3
[Cases] Adding feature flag for sub cases (#95122)
* Adding feature flag for sub cases

* Disabling case as a connector in security solution

* Fix connector test

* Switching feature flag to global variable

* Removing this.config use

* Fixing circular import and renaming flag
2021-03-25 13:36:25 -04:00
Nathan Reese 373a108cfe
[Maps] upgrade server to use new elasticsearch-js client (#95314)
* [Maps] upgrade server to use new elasticsearch-js client

* update functional test expect
2021-03-25 10:06:56 -06:00
igoristic 80e53d5fe6
[Monitoring] Remove license check for alerting (#94874)
* Removed license check for alerting

* Fixed tests and CR feedback

* Fixed test
2021-03-25 09:02:51 -04:00
Tomas Della Vedova 238791b942
ES client : use the new type definitions (#83808)
* Use client from branch

* Get type checking working in core

* Fix types in other plugins

* Update client types + remove type errors from core

* migrate Task Manager Elasticsearch typing from legacy library to client library

* use SortOrder instead o string in alerts

* Update client types + fix core type issues

* fix maps ts errors

* Update Lens types

* Convert Search Profiler body from a string to an object to conform to SearchRequest type.

* Fix SOT types

* Fix/mute Security/Spaces plugins type errors.

* Fix bootstrap types

* Fix painless_lab

* corrected es typing in Event Log

* Use new types from client for inferred search responses

* Latest type defs

* Integrate latest type defs for APM/UX

* fix core errors

* fix telemetry errors

* fix canvas errors

* fix data_enhanced errors

* fix event_log errors

* mute lens errors

* fix or mute maps errors

* fix reporting errors

* fix security errors

* mute errors in task_manager

* fix errors in telemetry_collection_xpack

* fix errors in data plugins

* fix errors in alerts

* mute errors in index_management

* fix task_manager errors

* mute or fix lens errors

* fix upgrade_assistant errors

* fix or mute errors in index_lifecycle_management

* fix discover errors

* fix core tests

* ML changes

* fix core type errors

* mute error in kbn-es-archiver

* fix error in data plugin

* fix error in telemetry plugin

* fix error in discover

* fix discover errors

* fix errors in task_manager

* fix security errors

* fix wrong conflict resolution

* address errors with upstream code

* update deps to the last commit

* remove outdated comments

* fix core errors

* fix errors after update

* adding more expect errors to ML

* pull the lastest changes

* fix core errors

* fix errors in infra plugin

* fix errors in uptime plugin

* fix errors in ml

* fix errors in xpack telemetry

* fix or mute errors in transform

* fix errors in upgrade assistant

* fix or mute fleet errors

* start fixing apm errors

* fix errors in osquery

* fix telemetry tests

* core cleanup

* fix asMutableArray imports

* cleanup

* data_enhanced cleanup

* cleanup events_log

* cleaup

* fix error in kbn-es-archiver

* fix errors in kbn-es-archiver

* fix errors in kbn-es-archiver

* fix ES typings for Hit

* fix SO

* fix actions plugin

* fix fleet

* fix maps

* fix stack_alerts

* fix eslint problems

* fix event_log unit tests

* fix failures in data_enhanced tests

* fix test failure in kbn-es-archiver

* fix test failures in index_pattern_management

* fixing ML test

* remove outdated comment in kbn-es-archiver

* fix error type in ml

* fix eslint errors in osquery plugin

* fix runtime error in infra plugin

* revert changes to event_log cluser exist check

* fix eslint error in osquery

* fixing ML endpoint argument types

* fx types

* Update api-extractor docs

* attempt fix for ese test

* Fix lint error

* Fix types for ts refs

* Fix data_enhanced unit test

* fix lens types

* generate docs

* Fix a number of type issues in monitoring and ml

* fix triggers_actions_ui

* Fix ILM functional test

* Put search.d.ts typings back

* fix data plugin

* Update typings in typings/elasticsearch

* Update snapshots

* mute errors in task_manager

* mute fleet errors

* lens. remove unnecessary ts-expect-errors

* fix errors in stack_alerts

* mute errors in osquery

* fix errors in security_solution

* fix errors in lists

* fix errors in cases

* mute errors in search_examples

* use KibanaClient to enforce promise-based API

* fix errors in test/ folder

* update comment

* fix errors in x-pack/test folder

* fix errors in ml plugin

* fix optional fields in ml api_integartoon tests

* fix another casting problem in ml tests

* fix another ml test failure

* fix fleet problem after conflict resolution

* rollback changes in security_solution. trying to fix test

* Update type for discover rows

* uncomment runtime_mappings as its outdated

* address comments from Wylie

* remove eslint error due to any

* mute error due to incompatibility

* Apply suggestions from code review

Co-authored-by: John Schulz <github.com@jfsiii.org>

* fix type error in lens tests

* Update x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.ts

Co-authored-by: Alison Goryachev <alisonmllr20@gmail.com>

* Update x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.test.ts

Co-authored-by: Alison Goryachev <alisonmllr20@gmail.com>

* update deps

* fix errors in core types

* fix errors for the new elastic/elasticsearch version

* remove unused type

* remove unnecessary manual type cast and put optional chaining back

* ML: mute Datafeed is missing indices_options

* Apply suggestions from code review

Co-authored-by: Josh Dover <1813008+joshdover@users.noreply.github.com>

* use canary pacakge instead of git commit

Co-authored-by: Josh Dover <me@joshdover.com>
Co-authored-by: Josh Dover <1813008+joshdover@users.noreply.github.com>
Co-authored-by: Gidi Meir Morris <github@gidi.io>
Co-authored-by: Nathan Reese <reese.nathan@gmail.com>
Co-authored-by: Wylie Conlon <wylieconlon@gmail.com>
Co-authored-by: CJ Cenizal <cj@cenizal.com>
Co-authored-by: Aleh Zasypkin <aleh.zasypkin@gmail.com>
Co-authored-by: Dario Gieselaar <dario.gieselaar@elastic.co>
Co-authored-by: restrry <restrry@gmail.com>
Co-authored-by: James Gowdy <jgowdy@elastic.co>
Co-authored-by: John Schulz <github.com@jfsiii.org>
Co-authored-by: Alison Goryachev <alisonmllr20@gmail.com>
2021-03-25 04:47:16 -04:00
Shahzad b88f02ffb4
[Uptime] unskip overview test (#95290) 2021-03-25 09:05:26 +01:00
Matthias Wilhelm 2da269fe93
[Discover][EuiDataGrid] Fix generating reports (#93748) 2021-03-24 20:09:11 +01:00
Sonja Krause-Harder 2e5b5debb5
[Fleet] Add force option to DELETE package endpoint. (#95051)
* Add force option to DELETE package endpoint.

* Add integration test.

* Adjust openapi spec.

* Run EPM tests before fleet setup tests.

* Run package delete tests first in EPM tests
2021-03-24 17:04:49 +01:00
Nathan L Smith de3a7d6f0d
Use es instead of legacyEs in APM API integration test (#95303)
References #83910.
2021-03-24 10:45:51 -05:00
John Schulz 3639aa4422
[Fleet] Bulk reassign response should include all given ids (#95024)
## Summary
`/agents/bulk_reassign` should return a response with a result for each agent given; including invalid or missing ids. It currently filters out missing or invalid before updating. This PR leaves them in and includes their error results in the response. 

[Added/updated tests](https://github.com/elastic/kibana/pull/95024/files#diff-7ec94bee3e2bae79e5d98b8c17c17b26fad14736143ffa144f3e035773d4cad1R113-R128) to confirm

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

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-24 11:44:22 -04:00
Anton Dosov 1527ab510b
[Search Sessions] Improve search session name edit test (#95152) 2021-03-24 16:01:52 +01:00
Dima Arnautov edaa64f150
[ML] Functional tests for Anomaly swim lane (#94723)
* [ML] update @elastic/charts

* [ML] swim lane service, axes tests

* [ML] check single cell selection and current URL

* [ML] clear selection

* [ML] assert anomaly explorer charts

* [ML] fix unit test

* [ML] assert anomalies table and top influencers list

* [ML] update apiDoc version

* [ML] exclude host from the URL assertion

* [ML] clicks view by swim lane

* [ML] fix method for cell selection

* [ML] brush action tests

* [ML] use debug state flag

* [ML] declare window interface

* [ML] pagination tests

* [ML] enable test

* [ML] scroll into view for swim lane actions

* [ML] rename URL assertion method

* [ML] fix assertion for charts count

* [ML] extend assertion

* [ML] refactor test subjects selection

* [ML] fix assertSelection

* [ML] reduce timeout for charts assertion
2021-03-24 10:38:58 -04:00
Tiago Costa 017a2b8413
skip flaky suite (#94535) 2021-03-24 13:46:38 +00:00
Joe Reuter c218ce292a
[Lens] Add ability to remove runtime field (#94949) 2021-03-24 11:47:56 +01:00
James Gowdy fdda564a84
[ML] Adding additional runtime mapping checks (#94760)
* [ML] Adding additional runtime mapping checks

* adding functional test for datafeed preview

* renaming findFieldsInAgg

* updating query check

* always use runtime mappings if present in agg field exists check

* changes based on review

* updating tests based on review

* fixing permission check on endpoint and test

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-24 10:29:46 +00:00
Aleh Zasypkin 3f3cc8ee35
Expose session invalidation API. (#92376) 2021-03-24 09:54:08 +01:00
Jen Huang d886979e3b
[Fleet] Remove upgradePackage and consolidate it with installPackage, optimize calls to create index patterns (#94490)
* Add data plugin to server app context

* First attempt at switching to indexPatternService for EPM index pattern creation & deletion, instead of interacting directly with index pattern SOs

* Simplify bulk install package, remove upgradePackage() method in favor of consolidating with installPackage(), use installPackage() for bulk install instead

* Update tests

* Change cache logging of objects to trace level

* Install index patterns as a post-package installation operation, for bulk package installation, install index pattern only if one or more packages are actually new installs, add debug logging

* Allow getAsSavedObjectBody to return non-scripted fields when allowNoIndex is true

* Allow `getFieldsForWildcard` to return fields saved on index pattern when allowNoIndices is true

* Bring back passing custom ID for index pattern SO

* Fix tests

* Revert "Merge branch 'index-pattern/allow-no-index' into epm/missing-index-patterns"

This reverts commit 8e712e9c00, reversing
changes made to af0fb0eaa8.

* Allow getAsSavedObjectBody to return non-scripted fields when allowNoIndex is true

(cherry picked from commit 69b93da180)

* Update API docs

* Run post-install ops for install by upload too

* Remove allowedInstallTypes param

* Adjust force install conditions

* Revert "Update API docs"

This reverts commit b9770fdc56.

* Revert "Allow getAsSavedObjectBody to return non-scripted fields when allowNoIndex is true"

This reverts commit afc91ce32f.

* Go back to using SO client for index patterns :(

* Stringify attributes again for SO client saving

* Fix condition for reinstall same pkg version

* Remove unused type

* Adjust comment

* Update snapshot

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-23 11:34:20 -07:00
Larry Gregory a158f9d771
Remove duplicative RBAC tests (#95162) 2021-03-23 12:00:21 -04:00
Nicolas Chaulet 76b55207f7
[Fleet] Fix agent status count (#95099) 2021-03-23 11:24:25 -04:00
John Schulz c0c5fba4b0
[Fleet] Support force flag in bulk upgrade agents API (#94952)
## Summary

0cbbb41da2 is just a rearrangement of the tests.  5cad301e87 has the real changes: 
* Bug fix: `force: true` should bypass any restrictions re: managed policies
* Refactoring towards new response shape coming as part of https://github.com/elastic/kibana/issues/90437
* Added test to confirm new behavior


### 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-03-23 11:22:03 -04:00
Larry Gregory 61db3f3cac
Only check required fields for the default space (#95147) 2021-03-23 10:45:59 -04:00
Paul Tavares 7ebffc3728
[FLEET][SECURITY_SOLUTION] Fix .fleet-artifacs index property names and add endpoint package policy migrations (#94977)
* migration of Endpoint Integration policies to adjust artifact relative urs
* Fix ``.fleet-artifacts` property name to be snake_cased
2021-03-22 15:26:37 -04:00
Walter Rafelsberger dd7ea1d4b2
[ML] Data Frame Analytics: Fix ROC Curve Chart for binary classification. (#94791)
- Updates the ROC Curve Chart to show only one line for binary classification.
- Improves type specs for the evaluate panel's data.
2021-03-20 18:41:25 +01:00
Tiago Costa 7e5dbdf5b9
skip flaky suite (#84440) 2021-03-19 23:21:31 +00:00
Walter Rafelsberger 778bb69cba
[ML] Functional Tests: Extend canvas assertion options. (#91473)
Updates the canvas element assertion service and stabilizes tests.
2021-03-19 21:06:59 +01:00
Devon Thomson 882248c671
[Time to Visualize] Add Discrete Library Option to Save Modal (#94589)
* save modal UI and Redirect and save to library

Co-authored-by: Poff Poffenberger <poffdeluxe@gmail.com>
2021-03-18 13:40:02 -04:00
Tyler Smalley 1060f8f05e
[test] Unskips delete component template test (#94856)
Test was skipped to allow for the promotion of the ES snapshot.

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2021-03-18 10:56:56 -04:00
Anton Dosov 8820e00bba
[Search Session] Make session name editable (#94610) 2021-03-18 14:41:38 +01:00
Joe Reuter 52a1ce1723
[Lens] Runtime field editor (#91882) 2021-03-18 08:21:39 +01:00
Aaron Caldwell ad18739de7
[Maps] Add endpoint to server for creating empty index & index pattern (#94028)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-17 21:40:51 -04:00
John Dorlus 6df27f322f
Re-Enabling Grok Debugger Functional UI Tests (#91274)
* Adding .only clause for testing purposes.

* Removing .only and reenabling test. Also changing back to group 13.

* Removing .only and reenabling test. Also changing back to group 13.

* Removed comment mentioning github issue.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-17 21:13:01 -04:00
spalger a4c41851e8 skip flaky suite (#93188) 2021-03-17 17:42:17 -07:00
spalger 3ec9a17e2e skip failing suite (#94854) 2021-03-17 14:16:12 -07:00
Spencer 37ff43b0c3
[theme] default to v8 theme (#94370)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-03-17 09:49:39 -07:00
Alison Goryachev 238610491b
[Component templates] Fix failing API test (#94831)
* fix failing component templates  test

* temporarily skip test
2021-03-17 09:21:02 -07:00
Alejandro Fernández Haro f62a3153cd
Define schema for monitoring-sourced telemetry (#94434)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-17 10:54:12 -04:00
Joe Portner fc45b2007c
Fix invalid integration test data (#94616) 2021-03-17 08:56:07 -04:00
Diana Derevyankina bdcd2ec859
Replace EuiCodeBlock with JsonCodeEditor in DiscoverGrid (#92442)
* Replace EuiCodeBlock with JsonCodeEditor in DiscoverGrid

* Add optional "hasLineNumbers" property to JsonCodeEditor and removed line numbers from the popover

* Update json_code_editor snapshot

* Add functional test for cell expanded content popover

* Remove unused code

* Fix geo point case and refactor some code

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-17 11:17:48 +03:00
Walter Rafelsberger 83c6bcc554
[ML] Anomaly Detection: Migrate validation messages links to use docLinks. (#94568)
- To make use of the docsLinks service which is only usable in client side code, Anomaly Detection's validation messages are not fully returned from the server anymore. Instead just the message ID and necessary metadata to parse the message template gets returned.
- getMessages() no longer uses inline hard coded documentation links but picks links from the docsLinks service.
- The code that rendered the messages originally on the server has been move to a function parseMessages() which can now be used on the client side and accepts the docsLinks services to get URLs to documentation from it.
- This means we no longer need to get the current version/branch information for the server side code.
- Tests have been updated to reflect the changes: API integration tests only check for the now reduced messages containing only message IDs and metadata. The expected results of the API integration tests are used as mocks for the client side function parseMessages(), this allows use to cover the same code and messages as previously.
2021-03-17 07:53:46 +01:00
John Schulz 044a94ac46
[Fleet] Add test/fix for invalid/missing ids in bulk agent reassign (#94632)
## Problem
While working on changes for bulk reassign https://github.com/elastic/kibana/issues/90437, I found that the server has a runtime error and returns a 500 if given an invalid or missing id.

<details><summary>server error stack trace</summary>

```
   │ proc [kibana] server    log   [12:21:48.953] [error][fleet][plugins] TypeError: Cannot read property 'policy_revision_idx' of undefined
   │ proc [kibana]     at map (/Users/jfsiii/work/kibana/x-pack/plugins/fleet/server/services/agents/helpers.ts:15:34)
   │ proc [kibana]     at Array.map (<anonymous>)
   │ proc [kibana]     at getAgents (/Users/jfsiii/work/kibana/x-pack/plugins/fleet/server/services/agents/crud.ts:191:32)
   │ proc [kibana]     at runMicrotasks (<anonymous>)
   │ proc [kibana]     at processTicksAndRejections (internal/process/task_queues.js:93:5)
   │ proc [kibana]     at Object.reassignAgents (/Users/jfsiii/work/kibana/x-pack/plugins/fleet/server/services/agents/reassign.ts:91:9)
   │ proc [kibana]     at postBulkAgentsReassignHandler (/Users/jfsiii/work/kibana/x-pack/plugins/fleet/server/routes/agent/handlers.ts:314:21)
   │ proc [kibana]     at Router.handle (/Users/jfsiii/work/kibana/src/core/server/http/router/router.ts:272:30)
   │ proc [kibana]     at handler (/Users/jfsiii/work/kibana/src/core/server/http/router/router.ts:227:11)
   │ proc [kibana]     at exports.Manager.execute (/Users/jfsiii/work/kibana/node_modules/@hapi/hapi/lib/toolkit.js:60:28)
   │ proc [kibana]     at Object.internals.handler (/Users/jfsiii/work/kibana/node_modules/@hapi/hapi/lib/handler.js:46:20)
   │ proc [kibana]     at exports.execute (/Users/jfsiii/work/kibana/node_modules/@hapi/hapi/lib/handler.js:31:20)
   │ proc [kibana]     at Request._lifecycle (/Users/jfsiii/work/kibana/node_modules/@hapi/hapi/lib/request.js:370:32)
   │ proc [kibana]     at Request._execute (/Users/jfsiii/work/kibana/node_modules/@hapi/hapi/lib/request.js:279:9)
```
</details>

<details><summary>see test added in this PR fail on master</summary>

```
1)    Fleet Endpoints
       reassign agent(s)
         bulk reassign agents
           should allow to reassign multiple agents by id -- some invalid:

      Error: expected 200 "OK", got 500 "Internal Server Error"
```
</details>

## Root cause
Debugging runtime error in `searchHitToAgent` found some TS type mismatches for the ES values being returned. Perhaps from one or more of the recent changes to ES client & Fleet Server. Based on `test:jest` and `test:ftr`, it appears the possible types are `GetResponse` or `SearchResponse`, instead of only an `ESSearchHit`.

https://github.com/elastic/kibana/pull/94632/files#diff-254d0f427979efc3b442f78762302eb28fb9c8857df68ea04f8d411e052f939cL11

While a `.search` result will include return matched values, a `.get` or `.mget` will return a row for each input and a `found: boolean`. e.g. `{ _id: "does-not-exist", found: false }`. The error occurs when [`searchHitToAgent`](1702cf98f0/x-pack/plugins/fleet/server/services/agents/helpers.ts (L11)) is run on a get miss instead of a search hit.

## PR Changes
* Added a test to ensure it doesn't fail if invalid or missing IDs are given
* Moved the `bulk_reassign` tests to their own test section
* Filter out any missing results before calling `searchHitToAgent`, to match current behavior
* Consolidate repeated arguments into and code for getting agents into single [function](https://github.com/elastic/kibana/pull/94632/files#diff-f7377ed9ad56eaa8ea188b64e957e771ccc7a7652fd1eaf44251c25b930f8448R70-R87):  and [TS type](https://github.com/elastic/kibana/pull/94632/files#diff-f7377ed9ad56eaa8ea188b64e957e771ccc7a7652fd1eaf44251c25b930f8448R61-R68)
* Rename some agent service functions to be more explicit (IMO) but behavior maintained. Same API names exported.

This moves toward the "one result (success or error) per given id" approach for https://github.com/elastic/kibana/issues/90437

### 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-03-16 20:51:57 -04:00
Melissa Alvarez 769243cc98
[ML] Data Frame Analytics accessibility tests: fix flaky outlier creation test (#94735)
* ensure callouts exist before moving to continue button

* unskip ml accessibility suite
2021-03-16 17:49:24 -04:00
Yuliia Naumenko 25baa3b558
[Connectors UI] Make UI use new connector APIs (#94180)
* [Connectors UI] Make UI use new connector APIs

* fixed tests

* fixed due to comment

* fixed due to comment

* fixed test

* fixed test

* fixed test

* moved rewrite_request_case to the common folder

* fixed due to comments
2021-03-16 12:59:46 -07:00
Yuliia Naumenko 21587dc79e
[Alerts] Replaces legacy es client with the ElasticsearchClient for alerts and triggers_actions_ui plugins. (#93364)
* [Alerts] Replaces legasy es client with the ElasticsearchClient

* fixed build

* fixed build

* fixed ci build

* fixed ci build

* fixed infra callCLuster

* fixed infra callCLuster

* fixed infra callCLuster

* fixed ci build

* fixed ci build

* fixed ci build

* fixed infra tests

* fixed security tests

* fixed security tests

* fixed security tests

* fixed tests

* fixed monitoring unit tests

* fixed monitoring unit tests

* fixed type checks

* fixed type checks

* fixed type checks

* migrated lists plugin

* fixed type checks

* fixed tests

* fixed security tests

* fixed type checks

* fixed tests

* fixed type checks

* fixed tests

* fixed tests

* fixed tests

* fixed due to comments

* fixed tests

* fixed comment

* fixed tests

* fixed tests

* fixed searh

* fixed searh

* fixed test

* fixed due to comment

* fixed detections failing test and replaces scopedClusterClient exposure with IScopedClusterClient instead of ElasticsearchClient asCurrentUser

* fixed test

* fixed test

* fixed test

* fixed typecheck

* fixed typecheck

* fixed typecheck

* fixed merge
2021-03-16 12:03:24 -07:00
Tim Sullivan ec41ae3c49
[Reporting-CSV Export] Re-write CSV Export using SearchSource (#88303)
* [Reporting-CSV Export] Re-write CSV Export using SearchSource

* replace PIT solution with scan-and-scroll

* update tests

* cleanup

* simplify pr

* update docs

* update docs

* update telemetry schema

* use getSearchRequestBody instead of flatten

* Revert "update docs"

This reverts commit ab9f4d9642.

* optimize some async calls

* cleanup

* --wip-- [skip ci]

* fix telemetry schema

* fix telemetry tests

* fix snapshot

* api docs

* api doc updates

* use import type

* format the data through chains of maps

* add another saved search to reporting/ecommerce_kibana

* add a failing test

* add error logging to query failures

* put clear scroll in a finally so the ES error can be captured

* log dat error

* set dat fieldsFromSource

* --wip-- [skip ci]

* Revert "add another saved search to reporting/ecommerce_kibana"

This reverts commit 6edf26eff2.

* functional test fixes

* clean up ecommerce test archive

* add test for new search with fieldsFromSource set

* add tests and refactor tests

* cleanup redundant conditionals

* add GenerateCsv.getFields

* fix some tests

* fix double-escaping

* fix test snapshots and refactoring

* fix other tests

* fix test

* fix default index pattern in functional tests

* fix ts and sort fields when they come from API response

* --wip-- [skip ci]

* fix formatting and increase maxSizeBytes for testing

* remove client-side logic for sanitizing fields

* do not prepend timefield name if it already is a column

* test the logic to prepend timeField

* test the logic to sort the fields

* fix functional test

* preserve the error from data.search

* add functional test for ES returning an error

* fix snapshot

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-16 11:54:47 -07:00
Tyler Smalley 36ca26d290 skip flaky suite (#94666) 2021-03-16 11:08:02 -07:00
Dario Gieselaar c921ed956c
[APM] Use top_hits instead of top_metrics (#94694)
* [APM] Use top_hits instead of top_metrics for high cardinality fields

Closes #94676.

* Update snapshots
2021-03-16 12:19:42 -04:00
Mikhail Shustov ee84e0b0b7
Merge tsconfig and x-pack/tsconfig files (#94519)
* merge all the typings at root level

* merge x-pack/tsconfig into tsconfig.json

* fix tsconfig after changes in master

* remove unnecessary typings

* update paths to the global typings

* update paths to the global elaticsearch typings

* fix import

* fix path to typings/elasticsearch in fleet plugin

* remove file deleted from master

* fix lint errors
2021-03-16 15:13:49 +01:00
Cauê Marcondes b0fa077e8a
[APM] Adding comparison to Throughput chart, Error rate chart, and Errors table (#94204)
* adding comparison to throuput chart

* adding comparison to error rate chart

* adding comparison to errors table

* fixing/adding api test

* addressing pr comments

* addressing pr comments

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-16 09:12:50 -04:00
Walter Rafelsberger f3b74b457c
[ML] Transforms: Fixes missing number of transform nodes and error reporting in stats bar. (#93956)
- Adds a Kibana API endpoint transforms/_nodes
- Adds number of nodes to the stats bar in the transforms list.
- Shows a callout when no transform nodes are available.
- Disable all actions except delete when no transform nodes are available.
- Disables the create button when no transform nodes are available.
2021-03-16 11:41:48 +01:00
Alison Goryachev 7dc9fce0c8
[Upgrade Assistant] Add support for deprecated index settings (#93293) 2021-03-15 20:20:58 -04:00
Tim Sullivan 366e085874
[Reporting/Test] label job param URL as deprecated in the variable name (#94639) 2021-03-15 16:55:38 -07:00
Melissa Alvarez 08c6753f22
[ML] Data Frame Analytics results: Ensure outlier detection results view displays feature influence correctly (#94493)
* ensure feature influence column is shown for outlier jobs

* add popoverContent schema type featureInfluence

* add featureInfluence cell content check to functional test

* update types

* ensure computeFeatureInfluence is added to jobConfig

* always remove invalid feature influence columns for outlier jobs

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-15 18:26:26 -04:00
Frank Hassanabad 85c0a34893
[Security Solutions] Fixes and unskips tests (#94391)
## Summary

Fixes and unskips tests. Also makes the tests less picky. Although I enjoy seeing the changes on ES promotions of error messages in case we see something really bad happening, it's too manual of a process to fix and puts too much of a burden on operations to skip the error messages. 

### 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-03-15 12:15:59 -06:00
Melissa Alvarez a5f7260e5e
[ML] Data Frame Analytics creation: add checks and ensure validation summary is updated (#94226)
* add num_top_classes and feature_importance checks to validation

* ensure validation details view up to date

* ensure topClasses messages shows correct number. update types

* update functional test

* update cloning functional test for regression type job
2021-03-15 13:53:25 -04:00
Rudolf Meijering e883e500c3
EsArchiver: support for injecting kibana version and use it for spaces tests (#94420)
* EsArchiver: support for injecting kibana version and use it for speeding up spaces tests

* Use kbn/utils to get current kibana version in tests

* Review feedback: improve test by splitting variable over chunks
2021-03-15 09:17:41 -07:00
ymao1 a7c9d3f1e0
[Alerting] Update UI to reflect new terminology (#93597)
* Renaming alerts to rules

* Updating formatted messages

* Updating i18n labels

* Completed renaming in UI

* Updating client routes including redirect

* wip docs update

* Reverting title changes for now

* Fixing types check

* Fixing unit tests

* Fixing functional test

* Fixing functional test

* docs wip

* wip docs update

* Finished first run through docs

* docs docs docs

* Fixing bad merge

* Fixing functional test

* Docs cleanup

* Cleaning up i18n labels

* Fixing functional test

* Updating screenshots

* Updating screenshots

* Updating screenshots

* Updating terminology in alerting examples

* Updating terminology in alerting examples

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-15 10:03:39 -04:00
Anton Dosov bd9170f7dc
[Search Sessions] Search session example app functional test (#92133) 2021-03-15 14:47:14 +01:00
Paul Tavares 8fc5d8ba30
[FLEET][SECURITY_SOLUTION][ENDPOINT] Fleet Artifact client and refactoring of Endpoint to use it (#93776)
* Fleet: adds new service for Artifact storage management
* Fleet: Expose new `createArtifactsClient()` from Fleet `Plugin#start` interface
* Endpoint: Change Endpoint to use FleetArtifactClient and initial implementation of EndpointArtifactClient
* Endpoint: Add `fleetServerEnabled` feature flag to security solution plugin (will be used in next PR)
* Endpoint: Artifact download api adjusted to get artifact from fleet index
* Endpoint: Added new esArchive for artifacts stored in .fleet-artifacts index for API integration tests
2021-03-11 12:17:18 -05:00
Joe Reuter 33fbe74e4e
[Lens] Transpose columns (#89748) 2021-03-11 13:51:50 +01:00
Robert Oskamp 92307bfe29
[ML] Functional tests - stabilize slider value selection (#94313)
This PR stabilizes the slider value selection during ML functional tests.
2021-03-11 10:11:53 +01:00
spalger ad0517a905 skip another suite blocking es promotion (#94367) 2021-03-10 18:19:54 -07:00
spalger 9aeb9f4e4c skip another suite blocking es promotion (#94367) 2021-03-10 15:41:52 -07:00
Ryland Herrick 5c352cace7
[Security Solution][Detections] Fix flaky indicator enrichment tests (#94241)
* Make indicator enrichment tests order-independent

Due to the fact that we use named queries to determine matches, and the
fact that the order in which named queries are returned is undefined, we
cannot guarantee a consistent ordering of enrichments if a given event
matches multiple named queries.

Because the ordering is not in itself important to enrichment, in order
to assert the multi-match functionality we must make the assertions
order independent.

* PR feedback

* Since we're only looping for side effects, prefer forEach to map for
  more idiomatic FP.
2021-03-10 16:00:05 -06:00
spalger 68adc48c7e skip test failing es promotion (#94367) 2021-03-10 13:57:57 -07:00
Michael Olorunnisola ebd92a6e5d
[Security_Solution][Telemetry] - Update endpoint usage to use agentService (#93829)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-10 15:10:27 -05:00
Sébastien Loix a632f3f59f
[ILM] Add support for frozen phase (#93068) 2021-03-10 20:06:11 +00:00
Jonathan Buttner 6044f8a8bf
Removing resolver functional tests (#94331) 2021-03-10 14:06:47 -05:00
Nathan Reese 042c5bc5ce
[Maps] remove EMS tile layers from test artifacts to fix flaky tests (#94319) 2021-03-10 11:11:08 -07:00
Cauê Marcondes f428b10a79
[APM] Adding comparison latency chart (#91339)
* adding time comparison to latency chart

* adding time comparison to latency chart

* fixing TS

* fixing api test

* addressing PR comments

* adding api test

* addressing PR comments

* fixing api test

* rounding date diff

* addressing PR comments

* fixing api test

* refactoring

* fixing ts issue

* fixing offset function

* fixing offset function

* addressing PR comments

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-10 11:02:50 -05:00
Steph Milovic 2bb23291c7
[Security Solution] [Cases] rename case dir/plugin/context/i18n to cases (#94149) 2021-03-10 08:58:51 -07:00
Tyler Smalley 7d7a16883c
Removes X-Pack Code plugin (#94240)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2021-03-10 02:32:29 -05:00
Jen Huang 67e968304e
[Fleet] Remove coreMigrationVersion from snapshot (#94235)
* Remove coreMigrationVersion from snapshot

(cherry picked from commit a8b9b41a68)

* Remove `latestVersion` too

(cherry picked from commit 6f3949c8d8)
2021-03-09 18:59:36 -08:00
Yuliia Naumenko 086762da6a
[Actions] Replaces legacy es client with the ElasticsearchClient (#93361)
* [Actions] Replaces legasy es client with the ElasticsearchClient

* fixed build

* fixed tests
2021-03-09 14:39:46 -08:00
Zacqary Adam Xeper 5d119cfcbb
[Fleet] Return empty agents list when submitting a kuery with no keys (#93844) 2021-03-09 16:10:56 -06:00
Jen Huang 3946c4ad91
[Fleet] Fix package policies created with null var values (empty defaults) (#94040)
* Make package validation be based on types

* Add package info to cache after it is generated from ES storage

* Add logging around package info retrieval and when cache is set

* Add snapshot api integration test for uploaded package info

* Use the apache package for snapshot test instead

* Remove date field from snapshot

* Update docs

* Fix streams getting overridden

* Add back package field to data streams

* PR fixes
2021-03-09 14:53:22 -05:00
Quynh Nguyen fcf397f9c3
[ML] Add functional tests for runtime mappings in Transforms (#92738)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-09 11:25:58 -06:00
Byron Hulcher cceed8ddd6
[App Search] Add delete action to EnginesTable component (#92844)
* Add delete engine route to App Search

* Add new deleteEngine listener to EnginesLogic

* Convert EnginesTable Manage into a proper EuiBasicTable action

* Call EnginesLogic.actions.deleteEngine using new action in EnginesTable

* Manage action on EnginesTable should use eye icon

* Confirmation alert for delete action on EnginesTable

* Only display manage/delete actions to users with canManageEngines

* Add success message and reload after successful engine delete

* Jest tests for EngineTable actions

* Copy change for engine delete success message

* Fixing EnginesTable tests

* Adding more tests for DELETE engine route

* engineNameLink -> EngineNameLink

* Remove redundant test

* Convert Engine.type to enum EngineTypes

* Must use mountWithIntl

* Use platinum license instead of role ability check
2021-03-09 09:49:52 -05:00
ymao1 023d9a028b
[Alerting] Update alerting action variables to follow new terminology (#93836)
* Removing duplicate ActionVariable interface. Updating common action variables in UI

* Passing in alert values as rule variables in transform_action_params

* Fixing unit tests

* Fixing functional test

* Adding functiional test

* Updating paths

* Fixing i18n

* Fixing i18n

* Fixing api docs

* Plugin api build

* Moving spaceId and tags under rule prefix

* Using top level alert prefix

* Fixing i18n

* build api docs

* Fixing functional test

* Fixing functional test
2021-03-09 07:48:38 -05:00
Robert Oskamp 6569e0cfa3
[ML] Functional tests - stabilize transform message assertion (#94056)
This PR stabilizes the transform message assertion during functional tests by only comparing lower cased strings.
2021-03-09 12:40:24 +01:00
Cauê Marcondes c2fb2ec936
[APM] Adding comparison to transactions table (#91435)
* adding comparison to transactions table

* fixing api test

* merge

* addressing PR comments

* addressing PR comments

* adding kuery filter

* fixing tests

* addressing PR comments

* fixing concurrency issues

* addressing PR comments

* addressing PR comments

* addressing PR comments

* hiding impact bar when comparison disable

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-08 22:00:29 -05:00
Tim Sullivan 9fef424bba
Switch Reporting to Task Manager (#64853)
* [Reporting] Task Manager

* fix startup

* use synchronous config for task registration

* fix eslint

* pr-90365

* --wip-- [skip ci]

* set maxConcurrency to 0 if pollEnabled is false

* add test for execute_report

* remove unused test file

* more tests

* remove unused test files

* remove priority

* logging cleanups

* fix for queue.pollEnabled: false

* more logging fixes for less duplicated code

* update jest snapshots

* polish

* remove unnecessary

* Update mapping.ts

* polish

* fix bug if instance gets a monitoring task and pollEnabled is false

* simplification

* cosmetic

* fix test

* stop monitoring task sabotage

* update api docs

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-08 17:33:19 -07:00
Ryland Herrick 52787e9379
[Security Solution][Detections]Alerts migrations can be finalized/cleaned up in all spaces (#93809)
* Retrieve SOs by ID in a space-aware manner by using bulkGet

We were previously using a manual invocation of find(), which was a)
tied to the current implementation of how SOs generate their _ids, and
b) didn't respect spaces.

By replacing this with a call to bulkGet, which automatically respects
the space of the current request, and which abstracts away the building
of the actual _id based on the SO ID and type, we address the issues
above.

* Surface SO errors to the finalize/delete APIs

Now that we're using bulkGet, we receive an object with errors if the
object is not found, which by default breaks our subsequent validation.
In order to provider better UX, we re-raise the first of these errors
that we find, if present, and return that to the user.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-08 15:10:16 -06:00
Wylie Conlon c33987d929
Support for number, date and IP range data types (#76971)
* Support for number, date and IP ranges

* Update tests

* Ranges don't work with range agg

* Fix test case

* Allow Discover to create range filters

* Supports ranges in Visualize, KQL, remove Lens support

* Fix test mappings

* Bring back field cache to work around bug

* Fix some tests

* Fix test expectation

* Respond to review comments

* Fix type error

* Remove added sample data

* Fix api_docs

* Fix test
2021-03-08 15:50:36 -05:00
Nicolas Chaulet f4caf8727d
[Fleet] Remove fleetServerEnabled feature flag and use fleet system indices (#92422) 2021-03-08 07:40:09 -05:00
Brian Seeders a7dd5179a9
Skip another uptime test blocking ES snapshot promotion (#93868) 2021-03-05 23:04:27 -05:00
Melissa Alvarez cac26b8cda
[ML] Data Frame Analytics creation wizard: add validation step (Part 1) (#93478)
* wip: create validationStep component

* wip: trainingPercent check, analysisFields check. Step details

* move validation check to server

* handle no training percent in validation

* move callout component to shared dir

* use shared Callout component in AD val and update message headings

* update types

* adds functional tests for validation

* adds api integration test for validate endpoint

* consolidate messages for depvar and fields

* fix accessibility test

* update license

* update validation messages

* update types in validation model

* add jobValidationReturnType
2021-03-05 21:48:39 -05:00
Christos Nasikas d0f356dde3
[Alerts] Fix broken alert's actions when upgrading from 7.10 to 7.11 (#93611)
Co-authored-by: Steph Milovic <stephanie.milovic@elastic.co>
2021-03-05 19:03:45 -05:00
Brian Seeders 654435249e
Skip uptime test blocking ES snapshot promotion (#93828) 2021-03-05 18:12:55 -05:00
Devin W. Hurley fd1d796564
[Security Solution] [Detections] Fixes validation on response from find status route (#93684)
* fix validation on response of find status route when rule has a partial failure status

* replaces warning in rule status service with partial failure to maintain backwards compatibility from an API standpoint, also displays 'warning' on UI if a rule's status is partial failure

* display partial failure as 'warning' on all rules table and update e2e test to check for partial failure not warning

* add util function, show 'warning' on monitoring table, fix e2e tests
2021-03-05 17:24:47 -05:00
Mike Côté 23ce8dcfdb
Rename alerts plugin to alerting (#92898)
* Rename alerts plugin to alerting

* Deprecate old config values

* Few more renames

* Update plugin list

* Rename xpack.alerts -> xpack.alerting

* Fix some ESLint rules

* Fix typecheck

* Fix some test failures

* Some more renames

* Fix ESLint

* Fix some test failures

* Fix failing jest test

* Undo exclusive test

* Fix APM deps

* Fix docs

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-05 13:59:34 -05:00
Nicolas Chaulet 02be8c16c9
[Fleet] Improve error status code for package (#93696) 2021-03-05 13:50:14 -05:00
Vadim Dalecky 89020354eb
Unskip "Explore underlying data" skipped functional test (#93627)
* ci: 🎡 enable flaky test for running through flaky test runner

* ci: 🎡 unskip skipped test
2021-03-05 15:25:59 +01:00
Tiago Costa 0f261ef670
skip flaky suite (#93737) 2021-03-05 14:16:11 +00:00
Gidi Meir Morris 7cfd15c038
[Alerting] adds Connectors APIs and deprecates old Actions APIs as per the new Alerting terminology (#92451)
* moved legacy actions api to legacy folder

* introduced connector create api

* added new delete route

* added new execute and get_all

* introduced all connector APIs

* renamed action to connector in Apis

* comment on camel case type

* fixed va

* updated docs

* legacy title

* corrected APIs

* legacy links

* added linik to deprecatred APIs

* added linik to deprecatred APIs from index

* moved legacy apis down one level

* Apply suggestions from code review

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

* renamed route file for connectorTypesRoute

* define legacy route

* Update docs/api/actions-and-connectors/legacy/index.asciidoc

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

* api docs

Co-authored-by: ymao1 <ying.mao@elastic.co>
Co-authored-by: Mike Côté <mikecote@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-05 06:49:06 -05:00
liza-mae 27f2c75921
Upgrade smoke tests (#92893)
* Upgrade smoke tests

* Fix lint issues

* Remove duplicate line

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-04 20:22:20 -07:00
Jonathan Budzenski 84344391ba skip should apply query to fit to bounds. #93718 2021-03-04 20:24:54 -06:00
Jen Huang 0d4ca46cf0
[Fleet] Set all keyword and text fields for index.query.default_field index template setting (#91791)
* Set all keyword and text fields for `index.query.default_field` setting

* Update tests and snapshots

* Fix test

* Add default field limit safeguard

* Add logging when beyond limit

* Update tests to mock app context (because I added logger usage)

* Update api integration test

* Rename consts
2021-03-04 16:34:47 -05:00
John Dorlus 572f6888c2
[ILM] Added new functional test in ILM for creating a new policy (#92936)
* Added data-test-subj for ILM policies row and added a functional UI test to create a new ILM policy.

* Removed .only from test to allow entire test suite to run again.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-04 13:55:00 -05:00
Alison Goryachev ebe1f1f6d3
[Upgrade Assistant] Disable UA and add prompt (#92834) 2021-03-04 13:03:14 -05:00
Joe Reuter 1882b82531
fetch node labels via script execution (#93225) 2021-03-04 17:08:26 +01:00
Joe Reuter 462fe0829e
stabilize waiting for visualization (#93469) 2021-03-04 14:56:56 +01:00
Nathan L Smith 4e21faeeb6
Fix service map for All environment single service (#93517)
Before we removed environment from the UI filters (#89647), the environment query parameter would be undefined if "All" was selected. Now we send ENVIRONMENT_ALL in as the query parameter.

Changes in https://github.com/elastic/kibana/blob/master/x-pack/plugins/apm/server/lib/service_map/get_service_map_from_trace_ids.ts made it so no connections would be returned if ENVIRONMENT_ALL was selected, rather than all connections. Since no connections were being returned, no elements except the selected service would be returned in the API response.

This changes it so if ENVIRONMENT_ALL is selected, the connection will always be returned, just like what used to be the case when environment was undefined.

Add an API test for this case.

Fixes #93385.
2021-03-03 17:30:08 -06:00
Marshall Main 4c893985e3
[Security Solution][Lists] Escape quotes in list ids and quote the id in KQL query (#93176)
* Escape quotes in list ids and quote the id in KQL query

* Remove decodeURIComponent because too many KQL queries don't handle quotes

* Add quotes to user supplied IDs for other KQL queries

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-03 15:02:08 -05:00
Tiago Costa 2d17821f08
Revert "Make tests deterministic by providing unique timestamps (#93350)"
This reverts commit 3ce614fe46.
2021-03-03 19:48:54 +00:00
Jonathan Buttner 9dd395b452
[Security Solution][Case][Bug] Only update alert status in its specific index (#92530)
* Writing failing test for duplicate ids

* Test is correctly failing prior to bug fix

* Working jest tests

* Adding more jest tests

* Fixing jest tests

* Adding await and gzip

* Fixing type errors

* Updating log message

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-03 13:28:59 -05:00
Wylie Conlon cae9ca4c19
[Field formats] Correctly format numeric histograms outside Discover (#91576)
* [Field formats] Correctly format numeric histograms outside Discover

* Fix types

* Fix types

* Fix failures

* Fix merge issue

* Fix tests

* Fix i18n

* Fix i18n

* Add doc and fix integration

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-03 13:13:57 -05:00
Wylie Conlon eec777b7ef
[Index patterns] Guarantee order of fields in flattenHits (#93344)
* [Discover] Guarantee order of fields in table preview

* Remove comments

* Fix test that relied on discover ordering

* Fix ordering of test
2021-03-03 13:12:36 -05:00
Ryland Herrick 3ce614fe46
Make tests deterministic by providing unique timestamps (#93350)
The threat intel data that we are loading for these tests was previously
copy/pasted, resulting in all docs having the same @timestamp value.
This resulted in nondeterministic ordering which manifested as test
failures.

This fixes the issue by giving a unique timestamp to each indicator
document, and then unskips/updates tests according to this new ordering.
2021-03-03 11:53:47 -06:00
Joe Reuter 73f8b335e1
[Lens] Add retry and remove unused test (#93233) 2021-03-03 17:56:26 +01:00
Melissa Alvarez ccc70b4960
[ML] Data Frame Analytic: adds api integration tests for _start and _stop endpoints (#92532)
* add start and stop endpoint tests

* add start and stop within spaces endpoint tests

* move start and start_spaces tests to separate files

* wip: move stop and stop_spaces to separate files

* use slow running job config so job is still running when stop request happens

* check started job state is actually started

* check job is stopped after stopping

* add debug logs

* ensure jobs are created/started before stopping attempt

* remove unnecessary debug logs
2021-03-03 11:17:05 -05:00
Pete Harverson be0b444873
[ML] Transforms: Adds a11y tests for Transform plugin (#93197) 2021-03-03 11:41:44 +00:00
Nathan Reese bd9b349dfd
rename advanced setting ml:fileDataVisualizerMaxFileSize to fileUpload:maxFileSize and increase max geojson upload size to 1GB (#92620)
* rename ml:fileDataVisualizerMaxFileSize to fileUppload:maxFileSize

* add saved object migration

* file preview

* importing status

* remove console statement

* import complete view

* fix geojson_importer test

* tslint

* i18n fixes

* cleanup

* update documenation for advanced setting rename

* advanced settings usage_collection

* remove ml:fileDataVisualizerMaxFileSize from schemas and types

* add copy buttons for import response and fix geojson upload functional tests

* tslint

* remove clipboard-read check

* return early if env does not support reading from clipboard

* fix reporting tests

* review feedback

* update GeoJsonFileSource to support showing results trimmed icon and tooltip

* add fileUpload to useMlKibana context and replace dependencyCache with useMlKibana

* tslint

* review feedback

* lower case file name

* default to selecting geo_shape when file contains both points and shapes

* fix wizard onError callback to not advance to next step

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-02 19:07:03 -07:00
Oliver Gupte 3f5473ef7d
[APM] Fixes duplicate ML job creation for existing environments (#85023) (#93098)
* [APM] Fixes duplicate ML job creation for existing environments (#85023)

* Removes commented out test code.

* Adds API integration tests

* clean up code for readability
2021-03-02 11:20:30 -08:00
Marco Liberati 92134cb88e
[Lens] Set pie chart slices sorted clockwise (#92617)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-02 17:34:46 +01:00
Tiago Costa b33ea364af
skip flaky suite (#93152) 2021-03-02 14:34:27 +00:00
Tiago Costa a8adbbf800
skip flaky suite (#93152) 2021-03-02 14:29:48 +00:00
Devin W. Hurley 1bdf0022ee
[Security Solution] [Detections] Updates warning message when no indices match provided index patterns (#93094)
* updates warning messages and modifies warning message when endpoint security rule is missing index pattern

* fix integration test text
2021-03-02 09:10:59 -05:00
Marco Liberati 03cc5cc0c2
[Lens] Introduces new chart switcher (#91844)
Co-authored-by: Wylie Conlon <wylieconlon@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-02 11:25:35 +01:00
Steph Milovic 90976ee119
[Security Solution] [Timeline] Bugfix to include unmapped fields in the timeline event details JSON (#92025) 2021-03-01 21:40:54 -06:00
Jonathan Buttner 4739eab490
[Security Solution][Case][Bug] Prevent closing collection when pushing (#93095)
* Prevent closing collection when pushing

* Fixing translations
2021-03-01 17:11:47 -05:00
Christos Nasikas 31889a589d
[Security Solution][Case] Migrate category & subcategory fields of ServiceNow ITSM connector (#93092) 2021-03-01 16:21:00 -05:00
Ryland Herrick a55d8b60ea
[Security Solution][Detecttions] Indicator enrichment tweaks (#92989)
* Update copy of rule config

* Encode threat index as part of our named query

* Add index to named query, and enrich both id and index

We still need mappings and to fix integration tests, but this generates
the correct data.

* Update integration tests with new enrichment fields

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-01 14:57:35 -06:00
Candace Park 1a3bbbf917
[Security Solution][Endpoint][Admin] Fixes policy sticky footer save test (#92919)
* commented code to close out toast
2021-03-01 15:31:05 -05:00
Candace Park 33b24c5d89
[Security Solution][Endpoint][Admin] Fixes 7.12 ransomware migration and mac bug (#92639) 2021-03-01 15:27:02 -05:00
Jonathan Buttner d9043c1c46
[Security Solution][Case][Bug] Removing empty collections when filtering on status (#92048)
* Removing empty collections when not filtering on status

* Fixing add comment response

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-01 14:47:38 -05:00
Alejandro Fernández Haro f44916b6aa
[Telemetry] Full schema definition (#90273)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-01 18:30:51 +00:00
Tim Sullivan 40fa961d53
[Reporting] Remove unused priority field (#92552)
* [Reporting] Remove unused priority field

* fix test

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-01 10:41:08 -07:00
Jonathan Buttner b5cd44e7ac
[Security Solution][Case][Bug] Only add rule object for alert comments (#92977)
* Adding test for alert rule fields migration

* Fixing directory issue

* Add more descriptive message

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-01 11:14:14 -05:00
Angela Chuang 1fa774cfe9
[Security Solution] Remove unused mock data (#92357)
* update mocked index

* update mocked index

* update mocked index

* remove unused mock data

* update mock data

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-01 15:25:12 +00:00
Tiago Costa 31041af43c
skip flaky suite (#85208) 2021-03-01 13:34:10 +00:00
Tiago Costa c6336e50bf
skip flaky suite (#91939) 2021-02-28 00:56:02 +00:00
Tiago Costa 58a5a7c67d
skip flaky suite (#89072) 2021-02-28 00:47:40 +00:00
Dario Gieselaar 38bcde1aea
[APM] Include services with only metric documents (#92378)
* [APM] Include services with only metric documents

Closes #92075.

* Explain as_mutable_array

* Use kuery instead of uiFilters for API tests
2021-02-27 08:44:47 +01:00
Christos Nasikas c2877a6d96
[Security Solution][Case] Fix subcases bugs on detections and case view (#91836)
Co-authored-by: Jonathan Buttner <jonathan.buttner@elastic.co>
2021-02-26 15:35:43 +02:00
Tiago Costa 3d9139089f
skip flaky suite (#92114) 2021-02-26 02:58:55 +00:00
Spencer 0aabc317ec
[kbn/test] add import/export support to KbnClient (#92526)
Co-authored-by: Tre' Seymour <wayne.seymour@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-02-25 16:13:27 -07:00
Tim Sullivan fd348d3f82
[Reporting/Discover] include the document's entire set of fields (#92730)
* fix get_sharing_data to provide a list of fields if none are selected as columns in the saved search

* add logging for download CSV that fields must be selected as columns

* add more functional test coverage

* fix ts in test

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-25 14:47:04 -07:00
James Gowdy 3b66bf7cc5
[ML] Adding ml_capabilities api tests (#92786)
* [ML] Adding ml_capabilities api tests

* updating test text

* changes based on review
2021-02-25 18:24:39 +00:00
Ryland Herrick f67fef9e50
[Security Solution][Detections] Set default indicator path to reduce friction with new filebeat modules (#92081)
* Distinguish source and destination config for indicator matches

We were previously conflating the path to retrieve indicator fields with
the path to persist indicator fields, since they were the same value.

To reduce friction in use with the new filebeat modules, we've decided
to make the default source path threatintel.indicator. However, we still
want to persist to threat.indicator, so we add a new constant, here.

* Update our integration tests following change of default

These tests were assuming a default path of threat.indicator. Since that
is the ECS standard, we're not going to rewrite the tests but instead
just add this rule override. In the future if the default changes, this
parameter might be unnecessary.

* DRY up unit tests a bit

* Add a note for future devs

If/when that constant changes, I imagine this will be useful context.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-24 20:45:44 -06:00
John Dorlus f0f7fea488
[ILM][Accessibility] Added A11y test for ILM new policy form. (#92570)
* Added A11y test for ILM new policy form.

* Separated out the takeSnapshot calls to separate tests.
2021-02-24 21:43:03 -05:00
Yara Tercero 9d2a7b8ece
[Security Solution][Exceptions] - Fixes exceptions builder UI where invalid values can cause overwrites of other values (#90634)
### Summary

This PR is a follow-up to #89066 - which fixed the same issue occurring with indicator match lists UI. The lack of stable ids for exception item entries resulted in some funky business by where invalid values could overwrite other values when deleting entries in the builder.
2021-02-24 18:32:44 -08:00
ymao1 b303c9df70
[Alerting] Fixing Failing test: X-Pack Alerting API Integration Tests.x-pack/test/alerting_api_integration/security_and_spaces/tests/alerting/rbac_legacy·ts - alerting api integration security and spaces enabled Alerts legacy alerts alerts superuser at space1 should schedule actions on legacy alerts (#92549)
* Unskipping test

* Increasing runAt time

* Increasing runAt time

* Logging

* Increasing wait time even more

* Removing logs

* Resetting task status

* Re-enabling all tests

* Re-enabling all tests

* Adding comment
2021-02-24 13:25:27 -05:00
Quynh Nguyen 96e34d96b1
[ML] Add functional tests for Transform start/delete (#92314) 2021-02-24 12:10:04 -06:00
spalger e1fa0bfa9c skip flaky suite (#88177) 2021-02-24 09:38:45 -07:00
Wylie Conlon 614c6c6853
[Lens] Fix unformatted timeseries functions (#92498)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-24 10:42:07 -05:00
Brian Seeders d9417635e8 skip flaky suite (#92567) 2021-02-24 10:32:04 -05:00
Shahzad 1be0612b05
[Uptime] Search made easy (#88581)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-24 16:02:32 +01:00
Devin W. Hurley 0c3d30cced
[Security Solution] [Detections] Adds integration test to ensure max_signals param is obeyed (#92489) 2021-02-23 17:16:48 -05:00
Nathan L Smith 57dfb811d6
Remove kuery from uiFilters (#91932)
* Make kuery a standalone query parameter instead of part of uiFilters
* Move getEsFilters helper to RUM
* Move query utils from "common" to "server" (it uses esKuery from the data plugin, which is exported from server, not common.)
* Move uiFiltersRt to RUM routes

References #84526.
2021-02-23 14:04:12 -06:00
igoristic 0e6c38d630
[Monitoring] Added cgroup option for APM cpu usage (#90873)
* Added APM cpu cgroup

* Fixed tests

* Fixed i18n

* Removed agent logic and fixed tests

* Fixed test

* Fixed tests and backup field

* Removed backup field fix

* Fixed cluster tests

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-23 12:19:10 -05:00
Walter Rafelsberger 45155f089d
[ML] Show mini histograms by default if row count below threshold. (#92021)
Show mini histograms by default if row count below threshold of 10000 docs.
2021-02-23 17:34:59 +01:00
Devon Thomson cb932075fa
[Dashboard] Remove Multiple History Entries & Stay in Edit Mode on Save As (#92105)
* made save as stay in edit mode when not navigating to another dashboard. Removed extra history entires from save
2021-02-23 11:01:21 -05:00
Anton Dosov ef5d5cf7b1
[Search Sessions] Fix Discover doesn't clean session when navigating to Context (#91874) 2021-02-23 08:14:54 -05:00
Jonathan Buttner 3c29f38adf
[Security Solution][Case] Adding tests for updating the status of alerts (#91301)
* Adding tests for updating the status of alerts

* Adding more alert tests and unskipping
2021-02-22 19:21:25 -05:00
Angela Chuang 2df74a1088
[Security Solution] Narrow down indices to match case descriptions (#89592)
* update default index to match with description

* narrow down indices to match case description

* run specific tests

* run only security solution's tests

* debug users integration test

* wait_for_completion_timeout

* run only security_solution

* add back integration tests

* avoid multiple requests

* uncomment tests

* unskip tests

* add smaller mock data for users and uncommon_processes

* put test back

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-22 20:53:56 +00:00
Melissa Alvarez c0de6680f0
[ML] Data Frame Analytics: adds api integration tests for job creation (#92101)
* add create endpoint integration tests

* update test suite name
2021-02-22 13:51:13 -05:00
MadameSheema af2bb0500e
[Security Solution] Cypress tests executed on Firefox (#91524)
* allows Cypress tests to be executed on Firefox

* fixes failing tests

* fixes issues

* fixes exceptions table failing test

* updates readme

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-22 17:48:43 +01:00
Mike Côté 0c2495a7e1
Ability to filter alerts by string parameters (#92036)
* Initial commit

* Update comment

* Return early

* Add docs

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-22 10:57:50 -05:00
Oliver Gupte feefc5220d
[APM] Fix for flaky correlations API test (#91673) (#92094)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-22 07:56:34 -08:00
Nathan Reese 6ef7d2cd55
[file_upload] move ml Importer classes to file_upload plugin (#91559)
* [ml] move importer to file_upload plugin

* move file_parse logic into GeoJsonImporter

* move file_parser tests to geojson_importer tests

* rename geo_json_clean_and_validate to geojson_clean_and_validate

* replace file_upload import with Importer.import

* simplify JsonIndexFilePicker props

* tslint

* i18n fixes and tslint fixes

* update functional test to account for change in layer name

* review feedback

* dependency_cache review feedback

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-22 08:47:39 -07:00
Rudolf Meijering 42b814e123
Speed up spaces tests by letting v2 migrations do less work (#91829)
* Don't mess with v2 migration's index

* Speed up spaces tests by letting v2 migrations do less work

* Add disabled mapping for spaces so that plugin can be disabled

* Add security as codeowners of xpack saved object api integration suite
2021-02-22 08:44:41 -05:00