Commit graph

942 commits

Author SHA1 Message Date
Liza Katz 7fbcf68d73
[Search Sessions] Save all sessions, with persisted flag (#89570)
* [data.search] Add search session methods to search service contract

* Fix types

* Fix tests and switch to cancel

* Update docs

* Fix types/tests

* Fix tests

* Update status of SO before cancelling search requests

* Add API integration test

* Fix types

* Update expiration route to use config defaultExpiration

* Fix test

* Update docs

* New logic for extend

* Remove declare module

* Search Sessions: Unskip Flaky Functional Test

* Review feedback

* fix ts

* Save all search sessions and then manage them based on their persisted state

* Get default search session expiration from config

* randomize sleep time

* fix test

* Remove test that is no longer valid

* fix test

* Make sure we poll, and dont persist, searches not in the context of a session

* Added keepalive unit tests

* fix ts

* code review @lukasolson

* ts

* More tests, rename onScreenTimeout to completedTimeout

* lint

* lint

* Delete async seaches

* Support saved object pagination
Fix get search status tests

* better PersistedSearchSessionSavedObjectAttributes ts

* test titles

* Fix undefined bug

* Remove runAt from monitoring task
Increase testing trackingInterval (caused bug)

* support workload histograms that take into account overdue tasks

* Update touched when changing session status to complete \ error

* removed test

* Updated management test data

* Rename configs

* delete tap first
add comments

* Use DataRequestHandlerContext in maps

* ts

* Fixed ts

Co-authored-by: Lukas Olson <olson.lukas@gmail.com>
Co-authored-by: Timothy Sullivan <tsullivan@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Anton Dosov <anton.dosov@elastic.co>
Co-authored-by: Gidi Meir Morris <github@gidi.io>
2021-02-03 23:15:41 +02:00
Spencer d07ae11da6
[es] disable wildcards in destructive actions (#88986)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-02-03 09:29:37 -07:00
Lukas Olson a9273ca001
[data.search] Add search session methods to search service contract (#87966)
* [data.search] Add search session methods to search service contract

* Fix types

* Fix tests and switch to cancel

* Update docs

* Fix types/tests

* Fix tests

* Update status of SO before cancelling search requests

* Add API integration test

* Fix types

* Update expiration route to use config defaultExpiration

* Fix test

* Update docs

* New logic for extend

* Remove declare module

* Review feedback

* fix ts

* Remove test that is no longer valid

* Fix undefined bug

* Use DataRequestHandlerContext in maps

* ts

Co-authored-by: Liza K <liza.katz@elastic.co>
2021-02-03 08:08:54 -07:00
Angela Chuang 22a903a9e3
[Security Solution] Saving is not working if hitting "favorites button" beforehand (#88642)
* fix favorites for templates

* fix integration test

* fix integration test

* fix event details request

* handle data when searchstrategy is still running

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-03 08:47:11 +00:00
Chris Cowan cf846bdddf
[Metrics UI][Logs UI] Completely remove GraphQL and Apollo (#89036) 2021-02-02 16:56:40 -07:00
Kevin Qualters 3da4c6bb2c
[Secutiy Solution] Timeline kpis (#89210)
* Stub kpi component

* search strategy scheleton timeline KPI

* search strategy scheleton timeline KPI

* Add timeline kpis component and search strategy container

* Use getEmptyValue in timeline kpis

* Prevent request from being made for blank timeline properly

* Add kpi search strategy api integration test

* Add jest tests for timeline kpis

* Clear mocks in afterAll

* Decouple some tests from EUI structure

* Combine some selector calls, change types to be more appropriate

* Simplify hook logic

* Set loading and response on blank timeline

* Only render kpi component when query is active tab

* Use TimelineTabs enum for query tab string

Co-authored-by: Xavier Mouligneau <189600+XavierM@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-02 18:30:45 -05:00
Nathan Reese 980112de1e
[Maps] migrate mvt routes to use data.search service instead of directly calling elasticsearch (#89904)
* [Maps] migrate mvt routes to use data.search service instead of directly calling elasticsearch

* pass search session id to mvt requests

* move grid tile tests to integration tests

* replace getTile unit test with integration test

* add comment about request param

* revert total meta change

* tslint fixes

* update jest tests
2021-02-02 15:51:00 -07:00
Felix Stürmer 7fa30ba33e
[Logs UI] Load <LogStream> entries via async searches (#86899)
This PR replaces the usage of plain HTTP routes to load the log stream entries with async search strategy calls.
2021-02-02 15:42:27 +01:00
Thomas Neirynck 391ab72be1
[Maps] Add table source for choropleth mapping (#89263) 2021-02-01 12:43:03 -05:00
Liza Katz 841ab704b8
[Search Sessions] Improve search session errors (#88613)
* Detect ESError correctly
Fix bfetch error (was recognized as unknown error)
Make sure handleSearchError always returns an error object.

* fix tests and improve types

* type

* normalize search error response format for search and bsearch

* type

* Added es search exception examples

* Normalize and validate errors thrown from oss es_search_strategy
Validate abort

* Added tests for search service error handling

* Update msearch tests to test for errors

* Moved bsearch route to routes folder
Adjusted bsearch response format
Added verification of error's root cause

* Align painless error object

* eslint

* Add to seach interceptor tests

* add json to tsconfig

* docs

* updated xpack search strategy tests

* oops

* license header

* Add test for xpack painless error format

* doc

* Fix bsearch test potential flakiness

* code review

* fix

* code review 2

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-31 12:16:46 +02:00
Kerry Gallagher 42a9490e7b
[Logs UI] Display category in anomalies table (#88677)
* Add category pattern to anomalies table
2021-01-27 17:58:06 +00:00
Ester Martí Vilaseca 289ca57bb5
[Metrics UI] Fix Host Overview boxes in Host Detail page (#89299)
* change from type:gauge to type:top_n in inventory models

* Add test for hostSystemOverview metric

* fix lint errors

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-27 17:27:34 +01:00
Alison Goryachev 007e7e4506
[Upgrade Assistant] Migrate server to new es-js client (#89207) 2021-01-27 10:22:36 -05:00
Alison Goryachev edb5e35151
[Painless Lab] Update server to use new es-js client (#88704) 2021-01-25 13:26:53 -05:00
Alison Goryachev 43db7e365f
[Search Profiler] Migrate server to new es-js client (#88725) 2021-01-25 11:27:59 -05:00
Thom Heymann aeb6df30d5
Update user management page (#87133)
* Update user management page

* Fixed i18n errors

* Fix linting errors

* Add ids required for accessability

* Added suggestions from code review

* Fix test errors

* Fix types in fleet

* fix translations

* Fix i18n

* Added suggestions from code review

* Fix i18n errors

* Fix linting errors

* Update messaging

* Updated unit tests

* Updated functional tests

* Fixed functional tests

* Fix linting errors

* Fix React warnings

* Added suggestions from code review

* Added tests and renamed routes

* Fix functional tests

* Simplified API integration tests

* Updated copy based on writing suggestions

* Fixed unit tests

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-25 13:51:57 +00:00
Dario Gieselaar fde408545d
decorateSnapshotUi: get file from stacktrace (#88950) 2021-01-21 18:16:04 +01:00
Angela Chuang 92f0b7cade
[Security Solution] integration test failure on kpi hosts and kpi network (#88870)
* integration test failure

* integration test failure

* integration test failure

* kpi_network integration test failure

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-21 15:55:31 +00:00
Robert Oskamp c702b5cfe8
Skip snapshot_restore API integration tests in cloud (#88841)
This PR disables the snapshot restore API integration tests in cloud.
2021-01-20 17:30:39 +01:00
Alejandro Fernández Haro ee5f560dd7
[FTR] Use new ES client instead of legacyEs service (#88720) 2021-01-20 15:30:35 +00:00
James Gowdy 686ece9aea
[ML] Improving existing job check in anomaly detection wizard (#87674)
* [ML] Improving existing job check in anomaly detection wizard

* fixing job id validation

* allow group ids to be reused

* updating module exists endpoint

* fixing issuse with job without group list

* fixing test and translation ids

* fixing validator when model plot is disabled

* changes based on review

* adding group id check to edit job flyout

* small refactor and fixing edit job issue

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-15 12:57:41 +00:00
Liza Katz d4c31ff096
[Search Sessions] Replace search session constants with kibana.yml configs (#88023)
* Replace search session constants with kibana.yml configs

* fix test

* jest

* rename feature flag

* @lukasolson code review

* Code review - config retreival

* jest fix
2021-01-15 01:14:02 +02:00
Alison Goryachev d9bd7b4fd6
[ILM] Surface linked hidden indices for policies (#87960) 2021-01-13 14:50:01 -05:00
Dima Arnautov 1f131b250f
[Transform] Functional tests for latest method (#86966)
* [ML] create latest transform from index pattern

* [Transform] refactor, tests for saved search

* [Transform] cloning tests for latest transform

* [Transform] fix cloning test, add editing tests

* [Transform] fix typo

* [Transform] disable cloning tests

* [Transform] add assertion for selected tranform function

* [Transform] disable editing tests

* [Transform] disable editing and cloning tests for latest function
2021-01-13 10:05:05 +01:00
Patryk Kopyciński 500edba975
[Security Solution] Fix Investigate in Timeline Threshold rule signal… (#87907)
* [Security Solution] Fix Investigate in Timeline Threshold rule signals logic

* fix tests

* PR comments

* Fix positioning of FieldsBrowser

* update cypress tests
2021-01-12 20:56:08 -05:00
Robert Oskamp 55fe83d4d1
[ML] API integration tests - fix sorting in saved object status test (#87800)
This PR fixes the sorting of response body jobs in the saved object status test.
2021-01-11 12:26:55 +01:00
Robert Oskamp 50bda81a05
[ML] API integration tests - stabilize saved objects endpoint tests (#87288)
This PR stabilizes some saved objects endpoint tests by making sure a different order of objects in a response array is still accepted.
2021-01-06 19:48:38 +01:00
Lukas Olson 8ac632b068
[data.search.session] Store search strategy in saved object for background sessions (#86057)
* [data.search.session] Store search strategy in saved object

* Update unit test to check strategy

* Fix test

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-04 17:39:57 -07:00
Spencer e3856a9e45
[security/apiKeys] migrate from id to ids in ES request (#87053)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-04 15:46:37 -07:00
Liza Katz 4415e548b5
[Search] Session feature controls (#85846)
* Use filter to bulk find

* Update x-pack/plugins/data_enhanced/server/search/session/session_service.ts

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

* Dashboard in space test

* Add warning on update failure

* fix merge

* Added functional test for sessions in space

* snapshot

* test cleanup

* sub perms

* test snapshots

* Update tests

* test

* code review

* snap

* Added discover test

* Update x-pack/plugins/data_enhanced/public/search/ui/connected_background_session_indicator/connected_background_session_indicator.tsx

Co-authored-by: Anton Dosov <dosantappdev@gmail.com>

Co-authored-by: Lukas Olson <olson.lukas@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Anton Dosov <dosantappdev@gmail.com>
2021-01-04 20:57:51 +02:00
Tiago Costa 16fa35cc2b
skip failing es promotion suite (#87157) 2021-01-04 15:03:06 +00:00
Patryk Kopyciński f654e06f76
[Security Solution] Fix few styling issues (#87045) 2021-01-04 13:53:23 +01:00
James Gowdy 6d72042ca4
[ML] Fixing endpoint schema for can_delete_job endpoint (#86436)
* [ML] Fixing endpoint schema for can_delete_job endpoint

* changing get to post in docs

* renaming canUntag

* fixing typo

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-12-21 12:17:53 +00:00
Liza Katz 3eaf86b944
[Search] Session server side functional tests (#86152)
* OSS search functional tests

* x-pack tests

* Session tests

* Update search.ts

* Update session.ts

* Update test/api_integration/apis/search/search.ts

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

* reportServerError

* Improve response error codes

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Lukas Olson <olson.lukas@gmail.com>
2020-12-17 22:04:53 +02:00
CJ Cenizal 7bac741a1e
Fix bug in which Index Management data streams were being sorted incorrectly by storage size. (#86204)
They were previously being sorted alphabetically using the humanized size value. Now they're sorted numerically by the raw bytes value.
2020-12-17 09:52:16 -08:00
Melissa Alvarez 5d2014dec5
initial api integration test for DFA map api (#86225) 2020-12-17 12:35:50 -05:00
Dario Gieselaar 003efb1cc4
expectSnapshot: throw on CI when snapshot is new (#85376) 2020-12-16 13:21:48 +01:00
Dima Arnautov e17cd65196
[Transform] Add support for latest function (#85784)
* [Transform] add latest to the schema definition

* [ML] update interfaces, add guards

* [Transform] WIP support latest function

* [Transform] fix request with missing_bucket after merge

* [Transform] fix error in useDeleteTransforms

* [Transform] fix types and fields sorting for pivot

* [Transform] fix types and jest tests

* [Transform] fix error shape

* [Transform] fixed card width, change description

* [Transform] fixed API integration tests

* [Transform] fix config mapper

* [Transform] improve wizard performance
2020-12-15 22:40:13 +01:00
Yulia Čech a8d088febd
Added hidden filter to data streams tab (#85028)
* Added hidden filter to data streams tab

* Fix i18n import

* Fixed tests

* hidden ds pr feedback

* Added includeHidden query to data streams list

* Changed how badge group renders data streams badges

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-12-14 16:54:06 +01:00
Xavier Mouligneau 0dfcbe92ed
[SECURITY SOLUTIONS] Ask user to save timeline before leaving the app + bugs (#85693)
* fix clicking on host on netwrok detail page

* Fetch signal index at plugin level to avoid weird behavior

* bing back full screen timeline

* Show health check on timeline

* fix focus on modal of description and title

* fix focus on modal of description and title

* allow to know the next appId

* if user leave security solution and timeline has not been saved, ask them if they want to save it before leaving

* fix test + types

* Fix siem signal loading on plugin + UX on timeline with no data

* Add a callback to cleaner from solution + test

* fix bug + improve prompt leaving msg

* update note

* css improvements

* fix code to be true to our test

* miss one test

* update test

* fix unit test

* core review

Co-authored-by: Patryk Kopycinski <contact@patrykkopycinski.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Angela Chuang <yi-chun.chuang@elastic.co>
2020-12-14 10:33:59 -05:00
Robert Oskamp d4f4a2c94f
[ML] API integration tests - security_linux and security_windows modules (#85743)
This PR adds API integration tests to create and setup the security_linux and security_windows modules.
2020-12-14 15:17:25 +01:00
Chris Roberson 1e8f2f66eb
[Monitoring] Some progress on making alerts better in the UI (#81569)
* Some progress on making alerts better in the UI

* Handle edge case

* Updates

* More updates

* Show kibana instances alerts better

* Stop showing missing nodes and improve the detail alert UI

* WIP

* Fix the badge display

* Okay I think this is finally working

* Fix type issues

* Fix tests

* Fix tests

* Fix alert counts

* Fix setup mode listing

* Better detail page view of alerts

* Feedback

* Sorting

* Fix a couple small issues

* Start of unit tests

* I don't think we need this Mock type

* Fix types

* More tests

* Improve tests and fix sorting

* Make this test more resilient

* Updates after merging master

* Fix tests

* Fix types, and improve tests

* PR comments

* Remove nextStep logic

* PR feedback

* PR feedback

* Removing unnecessary changes

* Fixing bad merge issues

* Remove unused imports

* Add tooltip to alerts grouped by node

* Fix up stateFilter usage

* Code clean up

* PR feedback

* Fix state filtering in the category list

* Fix types

* Fix test

* Fix types

* Update snapshots

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-12-13 10:20:29 -05:00
Shahzad 317608420a
Apply terminateAfter params in index status API (#85432) 2020-12-10 21:42:49 +01:00
Craig Chamberlain 313d85e985
[ML] Adds security_linux and security_windows Modules (#85065)
* initial commit

refactored multi-index, multi-pipeline jobs for 7.11. These are new modules that will live alongside the existing jobs.

* Update ml_modules.tsx

added new module names to the list

* Update get_module.ts

added new module names

* Linter fixes

* Order matters

* manifest fixes

added colon char to the module name and shortened the description

* additon to description

after talking with the security team today, adding this suggested text to the beginning of the description so it will tend to be visible to the user:
"This is a new refactored job which works on ECS compatible events across multiple indices."

* Adjust module recognizer test for auditbeat dataset

* influencers

changes to the metadata jobs to make influencers identical to the originals

* change for security app

changes to two datafeeds needed for logic in the Security app - added the suffix "_ecs" to two ids.

Co-authored-by: Garrett Spong <spong@users.noreply.github.com>
Co-authored-by: Robert Oskamp <robert.oskamp@elastic.co>
2020-12-10 14:02:41 -05:00
Xavier Mouligneau 0f408041b4
[SECURITY SOLUTION] Bundles _source -> Fields + able to sort on multiple fields in Timeline (#83761)
* replace _source with fields

* wip

* unit test

* regroup sorting and number together

* fix bugs from review

* mistake

* Update x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/index.tsx

Co-authored-by: Patryk Kopyciński <contact@patrykkopycinski.com>

* fix snapshot

* review + fix topN and filter from detail view

* fix tests

* fix test

Co-authored-by: Patryk Kopyciński <contact@patrykkopycinski.com>
2020-12-09 22:16:38 -05:00
Robert Oskamp efe3c597b0
[ML] API integration tests - adjust and re-enable anomalies table data test (#85405)
This PR adjusts and re-enables the get_anomalies_table_data API integration tests.
2020-12-09 15:33:53 +01:00
Dima Arnautov 58fc711626
[Transform] Replace legacy elasticsearch client (#84932)
* [Transform] replace legacy elasticsearch client

* [Transform] delete custom legacy client definition, update transforms_audit_messages.ts

* [Transform] fix start and stop transform endpoints

* [Transform] fix privileges and stats endpoints

* [Transform] fix forbidden

* [Transform] revert continue statement, add a comment

* [Transform] update privileges.ts using security namespace

* [Transform] fix error wrappers

* [Transform] add functional test for preview error validation

* [Transform] extract error message from the root cause

* [Transform] remove error translation
2020-12-09 12:55:54 +01:00
Robert Oskamp d63f769636 [ML] API integration tests - skip GetAnomaliesTableData 2020-12-09 11:00:50 +01:00
Shahzad 3216fce716
[Uptime] Remove unused code in monitor list API (#84312)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-12-08 17:18:37 +01:00
Robert Oskamp 0366a892b3
[ML] Initial API integration tests for ML jobs in spaces (#84789)
This PR adds initial API integration tests for the endpoints related to ML jobs in spaces.
2020-12-07 16:26:57 +01:00