Commit graph

10512 commits

Author SHA1 Message Date
Kibana Machine f7d8775477
[data.search] Add Kibana request to search strategy dependencies (#98566) (#100425)
* [data.search] Add Kibana request to search strategy dependencies

* Don't register internal strategy

* Update docs

Co-authored-by: Lukas Olson <olson.lukas@gmail.com>
2021-05-20 19:06:36 -04:00
Kibana Machine 533d32f7fa
Adds two more packages and moves files into the packages (#100375) (#100418)
## Summary

* Adds package `kbn-securitysolution-list-api`
* Adds package `kbn-securitysolution-list-hooks`
* Moves files into the packages
* Moves a few additional types into the other packages such as the `kbn-securitysolution-io-ts-types` package to remove more things from the shard_export/shared_import between lists and security solution
* Removes more duplicated code

### Checklist

- [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios

Co-authored-by: Frank Hassanabad <frank.hassanabad@elastic.co>
2021-05-20 16:33:34 -04:00
Alison Goryachev 6d234d1765
[CCR] Replace EuiCodeEditor with EuiCodeBlock (#100122) (#100415) 2021-05-20 15:57:43 -04:00
Kibana Machine 3e2b1fb9ab
Add back install button for integrations that aren't installed yet (#100370) (#100400)
Co-authored-by: Jen Huang <its.jenetic@gmail.com>
2021-05-20 15:01:57 +00:00
Kibana Machine ac09981bb6
Refactor away from expected error. Handle 404 as any other error. (#100383) (#100398)
Co-authored-by: Pete Hampton <pjhampton@users.noreply.github.com>
2021-05-20 10:59:53 -04:00
Ignacio Rivas f6b686490d
[Ingest pipelines] fix default paramenter for ignore_missing in csv processor (#100316) (#100396)
* fix: set ignoreMissingField to true by default
* Add missing serializer to trim fieldConfig

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

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-20 10:51:59 -04:00
Alison Goryachev 186fdf9733
Rename client integration test folders (#100119) (#100395) 2021-05-20 10:50:26 -04:00
Pierre Gayvallet 3e1e047bc4
[7.x] Migrate joi to 17.4.0 and adapt the codebase (#99899) (#100378)
* Migrate `joi` to `17.4.0` and adapt the codebase  (#99899)

* bump joi to 17.4.0, start adapting stuff

* remove custom validation rule, adapt instead

* fix error handling

* fix error handling again

* fix strings type & validation

* fix buffers and arrays

* fix bytes

* fix bytes_size type

* update conditional_type error messages in tests

* fix duration and map types

* first attempt to fix union type error messages

* revert conditional type assertions back to master state

* fix object type

* fix record type

* fix stream types

* rename test files to match sources

* fix union type tests

* temporary adapt feature/home usages of Joi

* fix lint

* adapt test assertion

* fix http config schema validation

* fix @kbn/test Config class

* fix config again

* fix reporting schema tests

* fix security solution schema

* adapt url tests

* remove useless comment

* remove space

* typo

* review comments
# Conflicts:
#	src/core/server/http/__snapshots__/http_config.test.ts.snap

* allow '0' value for server.host

* fix config def

* update snapshots
2021-05-20 09:04:31 -04:00
Jean-Louis Leysens 3629e76251
[7.x] [Screenshot mode] Create plugin to provide "screenshot mode" awareness (#99627) (#100331)
* [Screenshot mode] Create plugin to provide "screenshot mode" awareness (#99627)

* initial version of the screenshot mode service

* First iteration of client side of screenshot mode plugin

Also hooked it up to the chromium browser imitating the preload
functionality of electron to set up the environment before
code runs.

* First implementation of server-side logic for detecting
screenshot mode

* fix some type issues and do a small refactor

* fix size limits, docs and ts issues

* fixed types issues and made sure screenshot mode is correctly detected on the client

* Moved the screenshot mode header definition to common
Added a server-side example for screenshot mode
Export the screenshot mode header in both public and server

* move require() to screenshotMode plugin

* Update chromium_driver.ts

* cleaned up some comments, minor refactor in ReportingCore and
changed the screenshotmode detection function to check for a
specific value.

* fix export

* Expanded server-side screenshot mode contract with function that
checks a kibana request to determine whether we in screenshot
mode

* added comments to explain use of literal value rather than external reference

* updated comment

* update reporting example

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Timothy Sullivan <tsullivan@elastic.co>
Co-authored-by: Tim Sullivan <tsullivan@users.noreply.github.com>
# Conflicts:
#	x-pack/plugins/reporting/server/core.ts
#	x-pack/plugins/reporting/server/plugin.ts

* satisfy for tslint formatting

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-20 07:58:50 -04:00
Michael Dokolin 58d05a05e3
[Reporting] Add logging of CPU usage and memory consumption by Chromium (#99109) (#100384)
* Add logging of CPU usage by chromium
* Add logging of memory consumption by chromium
* Add PDF report byte length logging
* Add PNG report byte length logging
# Conflicts:
#	x-pack/plugins/reporting/server/browsers/chromium/driver_factory/index.ts
2021-05-20 07:52:21 -04:00
Pierre Gayvallet e1e68fe949
remove ui settings client-side validation (#100311) (#100379)
* remove ui settings client-side validation

* fix linter

* fix tests

* update generated doc
2021-05-20 07:33:58 -04:00
Kibana Machine 7d0deec6cb
[Security Solutions] Re-arranges and adds more packages to remove copied code (#100310) (#100369)
## 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

Co-authored-by: Frank Hassanabad <frank.hassanabad@elastic.co>
2021-05-19 19:56:33 -04:00
Kevin Logan 05fc567a28
[Security Solution] Add linux malware config options and migration (#100166) (#100368) 2021-05-19 19:46:58 -04:00
Kibana Machine 71fd3a793a
Cleanup package.json resolutions. (#99456) (#100365)
Co-authored-by: Aleh Zasypkin <aleh.zasypkin@gmail.com>
2021-05-19 18:33:09 -04:00
Zacqary Adam Xeper 5e6aeba0b0
[Metrics UI] Replace date_histogram with date_range aggregation in threshold alert (#100004) (#100349)
* [Metrics UI] Replace date_histogram with date_range aggregation in threshold alert

* Remove console.log

* Fix rate aggregation and offset
2021-05-19 14:41:54 -04:00
Kevin Logan 68a3585726
[Security Solution] Add supported field to ransomware (#100135) (#100343) 2021-05-19 13:39:58 -04:00
Kibana Machine 714bd3b7b8
[Maps] Add grid-resolution telemetry (#99808) (#100342)
Co-authored-by: Thomas Neirynck <thomas@elastic.co>
2021-05-19 13:34:01 -04:00
Nathan Reese 5cc4f999e4
[Maps] convert TooltipControl to typescript (#100059) (#100309)
* [Maps] convert ToolbarControl to typescript

* fix scss import

* remove unused function from APM map tooltip

* apm tslint

* pass loadFeatureGeometry to renderTooltipContent

* security_solution: pass mbProperties to loadFeatureProperties

* security_solution tslint

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

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-18 21:13:29 -04:00
Kibana Machine ae89d1ad36
[Alerting] Refactor alerts authorization client (#99078) (#100307)
* 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>

Co-authored-by: ymao1 <ying.mao@elastic.co>
2021-05-19 00:28:53 +00:00
Frank Hassanabad c48d613aca
[Security Solutions] Removes commented out "last look back date" code (#100269) (#100281)
## Summary

* Removes commented out code which promises we are going to do something past 7.11. This code has been checked in and the column of `last_look_back_date` has been removed since 7.11, which means we haven't had it for 7.11, 7.12, and now 7.13.

Related: https://github.com/elastic/kibana/pull/89801
2021-05-18 15:42:45 -04:00
David Sánchez be74b11216
[Security Solutions][Endpoint] Fixes weird 'flash' when entries does not exists on event filters page (#100203) (#100279)
* Fixes weird 'flash' when entries does not exists on event filters page. Also fixes a multilang and query when empty string

* Removes old comment

* Use function to retrieve async resource state

* Fix unit test

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

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-18 15:25:11 -04:00
Stratoula Kalafateli 62601d2d2f
[Timelion] Changes the version of removal message (#100022) (#100266)
* Change the version of timelion removal on our documentation and warnings

* Remove translations in order to be revisited

* Remove double

* Update docs/user/dashboard/timelion.asciidoc

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

* Update src/plugins/timelion/public/components/timelion_deprecation.tsx

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

* Update src/plugins/timelion/server/deprecations.ts

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

* Update src/plugins/timelion/server/deprecations.ts

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

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-18 12:28:28 -04:00
Thom Heymann d033f4171e
Simplify deleting spaces (#99960) (#100258)
* 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>
# Conflicts:
#	x-pack/plugins/spaces/public/management/spaces_management_app.tsx
2021-05-18 10:26:59 -04:00
Kibana Machine ac4173058e
[Lens] Specify Y axis extent (#99203) (#100255)
Co-authored-by: Joe Reuter <johannes.reuter@elastic.co>
2021-05-18 08:33:04 -04:00
Kibana Machine ee3c3c6f63
Migrate from Joi to @kbn/config-schema in "home" and "features" plugins (#100201) (#100254)
* add a link for issue to remove circular deps

* features: migrate from joi to config-schema

* update tests

* migrate home tutorials to config-schema

* migrate home dataset validation to config schema

* remove unnecessary type. we cannot guarantee this is a valid SO

* address Pierres comments

Co-authored-by: Mikhail Shustov <restrry@gmail.com>
2021-05-18 08:30:05 -04:00
Kibana Machine 2fa9800396
[Lens] Debounce axis name inputs mob programming (#100108) (#100251)
Co-authored-by: Marta Bondyra <marta.bondyra@gmail.com>
2021-05-18 06:16:03 -04:00
Kibana Machine 18e6085370
[Security Solutions] Replaces most deprecated io-ts alerting and list types (#100234) (#100246)
## 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

Co-authored-by: Frank Hassanabad <frank.hassanabad@elastic.co>
2021-05-18 03:23:28 -04:00
Kibana Machine c0f46471c1
[Uptime] [Synthetics Integration] Add functional tests for Synthetics Integration (#100161) (#100242)
* add functional tests for synthetics fleet package

Co-authored-by: Dominique Clarke <doclarke71@gmail.com>
2021-05-17 18:42:11 -04:00
Kibana Machine 7c6b5b4a37
[ML] Fixing use_null setting in advanced job wizard (#100028) (#100239)
* [ML] Fixing use_null setting in advanced job wizard

* fixing types

* fixing false checks for detector fields

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

Co-authored-by: James Gowdy <jgowdy@elastic.co>
2021-05-17 18:00:47 -04:00
Kibana Machine 98992e6250
Update Timeline Template README.md (#95814) (#100237)
## Summary

`xpack.security_solution.signalsIndex` is listed to be added to `kibana.dev.yml`, however that generates:
```
FATAL  Error: Unknown configuration key(s): "xpack.security_solution.signalsIndex". \
Check for spelling errors and ensure that expected plugins are installed.
```
I think this should be `xpack.securitySolution.signalsIndex`

This is for the steps to create a timeline template.

### Checklist

Delete any items that are not applicable to this PR.

- [x] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials

### For maintainers

- [ ] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

Co-authored-by: Andrew Pease <7442091+peasead@users.noreply.github.com>
2021-05-17 12:52:05 -07:00
Tim Sullivan d15dc4cba8
[Reporting] Switch Mac Chromium to the internally-hosted custom build (#100165) (#100233)
* switch mac chromium download location to kibana team gcs

* oops, fix the path to the binary

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

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-17 15:21:27 -04:00
Kibana Machine 4b712fda4b
[kbn/test] move types/ftr into src (#99555) (#100228)
* [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>

Co-authored-by: Spencer <email@spalger.com>
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-05-17 14:49:48 -04:00
Catherine Liu 2bb2fc280d
[Canvas] Fix column object shape in datatable created by CSV function (#98561) (#100225)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-17 14:37:42 -04:00
Kibana Machine eb20988b98
[Security Solution][Endpoint] Refactor Host Isolation component used in Isolate use case (#100159) (#100220)
* EndpointHostIsolateForm component
* Refactor Detections Host isolation flyout to use isolateform

Co-authored-by: Paul Tavares <56442535+paul-tavares@users.noreply.github.com>
2021-05-17 17:13:54 +00:00
Kibana Machine 8e36787829
[Fleet] Fix migration 7.12 to 7.13 migrate settings (#100054) (#100217)
Co-authored-by: Nicolas Chaulet <nicolas.chaulet@elastic.co>
2021-05-17 12:22:24 -04:00
Nicolas Chaulet 7dcf8b8950
[Fleet] Improve fleet server upgrade modal (#99796) (#100215) 2021-05-17 12:19:31 -04:00
Kibana Machine 8f3c373b2c
[Fleet] Fix error when searching for keys whose names have spaces (#100056) (#100212)
## 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

Co-authored-by: John Schulz <john.schulz@elastic.co>
2021-05-17 15:13:53 +00:00
Tiago Costa 407d09283c
skip flaky suite #(95899) 2021-05-17 16:06:14 +01:00
Ignacio Rivas 65edf8ea99
[Ingest pipelines] add support for registered_domain processor (#99643) (#100210)
The Ingest Node Pipelines UI added support to configure a registered domain processor. This processor extracts the registered domain, sub-domain and top-level domain from a fully qualified domain name.
2021-05-17 10:39:08 -04:00
Jean-Louis Leysens a0d6476044
[Reporting] Added appropriate table caption for table listing generated reports (#100118) (#100204)
* added appropriate table caption for table listing generated reports

* updated jest snapshot

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

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-17 09:36:20 -04:00
Kibana Machine fe148363e1
[Uptime] [Synthetics Integration] update tls passphrase and http password field to use EuiFieldPassword (#100162) (#100194)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Dominique Clarke <doclarke71@gmail.com>
2021-05-16 20:03:30 -04:00
Kibana Machine acefcfaff4
[App Search] Allow user to manage source engines through Kibana UX (#98866) (#100187)
* New bulk create route for meta engine source engines

* New delete route for meta engine source engines

* Add removeSourceEngine and onSourceEngineRemove to SourceEnginesLogicActions

* New SourceEnginesTable component

* Use new SourceEnginesTable component in SourceEngines view

* Added closeAddSourceEnginesModal and openAddSourceEnginesModal to SourceEnginesLogic

* New AddSourceEnginesModal component

* New AddSourceEnginesButton component

* Add AddSourceEnginesButton and AddSourceEnginesModal to SourceEngines view

* Allow user to select source engines to add

* Add addSourceEngines and onSourceEnginesAdd to SourceEnginesLogic

* Submit new source engines when user saves from inside AddSourceEnginesModal

* Fix failing tests

* fix i18n

* Fix imports

* Use body instead of query params for source engines bulk create endpoint

* Tests for SouceEnginesLogic actions setIndexedEngines and fetchIndexedEngines

* Re-enabling two skipped tests

* Feedback: move source engine APIs to own file

- We generally organize routes/logic etc. by view, and since this is its own view, it can get its own file

* Misc UI polish

Table:
- Add EuiPageContent bordered panel (matches Curations & API logs which is a table in a panel)
- Remove bolding on engine name (matches rest of Kibana UI)
- Remove responsive false (we do want responsive tables in Kibana)

Modal:
- Remove EuiOverlayMask - per recent EUI changes, this now comes baked in with EuiModal
- Change description text to subdued to match other modals (e.g. Curations queries) in Kibana

* Misc i18n/copy tweaks

Modal:
- Add combobox placeholder text
- i18n cancel/save buttons
- inline i18n and change title casing to sentence casing

* Table refactors

- DRY out table columns shared with the main engines tables (title & formatting change slightly from the standalone UI, but this is fine / we should prefer Kibana standardization moving forward)
- Actions column changes
  - Give it a name - axe will throw issues for table column missing headings
  - Do not make actions a conditional empty array - we should opt to remove the column totally if there is no content present, otherwise screen readers will read out blank cells unnecessarily
  - Switch to icons w/ description tooltips to match the other Kibana tables
- Remove unnecessary sorting props (we don't have sorting enabled on any columns)

Tests
- Add describe block for organization
- Add missing coverage for window confirm branch and canManageMetaEngineSourceEngines branch

* Modal test fixes

- Remove unnecessary type casting
- Remove commented out line
- Fix missing onChange function coverage

* Modal: move unmemoized array iterations to Kea selectors

- more performant: kea selectors are memoized
- cleaner/less logic in views
- easier to write unit tests for

+ rename setSelectedEngineNamesToAdd to onAddEnginesSelection
+ remove unused selectors test code

* Modal: Add isLoading UX to submit button + value renames

- isLoading prevents double clicks/dupe events, and also provides a responsive UX hint that something is happening

- Var renames: there's only one modal on the page, being extra specific with the name isn't really necessary. If we ever add more than one to this view it would probably make sense to split up the logic files or do something else. Verbose modal names/states shouldn't necessarily be the answer

* Source Engines view test fixes

- Remove unused mock values/actions
- Move constants to within main describe
- Remove unhappy vs happy path describes - there aren't enough of either scenario to warrant the distinction
- add page actions describe block and fix skipped/mounted test by shallow diving into EuiPageHeader

* [Misc] Single components/index.ts export

For easier group importing

* Move all copy consts/strings to their own i18n constants file

* Refactor recursive fetchEngines fn to shared util

+ update MetaEnginesTableLogic to use new helper/DRY out code
+ write unit tests for just that helper
+ simplify other previous logic checks to just check that the fn was called + add mock

* Tests cleanup

- Move consts into top of describe blocks to match rest of codebase
- Remove logic comments for files that are only sourcing 1 logic file
- Modal:
  - shallow is fairly cheap and it's easier / more consistent w/ other tests to start a new wrapper every test
- Logic:
  - Remove unnecessarily EnginesLogic mocks
  - Remove mount() in beforeEach - it doesn't save us that many extra lines / better to be more consistent when starting tests that mount with values vs not
  - mock clearing in beforeEach to match rest of codebase
  - describe blocks: split up actions vs listeners, move selectors between the two
  - actions: fix tests that are in a describe() but not an it() (incorrect syntax)
  - Reducer/value checks: check against entire values obj to check for regressions or untested reducers & be consistent rest of codebase
  - listeners - DRY out beforeEach of success vs error paths, combine some tests that are a bit repetitive vs just having multiple assertions
- Logic comments:
  - Remove unnecessary comments (if we're not setting a response, it seems clear we're not using it)
  - Add extra business logic context explanation as to why we call re-initialize the engine

Co-authored-by: Constance Chen <constance.chen.3@gmail.com>

Co-authored-by: Byron Hulcher <byronhulcher@gmail.com>
Co-authored-by: Constance Chen <constance.chen.3@gmail.com>
2021-05-15 03:07:04 -04:00
Kibana Machine a37a0c1d15
[Security Solutions] Removes deprecation and more copied code between security solutions and lists plugin (#100150) (#100180)
## Summary

* Removes deprecations 
* Removes duplicated code

### Checklist

- [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios

Co-authored-by: Frank Hassanabad <frank.hassanabad@elastic.co>
2021-05-14 20:52:48 -04:00
Kibana Machine c3b4caa223
[App Search] Meta engines schema view (#100087) (#100175)
* Set up TruncatedEnginesList component

- Used for listing source engines
- New in Kibana: now links to source engine schema pages for easier schema fixes!

* Add meta engines schema active fields table

* Render meta engine schema conflicts table & warning callout

* Update x-pack/plugins/enterprise_search/public/applications/app_search/components/schema/components/truncated_engines_list.tsx

Co-authored-by: Jason Stoltzfus <jastoltz24@gmail.com>

Co-authored-by: Jason Stoltzfus <jastoltz24@gmail.com>

Co-authored-by: Constance <constancecchen@users.noreply.github.com>
Co-authored-by: Jason Stoltzfus <jastoltz24@gmail.com>
2021-05-14 20:07:49 -04:00
Kibana Machine e68e31e4d0
[Uptime] Improve accessibility labeling for FilterPopover component (#99714) (#100173)
* Improve accessibility labeling for `FilterPopover` component.

* Simplify test revisions.

* Simplify unit test.

* Refactor test to use text formatter helper functions.

Co-authored-by: Justin Kambic <justin.kambic@elastic.co>
2021-05-14 19:09:26 -04:00
Kibana Machine 1b2313fd20
[Lens] Create managedReference type for formulas (#99729) (#100170)
* [Lens] Create managedReference type for formulas

* Fix test failures

* Fix i18n types

* Delete managedReference when replacing

* Tests for formula

* Refactoring from code review

Co-authored-by: Joe Reuter <johannes.reuter@elastic.co>
Co-authored-by: Marco Liberati <marco.liberati@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Wylie Conlon <william.conlon@elastic.co>
Co-authored-by: Joe Reuter <johannes.reuter@elastic.co>
Co-authored-by: Marco Liberati <marco.liberati@elastic.co>
2021-05-14 19:04:31 -04:00
Kibana Machine 1824ef8f77
Sharing saved objects phase 3 (#94383) (#100158)
Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com>
2021-05-14 16:43:17 -04:00
Kibana Machine 58d35cc12f
[APM][RUM] adjust data types for uiFilters and range in APM requests (#99257) (#100152)
* update has_rum_data api query types

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

Co-authored-by: Dominique Clarke <doclarke71@gmail.com>
2021-05-14 16:04:51 -04:00
Kibana Machine 38b18d9f30
[Observability] [Exploratory view] update v7 button styles (#100113) (#100141)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Dominique Clarke <doclarke71@gmail.com>
2021-05-14 14:12:36 -04:00
Yuliia Naumenko 8df5efa83f
[Alerting] Enabling import of rules and connectors (#99857) (#100128)
* [Alerting] Enabling import of rules and connectors

* changed export to set pending executionStatus for rule

* fixed tests

* added docs

* Apply suggestions from code review

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

* fixed docs

* fixed docs

* Update x-pack/plugins/alerting/server/saved_objects/get_import_warnings.ts

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

* fixed test

* fixed test

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

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
2021-05-14 12:57:59 -04:00