Commit graph

42690 commits

Author SHA1 Message Date
Larry Gregory c238a9708b
Use vega-interpreter to safely evaluate Vega expressions (#98832)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-05 10:46:50 -04:00
Tim Roes 792845fd75
Enable custom time ranges for saved searches (#99180)
* Enable custom time ranges for saved searches

* Add functional test

* Fix Typing

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-05 16:35:39 +02:00
Larry Gregory 656206cd2d
Load FLS suggestions on-demand (#98681)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-05 10:22:18 -04:00
Nathan Reese 9a3c508184
[file upload] use index exists API for /internal/file_upload/index_exists route (#98471)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-05 07:59:29 -06:00
Diana Derevyankina 86b688934a
[Vega] Supports runtime fields (#98707)
* [Vega] Support of Runtime Fields

* Refactor es_query_parser

* Refactor es_query_parser

* Remove unnecessary object creation

* Revert tests and move changes related to runtime fields into search_api

* Remove unnecessary code
2021-05-05 16:33:44 +03:00
Dmitry Tomashevich 203c40c945
[TSVB] Adds ignore DST switch for timeseries (#98484)
* [TSVB] add ignore DST switch

* [TSVB] move YesNo component to timeseries panel, get rid of getTimezone call

* [TSVB] reduce formatter creation number

* [TSVB] add usage EuFormRow, remove redundant translations

* [TSVB] use boolean instead of number

* [TSVB] use number for YesNo

* [TSVB] resolve YesNo value type

* [TSVB] replace number with boolean

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-05 16:32:55 +03:00
Ashokaditya 7f57eb39a6
Update agent status labels and colors (#99314)
fixes elastic/kibana/issues/97457
2021-05-05 14:49:49 +02:00
Mikhail Shustov 2eb700be92
do not crash when es client throws any type of error (#99175) 2021-05-05 14:39:55 +02:00
igoristic 47cebf0ee1
Merged local branch (#99157) 2021-05-05 08:34:40 -04:00
David Sánchez 02608696ea
[Security Solution][Endpoint] Trusted apps search throws an error when searching special chars (#99185)
* Escapes special chars and backslashes and colons. Updates test.

* Uses regexp to escape all non alphanumeric chars

* Skips whitespaces

* Skips slashes
2021-05-05 14:25:56 +02:00
Dima Arnautov 5ce926b9f7
[ML] Support trained model aliases (#99174)
* [ML] use toString to make sure boolean values are rendered

* [ML] extract metadata

* [ML] retrieve pipelines associated with model alias

* [ML] fix ts issues

* [ML] functional tests

* [ML] remove unused models definitions
2021-05-05 07:34:07 -04:00
Yulia Čech 8ce3ea0238
[Remote clusters] Fixed skipped test for search bar (#97472)
* Fixed skipped search test

* Fixed eslint error

* Added setSearchBarValue helper to testbed and unskipped search tests in CCR

* Fixed eslint errors and added a comment to the setSearchBarValue method

* Added a mock for EuiSearchBox

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-05 13:05:35 +02:00
Tim Roes 349b7e9f8e
Add more strict eslint rules for discover (#99241) 2021-05-05 10:54:15 +02:00
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