Commit graph

47214 commits

Author SHA1 Message Date
Dario Gieselaar 3cfa21db39
[APM] generator: support error events and application metrics (#115311) 2021-10-18 07:44:30 -04:00
Anton Dosov c6be6c019c
[kibanaUtils] Don't import full semver client side (#114986) 2021-10-18 13:20:44 +02:00
Alejandro Fernández Gómez 27c7c6fd82
[RAC] Link inventory alerts to the right inventory view (#113553)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-18 06:19:57 -04:00
Shahzad d08f091d4a
[Uptime] Added uptime query inspector panel (#115170) 2021-10-18 10:35:02 +02:00
Patryk Kopyciński 411816c1c7
[Osquery] Add packs (#107345) 2021-10-18 09:55:07 +02:00
Orhan Toy 672b592b49
[App Search] Allow for query parameter to indicate ingestion mechanism for new engines (#115188) 2021-10-18 09:02:00 +02:00
Yuliia Naumenko 84df5697cc
[Alerting] Active alerts do not recover after re-enabling a rule (#111671)
* [Alerting] Active alerts do not recover after re-enabling a rule

* created reusable lib file for generating event log object

* comment fix

* fixed tests

* fixed tests

* fixed typecheck

* fixed due to comments

* Apply suggestions from code review

Co-authored-by: ymao1 <ying.mao@elastic.co>

* fixed due to comments

* fixed due to comments

* fixed due to comments

* fixed tests

* Update disable.ts

* Update disable.ts

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: ymao1 <ying.mao@elastic.co>
2021-10-17 20:07:48 -07:00
Jonathan Budzenski 63a615f1f1 skip flaky tests. #115308, #115313 2021-10-17 14:45:48 -05:00
Luke Elmers 94aa791a49
[Breaking] Remove deprecated enabled settings from plugins. (#113495) 2021-10-17 16:54:30 +01:00
Jonathan Budzenski fd3379d069 skip flaky suite. #107057 2021-10-17 09:47:08 -05:00
Jonathan Budzenski 06e66ca284 skip flaky tests. #89052, #113418, #115304 2021-10-16 22:33:29 -05:00
Jonathan Budzenski 845bcf85c1 skip flaky test. #113892 2021-10-16 20:43:07 -05:00
Jonathan Budzenski 7d66002da2
Bump node to 16.11.1 (#110684)
* Bump node to ^16

* fix comment

* use jest timers

* bump mock-fs

* Fix core type errors

* Unskipping tests that work on my machine

* skip new unhandled promise rejection

* Fix Nodejs v16 regression due to https://github.com/nodejs/node/issues/38924

* Fix failing concurrent connections collector test

* Fix types after merge from master

* update servicenow test

* Skip unhandledRejection tests

* Skip tests with unhandled promise rejection

* Fix discover jest failures

* bump node to 16.11.1

* revert timeout increase

* skip unhandled promise rejection

* rm jest import

* skip unhandled promise rejection

Co-authored-by: Rudolf Meijering <skaapgif@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Tim Roes <tim.roes@elastic.co>
2021-10-16 16:21:58 -05:00
Andrew Goldstein 16320cc249
[Security Solution] Restores Alerts table local storage persistence and the Remove Column action (#114742)
## [Security Solution] Restores Alerts table local storage persistence and the Remove Column action

This PR implements the following changes summarized below to address <https://github.com/elastic/kibana/issues/113090>, as proposed [here](https://github.com/elastic/kibana/issues/113090#issuecomment-935143690):

- Configures the `Columns` popover to be consistent with `Discover`
- Changes the `Hide column` action to `Remove column`, to be consistent with `Discover`
- Persists updates to the `Columns` popover order in `local storage`
- Restores the feature to persist column widths in `local storage`

### Configures the `Columns` popover to be consistent with `Discover`

- We now pass `false` to the `allowHide` [EuiDataGrid API](https://elastic.github.io/eui/#/tabular-content/data-grid):

![allow_hide](https://user-images.githubusercontent.com/4459398/136114714-02f25b97-86af-47e5-9adc-1177d5a2c715.png)

This makes all `EuiDataGrid`-based views in the Security Solution consistent with `Discover`'s use of the  `EuiDataGrid` `Columns` popover.

In `7.15`, the `Columns` popover includes the _hide column_ toggle, as shown in the screenshot below:

![alerts_columns_popover_7_15](https://user-images.githubusercontent.com/4459398/136112441-455ddbeb-dea3-4837-81ad-32d6c82c11fe.png)

_Above: The `Columns` popover in the `7.15` `Alerts` table_

The `Columns` popover in `Discover`'s `EuiDataGrid`-based table does not display the hide column toggle, as shown the screenshot below:

![columns_popover_discover](https://user-images.githubusercontent.com/4459398/136112856-7e42c822-2260-4759-ac78-5bea63a171c7.png)

_Above: The `EuiDataGrid` `Columns` popover in `Discover`, in `master`_

Passing `false` to the `allowHide` [EuiDataGrid API](https://elastic.github.io/eui/#/tabular-content/data-grid) API makes the `Columns` popover in all `EuiDataGrid`-based views in the Security Solution consistent with `Discover`, as illustrated by the screenshot below:

![alerts_columns_popover_no_hide](https://user-images.githubusercontent.com/4459398/136112980-d4219fbd-1443-4612-8cdb-b97bee8b97ef.png)

_Above: The `Columns` popover is now consistent with `Discover`_

## Changes the `Hide column` action to `Remove column`, to be consistent with `Discover`

- The `Hide column` action shown in the `7.15` alerts table is changed to `Remove column`, making it consistent with `Discover`'s use of `EuiDataGrid`

In `7.15`, the `Alerts` table has a `Hide column` action, as shown in the screenshot below:

![hide_column](https://user-images.githubusercontent.com/4459398/136115681-9e0da144-a981-4352-8092-9368d74cd153.png)

_Above: The `Hide Column` action in the `7.15` `Alerts` table_

In `7.15`, clicking the `Hide Column` action shown in the screenshot above hides the column, but does not remove it.

In `7.15`, columns may only be removed by un-checking them in the `Fields` browser, or by un-toggling them in the Alerts / Events details popover. Both of those methods require multiple clicks, and require uses to re-find the field in the modal or popover before it may be toggled for removal.

In `Discover`, users don't hide columns.

In `Discover`, users directly remove columns by clicking the `Remove column` action, shown in the screenshot below:

![discover_remove_column](https://user-images.githubusercontent.com/4459398/136114295-f018a561-f9ee-4ce4-a9c6-0fcd7f71e67b.png)

_Above: The `Remove column` action in `Discover`'s use of `EuiDataGrid` in `master`_

All `EuiDataGrid`-based views in the Security Solution were made consistent with `Discover` by replacing the `Hide column` action with `Remove column`, per the screenshot below:

![remove_column_after](https://user-images.githubusercontent.com/4459398/137047582-3c4d6cb0-ac12-4c50-9c34-0c4ef5536550.png)

_Above: The `Remove column` action in the Alerts table_

Note: the `Remove column` action shown above appears as the last item in the popover because it's specified via the `EuiDataGrid` `EuiDataGridColumnActions` > `additonal` API, which appends additonal actions to the end of popover, after the built-in actions:

![additional](https://user-images.githubusercontent.com/4459398/137047825-625002b3-5cd6-4b3e-87da-e76dbaf2a827.png)

## Persists updates to the `Columns` popover order in `local storage`

- Persist column order updates to `local storage` when users update the order of columns via the `Columns` popover

The following PR <https://github.com/elastic/kibana/pull/110685> restored partial support for persisting columns across page refreshes via `local storage`, but the Redux store was not updated when users sort columns via the `Columns` popover, an shown in the animated gif below:

![ordering_via_columns](https://user-images.githubusercontent.com/4459398/136119497-65f76f49-091c-4a45-b8d3-1e5ef80ccbb2.gif)

_Above: Ordering via the `Columns` popover is not persisted to `local storage` in `7.15`_

This PR utilizes the `setVisibleColumns` [EuiDataGrid API](https://elastic.github.io/eui/#/tabular-content/data-grid) API as a callback to update Redux when the columns are sorted, which will in-turn update `local storage` to persist the new order across page refreshes:

![setVisibleColumns](https://user-images.githubusercontent.com/4459398/136117249-628bb147-a860-4ccf-811a-0e57a99296fb.png)

## Restores the feature to persist column widths in `local storage`

In previous releases, resized column widths were peristed in `local storage` to persist across page refreshes, as documented in <https://github.com/elastic/kibana/issues/110524> :

```
{
   "detections-page":{
      "id":"detections-page",
      "activeTab":"query",
      "prevActiveTab":"query",
      "columns":[
         {
            "category":"base",
            "columnHeaderType":"not-filtered",
            "description":"Date/time when the event originated. This is the date/time extracted from the event, typically representing when the event was generated by the source. If the event source has no original timestamp, this value is typically populated by the first time the event was received by the pipeline. Required field for all events.",
            "example":"2016-05-23T08:05:34.853Z",
            "id":"@timestamp",
            "type":"date",
            "aggregatable":true,
            "width":190
         },
         {
            "category":"cloud",
            "columnHeaderType":"not-filtered",
            "description":"The cloud account or organization id used to identify different entities in a multi-tenant environment. Examples: AWS account id, Google Cloud ORG Id, or other unique identifier.",
            "example":"666777888999",
            "id":"cloud.account.id",
            "type":"string",
            "aggregatable":true,
            "width":180
         },
         {
            "category":"cloud",
            "columnHeaderType":"not-filtered",
            "description":"Availability zone in which this host is running.",
            "example":"us-east-1c",
            "id":"cloud.availability_zone",
            "type":"string",
            "aggregatable":true,
            "width":180
         },
         // ...
         }
      ],
      // ...
   }
}
```

_Above: column widths were persisted to `local storage` in previous release, (going at least back to `7.12`)_

In this PR, we utilize the `onColumnResize` [EuiDataGrid API](https://elastic.github.io/eui/#/tabular-content/data-grid) API as a callback to update Redux when the columns are sorted via the `Columns` popover. Updating Redux will in-turn update `local storage`, so resized columns widths will persist across page refreshes:

![onColumnResize](https://user-images.githubusercontent.com/4459398/136120062-3b0bebce-9c44-47fc-9956-48fe07a30f83.png)

### Other changes

The Alerts page `Trend` chart and table were updated to include the following additional `Stack by` fields (CC @paulewing):

```
process.name
file.name
hash.sha256
```

per the before / after screenshots below:

![alerts-trend-before](https://user-images.githubusercontent.com/4459398/137045011-7da4530b-0259-4fd4-b903-9eee6c26d02f.png)

_Above: The Alerts `Trend` Stack by fields in `7.15` (before)_

![alerts-trend-after](https://user-images.githubusercontent.com/4459398/137045023-d0ae987c-a474-4123-a05b-a6ad2fc52922.png)

_Above: The Alerts `Trend` `Stack by` fields (after the addition of the `process.name`, `file.name`, and `hash.sha256` fields)_

CC: @monina-n @paulewing
2021-10-16 14:44:19 -04:00
Jonathan Budzenski d98bf0c245 skip flaky suite. #115130 2021-10-15 20:21:41 -05:00
Frank Hassanabad bf17898753
one line remove assert (#115127)
## Summary

Removes one liner non-null-assert.


Instead of this line:
```ts
if (rule != null && spacesApi && outcome === 'conflict') {
```

We just check using the `?` operator and type narrowing to remove the possibility of an error

```ts
if (rule?.alias_target_id != null && spacesApi && rule.outcome === 'conflict') {
```

The `rule?.alias_target_id != null` ensures that both `rule` and `alias_target_id` are not `null/undefined`
2021-10-15 18:38:00 -06:00
Frank Hassanabad 95e412b4a1
Fixes migration bug where I was deleting attributes (#115098)
## Summary

During the work here: https://github.com/elastic/kibana/pull/113577

I accidentally have introduced a bug where on migration I was deleting the attributes of `ruleThrottle` and `alertThrottle` because I was not using splat correctly.

Added unit and e2e tests to fix this.

### 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-15 18:37:36 -06:00
Frank Hassanabad 55235c61e5
[Security Solutions] Fixes the newer notification system throttle resets and enabling immediate execution on first detection of a signal (#114214)
## Summary

Fixes:
* Resets happening by adding the throttle to the else switches and error catching. We have to call throttle on every rule execution or we will cause a reset.
* Fixes a case where we were not firing the signal immediately by pushing down the alerts detected. This can cause a reset or a delay of MTTD. 
* Adds unit tests for the conditions
* Changes some of the logic to clean things up.

### 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-15 18:37:00 -06:00
Tyler Smalley d29aad4357
[build] Dockerfile update (#115237)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2021-10-15 23:05:37 +01:00
Frank Hassanabad 67378b93fe
Fixes Cypress flake cypress test (#115270)
## Summary

Fixes flake cypress test

Fixes https://github.com/elastic/kibana/pull/115245 
See also: https://github.com/elastic/kibana/pull/114075, https://github.com/elastic/kibana/pull/115245

### 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-15 18:00:12 -04:00
Brian Seeders 8e3f1c4d13
Disable APM e2e tests 2021-10-15 17:35:04 -04:00
Mikhail Shustov 852c5dd205
log an invalid type for SO (#115175) 2021-10-15 22:56:17 +02:00
Kyle Pollich e18afaa45d
[Fleet] Don't auto upgrade policies for AUTO_UPDATE packages (#115199)
* Don't auto upgrade policies for AUTO_UPDATE packages

* Fix unused import

* Improve test coverage for upgrade policies check
2021-10-15 16:13:31 -04:00
Esteban Beltran 3e6516c986
[Security Solutions] Fix host isolation exception list showing up on the exceptions list (#114987) 2021-10-15 15:30:42 -04:00
Candace Park c5f3be6979
[Security Solution][Endpoint][Admin][TA by Policy] Policy details trusted app tab downgrade experience (#114871) 2021-10-15 15:28:19 -04:00
Brian Seeders a8b4379523 skip suite blocking es promotion (#115262) 2021-10-15 15:22:34 -04:00
Søren Louv-Jansen 10103325b7
Update local_setup.md (#115169) 2021-10-15 14:19:47 -05:00
Brian Seeders 9a15bee8b6 skip flaky suite (#115255) 2021-10-15 15:17:01 -04:00
Cauê Marcondes 6abfcdd572
[APM] Adding latency api tests (#115224)
* adding latency test

* addint api tests for latency calc
2021-10-15 14:07:02 -05:00
Christiane (Tina) Heiligers 22d07ed3d4
Removes deprecated telemetry.url and telemetry.optInStatusUrl from telemetry plugin config (#114737)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-15 14:26:43 -04:00
Nathan L Smith 07777b9de1
Re-enable and fix APM E2E tests (#114831)
* Re-enable previously disabled APM E2E tests.
* Round to the nearest second in `getComparisonTypes` to avoid cases where a millisecond difference can change which results get shown.
* Simplify error count alert tests to test the "happy path" (#79284 exists in order to expand to more tests for rule editing and creation.)
* Wait for alert list API request to complete before clicking "Create rule" button when running the test to create a rule from the Stack Management UI.

I ran the e2e tests 100 times locally with no failures so I'm confident the flakiness has been addressed.

Fixes #114419.
Fixes #109205.
2021-10-15 13:25:50 -05:00
John Dorlus 98acb5d8a8
Added Component Integration Test for Flush Action in Index Management (#114401)
* Aded some data test subjects for the test.

* Added flush indices test.

* Fixed linting issue.

* Merged test subject PR in and updated tests.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-15 14:22:45 -04:00
Tiago Costa 47ce4a80a6
Revert "fix(NA): creation of multiple processes on production by splitting no_transpilation when setting up node env (#114940)"
This reverts commit 5fcc118913.
2021-10-15 19:12:51 +01:00
Thomas Neirynck 712fac6042
[Maps] Use SO-references for geo-containment alerts (#114559) 2021-10-15 13:51:47 -04:00
Cristina Amico 411886ac8b
[Fleet] Replace Select with GroupButtons to show available platforms (#114818) 2021-10-15 10:09:45 -07:00
Melissa Alvarez c240ccff86
[FLEET] Adding support for installing ML models (#107710)
* adds support for saved object based ml models

* adds es asset type and ml model install handler

* wip: handle top level pipeline install

* remove unnecessary mlModel savedObject type

* add package manifest license check

* get modelid from model path

* add fleet api test for ml model

* replace test mlModel for api test with smaller test model

* cleanup install/remove and ensure pipelines are retained when upgrading

* fix types - update test model id

* fix types

* remove hard coded ml category and check top level pipeline on upgrade

* update ml model test file

* ensure deduplicated asset refs are saved

* Fix api integration update test

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Nicolas Chaulet <nicolas.chaulet@elastic.co>
2021-10-15 13:06:57 -04:00
Tiago Costa 5fcc118913
fix(NA): creation of multiple processes on production by splitting no_transpilation when setting up node env (#114940)
* fix(NA): adds no_transpilation_dist to avoid preserve_symlinks on dist

* chore(NA): setup node env correctly on functional tests

* chore(NA): try to fix tests

* chore(NA): correctly separate split

* chore(NA): check ensure preserve symlinks need

* chore(NA): investigate path resolve result

* chore(NA): investigate path resolve result #2

* chore(NA): comment out preserve symlinks

* chore(NA): apply fs.realpathSync into the calculated REPO_ROOT paths on babel_register_for_test_plugins

* chore(NA): removes debug code

* chore(NA): move array definition

* chore(NA): correctly import fs

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-15 18:06:05 +01:00
Tyler Smalley 871abc6656
[ci] Adds Github label to build all platforms (#115134)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-15 09:58:20 -07:00
Marco Liberati 9d12a97a1c
[Lens] Reference line renaming + other small fixes (#113811)
* 🐛 Add padding to the tick label to fit threshold markers

* 🐛 Better icon detection

* 🐛 Fix edge cases with no title or labels

* 📸 Update snapshots

*  Make threshold fit into view automatically

* 🐛 do not compute axis threshold extends if no threshold is present

*  One more fix for 0-based extends and tests

*  Add icon placement flag

*  Sync padding computation with marker positioning

*  compute the default threshold based on data bounds

* 🐛 fix duplicate suggestion issue + missing over time

* 👌 Make disabled when no icon is selected

*  First text on marker implementation

* 🐛 Fix some edge cases with auto positioning

* Update x-pack/plugins/lens/public/xy_visualization/xy_config_panel/threshold_panel.tsx

Co-authored-by: Michael Marcialis <michael@marcial.is>

* 🐛 Fix minor details

* 💄 Small tweak

*  Reduce the padding if no icon is shown on the axis

* 🐛 Fix color fallback for different type of layers

*  Fix broken unit tests

* 🐛 Fix multi layer types issue

*  Fix test

*  Fix other test

* 💄 Fix vertical text centering

*  Rename to reference lines + few fixes

* 🚨 Fix linting issue

* 🐛 Fix issue

* 🐛 Fix computation bug for the initial static value

*  Add new suite of test for static value computation

* 💄 Reorder panel inputs

* 💄 Move styling to sass

* 📝 Keeping up with the renaming

*  Fix functional tests after renaming

* 🐛 Fix duplicate arg from conflict resolution

* 👌 Integrate some follow up feedback

* 📝 Fix typo

* 👌 Integrate feedback

* 🐛 Fix the quick functions transition bug

* 🐛 Fix label issue when updating value

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Michael Marcialis <michael@marcial.is>
2021-10-15 18:05:27 +02:00
Corey Robertson cba83335ef
[Dashboard] Use SavedObjectResolve (#111040)
* Switch Dashboard to use savedobjects.resolve when loading

* Don't use LegacyURI Redirect if in screenshot mode

* Pass query string on redirects

* Remove unused import

* Fix carrying query params through redirect

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-15 11:17:54 -04:00
Sébastien Loix d009e54199
[Runtime field editor] Fix preview error when not enough privileges (#115070) 2021-10-15 16:06:59 +01:00
Jason Stoltzfus 8b70071623
Fixed numbering (#114863) 2021-10-15 11:01:29 -04:00
Steph Milovic a0c5c11d17
[Security Solution] [Sourcerer] Timeline Reset button, bug fix (#115113) 2021-10-15 08:35:49 -06:00
Kevin Logan 8bbe5713a9
[Security Solution] Add Memory protection config for Mac and Linux (#114799)
* [Security Solution] Add Memory protection config for Mac and Linux
2021-10-15 10:33:00 -04:00
Paul Tavares 8c1ba15be6
[Security Solution][Endpoint] Fixes Policy Details page to display an error if policy id (from URL) is invalid (#115106)
* show loading animation while retrieving policy data based on id
* Move the Not Found logic from the policy details form layout to the policy details page
* Fix unit test error caused by providing empty array to `rightSideItems` of `<AdministrationListPage>`
* Move tests to policy details from policy form layout
2021-10-15 10:28:22 -04:00
Alexey Antonov aee7df992f
[Discover] Step 4- Removing SavedObject usage for savedSearch (#114790)
* [Discover] Step 4- Removing SavedObject usage for savedSearch

Closes: #105810

* fix apis

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-15 17:25:31 +03:00
Pierre Gayvallet 21c3675caf
fix default appender config example (#115159)
* fix default appender config example

* fix doc examples

* use json layout in example
2021-10-15 16:24:05 +02:00
Alexey Antonov 50e4ae7179
Move angular related parts from kibana_legacy to monitoring (#114977)
* Move angular related parts from kibana_legacy to monitoring

Closes: #114977

* remove private

* move format angular http error into monitoring

* fix translations
2021-10-15 17:02:23 +03:00
Pete Hampton 7daf707cb9
Updates security data example to external documentation (#114973)
* initial commit.

* Remove reverse dependency on security solution presence.

* Update translations.

* remove unneeded interface.

* Remove stray type.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-15 14:56:02 +01:00
Shahzad 72dcc4638b
[Exploratory view] Url filter wildcard (#114797) 2021-10-15 15:50:27 +02:00