Commit graph

42727 commits

Author SHA1 Message Date
Vadim Dalecky b2df82f0a9
Close drill manager flyout on application change (#99026)
* fix: 🐛 close drilldown create flyout on app change

* fix: 🐛 close drill edit flyout on navigation to diff app

* test: 💍 fix test mocks after refactor
2021-05-05 10:18:14 +02:00
Xavier Mouligneau 5de608cad8
[SECURITY SOLUTION] Get case ids from alert ids (#98702)
* wip to get caseIds with alertId

* make work the API with the latest aggs from SO :)

* review

* change logic to re-do aggregation if we think that we are missing data

* Integration tests

Co-authored-by: Jonathan Buttner <jonathan.buttner@elastic.co>
2021-05-05 07:55:13 +02:00
Frank Hassanabad 669be33792
[Security Solutions] Hopefully reduces Cypress flake with timeline notes (#99299)
## Summary

Hopefully reduces flake within cypress timeline notes.
* Removed additional notes about issues with the timelineid. I don't think that's a problem anymore now that I removed the assertion issue.
* Removed the pipe since the timeline click can cause multiple async URL actions to occur which will cause indeterminism.
* I added a visibility check to Cypress for the timeline link to be visible on the screen before we try to click on it which should hopefully give us enough breathing room for the click handler to be added.
* Added a query that returns no results as that can cause "UI blocking" since the UI loading for timeline takes a while. The "UI blocking" could be causing issues with clicks, but at the very least this speeds up the test and removes one more thing to worry about if this fails again.

- [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
2021-05-04 20:08:14 -06:00
Frank Hassanabad 366c16c1cd
[Security Solutions][Lists] (Phase 1) Pulls constants from lists and security solutions plugin into its own kbn package (#99149)
## Summary

Pulls constants from lists plugin into its own kbn package.

Phase 1: Lift and shift small shared constants into kbn package called `kbn-securitysolution-constants`
Phase 2: Deprecate existing code now in packages
Phase 3+: Strangle/remove existing code and use the code from the kbn package
2021-05-04 17:48:16 -06:00
Brian Seeders 6dab2f157c
[CI] Always set checkoutInfo after git checkout (#99265) 2021-05-04 16:21:37 -07:00
Frank Hassanabad 92da1059bd
Added deprecation to all the io-ts types and copies of them (#99260)
## Summary

Adds deprecation to all the io-ts types and copies of them found in the code base.

Phase 1 (Completed): Copy all the utilities to the `packages/kbn-securitysolution-io-ts-utils`
Phase 2: Add all the deprecation messages about them to the code base
Phase 3+: Teams and others will eventually remove/replace them with the utils from `kbn-securitysolution-io-ts-utils`
2021-05-04 17:00:45 -06:00
John Schulz 09d81cfd81
[Fleet] Hide enrollment token for hosted policies (#99253)
closes #98886

## Hide hosted policy names from select menu
per https://github.com/elastic/kibana/issues/98886#issuecomment-830270965

<details><summary>Screenshots</summary>

<h3><code>master</code></h3>
<img width="1313" alt="Screen Shot 2021-05-04 at 2 22 54 PM" src="https://user-images.githubusercontent.com/57655/117060152-9c55e180-acee-11eb-97d0-5cab98436dd6.png">

<h3>PR</h3>
    <img width="1071" alt="Screen Shot 2021-05-04 at 3 25 13 PM" src="https://user-images.githubusercontent.com/57655/117059705-15a10480-acee-11eb-871c-fe1aaad7db75.png">

</details>

## Don't show enrollment keys in table if they are for a hosted policy
per https://github.com/elastic/kibana/issues/98886#issuecomment-831099524

<details><summary>Screenshots</summary>

<h3><code>master</code></h3>
<img width="1150" alt="Screen Shot 2021-05-04 at 3 40 02 PM" src="https://user-images.githubusercontent.com/57655/117060639-1be3b080-acef-11eb-95e4-33a212454608.png">

<h3>PR</h3>
<img width="1074" alt="Screen Shot 2021-05-04 at 3 07 52 PM" src="https://user-images.githubusercontent.com/57655/117060427-eb9c1200-acee-11eb-973f-273b05a27547.png">

</details>
2021-05-04 18:36:06 -04:00
Zacqary Adam Xeper a72b0393f3
[Fleet] Fix frozen key definition (#99232)
* [Fleet] Fix frozen key definition

* Add integration test for frozen vars
2021-05-04 17:24:11 -05:00
Nicolas Chaulet ed8dc62f77
[Fleet] Add default http|https port to ES hosts (#99240) 2021-05-04 18:13:06 -04:00
Scotty Bollinger 3e54390293
[Enterprise Search] Add callouts on product selector for license and trial status (#99122)
* Add isTrial selector to LicensingLogic

* Add LicenseCallout component

In order to match the existing design, I opted to use an extra EuiFlexItem for the gap between the button, instead of adding a stylesheet with padding, like the legacy version had. Verified it looks good on mobile as well.

* Add TrialCallout component

* Wire up new callouts

- Only render when the host is set, otherwise, fall back to the Setup Guide callout
- Add some extra padding with a larger spacer to beter match legacy UI

* Refactor for a better test

* Use isEmptyRender API instead of checking for length

Co-authored-by: Constance <constancecchen@users.noreply.github.com>

* DRY out callout heading

* Remove grow prop to align button to right

* Update button copy

* Replace EuiButton with EuiButtonTo

* Remove EuiText wrapper on link text

* Better test organization

* Remove unnecessarydivs

Co-authored-by: Constance <constancecchen@users.noreply.github.com>

* Refactor i18n for link

Also changes link style to underline

* Center-align trial callout

* Rename i18n ID

Co-authored-by: Constance <constancecchen@users.noreply.github.com>

* Add back and rename translations

Co-authored-by: Constance <constancecchen@users.noreply.github.com>
2021-05-04 18:05:44 -04:00
Tiago Costa d6b41ff7bf
chore(NA): moving @kbn/config into bazel (#99199) 2021-05-04 23:04:55 +01:00
Frank Hassanabad 08d7e1c723
[Security Solutions] (Phase 1) Initial checkin with kbn package security-utils added (#99151)
## Summary

Good place for one off utils to use and reduce/remove the circular deps we have between security_solutions, lists, and anywhere else we have them for different utils.

Phase 1: Adds kbn package of `kbn-securitysolution-utils` through lift and shift
Phase 2: Deprecated the functions
Phase 3: Removes the functions in favor of using the `kbn-securitysolution-utils`
Phase 4+: Adds more and removes dependencies/copies across plugins within the security solution. Maybe we break things out by domain later as this grows in size.

- [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
2021-05-04 15:43:37 -06:00
Marshall Main 29e48b8655
Add ML rule API integration tests and test for removing action (#98100)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-04 17:42:41 -04:00
gchaps ebc5b90123
[DOCS] Fixes error in examples for migrating plugin code (#99261)
* [DOCS] Fixes error in examples for migrating plugin code

* [DOCS] Fixes error in docs update
2021-05-04 14:36:51 -07:00
Chris Cowan 0b9c9b7039
[Stack Monitoring] Limit alert creation to allowed spaces (#99128)
* [Stack Monitoring] Limit alert creation to allowed spaces

* Fixing type issue

* Fixing snapshot for test

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-04 14:26:05 -07:00
Thomas Neirynck 1c8cb285c1
[Maps] Cleanup typing (#99136) 2021-05-04 17:12:34 -04:00
Sandra Gonzales f2693edddc
[Metrics UI] Don't render node if group width is 0 or NaN (#98980)
* don't render nodes if squareSize is NaN

* check group.width instead of squareSize

* fix react warning
2021-05-04 16:47:55 -04:00
Ryland Herrick 6130f16a6e
[Security Solution] Updates Beats fields metadata (#97719)
* Make script dynamic on our BEATS_VERSION constant

* Update hardcoded file path in script

* Update fields with 7.12.0 beats

* Update BEATS_VERSION to reflect what's been captured thus far

I simply neglected to commit this change previously

* Update unit test implicitly testing field descriptions

The fields under test here had a minor grammatical change.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-04 15:43:11 -05:00
Spencer eba699c23a
upload artifact when building building Kibana to verify ES (#99254)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-05-04 13:37:34 -07:00
Cauê Marcondes dd318e1a4e
adding test for deep links (#99230) 2021-05-04 15:58:45 -04:00
Frank Hassanabad bcde9e2b15
[Security Solutions] (Phase 1) Copies io-ts shared utilities into kibana/packages (#98999)
## Summary

We are removing duplicated code in sections of plugins into the kibana/packages folder. This is phase 1 of 4+ where:

Phase 1: Lift and shift the io-ts code into `kibana/packages/kbn-securitysolution-io-ts-utils`
Phase 2: Deprecate the utils across plugins any copied code
Phase 3: Replace the deprecated types with the ones in here where we can. [Strangle pattern](https://martinfowler.com/bliki/StranglerFigApplication.html)
Phase 4+: (potentially) consolidating any duplication or everything altogether with the `kbn-io-ts-utils` project

### Checklist

- [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
2021-05-04 13:19:10 -06:00
Spencer 9e2e8b9f19
[ftr/esArchiver] disable geo_shape field of maps saved objects in archives (#99119)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-04 10:36:28 -07:00
Cauê Marcondes b8ba6eaa81
[APM] e2e tests (#99098)
* adding e2e tests

* adding e2e tests

* adding e2e tests

* fixing ci

* fixing ci

* fixing e2e and jest
2021-05-04 13:05:52 -04:00
ymao1 a17d26132a
[Alerting] Handling connectors with missing secrets during rule creation and action execution (#98618)
* [Connectors][API] Updated connectors with enabledAfterImport flag

* fixed functional tests

* added new field to connectors API docs

* added update unit test

* fixed test

* renamed enableAfterImport to isMissingSecrets

* removed onExport

* revert the logic of true/false for isMissingSecrets

* fixed test

* fixed tests

* added unit test

* fixed docs

* fixed import text and button labels

* fixed import text

* fixed text

* Showing placeholder message when connector is missing secrets

* Throwing error on isMissingSecrets = true before executing actions

* Hiding connectors with missing secrets from dropdown

* Checking for connectors with missing secrets during action validation on rule creation/update

* Updating error wording

Co-authored-by: Yuliia Naumenko <yuliia.naumenko@elastic.com>
2021-05-04 12:32:30 -04:00
Sandra Gonzales 886295fc09
update es archive data to not include metrics data (#98495)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-04 12:09:38 -04:00
Jean-Louis Leysens 27e3657b6f
[Remote clusters] Migrate to new ES client (#98747)
* migrate add cluster route and jest tests

* migrated delete remote clusters route

* migrated the get route

* migrated the update route

* added shared types file

* reduce some test boilerplate

* fix type issues introduced by new types from ES client

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-04 18:05:09 +02:00
Chris Cowan 83fd34d41c
[Metrics UI] Use the normalized field for CPU usage for Observability Overview (#98995)
* [Metrics UI] Use the noramlized field for CPU usage for Observability Overview

* fixing overview page as well

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-04 07:40:56 -07:00
Walter Rafelsberger dfcb1794d4
[ML] Transforms: Fix handling of fields with keyword mapping available (#98882)
- For groupby/agg configs, removes the .keyword postfix for the agg name and field name being displayed. The config itself will still use the field name including .keyword.
- For histogram charts, if available, query data using the .keyword field. This enables support for charts for terms when there's both a text and keyword variant.
- Fixes isKeywordDuplicate check for field names with multiple dots in them.
2021-05-04 16:21:27 +02:00
Maja Grubic bc352c033c
[Discover] Request docvalue fields from fields (#98874)
* [Discover] Request docvalue fields from fields

* [Discover] Mimic search source behavior when requesting docvalue fields

* Make typescript play nicely

* Fix failing unit test

* Replace ts-ignore with ts-expect error

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-04 14:56:07 +01:00
Paul Tavares b770a64d67
[Security Solution][Endpoint] Display list of Endpoint Event Filters (#98675)
* PaginatedContent: Show pagination only if we have items
* Updated trusted apps and event filters about info displayed in page title
* Include Add button on page header if entries exist
* EventFilters: Show items using the ExceptionItem component
* Enhance ExceptionItem Card so that optionally we can show Name as well as Modified information on the card
* new set of builders for async resources
* Fix circular dependency causing tests to fail - moved function from inside of `pages/index.tsx`
  (used by outside component that is `import`ed by this same pageto a common pace. Error was:

```
Cannot create styled-component for component: undefined.
```
2021-05-04 09:49:48 -04:00
Thomas Neirynck 55f22da592
[Maps][Alerts] Do not show error when re-opening alert (#98930) 2021-05-04 09:43:36 -04:00
Tiago Costa 9a6c774a3c
skip flaky suite (#98562) 2021-05-04 13:58:31 +01:00
Jean-Louis Leysens 921943c41a
[Inspector] Fix requests JSON editor height on Safari (#99032)
* fix code editor height on safari

* move style to appropriate file

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-04 14:33:16 +02:00
Aleh Zasypkin 5ca77de98e
Pin underscore version to ^1.13.1. (#99170) 2021-05-04 13:56:46 +02:00
Dominique Clarke 16b4f7176d
[Uptime][Synthetics] fleet managed monitor telemetry (#97502)
* add fleet monitor telemetry

* add changes to telemetry json file

* add functional tests

* document telemetry fields

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-04 07:48:43 -04:00
Alejandro Fernández Haro 6d22f6f552
[API DOCS] Usage Collection (#98656) 2021-05-04 12:32:11 +01:00
Anton Dosov 6fb2b4ad83
[Search Sessions] Fix display of expired session state in management (#98915) 2021-05-04 12:02:17 +02:00
Mikhail Shustov c815e4cd9b
Use PiT for outdated document search (#98797)
* use PiT for OUTDATED_DOCUEMENT_SEARCH step

* update tests

* fix typo

* fix so migrations unit tests

* TEMP: use wait_for when transformin docs

* add a step to refresh target index if transformed outdated docs

* add unit tests

* refresh before searching outdated docs

* add integration test for outdated docs migration

* add a step to refresh target index if transformed outdated docs

* make query required

* address comments
2021-05-04 05:53:43 -04:00
Marco Liberati d03176e1c3
[Lens] Avoid to have fieldless operations by restored last valid state (#98588)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-04 11:25:16 +02:00
Ester Martí Vilaseca 8426024f6e
[Metrics UI] Don't mount AlertFlyout and NodeContextPopover when they aren't visible (#99039) 2021-05-04 10:50:12 +02:00
Anton Dosov fda2ad4575
[Search Sessions] Fix search sessions docs link (#98918) 2021-05-04 10:46:45 +02:00
Matthias Wilhelm a67f011212
[Discover] Fix horizontal scrolling of legacy table (#98770)
* Add CSS class to fix scrolling of legacy table

* Add functional test
2021-05-04 10:18:44 +02:00
Liza Katz a2c13a76b6
[Search] use core's sha256, fix cached search abort bug (#98720)
* use core's sha256

* fix bug with aborting first request

* fix types

Co-authored-by: Anton Dosov <anton.dosov@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-04 10:35:47 +03:00
Jason Rhodes 7ede7a8eca
Fixes assignment v comparison and null type check in metrics detail page (#95102)
* Fixes assignment v comparison and null type check in metrics detail page

* Updated docs to specify new optional TS generic

* Switches new generic to extending the interface

* Removes previously added core generic type and defaults to unknown

* Reverts unknown change, saves for later

* Reverts unknown/any change for now

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-04 02:23:54 -04:00
Gloria Hornero 218abe41fe
[Security Solution] adds 'Alert details with unmapped fields' test (#98800)
* adds 'Alert details with unmapped fields' test

* fixes test

* improvements

* fixes

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-04 08:00:36 +02:00
Xavier Mouligneau 8b8d4d83b6
[SECURITY SOLUTION] Fix unmapped field timeline (#99130)
* add unmapped include_unmapped

* bringing back unmapped field timeline

* add unit test
2021-05-04 00:02:38 -04:00
Nathan L Smith f736df990c
Observability alerting flyout and page layout improvements (#99103)
* Make the flyout `s` instead of `m` size
* Remove flyout tabs
* Make flyout description list `compressed`
* Make spacer before description list `s` size
* Use `EuiPageTemplate` on alerts and cases pages.
2021-05-03 20:53:33 -05:00
Constance 992ff93a6e
[Enterprise Search] Refactor shared SchemaErrorsAccordion component (#99069)
* Move SchemaErrorsAccordion to its own folder

+ give it its own export

* Move errors-specific copy to its own file

+ Capitalize ID heading

* [UI polish] Accordion header tweaks

- Fix responsive behavior
- Make Review button more accessible (a within a button is not semantically correct)
- Add <code> markup for field type

* [UI polish] CSS tweaks

- use OOTB EUI CSS classes for borders (see https://elastic.github.io/eui/#/layout/accordion#styled-for-forms)
- tweak spacing
- misc fixes

* [Code polish] Misc cleanup

- Simplify / DRY out props types
- Prefer unique IDs/names over map indexes for React keys
- Improve var names

* Simplify conditional "view" column + misc fixes

- Rename prop to match AS's generateSomePath helpers
- Remove need for itemId - AS should be able to generate its own URL route without it
- Fix accessibility for view column - should be totally hidden to screen readers if not present
- Fix semantics of view link - should be an <a> link not a button

* Update WS's use of SchemaErrorsAccordion
2021-05-03 19:24:52 -04:00
ymao1 582c6c7ae3
[Alerting][Docs] Adding query to identify long running rules to docs (#98773)
* Adding query to identify long running rules to docs

* Wording suggestsion from PR review

* Adding event.provider to query. Allowing copy to console

* Adding note for system privileges

* Adding runtime field to query

* Removing extra dollar sign

* PR fixes
2021-05-03 19:18:13 -04:00
Liza Katz 4d3499822d
[Bug] Fix saved query parsing (#99014)
* Fix saved query parsing

* handle null string
2021-05-04 01:58:06 +03:00