Commit graph

34946 commits

Author SHA1 Message Date
Chris Roberson c63ab91c7b
[Monitoring] Fix the messaging around needing TLS enabled (#72310)
* Fix the copy

* Fix type issues

* PR feedback

* Add missing code
2020-07-21 09:12:50 -04:00
Gidi Meir Morris 8fdebc9e82
[Task Manager] Batches the update operations in Task Manager (#71470)
This PR attempts to batch update tasks in Task Manager in order to avoid overloading the Elasticsearch queue.
This is the 1st PR addressing https://github.com/elastic/kibana/issues/65551

Under the hood we now use a Reactive buffer accumulates all calls to the `update` api in the TaskStore and flushes after 50ms or when as many operations as there are workers have been buffered (whichever comes first).
2020-07-21 14:08:29 +01:00
Gil Raphaelli c74b214fe3
allow some env settings for ingest manager (#72544) 2020-07-21 08:14:12 -04:00
Alexey Antonov e1ffcccb96
Add inspector for VEGA (#70941)
* [WIP] Add inspector for VEGA

Closes: #31189

* view -> dataset

* cleanup

* add spec viewer

* cleanup code

* use rx to retrieve data from adapters

* Make custom inspector adapters registerable from the visType

* fix flex-box size

* cleanup

* remove visTypesWithoutInspector from visualize_embeddable

* fix PR comments

* add vega folder to sass-lint

* fix jest

* Update src/plugins/vis_type_vega/public/vega_inspector/components/data_viewer.tsx

Co-authored-by: Wylie Conlon <wylieconlon@gmail.com>

* use addSignalListener

* cleanup

* add onColumnResize handler

* EuiCodeEditor -> CodeEditor

* fix type_check

* fix issue with pagination

* fix extra vertical scroll

* add area-label for EuiButtonIcon

* add area-label for EuiComboBox

* Design Commit

- Fixing up layout trying to remove any `.eui` classes and uses flex instead of percentage
- Fixing text to use `Sentence case` not `Title Case`

* Wrapper around signal viewer table

* fix Jest snapshot

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Wylie Conlon <wylieconlon@gmail.com>
Co-authored-by: cchaos <caroline.horn@elastic.co>
2020-07-21 14:45:51 +03:00
Tiago Costa 81cbd13db4
chore(NA): fix grunt task for test:coverage (#72539) 2020-07-21 12:17:01 +01:00
cachedout c5073f4849
Archive e2e test results in ES (#72575)
* Archive e2e test results in ES

* Disable flaky comment feature and PR notifications

* Update .ci/end2end.groovy

Co-authored-by: Victor Martinez <victormartinezrubio@gmail.com>

Co-authored-by: Victor Martinez <victormartinezrubio@gmail.com>
2020-07-21 10:08:54 +00:00
Pierre Gayvallet 517c34a7eb
preserve 401 errors from new es client (#71248)
* intercept 401 error from new client in routing layer

* improvements

* lint

* fix mocked client construction due to 7.9-rc1 bump

* use default WWW-Authenticate value when not provided by ES 401
2020-07-21 11:34:04 +02:00
MadameSheema 20c6d9fe52
[SIEM][Detections] Updates text for severity and risk_score overrides (#72244)
* updates severity mapping description text

* updates risk score mapping description

* updates default messages with the given suggestions

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-21 10:35:31 +02:00
Cauê Marcondes efa1795cfd
fixing error occurences tooltip (#72425) 2020-07-21 10:09:30 +02:00
Pierre Gayvallet 005a1121cc
use KibanaClient interface instead of Client for new client interface (#72388)
* use KibanaClient interface instead of Client

* add back helpers to ElasticsearchClient interface

* use TransportRequestPromise for transport.request

* update generated doc
2020-07-21 09:44:25 +02:00
Søren Louv-Jansen 511e4543a7
[APM] Handle ML errors (#72316)
* [APM] Handle ML errors

* Add capability check

* Improve test

* Address Caue’s feedback

* Move getSeverity

* Fix tsc

* Fix copy
2020-07-21 08:41:15 +02:00
Matthias Wilhelm 7f6cd5148a
[Discover] Improve histogram tests (#72235) 2020-07-21 07:09:25 +02:00
Spencer a1753ffffd
[ftr/webdriver] retry on all errors, use Rx so that timers are canceled (#72540)
* [ftr/webdriver] retry on all errors, use Rx so that timers are canceled

* throw if attemptToCreateCommand() aborts by resolving to undefined

Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-07-20 20:35:15 -07:00
Clint Andrew Hall bfbb8d2138
[pre-req] Move .storybook to storybook; standardize files (#72384) 2020-07-20 22:18:20 -04:00
Brent Kimmel 990d4c5eec
[Security_Solution][Resolver][Bug]: Restore breadcrumb background (#72538) 2020-07-20 20:59:55 -04:00
Quynh Nguyen 3760dc4f45
[ML] Fix annotation detector linking & delayed_data(0) (#72468) 2020-07-20 19:34:53 -05:00
Yara Tercero 21977a7e6a
[Security Solution][Exceptions] - Make esTypes and subType available to index patterns (#72336)
## Summary

This PR updates the following:

- `useFetchIndexPatterns` now returns `indexPatterns` whose fields include `esTypes` and `subType`
  - Why?? The exceptions builder needs these two fields to determine what fields are of ES type `nested` and parent paths
- exceptions add and edit modals now use the `rule.index` field to pass into `useFetchindexPatterns`
  - Before we were using the signals index and alerts index for endpoint, needs to be rule's index patterns
  - if no index patterns exist on the rule (if rule created via API, it's not required), then uses `DEFAULT_INDEX_PATTERN`
- updates the autocomplete validation to use `IField.esTypes` to check type instead of `IField.type`
2020-07-20 19:18:42 -04:00
Frank Hassanabad 03fe8c3e89
[SIEM] Uses faster wait from testing-library and removes duplicate older wait idiom (#72509)
## Summary

* Removes the older wait pattern that does a block no matter what
* Utilizes the improved and better pattern for test-library's waitFor which will test immediately and then poll for results
* Changes everything to put their expect statement within the waitFor
* Once the waitFor is in TypeScript/JS we can change the import statement to use that

If you get a timeout or error this is what it looks like now which improves the developer experience in some ways but does degrade things in others as it suggests that everything is timeout related. However, developers should inspect the values and remove the waitFor() and re-run their tests if they think that they have a real problem during development.

<img width="990" alt="Screen Shot 2020-07-20 at 12 40 39 PM" src="https://user-images.githubusercontent.com/1151048/87975739-4084d980-ca89-11ea-83c9-ba3fb932a175.png">


See the API for more information:
https://testing-library.com/docs/dom-testing-library/api-async#waitfor

But in short we should be using:

```ts
await waitFor(() => expect(...));
```

throughout our code at this point and the waitFor will loop quickly and efficiently until it either times out or gets the condition expected.

### Checklist

Delete any items that are not applicable to this PR.

- [x] [Unit or functional tests](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) were updated or added to match the most common scenarios
2020-07-20 16:23:38 -06:00
Jen Huang 709e0a0a11
Fix long combo box items breaking out of flex item width (#72512) 2020-07-20 15:16:46 -07:00
Spencer a221e04b3c
[pipeline/commitStatus] update commit status in baseline-capture job (#72366)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-07-20 15:06:02 -07:00
Kevin Qualters c3263aa9a2
[Security Solution][Resolver] Update the resolver element ref on scroll events if the position of the element has changed within the page (#72461) 2020-07-20 17:41:25 -04:00
Nathan Reese 9947c671ec
[Maps] auto-fit to data bounds (#72129)
* [Maps] auto-fit to data bounds

* update jest snapshot

* add buffer to fit to bounds

* sync join layers prior to fitting to bounds

* clean-up comment

* better names

* fix tslint errors

* update functional test expect

* add functional tests

* clean-up

* change test run location

* fix test expect

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-20 15:24:32 -06:00
Devin W. Hurley b9413cf3c8
[SIEM] [Detections] Fixes faulty circuit breaker (#71999)
* removes useSortIds which was leftover from a previous attempt at implementing gap detection mitigation code. This only showed up because I modified the count variable used to determine when we hit maxSignals from utilizing the searchResult hits length to using the count of bulk created items (signals indexed) in this commit 56de45d156

* removes logs and fixes if statement ordering

* adds tests, increases code coverage for search after and bulk create function, updates log statements

* update tests after rebase onto master

* clean up if statements

* fix test data

* merge conflicts are hard
2020-07-20 15:55:26 -04:00
Davis Plumlee 4ccf1aed96
[Security Solution][Detections]Exceptions modal bugs (#72471) 2020-07-20 15:34:26 -04:00
Jen Huang 0f964f6691
[Ingest Manager] Disable asset facet links (#72158)
* Disable asset facets

* Fix prop name

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-20 12:14:33 -07:00
Frank Hassanabad 3ccdd79aa7
[SIEM][Detection Engine] Reduces flakiness within the tests using waitFor() and un-skips the tests (#72479)
## Summary

* Utilizes the `waitFor` so that the tests are less flaky and more resilient
* Unskips a test that was due to a regression within Elastic Search that should be fixed now
* https://github.com/elastic/kibana/issues/71867
* https://github.com/elastic/kibana/issues/71814
* https://github.com/elastic/kibana/issues/71612

### Checklist

Delete any items that are not applicable to this PR.

- [x] [Unit or functional tests](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) were updated or added to match the most common scenarios
2020-07-20 12:55:52 -06:00
Mikhail Shustov 2771d69c96
[KP] bump es client to rc2 (#72448)
* bump es client to rc2

* update code for new typings
2020-07-20 20:32:46 +02:00
CJ Cenizal 88e8c30e61
Convert ILM remove_lifecycle_confirm_modal component to TS. (#70382)
- Also convert api and api_errors services, and improve typing of http service.
- Fix bug where fatalErrors service was improperly consumed in api_errors.
- Improve typing in Rollup api_errors service, for consistency.
2020-07-20 11:21:03 -07:00
Zacqary Adam Xeper 85d8ec8905
[Metrics UI] Fix Alert Preview Error design (#71005)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-20 13:18:43 -05:00
Melissa Alvarez a42a6d02fc
add index-pattern link when error contains 'click here' text (#72470) 2020-07-20 13:47:04 -04:00
Frank Hassanabad 8a4daffcfd
[SIEM][Detection Engine][Lists] Adds list permissions (#72335)
## Summary

* Adds list permissions as a feature control to SIEM.
* Separates the controls between two, one of which is `access:lists-all` and the other is `access:lists-read`
* Grants SIEM the ability to utilize both depending on which feature mode the space is in.
2020-07-20 11:00:59 -06:00
Frank Hassanabad afae94a85e
[SIEM][Detection Engine][Lists] Adds conflict versioning and io-ts improvements to lists (#72337)
## Summary

* Adds conflict versioning by exposing the "_version" from the saved object system. It renames "version" to "_version" so that we can use regular "version" later for versioning things for pre-packaged lists abilities.
* Utilizes `t.OutputOf` in the requests and the data types to give us more correctly types
* Removes the `Identity` utility as that is adding confusion and can confuse vs code rather than improves things
* Removes extra types that were causing confusion which was an idiom from io-ts
* Changes the wording of `Partial` by removing that and instead focuses the request types on either client side or server side at this point.

NOTE: The UI can migrate to holding onto the `_version` and then push it back down when it wants to migrate to using the conflict resolution. If the UI does not push it down, then a value of undefined will be used which is indicating that no conflict errors are wanted.


Output example of posting an exception list:

❯ ./post_exception_list.sh
```ts
{
  "_tags": [
    "endpoint",
    "process",
    "malware",
    "os:linux"
  ],
  "_version": "Wzk4NiwxXQ==",
  "created_at": "2020-07-17T18:59:22.872Z",
  "created_by": "yo",
  "description": "This is a sample endpoint type exception",
  "id": "a08795b0-c85f-11ea-b1a6-c155df988a92",
  "list_id": "simple_list",
  "name": "Sample Endpoint Exception List",
  "namespace_type": "single",
  "tags": [
    "user added string for a tag",
    "malware"
  ],
  "tie_breaker_id": "b789ec05-3e0f-4344-a156-0c0f5b6e2f9c",
  "type": "detection",
  "updated_at": "2020-07-17T18:59:22.891Z",
  "updated_by": "yo"
}
```

Output example of posting an exception list item
❯ ./post_exception_list_item.sh
```ts
{
  "_tags": [
    "endpoint",
    "process",
    "malware",
    "os:linux"
  ],
  "_version": "Wzk4NywxXQ==",
  "comments": [],
  "created_at": "2020-07-17T18:59:30.286Z",
  "created_by": "yo",
  "description": "This is a sample endpoint type exception",
  "entries": [
    {
      "field": "actingProcess.file.signer",
      "operator": "excluded",
      "type": "exists"
    },
    {
      "field": "host.name",
      "operator": "included",
      "type": "match_any",
      "value": [
        "some host",
        "another host"
      ]
    }
  ],
  "id": "a4f2b800-c85f-11ea-b1a6-c155df988a92",
  "item_id": "simple_list_item",
  "list_id": "simple_list",
  "name": "Sample Endpoint Exception List",
  "namespace_type": "single",
  "tags": [
    "user added string for a tag",
    "malware"
  ],
  "tie_breaker_id": "1dc456bc-7aa9-44b4-bca3-131689cf729f",
  "type": "simple",
  "updated_at": "2020-07-17T18:59:30.304Z",
  "updated_by": "yo"
}
```

Output example of when you get an exception list:

❯ ./get_exception_list.sh simple_list
```ts
{
  "_tags": [
    "endpoint",
    "process",
    "malware",
    "os:linux"
  ],
  "_version": "WzEwNzcsMV0=",
  "created_at": "2020-07-17T18:59:22.872Z",
  "created_by": "yo",
  "description": "Different description",
  "id": "a08795b0-c85f-11ea-b1a6-c155df988a92",
  "list_id": "simple_list",
  "name": "Sample Endpoint Exception List",
  "namespace_type": "single",
  "tags": [
    "user added string for a tag",
    "malware"
  ],
  "tie_breaker_id": "b789ec05-3e0f-4344-a156-0c0f5b6e2f9c",
  "type": "endpoint",
  "updated_at": "2020-07-17T20:01:24.958Z",
  "updated_by": "yo"
}
```

Example of the error you get if you do an update of an exception list and someone else has changed it:
```ts
{
  "message": "[exception-list:a08795b0-c85f-11ea-b1a6-c155df988a92]: version conflict, required seqNo [1074], primary term [1]. current document has seqNo [1077] and primary term [1]: [version_conflict_engine_exception] [exception-list:a08795b0-c85f-11ea-b1a6-c155df988a92]: version conflict, required seqNo [1074], primary term [1]. current document has seqNo [1077] and primary term [1], with { index_uuid=\"a2mgXBO6Tl2ULDq-MTs1Tw\" & shard=\"0\" & index=\".kibana-hassanabad_1\" }",
  "status_code": 409
}
```

Lists are the same way and flavor, they encode the _version the same way that saved objects do. To see those work you run these scripts:

```ts
./post_list.sh
./post_list_item.sh
./find_list.sh
./find_list_item.sh
```



### Checklist

- [x] [Unit or functional tests](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) were updated or added to match the most common scenarios
2020-07-20 11:00:06 -06:00
Robert Austin 75e4c7a2b7
[Resolver] no longer pass related event stats to process node component (#72435) 2020-07-20 12:40:59 -04:00
spalger 5741a868bc Revert "skip flaky suite (#72146)"
This reverts commit 45a4393459.
2020-07-20 09:32:41 -07:00
Michael Olorunnisola 2094f33537
[Security Solution] Cleanup endpoint telemetry (#71950)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-20 12:28:46 -04:00
Joe Reuter 96d965d4e3
Unskip dashboard embeddable rendering tests (#71824) 2020-07-20 17:55:27 +02:00
Bohdan Tsymbala d744d18b19
[ENDPOINT] Added unerolling status for host. (#72303)
* Added unerolling status for host.

* Added unenrolling status to frontend tests.
2020-07-20 17:44:17 +02:00
Christos Nasikas 54c3644757
[Alerting][Connectors] Increase the size of the logos (#72419) 2020-07-20 18:35:42 +03:00
Xavier Mouligneau a62c62e118
[SECURITY] [Timeline] Raw events not displayed (#72387)
* fix nav with no-data

* fix rules action alerts

* fix raw alert event type

* snapshot

* can only use network-only

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Patryk Kopycinski <contact@patrykkopycinski.com>
2020-07-20 11:14:50 -04:00
Pete Harverson 66208fb73e
[ML] Fixes display of regression stop stats if one is NaN (#72412) 2020-07-20 16:12:57 +01:00
Jean-Louis Leysens e5c7e9a474
[Ingest Pipelines] Processor Editor Move Tooltip (#72239)
* first implementation of tooltip

* Add processor tooltip component files

* remove init position from code for now

* colocate on change handler and make code a bit cleaner

* removed document.body.appendChild logic because EuiPortal does that for us

* use correct toggle button api

* added test to check button disabled while editing

* remove cursor not allowed

* simplify logic

* assert if against positive

* remove unused variable

* Remove unused actions const

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-20 17:02:54 +02:00
Kerry Gallagher 11182c8ef7
Fix match phrase and not match phrase comparators (#71850)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-20 15:51:22 +01:00
Liza Katz 6c3b900d11
[Plugin Generator] Generate tsconfig and useDefaultBehaviors (#72040)
* improve test stability

* add a tsconfig file and useDefaultBehaviors

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-20 17:29:28 +03:00
Patryk Kopyciński 7ac5fc4e1f
[Security Solution][Timeline] Fix timeline styling and createFrom beh… (#72152) 2020-07-20 16:14:13 +02:00
Robert Austin 6cf796a4fb
[Resolver] Selector performance (#72380)
* Memoize various selectors
* Improve performance of the selectors that calculate the `aria-flowto` attribute.
* more tests.
2020-07-20 09:38:30 -04:00
Alejandro Fernández Haro f331cc8b64
[Ingest Manager] Set _meta in the index.mappings (#72026)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-20 13:54:36 +01:00
Nicolas Chaulet bf89b3cdd2
[Ingest Manager] Do not bumb config revision during config creation (#72270) 2020-07-20 08:53:09 -04:00
James Gowdy 9504c9453b
[ML] Adding missing index pattern name to new job wizards (#72400) 2020-07-20 13:47:18 +01:00
Dima Arnautov b1edce8050
[ML] improve annotation flyout performance (#72299) 2020-07-20 12:50:09 +02:00
Cauê Marcondes 7976e2bda4
[APM] Testing error rate API and restructuring folders (#72257)
* adding error rate and restructuring tests

* removing console log

* removing console log

* adding error rate and restructuring tests

* fixing TS error

* removing unnecessary files

* removing trial tests
2020-07-20 12:39:26 +02:00