Commit graph

12328 commits

Author SHA1 Message Date
IgorG bf758312cd
New events resolver (#82170)
* Added Test for event.library

* renamed data directry and gzip data file

* rename expectedData file

* Changes per Charlie request

* Changes for the enable_APM-ci branch

* Update resolver.ts

* Added comment per Charlie request

* Update resolver.ts

* Added Alert Test for Resolver and fix for the APM enabled Run fail

* Added Alert Test for Resolver and fix for the APM enabled Run fail

* removed commented out code

* Fixing CI fail

* Fixing CI fail

* Removed Alert Resolver test

* aAdding Alert test back

* Adding Alert test back

* Adding Alert test back

* Adding info log for debuging

* Adding info log for debuging

* Adding info log for debuging

* Adding info log for debuging

* Adding info log for debuging

* Adding info log for debuging

* adding one more verification for Data

* stripedd Data file

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-09 14:35:16 -08:00
Constance 04c583e2b0
[App Search] Misc naming tech debt (#82770)
* Rename `engine_overview` folder to `engines`

- To better match ent-search folder structure
- Also rename/clarify pluralization of "Engines" where possible, to distinguish between individual Engine Overview pages

* DRY out Engines and Meta Engines titles

* DRY out Credentials title

* DRY out Settings title

* DRY out Role Mappings title

* Update localization keys to match changes

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-09 14:10:22 -08:00
Luke Elmers c6afc47f32
Remove data <--> expressions circular dependencies. (#82685) 2020-11-09 13:01:22 -07:00
Larry Gregory 48dbf9d653
Add captions to user and space grid pages (#82713)
* Add captions to user and space grid pages

* Address PR feedback: reword captions

* remove unused i18n values

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-09 14:16:18 -05:00
Christiane (Tina) Heiligers fdb9d76fbd
Uses asCurrentUser in getClusterUuid (#82908)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-09 10:31:21 -07:00
Steph Milovic e1b7073a64
[Alerting][Connectors] Add new executor subaction to get 3rd party case fields (#82519) 2020-11-09 10:08:00 -07:00
Lee Drengenberg 1885dda6e6
Fix test import objects (#82767)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-09 11:01:33 -06:00
Quynh Nguyen 9c984f4723
[ML] Add option for anomaly charts for metric detector should plot min, mean or max as appropriate (#81662) 2020-11-09 10:41:04 -06:00
DeFazio 2c05957582
Update alert type selection layout to rows instead of grid (#73665)
* Update layout to rows for alert types

* Fix gutter usage

* Update heading, remove icons

* Non-working update to the combo box

* Add incorrect updates with questions to fix

* Fix combo box

* Cleanup changes to specific to this module

* fixed type checks and made combobox always visible

* Added groups by producer

* Added get producer name from kibana features names

* Added search bar with list of alert types

* Added search support functionality

* fixed links to alert type

* added alert type title

* Fixed failing tests

* Design updates to list

* Remove unsed items in import list

* fixed merge issue

* Fixed due to comments

* fixed tests

* Design fixes

Co-authored-by: Yuliia Naumenko <yuliia.naumenko@elastic.com>
2020-11-09 08:38:39 -08:00
Aleh Zasypkin 45ddd69ca2
Prevent Kerberos and PKI providers from initiating a new session for unauthenticated XHR/API requests. (#82817)
* Prevent Kerberos and PKI providers from initiating a new session for unauthenticated XHR requests.

* Review#1: fix comment.
2020-11-09 17:34:20 +01:00
Nicolas Chaulet 441a0d4ec9
[Fleet] Move ingestManager plugin to fleet (#82886) 2020-11-09 11:07:04 -05:00
Jason Stoltzfus d5736b10a9
[Enterprise Search] Log retention settings logic (#82364) 2020-11-09 10:46:19 -05:00
Marco Liberati 97e2dc853b
[Lens] Extend Datasource props validation with VisualizationGroups (#82607)
*  First pass with visualization validation + error messages

* 🔥 Remove indexpattern error handling for now

* 🏷️ Fix type issues

*  Add getErrorMessage test for data table

*  Add tests for pie and metric error messages

* 🌐 Fix i18n checks issues

* 🐛 Fix last issue

*  Add more tests for the XY visualization validation code

* 👌 Included all feedback from first review

* ✏️ Off by one message

* 🌐 Fix i18n duplicate id

* 🌐 Fix last i18n issue

* 🐛 Fixed a hook reflow issue

* ♻️+ Reworked validation flow + tests

* 🏷️ Fix type issue

* 🐛 Improved XY corner cases validation logic

* 🐛 Fix empty datatable scenario

*  +  Improved error messages for invalid datasources + tests

* 🌐 Add missing i18n translation

* 🏷️ Fix type issues

* 🌐 Fix i18n issues

*  Filter out suggestions which fail to build

* 🚚 Migrate datatable validation logic to the building phase, handling it as building state

* 🏷️ Fix type issue

* ✏️ Add comment for future enhancements

* ✏️ Updated comment

* :world_with_meridians: Refactor axis labels

* 🌐 Reworked few validation messages

* 🐛 Fix break down validation + percentage charts

*  Align tests with new validation logic

* ♻️ Fix suggestion panel validation to match main panel

* 🌐 Fix i18n issues

* 🔧 Fix some refs for validation checks in suggestions

* 🐛 Fix missing key prop in multiple errors scenario

* 🐛 Fix swtich issue from XY to partition

* 🌐 Fix i18n messages and aligned tests

* 🐛 Fix suggestions switching bug

* :refactor: Add more validation + refactored validation logic in a single place

* ✏️ Add note about lint hooks disable rule

* 🚨 Fix linting issue

* 🏗️ Add infra API for datasource advanced validation

*  Align tests with new API

*  Fix type issues in tests

* 👌 Early exists added

*  Add layers groups to the API

*  Fix some broken test after the validation change

* 👌 Move to disctionary shape

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-09 15:22:21 +01:00
Cauê Marcondes 0217073b8f
[APM] Transition to Elastic charts for all relevant APM charts (#80298)
* adding elastic charts

* fixing some stuff

* refactoring

* fixing ts issues

* fixing unit test

* fix i18n

* adding isLoading prop

* adding annotations toggle, replacing transaction error rate to elastic chart

* adding loading state

* adding empty message

* fixing i18n

* removing unused files

* fixing i18n

* removing e2e test since elastic charts uses canvas

* addressing pr comments

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-09 11:03:07 -03:00
Dhruv Bodani c78cf35ba8
Added defaultActionMessage to index threshold alert UI type definition (#80936)
* resolves https://github.com/elastic/kibana/issues/78148

Adds a `defaultActionMessage` to the index threshold alert, so that the `message` parameter for actions will be pre-filled with a useful message
2020-11-09 08:35:05 -05:00
Jean-Louis Leysens f2f76e104a
[ILM] Migrate Delete phase and name field to Form Lib (#82834)
* remove use of legacy state system and legacy serialization

* remove legacy min_age input component and re-add missing import

* rename shared -> shared_fields for more clarity

* some more cleanup and fixing regressions on policy name for creating new policy from existing policy

* move extract policy static code to lib folder and remove "policies" dir from services

* fix jest tests and minor policy flyout inconsistency

* remove legacy helper

* fix client integration tests

* fix min for set index priority

* moved save policy function into edit policy section

* remove unused translations

* refactor form files to own edit_policy/form folder

* remove "fix errors" badge to fix UX - users can see errors in line before pressing save so the value of this badge has diminished

* fix i18n after removing phase error badge

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-09 14:29:53 +01:00
Tiago Costa d1ef0d6704
skip flaky suite (#57426) 2020-11-09 13:11:51 +00:00
Gidi Meir Morris 3c525d7341
[Alerting] adds an Run When field in the alert flyout to assign the action to an Action Group (#82472)
Adds a `RunsWhen` field to actions in the Alerts Flyout when creating / editing an Alert which allows the user to assign specific actions to a certain Action Groups
2020-11-09 12:56:56 +00:00
Dario Gieselaar 858befef44
[APM] Expose APM event client as part of plugin contract (#82724)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-09 13:46:46 +01:00
Alejandro Fernández Gómez 6110ef82a3
[Logs UI] Fix errors during navigation (#78319)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-09 12:43:11 +01:00
John Schulz 3e211e938b
[Ingest Manager] Unify install* under installPackage (#82916)
## Summary

  * Add `installPackage` with `installSource` param, to provide a single interface the `install*` functions.
    ```diff
    -    const res = await installPackageFromRegistry({
    +    const res = await installPackage({
    +      installSource: 'registry',
    ```
    and
    ```diff
    -    const res = await installPackageByUpload({
    +    const res = await installPackage({
    +      installSource: 'upload',
    ```
  * Push some repeated work (`install`, `removable`) from `install*` into `_installPackage`. Which also simplifies its interface.

### installPackage

For now `installPackage` checks the `installSource` and calls the same `install*` functions to prevent any change in behavior but there's still a lot of overlap between `installPackageFromRegistry` & `installPackageByUpload`. I think we can bring them together into `installPackage` using the same branching on `installSource`.

### local checks with curl
<details><summary>curl request/responses for happy path:</summary>

```
## zip:
curl -X POST -u elastic:changeme http://localhost:5601/api/fleet/epm/packages --data-binary @$KIBANA_HOME/x-pack/test/ingest_manager_api_integration/apis/fixtures/direct_upload_packages/apache_0.1.4.zip -H 'kbn-xsrf: xyz' -H 'Content-Type: application/zip'
{"response":[{"id":"apache-Logs-Apache-Dashboard-ecs","type":"dashboard"},{"id":"apache-Metrics-Apache-HTTPD-server-status-ecs","type":"dashboard"},{"id":"Apache-HTTPD-CPU-ecs","type":"visualization"},{"id":"Apache-HTTPD-Hostname-list-ecs","type":"visualization"},{"id":"Apache-HTTPD-Load1-slash-5-slash-15-ecs","type":"visualization"},{"id":"Apache-HTTPD-Scoreboard-ecs","type":"visualization"},{"id":"Apache-HTTPD-Total-accesses-and-kbytes-ecs","type":"visualization"},{"id":"Apache-HTTPD-Uptime-ecs","type":"visualization"},{"id":"Apache-HTTPD-Workers-ecs","type":"visualization"},{"id":"Apache-access-unique-IPs-map-ecs","type":"visualization"},{"id":"Apache-browsers-ecs","type":"visualization"},{"id":"Apache-error-logs-over-time-ecs","type":"visualization"},{"id":"Apache-operating-systems-ecs","type":"visualization"},{"id":"Apache-response-codes-of-top-URLs-ecs","type":"visualization"},{"id":"Apache-response-codes-over-time-ecs","type":"visualization"},{"id":"Apache-HTTPD-ecs","type":"search"},{"id":"Apache-access-logs-ecs","type":"search"},{"id":"Apache-errors-log-ecs","type":"search"}]}

## Uploaded packages can be deleted as expected:
curl -X DELETE -u elastic:changeme http://localhost:5601/api/fleet/epm/packages/apache-0.1.4 -H 'kbn-xsrf: xxx'
{"response":[{"id":"apache-Logs-Apache-Dashboard-ecs","type":"dashboard"},{"id":"apache-Metrics-Apache-HTTPD-server-status-ecs","type":"dashboard"},{"id":"Apache-HTTPD-CPU-ecs","type":"visualization"},{"id":"Apache-HTTPD-Hostname-list-ecs","type":"visualization"},{"id":"Apache-HTTPD-Load1-slash-5-slash-15-ecs","type":"visualization"},{"id":"Apache-HTTPD-Scoreboard-ecs","type":"visualization"},{"id":"Apache-HTTPD-Total-accesses-and-kbytes-ecs","type":"visualization"},{"id":"Apache-HTTPD-Uptime-ecs","type":"visualization"},{"id":"Apache-HTTPD-Workers-ecs","type":"visualization"},{"id":"Apache-access-unique-IPs-map-ecs","type":"visualization"},{"id":"Apache-browsers-ecs","type":"visualization"},{"id":"Apache-error-logs-over-time-ecs","type":"visualization"},{"id":"Apache-operating-systems-ecs","type":"visualization"},{"id":"Apache-response-codes-of-top-URLs-ecs","type":"visualization"},{"id":"Apache-response-codes-over-time-ecs","type":"visualization"},{"id":"Apache-HTTPD-ecs","type":"search"},{"id":"Apache-access-logs-ecs","type":"search"},{"id":"Apache-errors-log-ecs","type":"search"}]}

## Now upload
curl -X POST -u elastic:changeme http://localhost:5601/api/fleet/epm/packages --data-binary @$KIBANA_HOME/x-pack/test/ingest_manager_api_integration/apis/fixtures/direct_upload_packages/apache_0.1.4.tar.gz -H 'kbn-xsrf: xyz' -H 'Content-Type: application/gzip'
{"response":[{"id":"apache-Metrics-Apache-HTTPD-server-status-ecs","type":"dashboard"},{"id":"apache-Logs-Apache-Dashboard-ecs","type":"dashboard"},{"id":"Apache-access-unique-IPs-map-ecs","type":"visualization"},{"id":"Apache-HTTPD-CPU-ecs","type":"visualization"},{"id":"Apache-HTTPD-Load1-slash-5-slash-15-ecs","type":"visualization"},{"id":"Apache-response-codes-over-time-ecs","type":"visualization"},{"id":"Apache-HTTPD-Workers-ecs","type":"visualization"},{"id":"Apache-HTTPD-Hostname-list-ecs","type":"visualization"},{"id":"Apache-error-logs-over-time-ecs","type":"visualization"},{"id":"Apache-HTTPD-Scoreboard-ecs","type":"visualization"},{"id":"Apache-HTTPD-Uptime-ecs","type":"visualization"},{"id":"Apache-operating-systems-ecs","type":"visualization"},{"id":"Apache-HTTPD-Total-accesses-and-kbytes-ecs","type":"visualization"},{"id":"Apache-browsers-ecs","type":"visualization"},{"id":"Apache-response-codes-of-top-URLs-ecs","type":"visualization"},{"id":"Apache-access-logs-ecs","type":"search"},{"id":"Apache-errors-log-ecs","type":"search"},{"id":"Apache-HTTPD-ecs","type":"search"},{"id":"logs-apache.error-0.1.4","type":"ingest_pipeline"},{"id":"logs-apache.access-0.1.4","type":"ingest_pipeline"},{"id":"logs-apache.error","type":"index_template"},{"id":"metrics-apache.status","type":"index_template"},{"id":"logs-apache.access","type":"index_template"}]}
```
</details>

<details><summary>curl request/responses for archive errors:</summary>

```
## Wrong content type:
### tar.gz with application/zip:
curl -X POST -u elastic:changeme http://localhost:5601/api/fleet/epm/packages --data-binary @$KIBANA_HOME/x-pack/test/ingest_manager_api_integration/apis/fixtures/direct_upload_packages/apache_0.1.4.tar.gz -H 'kbn-xsrf: xyz' -H 'Content-Type: application/zip'
{"statusCode":400,"error":"Bad Request","message":"Error during extraction of package: Error: end of central directory record signature not found. Assumed content type was application/zip, check if this matches the archive type."}

### zip with application/gzip:
curl -X POST -u elastic:changeme http://localhost:5601/api/fleet/epm/packages --data-binary @$KIBANA_HOME/x-pack/test/ingest_manager_api_integration/apis/fixtures/direct_upload_packages/apache_0.1.4.zip -H 'kbn-xsrf: xyz' -H 'Content-Type: application/gzip'
{"statusCode":400,"error":"Bad Request","message":"Archive seems empty. Assumed content type was application/gzip, check if this matches the archive type."}

## Invalid packages
### Two top-level directories:
curl -X POST -u elastic:changeme http://localhost:5601/api/fleet/epm/packages --data-binary @$KIBANA_HOME/x-pack/test/ingest_manager_api_integration/apis/fixtures/direct_upload_packages/apache_invalid_two_toplevels_0.1.4.zip -H 'kbn-xsrf: xyz' -H 'Content-Type: application/zip'
{"statusCode":400,"error":"Bad Request","message":"Package contains more than one top-level directory."}

### No manifest:
curl -X POST -u elastic:changeme http://localhost:5601/api/fleet/epm/packages --data-binary @$KIBANA_HOME/x-pack/test/ingest_manager_api_integration/apis/fixtures/direct_upload_packages/apache_invalid_no_manifest_0.1.4.zip -H 'kbn-xsrf: xyz' -H 'Content-Type: application/zip'
{"statusCode":400,"error":"Bad Request","message":"Package must contain a top-level manifest.yml file."}

### Invalid YAML in manifest:
curl -X POST -u elastic:changeme http://localhost:5601/api/fleet/epm/packages --data-binary @$KIBANA_HOME/x-pack/test/ingest_manager_api_integration/apis/fixtures/direct_upload_packages/apache_invalid_manifest_invalid_yaml_0.1.4.zip -H 'kbn-xsrf: xyz' -H 'Content-Type: application/zip'
{"statusCode":400,"error":"Bad Request","message":"Could not parse top-level package manifest: YAMLException: bad indentation of a mapping entry at line 2, column 7:\n      name: apache\n          ^."}

### Mandatory field missing in manifest:
curl -X POST -u elastic:changeme http://localhost:5601/api/fleet/epm/packages --data-binary @$KIBANA_HOME/x-pack/test/ingest_manager_api_integration/apis/fixtures/direct_upload_packages/apache_invalid_manifest_missing_field_0.1.4.zip -H 'kbn-xsrf: xyz' -H 'Content-Type: application/zip'
{"statusCode":400,"error":"Bad Request","message":"Invalid top-level package manifest: one or more fields missing of name, version, description, type, categories, format_version"}

### Top-level directory doesn't match name and version from manifest:
curl -X POST -u elastic:changeme http://localhost:5601/api/fleet/epm/packages --data-binary @$KIBANA_HOME/x-pack/test/ingest_manager_api_integration/apis/fixtures/direct_upload_packages/apache_invalid_toplevel_mismatch_0.1.4.zip -H 'kbn-xsrf: xyz' -H 'Content-Type: application/zip'
{"statusCode":400,"error":"Bad Request","message":"Name thisIsATypo and version 0.1.4 do not match top-level directory apache-0.1.4"}
```
</details>

#### TS type check examples on `installPackage`
<details><summary>screenshots</summary>

<img width="379" alt="Screen Shot 2020-11-08 at 4 00 14 PM" src="https://user-images.githubusercontent.com/57655/98484251-1d1e9f80-21dc-11eb-93f8-601036b45355.png">
<img width="890" alt="Screen Shot 2020-11-08 at 4 00 21 PM" src="https://user-images.githubusercontent.com/57655/98484252-1db73600-21dc-11eb-88d1-5faa498f94fc.png">
<img width="396" alt="Screen Shot 2020-11-08 at 4 01 06 PM" src="https://user-images.githubusercontent.com/57655/98484253-1db73600-21dc-11eb-8e2a-10a5762f4a95.png">
<img width="441" alt="Screen Shot 2020-11-08 at 4 01 25 PM" src="https://user-images.githubusercontent.com/57655/98484254-1db73600-21dc-11eb-9d9a-c1620dcad11e.png">
<img width="879" alt="Screen Shot 2020-11-08 at 4 02 54 PM" src="https://user-images.githubusercontent.com/57655/98484255-1db73600-21dc-11eb-8f36-7da3e9256feb.png">

</details>

### Checklist
- [ ] [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
2020-11-09 05:42:45 -05:00
Nicolas Chaulet 8560b2dcc0
[Fleet] Make stream id unique in agent policy (#82447) 2020-11-08 18:51:31 -05:00
Brian Seeders 167a4b6665 skip flaky suite (#75794) 2020-11-08 15:51:42 -05:00
Nathan L Smith 387593d723
Copy dateAsStringRt to observability plugin (#82839)
Observability was importing `dateAsStringRt` from APM, which creates an implicit circular dependency between the two plugins.

Copy that function into where it was being used in observability to remove the dependency.

Related to #80508.
2020-11-07 19:15:37 -06:00
Nathan Reese b8e2e85578
[Maps] rename connected_components/map folder to mb_map (#82897) 2020-11-07 06:46:49 -07:00
Patryk Kopyciński 215a561ab7
[Security Solution] Fix EventsViewer DnD cypress tests (#82619) 2020-11-07 11:48:19 +01:00
Frank Hassanabad fb8cd5b091
[Security Solution] Adds logging and performance fan out API for threat/Indicator matching (#82546)
## Summary

* Adds logging output for trouble shooting
* Adds an API to be able to configure how many concurrent searches and how many items per search to use

API additions are these two switches:

```
concurrent_searches
items_per_search
```

When you create a rule. You can use the following example to post one or to change the settings to see the performance impact:

```ts
./post_rule.sh ./rules/queries/query_with_threat_mapping_perf.json
```

Without using these two experimental API settings, the functionality is the same as the existing algorithm and only advanced users will be able to set the additional REST settings through this API. If you use the front end after setting the settings, the settings will be reset as that's how the forms code currently works and this will not preserve the settings if afterwards a rule is edited/changed.

Both these API settings should be considered experimental and potentially breakable as we figure out the best performance strategies for indicator matching.

### 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
2020-11-06 20:46:52 -07:00
Yuliia Naumenko 802c6dccb4
Implemented Alerting health status pusher by using task manager and status pooler for Kibana status plugins 'kibanahost/api/status' (#79056)
* Implemented Alerting health status pusher by using task manager and status pooler for Kibana status plugins 'kibanahost/api/status'

* Exposed health task registration to alerts plugin

* Fixed type error

* Extended health API endpoint with info about decryption failures, added correct health task implementation

* adjusted query

* Tested locally and got it working as expected, fixed tests and type check

* Added unit tests

* Changed AlertExecutionStatusErrorReasons to be enum

* Uppercase the enum

* Replaced string values to enum

* Fixed types

* Extended AlertsClient with getHealth method

* added return type to healthStatus$

* Added configurable health check interval and timestamps

* Extended update core status interval to 5mins

* Fixed failing tests

* Registered alerts config

* Fixed date for ok health state

* fixed jest test

* fixed task state

* Fixed due to comments, moved getHealth to a plugin level

* fixed type checks

* Added sorting to the latest Ok state last update

* adjusted error queries

* Fixed jest tests

* removed unused

* fixed type check
2020-11-06 16:20:39 -08:00
Oliver Gupte b08677b904
[APM] Adds new configuration 'xpack.apm.maxServiceEnvironments' (#82090)
* Closes #77695.
Adds new configuration 'xpack.apm.ui.maxServiceEnvironments' to set the
max number of service environments visible in APM UI.

* renamed config 'xpack.apm.ui.maxServiceEnvironments' -> 'xpack.apm.maxServiceEnvironments'

* Renames 'xpack.apm.ui.maxServiceEnvironments' -> 'xpack.apm.maxServiceEnvironments' in the docs.

* removed incorrect size param on the composite terms sub-agg

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-06 15:26:49 -08:00
John Schulz e8ec392a94
Move single use function in line (#82885)
## Summary

 * Function rename to follow existing get/fetch convention
    ```diff
    - export async function loadRegistryPackage(
    + export async function getRegistryPackage(
    ```
 * Moved `unpackRegistryPackageToCache` into `getRegistryPackage`
    * In my opinion, those three/four statements are more clear than the previous name
    * It isn't used anywhere else
2020-11-06 17:21:29 -05:00
Melissa Alvarez ae20a3a2a9
[ML] Add unsigned_long support to data frame analytics and anomaly detection (#82636)
* add support for unsigned_long field in dfa

* add support for unsigned_long for anomaly detection
2020-11-06 16:51:14 -05:00
Clint Andrew Hall e61c76d2d1
Add flot_chart dependency from shared_deps to Shareable Runtime (#81649)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-06 15:28:27 -06:00
Yara Tercero e53da760d8
[Security Solution][Detections] - Auto refresh all rules/monitoring tables (#82062)
## Summary

This PR addresses https://github.com/elastic/kibana/issues/63865 . Please read the issue for more detail, but essentially, stale data on the tables and use of relative date format leads to confusion as to whether the table was auto refreshing or not.
2020-11-06 16:04:27 -05:00
Oliver Gupte fb9d39500a
[APM] Fix apm e2e runner script commands (#82798)
* Fixes apm e2e runner script by updating the yarn commands to match the
script names defined in the package.json

* removes the yarn install step for cypress dependencies, since it's no
longer necessary.

* Removed apm/e2e/package.json

* simplified paths for binary dependencies
2020-11-06 12:48:21 -08:00
John Schulz 715d43be35
[Ingest Manager] Move cache functions to from registry to archive (#82871)
## Summary

Moving the memory store functions to `archive/cache.ts` to better express their role. 

They are archive-related functions. The registry is just one possible source of an archive/assets. Also considered moving to `assets`, but can always come back to that.

`deletePackageCache` undoes side-effects from `unpackArchiveToCache` so put them in the same file
2020-11-06 15:15:22 -05:00
Shahzad a6b2a6ef5b
[Uptime] Migrate to new es client (#82003)
* migrate to new es client

* fix tests

* fix type

* types

* types

* update

* update

* update

* upadte

* update snaps

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-06 18:50:17 +01:00
John Schulz b19a342def
Move parseAndVerify* functions to validation.ts (#82845)
## Summary

Basic cut-and-paste of `parseAndVerify*` functions from `archive/index.ts` to `archive/validation.ts`.

Should be easier to mock now, replace later, etc.
2020-11-06 12:14:03 -05:00
Poff Poffenberger 0e8985c3fb
[Canvas] Fix elements not being updated properly when filter is changed on workpad (#81863)
* Update renderer handlers when element is changed

* Update handlers before render

* Add canvas functional test for filters

* Update snapshot and remove log

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-06 10:41:35 -06:00
John Schulz 82a8302243
[Ingest Manager] Remove dupe code between two unpack*ToCache fns (#82801)
## Summary

Update `unpackRegistryPackageToCache` to call `unpackArchiveToCache` instead of duplicating much of it.

Now an archive is iterated & put in cache via the same function regardless of its initial source.
2020-11-06 11:26:12 -05:00
Aleh Zasypkin 7904ee0ceb
Add support for provider specific session timeout settings. (#82583) 2020-11-06 17:07:44 +01:00
Joe Reuter 651345b18b
[Lens] Expose active data in some places (#79851) 2020-11-06 17:05:34 +01:00
Stratoula Kalafateli 5710f6763b
[Visualize] New visualization wizard (#79627)
* [Visualizations] New vis wizard

* Update functional tests

* Create oss plugins for maps and lens and unregister alias function

* Add new plugins to .i18nrc.json

* Add readme and codeowners to the new plugins

* update docs

* fix tests

* fix types

* fixes

* Update development docs

* fix oss functional tests

* Fix jest and x-pack functional tests

* Fix functional test

* changes on the layout

* Cleanup and responsiveness

* cleanup unecessary code

* add common folder to the new OSS plugins

* remove unecessary translations

* Update limits.yml file

* Fix basic label

* Add experimental badge on controls vis

* Nice improvements

* fixes

* Improving styles

* Making modal go full height on smaller screens

* Fixing sass lint warning

* fix lint error

* fix internationalization error

* PR fixes

* PR changes

* Use useCallback where possible

* Remove translations that need to be translated again

* Lazy Load wizard modal

* Remove legacyMapVisualizationWarning

* Import the OSS plugins constants from the plugins

* Export constant from lensOss

* Change the new oss plugins from OSS to Oss

* Add a new line to the kibana.json files of the new plugins

* New nit fix

* Fix spaces

* Change the texts for the first step of the modal

* Fix test

* Fixes some of the PR comments

* Add onClick funtionality to the entire aggregation based card

* Cards description changes, introduce a copyFromRoot method to solve the problem of when disabling the x-pack plugic, to also disable the oss

* Create new FTR for testing the functionality of the wizard when both maps and lens apps are disabled

* fix eslint error

* Change groupTitles and descriptions

* Change input vis description

* Remove the copyFromRoot from the signature of the ConfigDeprecationFactory and export it from the main entrypoint

* Make the disabled cards badge clickable

* Changes from code review

* Fix functional tests failures

* Rename groupTitle to titleInWizard to be more specific

* Change vega vis note

* minor design changes

* fix problem with plugins list docs

* Retrieve maps and lens landing page from docs service and add tracking url param

* Fix funtional test for the new dashboard flow

* Fix logic in alias registry for removing the discardOnRegister alias

* no need to remove the alias entry from the discardOnRegister array

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: miukimiu <elizabet.oliveira@elastic.co>
2020-11-06 18:03:44 +02:00
Marco Liberati d3d3fa7bd2
[Lens] New value labels config option for bar charts (#81776)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-06 16:34:30 +01:00
Wylie Conlon 03ee1a6476
[Lens] Fix bug in terms formatting (#82776) 2020-11-06 09:54:37 -05:00
Frank Hassanabad b6d661f9c3
[Security Solutions][Detection Engine] Fixes critical clashing with source indexes that already contain a "signal" field (#82191)
## Summary

Fixes: https://github.com/elastic/kibana/issues/82148


We have errors and do not generate a signal when a source index already has utilized and reserved the "signal" field for their own data purposes. This fix is a bit tricky and has one medium sized risk which is we also support "signals generated on top of existing signals". Therefore we have to be careful and do a small runtime detection of the "data shape" of the signal's data type. If it looks like the user is using the "signal" field within their mapping instead of us, we move the customer's signal into "original_signal" inside our "signal" structure we create when we copy their data set when creating a signal.   

To help mitigate the risks associated with this critical bug with regards to breaking signals on top of signals I have:

* This adds unit tests
* This adds end to end tests for testing generating signals including signals on signals to help mitigate risk

The key test for this shape in the PR are in the file:

```
detection_engine/signals/build_event_type_signal.ts
```

like so:
```ts
export const isEventTypeSignal = (doc: BaseSignalHit): boolean => {
  return doc._source.signal?.rule?.id != null && typeof doc._source.signal?.rule?.id === 'string';
};
```
 
Example of what happens when it does a "move" of an existing numeric signal keyword type:

```ts
# This causes a clash with us using the name signal as a numeric.
PUT clashing-index/_doc/1
{
  "@timestamp": "2020-10-28T05:08:53.000Z",
  "signal": 1
}
```

Before, this was an error. With this PR it now will restructure this data like so when creating a signal along with additional signal ancestor information, meta data. I omitted some of the data from the output signal for this example. 

```ts
{
... Other data copied ...
"signal": 
{
    "original_signal": 1 <--- We "move it" here now
    "parents": 
    [
        {
            "id": "BhbXBmkBR346wHgn4PeZ",
            "type": "event",
            "index": "your-index-name",
            "depth": 0
        },
    ],
    "ancestors":
    [
        {
            "id": "BhbXBmkBR346wHgn4PeZ",
            "type": "event",
            "index": "your-index-name",
            "depth": 0
        },
    ],
    "status": "open",
    "depth": 1,
    "parent":
    {
        "id": "BhbXBmkBR346wHgn4PeZ",
        type: "event",
        "index": "your-index-name",
        "depth": 0
    },
    "original_time": "2019-02-19T17:40:03.790Z",
    "original_event": 
    {
        "action": "socket_closed",
        "dataset": "socket",
        "kind": "event",
        "module": "system"
    },
}

```

### 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
2020-11-06 07:47:57 -07:00
Yulia Čech 71ec5bd36b
Add ILM url generator and use it in Index Management (#82165)
* Add ILM url generator and use in IM for cross linking to policy edit page

* Fix policy name in the link

* Add review suggestions

* Fix import

* Fix eslint error

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-06 15:42:51 +01:00
Joe Reuter 94d0e60706
[Lens] Implement time scaling function (#82104) 2020-11-06 13:47:55 +01:00
ymao1 dae28519e6
[Alerting] Display Action Group in Alert Details (#82645)
* Adding action group id to event log. Showing action group as part of status in alert details view

* Simplifying getting action group id

* Cleanup

* Adding unit tests

* Updating functional tests

* Updating test

* Fix types check

* Updating test

* PR fixes

* PR fixes
2020-11-06 07:28:08 -05:00
Sonja Krause-Harder 1046fc299c
[Ingest Manager] Add tests to verify field parsing behavior. (#82809)
* Add tests to verify field parsing behavior.

* Verify behavior for multiple field redefinitions.
2020-11-06 13:16:03 +01:00
Shahzad 8d5ee265b4
[Uptime] Display response headers for a ping (#82332) 2020-11-06 12:51:38 +01:00