Commit graph

14690 commits

Author SHA1 Message Date
Christos Nasikas faae074607
[Security Solution][Case] Push ITSM comments as work notes (#93916)
* Push ITSM comments as work notes

* Fix cases mapping

* Improve error messages

* Fix tests
2021-03-08 16:38:04 +02:00
Ahmad Bamieh 8de91b506e
[i18n] Integrate 7.12.0 Translations (#93595)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-08 16:10:33 +02:00
Casper Hübertz 54e7734fe6
[APM] Sets target blank on the docs link (#93913) 2021-03-08 14:38:49 +01:00
Casper Hübertz ef02d1cf2b
[APM| Change correlations table actions and title (#93917)
* [APM] Change filter icons
* [APM] Change filter heading
2021-03-08 14:38:36 +01:00
Michael Dokolin 8fa917c920
Fix accessibility in the global query bar (#93411)
* Fix accessibility of the filter bar tags (#82457)
* Fix focus state keeping after removing a filter tag (#82503)
* Fix invalid state in the query bar date picker (#82513)
2021-03-08 14:34:48 +01:00
Nicolas Chaulet f4caf8727d
[Fleet] Remove fleetServerEnabled feature flag and use fleet system indices (#92422) 2021-03-08 07:40:09 -05:00
Dario Gieselaar e2abb03ad0
[APM] Color by span type when there's only one service (#90424)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-07 07:52:38 +01:00
Lukas Olson acb7b7726e
[KQL] Remove number parsing (#93658)
* [KQL] Remove number parsing

* Update test snapshots
2021-03-06 23:45:50 -07:00
Brian Seeders a7dd5179a9
Skip another uptime test blocking ES snapshot promotion (#93868) 2021-03-05 23:04:27 -05:00
Melissa Alvarez cac26b8cda
[ML] Data Frame Analytics creation wizard: add validation step (Part 1) (#93478)
* wip: create validationStep component

* wip: trainingPercent check, analysisFields check. Step details

* move validation check to server

* handle no training percent in validation

* move callout component to shared dir

* use shared Callout component in AD val and update message headings

* update types

* adds functional tests for validation

* adds api integration test for validate endpoint

* consolidate messages for depvar and fields

* fix accessibility test

* update license

* update validation messages

* update types in validation model

* add jobValidationReturnType
2021-03-05 21:48:39 -05:00
Brian Seeders 020a8ee7dd
Revert "Display Kibana overall status in the logs and have FTR wait for green status before running tests (#92568)" (#93855)
This reverts commit d53894aa5a.
2021-03-05 21:02:52 -05:00
Karol Fuksiewicz a11f34c910
feat(apm): add rust icon (#93781) 2021-03-05 20:25:53 -05:00
Christos Nasikas d0f356dde3
[Alerts] Fix broken alert's actions when upgrading from 7.10 to 7.11 (#93611)
Co-authored-by: Steph Milovic <stephanie.milovic@elastic.co>
2021-03-05 19:03:45 -05:00
Frank Hassanabad 972bf0adc1
[Security Solutions] Unrevert and fix tests (#93834)
## Summary

Unreverts:
https://github.com/elastic/kibana/pull/93548

By fixing tests that are relying on date times to be less strict.

### 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
2021-03-05 18:41:00 -05:00
Davis Plumlee b5ee9f451f
[Security Solution][Detection Rules] Fixes rule details spacing on rules with long queries (#93831) 2021-03-05 18:19:14 -05:00
Brian Seeders 654435249e
Skip uptime test blocking ES snapshot promotion (#93828) 2021-03-05 18:12:55 -05:00
Lukas Olson c9b0b1577a
[KQL] Do not generate nested AST/Elasticsearch queries for same-level AND/OR clauses (#93506)
* [KQL] Do not generate nested AST for same-level AND/OR clauses

* Update tests

* Update snapshots
2021-03-05 15:52:49 -07:00
Devin W. Hurley fd1d796564
[Security Solution] [Detections] Fixes validation on response from find status route (#93684)
* fix validation on response of find status route when rule has a partial failure status

* replaces warning in rule status service with partial failure to maintain backwards compatibility from an API standpoint, also displays 'warning' on UI if a rule's status is partial failure

* display partial failure as 'warning' on all rules table and update e2e test to check for partial failure not warning

* add util function, show 'warning' on monitoring table, fix e2e tests
2021-03-05 17:24:47 -05:00
Marshall Main 352af43b29
Return results from find and read rules even if they don't validate (#93713) 2021-03-05 17:07:09 -05:00
Chris Cowan eb104651b1
[Metrics UI] Disable anomaly alerting (#93813) 2021-03-05 14:48:46 -07:00
Mike Côté 23ce8dcfdb
Rename alerts plugin to alerting (#92898)
* Rename alerts plugin to alerting

* Deprecate old config values

* Few more renames

* Update plugin list

* Rename xpack.alerts -> xpack.alerting

* Fix some ESLint rules

* Fix typecheck

* Fix some test failures

* Some more renames

* Fix ESLint

* Fix some test failures

* Fix failing jest test

* Undo exclusive test

* Fix APM deps

* Fix docs

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-05 13:59:34 -05:00
Nicolas Chaulet 02be8c16c9
[Fleet] Improve error status code for package (#93696) 2021-03-05 13:50:14 -05:00
Dima Arnautov 15cda17f2d
[ML] Fix creation of alert instances for Anomaly detection alert type (#93605)
* [ML] use static alert instance key, remove logic for handling duplicates

* [ML] use job id as an alert instance id

* [ML] beta label

* [ML] round time interval

* [ML] fix preview button

* [ML] improve the default template

* [ML] remove redundant kibanaBaseUrl
2021-03-05 12:26:58 -05:00
Scotty Bollinger 5755d7907c
[Workplace Search] Port RoleMappings changes (#93458)
This PR ports changes from the ent-search RoleMappings to Kibana

Reference PR: https://github.com/elastic/ent-search/pull/3148
2021-03-05 13:18:10 -04:00
Michael Dokolin 542d66643e
[Reporting] Fix chromium driver factory to emulate browser timezone (#73242) 2021-03-05 17:47:49 +01:00
Jen Huang b310138717
Don't truncate package name in package details page title (#93716) 2021-03-05 08:14:50 -08:00
Brandon Morelli 433b55353c
Update link to index template documentation (#93709) 2021-03-05 08:02:32 -08:00
Madison Caldwell 840edacecf
[Security Solution][Detections][Threshold Rules][7.12] Final Threshold Rule Fixes for 7.12 (#93553)
* refactor

* Add explicit to/from

* cleanup

* A bit more cleanup

* Fix threshold signal history bug when rule is edited

* Added comments

* more cleanup, fix tests

* Add tests later

* Reverse the tuples array

* Fix getThresholdBucketFilters test

* Fix translations
2021-03-05 10:26:00 -05:00
Vadim Dalecky 89020354eb
Unskip "Explore underlying data" skipped functional test (#93627)
* ci: 🎡 enable flaky test for running through flaky test runner

* ci: 🎡 unskip skipped test
2021-03-05 15:25:59 +01:00
Tiago Costa 0f261ef670
skip flaky suite (#93737) 2021-03-05 14:16:11 +00:00
Tiago Costa 50c5f0617b
skip flaky suite (#93735) 2021-03-05 14:11:31 +00:00
Sonja Krause-Harder 3cd0d455c6
[Fleet] Don't add extra quotes to YAML strings from manifest files (#93585)
* Add UI validation for string YAML values in policies.

* Do not quote YAML strings containing special characters.

* Add test case for wildcards in the middle of strings.

* Add multiline test case.

* Polish test case.

* Update API docs

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-05 15:00:31 +01:00
Candace Park bf1dcb7679
[Security Solution][Endpoint][Admin] Fixes bug where license watch updates policy in fleet (#93691) 2021-03-05 08:35:24 -05:00
Gidi Meir Morris 7cfd15c038
[Alerting] adds Connectors APIs and deprecates old Actions APIs as per the new Alerting terminology (#92451)
* moved legacy actions api to legacy folder

* introduced connector create api

* added new delete route

* added new execute and get_all

* introduced all connector APIs

* renamed action to connector in Apis

* comment on camel case type

* fixed va

* updated docs

* legacy title

* corrected APIs

* legacy links

* added linik to deprecatred APIs

* added linik to deprecatred APIs from index

* moved legacy apis down one level

* Apply suggestions from code review

Co-authored-by: ymao1 <ying.mao@elastic.co>

* renamed route file for connectorTypesRoute

* define legacy route

* Update docs/api/actions-and-connectors/legacy/index.asciidoc

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

* api docs

Co-authored-by: ymao1 <ying.mao@elastic.co>
Co-authored-by: Mike Côté <mikecote@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-05 06:49:06 -05:00
Gidi Meir Morris 46247c6c55
[Alerting] Renames the "ES query" alert type to "Elasticsearch query" (#93584)
Tweaks UX for 7.12
2021-03-05 11:41:37 +00:00
Angela Chuang 229ffd902e
[Security Solution] Fix a flacky cypress test in data_providers.spec (#93655)
* extend timeout when dragging

* drop in the middle of the area
2021-03-05 09:13:02 +00:00
Pierre Gayvallet d53894aa5a
Display Kibana overall status in the logs and have FTR wait for green status before running tests (#92568)
* add licensing plugin status

* simplify log message

* review comments
2021-03-05 09:55:14 +01:00
Tyler Smalley 1f936a1571 Revert "[Security Solutions] Sets our default date time to be "today" instead of "Last 24 hours" to enable cachability and fixes one date math bug in the URL (#93548)"
This reverts commit 47bb9773a1.
2021-03-04 22:06:17 -08:00
liza-mae 27f2c75921
Upgrade smoke tests (#92893)
* Upgrade smoke tests

* Fix lint issues

* Remove duplicate line

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-04 20:22:20 -07:00
Jonathan Budzenski 84344391ba skip should apply query to fit to bounds. #93718 2021-03-04 20:24:54 -06:00
Xavier Mouligneau f13dabbb5c
{SECURITY SOLUTION] EQL timeline bug (#93555)
* timeline eql -> 1-Do not default tiebreaker 2-Close EQL setting popover

* review I

* review focus trap is a trap

* no need to mock it for everybody
2021-03-04 20:41:48 -05:00
Patrick Mueller 1c4c7c26a4
[eventLog][docs] updates README.md (#92563)
resolves https://github.com/elastic/kibana/issues/89998

The README.md for the event log was a bit old, and was more focused on
implementation details and information for plugin developers writing events.
There wasn't much information available that was useful for folks using
the event log for problem diagnosis.

So the docs have been updated a bit in general, and more information has
been added on the event document structure, and the actions and alerts
events specifically.
2021-03-04 19:23:55 -05:00
Joe Portner 171567d70a
ESLint rules for Spaces and Security (#93644) 2021-03-04 18:47:39 -05:00
Angela Chuang 7c9e08e269
styling (#93663) 2021-03-04 22:59:38 +00:00
Jason Stoltzfus 8381fdd60e
Hide Value and Funtional boost for geolocation (#93683) 2021-03-04 17:06:03 -05:00
Jen Huang 0d4ca46cf0
[Fleet] Set all keyword and text fields for index.query.default_field index template setting (#91791)
* Set all keyword and text fields for `index.query.default_field` setting

* Update tests and snapshots

* Fix test

* Add default field limit safeguard

* Add logging when beyond limit

* Update tests to mock app context (because I added logger usage)

* Update api integration test

* Rename consts
2021-03-04 16:34:47 -05:00
Xavier Mouligneau abb71b471f
can not query the world (#93556) 2021-03-04 16:22:58 -05:00
Frank Hassanabad 47bb9773a1
[Security Solutions] Sets our default date time to be "today" instead of "Last 24 hours" to enable cachability and fixes one date math bug in the URL (#93548)
## Summary

Enables caching in our application by setting the default date time of our application to be `from: now/d` and `to: now/d`. When users go to the advanced settings they will see this now:
<img width="1243" alt="Screen Shot 2021-03-04 at 11 53 08 AM" src="https://user-images.githubusercontent.com/1151048/110014626-43fb6700-7ce0-11eb-94ee-0c4cc7a8a10f.png">

In their date time bars on page loads they will see today instead of 24 hours:
<img width="556" alt="Screen Shot 2021-03-04 at 11 50 18 AM" src="https://user-images.githubusercontent.com/1151048/110015216-dac82380-7ce0-11eb-935d-2d71078c1170.png">

When before they used to have `from: now-24` and `to: now`. This new date time frame plays well with Elastic caches and no longer "busts" them for users on each page request. Now users will send the same date time frame on each query which will cache the views as the default.

This also fixes a small bug with the URL's where the "to" was not being rounded up when it was a dynamic date time on first load. For example if you went to the URL, `/app/security/hosts/allHosts` with no additional state information but have a default of `from: now/d` and `to: now/d` it would not round up the date time. Now it rounds it up through the date math utilities which only rounds when it sees that it is a dynamic date math.

When requests are being sent, expect to see this where you have `from` rounded down and `to rounded up. This should be a consistent non-sliding date time math for caching to operate:
<img width="608" alt="Screen Shot 2021-03-04 at 11 33 11 AM" src="https://user-images.githubusercontent.com/1151048/110015357-01865a00-7ce1-11eb-8580-efacf791b573.png">

If you change the `to` to be another date math such as `now+1d/d` expect to see it also rounded up. This behavior mirrors that of discover:
<img width="608" alt="Screen Shot 2021-03-04 at 11 33 11 AM" src="https://user-images.githubusercontent.com/1151048/110015440-17941a80-7ce1-11eb-832d-e826962829ed.png">

You can manually verify this behavior by setting the same now dates in discover as well as security solutions and both should work as is even when you remove the URL state from the right side of a `?`


### 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
2021-03-04 14:22:37 -07:00
Candace Park 28750e913b
[Security Solution][Endpoint][Admin][Policy] Register as AV os restrictions tooltip note (#93306) 2021-03-04 16:05:46 -05:00
Kerry Gallagher e45718d0ff
[Logs UI] Fix log stream data fetching (#93201)
* Use ReplaySubject and amend date comparisons

* Assess date range expressions separately

* Only add dataset filter to view in stream links if one exists
2021-03-04 19:50:14 +00:00
Jason Stoltzfus 6ab3fc0107
[App Search] Added relevance tuning search preview (#93054) 2021-03-04 11:47:10 -08:00
Corey Robertson d673f5601d
[Canvas] Fix reports embeddables (#93482)
* wip

* WIP

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-04 14:30:30 -05:00
John Dorlus 572f6888c2
[ILM] Added new functional test in ILM for creating a new policy (#92936)
* Added data-test-subj for ILM policies row and added a functional UI test to create a new ILM policy.

* Removed .only from test to allow entire test suite to run again.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-04 13:55:00 -05:00
Thomas Neirynck db3db0cebc
[Maps] Track tile loading status (#91585) 2021-03-04 13:22:03 -05:00
Alison Goryachev ebe1f1f6d3
[Upgrade Assistant] Disable UA and add prompt (#92834) 2021-03-04 13:03:14 -05:00
Alison Goryachev 67ca801c3f
[Snapshot Restore] Remove cloud validation for slm policy (#93609) 2021-03-04 13:02:08 -05:00
Nathan Reese 05db7c60b1
[Maps] Support GeometryCollections in GeoJson upload (#93507) 2021-03-04 11:01:33 -07:00
ymao1 cad26537a9
[Alerting] Improving health status check (#93282)
* wip

* Moving catchError so observable stream does not complete. Adding retry on failure

* Using retryWhen. Updating unit tests

* PR fixes

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-04 11:58:20 -05:00
Joe Reuter 1882b82531
fetch node labels via script execution (#93225) 2021-03-04 17:08:26 +01:00
Ece Özalp 3d374e2686
[Security Solution] Adds getMockTheme function (#92840)
Closes elastic/security-team#866.
2021-03-04 10:31:39 -05:00
Gidi Meir Morris 79134b3b6d
[Alerting][Docs] Adds Alerting & Task Manager Scalability Guidance & Health Monitoring (#91171)
Documentation for scaling Kibana alerting, what configurations can change, what impacts they have, etc.
Scaling Alerting relies heavily on scaling Task Manager, so these docs also document Task manager Health Monitoring and scaling.
2021-03-04 14:11:53 +00:00
Joe Reuter 462fe0829e
stabilize waiting for visualization (#93469) 2021-03-04 14:56:56 +01:00
Alejandro Fernández Gómez a050b7af79
[Fleet] Correctly track install status of an integration (#93464) 2021-03-04 11:01:23 +01:00
István Zoltán Szabó 284a77c7c0
Reviews data frame analytics UI text (#93033)
Co-authored-by: Lisa Cawley <lcawley@elastic.co>
2021-03-04 09:09:43 +01:00
Kevin Qualters 89373490d0
Display multiple copyable fields for process.args in resolver node detail panel (#93280) 2021-03-04 00:24:58 -05:00
Davis Plumlee 3316fb43fd
[Security Solution][Detections] ML Popover overflow fix (#93525)
Co-authored-by: Garrett Spong <spong@users.noreply.github.com>
2021-03-03 21:22:05 -05:00
Angela Chuang a953e90dd4
[Security Solution] fix data provider cypress test (#93465)
## Summary
This PR is to fix data_provider's cypress test: displays the data provider action menu when Enter is pressed.

When I ran it locally, I couldn’t reproduce it every time. There’s a chance that the timeline was opened but the filter we put wasn’t there, this happen when I simulate slow 3G with Chrome or once out of my 10-time-trial with `loop_cypress_tests.js`

[failure 1](https://kibana-ci.elastic.co/job/elastic+kibana+security-cypress/4313/testReport/junit/(root)/displays%20the%20data%20provider%20action%20menu%20when%20Enter%20is%20pressed/timeline_data_providers_displays_the_data_provider_action_menu_when_Enter_is_pressed/)
[failure 2](https://kibana-ci.elastic.co/job/elastic+kibana+security-cypress/4313/testReport/junit/(root)/displays%20the%20data%20provider%20action%20menu%20when%20Enter%20is%20pressed/timeline_data_providers_displays_the_data_provider_action_menu_when_Enter_is_pressed_2/)

How to run this test several times automatically:
1. Go to the file and mark your case with .only
2. Copy the relative path of the file
3. Go to x-pack/plugins/security_solution/package.json Line 13, change —spec to the path you just copied (e.g: ./cypress/integration/timelines/data_providers.spec.ts)
4. Go to Kibana/ and run node x-pack/plugins/security_solution/scripts/loop_cypress_tests.js 1 (1 means run it once, you can put more to check flakiness)
5. After it finishes, it generates you a report under: kibana/target/loop-cypress-tests.txt
6. Search for `displays the data provider action menu when Enter is pressed.` and see if all passes.
2021-03-03 17:27:29 -07:00
Nathan L Smith 4e21faeeb6
Fix service map for All environment single service (#93517)
Before we removed environment from the UI filters (#89647), the environment query parameter would be undefined if "All" was selected. Now we send ENVIRONMENT_ALL in as the query parameter.

Changes in https://github.com/elastic/kibana/blob/master/x-pack/plugins/apm/server/lib/service_map/get_service_map_from_trace_ids.ts made it so no connections would be returned if ENVIRONMENT_ALL was selected, rather than all connections. Since no connections were being returned, no elements except the selected service would be returned in the API response.

This changes it so if ENVIRONMENT_ALL is selected, the connection will always be returned, just like what used to be the case when environment was undefined.

Add an API test for this case.

Fixes #93385.
2021-03-03 17:30:08 -06:00
Nicolas Chaulet a61e1dd9fa
[Fleet] Fix package version comparaison in the UI (#93498) 2021-03-03 17:04:52 -05:00
Marshall Main 4c893985e3
[Security Solution][Lists] Escape quotes in list ids and quote the id in KQL query (#93176)
* Escape quotes in list ids and quote the id in KQL query

* Remove decodeURIComponent because too many KQL queries don't handle quotes

* Add quotes to user supplied IDs for other KQL queries

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-03 15:02:08 -05:00
Tiago Costa 2d17821f08
Revert "Make tests deterministic by providing unique timestamps (#93350)"
This reverts commit 3ce614fe46.
2021-03-03 19:48:54 +00:00
Davey Holler c0aa199759
App Search - Polishing Analytics Views (#92939)
* WIP analytics polish

* Working on tests.

* Finishing up tests.

* Updating the engine overview page.

* eslint fixes

* i18n fixes

* Icons feedback

- Remove unused svg file
- Add TODO comment
- Add test coverage

* linting - unnecessary ternaries

* EnginesOverview feedback

TotalCharts
- adjust chart height
- tests: simplify / convert back to shallow

RecentApiLogs
- switch to DataPanel

* DataPanel feedback

Component
- move CSS table bg override out from being an AnalyticsTable concern to a DataPanel concern
  + bem naming, todo comment
- add responsive={false} for better mobile UX
- add className and data-test-subj prop passing
- change title to pass full heading tags rather than a string
- move subtitle below title for better screen reader order
- add index.ts export

Tests
- capitalization for consistency, ordering/describe
- remove data-test-subjs on source code (simpler to grab & inspect tags directly so we can more easily call .text() on passed content)
- add new tests for props (fliled/className/data-test-subj)

Usage
- update other files using DataPanel to start passing heading tags + use index export
- fix RecentApiLogs tests
- change RecentQueries section to use a DataPanel (per Davey)

* Analytics tags - updates & responsive tweaks

Tags
- Rename to more general tags.tsx file
- Add CSS limiting width of variable length tags
- Break up into two separate components for easier readability & testing
- Split up tags column constants so that the wider tables can use the old tags list component

Tables
- add isSmall flag to AnalyticsTable to use new tag count  component
- reduce actions column width
- revert unnecessary table test changes

Analytics
- add custom CSS that switches tables/panels into full-width earlier

* AnalyticsSection fixes

- fix responsive behavior with icon
- add missing AnalyticsSection branch coverage

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Constance Chen <constance.chen.3@gmail.com>
2021-03-03 11:26:05 -08:00
John Schulz b5522ed30c
[Fleet] Add lint rule/fix for import order groups (#93300)
## Problem
Blocks of 10-15 `import`s are common in the plugin and there a few places which have ~50 lines of `import`s. It makes it more difficult to understand the where/why of what's being imported.

We've had instances while files import from the same module in different lines. i.e.

```ts
import { a } from './file';
... 5-10 lines later
import { b } from './file';
```

## Proposed solution
Add a lint rule to enforce a convention on the module `import` order. This can help in the same way Prettier & ESLint help to format type signatures or other code. It makes it easier to understand or notice any changes in the code. It's also able to be fixed automatically (`node scripts/eslint.js --fix` or any existing "format on save" in an editor).

## This PR
replaces #92980 (based on https://github.com/elastic/kibana/pull/92980#pullrequestreview-601070556)

### Lint rule
f9be98d Add eslint rule to enforce/autofix import group order. Use the same rule as a few other plugins. Groups `import` statements by type as shown in the [lint rule docs](https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/order.md#importorder-enforce-a-convention-in-module-import-order
). The order is:

  1. node "builtin" modules
  2. "external" modules
  3. "internal" modules
  4. modules from a "parent" directory
  5. "sibling" modules from the same or a sibling's directory, "index" of the current directory, everything else

e.g.

```typescript
import fs from 'fs';
import path from 'path';

import _ from 'lodash';
import chalk from 'chalk';

import foo from 'src/foo';

import foo from '../foo';
import qux from '../../foo/qux';

import bar from './bar';
import baz from './bar/baz';
import main from './';
```
The [lint rule](https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/order.md#importorder-enforce-a-convention-in-module-import-order) is relatively light handed. It only ensures  the `imports` are groups together in the given order. It doesn't alphabetize or otherwise sort the order of the files.


e.g. imports aren't rewritten to be in alphabetical order. This is fine

```ts
import from './c';
import from './a';
import from './b';
```

The [docs show other options](https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/order.md#options) and 2831f02bc7/.eslintrc.js (L1138-L1168) uses many of them

### Newlines option
The newlines settings means a change from something like

```typescript
import fs from 'fs';
import path from 'path';
import _ from 'lodash';
import chalk from 'chalk';
import foo from 'src/foo';
import foo from '../foo';
import qux from '../../foo/qux';
import bar from './bar';
import baz from './bar/baz';
import main from './';
```

to 

```typescript
import fs from 'fs';
import path from 'path';

import _ from 'lodash';
import chalk from 'chalk';

import foo from 'src/foo';

import foo from '../foo';
import qux from '../../foo/qux';

import bar from './bar';
import baz from './bar/baz';
import main from './';
```



Added it as a separate commit 2831f02 in case we want to avoid it, but I believe it's an improvement overall. Especially on the files with 25+ lines of imports. Even the "worst case" of something like this isn't bad (IMO). Especially since it's an automatic reformat like anything else in prettier


```typescript
import fs from 'fs';

import _ from 'lodash';

import foo from '../foo';

import main from './';
```
2021-03-03 13:58:20 -05:00
Jonathan Buttner 9dd395b452
[Security Solution][Case][Bug] Only update alert status in its specific index (#92530)
* Writing failing test for duplicate ids

* Test is correctly failing prior to bug fix

* Working jest tests

* Adding more jest tests

* Fixing jest tests

* Adding await and gzip

* Fixing type errors

* Updating log message

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-03 13:28:59 -05:00
Wylie Conlon cae9ca4c19
[Field formats] Correctly format numeric histograms outside Discover (#91576)
* [Field formats] Correctly format numeric histograms outside Discover

* Fix types

* Fix types

* Fix failures

* Fix merge issue

* Fix tests

* Fix i18n

* Fix i18n

* Add doc and fix integration

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-03 13:13:57 -05:00
Wylie Conlon eec777b7ef
[Index patterns] Guarantee order of fields in flattenHits (#93344)
* [Discover] Guarantee order of fields in table preview

* Remove comments

* Fix test that relied on discover ordering

* Fix ordering of test
2021-03-03 13:12:36 -05:00
Ryland Herrick 3ce614fe46
Make tests deterministic by providing unique timestamps (#93350)
The threat intel data that we are loading for these tests was previously
copy/pasted, resulting in all docs having the same @timestamp value.
This resulted in nondeterministic ordering which manifested as test
failures.

This fixes the issue by giving a unique timestamp to each indicator
document, and then unskips/updates tests according to this new ordering.
2021-03-03 11:53:47 -06:00
Dima Arnautov a8d45e7457
[ML] fix alert instance key for the single metric job (#93442) 2021-03-03 12:23:10 -05:00
Joe Reuter 73f8b335e1
[Lens] Add retry and remove unused test (#93233) 2021-03-03 17:56:26 +01:00
Ece Özalp 6467afa615
[Security Solution] Updates redirect route upon rule creation (#92715)
* [Security Solution] Updates redirect route upon rule creation

Closes #82562.
2021-03-03 11:55:11 -05:00
Zacqary Adam Xeper dc6d0b7910
[Metrics UI] Fix removing warning threshold from alert expressions (#93338) 2021-03-03 10:39:38 -06:00
Melissa Alvarez ccc70b4960
[ML] Data Frame Analytic: adds api integration tests for _start and _stop endpoints (#92532)
* add start and stop endpoint tests

* add start and stop within spaces endpoint tests

* move start and start_spaces tests to separate files

* wip: move stop and stop_spaces to separate files

* use slow running job config so job is still running when stop request happens

* check started job state is actually started

* check job is stopped after stopping

* add debug logs

* ensure jobs are created/started before stopping attempt

* remove unnecessary debug logs
2021-03-03 11:17:05 -05:00
Marta Bondyra c42b994193
[Lens] Fix unintentional switching to pie (#93219) 2021-03-03 15:39:51 +01:00
Tanish 8c6caf841b
[APM] Reduce log level to debug when no agent config is found (#93035) 2021-03-03 09:23:35 -05:00
Christos Nasikas 1c019025bc
[Security Solution][Case] Fix individual case deletion on case view (#93218) 2021-03-03 15:36:00 +02:00
Pete Harverson be0b444873
[ML] Transforms: Adds a11y tests for Transform plugin (#93197) 2021-03-03 11:41:44 +00:00
Joe Reuter 8525bd5e6e
remove portal for screenreader component (#93274) 2021-03-03 12:07:21 +01:00
Marta Bondyra 4f750bd9dc
[Lens] fix long field name on field stats panel doesn't wrap (#93279) 2021-03-03 10:17:20 +01:00
Shahzad 80a34a3e1d
[uptime] Fix anomaly alert edit (#93025) 2021-03-03 09:22:36 +01:00
Casper Hübertz d41170f90e
[APM] Add missing bottom border to header (#93179)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-03 08:45:01 +01:00
Nathan Reese bd9b349dfd
rename advanced setting ml:fileDataVisualizerMaxFileSize to fileUpload:maxFileSize and increase max geojson upload size to 1GB (#92620)
* rename ml:fileDataVisualizerMaxFileSize to fileUppload:maxFileSize

* add saved object migration

* file preview

* importing status

* remove console statement

* import complete view

* fix geojson_importer test

* tslint

* i18n fixes

* cleanup

* update documenation for advanced setting rename

* advanced settings usage_collection

* remove ml:fileDataVisualizerMaxFileSize from schemas and types

* add copy buttons for import response and fix geojson upload functional tests

* tslint

* remove clipboard-read check

* return early if env does not support reading from clipboard

* fix reporting tests

* review feedback

* update GeoJsonFileSource to support showing results trimmed icon and tooltip

* add fileUpload to useMlKibana context and replace dependencyCache with useMlKibana

* tslint

* review feedback

* lower case file name

* default to selecting geo_shape when file contains both points and shapes

* fix wizard onError callback to not advance to next step

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-02 19:07:03 -07:00
ymao1 fda67adb9f
[Alerting][Docs] Adding template for documenting alert and action types (#92830)
* Alert type template

* Action type template

* Cleanup

* Cleanup

* Removing callout list

* Cleanup

* Apply suggestions from code review

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

* Adding title to actions page

* PR fixes

* PR fixes

* PR fixes

* PR fixes

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
2021-03-02 18:08:58 -05:00
Aaron Caldwell 21338080db
[Maps] Update Map extent queries to use bounding box logic for both point and shape queries (#93156) 2021-03-02 16:48:02 -05:00
Ece Özalp 819cb485dc
Add searchDuration to EQL and Threshold rules (#93149)
Closes #82861.
2021-03-02 16:47:09 -05:00
Thomas Neirynck 33010bebf9
[Maps] Abort ES-search when tile request is cancelled (#92069) 2021-03-02 16:46:09 -05:00
Yuliia Naumenko a102fa9a70
[Alerting][Docs] Moved alerting links from hard-coded to documentation link service. (#92953)
* [Alerting][Docs] Moved alerting links from hard-coded to documentation link service

* fixed due to comments

* Update x-pack/plugins/triggers_actions_ui/public/application/components/health_check.tsx

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

* fixed jest tests

* fixed due to comments

Co-authored-by: Mike Côté <mikecote@users.noreply.github.com>
2021-03-02 13:43:10 -08:00
Melissa Alvarez 36523bb3a1
ensure regex works for filter with optional multiple spaces (#93071) 2021-03-02 15:40:10 -05:00
Zacqary Adam Xeper 6be9adac0d
[Alerts] Add spaces as optional dep to triggers_actions_ui (#93267) 2021-03-02 14:08:55 -06:00
Zacqary Adam Xeper 1b8d20c1c1
[Fleet] Fix default integration name when adding 10+ names (#93278) 2021-03-02 15:08:03 -05:00
Lukas Olson aa6591afe9
Update KQL field autocompletion to suggest fields that match search (#92559)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-02 13:07:19 -07:00
renovate[bot] 9e354bdf28
Update dependency @elastic/charts to v25.1.0 (master) (#93151)
* Update dependency @elastic/charts to v25.1.0

Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-03-02 13:54:45 -06:00
Gabriel Landau 3c4595de5e
[7.12][Security] Shellcode telemetry update for schema adjustment (#93143)
* Shellcode telemetry update for schema adjustment

* Lint

* Lint

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-02 14:44:42 -05:00
Constance fd3b3eb8cd
[App Search] Refactor AppLogic to initialize data via props rather than action (#92841)
* [Misc cleanup] Move Access type to common

- it was being duplicated in server/check_access and InitialAppData

+ add mock access data to DEFAULT_INITIAL_APP_DATA
+ update server/ tests to account for access in DEFAULT_INITIAL_APP_DATA

* Update AppSearchConfigured to pass props to AppLogic vs calling initializeAppData

+ update tests to rerender a wrapper rather than doing {...DEFAULT_INITIAL_APP_DATA} repeatedly

* Update AppLogic to set values from props rather than a listener

- main goal of this PR is to prevent the flash of state between mount and initializeX being called

- note: I recommend turning off whitespace changes in the test file

* Update AppLogic typing so that app data is always expected

- which it should be in any case in a production environment

- note: I could have changed InitialAppData to remove the ? optional notation, but decided on this route instead since InitialAppData affects more than just App Search (e.g. server, WS), and I didn't want this to have potential far-reaching side effects

* Update type scenarios where AppLogic values were previously thought potentially undefined

- which is mostly just configuredLimits it looks like

* [PR feedback] Type name
2021-03-02 11:25:01 -08:00
Oliver Gupte 3f5473ef7d
[APM] Fixes duplicate ML job creation for existing environments (#85023) (#93098)
* [APM] Fixes duplicate ML job creation for existing environments (#85023)

* Removes commented out test code.

* Adds API integration tests

* clean up code for readability
2021-03-02 11:20:30 -08:00
Dmitry d30be3f100
[code coverage] run more functional tests (#93249) 2021-03-02 21:56:42 +03:00
Christiane (Tina) Heiligers d230720e2d
[Usage Collection] Supports field descriptions as meta data (#92701)
Co-authored-by: Alejandro Fernández Haro <afharo@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-02 13:34:13 -05:00
ymao1 3dd3297371
[Actions][Docs] Moving subaction and subaction params back to README (#92878)
* Moving subaction and subaction params back to README

* Apply suggestions from code review

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

* PR fixes

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
2021-03-02 13:09:53 -05:00
Clint Andrew Hall 84dc217aff
Convert Canvas docs to MDX for use in Elastic Docs (#91969)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-02 12:44:18 -05:00
Scotty Bollinger 5788a6bd78
[Workplace Search] Role Mappings to Kibana (#93123)
* Add routes for role mapings

* Initial copy/paste

* Update RoleMappingsRouter

- Update all paths
- Change router to use children instead of render props
- Remove legacy app chrome

* Update RoleMappings

- Update all paths
- Use global flash messages

* Update RoleMapping

- Update all paths
- Use global flash messages
- Add types to fix errors
- Use React Router Hooks instead of legacy withRouter HOC

* Fix path in index and add route helper

* Update paths in RoleMappingsLogic

* Remove history in favor of KibanaLogic.navigateToUrl

* Add Role type

* Remove ID prop

This is not needed because the ID is actually passed in the URL itself and is not a requirement in the body of the request

* Replace contextual flash messages with global

It appeared that the server sometimes sent flash messages with the API response, but I checked the Rails server code and there is no `flashMessages` sent back from the server so I am omitting that from the `RoleMappingsServerDetails` interface as well.

* Replace Rails http with kibana http

* Fix route path

* Add route and update global navigation

* Add breadcrumb/page title

* Update flash messages in RoleMapping

I did this for RoleMappings but forgot this one

* Use explicit AttributeName type instead of string

* Add i18n

* Fix type issue

Because the shared role mapping components work for both App Search and Workplace Search, the more generic string is used here because App Search has different role names.

* Add tests for components and router

* Add optional to interface

In the case of a new role mapping, the server is called at the ‘/new’ route and the server responds without a roleMapping prop, as it has not yet been created.

* Add tests for RoleMappingsLogic

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-02 11:22:20 -06:00
John Schulz 1702cf98f0
[Fleet] Use type-only imports where possible (#92979)
## Summary

Use [type-only `import`](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-8.html#type-only-imports-and-export) to differentiate between runtime values and (erasable) TS types.

<img width="1499" alt="Screen Shot 2021-02-27 at 6 34 46 PM" src="https://user-images.githubusercontent.com/57655/109403323-84e32c80-792a-11eb-94b7-854d0e5c3e99.png">

Allows Babel and `tsc` to make some optimizations since it can be sure what can be erased.

It can also be helpful in situations like below which highlights that even though `KibanaAssetType` and `KibanaSavedObjectType` are named a certain way and from `common/types`, they are JS values _not_ TS types. They are `enum`s which means they are JS objects at runtime; not eliminated at runtime.

d92a1a08d8/x-pack/plugins/fleet/common/types/models/epm.ts (L41-L63)
2021-03-02 12:10:39 -05:00
Marco Liberati 92134cb88e
[Lens] Set pie chart slices sorted clockwise (#92617)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-02 17:34:46 +01:00
Byron Hulcher 3d065739ea
[App Search] Migrate Create Meta Engine View (#92127)
* New empty MetaEngineCreation component

* Added MetaEngineCreation to AppSearchConfigured router

* Empty MetaEngineCreationLogic

* Add rawName value and setRawName action to MetaEngineCreationLogic

* Add indexedEngineNames value and setIndexedEngineNames action to MEtaEngineCreationLogic

* Add selectedIndexedEngineNames value and setIndexedEngineNames action to MetaEngineCreationLogic

* Add description to MetaEngineCreation

* Add name selector to MetaEngineCreationLogic

* Added MetaEngineCreationNameInput to MetaEngineCreation

* Add fetchIndexedEngineNames listener to MetaEngineCreationLogic

* Call fetchIndexedEngineNames when MetaEngineCreation first renders

* Add EuiComboBox for selectedEngineNames to MetaEngineCreation

* WIP Add meta engine source engine limit warning to MetaEngineCreation

* Add submitEngine listener to MetaEngineCreationLogic

* Add onEngineCreationSuccess to MetaEngineCreationLogic

* Fixing tests for MetaEngineCreationLogic

* Fix tests for MetaEngineCreation

* Add Create a meta engine button to EnginesOverview

* Use DEFAULT_META for fetching indexed engine names in MetaEngineCreationLogic

* Copy fixes

* Updating POST /api/engines tests

* Add noItemsMessage prop to EnginesTable

* Add empty prompt to Meta Engines table in EnginesOverview

* Apply suggestions from code review

Co-authored-by: Constance <constancecchen@users.noreply.github.com>

* Better form functionality in MetaEngineCreation

* Fix errors from github

* More MetaEngineCreation coverage

* Meta MetaEngineCreationLogic coverage

* Update x-pack/plugins/enterprise_search/public/applications/app_search/components/meta_engine_creation/meta_engine_creation_logic.ts

Co-authored-by: Constance <constancecchen@users.noreply.github.com>

* Update x-pack/plugins/enterprise_search/public/applications/app_search/components/meta_engine_creation/meta_engine_creation_logic.ts

Co-authored-by: Constance <constancecchen@users.noreply.github.com>

* Update x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/constants.ts

Co-authored-by: Constance <constancecchen@users.noreply.github.com>

Co-authored-by: Constance <constancecchen@users.noreply.github.com>
2021-03-02 08:20:27 -08:00
Jean-Louis Leysens cce6861b89
[ILM] Allow multiple searchable snapshot actions (#92789)
* remove logic that disables SS action in cold if no rollover and always show replicas field

* update test coverage to be consistent with new form behaviour and expand hot phase without rollover test

* only licensing can disable searchable snapshot field

* clean up i18n

* remove ss field callout

* update error reporting logic to include causes chain, also update UI to show causes

* updated searchable snapshot field in hot phase callout

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-02 16:00:11 +01:00
Larry Gregory 5cc480a375
Improve consistency for display of management items (#92694)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-02 09:54:43 -05:00
Tiago Costa b33ea364af
skip flaky suite (#93152) 2021-03-02 14:34:27 +00:00
Tiago Costa a8adbbf800
skip flaky suite (#93152) 2021-03-02 14:29:48 +00:00
Yulia Čech bf9517ed7b
[ILM] Refactor edit_policy client integration tests into separate feature files (#92826)
* Refactor edit_policy client integration tests into separate feature files

* Fixed merge conflicts with master

* Updated rollover tests to match master branch code

* Split reactive_form into smaller files

* Renamed flyout tests file
2021-03-02 15:28:12 +01:00
Angela Chuang 356d4609e8
[Security Solution] Case ui enhancement (#91863)
* ui enhancement

* fix actions

* unit test

* update row actions

* add case status all

* update find status

* fix type

* remove all case count from dropdown

* fix type error

* fix unit test

* disable bulk actions on status all

* clean up

* fix types

* fix cypress tests

* review

* review

* update status is only available for individual cases

* update available actions on status all

* fix unit test

* remove lodash get

* rename status all

* omit status if it is set to all

* do not sent status if itis set to all

* Remove all status from the backend

* Hide actions on all status

* fix unit test

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Christos Nasikas <christos.nasikas@elastic.co>
2021-03-02 09:13:55 -05:00
Devin W. Hurley 1bdf0022ee
[Security Solution] [Detections] Updates warning message when no indices match provided index patterns (#93094)
* updates warning messages and modifies warning message when endpoint security rule is missing index pattern

* fix integration test text
2021-03-02 09:10:59 -05:00
Sonja Krause-Harder ca25e5162c
Collect agent telemetry even when fleet server is disabled. (#93198) 2021-03-02 15:09:36 +01:00
Marco Liberati 547600b9b1
[Lens] Fix runtime validation error message (#93195) 2021-03-02 14:51:54 +01:00
Marta Bondyra 4077718a2a
[Lens] Remove warning about ordinal x-domain (#93049) 2021-03-02 14:49:32 +01:00
Andrew Goldstein 5a09a296d1
[Security Solution] Fixes the Customize Event Renderers modal by removing the EuiOverlayMask (#93150)
* ## [Security Solution] Fixes the Customize Event Renderers modal by removing the EuiOverlayMask

Fixes [this issue](https://github.com/elastic/kibana/issues/92798), introduced when [the EUI modal implementation changed](https://github.com/elastic/eui/pull/4480), such that it's no longer necessary to wrap modals in an `EuiOverlayMask`. The mask is now built-in to `EuiModal`.

The change above became effective throughout Kibana when it was upgraded to use a newer version of EUI via [this commit on Feb 16](8126488021 (diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519)).

This PR resolves the issue by removing the `EuiOverlayMask` around the `Customize Event Renderers modal`, shown in the `After` screenshot below:

### Before

![before](https://user-images.githubusercontent.com/59917825/109154007-b2e23880-7793-11eb-83bb-4774df77c5d6.png)

### After

![after](https://user-images.githubusercontent.com/4459398/109561954-0c4fad80-7a9b-11eb-9283-51d50ec8ea26.png)

### Desk testing

Desk-tested on a 16" 2019 MBP, and on the desktop with the following browser versions:

- Chrome `88.0.4324.192`
- Firefox `86.0`
- Safari `14.0.3`

* - force precommit git hooks to run

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-02 08:45:47 -05:00
Joe Portner 6ecffcc57c
Cleanup Security plugin imports (#93056) 2021-03-02 08:42:01 -05:00
Michael Olorunnisola 3c4a3b833e
[Security Solution] - Bug fixes (#92294)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-02 08:37:30 -05:00
Jason Stoltzfus 16a3780021
Updated doc links (#92968) 2021-03-02 07:39:04 -05:00
Walter Rafelsberger 8201d4fd01
[ML] Transforms: Fixes chart histograms for runtime fields. (#93028)
Fixes chart histograms for runtime fields. The runtime field configurations were not passed on to the endpoint to fetch the charts data, so charts ended up being empty with a 0 documents legend.
2021-03-02 13:37:29 +01:00
Alejandro Fernández Haro c0535abc06
[chore] Enable core's eslint rule: @ts-expect-error (#93086)
* [chore] Enable core's eslint rules

* Change comment from platform-team to core-team
2021-03-02 05:53:36 -05:00
Marco Liberati 03cc5cc0c2
[Lens] Introduces new chart switcher (#91844)
Co-authored-by: Wylie Conlon <wylieconlon@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-02 11:25:35 +01:00
Marta Bondyra 657c273866
[Lens] fix selection when dragging (#93034) 2021-03-02 11:08:18 +01:00
Christiane (Tina) Heiligers d7cac22ba2
Converts usage collection README to .mdx (#92982)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-02 09:40:43 +00:00
Xavier Mouligneau 2903844dd1
[SECURITY SOLUTIONS] Bug case connector (#93104)
* bring back case connector to design

* disable connector sir in collection

* missing to only create collection type

* fix fields connector when you need to hide service-now sir
2021-03-01 22:46:22 -05:00
Steph Milovic 90976ee119
[Security Solution] [Timeline] Bugfix to include unmapped fields in the timeline event details JSON (#92025) 2021-03-01 21:40:54 -06:00
Yuliia Naumenko 7a1944a5a0
[Alerting][Docs] Changed alerting documentation to point to a single source of explaining the configurations. (#92942)
* [Alerting][Docs] Changed alerting documentation to poin to a single source of explaining the configurations.

* fixed due to comments

* fixed due to comments

* Apply suggestions from code review

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

* fixed due to comments

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
2021-03-01 19:34:27 -08:00
Oliver Gupte 6897a4ac0b
[APM] Fix hidden search bar in error pages while loading (#84476) (#93139) 2021-03-01 18:39:32 -08:00
Yara Tercero fb1394812d
[Security Solution][Detections] -Fixes rule edit flow bug with max_signals (#92748)
### Summary

Fixes a bug where max_signals was being reverted to it's default value when the rule was edited via the UI.
2021-03-01 20:35:21 -05:00
Christos Nasikas aa62a130ee
[SecuritySolution][Case] Disable cases on detections in read-only mode (#93010)
* Disable cases on detetions on read-only mode

* Add cypress tests
2021-03-01 17:38:49 -05:00
Jonathan Buttner 4739eab490
[Security Solution][Case][Bug] Prevent closing collection when pushing (#93095)
* Prevent closing collection when pushing

* Fixing translations
2021-03-01 17:11:47 -05:00
Madison Caldwell cb053f4672
[Security Solution][Detections][7.12] Critical Threshold Rule Fixes (#92667)
* Threshold cardinality validation

* Remove comments

* Fix legacy threshold signal dupe mitigation

* Add find_threshold_signals tests

* remove comment

* bug fixes

* Fix edit form value initialization for cardinality_value

* Fix test

* Type and test fixes

* Tests/types

* Reenable threshold cypress test

* Schema fixes

* Types and tests, normalize threshold field util

* Continue cleaning up types

* Some more pre-7.12 tests

* Limit cardinality_field to length 1 for now

* Cardinality to array

* Cardinality to array

* Tests/types

* cardinality can be null

* Handle empty threshold field in bulk_create_threshold_signals

* Remove cardinality_field, cardinality_value
2021-03-01 17:10:22 -05:00
Jason Stoltzfus 892d44cafd
[App Search] Implement various Relevance Tuning states and form actions (#92644) 2021-03-01 16:49:57 -05:00
Patrick Mueller ff546a1af4
[actions] for simplistic email servers, set rejectUnauthorized to false (#91760)
resolves https://github.com/elastic/kibana/issues/91686

The poor email action has not had great success in setting TLS options
correctly.  Prior to 7.11, it was basically always setting `rejectUnauthorized`
to false, so was never validating certificates.  Starting in 7.11.0, it
started respecting TLS certificates, but there are some simple/test servers
in use that use self-signed certificates.

The real fix for this will be the resolution of issue
https://github.com/elastic/kibana/issues/80120 , but until then, this PR
does a special-case check if the `secure` option is off (so the email client
connects with a plain socket and then upgrades to TLS via STARTTLS) and both
the user and password for the server are not set, then it will use
`rejectUnauthorized: false`.  Otherwise, it uses the global configured value
of this setting.

This also changes some other cases, where `secure: true` often did not
set any `rejectUnauthorized` property at all, and so did not get verified.
Now in all cases, `rejectUnauthorized` will be set, and the value will
correspond to the globally configured value, except for the special case
checked here, and when a proxy is in use (that logic did not change).

So it is possible this would break customers, who were using insecure servers
and email action worked, but with this fix the connections will be rejected.
They should have been rejected all this time though.

The work-around for this problem, if we don't implement a fix like this, is
that customers will need to set the global `rejectUnauthorized` to `false`,
which means NONE of their TLS connections for any actions will be verified.
Which seems extreme.
2021-03-01 16:30:21 -05:00
Christos Nasikas 31889a589d
[Security Solution][Case] Migrate category & subcategory fields of ServiceNow ITSM connector (#93092) 2021-03-01 16:21:00 -05:00
Nathan L Smith 0320f1afb7
Hide instances latency distribution chart (#92869)
...until #88852 and #92631 are resolved.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-01 15:16:29 -06:00
Nathan Reese 59c0380de0
[Maps] fix MapboxDraw import from pointing to dist just pointing to folder (#93087) 2021-03-01 14:11:39 -07:00
Nathan Reese 08c40955a4
[Maps] fix results trimmed tooltip message doubles feature count for line and polygon features (#92932)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-01 14:11:18 -07:00
Ryland Herrick a55d8b60ea
[Security Solution][Detecttions] Indicator enrichment tweaks (#92989)
* Update copy of rule config

* Encode threat index as part of our named query

* Add index to named query, and enrich both id and index

We still need mappings and to fix integration tests, but this generates
the correct data.

* Update integration tests with new enrichment fields

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-01 14:57:35 -06:00
Nathan Reese d02294cb98
[Maps] fix fit to data on heatmap not working (#92697)
* [Maps] fix fit to data on heatmap not working

* tslint

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-01 13:42:14 -07:00
Candace Park 1a3bbbf917
[Security Solution][Endpoint][Admin] Fixes policy sticky footer save test (#92919)
* commented code to close out toast
2021-03-01 15:31:05 -05:00
Candace Park 33b24c5d89
[Security Solution][Endpoint][Admin] Fixes 7.12 ransomware migration and mac bug (#92639) 2021-03-01 15:27:02 -05:00
Jonathan Buttner d9043c1c46
[Security Solution][Case][Bug] Removing empty collections when filtering on status (#92048)
* Removing empty collections when not filtering on status

* Fixing add comment response

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-01 14:47:38 -05:00