Commit graph

3815 commits

Author SHA1 Message Date
Frank Hassanabad 9bf488e826
[Security Solutions] Re-arranges and adds more packages to remove copied code (#100310)
## Summary

* Creates a `securitysolution-list-utils` packaged and moves the first set of utilities into there
* Fixes a slight bug with `kbn-securitysolution-io-ts-list-types` where the wrong name was used
* Moves _all_ of the lists schemas and types into the package `kbn-securitysolution-io-ts-list-types`
* Removes copied code found in a few places

## Tech debt
* Some spots I have to use an `any` in the package as Kibana kbn packages don't have the types I need
* Some spots I copy constants until we can straighten out those pieces.
* I keep copied mock files until we figure out how to share mocks from these packages without adding weight or we create dedicated mock packages for all of 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-05-19 15:59:52 -06:00
Kevin Logan 00479968a1
[Security Solution] Add linux malware config options and migration (#100166) 2021-05-19 17:37:43 -04:00
liza-mae c28b5496a6
Upgrade functional test fixes (#100306)
* Upgrade functional test fixes

* Fix lint issues
2021-05-19 13:08:41 -06:00
spalger 4b0c01a732 skip flaky suite (#99581) 2021-05-19 09:34:14 -07:00
Kevin Logan 9da1a707d7
[Security Solution] Add supported field to ransomware (#100135) 2021-05-19 11:43:18 -04:00
Tiago Costa 8f1bf66a7b
skip flaky suite (#100296) 2021-05-19 13:13:07 +01:00
ymao1 0f0cee2510
[Alerting] Refactor alerts authorization client (#99078)
* WIP - creating alerting authorization client factory and exposing authorization client on plugin start contract

* Updating alerting feature privilege builder to handle different alerting types

* Passing in alerting authorization type to AlertingActions class string builder

* Passing in authorization type in each function call

* Passing in exempt consumer ids. Adding authorization type to audit logger

* Changing alertType to ruleType

* Changing alertType to ruleType

* Updating unit tests

* Updating unit tests

* Passing field names into authorization query builder. Adding kql/es dsl option

* Converting to es query if requested

* Fixing functional tests

* Removing ability to specify feature privilege name in constructor

* Fixing some types and tests

* Consolidating alerting authorization kuery filter options

* Cleanup and tests

* Cleanup and tests

* Throwing error when AlertingAuthorizationClientFactory is not defined

* Renaming authorizationType to entity

* Renaming AlertsAuthorization to AlertingAuthorization

* Fixing unit tests

* Updating privilege string terminology

* Updating privilege string terminology

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-18 18:32:43 -04:00
Frank Hassanabad 0f9766591f
[Security Solution] Re-adds a test that was skipped (#100273)
## Summary

Re-adds a test that was skipped. If it goes bonkers again, I will add more debugging information to it. I will keep an eye on the operations channel to see when/if this fails again. Originally this looked to be timeouts waiting, so I increased the global timeout to be 20 seconds instead of the original 10 seconds.

Resolves:
https://github.com/elastic/kibana/issues/89389

### 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-18 13:03:49 -05:00
Kevin Logan 79c94d33fb
[Security Solution] Fix policy details test (#100260) 2021-05-18 13:14:31 -04:00
Thom Heymann 574b4559e7
Simplify deleting spaces (#99960)
* Simplify deleting spaces

* Fixed i18n

* Fix functional tests

* Update x-pack/plugins/spaces/public/management/spaces_management_app.tsx

Co-authored-by: Larry Gregory <lgregorydev@gmail.com>

* Fix snapshots

Co-authored-by: Larry Gregory <lgregorydev@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-18 11:37:18 +01:00
Frank Hassanabad e15b887e43
[Security Solutions] Replaces most deprecated io-ts alerting and list types (#100234)
## Summary

Replaces most of the deprecated io-ts alerting and list types within securitysolution as part of Phase 3 of 4 phases outlined in earlier PR's such as https://github.com/elastic/kibana/pull/99260

### 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-17 23:28:06 -06:00
Dominique Clarke 6d4cca29a7
[Uptime] [Synthetics Integration] Add functional tests for Synthetics Integration (#100161)
* add functional tests for synthetics fleet package
2021-05-17 16:44:30 -04:00
Brian Seeders f1a2e6f251 skip flaky suite (#100236) 2021-05-17 15:53:20 -04:00
Tiago Costa cbab391bbe
skip failing es promotion suite (#99915) 2021-05-17 18:48:41 +01:00
Spencer 808b44f2c1
[kbn/test] move types/ftr into src (#99555)
* [kbn/test] move types/ftr into src

* Apply eslint updates

* fix import of Lifecycle type

Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-17 09:51:53 -07:00
Tiago Costa d079dae56d
skip failing es promotion suite (#99915) 2021-05-17 16:21:46 +01:00
Tiago Costa 839fc7b257
skip failing es promotion suite (#99915) 2021-05-17 16:19:56 +01:00
Dzmitry Lemechko e63c319032
[QA] fix dashboard lens by value test (#100196)
* [functional test] remove redundant navigation, wait for lens to be loaded

* fix navigation to new viz

* update test title

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-17 17:18:20 +02:00
Tiago Costa 8d85d72fef
skip flaky suite (#100012) 2021-05-17 16:12:08 +01:00
Dzmitry Lemechko ca2930c719
[status_page test] use navigateToApp (#100146) 2021-05-15 00:17:10 +02:00
Joe Portner b2d36b863b
Sharing saved objects phase 3 (#94383) 2021-05-14 14:46:17 -04:00
Dominique Clarke 25cad22b3d
[Uptime] Fix overview flaky tests (#99781)
* add retry logic and add describe.only to prepare for flaky test runner

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-14 14:33:46 -04:00
John Schulz 0364e8f5aa
[Fleet] Fix error when searching for keys whose names have spaces (#100056)
## Summary
fixes #99895

Can reproduce #99895 with something like
```shell
curl 'http://localhost:5601/api/fleet/enrollment-api-keys' \
  -H 'content-type: application/json' \
  -H 'kbn-version: 8.0.0' \
  -u elastic:changeme \
  --data-raw '{"name":"with spaces","policy_id":"d6a93200-b1bd-11eb-90ac-052b474d74cd"}'
```

Kibana logs this stack trace

```
server    log   [10:57:07.863] [error][fleet][plugins] KQLSyntaxError: Expected AND, OR, end of input but "\" found.
policy_id:"d6a93200-b1bd-11eb-90ac-052b474d74cd" AND name:with\ spaces*
--------------------------------------------------------------^
    at Object.fromKueryExpression (/Users/jfsiii/work/kibana/src/plugins/data/common/es_query/kuery/ast/ast.ts:52:13)
    at listEnrollmentApiKeys (/Users/jfsiii/work/kibana/x-pack/plugins/fleet/server/services/api_keys/enrollment_api_key.ts:37:69)
    at Object.generateEnrollmentAPIKey (/Users/jfsiii/work/kibana/x-pack/plugins/fleet/server/services/api_keys/enrollment_api_key.ts:160:31)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at postEnrollmentApiKeyHandler (/Users/jfsiii/work/kibana/x-pack/plugins/fleet/server/routes/enrollment_api_key/handler.ts:53:20)
    at Router.handle (/Users/jfsiii/work/kibana/src/core/server/http/router/router.ts:273:30)
    at handler (/Users/jfsiii/work/kibana/src/core/server/http/router/router.ts:228:11)
    at exports.Manager.execute (/Users/jfsiii/work/kibana/node_modules/@hapi/hapi/lib/toolkit.js:60:28)
    at Object.internals.handler (/Users/jfsiii/work/kibana/node_modules/@hapi/hapi/lib/handler.js:46:20)
    at exports.execute (/Users/jfsiii/work/kibana/node_modules/@hapi/hapi/lib/handler.js:31:20)
    at Request._lifecycle (/Users/jfsiii/work/kibana/node_modules/@hapi/hapi/lib/request.js:370:32)
    at Request._execute (/Users/jfsiii/work/kibana/node_modules/@hapi/hapi/lib/request.js:279:9) {
  shortMessage: 'Expected AND, OR, end of input but "\\" found.'
```

the `kuery` value which causes the `KQLSyntaxError` is
```
policy_id:\"d6a93200-b1bd-11eb-90ac-052b474d74cd\" AND name:with\\ spaces*
``` 

a value without spaces, e.g. `no_spaces` 

```
policy_id:\"d6a93200-b1bd-11eb-90ac-052b474d74cd\" AND name:no_spaces*
```

is converted to this query object

```
{
  "bool": {
    "filter": [
      {
        "bool": {
          "should": [
            {
              "match_phrase": {
                "policy_id": "d6a93200-b1bd-11eb-90ac-052b474d74cd"
              }
            }
          ],
          "minimum_should_match": 1
        }
      },
      {
        "bool": {
          "should": [
            {
              "query_string": {
                "fields": [
                  "name"
                ],
                "query": "no_spaces*"
              }
            }
          ],
          "minimum_should_match": 1
        }
      }
    ]
  }
```

I tried some other approaches for handling the spaces based on what I saw in the docs like `name:"\"with spaces\"` and `name:(with spaces)*`but they all failed as well, like

```
KQLSyntaxError: Expected AND, OR, end of input but "*" found.
policy_id:"d6a93200-b1bd-11eb-90ac-052b474d74cd" AND name:(with spaces)*
-----------------------------------------------------------------------^
    at Object.fromKueryExpression (/Users/jfsiii/work/kibana/src/plugins/data/common/es_query/kuery/ast/ast.ts:52:13)
    at listEnrollmentApiKeys (/Users/jfsiii/work/kibana/x-pack/plugins/fleet/server/services/api_keys/enrollment_api_key.ts:37:69)
    at Object.generateEnrollmentAPIKey (/Users/jfsiii/work/kibana/x-pack/plugins/fleet/server/services/api_keys/enrollment_api_key.ts:166:31)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at postEnrollmentApiKeyHandler (/Users/jfsiii/work/kibana/x-pack/plugins/fleet/server/routes/enrollment_api_key/handler.ts:53:20)
    at Router.handle (/Users/jfsiii/work/kibana/src/core/server/http/router/router.ts:273:30)
    at handler (/Users/jfsiii/work/kibana/src/core/server/http/router/router.ts:228:11)
    at exports.Manager.execute (/Users/jfsiii/work/kibana/node_modules/@hapi/hapi/lib/toolkit.js:60:28)
    at Object.internals.handler (/Users/jfsiii/work/kibana/node_modules/@hapi/hapi/lib/handler.js:46:20)
    at exports.execute (/Users/jfsiii/work/kibana/node_modules/@hapi/hapi/lib/handler.js:31:20)
    at Request._lifecycle (/Users/jfsiii/work/kibana/node_modules/@hapi/hapi/lib/request.js:370:32)
    at Request._execute (/Users/jfsiii/work/kibana/node_modules/@hapi/hapi/lib/request.js:279:9) {
  shortMessage: 'Expected AND, OR, end of input but "*" found.'
```

So I logged out the query object for a successful request, and put that in a function

```
{
  "query": {
    "bool": {
      "filter": [
        {
          "bool": {
            "should": [
              {
                "match_phrase": {
                  "policy_id": "d6a93200-b1bd-11eb-90ac-052b474d74cd"
                }
              }
            ],
            "minimum_should_match": 1
          }
        },
        {
          "bool": {
            "should": [
              {
                "query_string": {
                  "fields": [
                    "name"
                  ],
                  "query": "(with spaces) *"
                }
              }
            ],
            "minimum_should_match": 1
          }
        }
      ]
    }
  }
}
```


### 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-13 17:32:14 -04:00
Mike Côté bb7057c343
Rename alert status OK to Recovered and fix some UX issues around disabling a rule while being in an error state (#98135)
* Fix UX when alert is disabled and in an error state

* Reset executionStatus to pending after enabling an alert

* Renames alert instance status OK to Recovered

* Fix end to end test

* Update doc screenshot

* Fix confusing test name

* Remove flakiness in integration test

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-13 14:16:36 -04:00
Dario Gieselaar bdde884d09
[RAC] Decouple registry from alerts-as-data client (#98935) 2021-05-13 17:12:47 +02:00
Justin Kambic e3f0afa4e0
Move functional tests off of legacy es client. (#99801)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-12 15:21:22 -04:00
Quynh Nguyen e99cfb5c0b
[ML] Stabilize anomaly chart embeddable tests (#99955)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-12 13:15:52 -05:00
Thom Heymann 4e5df8cf20
Handle session timeout and user activity (#98461)
* Handle session timeout and user activity

* Added suggestions form code review

* Fix i18n errors

* Moved session timeout calculation to server side

* fixed tests

* Added suggestions from code review

* fix types

* Removed unecessary response interceptor and improved copy

* Handle scenario when session does not exist correctly

* Do not show warning again if previously dismissed

* Added suggestions from code review

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-12 17:33:10 +01:00
Nathan Reese b097385707
[Lens] visualize in maps button (#98677)
* [Lens] visualize in maps button

* clean up dependency injection as suggested

* add custom workspace render for geo fields

* tslint and finish drag and drop for geo field

* convert react class to function component

* prevent page reload when clicking visualize in maps button

* filter allFields instead of using condition to populate fieldTypeNames to fix tslint

* clean up UI

* fix jest test

* globe illustration

* UI cleanup

* functional test

* Update x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/geo_field_workspace_panel.tsx

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

* Update x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/geo_field_workspace_panel.scss

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

* Update x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/geo_field_workspace_panel.tsx

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

* Update x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/geo_field_workspace_panel.scss

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

* Update x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/geo_field_workspace_panel.scss

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

* Update x-pack/plugins/lens/public/indexpattern_datasource/field_item.tsx

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

* updated globe svg

* remove unused

* better message for drop zone screen reader

* Update x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/geo_field_workspace_panel.tsx

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

* tslint

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Michael Marcialis <michael@marcial.is>
2021-05-12 09:54:34 -06:00
igoristic 6d263162f0
[Monitoring] Added missing cgroup memory (#99602)
* Added missing cgroup memory

* Fixed tests

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-12 11:24:05 -04:00
Robert Oskamp c44e5f75a3
[ML] Functional tests - increase module test coverage (#99758)
This PR adds a couple API integrations tests to get, recognize and setup modules.
2021-05-12 13:18:36 +02:00
Jean-Louis Leysens c22d9fd690
[Reporting] Relax save requirement for CSV reports (#99313)
* update requirement to save csv report in ui

* update expectation that CSV reporting is disabled for new discover searches

* update test expectations (again)

* refactor to using props-driven approach

* provide a fallback title

* refine title a bit more

* added component level test

* return ISO string with offset

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-12 10:32:51 +02:00
Lukas Olson 7617642bba
Add partial results to search examples demo (#96366)
* Add partial results to search examples demo

* Add functional test

* Move types into separate file and separate custom strategies

* Review feedback

* Update test

* Try to fix test

* Attempt to fix test

* Try to fix observable error

* Sanity check

* Fix test

* Another attempt

* Remove rxjs from strategy
2021-05-11 12:41:21 -07:00
Nathan Reese 5dbc73f1b4
[Maps] use deep equals for mapbox filter expression equals check (#99673)
* [Maps] use deep equals for mapbox filter expression equals check

* cleanup
2021-05-11 09:38:40 -06:00
Tyler Smalley 9da9b8d4b9
[kbn-es] Allow overriding of Java heap (#99517)
* [kbn-es] Allow overriding of Java heap

Fixes #99494

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2021-05-11 07:36:20 -07:00
Domenico Andreoli 2d05d9f802
Add CCS integration test for security rules (#99042) 2021-05-11 16:19:32 +02:00
Alison Goryachev 72c25ea10f
[Index Management] Unskip indices API integration test (#99379) 2021-05-11 08:53:16 -04:00
Kyle Pollich baf11e8749
[Fleet] Remove timestamp field from component template (#99619)
* Remove timestamp field from component template

Elasticsearch bug fixed upstream allows us to remove this field from the
template: elastic/elasticsearch/#58956

Closes #71095

* Remove timestamp field from functional test
2021-05-10 14:11:23 -04:00
Dominique Clarke 2f90e73569
[Uptime] remove settings flaky test comment (#99402)
* remove outdated comment
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-10 10:15:01 -04:00
Tiago Costa 8b77d7ae12
skip flaky suite (#99006) 2021-05-10 14:40:56 +01:00
Tim Sullivan f73da420ff
[Reporting] Update Puppeteer to version 8.0.0 and Chromium to r856583 (#98688)
* Update Puppeteer to 8.0.0

Updates Chromium to r856583
Links to new build of Linux headless_shell in the Kibana team GCS bucket
Links to main download site of Chromium for Mac and Windows
Removes Mac and Windows compatibility from the Chromium build scripts

* add functional tests for large dashboard

* ensure png comparison is working

* add test for large dashboard pdf

* update arm64 binary checksum

* update README

* more readme update

* Update x-pack/build_chromium/README.md

Co-authored-by: Jean-Louis Leysens <jloleysens@gmail.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Jean-Louis Leysens <jloleysens@gmail.com>
2021-05-07 09:54:33 -07:00
James Gowdy 518da4daa1
[ML] Fixing route handler types and schemas (#98636)
* [ML] Fixing route handler types and schemas

* commenting out type error

* updates to fix functional tests

* updating jest test

* updating test expect

* fixing tests

* fixing test expect

* changes based on review

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-07 13:08:25 +01:00
spalger 822708b27c correctly skip flaky suite (#98249) 2021-05-06 15:56:42 -07:00
Jonathan Budzenski a643bb389d skip flaky test. #98249 2021-05-06 15:50:44 -05:00
Spencer 21c54d38c3
[ftr] auto assign ciGroupDocker to suites with dockerServers (#99393)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-06 12:42:29 -07:00
John Dorlus a1954b4334
Changed Upgrade Assistant test to reflect hiding the UI (#96714)
* Added test to verify the UI changes for hiding the app.

* Running tests on repeat.

* Tests passed. Removing only clause to allow full suite to run.

* Skipping firefox.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-06 12:59:59 -04:00
Robert Oskamp beaa4e78fb
[ML] Functional tests - reenable clone and edit tests for transform latest (#99306)
This PR fixes the data grid parsing and re-enables the clone and edit tests for transform latest.
2021-05-06 17:54:24 +02:00
Kevin Logan f2bb74e996
[Security Solution][Detections] Add linux artifact for exception lists (#99104) 2021-05-06 09:13:37 -04:00
Spencer 61eb3f0685
[ftr] validate that suites are not in multiple ciGroups (#99398)
* [ftr] validate that suites are not in multiple ciGroups

* remove unused import

* include filename in error message

* remove redundant ciGroup tags

* fix more duplicate ciGroups

Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-05-05 14:50:07 -07: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
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
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
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
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
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
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
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
Tiago Costa 9a6c774a3c
skip flaky suite (#98562) 2021-05-04 13:58:31 +01: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
Anton Dosov 6fb2b4ad83
[Search Sessions] Fix display of expired session state in management (#98915) 2021-05-04 12:02:17 +02: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
Nicolas Chaulet b2a20fc9af
[Fleet] Fix fleet server host port during settings creation (#99084) 2021-05-03 17:42:07 -04:00
Brian Seeders f404305eaa
[CI] Create a ciGroup just for tests that use Docker (#98535) 2021-05-03 13:53:22 -04:00
Nathan Reese 85b78711c6
[Maps] add attribution to layer editor (#98328)
* [Maps] add attribution to layer editor

* update sources to getAttributionProvider

* remove attribution UI from EMS_XYZ source

* remove attribution UI from WMS source editor

* clean up

* tslint

* AttributionFormRow jest test

* add migration

* tslint

* i18n fixes

* attribution

* [Maps] Improving design and a11y for attribution layer settings (#38)

* Design and a11y improvements

* Buttons aria labels

* Addressing PR review

* tslint and i18n fixes

* update jest snapshots

* remove placeholder for url

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elizabet Oliveira <elizabet.oliveira@elastic.co>
2021-05-03 10:42:07 -06:00
Quynh Nguyen cbcc800a6b
[ML] Remove versioning check for Analytics list row expansion content functional tests (#98828)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-02 21:34:43 -05:00
Frank Hassanabad 93b064930a
Fixes some flake by loosening up some test logic around 0 (#98959)
## Summary

Fixes test flake:
https://github.com/elastic/kibana/issues/97365

By changing exact to an above count. I think the view of the index this large is not being given back consistent and could be a possible tooling gotcha, but I don't think we have a bug around this area. Either way, the test is still a valid test to ensure we don't blow up with errors, I just don't also test for exactness anymore. 

Since this fixes tests and has no other inherit risk but should bring stability, I marked it as being back ported into the 7.13 branch for the next BC build of 7.13.

### 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-04-30 17:17:32 -06:00
Marshall Main 2236633184
Allow saved_query rules to validate properly for query executor (#98921)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-30 16:22:08 -04:00
Frank Hassanabad af228f0f20
[Security Solutions] (Phase 1) Adds an application cache called metrics entities and integrates it within Security Solutions behind a feature flag (#96446)
## Summary

Phase 1 of a multi-phase cautious approach for adding an experimental application cache for Kibana solutions called `metric_entities` and integrates it within Security Solutions.

Phase 1 is putting experimental support into the application without breaking existing features. Lots of TODO's, conversations and a possible RFC from phase 1 to phase 2 approach. Some features are missing, but for phase 1 the general idea and code is all there.

To enable this first phase after checking out the branch add this to your `kibana.dev.yml`

```yml
xpack.metricsEntities.enabled: true
xpack.securitySolution.enableExperimental: ['metricsEntitiesEnabled']
```

Then go into Stack Management -> Advanced Settings (Under Security Solutions) and set the enabled to true like so:
<img width="1229" alt="Screen Shot 2021-04-08 at 2 21 02 PM" src="https://user-images.githubusercontent.com/1151048/114091276-b3cbb700-9875-11eb-9083-5c1d91dd20ed.png">

Next go to the security_solutions page and you will see it being activated and you will have these transforms running if you look under stack management:
<img width="1710" alt="Screen Shot 2021-04-29 at 2 00 27 PM" src="https://user-images.githubusercontent.com/1151048/116611174-4a2e4e00-a8f3-11eb-9e15-55cb504dfb2a.png">

On the hosts page, network, page, etc... You can see them being activated when you have no query/filter and you click on request:
<img width="1405" alt="Screen Shot 2021-04-29 at 2 01 28 PM" src="https://user-images.githubusercontent.com/1151048/116611274-6a5e0d00-a8f3-11eb-9998-9f5b3d1c5c63.png">

You will see in the request the index patterns all starting with `estc_xyz*`

### Checklist

Delete any items that are not applicable to this PR.

- [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/master/packages/kbn-i18n/README.md)

We have lots of TODO's but no concrete docs with this just yet.
- [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials

Behind a feature flag and this isn't there yet.
- [ ] [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-04-30 12:36:06 -06:00
Dima Arnautov 4686f442ee
[ML] Fix alerting rule preview (#98907) 2021-04-30 14:03:05 -04:00
Alison Goryachev 577948bea3
[Upgrade Assistant] Support Kibana deprecations (#97159) 2021-04-30 09:03:44 -04:00
Mikhail Shustov 33eecc2979
improve type safety for integration test helpers (#98731)
* convert functional_tests/lib into TS

* convert ES cluster factory into TS

* fix exports from kbn-test

* fix core test_helpers

* remove legacy ES client usage in ui_settings tests

* remove unnecessary ts-expect-errors comments

* initialize DEFAULT_SETTINGS_WITH_CORE_PLUGINS lazily to prevent failure when imported outside of FTR context

* throw an exception on invalid process.env.TEST_ES_PORT
2021-04-30 05:31:17 -04:00
Diana Derevyankina 6b6ad111c0
[TSVB] Timeseries Drop last bucket set default to false (#97257)
* [TSVB] Timeseries Drop last bucket should default to false

* Rename isLastBucketDropped prop and move series domain calculation to a separate file

* Fix failing tests because of wrong default value

* update drop_last_bucket.js

* Refactor drop_last_bucket and some functional tests

* Change infra metrics test values because of last bucket value changed

* Refactor series_domain_calculation and related code

* Update series_domain_calculations.test

* Update series_domain_calculations.test

* Fix tooltip showing wrong time

* Refactor index

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Alexey Antonov <alexwizp@gmail.com>
2021-04-30 11:48:10 +03:00
Matthias Wilhelm a8d4145afb
[Discover] Revert default grid back to legacy (#98508) 2021-04-30 10:29:41 +02:00
Dominique Clarke e08d36d22c
[Uptime] unskip monitor state scoping tests (#98519)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-29 22:53:55 -04:00
Ross Wolf 0ddea04544
Make security rules optional (revert #97191) (#98854) 2021-04-29 19:59:52 -06:00
Quynh Nguyen 762c57b995
[ML] Functional tests for Analytics list row expansion content (#98678) 2021-04-29 12:06:39 -05:00
Shahzad 18213b673f
[Uptime] Fix Monitor status toggle alert receovery state (#89273)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-29 18:42:52 +02:00
Steph Milovic 2d5ff8ab70
[Security Solution] [Cases] Cases UI Plugin for RAC (#97646)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Steph Milovic <stephanie.milovic@elastic.co>
Co-authored-by: Michael Olorunnisola <michael.olorunnisola@elastic.co>
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
Co-authored-by: David Sánchez <davidsansol92@gmail.com>
Co-authored-by: Spencer <email@spalger.com>
Co-authored-by: Dmitry <dzmitry.lemechko@elastic.co>
2021-04-29 07:41:46 -04:00
Nathan Reese 40fddce405
[Maps] use index_exists route instead of /api/index_management/indices (#98479)
* [Maps] use index_exists route instead of /api/index_management/indices

* fix functional test

* add retry and correct permissions to fix functional tests

* fix upload functional test
2021-04-28 16:05:52 -06:00
Patrick Mueller b31f4a1a97
[actions] adds config allowing per-host networking options (#96630)
resolves: https://github.com/elastic/kibana/issues/80120

Adds a new Kibana configuration key xpack.actions.customHostSettings which
allows per-host configuration of connection settings for https and smtp for
alerting actions. Initially this is just for TLS settings, expandable to other
settings in the future.

The purpose of these is to allow customers to provide server certificates for
servers accessed by actions, whose certificate authority is not available
publicly. Alternatively, a per-server rejectUnauthorized: false configuration
may be used to bypass the verification step for specific servers, but require it
for other servers that do not have per-host customization.

Support was also added to allow per-host customization of ignoreTLS and
requireTLS flags for use with the email action.
2021-04-28 15:26:47 -04:00
Liza Katz 02ac599569
[Search] return full IKibanaSearchResponse from fetch$ (#98268)
* return full object from fetch$

* jest

* fun-ctional tests

* jest

* functional

* test

* test

* tesssst

* Update src/plugins/data/common/search/search_source/fetch/request_error.ts

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

* Update src/plugins/data/common/search/expressions/esaggs/request_handler.test.ts

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

* ts

* ts

* ts

* Revert "Update src/plugins/data/common/search/search_source/fetch/request_error.ts"

This reverts commit ab182e84ed.

Co-authored-by: Michael Dokolin <dokmic@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-28 21:49:47 +03:00
Joe Reuter 0cf1256784
always load test fixtures (#98464) 2021-04-28 10:12:29 +02:00
Walter Rafelsberger bfb363f050
[ML] Transforms/Data Frame Analytics: Fix freezing wizard for indices with massive amounts of fields. (#98259)
The transform wizard can become very slow when used with indices with e.g. 1000+ fields.

This PR fixes it by prefetching 500 random documents to create a list of populated/used fields and passes those on to the data grid component instead of all available fields from the list derived via Kibana index patterns.

For example, for an out of the box metricbeat index, this reduces the list of passed on fields from 3000+ to ~120 fields. Previously, the page would freeze on load for tens of seconds and would freeze again on every rerender. With the applied update, the page loads almost instantly again and remains responsive.

Note this fix of reducing available fields is only applied to the data grid preview component. All fields are still available to create the configuration in the UI for groups and aggregations. These UI components, e.g. the virtualized dropdowns, can handle large lists of fields.
2021-04-28 08:23:07 +02:00
Yuliia Naumenko 33f47ba590
[Connectors][API] Updated connectors with isMissingSecrets flag (#98223)
* [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
2021-04-27 14:14:01 -07:00
Felix Stürmer 0b16688a24
[Logs UI] Don't break log stream on syntactically invalid KQL (#98191) 2021-04-27 20:06:16 +02:00
Aleh Zasypkin 808959e316
Handle 401 Unauthorized errors in a more user-friendly way (#94927) 2021-04-27 19:09:54 +02:00
Chris Cowan aa281ffad7
[Metrics UI] Unskip Home Page Functional Test (#98085)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-27 09:36:27 -07:00
Walter Rafelsberger 18d9d435af
[ML] Transforms: Adds a link to discover from the transform list to the actions menu. (#97805)
Adds a link to discover from the transform list to the actions menu. Conditions for the link to be enabled:
- Kibana index pattern must be available
- Transform must have been started once and done some progress so there's the destination index available
2021-04-27 10:49:20 -04:00
James Gowdy c9832832df
[File Data Visualizer] Fixing missing css imports for file stats table (#98312)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-27 11:16:34 +01:00
Pierre Gayvallet 328febabd3
migrate logstash plugin to new ES client (#98064)
* migrate logstash plugin to new ES client

* handle 404s

* use default ES client
2021-04-27 10:25:50 +02:00
Sandra Gonzales aa7650699f
[Metrics UI] Anomaly Detection Flyout test (#98177)
* test anomaly detection flyout anomalies

* add date test

* date test no anomalies for k8s

* test the threshold for anomalies

* add metrics data so can test 'show in inventory' link

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-26 16:42:31 -04:00
Caroline Horn f07ebc822f
Reducing wrapping divs from RenderingService (#97017)
* Reducing wrapping divs from RenderingService

* Applying more styles to .kbnAppWrapper

Some being temporary and will need a better solution when introducing the page layout component

* Almost fixing tests for rendering service

Can’t figure out how to have a optional Observable
`Received: "kbnAppWrapper class-name”`

* Adding some comments

* [Dashboard] Using the APP_WRAPPER_CLASS

* fix test & ts types

* Fixin a few more tests that were using `.app-wrapper`

* Creating docs for new var and cleaning up some selectors

* Fixing reporting

* Fixing banner position and truncation

* Fixed CSS error in loading screen and jump in animation

* Fixing selectors in Canvas

* Remove unused var

* Added `APP_WRAPPER_CLASS` export from `server` and updated reporting to use it

* Fix monitoring icon clicks

* move APP_WRAPPER_CLASS definition to src/core/common

* Fixing Monitoring snapshots and wrapper class

* Moved `APP_WRAPPER_CLASS` utils but exported from `public` and `server`

* Remove old folder

* Fix dashboard test by only showing HR in edit mode

Co-authored-by: pgayvallet
Co-authored-by:  tsullivan
2021-04-26 16:06:06 -04:00
igoristic 27f2d4a260
[Monitoring] Added ability to possibly distinguish between Agent type metrics in APM (#95129)
* Added version and cloud check

* Fixed tests

* Code review feedback

* Fixed tests

* added versions

* added version

* ...

* Removed default version

* ..

* Fixed test

* fixed tests
2021-04-26 15:43:15 -04:00
Dima Arnautov 0cf3399e07
[ML] Check for the sort field type in Anomalies table before updating the URL state. (#98270)
* [ML] check sort field type

* [ML] functional tests for anomalies table pagination
2021-04-26 17:13:00 +02:00
Joe Reuter deb62d4479
Disable context menu "Explore underlying data" by default (#98039) 2021-04-26 13:20:43 +02:00
Brian Seeders 6fbc39d722
Skip flaky monitoring/*_mb tests (#98238) 2021-04-23 23:41:18 -04:00
Yuliia Naumenko 846aed54d9
Fixed Failing test for alerts list disable/mute operations. (#97057)
* Fixed Failing test for alerts list disable/mute operations.

* fixed tests

* removed awating check for switch status changed

* replaced api methos with ui call

* fixed merge

* reopen and close actions item menu

* fixed mute

* Update collapsed_item_actions.tsx

Remove changes

* removed retry

* add retry

* replaced try with try for time

* inceased retry

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-23 14:24:41 -07:00
Patrick Mueller 2ebb308753
[alerting] encode rule/connector ids in http requests made from alerting UI (#97854)
resolves: https://github.com/elastic/kibana/issues/97852

Adds `encodeURIComponent()` wrappers around references to rule, alert, and
connector ids.  Without this fix, if an alert id (which can contain
customer-generated data) contains a character that needs to be URL
encoded, the resulting API call from the web UI will fail.
2021-04-23 15:50:24 -04:00
Brian Seeders 7ebb731d41 skip flaky suite (#98190) 2021-04-23 14:01:00 -04:00
Melissa Alvarez d6e0251111
[ML] API Integration tests: adds test for Data Frame Analytics evaluate endpoint (#97856)
* wip: add api test for evaluate endpoint

* Add api test for evaluate endpoint

* add tests for view only and unauthorized user

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-23 12:44:27 -04:00
Chris Roberson c9ce295a0b
[Monitoring] Ensure Stack Monitoring UI works with metricbeat-* indices (#96205)
* WIP

* WIP

* Remove unnecessary fields

* Work on node detail page

* Cluster overview looking good

* Index page

* Fix types

* ML jobs

* CCR

* CCR

* We just need total here

* Standalone cluster fix

* Re-enable logstash

* FIx jest test

* Fix tests

* Fix tests

* Fix unused import

* Add new MB-based archives

* Add actual archives

* Fix types

* Add this file back in

* Fix tests and add more

* Update whitelist

* Renames

* Renames

* Only do ccs if enabled

* Updates

* Comment out

* More tests passing

* Another passing test

* More passing, yay

* Forgot to add the actual tests, wow

* CCR

* Fix CI issues

* Missed a field here

* Kibana tests passing

* Fix type issues

* Fix type

* Fix types

* Good chunk of logstash work

* Fix types

* Fix jest test

* Fix issue with get usage in logstash code

* Fix small bug here

* Update archives with proper mappings

* Handle both legacy and mb fields properly

* Fixes

* Fix jest test

* Fix issue

* Getting setup tests in a better state

* Only beats is failing now, which is good

* Progress on cluster listing

* Functional tests passing!

* More progress on cluster tests

* More cluster work

* Fix test

* Last recovery working

* Fix types

* Fix tests

* More tweaks

* Fix snapshot

* Use stats instead of kibana_stats

* Use node and node_stats for logstash

* Beats tests passing

* APM tests passing

* API tests passing!

* Fix types

* Fix tests

* Renames beats-with-restarted-instance archive dirs

Kebab case is disallowed for all newly added files.

* Renames logstash-pipeline dirs

Kebab case disallowed for all new files

* Renames multi-basic dirs

Kebab case disallowed for all new files

* Renames singlecluster-* dirs

Kebab case disallowed for all new files

* Fixes inaccurate path change for archive setup

* Reverts changes to rebuild_all script

Co-authored-by: Jason Rhodes <jason.matthew.rhodes@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-23 11:54:32 -04:00
Melissa Alvarez 51a50efe05
add explain api endpoint test (#98060) 2021-04-23 10:27:25 -04:00
Jonathan Budzenski fde12bf145 skip flaky suite. #97954 2021-04-22 16:22:42 -05:00
Spencer 6bb289368b
Revert skips added while triaging ES OOMs (#97876)
* Revert "skip flaky suite (#97382)"

This reverts commit e321f57f64.

* Revert "skip flaky suite (#97387)"

This reverts commit a89b756710.

* Revert "Skip test to try and stabilize master" (#97378)

This reverts commit 194355fdd3.

* upload heap dumps when they are created

Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-22 11:30:27 -07:00
Zacqary Adam Xeper 57f84f8593
[Fleet] Refactor setup to load default packages/policies with preconfiguration (#97328)
Co-authored-by: Nicolas Chaulet <nicolas.chaulet@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-22 11:25:10 -05:00
Dima Arnautov 49cdc9066d
[ML] Improve functional tests for Anomaly detection alert rule (#97998)
* [ML] ensureAdvancedSectionOpen for assertion

* [ML] delete alert rules after tests execution

* [ML] add isAdvancedSectionOpened
2021-04-22 11:16:54 -04:00
Angela Chuang f094d9fdc2
[Security Solution] Events integration test (#97519)
* events integration test

* add constants

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-22 12:50:35 +01:00
Nicolas Chaulet ee7ba71b43
[Fleet] Always create agent policy as active (#97874) 2021-04-21 17:13:48 -04:00
Cauê Marcondes e76987e13c
[APM] add comparison to Instances latency distribution (#97710)
* adding comparion data to chart

* fixing api test

* addressing comments

* refactoring
2021-04-21 16:47:03 -04:00
Marshall Main 1fb00900e1
[Security Solution][Detections] Fix flaky threshold API tests (#97768)
* Explicitly refreshes signals index for threshold api tests to prevent flakiness

* Unskip test suite
2021-04-21 16:13:15 -04:00
John Schulz 45255425f4
Add the more explicit & actionable text listed in ticket (#97857)
## Summary
closes #92591

Create a new `HostedAgentPolicyRestrictionRelatedError` which ensures the additional text from #92591 is included in all the appropriate places, but only specified once.

#### Some current examples
 * `Cannot update integrations of hosted agent policy ${id}`
 * `Cannot remove integrations of hosted agent policy ${id}`
 * `Cannot reassign an agent to hosted agent policy ${newAgentPolicy.id}`


#### In this PR are now
 * `Cannot update integrations of hosted agent policy ${id}  in Fleet because the agent policy is managed by an external orchestration solution, such as Elastic Cloud, Kubernetes, etc. Please make changes using your orchestration solution.`
 * `Cannot remove integrations of hosted agent policy ${id} in Fleet because the agent policy is managed by an external orchestration solution, such as Elastic Cloud, Kubernetes, etc. Please make changes using your orchestration solution.`
 * `Cannot reassign an agent to hosted agent policy ${newAgentPolicy.id} in Fleet because the agent policy is managed by an external orchestration solution, such as Elastic Cloud, Kubernetes, etc. Please make changes using your orchestration solution.`


### 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-04-21 15:52:02 -04:00
Spencer fad45022c1
[npm] upgrade all jest related dependencies (#96367)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-21 15:32:10 -04:00
Dima Arnautov 58d4334c71
[ML] UI enhancements for Anomaly detection rule type (#97626)
* [ML] update labels

* [ML] update job summary endpoint to return associated alert rules

* [ML] add alert rule icon to the table

* [ML] edit alert rules from ML UI

* [ML] register navigation

* [ML] support single job selection only

* [ML] remove groups options from the job selection

* [ML] deps on rule id to avoid re-rendering

* [ML] fix i18n

* [ML] add info message to the alert context

* [ML] fix typo

* [ML] register usage collection

* [ML] fix telemetry
2021-04-21 14:21:07 -04:00
spalger dfde5cbdf7 skip flaky suite (#97584) 2021-04-21 10:05:08 -07:00
ymao1 c27245b201
Removing unnecessary hit count check from es query alert (#97735)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-21 11:28:58 -04:00
Tiago Costa ffc3db5a30
skip flaky suite (#53575) 2021-04-21 13:38:14 +01:00
Tiago Costa 4811253576
skip flaky suite (#97403) 2021-04-21 13:33:15 +01:00
Anton Dosov bd4f461c70
[Search] Unify search plugin step 1 (#95811)
Remove the defaultStrategy override
Move async search strategy to data
Move EQL search strategy to data
Move rest of common/search/session data (Moving whole search/session is blocked by security and taskManager)
2021-04-21 14:23:49 +02:00
Uladzislau Lasitsa 4a17123ef8
Advanced JSON input in visualize editor is always light scheme (#97232)
* Use CodeEditor from react-utils which supports dark theme instead of deprecated EuiCodeEditor

* fix CI

* Fix CI

* Fix tests

* Update monaco_editor.ts

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-21 12:19:12 +03:00
Tim Sullivan 5a6eda2b22
[Reporting] Kibana Application Privileges for Reporting (#94966)
* Implement Reporting features as subfeatures of applications

* add setting to the docker list

* update doc images

* finish docs

* Apply suggestions from code review

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>

* Apply suggestions from code review

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>

* Apply suggestions from code review

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>

* typo fix

* "PDF / PNG Reports" => "Reporting"

* Update x-pack/plugins/reporting/server/config/index.ts

Co-authored-by: Larry Gregory <lgregorydev@gmail.com>

* Update x-pack/test/functional/apps/security/secure_roles_perm.js

Co-authored-by: Larry Gregory <lgregorydev@gmail.com>

* update ids of report privileges

* combine dashboard privileges into 1 group

* update jest snapshot

* fix tests

* fix tests

* updates from feedback

* add note

* update screenshot

* fix grammer

* fix bad link breaks in doc

* update doc heading

* Apply suggestions documentation feedback

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* simplify

* use const assertions

* Apply text change suggestion from code review

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* more test for oss_features and reporting subFeatures

* reduce loc diff

* fix snapshot

* fix flakiness in licensing plugin public functional tests

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>
Co-authored-by: Larry Gregory <lgregorydev@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
2021-04-20 20:44:24 -07:00
Mike Côté 0507ac5da0
Create task to cleanup action execution failures (#96971)
* Initial commit

* Add tests and support for concurrency

* Ability to disable functionality, use bulk APIs

* Fix type check

* Fix jest tests

* Cleanup

* Cleanup pt2

* Add unit tests

* Fix type check

* Fixes

* Update test failures

* Split schedule between cleanup and idle

* Add functional tests

* Add one more test

* Cleanup repeated code

* Remove duplicate actions plugin requirement

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-20 19:11:25 -04:00
Cauê Marcondes 6b70784f67
[APM] Service overview: Instances table metadata foldout (#96467)
* shows instance details

* shows instance details

* shows instance details

* shows instance details

* shows instance details

* adding api test

* addressing PR comments

* addressing PR comments

* addressing PR comments

* addressing PR comments

* fixing ts issues

* fixing ci

* fixing api tests

* fixing api test

* fixing api test

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-20 18:26:58 -04:00
Shahzad 5de8ee101d
[Exploratory view] use synthetics and rum indices settings (#97425) 2021-04-20 22:00:21 +02:00
Devin W. Hurley 4d2414e7f5
[Security Solution] [Detections] Combine multiple timestamp searches into single request (#96078)
* merge multiple timestamp queries into one single search

* fix types and unit tests

* remove unused code for sending secondary search

* removes unused excludeDocsWithTimestampOverride

* adds integration tests to cover cases that should / should not generate signals when timestamp override is present in rule

* adds integration test to ensure unmapped sort fields do not break search after functionality of detection rules

* Need to figure out why moving the tests around fixed them...

* updates tests with new es archive data and fixes bug where exclusion filter was hardcoded to event.ingested :yikes:

* remove dead commented out code

* fixes typo in test file, removes redundant delete signals call in integration test, fixes logic for possibility of receving a null value in sort ids, removes unused utility function for checking valid sort ids

* a unit test for checking if an empty string of a sort id is present was failing because we moved the logic for checking that out of the build search query function and up into the big loop. So I moved that unit test into the search after bulk create test file.

* fix types

* removes isEmpty since it doesn't check for empty strings
2021-04-20 15:16:01 -04:00
igoristic f3affd8bd4
[Monitoring] Added cgroup memory usage metric (#97076)
* Added cgroup memory usage metric

* Added memory usage and limit

* container_memory

* Fixed tests

* fixed instance tests

* fixed values

* skip failing test
2021-04-20 14:47:12 -04:00
Jen Huang 10e52bb582
[Fleet] Add instructions and generation of a service token for Fleet Server onboarding (#97585)
* Don't block standalone agent instructions when not using Fleet server yet

* Add service token instructions - UI only

* Add route for regenerating fleet server service token

* generate tokens instead of regenerate and add error catching and tests

* fix i18n typo

* i18n fix, add sudo, copy edits

* Fix commands

* Add missing test file

Co-authored-by: Nicolas Chaulet <nicolas.chaulet@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-20 13:53:18 -04:00
Ross Wolf 1925cea9a2
[Security][Fleet] Install the security_detection_engine package automatically (#97191)
* Automatically install the security_detection_engine package via fleet
* Update dockerImage to include the security_detection_engine package
* Update api/fleet/setup install test
* Update test data for Endpoint package
* Fix JSON token
* Update firis json entry in destination_index
* Update destination_index structure
* Update destination_index structure
* Change KQL query to unblock testing
* Restore KQL and fix JSON instead
* update timestamps to pass tests
2021-04-20 13:07:11 -04:00
Ahmad Bamieh 0f4538195f
[Usage collection] Collect non-default kibana configs (#97368)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-20 11:02:27 -04:00
Matthias Wilhelm 2ecbca0d8d
[Discover] Enable EuiDataGrid (#89264)
* Now the new EuiDataGrid based document table is the default

* Columns can be sorted by drag and drop

* Column width can be changed by drag and drop

* There's a fullscreen mode

* There's document selection 

* There's document navigation in the flyover of a expanded document

* Sorting is much more user friendly, less confusing and sort order can be changed by drag and drop
2021-04-20 14:43:02 +02:00
Angela Chuang f8a3ea64e7
unskip tls integration test (#97597) 2021-04-20 12:51:21 +01:00
Robert Oskamp a3c2aebb9f
[ML] Functional tests - stabilize anomaly charts embeddables test (#97452)
This PR stabilizes the anomaly charts embeddables test by adding a retry.
2021-04-20 11:38:16 +02:00
Angela Chuang e4bbdda129
use smaller piece of mock data (#96953)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-20 10:30:30 +01:00
Dima Arnautov 20b585d122
[ML] Anomaly detection rule lookback interval improvements (#97370)
* [ML] add advanced settings

* [ML] default advanced settings

* [ML] advanced settings validators

* [ML] range control for top n buckets

* [ML] execute rule with a new query for most recent anomalies

* [ML] find most anomalous bucket from the top N

* Revert "[ML] range control for top n buckets"

This reverts commit e039f250

* [ML] validate check interval against the lookback interval

* [ML] update descriptions

* [ML] fix test subjects

* [ML] update warning message

* [ML] add functional tests

* [ML] adjust unit tests, mark getLookbackInterval

* [ML] update lookback interval description and warning message

* [ML] update fetchResult tsDoc

* [ML] cleanup

* [ML] fix imports to reduce bundle size

* [ML] round up lookback interval

* [ML] update functional test assertion

* [ML] async import for validator
2021-04-20 10:52:54 +02:00
Yulia Čech bd5e9ba10a
[Remote Clusters] Added a11y tests and fixed violations (#96989)
* Added a11y tests for Remote Clusters plugin and fixed discovered violations

* Added an a11y test for a delete modal

* Updated payload type casting

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-20 08:51:28 +02:00
Nathan L Smith 042fa1a2ce
Remove alerting feature flag from advanced settings (#97265)
* Remove alerting feature flag from advanced settings

Make it so the alerting UI in Observability can only be turned on and off in kibana.yml with `xpack.observability.enableAlertingExperience`.

We no longer:

* Allow turning this on and off for the current space in the advanced settings in Kibana
* Allow turning this on on cloud
* Send telemetry on whether or not the flag is enabled

Add some docs in READMEs as well.
2021-04-19 22:09:51 -05:00
Angela Chuang 44eda0fa73
[SecuritySolution] Timeline http endpoints (#95036)
* add notes and pinned events routes

* add api endpoints on client side

* add apis

* fix get all timelines

* add decodeResponseFavoriteTimeline

* rm apolloClient

* fix unit tests

* remove unused routes

* update cypress task

* fix integration tests

* clean up type dependency

* fix types

* update snapshot

* remove graphql types dependency

* fix types

* remove graphql queries

* remove unused i18n

* fix types

* fix delete timelines

* fix types and rewrite timeline integration tests

* add readme

* fix unit test

* fix unit test

* update package.json

* rm x-pack/yarn.lock

* fix tests

* update yarn.lock

* update yarn.lock

* rm unused dependency

* fix types

* fix unit test

* update query params for getAllTimelines

* fix integration test

* wrap JSON.stringify with try/catch

* fix lint error

* fix type

* wrap JSON.stringify with try/catch

* fix unit test

* review

* review

* review

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-19 20:32:39 -04:00
Cauê Marcondes 83824ab13a
[APM] Stop fetching previous period data when comparison is disabled (#97469)
* stopping fetching previous period data when comparison is disabled

* addressing PR comments

* refactoring comparison and primary API names
2021-04-19 17:50:48 -04:00
Bhavya RM b5effc20a4
unskipping login and spaces a11y tests (#97190) 2021-04-19 16:59:51 -04:00
Marshall Main a90afbf1ec
[Security Solution][Detections] Add API integration tests for threshold and EQL rules (#97336)
* Add API integration tests for threshold rules and more tests for EQL rules

* Add API more tests for exceptions and value list exceptions

* Fix unit test and add EQL api test checking multiple signal generation

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-19 16:10:59 -04:00
Quynh Nguyen 71e8118984
[ML] Fix runtime mapping texts to runtime fields, add transform switch modal (#97008) 2021-04-19 13:46:18 -05:00
Vadim Dalecky 77fe59d58f
Drilldown cloning (#91959)
* refactor: 💡 remove switch statement

* feat: 🎸 improve <ListManageDrilldowns> stories

* refactor: 💡 remove <FlyoutListManageDrilldowns> component

* refactor: 💡 simplify <FlyoutDrilldownWizard> component

* feat: 🎸 introduce React context for drilldowns flyout

* refactor: 💡 rename drilldown manager component

* refactor: 💡 rename drilldown manager in example plugin

* refactor: 💡 rename folder to "containers"

* feat: 🎸 use drilldown context to store UI state

* chore: 🤖 fix linter errors

* refactor: 💡 move Drilldown Manager into its own folder

* feat: 🎸 add drilldown state management

* feat: 🎸 add <PresentablePicker> component

* chore: 🤖 clean up component props

* feat: 🎸 add <ActionFactoryPicker> component

* feat: 🎸 connect action factory picker component

* chore: 🤖 cleanup

* feat: 🎸 start work on <DrilldownForm>

* feat: 🎸 add <TriggerPicker> component

* test: 💍 add <TriggerPicker> stories

* feat: 🎸 add <DrilldownForm> component

* refactor: 💡 remove ActionFactory from <DrilldownForm>

* feat: 🎸 connect <DrilldownForm> component

* feat: 🎸 improve new drilldown connected form

* fix: 🐛 correct TypeScript types

* feat: 🎸 show trigger intersection in the UI

* feat: 🎸 add <ActionFactory> component

* feat: 🎸 show connected <ActionFactoryView> component

* feat: 🎸 use a single action factory control

* fix: 🐛 remove unused props

* refactor: 💡 improve create drilldown form

* fix: 🐛 correct hello bar close callback

* feat: 🎸 connect welcome message state to local storage

* fix: 🐛 correct TypeScript errors

* fix: 🐛 hide correctly hello bar

* feat: 🎸 add drilldown creation logic

* feat: 🎸 connect event list state

* fix: 🐛 correct story props

* fix: 🐛 correct typescript errors

* feat: 🎸 navigate to list view when drilldown is created

* feat: 🎸 add EUI tabs

* feat: 🎸 connect route state to tabs

* refactor: 💡 move flyout content into a separate component

* refactor: 💡 move manager tabs into a separate component

* chore: 🤖 delete unused variables

* feat: 🎸 make drilldowns title dynamic

* docs: ✏️ update README

* feat: 🎸 add <DrilldownManagerTitle> component

* feat: 🎸 make flyout footer dynamic

* refactor: 💡 make action factory state depend on the route

* feat: 🎸 create standalone new drilldown form

* fix: 🐛 support i18n in new drilldown form

* feat: 🎸 add space between action factory picker

* refactor: 💡 simplify <DrilldownManagerContent>

* feat: 🎸 add back chevron button to drilldown flyout

* chore: 🤖 remove unused translations

* chore: 🤖 delete unused translation file

* feat: 🎸 add <DrilldownManagerFooter> and improve title comp

* feat: 🎸 improve <CreateDrilldownForm>

* refactor: 💡 improve variable name

* feat: 🎸 add isValid() to drilldown state

* refactor: 💡 move drilldown hello bar into a seprate component

* feat: 🎸 show drilldown list on "Manage" tab

* refactor: 💡 improve drilldown list component

* feat: 🎸 connect drill list comp to delete and edit functional

* feat: 🎸 support form disabling when drill creation in progress

* feat: 🎸 connect drilldown edit form

* feat: 🎸 use /manage route for editing drilldowns

* fix: 🐛 render constant action factory in edit mode

* refactor: 💡 move drilldown footer submit button in a sep comp

* feat: 🎸 connect editing to drilldown edit form

* feat: 🎸 disable edit buttons when list has selection

* chore: 🤖 remove unused code

* feat: 🎸 show error if delete fails

* chore: 🤖 remove legacy code

* feat: 🎸 improve drilldown table component

* fix: 🐛 fix "Trigger" translation

* fix: 🐛 import correct drilldown table item

* feat: 🎸 handle empty name errors

* feat: 🎸 track config error in drilldown state

* feat: 🎸 track drilldown state trigger errors

* fix: 🐛 pre-select trigger if only one trigger is available

* feat: 🎸 add drilldown template interface

* feat: 🎸 progress on drilldown cloning list

* feat: 🎸 use table view to display drilldown cloning templates

* feat: 🎸 generate drilldown templates from embeddable siblings

* feat: 🎸 improve drilldown template generation logic

* feat: 🎸 improve drilldown template preview

* feat: 🎸 improve start from template table view

* feat: 🎸 show number of items to be cloned

* feat: 🎸 add ID to drilldown templates

* feat: 🎸 implement basic cloning functionality

* feat: 🎸 add ability to create drilldown from existing one

* feat: 🎸 improve cloning behaviour

* feat: 🎸 improve icon of templates

* feat: 🎸 remove "Start from template" accordion

* feat: 🎸 improve cloning table view

* feat: 🎸 add "Triggers" column

* feat: 🎸 enable drilldown actions in "edit" mode

* fix: 🐛 reset drilldown state cache by factory on new creation

* refactor: 💡 use in-memory table for drilldown template list

* feat: 🎸 add search box to drilldown template in-memory table

* feat: 🎸 show back chevron on no steps back, to close flyout

* feat: 🎸 show notification when drilldown was just cloned

* feat: 🎸 add i18n to cloning notification, and move to sep comp

* feat: 🎸 add support for plural and singular in translation

* feat: 🎸 make new drilldown names unique with (copy x) at end

* feat: 🎸 rename cloning to copying

* feat: 🎸 show incompatible trigger warning in template list

* refactor: 💡 craete text with icon component

* feat: 🎸 show trigger warning in manage view

* refactor: 💡 use <TextWithIcon> in drilldown table view

* feat: 🎸 add <TriggerLineItem> component

* feat: 🎸 show tooltip on incompatible icon hover

* feat: 🎸 unify tooltips in <TextWithIcon> component

* feat: 🎸 enable sorting in drilldown tables

* fix: 🐛 correct ui actions x-pack typescript errors

* fix: 🐛 correct ui actions example plugin errors

* docs: ✏️ update autogenerated docs

* chore: 🤖 remove unused translations

* test: 💍 remove implementation from todo placeholders

* test: 💍 fix dashboard drilldown functional test

* chore: 🤖 remove unused constants

* test: 💍 fix url drilldown functional test

* test: 💍 add drilldown manager state tests

* feat: 🎸 dont show back button when no more steps back

* feat: 🎸 pre-fill in drilldown name

* feat: 🎸 add copy suffix when creating new drilldown

* feat: 🎸 close flyout if opened in create mode

* feat: 🎸 dont close flyout if user navigated to "manage" tab

* feat: 🎸 show smaller notification message on cloning

* feat: 🎸 add "(copy X)" text when cloning/copying drilldowns

* feat: 🎸 make copy prefixes start from "(copy)"

* feat: 🎸 add link to dismiss notification

* feat: 🎸 rename "Clone (x)" button to "Copy (x)"

* feat: 🎸 rename tempalte table last column copy button

* feat: 🎸 use "copied" terminology in notification

* feat: 🎸 add "Copy existing drilldown" label to template picker

* feat: 🎸 use "auto" layout on drilldown template picker table

* test: 💍 add drilldown manager tests

* feat: 🎸 swap label for title
2021-04-19 19:26:05 +02:00
Joe Reuter a2620f1c47
[Lens] improve handling of mixed axes (#97236) 2021-04-19 16:35:15 +02:00
Joe Reuter 0ea0e40331
[Lens] Better defaults for top values odering (#97099) 2021-04-19 13:49:26 +02:00
Liza Katz 4c45ae0645
[Search] enable fun-ctional tests (#97398)
* only fun-ctional

* fix functional tests

* tests

* Type
2021-04-19 12:21:50 +03:00
Sonja Krause-Harder 05bd1c0cdb
[Fleet] Finer-grained error information from install/upgrade API (#95649)
* Intercept installation errors and add meta info.

* Adjust mock.

* Catch errors in all steps of install/upgrade.

* Adjust handler for direct package upload.

* Don't throw not-found errors on assets during rollback.

* Correctly catch errors from _installPackage()

* Propagate error from installResult in bulk install case.

* Add tests for rollback.

* Remove unused code.

* Skipping test that doesn't test what it says.

* Fix and reenable test.
2021-04-18 16:47:24 +02:00
Liza Katz 1a3e033c90
[Partial Results] Move other bucket into Search Source (#96384)
* Move inspector adapter integration into search source

* docs and ts

* Move other bucket to search source

* test ts + delete unused tabilfy function

* hierarchical param in aggconfig.
ts improvements
more inspector tests

* fix jest

* separate inspect
more tests

* jest

* inspector

* Error handling and more tests

* put the fun in functional tests

* code review

* Add functional test for other bucket in search example app

* test

* test

* ts

* test

* test

* ts

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-18 12:50:02 +03:00
Catherine Liu 3b31d81196
[Dashboard] Makes lens default editor for creating new panels (#96181)
* Makes lens default editor in dashboard

Added all editors menu to dashboard panel toolbar

Fixed toggle on editor menu

Removed unnecessary comments

Added data test subjects to editor menu buttons

Populated editor menu with vis types

Removed unused imports

Fixed imports

Adds showCreateNewMenu prop to AddPanelFlyout

Rearranged order of editor menu options

Fixed ts errors

Added groupnig to embeddable factory

Use embeddable state transfer service to redirect to editors

Added showGroups to TypeSelectionState

Fixed add panel flyout test

Fixed data test subjects

Fixed factory groupings

Removed unused import

Fixed page object

Added telemtry to dashboard toolbar

Added telemtry to editor menu

Fix ml embeddable functional tests

Fix lens dashboard test

Fix empty dashboard test

Fixed ts errors

Fixed time to visualize security test

Fixed empty dashboard test

Fixed clickAddNewEmbeddableLink in dashboardAddPanel service

Fixed agg based vis functional tests

Revert test changes

Fixed typo

Fix tests

Fix more tests

Fix ts errors

Fixed more tests

Fixed toolbar sizes and margins to align with lens

Fix tests

Fixed callbacks

Fixed button prop type

New vis modal copy updates

Added savedObjectMetaData to log stream embeddable factory

Addressed feedback

Fixed ts error

Fix more tests

Fixed ts errors

Updated dashboard empty prompt copy

Adds tooltip to log stream embeddable factory saved object meta data

Made icons monochrome in toolbar

Fixed icon colors in dark mode

Cleaned up css

Fixed ts errors

Updated snapshot

Fixed map icon color

* Added tooltips for ML embeddables

* Restored test

* Added empty dashboard panel test

* Fixed i18n id

* Fix dashboard_embedding test

* Removed unused service

* Fixed i18n error

* Added icon and description properties to embeddable factory definition

* Fixed ts errors

* Fixed expected value

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-17 22:29:27 -07:00