Commit graph

47759 commits

Author SHA1 Message Date
Jonathan Budzenski 07576c84e7
Remove deprecation allowance for rmdir recursive (#116019)
This bumps synthetics to 1.0.0 beta 16, letting us remove the ignored
warning for fs.rmdir(path, { recursive: true})

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-11-01 11:37:17 -05:00
Cauê Marcondes f2402cef37
[APM] Adding api tests for error group (#116771)
* adding api tests for error group

* addresing pr changes
2021-11-01 16:31:06 +00:00
Giorgos Bamparopoulos 4feeeeb34f
Add API tests for top dependencies (#116788)
* Add top dependencies API tests

Co-authored-by: Søren Louv-Jansen <sorenlouv@gmail.com>
2021-11-01 16:22:01 +00:00
Tyler Smalley 12af558898 skip flaky suite (#116980) 2021-11-01 09:12:00 -07:00
Mark Hopkin dcdc0f8e8f
[Fleet] Use event.ingested where possible for data stream last activity (#116641)
* use event.ingested for datastream last activity

* remove ms precision from datastream dates

* add timestamp check to test

* fix type error

* split test out to be less complex and more reliable 🤞

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-11-01 15:51:12 +00:00
Felix Stürmer 96a1d3186b
[Logs UI] Respect the advanced settings for queries (#116485)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-11-01 16:49:34 +01:00
Candace Park d905cacc1d
[Security Solution][Endpoint][Cases] Add cases path to sourcerer init so browser fields load (#116464)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-11-01 11:32:39 -04:00
Jean-Louis Leysens d9bbe9c9be
[Reporting] Remove banner from reports (#116147)
* remove banner from reports

* added types file

* updated types references and imports

* added screenshot mode public mock

* added jest tests for when screenshot mode is enabled

* Update x-pack/plugins/banners/public/plugin.test.tsx

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

* Update x-pack/plugins/banners/public/plugin.test.tsx

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

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Michael Dokolin <dokmic@gmail.com>
2021-11-01 15:31:56 +00:00
Corey Robertson 25426708a8
Fix undo/redo and SO.resolve redirect issues (#116773)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-11-01 11:22:29 -04:00
Shivindera Singh f6f7c2d1de
[AppServices] @timestamp as default for timestamp field name in index pattern (#25863) (#116126) 2021-11-01 16:08:08 +01:00
Paul Tavares fa79ebeabd
[Security Solution][Endpoint] Fix display of long description text values (with no spaces) on Artifact Entry Cards (#116780)
* New DescriptionField component for artifact cards
* Use new DescriptionField in ArtifactCardEntry
* Added `eui-textBreakWord` class name to TextValueDisplay component in artifact cards
* Use `DescriptionField` in `CardCompressedHeader`
* Fix i18n of Description label on minified card
* Use DescriptionField in ArtifactEntryMinified
2021-11-01 11:01:54 -04:00
Shahzad 48a6585423
[Exploaratory View ] Styling: Fix duplicate labels for operation select (#115936)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-11-01 14:43:32 +00:00
Or Ouziel 9e4bab31b5
replace ts_ignore with ts_expect_error (#113768) 2021-11-01 16:41:10 +02:00
Giorgos Bamparopoulos e40ec9bfbd
Update testing dev docs for APM (#116664) 2021-11-01 10:10:19 -04:00
Georgii Gorbachev 2431a08d2b
[Security Solution][Detections] Reading last 5 failures from Event Log v1 - raw implementation (#115574)
**Ticket:** https://github.com/elastic/kibana/issues/106469, https://github.com/elastic/kibana/issues/101013

## Summary

TL;DR: New internal endpoint for reading data from Event Log (raw version), legacy status SO under the hood.

With this PR we now read the Failure History (last 5 failures) on the Rule Details page from Event Log. We continue getting the Current Status from the legacy `siem-detection-engine-rule-status` saved objects. Rule Management page also gets data from the legacy saved objects.

- [x] Deprecate existing methods for reading data in `IRuleExecutionLogClient`: `.find()` and `.findBulk()`
- [x] Introduce new methods for reading data in IRuleExecutionLogClient:
  - for reading last N execution events for 1 rule from event log
  - for reading current status and metrics for 1 rule from legacy status SOs
  - for reading current statuses and metrics for N rules from legacy status SOs
- [x] New methods should return data in the legacy status SO format.
- [x] Update all the existing endpoints that depend on `IRuleExecutionLogClient` to use the new methods.
- [x] Implement a new internal endpoint for fetching current status of the rule execution and execution events from Event Log for a given rule.
- [x] The API of the new endpoint should be the same as `rules/_find_statuses` to minimise changes in the app.
- [x] Use the new endpoint on the Rule Details page.

## Near-term plan for technical implementation of the Rule Execution Log (https://github.com/elastic/kibana/issues/101013)

**Stage 1. Reading last 5 failures from Event Log v1 - raw implementation** - ✔️ done in this PR

TL;DR: New internal endpoint for reading data from Event Log (raw version), legacy status SO under the hood.

- Deprecate existing methods for reading data in `IRuleExecutionLogClient`: `.find()` and `.findBulk()`
- Introduce new methods for reading data in IRuleExecutionLogClient:
  - for reading last N execution events for 1 rule from event log
  - for reading current status and metrics for 1 rule from legacy status SOs
  - for reading current statuses and metrics for N rules from legacy status SOs
- New methods should return data in the legacy status SO format.
- Update all the existing endpoints that depend on `IRuleExecutionLogClient` to use the new methods.
- Implement a new internal endpoint for fetching current status of the rule execution and execution events from Event Log for a given rule.
- The API of the new endpoint should be the same as `rules/_find_statuses` to minimise changes in the app.
- Use the new endpoint on the Rule Details page.

**Stage 2: Reading last 5 failures from Event Log v2 - clean implementation**

TL;DR: Clean HTTP API, legacy Rule Status SO under the hood.

🚨🚨🚨 Possible breaking changes in Detections API 🚨🚨🚨

- Design a new data model for the Current Rule Execution Info (the TO-BE new SO type and later the TO-BE data in the rule object itself).
- Design a new data model for the Rule Execution Event (read model to be used on the Rule Details page)
- Think over changes in `IRuleExecutionLogClient` to support the new data model.
- Think over changes in all the endpoints that return any data related to rule monitoring (statuses, metrics, etc). Make sure to check our docs to identify what's documented there regarding rule monitoring.
- Update `IRuleExecutionLogClient` to return data in the new format. 
- Update all the endpoints (including the raw new one) to return data in the new format.
- Update Rule Details page to consume data in the new format.
- Update Rule Management page to consume data in the new format.

**Stage 3: Reading last 5 failures from Event Log v3 - new SO**

TL;DR: Clean HTTP API, new Rule Execution Info SO under the hood.

- Implement a new SO type for storing the current rule execution info. Relation type: 1 rule - 1 current execution info.
- Swap the legacy SO with the new SO in the implementation of `IRuleExecutionLogClient`.

**Stage 4: Cleanup and misc**

- Revisit the problem of deterministic ordering ([comment](https://github.com/elastic/kibana/pull/115574#discussion_r735803087))
- Remove rule execution log's glue code: adapters, feature switch.
- Remove the legacy rule status SO.
- Mark the legacy rule status SO as deleted in Kibana Core.
- Encapsulate the current space id in the instance of IRuleExecutionLogClient. Remove it from parameters of its methods.
- Introduce a Rule Execution Logger scoped to a rule instance. For use in rule executors.
- Add test coverage.

### Checklist

Delete any items that are not applicable to this PR.

- [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-11-01 14:40:14 +01:00
Josh Dover 46bfe577c5
Remove unused isNewInstance code (#116747) 2021-11-01 12:57:32 +00:00
James Gowdy c9ccfad32e
[ML] Renaming index patterns for job wizards (#116250)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-11-01 12:50:21 +00:00
Esteban Beltran 602e15d8dd
[Security Solution] Show searchbar when a search doesn't return results in Host isolation exceptions. (#116767) 2021-11-01 12:49:52 +00:00
Christos Nasikas e35999134b
[Actions][Docs] Rename isLegacy to usesTableApi (#116922) 2021-11-01 14:49:35 +02:00
Joe Reuter b8ebccf67a
retry specific metric suggestion check (#116909)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-11-01 13:48:12 +01:00
Giorgos Bamparopoulos ab092300f6
Add API tests for dependencies metadata (#116648)
* Add API tests for dependencies metadata

* Rename metadata tests to event metadata

Co-authored-by: Nathan L Smith <nathan.smith@elastic.co>
2021-11-01 12:40:09 +00:00
Ashokaditya 8fd02151e9
[Security Solution][Endpoint] Add tests for pending status API changes (#115998)
* add tests for pending status api changes

related to elastic/kibana/pull/115441

refs elastic/security-team/issues/1705

* update mock

refs elastic/kibana/pull/116214

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-11-01 11:56:07 +01:00
Christos Nasikas 2f55e68d02
[Cases] Do not show deprecated callout on deleted connectors (#116615)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-11-01 10:36:53 +02:00
Thomas Watson 8a39a113a0
Finalize removal of legacy audit logger (#116282) 2021-10-30 22:33:37 +01:00
Vadim Yakhin a7fd3deb73
[Workplace Search] Fix early sources logic unmounting (#113023)
* Fix error appearing if user leaves Sources page very quickly

The issue was that the response from /sources endpoint could came after the user has left the page.
Since the user has already left the page, the Sources logic is unmounted,
and any code that was using the response couldn't update the value in that logic file and caused an error.

Fortunately Kea provides a `breakpoint` API exactly for such cases:
https://kea.js.org/docs/guide/additional#breakpoints

This commit uses that API to fix the issue.

* Fix error appearing after leaving Sources page less quickly

This commit solves the same problem, but for the /status endpoint:
1) for the first status call that saves server values to the sources_logic
2) for the subsequent status calls that poll the server for the status updates

* Increase test coverage

The new test duplicates the test below it, but it doesn't set up
initial source statuses. For some reason this case was considered to be covered before,
but after seemingly unrelated changes in this PR, the coverage started to show that this
code branch was missed.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-30 20:48:18 +01:00
Walter Rafelsberger 2cfcb8caf9
[ML] Fix y axis ticks. (#116670)
Fixes the y axis ticks for chart variants where the maximum transaction count for overall buckets is only 1.
2021-10-30 14:51:55 +00:00
Caroline Horn 151968be4f
[Dev Tools] Design fixes for theme v8 (#116236)
* Fixed icon buttons in Console
* Quick cleanup of tabs and panels
2021-10-30 09:34:22 +00:00
Frank Hassanabad eaedb7863d
Follow up (#116860)
## Summary

One line follow up from #116490 from @dhurley14 here: https://github.com/elastic/kibana/pull/116490#discussion_r739314768


### 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-10-29 23:39:36 -06:00
Tyler Smalley ea62dd04af
[ci] Temporarily stop writing to Bazel remote cache (#116866)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2021-10-29 21:06:26 -07:00
Devin W. Hurley 6817a02e0d
[Security Solution] [Platform] Fix critical bug when migrating action within update route (#116512)
* WIP - need to figure out how to delete old siem-detection action SO's after each test

* WIP - adds some fixes for the update rules utility that differ from patch rules utility

* fix type checks

* cleanup

* remove commented out code

* rename const to use capital snake case

* naming integration tests, adds expect for disabled rules that get migrated, adds expect for pre-migrated rules
2021-10-29 22:05:55 -04:00
Frank Hassanabad 57899a2f68
Removes isUuid and tests as they're not used anymore (#116848)
## Summary

Removes isUuid and tests as they're not used anymore

### Checklist

Delete any items that are not applicable to this PR.
- [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-10-29 19:33:59 -06:00
Spencer 2797fab000
[kbn/optimizer] dll @babel/runtime modules used by entry bundles (#113453)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-10-29 18:08:20 -05:00
Esteban Beltran 107661129d
[Security Solution] Use useEndpointPrivileges instead of checking the license directly (#116142)
* Use useEndpointPrivileges instead of checking the license directly

* Use the correct privilege key

* rename variable

* Skips flaky test

* Remove skip

* Remove extra dependency

* Add back entries check

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-30 00:01:48 +01:00
Frank Hassanabad 347c138bc0
Fixes flake seen on CI by sorting the results (#116846)
## Summary

Sorting fix for flake test. Fixes: https://github.com/elastic/kibana/issues/116691

### 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-10-29 23:08:13 +01:00
Luke Elmers 1d6b60954b
[saved objects] Strip version qualifier in SO service to fix unknown type deprecations. (#116480) 2021-10-29 22:23:48 +01:00
Esteban Beltran 5afa164ab9
[Security Solution] Fix edit not working due to state management overwrite in Host isolation exceptions (#116676)
* Fix edit not working due to state management overwrite

* clear the form after a succesfull update

* Preserve order after editing and adding
2021-10-29 23:01:14 +02:00
Cauê Marcondes 7130d6eb45
[APM] Api tests for Error distribution api (#116674)
* adding tests for error distribution

* addressing pr changes

* addressing pr comments

* fixing ts issues
2021-10-29 21:57:08 +01:00
Andrea Del Rio f32c334ad2
[Controls] Post integration design cleanup (#116511) 2021-10-29 13:52:39 -07:00
Zacqary Adam Xeper 285cd009a5
Revert "[Metrics UI] Fix OR logic on redundant groupBy detection (#116695)" (#116820)
This reverts commit c0d005db62.
2021-10-29 16:48:15 -04:00
Zacqary Adam Xeper 4712c10f84
Revert "[Logs UI][Metrics UI] Remove deprecated config fields from APIs and SavedObjects (#115874)" (#116819)
This reverts commit 6693ef371f.
2021-10-29 16:47:54 -04:00
Gil Raphaelli a0aee5b714
add the "UI" team label to APM project issues (#116844) 2021-10-29 16:32:36 -04:00
Ece Özalp f65485f997
[SecuritySolution][CTI] Fix preview matrix histogram query (#116328)
* [SecuritySolution][CTI] Fix preview matrix histogram query

* fixes mock

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-29 16:21:14 -04:00
Frank Hassanabad 023d668e13
[Security Solutions] Adds e2e tests for the legacy notification system (#116531)
## Summary

Adds e2e tests for the legacy notification system for:
* Exporting rules
* Reading rules
* Finding rules

Also adds missing e2e tests for the non-legacy actions where they previously did not have e2e tests.

These tests ensure that the legacy notifications system will run for a while.

- [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-10-29 14:02:52 -06:00
Brian Seeders 19f4b6801f
Revert "add the "UI" team label to APM project issues (#116710)"
This reverts commit dc7410edbe.
2021-10-29 15:57:31 -04:00
Gil Raphaelli dc7410edbe
add the "UI" team label to APM project issues (#116710) 2021-10-29 15:56:32 -04:00
Chris Donaher 478d138c32
Send Endpoint Alert _id field up as insights docs track that on status changes (#116687)
* Send Endpoint Alert _id field up as insights docs track that on status changes

* Added test to make sure top-level underscore-prefixed fields are allowed

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-29 13:47:31 -06:00
Marshall Main b59b132ff4
Remove validation requiring action id to be UUID (#116524)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-29 15:26:06 -04:00
Nathan Reese ee61368cff
[Maps] fix data-mapping switch enabled for vector tiles (#116366)
* clean up IField API

* disable switch when using MVTs for es docs

* clean up interface comment style

* implement supportsFieldMetaFromEs and supportsFieldMetaFromLocalData in all Field classes

* fix dynamic_color_property test

* fix jest tests

* mock getRangeFieldMeta instead of passing in VectorLayerMock with MockStyle

* review feedback

* clean up supportsFieldMetaFromLocalData test

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-29 12:47:58 -06:00
Paul Tavares d284d65ad4
[Security Solution][Endpoint] Fix and un-skip Jest UT for Policy Details remove trusted app modal (#116492)
* increase update API response delay
2021-10-29 14:46:30 -04:00
Paul Tavares ea1c3f2a09
Fix skipped test to be more robust in matching relative dates (#116474)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-29 14:40:35 -04:00