Commit graph

7614 commits

Author SHA1 Message Date
Bhavya RM ab375e4bb2
A11y tests for roles page (#79900) 2020-10-08 12:28:43 -04:00
Quynh Nguyen f04c295d4d
[ML] Fixes anomaly detection jobs list load if call to load job messages fails (#79792)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-08 11:12:26 -05:00
Nathan Reese 1cefc8eed0
[Maps] clean up uses of any in redux actions and kibana services (#79737)
* [Maps] clean up uses of any in redux actions and kibana services

* API doc changes and updated IndexPatternSelect type

* tslint errors in OSS code

* API updates

* remove IndexPatternSelectPublicProps and create IndexPatternSelectInternalProps instead

* include changes to index_pattern_select

* API updates

* remove savedObjectClient from IndexPatternSelectProps

* update types for lazy load component

* remove unused import

* export type

* another API clean-up

* revert changes to import in data/public/types

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-08 07:48:21 -06:00
Dima Arnautov 14b02a3506
[ML] Fix job selection flyout (#79850)
* [ML] fix job selection flyout

* [ML] hide time range column

* [ML] show callout when no AD jobs presented

* [ML] close job selector flyout on navigating away from the dashboard

* [ML] add Create job button

* [ML] fix mocks

* [ML] add unit test for callout
2020-10-08 14:59:35 +02:00
Bohdan Tsymbala 0bd345c1a1
Implemented trusted app name truncation. (#79976) 2020-10-08 13:54:00 +02:00
Dima Arnautov 3d90401b67
[ML] clear selection action (#79834) 2020-10-08 10:04:23 +02:00
Frank Hassanabad 43495d80ba
Fixes bug where the same index was being passed in (#79949)
## Summary

If you had two different index patterns for threat and your query I was previously sending the same pattern in for both which was causing drop down boxes for threat match to null things out. Now, I set the two different indexes correctly. 

### 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-10-07 18:53:19 -06:00
Frank Hassanabad 7732a21a48
Adds date time query and return fields for timestamps and overrides (#79911)
## Summary

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

Also fixes:
* Timestamp override not being pushed down into threshold rules to use
* Timestamp override not being used for lastValidDate
* The return format of the date time might have been different depending on the customer mapping for both the override and the regular @timestamp so this fixes that as well.
* Fixes one small type issue with fields.


### 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
2020-10-07 18:53:02 -06:00
Davis Plumlee ba6e1bf2f0
[Security Solution][Detections] Reverts rules table tag filter to use AND operator (#79920) 2020-10-07 18:05:49 -06:00
Kevin Logan 1b0e9b01cc
add the correct class to truncate the names (#79921)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-07 19:48:22 -04:00
Brian Seeders cb1af1b472 Skip failing suite (#79522)
(cherry picked from commit 9011f42d7f)
2020-10-07 14:02:40 -07:00
Aleh Zasypkin d1e1050817
Allow idleTimeout/lifespan larger than 32-bit signed integer. (#79858) 2020-10-07 20:44:44 +02:00
Paul Tavares 4da338a0cb
[SECURITY_SOLUTION][ENDPOINT] Trusted Apps - fix error for duplicate fields to correctly mention the field at fault (#79853)
* Fix error for duplicate fields to correctly mention the field at fault
* Add new tests to duplicate field validation
2020-10-07 13:35:47 -04:00
Alexey Antonov 59d83e6955
Add support for HDR percentiles in TSVB visualizations (#78306)
* Add support for HDR percentiles in TSVB visualizations

Closes: #64238

* remove extra console.log

* fix CI

* fix PR comments

* fix layout

* remove legacy injectI18n

* fix localization issues

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-07 19:41:37 +03:00
Josh Dover a8c080be28
Delay client-side feature usage registration until start (#79365)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-07 09:18:43 -06:00
Oliver Gupte 56c61225b2
Closes #79796. Fixes bug in the anomaly detection setup header link (#79797)
showing an alert when environment: All was selected even when there were
anomaly detection jobs
2020-10-07 08:07:55 -07:00
Melissa Alvarez dedcce9349
set initialWidth for confusion matrix dataGrid columns (#79790) 2020-10-07 10:35:15 -04:00
Jason Stoltzfus 718702c3ea
[Enterprise Search] Prevent double encoding in enterprise_search_request_handler (#79747) 2020-10-07 07:45:33 -04:00
Walter Rafelsberger f1905ecaf5
[ML] Fix registering home screen panel (#79080)
* [ML] Import tweak.

* [ML] Attempt at fixing flaky registering.

* [ML] Re-enable tests.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-07 10:22:07 +01:00
MadameSheema edce4ebcd9
fixes flaky test (#79695)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-07 11:09:51 +02:00
Marco Liberati ff80d90626
[Lens] Fix for Percentage and Metric suggestions/visualizations on 0 or empty vlaues (#79309)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-07 10:36:56 +02:00
Marta Bondyra ae84bb2033
[Lens] Improve unclear UI for bucket aggregation grouping order (#77331) 2020-10-07 10:34:48 +02:00
Joe Reuter 018c2bd22f
[Lens] Make histogram brushing possible (#79435) 2020-10-07 10:20:58 +02:00
Shahzad 8f49154100
[UX] Update help labels for web core vitals (#79662)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-07 10:17:53 +02:00
Marta Bondyra cded1ce5f1
[Lens] Don't debounce visualization settings UI (#79625)
* perf: don't debounce settings menu

* perf: fix performance for settings
2020-10-07 10:17:17 +02:00
James Gowdy 57f6ecda73
[ML] Sending secondary auth headers to _explain (#79814) 2020-10-07 09:00:43 +01:00
Devin W. Hurley 83e6c38159
[Security Solution] [Detections] Write failing status when executionStatus is in error (#79311)
* Write failing status when executionStatus is in error

* adds unit test for error handling if rule status service throws an error

* adds success test for when executionStatus is failed

* moves logic for writing executionStatus failure to rule status saved object inside find rules status route, updates find rules route to display error if executionStatus is in error, but not be in charge of writing the status. That job belongs to the find rules status route.

* test if we are writing an error status when calls are made to find_rules_status_route and adds a test for general error checking

* adds JSDocs description for rules status route, updates findRules filter to append rule ids to the end of query, removes object.keys()

* don't write an error to our rule status in the route, only read from the executionStatus property and merge that result with our stored failures

* fixes tests

* move mock rule status service out of __mocks__ folder and remove unnecessary references to mock in tests

* fix type error

* updates json.gzip for cypress

* PR feedback

* fix timing issue with integration tests

* removes unzipped data.json
2020-10-07 01:03:32 -04:00
Yara Tercero 30695fb9eb
[Security Solution][Exceptions] - Updates autocomplete validation for numbers and boolean (#74561)
## Summary

This PR chips  a bit at some stricter value validations that have been discussed. Further validation is needed, but this adds some more basic validation.

- **Current:** if selected field is of type `boolean` users can add custom values in combo box
  - **Now:** if selected field is of type `boolean` users can only select `true` or `false`
- **Current:** if selected field is of type `number` (that is kibana type number) user can input any values
  - **Now:** if selected field is of type `number` and no autocomplete suggestions are available, number input is used to restrict users
- **Current:** for operator `match_any` it's conducting an autocomplete search after each selection resulting in some jumpy/weird behavior
  - **Now:** only conducts autocomplete search on initial field selection and if user enters value to search
- **Current:** only validations on type date
  - **Now:** validation on type (Kibana type) date, number
- **Current:** input would show red when there was an error but user could still submit
  - **Now:** submit button is disabled if error exists
2020-10-06 22:26:53 -04:00
Ryland Herrick e60cfa09ae
[Security Solution][Detections] Convert EQL validation to use search strategy (#79538)
* Rename types from the top-level plugin

These are the same types with a different name. However, the benefit is
that they exist in a non-restricted path (the top level of the plugin).

* Convert our validation function to use the EQL search strategy

Rather than calling our custom EQL validation endpoint, we can instead
leverage the EQL search strategy. The downside is that we have to move
our response parsing logic to the frontend, but the benefit is that
there's no backend to maintain.

* Remove server code related to our EQL validation endpoint

We're keeping our io-ts schemas for now since they're still being used
to type the I/O of our client function.

* Add the data contract to our KibanaServices

I'm not aware of a way to pass react context to the form lib validator
functions, so for now we have to pass this the ugly way :(

* Remove io-ts types corresponding to our defunct validation endpoint

We were keeping these around for the types, but they're so simple that
it's really not worth the overhead. The tests are similarly for
functionality that is no longer used, so no hard feelings there.

* Ensure that our validation does not bother generating hits

We only care about the query's validity, so we can tell the response
handler to do less work here.

* Pass transport options when retrieving an existing search

Without passing transport options to .get, a query with an `ignore`
would succeed if it completed in the `waitForCompletionTimeout` window,
but fail (with the ignored error) on the subsequent request if it became
async.

* Use constant for our strategy key

* Export search strategy constants for client consumption

Common values cannot be consumed directly by client code (compilation
error), so we need to re-export them from data_enhanced's public module.
2020-10-06 20:45:57 -05:00
Frank Hassanabad 08fdcfc621
[Security Solution][Detection Engine] Fixes date time errors when source index does not have date time stamps (#79784)
## Summary

Right now even though it is not 100% ECS compliant a user can create a source index that has records which do not have the `@timestamp` but rather utilizes their own timestamp data and then within the detection engine they do an "override" to utilize that other timestamp.

To reproduce this simply add a lot of data records to an index and omit the `@timestamp` and then use the detection engine override to choose a different date timestamp. Before this fix you will see errors showing up during rule run even though it still does produce valid signals.

After this fix, you will not get errors showing up as we do not allow unusual things such as:

```ts
new Date(undefined).toISOString()
```

To occur which is what does the range throw. If you are on the estc server you can use the mapping I created called:

```ts
delme-alert-customer
```

With the override of `triggered`

### 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
2020-10-06 18:18:19 -06:00
Justin Kambic 8472bb7d10
[Uptime] Add callout for synthetics UI (#79563)
* Add callout for synthetics UI.

* Refresh outdated test snapshots.

* Test synthetics callout component.

* Update callout copy.

* Update URL for announcement link.

* Update test snapshots.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-06 20:05:41 -04:00
Marshall Main 7f5b824726
Fix EQL search request filter when built with exceptions (#79753) 2020-10-06 19:55:31 -04:00
Marshall Main 0db0a16ead
Add mapping version check before executing EQL rules (#79553)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-06 19:54:40 -04:00
Yara Tercero e4fc48cd5f
[Security Solution][Detections] - Rule creation query preview (#78985)
### Summary

This PR introduces a preview histogram feature inside the rule creation workflow, that gives users insight to how effective the rule is for triggering alerts the user would like to see.
2020-10-06 19:48:04 -04:00
Sandra Gonzales 041dfdd89d
send protocol separately to agent as part of full agent policy (#79781) 2020-10-06 19:40:28 -04:00
Ryland Herrick 7031ea4f7b
[Security Solution][Detections] Rule Form: prevent creation of invalid scheduling parameters (#79577)
* Clean up our component types

* Clamp our Rule Schedule inputs to safe values

* If the user enters a value > Number.MAX_SAFE_INTEGER, it will be
  updated to Number.MAX_SAFE_INTEGER
* If the user enters non-numeric text, it will be updated to 0

* Ensure that we do not go below the default value

0 is not necessarily a reasonable default, but we already have a
  variable for the default value.

* Update cypress interaction with schedule fields

Now that we set defaults for bad values, it's no longer possible to
"clear" the numeric input. However, to get roughly the same behavior we
can instead select the current value and start typing.
2020-10-06 18:13:31 -05:00
Phillip Burch bd153c48cb
Show callout for K8s jobs (#79610) 2020-10-06 17:27:30 -05:00
Kevin Logan cb73df0bdc
[SECURITY_SOLUTION] Task/add view agents link to enrolling (#79735)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-06 18:25:53 -04:00
Quynh Nguyen d5a19ec2e2
[ML] Fix jobs so it limit job menu actions for jobs that are closing (#79303)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-06 17:07:08 -05:00
John Schulz 302004df47
[Ingest Manager] Configure Elasticsearch output with YAML in global output settings (#79019)
## Summary
YAML entered on the Settings page will be added to each Elastic Agent policy 

### Settings form
<img width="50%" alt="Screen Shot 2020-10-05 at 9 29 27 AM" src="https://user-images.githubusercontent.com/57655/95085934-daa20880-06ed-11eb-9f52-aab5d69666ad.png"><img width="50%" alt="Screen Shot 2020-10-05 at 9 29 58 AM" src="https://user-images.githubusercontent.com/57655/95085886-c9f19280-06ed-11eb-8c85-a56b330cee37.png">


### Policy screen
<img width="50%" alt="Screen Shot 2020-10-05 at 9 30 38 AM" src="https://user-images.githubusercontent.com/57655/95085889-ca8a2900-06ed-11eb-9cd7-b7590101a15d.png">


### Input Validation
<details><summary>Fails if the value cannot be parsed as YAML, but there are no restricted keys or other guidance</summary>

<img width="50%" alt="Screen Shot 2020-10-05 at 9 32 39 AM" src="https://user-images.githubusercontent.com/57655/95086469-877c8580-06ee-11eb-8189-d70413a0a5c9.png">

</details>

### Open questions
  1. Is "Additional YAML Configuration" ok for the form?
    * Will use "Elasticsearch output configuration"
  1. Alternatives to [`additional_yaml_config`](https://github.com/elastic/kibana/pull/79019/files#diff-d2cc0ddf9161efb6898baca37350c720) for the new saved object key
    * No comments on the name but will move it to the outputs saved object


### Checklist

- [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/master/packages/kbn-i18n/README.md)
2020-10-06 18:02:44 -04:00
Nathan L Smith 68130dfd87
Re-enable canvas storyshots (#79750)
* Only throw the error about building the DLL if we're not running in Jest
* Update existing storyshots
* Add Jest mock for Datasource story

All tests look to be passing and `yarn storybook canvas` works. I clicked through all the stories and it doesn't look like anything is broken.
2020-10-06 16:59:56 -05:00
Nathan Reese ab42ca2c64
[Maps] fix use correct mount-context (#79688)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-06 15:48:50 -06:00
Bohdan Tsymbala 383a912f17
[SECURITY_SOLUTION] Reused the naming scheme for field column in conditions table. (#79722)
* Reused the naming scheme for field column in conditions table.

* Updated snapshot.

* update Operator value to show as `is`

* Update Jest snapshot

Co-authored-by: Paul Tavares <paul.tavares@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-06 17:31:27 -04:00
Nicolas Chaulet 5853abc1ec
[Ingest Manager] Fix enrollment instructions missing args (#79730) 2020-10-06 17:20:50 -04:00
Thomas Neirynck fd4eacd29f
[Maps] Enable geo-point for mvt scaling type (#79733) 2020-10-06 17:17:47 -04:00
Bohdan Tsymbala 0a713d3750
Fixed the grid view pagination. (#79717)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-06 17:14:09 -04:00
Joe Portner 0a02ac1327
Rename namespaces to initialNamespaces for create operations (#79682) 2020-10-06 17:01:26 -04:00
Brent Kimmel 7068e96007
[Security Solution][Resolver] Pills can overflow to the right of their bounding boxes (#79734) 2020-10-06 16:42:29 -04:00
Ryland Herrick a4a5393d1f
[Security Solution][Detections] Chore: Fix rule form warnings (#79590)
* Prevent react warnings for unknown `isVisible` prop

Unknown config options ultimately become attributes on an anchor/button
element, so we need to not overload these config objects.

* Fix react warning about unknown `isDisabled` prop

There is no `isDisabled` prop on the underlying `EuiFieldText`
component, so we should use the native `disabled` attribute instead.

* Fix warning about switching between un-/controlled componenents

On the first few renders, our input refs have not been set while a
default value has, so the length of our values is 1 while our refs is 0.
This causes us to hit the 'else' condition of our ternary, leading to an
input with no value. When the ref is then populated, a value is
generated and so is the error.

The previous logic here was always evaluating to `value: item` and so was
simplified.

* Fix jest warning on unexpected state update

* removes unnecessary use of act()
* renders our component within the test
  * This allows our test to synchronize with react and prevents the
    warning; I suspect it has something to do with the scoping of
    `wrapper` or the `beforeEach` not being async, but I haven't had
    time to investigate.

* Remove unnecessary test guards

These tets no longer throw warnings.
2020-10-06 15:38:26 -05:00
Constance c9d2398572
Revert "Temporarily remove Layout from App Search plugin for 7.10 release (#79506)" (#79702)
This reverts commit d5b8a95694.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-06 13:24:27 -07:00