Commit graph

13330 commits

Author SHA1 Message Date
István Zoltán Szabó 07f49853cd
[APM] Uses doc link service instead of ElasticDocsLink for linking custom links (#111149) 2021-09-07 08:33:42 +02:00
Michael Olorunnisola 5bc6239630
[Security Solution] Timeline uses existing filter manager (#111143)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-09-06 22:53:58 -04:00
Pete Harverson 1fb09c7d48
[ML] Fixes REST API docs for results service routes (#111298)
* [ML] Fixes REST API docs for results service routes

* [ML] Edits following review

* [ML] Fixed error in modules REST API doc route
2021-09-06 20:31:33 +01:00
István Zoltán Szabó 705fe22088
[APM] Uses doc link service instead of ElasticDocsLink for linking dropped transaction spans (#110964) 2021-09-06 17:15:00 +02:00
Cauê Marcondes b97afb2c72
[APM] Missing transaction type error when creating Latency threshold Alert (#110336)
* redirect to page adding transaction type

* skipping transaction type

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-09-06 11:09:38 -04:00
Kevin Logan d9c5fa25cc
[Security Solution] Add Windows kernel advanced policy options for 7.15 (#111182) 2021-09-06 10:37:44 -04:00
Kevin Logan d7e14ff72c
[Security Solution] Update protection names in Policy config (#111202) 2021-09-06 10:37:19 -04:00
István Zoltán Szabó 4eefa8531c
[APM] Uses doc link service instead of ElasticDocsLink for linking upgrading info (#111155) 2021-09-06 14:52:46 +02:00
Marco Liberati 1a88d34ea2
[Lens] Reverse colors should not reverse palette picker previews (#110455)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-09-06 14:27:53 +02:00
Ashokaditya 2e2b451162
[Security Solution][Endpoint] Trim Activity Log comments (#111163)
* trim comments so empty comments do not show up

fixes elastic/kibana/issues/111106

* not exclusive test

* update test to be more specific

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-09-06 14:15:53 +02:00
Jean-Louis Leysens 02a6eeb69f
[Canvas/Reporting] Migrate Canvas to V2 reporting (#109860)
* first iteration of canvas reporting using v2 PDF generator

* updated jest test

* made v2 report URLs compatible with spaces and simplified some code

* remove non-existent import

* updated import of lib

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-09-06 13:44:47 +02:00
István Zoltán Szabó 00fac96d37
[APM] Uses doc link service instead of ElasticDocsLink for linking metadata (#110992) 2021-09-06 12:20:35 +02:00
Gloria Hornero 6f31422d9f
adds missing field when creating the email connector (#111251) 2021-09-06 11:38:53 +02:00
Yaroslav Kuznietsov eef094bafb
[Canvas] TagCloud (#106858)
* Added `tagCloud` to canvas.

* Added `icon` to the `tagCloud` element.

* Added column name support at `tag_cloud`.

* Added condition to `vis_dimension` not to pass invalid index.

Added check of accessor index, if such column exists at vis_dimension.
Removed checks of column existance from TagCloudChart.
Added test for accessing data by column name in addition to a column number.
Updated tag_cloud element in Canvas.
Fixed types. Removed almost all `any` and `as` types.

* Added test suites for `vis_dimension` function.

* Added tests for DatatableColumn accessors at tag_cloud_fn and to_ast.

* Refactored metrics, tagcloud and tests.

Added valid functional tests to metrics and tag_cloud.
Fixed types of metrics_vis.
Added handling of empty data at tag_cloud renderer.

* Added storybook ( still doesn't work ).

* Fixed some mistakes.

* Added working storybook with mocks.

* Added clear storybook for tag_cloud_vis_renderer.

* Updated the location of vis_dimension test after movement of the function.

* Fixed unused type.

* Fixed tests and added handling of the column name at `visualizations/**/*/prepare_log_table.ts`

* Reduced the complexity of checking the accessor at `tag_cloud_chart.tsx`

* Added comments at unclear places of code.

* Added the logic for disabling elements for renderers from disabled plugins.

* removed garbage from `kibana.yml`.

* Fixed element_strings.test error.

* Made changes, based on nits.

* Fixed mistake.

* Removed `disabled` flag for `expression_*` plugins.

* recovered lost comments at the unclear places.

* removed dead code.

* fixed test errors.

* Fixed test error, I hope.

* fixed more tests.

* fixed code, based on nits.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-09-06 04:13:38 -04:00
Patryk Kopyciński 4416a31aa7
[Osquery] Fix support for disabled security (#110547) 2021-09-06 10:10:04 +03:00
Søren Louv-Jansen 61e533f253
[APM] Clean up readme (#110973)
* [APM] Clean up readme

* Update linting.md

* Update testing.md

* Update testing.md

* Update testing.md

* Update plugin-list.asciidoc

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-09-05 07:14:06 +02:00
Dmitry Shevchenko c6aa4f625c
Fix exceptions page table pagination (#111000) 2021-09-03 21:38:45 +02:00
Justin Kambic 9b20c80867
Fix ML alert not allowed in Uptime app. (#111180) 2021-09-03 15:17:06 -04:00
Quynh Nguyen 167b876a8a
[ML] Fix issue with AD data points not showing up because missing indices (#110899)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-09-03 13:12:48 -04:00
Tim Roes df22a8e197
Change Graph ownership (#111157) 2021-09-03 19:12:42 +02:00
Michael Dokolin df43d253c8
[Expressions] Align renderMode with the embeddable viewMode (#110199)
* Add preview view mode to the embeddable
* Rename display render mode to view
* Extract no interactivity render mode to a separate flag
2021-09-03 19:10:29 +02:00
Jonathan Buttner a2c848e1d2
[Cases] Fix connector information disappearing (#110914)
* Move intialization to use effect

* Fixing fields can't get test working

* Fix tests

Co-authored-by: Christos Nasikas <christos.nasikas@elastic.co>
2021-09-03 12:00:51 -04:00
Nick Partridge 634ce7f83b
[ML] fix heatmap label colors (#110515) (#111140) 2021-09-03 11:57:36 -04:00
Marta Bondyra d4c03eb9b4
[Lens] Switch to SavedObjectClient.resolve (#110059)
* Step 2: Update client code to use resolve() method instead of get()

Following sharing Saved Objects developer guide: Step 2
This step demonstrates the changes to update client code to use the new
SavedObjectsClient `resolve()` method instead of `get()`.

* Step 3 Lens
2021-09-03 16:44:12 +02:00
Frank Hassanabad 9a459806ad
[Security Solutions][Detection Engine] Adds ability to ignore fields during alert indexing and a workaround for an EQL bug (#110927)
## Summary

Adds a workaround for EQL bug: https://github.com/elastic/elasticsearch/issues/77152
Adds the safety feature mentioned here: https://github.com/elastic/kibana/issues/110802

Adds the ability to ignore particular [fields](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-fields.html#search-fields-param) when the field is merged with [_source](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-fields.html#source-filtering). Also fixes an EQL bug where EQL is introducing the meta field of `_ignored` within the fields and causing documents to not be indexable when we merge with the fields from EQL. 

Alerting document creation uses the fields API to get [runtime field](https://www.elastic.co/guide/en/elasticsearch/reference/current/runtime.html),  [constant keyword](https://www.elastic.co/guide/en/elasticsearch/reference/master/keyword.html#constant-keyword-field-type), etc... that are only available within the [fields API](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-fields.html#search-fields-param) and then merges the field values not found within the `_source` document with the `_source` document and then finally indexes this merged document as an alert document.

This fix/ability is a "safety feature" in that if a problematic [runtime field](https://www.elastic.co/guide/en/elasticsearch/reference/current/runtime.html), [constant keyword](https://www.elastic.co/guide/en/elasticsearch/reference/master/keyword.html#constant-keyword-field-type) is discovered or another bug along the stack we can set a `kibana.yml` key/value pair to ignore the problematic field.

This _WILL NOT_ remove problematic fields from the `_source` document. This will only ignore problematic constant keyword, runtime fields, aliases, or anything else found in the fields API that is causing merge issues.

This PR:
  * Adds a `alertIgnoreFields` `kibana.yml` array key with a default of an empty array if not specified. 
  * Plumbs the `alertIgnoreFields` through the stack and into the fields/_source merge strategies of `missingFields` and `allFields`
  * Adds a temporary `isEqlBug77152` where it hard codes an ignore of `_ignored` until the EQL problem is fixed and then we will remove the workaround
  * Adds unit tests
  * Adds e2e tests which covers the described use cases above.

The `alertIgnoreFields` key/value within `kibana.yml` if set should be an array of strings of each field you want to ignore. This can also contain regular expressions as long as they are of the form, `"/regex/"` in the array.

Example if you want to ignore fields that are problematic called "host.name" and then one in which you want to ignore all fields that start with "user." using a regular expression:

```yml
xpack.securitySolution.alertIgnoreFields: ['host.name', '/user\..*/']
``` 

Although there are e2e tests which exercise the use cases...

If you want to manual test the EQL bug fix you would add these documents in dev tools:

```json
# Delete and add a mapping with a small ignore_above.
DELETE eql-issue-ignore-fields-delme
PUT eql-issue-ignore-fields-delme
{
  "mappings" : {
    "dynamic": "strict",
    "properties" : {
      "@timestamp": {
        "type": "date"
      },
      "some_keyword" : {
        "ignore_above": 5, 
        "type" : "keyword"
      },
      "other_keyword" : {
        "ignore_above": 10, 
        "type" : "keyword"
      }
    }
  }
}

# Add a single document with one field that will be truncated and a second that will not.
PUT eql-issue-ignore-fields-delme/_doc/1
{
  "@timestamp": "2021-09-02T04:13:05.626Z",
  "some_keyword": "longer than normal",
  "other_keyword": "normal"
}
```

Then create an alert which queries everything from it:
<img width="1155" alt="Screen Shot 2021-09-01 at 10 15 06 PM" src="https://user-images.githubusercontent.com/1151048/131781042-faa424cf-65a5-4ebb-b801-3f188940c81d.png">

and ensure signals are created:
<img width="2214" alt="Screen Shot 2021-09-01 at 10 30 18 PM" src="https://user-images.githubusercontent.com/1151048/131782069-b9ab959c-f22d-44d5-baf0-561fe349c037.png">

To test the manual exclusions of any other problematic fields, create any index which has runtime fields or `constant keywords` but does not have anything within the `_source` document using dev tools. For example you can use `constant keyword` like so

```json
PUT constant-keywords-deleme
{
  "mappings": {
    "dynamic": "strict",
    "properties": {
      "@timestamp": {
        "type": "date"
      },
      "testing_ignored": {
        "properties": {
          "constant": {
            "type": "constant_keyword",
            "value": "constant_value"
          }
        }
      },
      "testing_regex": {
        "type": "constant_keyword",
        "value": "constant_value"
      },
      "normal_constant": {
        "type": "constant_keyword",
        "value": "constant_value"
      },
      "small_field": {
        "type": "keyword",
        "ignore_above": 10
      }
    }
  }
}

PUT constant-keywords-deleme/_doc/1
{
  "@timestamp": "2021-09-02T04:20:01.760Z"
}
```

Set in your `kibana.yml` the key/value of:

```yml
xpack.securitySolution.alertIgnoreFields: ['testing_ignored.constant', '/.*_regex/']
```

Setup a rule to run:
<img width="1083" alt="Screen Shot 2021-09-01 at 10 23 23 PM" src="https://user-images.githubusercontent.com/1151048/131781696-fea0d421-836f-465c-9be6-5289fbb622a4.png">

Once it runs you should notice that the constant values for testing are not on the signals table since it only typically exists in the fields API:
<img width="1166" alt="Screen Shot 2021-09-01 at 10 26 16 PM" src="https://user-images.githubusercontent.com/1151048/131781782-1684fb1d-bed9-4cf0-be9a-0abe1f0f34d1.png">

But the normal one still exists:
<img width="1136" alt="Screen Shot 2021-09-01 at 10 26 31 PM" src="https://user-images.githubusercontent.com/1151048/131781827-5450c693-de9e-4285-b082-9f7a2cbd5d07.png">

If you change the `xpack.securitySolution.alertIgnoreFields` by removing it and re-generate the signals you will see these values added back.

### Checklist

Delete any items that are not applicable to this PR.

- [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
- [x] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/master/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
2021-09-03 08:41:28 -06:00
Dmitry Shevchenko 19260d5f02
Fix "Expression produces a union type that is too complex to represent" TS error (#111111) 2021-09-03 10:38:58 -04:00
James Gowdy a18cc31924
[ML] Datafeed preview based job validation check (#109080)
* [ML] Datafeed preview based job validation check

* updating warning text

* fix tests

* adding jest test

* updating tests

* fixing translation ids

* fixing more tests

* changes based on review

* disabled validation step next button when validation fails

* disabling nano job test

* adding test skip comment

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-09-03 15:36:03 +01:00
Christiane (Tina) Heiligers 66cb058fa7
Removes support for legacy exports (#110738)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-09-03 07:22:14 -07:00
Josh Dover ed18699e38
Handle bulkGet errors on package retrieval from ES storage (#111114) 2021-09-03 16:01:28 +02:00
Marco Liberati 21b4752dba
[Lens] Fix transition to custom palette inconsistency when in number mode (#110852)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-09-03 15:57:57 +02:00
ymao1 9ba00ee594
[Actions] Allowing service specification in email connector config (#110458)
* Initial commit of serverType in email connector config

* Fleshing in route to get well known email service configs from nodemailer

* Adding elastic cloud to well known server type

* Cleaning up email constants and allowing for empty selection

* Showing error if user doesn't select server type

* Adding hook for setting email config based on server type

* Adding tests and making sure settings are not overwritten on edit

* Fixing functional test

* Adding migration

* Adding functional test for migration

* Repurposing service instead of adding serverType

* Cleanup

* Disabling host/port/secure form fields when settings retrieved from API

* Updating docs for service

* Filtering options based on whether cloud is enabled

* Initialize as disabled

* Fixing types

* Update docs/management/connectors/action-types/email.asciidoc

Co-authored-by: David Kilfoyle <41695641+kilfoyle@users.noreply.github.com>

Co-authored-by: David Kilfoyle <41695641+kilfoyle@users.noreply.github.com>
2021-09-03 09:49:00 -04:00
Ester Martí Vilaseca 75486ecd12
[Stack Monitoring] Add setup mode to react app (#110670)
* Show setup mode button and setup bottom bar

* Adapt setup mode in react components to work without angular

* Add setup mode data update to react app

* Add missing functions from setup mode

* Revert setup mode changes from react components

* remove some empty lines

* Add setup button to  monitoring toolbar

* Fix types

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-09-03 15:15:53 +02:00
Christos Nasikas 6f357e0433
[Cases] Do not show status dropdown on modal cases selector (#111101) 2021-09-03 16:10:29 +03:00
James Gowdy 71571c5b60
[ML] Job import and export functional tests (#110578)
* [ML] Job import export functional tests

* adding title check

* adding dfa tests

* removing export file

* adds bad data test

* commented code

* adding export job tests

* adds version to file names

* improving tests

* removing comment

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-09-03 14:05:53 +01:00
Dominique Clarke d83c8244a2
[Uptime] [Synthetics Integration] fix content typo (#110088)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-09-03 08:47:26 -04:00
mgiota e2ee2637e2
Update alert documents when the write index changes (#110788)
* first draft(work in progress)

* add back missing await

* disable require_alias flag only when we update

* cleanup
2021-09-03 13:39:52 +01:00
Pierre Gayvallet b4f5877ff8
catch errors from providers (#111093) 2021-09-03 14:38:19 +02:00
Ashokaditya 5b4d265571
[Security Solution][Endpoint] Use super date picker instead of date range picker (#108722)
* Use super date picker instead of date range picker

fixes elastic/security-team/issues/1571

* fix test target

Super date picker's `data-test-subj` prop gets garbled and doesn't show up in rendered DOM. In other words, the component is entirely void of a data-test-subj attribute.

* make auto refresh work!!

fixes https://github.com/elastic/security-team/issues/1571

* set max width as per mock

fixes elastic/security-team/issues/1571

* show a callout to inform users to select different date ranges

fixes elastic/security-team/issues/1571

* persist recently used date ranges on the component only

fixes elastic/security-team/issues/1571

* use commonly used ranges from default common security solution ranges

fixes elastic/security-team/issues/1571

* Better align date picker

* full width panel for date picker so content flows below it

review comments

* mock time picker settings for tests

* use eui token for bg color

review comment

* persist recently used dates

fixes elastic/security-team/issues/1571

* persist date range selection over new endpoint selection

review comments

* remove obsolete local state since update button is not visible.

review comments

* fix bg color for dark mode and relative path

* update relative path

review comments

* cleanup - the action doesn't allow for undefined start and end dates anyway

refs 28a859ab3a

* fix types after sync

* update test title

* add a test for callout when empty data

* fix lint

* show update button when dates are changed

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-09-03 13:47:36 +02:00
Alejandro Fernández Gómez 4e9e7a8671
[RAC] Add loading and empty states to the alerts table - Take II (#110504)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-09-03 06:59:56 -04:00
Aleh Zasypkin c42391ed3a
Resurrect deprecated and removed authentication settings. (#110835) 2021-09-03 11:42:12 +02:00
Jean-Louis Leysens 23fa1b4c07
[Reporting] Updated telemetry types for V2 export types (#110622)
* updated telemetry types

* update tests

* telemtery JSON file

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-09-03 11:30:51 +02:00
Jean-Louis Leysens 0b5f1c0d9c
[Reporting] Unskip ILM migration tests (#110813)
* added allow restricted indices to privileges check

* updated comment -> TODO

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-09-03 11:22:26 +02:00
Matthias Wilhelm 8f728977f2
[Discover] Remove export* syntax (#110934) 2021-09-03 07:48:32 +02:00
Yuliia Naumenko d421c4dda7
[Event log][7.x] Updated event log client to search across legacy IDs (#109365)
* [Event log][7.x] Updated event log client to search across legacy IDs

* fixed tests

* extended kibana null version check

* added logic to alerting plugin

* fixed typechecks

* fixed typechecks

* Revert "fixed typechecks"

This reverts commit 6f6770fa4b.

* removed legacyId for routes

* fixed typechecks

* fixed position

* fixed query

* fixed query

* fixed tests

* fixed types place

* fixed due to comments

* fixed due to comments

* fixed eslint

* fixed due to comments

* splitted test data

* fixed test data

* increased the delay time to await the search

* removed version for 7.9 docs

* Update x-pack/plugins/event_log/server/es/cluster_client_adapter.ts

Co-authored-by: Mike Côté <mikecote@users.noreply.github.com>

* fixed unit test

* fixed test data

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Mike Côté <mikecote@users.noreply.github.com>
2021-09-03 01:18:48 -04:00
Davis Plumlee 9c165a1bc4
[Security Solution][Detection Rules] Changes 'activated' text on rule details page (#111044) 2021-09-02 23:45:15 -04:00
Zacqary Adam Xeper a99360fa32
[Metrics UI] Filter out APM nodes from the inventory view (#110300)
* [Metrics UI] Filter out APM nodes from the inventory view

* Update jest snapshots

* Add tests for fs for filtering out APM nodes
2021-09-03 09:28:11 +09:00
Tim Sullivan e6faa58873
[Reporting] Clean up any usage, reorganize server route files (#110740)
* refactor/reflatten server routes

* fix import

* fix any usage in server/lib

* clean up unused parameter

* remove any in server/browsers

* refactor handle request function into a class

* more cleanup
2021-09-02 11:35:39 -07:00
Khristinin Nikita b0a0dc224b
[Security Solution] [CTI] Fixes bug that caused Threshold and Indicator Match rules to ignore custom rule filters if a saved query was used in the rule definition. (#109253)
* Ignore saved_id for Threat match and threshold rules

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-09-02 20:26:34 +02:00
Michael Olorunnisola 3dda4dafa0
[Security Solution][RAC] - Update reason field text (#110308) 2021-09-02 13:52:10 -04:00
Kevin Qualters f8e86f5e02
[RAC][Security Solution] Make analyzer work with EuiDataGrid full screen (#110913)
* Make analyzer work with EuiDataGrid full screen

* Don't ever restrict the width, remove console.log

* Remove isEventViewer prop no longer used

* Make global filters appear below data grid
2021-09-02 13:21:44 -04:00
Chris Cowan 0452483e7d
[Metrics UI] Add integration tests for Metric Threshold Rule and refactor to fire correctly (#109971)
* [Metrics UI] Add integration tests for Metric Threshold and refactor to fire correctly

* Removing unused variables

* Fixing tests for metric_threshold_executor

* Fixing test for metric_query

* fixing test

* Changing type guard
2021-09-02 10:38:45 -06:00
Sergi Massaneda 56669c034c
[RAC] Persistent timeline fields fix (#110685)
* fix stringify circular ref crash and default columns on createTimeline

* rollback reset buton fix to split PR

* adding fields to the storage cleaning

* tests fixed

* test fix
2021-09-02 16:33:07 +02:00
Byron Hulcher f21731fb3a
Support the warning state for crawler validation steps (#110864) 2021-09-02 10:00:29 -04:00
Jonathan Buttner d2fffdcca1
[Cases] Cleaning up migration and re-hiding comments saved object (#109344)
* Cleaning up migration and so

* Refactoring filter to be check in reduce
2021-09-02 09:24:37 -04:00
Byron Hulcher c7ee7d7898
Split CrawlerLogic from CrawlerOverviewLogic (#110850) 2021-09-02 14:56:20 +02:00
Dima Arnautov 0ae7455377
[ML] Add job audit messages API integration tests (#110793) 2021-09-02 14:43:14 +02:00
Mikhail Shustov 1205ba4ce0
do not export all the types from licensing plugin (#110942)
* do not export all the types from licensing plugin

* another export issue
2021-09-02 07:08:02 -04:00
Byron Hulcher f3bb942845
Remove beta tag from Crawler document ingestion card (#110922) 2021-09-02 11:12:07 +02:00
Angela Chuang fb77be26ea
update topN panel width (#110803)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-09-02 09:04:31 +01:00
Spencer fecdba7eba
[eslint] add rule to prevent export* in plugin index files (#109357)
* [eslint] add rule to prevent export* in plugin index files

* deduplicate export names for types/instances with the same name

* attempt to auto-fix duplicate exports too

* capture exported enums too

* enforce no_export_all for core too

* disable rule by default, allow opting-in for help fixing

* update tests

* reduce yarn.lock duplication

* add rule but no fixes

* disable all existing violations

* update api docs with new line numbers

* revert unnecessary changes to yarn.lock which only had drawbacks

* remove unnecessary eslint-disable

* rework codegen to split type exports and use babel to generate valid code

* check for "export types" deeply

* improve test by using fixtures

* add comments to some helper functions

* disable fix for namespace exports including types

* label all eslint-disable comments with related team-specific issue

* ensure that child exports of `export type` are always tracked as types

Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-09-01 18:05:45 -07:00
Pete Hampton 4f0a63f575
Security Telemetry Refactor (#109875)
* [@pjhampton/@donaherc] Move sec telem tasks into own package.

* Split filter out into its own module, started abstracting ES interaction into a queries module

* Implemented querier and fixed some types

* Updated tests, moved receiver to plugin from sender to decouple them.

* fixed integration in detection engine, misc fixes

* [@pjhampton] Fix type ref problems. Update test defs.

* Make url transformer a member func of the sender class.

* [@pjhampton] clean up receiver commentary.

* [@pjhampton] add null check consistency.

* Fix bad formatting.

Co-authored-by: cdonaher <cdonaher@endgame.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-09-01 17:37:01 -06:00
CJ Cenizal cf8ab3bb11
Add snapshotsUrl to Cloud plugin public interface. (#110328)
* Add unit tests for Cloud plugin setup interface.
2021-09-01 14:42:01 -07:00
Marshall Main f58865c1f5
[Rule Registry][RAC] Rename kibana.alert.id to kibana.alert.instance.id (#110528)
* Rename kibana.alert.id to kibana.alert.instance.id

* Update test snapshot

* Fix test

* One more fix
2021-09-01 16:56:49 -04:00
Cauê Marcondes 2fe56f9793
[APM] tests restructure (#110703)
* refactoring test

* improving test structure

* improvements

* improving readmes

* readme

* test

* fixing ts issue

* addressing pr comments

* fixing readme files

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-09-01 16:42:33 -04:00
Lisa Cawley a82f6ca20e
[DOCS] Latency correlations (#110557) 2021-09-01 12:34:48 -07:00
Patrick Mueller dfa6924bee
[task manager] provide better diagnostics when task manager performance is degraded (#109741)
resolves #109095
resolves #106854

Changes the way task manager and alerting perform their health / status
checks:

- no longer sets an `unavailable` status; now uses `degraded` instead
- change task manager "hot stats freshness" calculation to allow for
  staler data before signalling a problem
- Changed the "Detected potential performance issue" message to sound
  less scary, include a doc link to task manager health monitoring, and
  log a debug instead of warning level
- add additional debug logging when task manager sets a status that's
  not `available`, indicating why it's setting that status (in the code,
  it's when task manager uses HealthStatus.Warning or Error)
2021-09-01 15:12:46 -04:00
Lisa Cawley 714735db21
[APM] Use doc link service instead of ElasticDocsLink (#109027) 2021-09-01 12:08:38 -07:00
Dominique Clarke e25c9dfece
[Uptime] [Synthetics Integration] browser functional tests (#110648)
* uptime - synthetics integration - add browser functional tests

* focus tests

* unfocus test

* Uptime - Synthetics Integration - adds stringToJsonFormatter
2021-09-01 14:54:00 -04:00
Angela Chuang 9dec97b5f4
[Security Solution] Enable repositionOnScroll for overflow popovers (#110584)
* enable repositionOnScroll

* unit test

* update test case

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-09-01 14:50:33 -04:00
Mark Hopkin 508d045f90
fix: do not show upgrade button on latest version of package (#110764) 2021-09-01 11:25:41 -07:00
Christos Nasikas 1f90712c47
[Timeline] Show cases create flyout with timeline open (#110811) 2021-09-01 20:06:55 +03:00
Kyle Pollich 3662a39b8e
[Fleet] Add Fleet diagrams to dev_docs (#110794)
* Add initial fleet dev diagrams to dev_docs

* Move Fleet Server arrow to ES instead of Kibana
2021-09-01 12:12:51 -04:00
Patryk Kopyciński 34aef088ad
[RAC] Add embeddable to o11y optionalPlugins (#110713) 2021-09-01 18:05:22 +02:00
Constance 47b86e1bf7
Upgrade EUI to v37.3.1 (#109926)
* Upgrade EUI to v37.3.1

* Update i18n token mappings

* Skip i18n_eui_mapping defString checks for functions

* Update snapshots

* Update failing Security tests with extra nodes

* Remove hook cleanup now that elastic/eui#5068 is merged

* [i18n PR feedback] Prefer specific token skipping over all functions skipping

* Revert "Remove hook cleanup now that elastic/eui#5068 is merged"

This reverts commit e40ebfa929.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-09-01 08:39:20 -07:00
Aaron Caldwell 19b23ef477
[Maps] Add new index handling for users missing privs for index creation (#109754)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-09-01 11:29:47 -04:00
Angela Chuang 69568ebb17
[Security Solution] Endpoint Exception status in flayout is not aligned with alerts context menu (#110203)
* unit test

* add isAlertFromEndpointAlert check

* update isAlertFromEndpointAlert

* unit test

* fix unit test
2021-09-01 16:25:53 +01:00
Sergi Massaneda e9c20f9802
[RAC] Expand cell footer button changes to prevent overflow (#110506)
* fix hover actions tooltip footer buttons overflow

* reorder actions

* override eui styles to match popover actions design
2021-09-01 16:47:43 +02:00
Joe Portner b17d87e508
Security usage data (#110548) 2021-09-01 10:35:36 -04:00
Oliver Gupte 77890b1ccf
[APM] Adds missing transaction events fallback badge to transaction details (#109846) (#110753) 2021-09-01 09:51:15 -04:00
Jonathan Buttner 31d335868e
Disable sync toggle in flyout (#110714) 2021-09-01 09:06:29 -04:00
Phillip Burch a386dfe994
[Montiroing] Add monitoring toolbar with date picker (#110612) 2021-09-01 05:35:53 -05:00
Ahmad Bamieh 249c5fbf9a
[Core deprecations] Add title field to deprecation info (#109840) 2021-09-01 13:10:25 +03:00
Sergi Massaneda d34ef7ba9f
reset fields fix (#110710) 2021-09-01 11:25:11 +02:00
Xavier Mouligneau 16af3e95cb
[RAC] Remove rbac on security solution side (#110472)
* wip to remove rbac

* Revert "[Cases] Include rule registry client for updating alert statuses (#108588)"

This reverts commit 1fd7038b34.

This leaves the rule registry mock changes

* remove rbac on Trend/Count alert

* update detection api for status

* remove @kbn-alerts packages

* fix leftover

* Switching cases to leverage update by query for alert status

* Adding missed files

* fix bad logic

* updating tests for use_alerts_privileges

* remove index alias/fields

* fix types

* fix plugin to get the right index names

* left over of alis on template

* forget to use current user for create/read route index

* updated alerts page to not show table when no privileges and updates to tests

* fix bug when switching between o11y and security solution

* updates tests and move to use privileges page when user tries to access alerts without proper access

* updating jest tests

* pairing with yara

* bring back kbn-alerts after discussion with the team

* fix types

* fix index field for o11y

* fix bug with updating index priv state

* fix i18n issue and update api docs

* fix refresh on alerts

* fix render view on alerts

* updating tests and checking for null in alerts page to not show no privileges page before load

* fix details rules

Co-authored-by: Jonathan Buttner <jonathan.buttner@elastic.co>
Co-authored-by: Yara Tercero <yara.tercero@elastic.co>
2021-09-01 04:23:44 -04:00
Dario Gieselaar 0d4fb4f338
[APM] Filter throughput on transaction name (#110645)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-09-01 08:41:37 +02:00
Cauê Marcondes 31057f7215
[APM] "Backends" naming (#110523)
* renaming backends to dependencies

* changing name on service maps
2021-09-01 00:01:10 -04:00
Cauê Marcondes 5b6588d8cb
[APM] Custom links creation don't work (#110676)
* fixing custom links issue

* Removing unused imports
2021-08-31 23:56:47 -04:00
Kevin Logan 53c011830d
[Security Solution] Correct memory exception field names (#110705) 2021-08-31 22:07:00 -04:00
Yuliia Naumenko 3e15695d06
[Alerting][8.0] Prepare alerting SOs to sharecapable (#110386)
* [Alerting] [8.0] Prepare for making alerting saved objects sharecapable (#109990)

* [Alerting] [8.0] Prepare for making alerting saved objects sharecapable

* removed v8 check

* removed link

* added no op migration

* fixed name

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

* [Actions] [8.0] Prepare for making action saved objects sharecapable. (#109756)

* [Actions] [8.0] Prepare for making action saved objects sharecapable.

* added more tests

* made it compatible to merge to 7.x

* fixed due to comments

* fixed tests

* added tests

* fixed tests

* fixed due to comments

* added no-opactions migration

* fixed test

* [Task Manager][8.0] Added migrations to savedObject Ids for "actions:* and "alerting:*" task types (#109180)

* [Task Manager][8.0] Added migrations to savedObject Ids for "actions:* and "alerting:*" task types

* fixed due to comments

* fixed typo

* added more tests

* added unit test

* added func test

* added func tests

* fixed test

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

* fixed merge

* fixed legacy tests

* fixed tests

* fixed eslint

* Update migrations.ts

fixed action task

* fixed due to comments

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-31 16:38:33 -07:00
Cauê Marcondes 634c272edd
[APM] Fleet: adding support for legacy fields (#110136)
* supporting legacy fields

* addressing PR comments

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-31 18:02:00 -04:00
Spencer 72f6700270
[eslint] prevent async Promise constructor mistakes (#110349)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-08-31 17:54:13 -04:00
Kyle Pollich 522a0c4281
[Fleet] Fix bug when upgrading Windows package policies (#110698)
* Fix bug when upgrading Windows package policies

Ensure package policy merge logics accounts for cases in which an
input/stream which previously had no variables declared but has
variables in a later package version.

Fixes #110202

* Refactor original var set into deepMergeVars
2021-08-31 17:43:00 -04:00
Domenico Andreoli 01e1e4af3f
Merge junit results also for CCS functional tests (#110591) 2021-08-31 16:47:05 -04:00
Tim Sullivan ca120eef91
[Reporting] Remove any from pdf job compatibility shim (#110555)
* [Reporting] Remove `any` from pdf job compatibility shim

* remove `any` usage in a few other isolated areas
2021-08-31 11:08:49 -07:00
Quynh Nguyen 42acf39a70
[ML] Populate date fields for Transform (#108804)
* [ML] Add index pattern info & select control for date time

* [ML] Update translations

* [ML] Gracefully handle when index pattern is not available

* [ML] Fix import

* [ML] Handle when unmounted

* [ML] Remove load index patterns because we don't really need it

* [ML] Add error obj to error toasts

* [ML] Update tests

* [ML] Update hook

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-31 13:08:17 -05:00
Tim Sullivan bbfad19051
[Reporting] Remove any from public/poller (#110539)
* [Reporting] Remove `any` from public/poller

* remove unnecessary comment
2021-08-31 11:07:56 -07:00
Gloria Hornero f8c80a7422
[Security Solution] Updates loock-back time on Cypress tests (#110609)
* updates loock-back time

* updates loock-back value for 'expectedExportedRule'
2021-08-31 20:07:06 +02:00
Dima Arnautov 95eab7ccca
[ML] Fix "Show charts" control state (#110602)
* [ML] fix show charts state

* [ML] fix export
2021-08-31 13:54:13 -04:00
Dmitry Tomashevich 3f7c461cd5
[Graph] Deangularize graph app controller (#106587)
* [Graph] deaungularize control panel

* [Graph] move main graph directive to react

* [Graph] refactoring

* [Graph] remove redundant memoization, update import

* [Graph] fix settings menu, clean up the code

* [Graph] fix graph settings

* [Graph] code refactoring, fixing control panel render issues

* [Graph] fix small mistake

* [Graph] rename components

* [Graph] fix imports

* [Graph] fix graph search and inspect panel

* [Graph] remove redundant types

* [Graph] fix problem with selection list

* [Graph] fix functional test which uses selection list

* [Graph] fix unit tests, update types

* [Graph] fix types

* [Discover] fix url queries

* [Graph] fix types

* [Graph] add react router, remove angular stuff

* [Graph] fix styles

* [Graph] fix i18n

* [Graph] fix navigation to a new workspace creation

* [Graph] fix issues from comments

* [Graph] add suggested changed

* Update x-pack/plugins/graph/public/components/graph_visualization/graph_visualization.tsx

Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>

* [Graph] remove brace lib from imports

* [Graph] fix url navigation between workspaces, fix types

* [Graph] refactoring, fixing url issue

* [Graph] update graph dependencies

* [Graph] add comments

* [Graph] fix types

* [Graph] fix new button, fix control panel styles

* [Graph] apply suggestions

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>
2021-08-31 19:26:45 +03:00
Nathan L Smith 3bae4cdc06
Add inspector panel for APM routes (#109696)
When the observability:enableInspectEsQueries advanced setting is enabled, show an inspector that includes all queries through useFetcher.

Remove the callout.
2021-08-31 11:10:54 -05:00