Commit graph

40970 commits

Author SHA1 Message Date
Kibana Machine
338e7183e5
[Security Solutions] Hopefully reduces Cypress flake with timeline notes (#99299) (#99301)
## 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

Co-authored-by: Frank Hassanabad <frank.hassanabad@elastic.co>
2021-05-05 00:04:51 -04:00
Kibana Machine
135292ff6d
Add ML rule API integration tests and test for removing action (#98100) (#99275)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Marshall Main <55718608+marshallmain@users.noreply.github.com>
2021-05-05 02:01:56 +00:00
Kibana Machine
5040c61428
[Security Solutions][Lists] (Phase 1) Pulls constants from lists and security solutions plugin into its own kbn package (#99149) (#99298)
## 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

Co-authored-by: Frank Hassanabad <frank.hassanabad@elastic.co>
2021-05-04 21:42:25 -04:00
Kibana Machine
2c08ac4bda
[CI] Always set checkoutInfo after git checkout (#99265) (#99296)
Co-authored-by: Brian Seeders <brian.seeders@elastic.co>
2021-05-04 21:16:31 -04:00
Kibana Machine
a990ac0572
[Fleet] Hide enrollment token for hosted policies (#99253) (#99286)
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>

Co-authored-by: John Schulz <john.schulz@elastic.co>
2021-05-05 00:34:56 +00:00
Kibana Machine
286f494f8a
[Fleet] Fix frozen key definition (#99232) (#99288)
* [Fleet] Fix frozen key definition

* Add integration test for frozen vars

Co-authored-by: Zacqary Adam Xeper <Zacqary@users.noreply.github.com>
2021-05-04 20:33:31 -04:00
Kibana Machine
585116ac1b
[Fleet] Add default http|https port to ES hosts (#99240) (#99283)
Co-authored-by: Nicolas Chaulet <nicolas.chaulet@elastic.co>
2021-05-04 20:08:18 -04:00
Kibana Machine
42dd7b2f32
[Enterprise Search] Add callouts on product selector for license and trial status (#99122) (#99280)
* 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>

Co-authored-by: Scotty Bollinger <scotty.bollinger@elastic.co>
Co-authored-by: Constance <constancecchen@users.noreply.github.com>
2021-05-04 20:04:22 -04:00
Kibana Machine
9c38f97a07
chore(NA): moving @kbn/config into bazel (#99199) (#99279)
Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
2021-05-04 20:00:48 -04:00
gchaps
d3ba8ec5aa
[DOCS] Fixes error in examples for migrating plugin code (#99261) (#99290)
* [DOCS] Fixes error in examples for migrating plugin code

* [DOCS] Fixes error in docs update
2021-05-04 16:49:06 -07:00
Kibana Machine
30877bd018
[Security Solutions] (Phase 1) Initial checkin with kbn package security-utils added (#99151) (#99276)
## 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

Co-authored-by: Frank Hassanabad <frank.hassanabad@elastic.co>
2021-05-04 19:38:43 -04:00
Chris Cowan
518827dc50
[Stack Monitoring] Limit alert creation to allowed spaces (#99128) (#99273)
* [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>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-04 19:25:34 -04:00
Kibana Machine
37210e8924
[Maps] Cleanup typing (#99136) (#99271)
Co-authored-by: Thomas Neirynck <thomas@elastic.co>
2021-05-04 19:13:29 -04:00
Sandra Gonzales
e9485b1dd1
[Metrics UI] Don't render node if group width is 0 or NaN (#98980) (#99263)
* don't render nodes if squareSize is NaN

* check group.width instead of squareSize

* fix react warning
2021-05-04 18:41:29 -04:00
Kibana Machine
964ed51e02
adding test for deep links (#99230) (#99255)
Co-authored-by: Cauê Marcondes <55978943+cauemarcondes@users.noreply.github.com>
2021-05-04 17:55:04 -04:00
Nicolas Chaulet
822bed89ee
[Fleet] Fix fleet server host port during settings creation (#99084) (#99250) 2021-05-04 17:37:47 -04:00
Kibana Machine
635fc69af3
[Security Solutions] (Phase 1) Copies io-ts shared utilities into kibana/packages (#98999) (#99246)
## 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

Co-authored-by: Frank Hassanabad <frank.hassanabad@elastic.co>
2021-05-04 17:17:34 -04:00
Kibana Machine
0b58268c8b
upload artifact when building building Kibana to verify ES (#99254) (#99268)
Co-authored-by: spalger <spalger@users.noreply.github.com>

Co-authored-by: Spencer <email@spalger.com>
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-05-04 14:03:53 -07:00
Chris Cowan
bdd3768aef
[Metrics UI] Use the normalized field for CPU usage for Observability Overview (#98995) (#99235)
* [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>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-04 15:56:23 -04:00
Kibana Machine
187d24b929
[APM] e2e tests (#99098) (#99231)
* adding e2e tests

* adding e2e tests

* adding e2e tests

* fixing ci

* fixing ci

* fixing e2e and jest

Co-authored-by: Cauê Marcondes <55978943+cauemarcondes@users.noreply.github.com>
2021-05-04 15:00:32 -04:00
Kibana Machine
078f3e0492
[Alerting] Handling connectors with missing secrets during rule creation and action execution (#98618) (#99226)
* [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>

Co-authored-by: ymao1 <ying.mao@elastic.co>
Co-authored-by: Yuliia Naumenko <yuliia.naumenko@elastic.com>
2021-05-04 18:30:47 +00:00
Sandra Gonzales
0da1d6b27e
update es archive data to not include metrics data (#98495) (#99221)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-04 14:13:54 -04:00
Yulia Čech
354bcf4f8b
[Remote clusters] Migrate to new ES client (#98747) (#99220)
* 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>

Co-authored-by: Jean-Louis Leysens <jloleysens@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-04 14:05:49 -04:00
Kibana Machine
87824da13d
[ML] Transforms: Fix handling of fields with keyword mapping available (#98882) (#99210)
- 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.

Co-authored-by: Walter Rafelsberger <walter@elastic.co>
2021-05-04 12:20:48 -04:00
Thomas Neirynck
9ab674bc34
[Maps][Alerts] Do not show error when re-opening alert (#98930) (#99206) 2021-05-04 11:53:22 -04:00
Maja Grubic
d90726d385
[Discover] Request docvalue fields from fields (#98874) (#99204)
* [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>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-04 11:48:44 -04:00
Paul Tavares
bba0282bd4
[Security Solution][Endpoint] Display list of Endpoint Event Filters (#98675) (#99202)
* 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 11:45:50 -04:00
Jean-Louis Leysens
4d33837efa
[Inspector] Fix requests JSON editor height on Safari (#99032) (#99196)
* fix code editor height on safari

* move style to appropriate file

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-04 10:52:59 -04:00
Jason Rhodes
9a5efa6275
Fixes assignment v comparison and null type check in metrics detail page (#95102) (#99195)
* 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>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-04 10:50:17 -04:00
Kibana Machine
705c9eca67
Pin underscore version to ^1.13.1. (#99170) (#99188)
Co-authored-by: Aleh Zasypkin <aleh.zasypkin@gmail.com>
2021-05-04 13:57:08 +00:00
Alejandro Fernández Haro
9ad99c32f3
[API DOCS] Usage Collection (#98656) (#99186)
# Conflicts:
#	api_docs/usage_collection.json
#	api_docs/usage_collection.mdx
2021-05-04 09:42:47 -04:00
Anton Dosov
c895c099c4
[Search Sessions] Fix display of expired session state in management (#98915) (#99178) 2021-05-04 07:55:14 -04:00
Kibana Machine
e93852a4e1
[7.x] Use PiT for outdated document search (#98797) (#99176)
* 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

* skip test

Co-authored-by: Mikhail Shustov <restrry@gmail.com>
2021-05-04 11:51:57 +00:00
Kibana Machine
48647ed378
[Lens] Avoid to have fieldless operations by restored last valid state (#98588) (#99173)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>
2021-05-04 07:25:55 -04:00
Kibana Machine
1228da7fb4
[Metrics UI] Don't mount AlertFlyout and NodeContextPopover when they aren't visible (#99039) (#99168)
Co-authored-by: Ester Martí Vilaseca <ester.martivilaseca@elastic.co>
2021-05-04 06:49:03 -04:00
Anton Dosov
280b300d01
[Search Sessions] Fix search sessions docs link (#98918) (#99166) 2021-05-04 06:41:03 -04:00
Kibana Machine
9da5c47075
[Search] use core's sha256, fix cached search abort bug (#98720) (#99162)
* 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>

Co-authored-by: Liza Katz <lizka.k@gmail.com>
Co-authored-by: Anton Dosov <anton.dosov@elastic.co>
2021-05-04 05:32:58 -04:00
Gloria Hornero
d95246a253
[Security Solution] adds 'Alert details with unmapped fields' test (#98800) (#99158)
* adds 'Alert details with unmapped fields' test

* fixes test

* improvements

* fixes

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

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

* bringing back unmapped field timeline

* add unit test
2021-05-04 02:27:21 -04:00
Kibana Machine
efdfce6bb9
Observability alerting flyout and page layout improvements (#99103) (#99152)
* 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.

Co-authored-by: Nathan L Smith <nathan.smith@elastic.co>
2021-05-03 23:47:22 -04:00
Kibana Machine
f83422e497
[Enterprise Search] Refactor shared SchemaErrorsAccordion component (#99069) (#99142)
* 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

Co-authored-by: Constance <constancecchen@users.noreply.github.com>
2021-05-03 21:18:44 -04:00
Kibana Machine
96fc5c7793
[Bug] Fix saved query parsing (#99014) (#99140)
* Fix saved query parsing

* handle null string

Co-authored-by: Liza Katz <lizka.k@gmail.com>
2021-05-03 20:53:25 -04:00
Aaron Caldwell
9564c851e4
[Maps][File upload] Add validation check that ensure index name has been provided (#99118) (#99138) 2021-05-03 20:38:28 -04:00
Tiago Costa
d779fa460e
chore(NA): moving @kbn/analytics into bazel (#98917) (#99134)
* chore(NA): moving @kbn/analytics into bazel

* chore(NA): fix type check for package migration

* chore(NA): fix type check for package migration

* chore(NA): fix type check for package migration

* chore(NA): separate type generating from server code

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
# Conflicts:
#	packages/kbn-analytics/scripts/build.js
2021-05-03 19:44:07 -04:00
Kibana Machine
2ae368beee
[Alerting][Docs] Adding query to identify long running rules to docs (#98773) (#99141)
* 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

Co-authored-by: ymao1 <ying.mao@elastic.co>
2021-05-03 16:28:48 -07:00
Kibana Machine
6d695105e3
[Enterprise Search] Refactor shared SchemaAddFieldModal component (#99096) (#99133)
* Move SchemaAddFieldModal to its own folder

+ misc test cleanup - remove unnecessary jest.spyOn in individual tests, it's already in the beforeEach

* i18n fixes

- Move constants to subfolder
- Fix various i18n IDs/var names - modal titles is not a fieldNote title
- Fix an i18n string that should be a FormattedMessage (could have grammar issues otherwise)
- Add missing i18n strings - labels (shared, AS will also use these as column headers) & placeholder
- Import order

* Move formatFieldName util to its own file

- simplify leading/trailing trimming regex
- add unit tests - primarily for documenting regexes & providing examples

* Refactor modal form submission

- See https://elastic.github.io/eui/#/layout/modal#forms-in-a-modal for documentation - form should be submitted via ID & EuiModalFooter form={id}

* Misc props cleanup

- Move optional props to bottom of type list
- Remove unnecessary props (default EUI behavior)
- Data test subj cleanup
- Add missing `disabled` passed prop, add unit test for disableForm prop

Co-authored-by: Constance <constancecchen@users.noreply.github.com>
2021-05-03 23:26:16 +00:00
Aaron Caldwell
89164bf980
Fix malformed geo alerts call to transformResults (#98094) (#99131)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-03 19:26:06 -04:00
Yara Tercero
0c4ad87b36
[Security Solution][Timeline] - update flakey timeline cypress tests (#99097) (#99123)
###Summary

Removes some anti-patterns I introduced in my last PR and makes use of Cypress' chainable pattern that will hopefully help with the flakiness.
2021-05-03 18:31:51 -04:00
Jonathan Budzenski
7856951e1a [docs/build] Update build dependencies list (#98545)
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-03 17:06:27 -05:00
CJ Cenizal
581743a7f0
Reintroduce 96111: Provide guidance of "Custom" allocation behavior in ILM (#99007) (#99106) 2021-05-03 15:05:04 -07:00