Commit graph

14948 commits

Author SHA1 Message Date
Brandon Morelli 0e1a2cd4f7
docs: [APM] Correlations (#94620) 2021-03-16 10:13:08 -07:00
Anish Khanna 9e244062e7
Display correct reset terminology for visualizations (#94539)
Co-authored-by: Anish Khanna <a26khann@edu.uwaterloo.ca>
2021-03-16 18:11:10 +01:00
Cauê Marcondes 4d27af99c4
[APM] kuery is not applied to latency chart (#94707) 2021-03-16 12:47:33 -04:00
Dario Gieselaar c921ed956c
[APM] Use top_hits instead of top_metrics (#94694)
* [APM] Use top_hits instead of top_metrics for high cardinality fields

Closes #94676.

* Update snapshots
2021-03-16 12:19:42 -04:00
Cauê Marcondes f90a4d95a5
[APM] Telemetry: Add UI usage telemetry on the Timeseries comparison feature (#91439)
* adding telemetry and removing time comparison

* adding telemetry and removing time comparison

* adding telemetry

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-16 11:41:43 -04:00
Shahzad 09e949e6f4
[Uptime] Synthetic check steps list view (#90978)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-16 16:41:07 +01:00
Constance badf38b0cd
[Curation] Add support for a custom drag handle to the Result component (#94652)
* Update Result component to render a custom drag handle

* Update Result library with a draggable example

- note: this doesn't actually handle reorder logic, it's purely a UI/UX example

* Update CurationResult to pass dragHandleProps through to Result
2021-03-16 08:30:32 -07:00
Sébastien Loix 310194193a
[ILM] Use global field to set the snapshot repository (#94602) 2021-03-16 15:22:24 +00:00
Vadim Yakhin c9d1dbf599
[Workplace Search] Misc bugfixes (#94612)
* Fix incorrect copy

* Fix incorrect copy

* Update Box icon to match other icon sizes

* Add missing spacer on connector configuration screen

* Add missing spacer to Manage Source modal on Group page

* Remove shadows on Security page

* Align the last column content in tables to the right

* Fix colors on save custom source page

"Secondary" is greenish in new version is EUI, we need "subdued"

* Fix link to personal dashboard

* Add missing breadcrumbs to Security and Settings pages

* Deduplicate Security tests on Basic and Platinum licenses

* Prevent range slider from shifting to left when priority is 10

When priority is 10, the number become wider and it pushes the range slider to the left. This commit is a quick fix for that. We could improve it later by adding a proper input.

* Fix i18n duplicate ID

* Revert "Fix link to personal dashboard"

This reverts commit 5fc3ad2937.
2021-03-16 10:48:07 -04:00
Mikhail Shustov 09f90d8651
[Canvas] Cleanup types in lib (#94517)
* fix get_legend_config error in canvas/lib/index

* convert resolve_dataurl to ts to fix canvas/lib/index failure

* convert expression_form_handler to ts to fix canvas/lib/index failure

* convert canvas lib/error into ts

* canvas: do not compile json file due to effect on performance

* remove type. it is not exported and inferred as any implicitly

* fix datatable error in lib/index.d.ts file

* fix url resolver

* case manually to avoid incompatibility error
2021-03-16 10:22:09 -04:00
Mikhail Shustov ee84e0b0b7
Merge tsconfig and x-pack/tsconfig files (#94519)
* merge all the typings at root level

* merge x-pack/tsconfig into tsconfig.json

* fix tsconfig after changes in master

* remove unnecessary typings

* update paths to the global typings

* update paths to the global elaticsearch typings

* fix import

* fix path to typings/elasticsearch in fleet plugin

* remove file deleted from master

* fix lint errors
2021-03-16 15:13:49 +01:00
Gabriel Landau b71c6092c9
Add bytes_compressed_present to Endpoint Security Telemetry (#94594) 2021-03-16 10:00:54 -04:00
Cauê Marcondes b0fa077e8a
[APM] Adding comparison to Throughput chart, Error rate chart, and Errors table (#94204)
* adding comparison to throuput chart

* adding comparison to error rate chart

* adding comparison to errors table

* fixing/adding api test

* addressing pr comments

* addressing pr comments

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-16 09:12:50 -04:00
James Rodewig 6c9cfd4893
Use documentation link service for Watcher (#93339) 2021-03-16 08:45:32 -04:00
Jean-Louis Leysens 4a83a02433
[ILM] Hide node allocation notices on Cloud (#94581)
* block node allocation notices on cloud

* added test to check that notices are not showing

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-16 13:40:13 +01:00
David Sánchez 638f166f71
[SECURITY_SOLUTION] Add helper text on entry input for trusted applications (#94563)
* Added text help for each entry input option

* Add new unit test

* Fix wrong import on test file

* Change entry variable to readonly. Use it.each instead of a for loop

* Move function inside useMemo since it is only used there

* Remove old commented code

* Update failing test
2021-03-16 13:36:06 +01:00
Felix Stürmer e830e077d3
[Logs UI] Style improvements for log stream search strategy (#94560) 2021-03-16 13:29:29 +01:00
Walter Rafelsberger f3b74b457c
[ML] Transforms: Fixes missing number of transform nodes and error reporting in stats bar. (#93956)
- Adds a Kibana API endpoint transforms/_nodes
- Adds number of nodes to the stats bar in the transforms list.
- Shows a callout when no transform nodes are available.
- Disable all actions except delete when no transform nodes are available.
- Disables the create button when no transform nodes are available.
2021-03-16 11:41:48 +01:00
Oliver Gupte 7349f82fac
[APM] Hide correlations tabs with license message (#94494)
* [APM] Hide correlations tabs with license message (#94228)

* removes unused CorrelationsMetricsLicenseCheck component

* Code readability improvements

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-15 18:35:50 -07:00
Ryland Herrick f14ac90e7d
[Security Solution][Detections] Display callout if users have new ML jobs installed (#94393)
* WIP: Add basic structure of our ML Job callout

* Tests are not implemented
* logic is questionable
* Detections now makes redundant ML API calls

* Fix JSDoc reference

* Move ML Jobs callout to Rules page

As opposed to the more general Detections page.

* Extends callout logic to include installation of any affected jobs

* If old jobs are used with new ECS data, you'll be missing
  anomalies/alerts
* If new jobs are used with old ECS data, you'll be missing
  anomalies/alerts

* Flesh out our link to ML Job compatibility docs

This page doesn't exist yet; the URI/copy is subject to change.

* ML Job Upgrade -> ML Job Compatibility

This is a more accurate name for the concept since the problem is more
general than presence/absence of an upgrade.

* Add some placeholder copy to get the ball rolling

* Test callout behavior with different API responses

* Prevent fetching ML data when ML popover is opened/closed

We already fetch this data when the component is initially rendered. In
the normal workflow of page load -> open popover, we perform six (6) ML
API calls, 3 of which are redundant.

The one downside of this is that opening/closing the popover will not
refresh data; however, this workflow would previously have resulted in 6
API calls as well.

* Revert "Prevent fetching ML data when ML popover is opened/closed"

This reverts commit 810b78d2b9.

* Update link to relevant documentation

We're going to add a new section to this existing page, and link
directly to that heading. We should be able to generate whatever anchor
we need here, so choosing one arbitrarily on the assumption that docs
can make it work.

* Update copy from product

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-15 20:44:18 -04:00
Alison Goryachev 7dc9fce0c8
[Upgrade Assistant] Add support for deprecated index settings (#93293) 2021-03-15 20:20:58 -04:00
Tim Sullivan 366e085874
[Reporting/Test] label job param URL as deprecated in the variable name (#94639) 2021-03-15 16:55:38 -07:00
Constance 5396d27043
[App Search] Curation: Add query management UX & organic documents list (#94488)
* Update CurationLogic to handle queries management

- updating the active query
- adding queriesLoading and organicDocumentsLoading state
- clean up / refactor updateCurations slightly - instead of taking a {queries} param, we should opt for a separate updateQueries action and storing a queries state
  - this allows us to more granularly hook into activeQuery when queries is updated without the current activeQuery and correct for that

* Add ActiveQuerySelect component

- used for switching the currently active query

* Add ManageQueriesModal component

- used for editing/adding/removing the queries a curation manages
- primarily a light wrapper around the existing reusable CurationQueries component (also used in the create new curation view)

* Add OrganicDocuments and CurationResult components

* Update Curation view with new components

+ update breadcrumb to pull from queries instead of curation.queries, mostly for consistency w/ other usages & slightly faster responsiveness when updating queries

* Fix unnecessary import

* Meeting feedback: organic documents title copy tweak

* PR feedback - test assertion
2021-03-15 15:39:26 -07:00
Melissa Alvarez 08c6753f22
[ML] Data Frame Analytics results: Ensure outlier detection results view displays feature influence correctly (#94493)
* ensure feature influence column is shown for outlier jobs

* add popoverContent schema type featureInfluence

* add featureInfluence cell content check to functional test

* update types

* ensure computeFeatureInfluence is added to jobConfig

* always remove invalid feature influence columns for outlier jobs

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-15 18:26:26 -04:00
Yuliia Naumenko 1422001884
Fixed Pagerduty dedupKey is not set via API for Uptime alerts (#94394)
* Fixed Pagerduty dedupKey is not set via API for Uptime alerts

* fixed test

* fixed test

* fixed test

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-15 14:08:41 -07:00
Paul Tavares 83906292d8
[SECURITY_SOLUTION][ENDPOINT] Create artifact manifests with new relative URL (if fleet-server is enabled) (#94499)
* When xpack.securitySolution.fleetServerEnabled is true, then Endpoint artifact manifest will use a fleet-server relative url for the artifacts generated (note: this flag is temporary until we ship v7.13)
* Refactors the security solution fleet integration extension point callbacks so that some action handlers can be executed in parallel (the creation of detection engine prepackaged rules can sometime take some time to complete
2021-03-15 16:49:11 -04:00
Tiago Costa daa0f22587
chore(NA): ensure scripts run with --preserve-symlinks (#94046)
* chore(NA): ensure scripts run with --preserve-symlinks

* chore(NA): run webpack configs with symlinks: false

* chore(NA): fix pkg json load on kbn test

* chore(NA): add script into setup node env

* chore(NA): fix kbn test for relative improt

* chore(NA): fix change on docs

* chore(NA): move ensure node preserve symlinks into setup node env

* chore(NA): update changed docs

* chore(NA): update jest unit test

* chore(NA): fix wrapper script exit code

* chore(NA): updated generated plugin list docs

* fix(NA): make functional test runner use kbn utils repo_root

* chore(NA): fix eslint imports

* chore(NA): missing react correct config on eslint package

* chore(NA): use correct value to make test pass locally

* chore(NA): fix jest tests

* chore(NA): try remove extra preserve symlinks

* chore(NA): fix windows environment

* chore(NA): fix kbn-optimizer to run with preserve-symlinks

* chore(NA): fix integration jest test for kbn/optimizer

* chore(NA): remove require.resolve from eslintrc.js

* chore(NA): avoid load json file

* chore(NA): move kbn/utils import into kbn/dev-utils

* chore(NA): use correct dependencies on eslint config package

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-15 16:17:54 -04:00
Zacqary Adam Xeper cda2fb3d5a
[Data UI] [Fleet] Add submitOnBlur functionality to QueryStringInput (#93819)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-15 14:33:49 -04:00
Frank Hassanabad 85c0a34893
[Security Solutions] Fixes and unskips tests (#94391)
## Summary

Fixes and unskips tests. Also makes the tests less picky. Although I enjoy seeing the changes on ES promotions of error messages in case we see something really bad happening, it's too manual of a process to fix and puts too much of a burden on operations to skip the error messages. 

### 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-15 12:15:59 -06:00
James Rodewig cd56c1341a
Use documentation link service for remote clusters (#93937) 2021-03-15 14:02:27 -04:00
Melissa Alvarez a5f7260e5e
[ML] Data Frame Analytics creation: add checks and ensure validation summary is updated (#94226)
* add num_top_classes and feature_importance checks to validation

* ensure validation details view up to date

* ensure topClasses messages shows correct number. update types

* update functional test

* update cloning functional test for regression type job
2021-03-15 13:53:25 -04:00
Chris Roberson 46253d6ae2
[Monitoring] Change license service to use recommended API (#93620)
* Change license service to use recommended API

* Remove unused type

* Update this code too

* Generate docs

* New docs
2021-03-15 13:00:30 -04:00
Angela Chuang f62478452e
skip failing test (#94577) 2021-03-15 16:50:29 +00:00
Rudolf Meijering e883e500c3
EsArchiver: support for injecting kibana version and use it for spaces tests (#94420)
* EsArchiver: support for injecting kibana version and use it for speeding up spaces tests

* Use kbn/utils to get current kibana version in tests

* Review feedback: improve test by splitting variable over chunks
2021-03-15 09:17:41 -07:00
Frank Hassanabad bb265641b4
Updated to allow chunked queries and to increase the timeouts of the REST backend (#94531)
## Summary

Increases the pre-packaged socket timeout and chunks the requests. Existing e2e tests should cover the changes. Interesting enough, when the server sends back a 408, Chrome will re-send the same request again which can cause socket/network saturations. By increasing the timeout, Chrome will not resend the same request again on timeout.

Right now, there is not a way to increase the timeouts for the alerting framework/saved objects as far as I know for connections. That would be an additional safety measure in additional to doing chunked requests. Chunked requests will ensure that the pre-packaged rule does not exhaust ephemeral ports and limit the concurrent requests. 

See this issue talked about below:
https://github.com/sindresorhus/ky/issues/233
https://groups.google.com/a/chromium.org/g/chromium-dev/c/urswDsm6Pe0
https://medium.com/@lighthopper/connection-retry-schedule-in-chrome-browser-a9c814b7dc20

**Manual testing**
You can bump up the rule version numbers manually through a search and replace and then install them. You can add a `console.trace()` to the backend and slow down the requests to ensure they are not happening more than once. 

```
Trace: 
    at updatePrepackagedRules (/Users/frankhassanabad/projects/kibana/x-pack/plugins/security_solution/server/lib/detection_engine/rules/update_prepacked_rules.ts:34:11)
    at createPrepackagedRules (/Users/frankhassanabad/projects/kibana/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/add_prepackaged_rules_route.ts:140:9)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at /Users/frankhassanabad/projects/kibana/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/add_prepackaged_rules_route.ts:66:27
    at Router.handle (/Users/frankhassanabad/projects/kibana/src/core/server/http/router/router.ts:272:30)
    at handler (/Users/frankhassanabad/projects/kibana/src/core/server/http/router/router.ts:227:11)
    at exports.Manager.execute (/Users/frankhassanabad/projects/kibana/node_modules/@hapi/hapi/lib/toolkit.js:60:28)
    at Object.internals.handler (/Users/frankhassanabad/projects/kibana/node_modules/@hapi/hapi/lib/handler.js:46:20)
    at exports.execute (/Users/frankhassanabad/projects/kibana/node_modules/@hapi/hapi/lib/handler.js:31:20)
    at Request._lifecycle (/Users/frankhassanabad/projects/kibana/node_modules/@hapi/hapi/lib/request.js:371:32)
    at Request._execute (/Users/frankhassanabad/projects/kibana/node_modules/@hapi/hapi/lib/request.js:279:9)
```

### 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
2021-03-15 11:27:31 -04:00
Bryan Clement ce7a0bb8fc
[Asset Management] Osquery autocomplete (#94255)
* added osquery mode to autocomplete

* clean up and formatting

* arm wrestling with the compiler

* more fighting with ace types

* Delete v4.5.0.json

removed unused schema file

* playing the hokey pokey with import statements

* lazy load the schema file

* remove include rule now that we are lazy loading schema json

* update out of date comment

* reduce schema file to what is currently being used, add script for formatting generated api files

* added a readme, and points the compiler at the scripts directory

* swip-swapped the argument order, fixed linting complaints

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-15 08:18:36 -07:00
Thomas Neirynck e1363855bf
[Maps] Isolate maps-setting froms maps_legacy (#92918)
Creates a new plugins, maps_ems, with `map.*` configs and shared EMS-settings. `maps_legacy` now only supports the `region_map` and `coordinate_map` plugins.
2021-03-15 11:15:39 -04:00
ymao1 a7c9d3f1e0
[Alerting] Update UI to reflect new terminology (#93597)
* Renaming alerts to rules

* Updating formatted messages

* Updating i18n labels

* Completed renaming in UI

* Updating client routes including redirect

* wip docs update

* Reverting title changes for now

* Fixing types check

* Fixing unit tests

* Fixing functional test

* Fixing functional test

* docs wip

* wip docs update

* Finished first run through docs

* docs docs docs

* Fixing bad merge

* Fixing functional test

* Docs cleanup

* Cleaning up i18n labels

* Fixing functional test

* Updating screenshots

* Updating screenshots

* Updating screenshots

* Updating terminology in alerting examples

* Updating terminology in alerting examples

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-15 10:03:39 -04:00
Anton Dosov bd9170f7dc
[Search Sessions] Search session example app functional test (#92133) 2021-03-15 14:47:14 +01:00
Alejandro Fernández Gómez c062b04691
[Fleet] Ignore inactive agents when removing a policy (#94311)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-15 09:27:56 -04:00
John Schulz a4fa4a62cb
Use consistent-type-imports lint rule to autofix type-only imports (#94464)
## Summary

Use the [`consistent-type-imports` lint rule ](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/consistent-type-imports.md) to use `import type ...` where possible

Code-only changes like this were recently added in https://github.com/elastic/kibana/pull/92979, but it was a more manual process.  This PR adds an autofixable lint rule which will keep the changes up-to-date and Just Work ™️
2021-03-15 13:58:50 +01:00
Kerry Gallagher ef042b9e86
[Logs UI] Fixes missing fields in the log entries search strategy (#94443) 2021-03-12 12:57:55 +01:00
kaiyan-sheng 2b372fa8ac
Rename googlecloud to gcp in Add Data UI (#93725) 2021-03-12 10:21:15 +08:00
Nicolas Chaulet 6252e0f035
[Fleet] Catch key parsing error in package install handler (#94484) 2021-03-11 17:15:36 -05:00
Yara Tercero 2c623bd101
[Security Solution][Detections] - Fix threshold preview (#94224)
### Summary

Addresses #92732

7.11+ versions of threshold preview histogram were aggregating by "event.category". This PR updates the preview histogram to take into account threshold field groups and cardinality.

It may need to be called out in documentation or updated to remind users that preview is not an exact guarantee of what signals will be produced as it does not take into account interval and any timestamp_override. Threshold gets a tad bit more confusing because of the multiple aggregations occurring (threshold --> group by field --> histogram).
2021-03-11 13:19:02 -08:00
Nathan Reese 9f5ca1b745
[Maps] convert DrawControl to TS (#94437)
* [Maps] convert DrawControl to TS

* return GeoFilter from createSpatialFilterWithGeometry
2021-03-11 14:05:47 -07:00
Chris Cowan 5517e6cf90
[Metrics UI] Use memory limit for K8S when available (#93686)
* [Metrics UI] Use memory limit for K8S when available

* removing duplicate key

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-11 13:07:04 -07:00
John Schulz 6491ad5112
[Fleet] Fix circular ref by moving code & tests into Fleet (#94171)
## Problem
There's a circular dependency https://github.com/elastic/kibana/issues/91111 between the `fleet` and `security_solution` plugins 

* `security_solution` depends on `fleet`, but 
* `fleet` has (_had_ with this PR) an `import` from  `security_solution` (migrations for the 7.11 and 7.12 package policy objects)

## Proposed solution
### (A) This PR
Move the two imported functions from `security` into `fleet`.

### (B) Follow up issue
Putting integration-specific code into `fleet` doesn't scale (technically or cognitively). Discuss if this use case (specifying saved object migrations, etc) applies to other plugins. e.g. can `apm` do this? `nginx`? If so, should we find a way to move this out of `fleet`?


### 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

closes https://github.com/elastic/kibana/issues/91111
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-11 14:41:14 -05:00
Lukas Olson 0298f4f60a
[KQL] Remove Lucene syntax warnings (#93619)
* [KQL] Remove Lucene syntax warnings

* Remove unused translations

* Update docs
2021-03-11 12:29:40 -07:00
Michael Dokolin a5be04d17b
Add a link to the reporting management dashboard in the started job toast (#81583) (#93961)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-11 21:18:03 +02:00
Thomas Neirynck 9d365a4df8
[Maps] Compare SearchFilters to determine whether mvt layers can skip update (#93531) 2021-03-11 14:07:32 -05:00
Quynh Nguyen fa3b2f0ef6
[ML] Fix Index data visualizer not removing query string with loaded saved search (#94245)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-11 12:59:10 -06:00
Constance 521c336df2
[App Search] Curation: set up server routes, API calls, & bare-bones view (#94341)
* Add server side API routes & update types expected from server

* Create CurationLogic with GET and PUT listeners

- PUT is mostly placeholder for now, we'll actually use it later in future Curation PRs

* Create Curation view component & page load effect

* Update CurationsRouter to use new view + remove add_result route

- Per design discussion w/ Davey, we'll be removing the standalone add result route in favor of an in-page flyout
2021-03-11 09:34:28 -08:00
Paul Tavares 8fc5d8ba30
[FLEET][SECURITY_SOLUTION][ENDPOINT] Fleet Artifact client and refactoring of Endpoint to use it (#93776)
* Fleet: adds new service for Artifact storage management
* Fleet: Expose new `createArtifactsClient()` from Fleet `Plugin#start` interface
* Endpoint: Change Endpoint to use FleetArtifactClient and initial implementation of EndpointArtifactClient
* Endpoint: Add `fleetServerEnabled` feature flag to security solution plugin (will be used in next PR)
* Endpoint: Artifact download api adjusted to get artifact from fleet index
* Endpoint: Added new esArchive for artifacts stored in .fleet-artifacts index for API integration tests
2021-03-11 12:17:18 -05:00
Constance 8be1dd7c54
[App Search] Add custom actions prop to Result component (#94378)
* Add custom actions prop to Result component

- will be used by upcoming Curations work to promote and hide documents

* Add Result custom actions to library

+ [misc] export main Result component from index
2021-03-11 08:40:31 -08:00
Jason Stoltzfus dee1272dd6
Created a stub page for result settings (#94334) 2021-03-11 08:38:34 -08:00
Gidi Meir Morris ba0609f5ba
[Alerting] Ensures ES Query uses the correct sort value to avoid duplicate detections (#94349)
This PR addresses a potential problem that we have *not yet* encountered in the wild, but could in theory happen.
When choosing the sort value to use as the value of the `latestTimestamp` in the ES Query Rule Type, we assumed that the sort value would be parsable as a Date.
In this PR we ensure we only try to use a sort value *if* it can be parsed into a date.
2021-03-11 16:32:32 +00:00
Lisa Cawley 633b53ec8d
[ML] Clarifies description of datafeed scroll_size (#94348) 2021-03-11 08:11:37 -08:00
Marco Liberati ed95c08d71
[Lens] Fix area percentage gaps with zero fitting function (#94086)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-11 17:03:58 +01:00
Nathan Reese 91f7711da6
Add pagination control to datavisualizer failures to rendering all errors at a single time (#93839)
* Add pagination control to datavisualizer errors to avoid crashing browser

* conditionally render pagination control

* tslint

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-11 08:28:15 -07:00
James Rucker 0e1fa8d50a
Small changes to callback params for Atlassian OAuth1 flows (#94395) 2021-03-11 09:26:21 -06:00
Ryan Keairns f61657c5e9
Update text and icons to align with Cloud (#86394)
* Update text and icons to align with Cloud

* Update test to reflect new page title prefix

* Change links conditionally

* Simplify profile link logic

* Add setAsProfile prop for overriding default link

* Address feedback

* remove translations since message has changed

* Tidying up

* Add unit tests.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Aleh Zasypkin <aleh.zasypkin@gmail.com>
2021-03-11 08:53:46 -06:00
James Gowdy dfb4eac520
[ML] Adding support for saved object based ml modules (#92855)
* [ML] Adding support for saved object based ml modules

* updating icon mapping

* cleaning up code

* missed private variable

* removing mappings json file

* renaming module id

* updating test

* removing unrelated file

* type clean up

* changing logo type

* changes based on review

* removing fleet changes

* updating type guards

* fixing list module return type

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-11 14:08:48 +00:00
Joe Reuter 33fbe74e4e
[Lens] Transpose columns (#89748) 2021-03-11 13:51:50 +01:00
Robert Oskamp 92307bfe29
[ML] Functional tests - stabilize slider value selection (#94313)
This PR stabilizes the slider value selection during ML functional tests.
2021-03-11 10:11:53 +01:00
spalger ad0517a905 skip another suite blocking es promotion (#94367) 2021-03-10 18:19:54 -07:00
Andrew Goldstein 14c32cbd6c
[Security Solution] Eliminates a redundant external link icon (#94194)
## [Security Solution] Eliminates a redundant external link icon

- Fixes an issue where [a redundant external link icon](https://github.com/elastic/kibana/issues/89084) was rendered next to port numbers

Per the [EuiLink documentation](https://elastic.github.io/eui/#/navigation/link), it's no longer necessary to render our own icon, because `EuiLink` will automatically display one when `target="_blank"` is passed as a prop to the link.

- Updates the existing link icon unit test such that it asserts a specific icon count to catch any regressions

### Before

<img width="1673" alt="before" src="https://user-images.githubusercontent.com/4459398/110530119-4cd0ac00-80d7-11eb-9d54-5d6656491e69.png">

### After

<img width="1677" alt="after" src="https://user-images.githubusercontent.com/4459398/110530165-5c4ff500-80d7-11eb-99a3-68741fab9218.png">

### Desk testing

Desk tested in:

- Chrome `89.0.4389.82`
- Firefox `86.0`
- Safari `14.0.3`
2021-03-10 17:17:55 -07:00
spalger 9aeb9f4e4c skip another suite blocking es promotion (#94367) 2021-03-10 15:41:52 -07:00
Scotty Bollinger 26603620a4
[App Search] Role mappings migration part 1 (#94346)
* Fix test suite name

https://github.com/elastic/kibana/pull/94038/files#r590545670

* Move types out of AttributeSelector component to shared types

* Fix random typo

* Add routes and path generator util

* Move constants to shared

* Fix types in mock

* Fix routes

* Fix failing tests
2021-03-10 17:16:46 -05:00
Ryland Herrick 5c352cace7
[Security Solution][Detections] Fix flaky indicator enrichment tests (#94241)
* Make indicator enrichment tests order-independent

Due to the fact that we use named queries to determine matches, and the
fact that the order in which named queries are returned is undefined, we
cannot guarantee a consistent ordering of enrichments if a given event
matches multiple named queries.

Because the ordering is not in itself important to enrichment, in order
to assert the multi-match functionality we must make the assertions
order independent.

* PR feedback

* Since we're only looping for side effects, prefer forEach to map for
  more idiomatic FP.
2021-03-10 16:00:05 -06:00
Vadim Yakhin 5acf15dccd
[Workplace Search] Deduplicate icons (#94359)
* Remove redundant "_" from icon names

* Move all icons from sources_full_bleed to source_icons

Overwrite existing icons in case of conflicts

* Remove fullbleed prop from source_icon

* Minimize the only unminimized icon

* Remove unused icons
2021-03-10 16:46:14 -05:00
Lisa Cawley fb199e3584
[ML] Add latest transform to intro text (#94039) 2021-03-10 13:01:12 -08:00
spalger 68adc48c7e skip test failing es promotion (#94367) 2021-03-10 13:57:57 -07:00
Nathan Reese 6264c563d1
[Maps] convert elasticsearch_utils to TS (#93984)
* [Maps] convert elasticsearch_utils to TS

* tslint

* clean up

* i18n cleanup

* update elasticsearch_geo_utils tests

* fix unit test

* review feedback

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-10 13:23:42 -07:00
Michael Olorunnisola ebd92a6e5d
[Security_Solution][Telemetry] - Update endpoint usage to use agentService (#93829)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-10 15:10:27 -05:00
Davis Plumlee 95271bf798
[Security Solution][Exceptions] Fixes OS adding method for exception enrichment (#94343) 2021-03-10 15:09:30 -05:00
Sébastien Loix a632f3f59f
[ILM] Add support for frozen phase (#93068) 2021-03-10 20:06:11 +00:00
Jason Stoltzfus a198744553
[App Search] Fixed 2 relevance tuning bugs (#94312) 2021-03-10 11:36:23 -08:00
Jonathan Buttner 6044f8a8bf
Removing resolver functional tests (#94331) 2021-03-10 14:06:47 -05:00
Scotty Bollinger 672bd95a48
[App Search] Add routes for Role Mappings (#94221)
* [App Search] Add routes for Role Mappings

* Add registering of routes

Forgot to port this when cherry picking from another branch.

* Add validation
2021-03-10 13:55:58 -05:00
Casper Hübertz 4044633e4a
[APM] Refactor agent icon (#91126) 2021-03-10 19:49:58 +01:00
Nathan Reese 042c5bc5ce
[Maps] remove EMS tile layers from test artifacts to fix flaky tests (#94319) 2021-03-10 11:11:08 -07:00
Tim Sullivan f9c4c01759
[Reporting/Build Chromium] Add a developer script to find the Chromium commit (#94033)
* script that finds the chromium commit

* use run from dev-utils

* update docs and inch towards build pipeline

* more docs updates

* move the scripts the root

* review feedback
2021-03-10 10:57:29 -07:00
Ester Martí Vilaseca fe1220506e
[Metrics UI] Fix first load in Inventory view (#94306)
* Revert inventory changes from commit fa4dda0def

* Remove not needed comment
2021-03-10 12:06:39 -05:00
Constance dcaa3f6464
[App Search] DataPanel & LoadingOverlay component tweaks (#94251)
* DataPanel: fix icons showing unaligned & w/ too much flex space

* LoadingOverlay: add new loading component w/ overlay

- should have an opacity'd overlay to hide content underneath
- specify z-index

* DataPanel: add flag to display a LoadingOverlay

- update CSS to contain LoadingOverlay
- add isLoading prop
2021-03-10 08:40:27 -08:00
Cauê Marcondes f428b10a79
[APM] Adding comparison latency chart (#91339)
* adding time comparison to latency chart

* adding time comparison to latency chart

* fixing TS

* fixing api test

* addressing PR comments

* adding api test

* addressing PR comments

* fixing api test

* rounding date diff

* addressing PR comments

* fixing api test

* refactoring

* fixing ts issue

* fixing offset function

* fixing offset function

* addressing PR comments

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-10 11:02:50 -05:00
Steph Milovic 2bb23291c7
[Security Solution] [Cases] rename case dir/plugin/context/i18n to cases (#94149) 2021-03-10 08:58:51 -07:00
Michael Paul 426d495299
Fix "to to" spelling error (#93885)
* Fix "to to" spelling error

* Build API docs

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-10 17:46:31 +02:00
igoristic 1a3e8e8fa2
Changed the flag (#94167) 2021-03-10 10:15:47 -05:00
Yulia Čech cce4db8f77
[Remote clusters] Convert service files to TypeScript (#94138)
* Converted some js files to ts as preparation for remote clusters work for Cloud

* Updated the snapshots

* Removed non-null assertion operator in favor of a more explicit nullish coalescing operator
2021-03-10 13:50:16 +01:00
Zacqary Adam Xeper df0400daaa
[Metrics UI] Hide Create Alert options for a read-only user (#91951) 2021-03-10 12:45:57 +00:00
Walter Rafelsberger 066e47e9ea
[ML] Use unknown instead of any for type guards. (#94090) 2021-03-10 12:40:49 +01:00
Vadim Yakhin 2d60d238fc
[Workplace Search] Add Prompt to Security and Display Settings pages (#93838)
* Add UnsavedChangesPrompt to Security page

* Add UnsavedChangesPrompt to DisplaySettings page

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-10 07:40:22 -04:00
Angela Chuang 99f1512771
update script (#94265) 2021-03-10 05:38:06 -05:00
Joe Reuter f9e28831c5
[Lens] prevent double load in editor (#93930) 2021-03-10 09:00:01 +01:00
Tyler Smalley 7d7a16883c
Removes X-Pack Code plugin (#94240)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2021-03-10 02:32:29 -05:00
Garrett Spong 8a01d86528
[SecuritySolution][Detections] Enables Microsoft Teams for Detection Actions (#94239)
## Summary

This PR enables Microsoft Teams action type for the detection engine (originally developed/tested via https://github.com/elastic/kibana/pull/83169).

<p align="center">
  <img width="500" src="https://user-images.githubusercontent.com/2946766/110558632-0fccdf80-8100-11eb-8476-8adb2eab7134.png" />
</p>



### For maintainers

- [x] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
2021-03-09 23:56:07 -05:00
Jen Huang 67e968304e
[Fleet] Remove coreMigrationVersion from snapshot (#94235)
* Remove coreMigrationVersion from snapshot

(cherry picked from commit a8b9b41a68)

* Remove `latestVersion` too

(cherry picked from commit 6f3949c8d8)
2021-03-09 18:59:36 -08:00
Yara Tercero 37c9c5cc24
[Security Solution][Exceptions] - Fixes bug for prepopulated endpoint exceptions (#94025)
### Summary

Addresses #93559

In a previous PR where we added id to exception entries, this case was missed where the exceptions are prepopulated for endpoint alerts.
2021-03-09 17:43:26 -08:00
Constance 89b23c06da
[Enterprise Search] Upgrade Kea to 2.3, update LogicMounter helper w/ props support (#94232)
* Enhance our LogicMounter helper to accept and build props

* Update logic tests in AS that require props to now use LogicMounter

* Upgrade Kea to 2.3.0 for future BindLogic use
2021-03-09 17:09:50 -08:00
Nathan L Smith 0ac5e4db7c
Fix missing alerts menu (#94210)
In #92898 the `alerts` plugin was renamed to `alerting`. We were checking if this plugin is enabled with a check like `'alerts' in plugins`, which is not type checked.

Change the check to use `!!plugins.alerting` so this type of change will be caught in the future.

Rename `get_alert_capabilities` to `get_alerting_capabilities` to match the name of the exported function. Add a test for it.
2021-03-09 18:52:57 -06:00
Scotty Bollinger 89a43555f8
[Workplace Search] Make session_state optional (#94219)
Some OAuth plugins don’t send this key so we make it optional to prevent server errors.
2021-03-09 19:12:38 -05:00
Larry Gregory d2b9caa1a7
Fix positioning of space name and avatar in selector dropdown (#94169) 2021-03-09 17:42:38 -05:00
Yuliia Naumenko 086762da6a
[Actions] Replaces legacy es client with the ElasticsearchClient (#93361)
* [Actions] Replaces legasy es client with the ElasticsearchClient

* fixed build

* fixed tests
2021-03-09 14:39:46 -08:00
Zacqary Adam Xeper 5d119cfcbb
[Fleet] Return empty agents list when submitting a kuery with no keys (#93844) 2021-03-09 16:10:56 -06:00
Marshall Main 3992ed13db
Move exceptions builder to lists plugin (#94002)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-09 16:39:23 -05:00
Nathan L Smith b6f8d3f8b6
Move anomaly jobs fetching to context (#94135)
* Revert "[APM] Hoist HeaderMenuPortal to prevent unmounts (#92012)"

Revert the change from #92012 to put the `HeaderMenuPortal` back within the routing context so getting data from the path params works.

Use a context to fetch the list of jobs and use it in the callout and the header menu icon. This makes it so the fetch only happens once.

A refetch function is exposed from the context and called when a new job is created.
2021-03-09 15:06:41 -06:00
Oliver Gupte 931b54f636
[APM] Handle correlations view with missing field names (#93443) (#94015)
* [APM] Handle correlations view with missing field names (#93443)

* fixes spelling

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-09 12:37:11 -08:00
Aaron Caldwell 4eff7a0709
[Maps][File upload] Use correctly formatted pipeline with no processors for geojson upload (#94145) 2021-03-09 15:32:11 -05:00
Jen Huang 394593ae94
Use password field for password vars (#94166) 2021-03-09 15:30:26 -05:00
Thomas Neirynck d78222b8e1
[Maps] Improve TMS language (#93863) 2021-03-09 15:03:14 -05:00
Jen Huang 3946c4ad91
[Fleet] Fix package policies created with null var values (empty defaults) (#94040)
* Make package validation be based on types

* Add package info to cache after it is generated from ES storage

* Add logging around package info retrieval and when cache is set

* Add snapshot api integration test for uploaded package info

* Use the apache package for snapshot test instead

* Remove date field from snapshot

* Update docs

* Fix streams getting overridden

* Add back package field to data streams

* PR fixes
2021-03-09 14:53:22 -05:00
John Schulz 8ce5cda582
[Fleet] Add links to OpenAPI spec files and online documentation (#94122)
## Summary

Added screenshots of two online viewers and links to the sites. 

<img width="934" alt="Screen Shot 2021-03-09 at 12 35 02 PM" src="https://user-images.githubusercontent.com/57655/110513158-eb5b0e00-80d3-11eb-82c4-de21c494589f.png">


### Checklist

- [x] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials
2021-03-09 13:07:53 -05:00
Tyler Smalley 0b09e9c4ae
[jest] Removes un-used config files (#94134)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2021-03-09 18:05:20 +00:00
Tyler Smalley 3cabf8154f
Removes x-pack/.github directory (#94153)
This folder is left-over from when X-Pack was a separate repository

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2021-03-09 18:04:10 +00:00
Quynh Nguyen be8ea1920f
[ML] Fix Data Visualizer not showing document count for non-time based indices (#93958)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-09 11:26:28 -06:00
Quynh Nguyen fcf397f9c3
[ML] Add functional tests for runtime mappings in Transforms (#92738)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-09 11:25:58 -06:00
Constance ee2ec0aded
[App Search] Add roleHasScopedEngines helper + small roles/ cleanup (#94038)
* Split out roles/ into separate files

- in preparation for new scoped engines helper

* Add new roleHasScopedEngines helper
2021-03-09 08:54:05 -08:00
Thomas Watson b862a6c181
Bump @storybook/* from 6.0.26 to 6.1.20 (#93386) 2021-03-09 08:51:37 -07:00
Joe Reuter 35d01f5a9b
make sure to render once (#93786) 2021-03-09 16:34:40 +01:00
Chris Roberson 7d237b8f59
Fix issue with loading logstash node page under standalone cluster (#93617)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-09 10:00:45 -05:00
Byron Hulcher cceed8ddd6
[App Search] Add delete action to EnginesTable component (#92844)
* Add delete engine route to App Search

* Add new deleteEngine listener to EnginesLogic

* Convert EnginesTable Manage into a proper EuiBasicTable action

* Call EnginesLogic.actions.deleteEngine using new action in EnginesTable

* Manage action on EnginesTable should use eye icon

* Confirmation alert for delete action on EnginesTable

* Only display manage/delete actions to users with canManageEngines

* Add success message and reload after successful engine delete

* Jest tests for EngineTable actions

* Copy change for engine delete success message

* Fixing EnginesTable tests

* Adding more tests for DELETE engine route

* engineNameLink -> EngineNameLink

* Remove redundant test

* Convert Engine.type to enum EngineTypes

* Must use mountWithIntl

* Use platinum license instead of role ability check
2021-03-09 09:49:52 -05:00
Marco Liberati 8e6d4ee2f8
[Lens] Fix wrong suggestions from Datatable to other visualizations (#93920)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-09 15:31:17 +01:00
Walter Rafelsberger 326dfa43ca
[ML] Improves error handling for transform wizard when Kibana index pattern or saved search fails to load. (#93915)
Improves error handling for the transform wizard when Kibana index pattern or saved search fails to load.
Previously a non-existing index pattern or saved search or corrupt saved object could cause the page to end up blank. Improved error reporting will catch the problem and display an error callout.
2021-03-09 15:29:45 +01:00
Xavier Mouligneau af8d5eb4e6
[Security Solution] Add nested field inside of data provider (#93721)
* add nested field inside of dataprovider

* make sure to get nested

* fix elq server side

* add mock for nested attributes

* Add basic tests for nested fields query generation

* Update snapshots and failing tests with nestedFields

* fix nested date

Co-authored-by: Kevin Qualters <kevin.qualters@elastic.co>
2021-03-09 07:49:29 -05:00
ymao1 023d9a028b
[Alerting] Update alerting action variables to follow new terminology (#93836)
* Removing duplicate ActionVariable interface. Updating common action variables in UI

* Passing in alert values as rule variables in transform_action_params

* Fixing unit tests

* Fixing functional test

* Adding functiional test

* Updating paths

* Fixing i18n

* Fixing i18n

* Fixing api docs

* Plugin api build

* Moving spaceId and tags under rule prefix

* Using top level alert prefix

* Fixing i18n

* build api docs

* Fixing functional test

* Fixing functional test
2021-03-09 07:48:38 -05:00
Patryk Kopyciński ed2a1bfb1f
[Asset Management] Add support for Live queries in Osquery (#89889) 2021-03-09 13:25:47 +01:00
Pete Harverson a438810673
[ML] Fixes styling of Single Metric Viewer chart for dark theme (#93581)
* [ML] Fizes styling of Simgle Metric Viewer chart for dark theme

* [ML] Fix lint error in scss

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-09 11:50:31 +00:00
Robert Oskamp 6569e0cfa3
[ML] Functional tests - stabilize transform message assertion (#94056)
This PR stabilizes the transform message assertion during functional tests by only comparing lower cased strings.
2021-03-09 12:40:24 +01:00
Christos Nasikas bd354b437b
[Security Solution][Case] Fix SIR labels (#94050) 2021-03-09 05:27:41 -05:00
Christos Nasikas a563f5a72e
[Security Solution][Case] Fix bug where push button is not appearing after switching between connectors (#93986)
* Fix bug

* PR review
2021-03-09 05:22:33 -05:00
Justin Ibarra 29d0dceb03
[Detection Rules] Add 7.12 rules (#94022) 2021-03-08 20:30:35 -09:00
Cauê Marcondes c2fb2ec936
[APM] Adding comparison to transactions table (#91435)
* adding comparison to transactions table

* fixing api test

* merge

* addressing PR comments

* addressing PR comments

* adding kuery filter

* fixing tests

* addressing PR comments

* fixing concurrency issues

* addressing PR comments

* addressing PR comments

* addressing PR comments

* hiding impact bar when comparison disable

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-08 22:00:29 -05:00
Yara Tercero e603bf5461
[Security Solution][Preview] - Enable preview when only filters used (#94018)
### Summary

Addresses #93245 where the preview button was grayed out when only filters were present - no main query.
2021-03-08 18:59:49 -08:00
Andrew Goldstein bcdfa397ac
[Security Solution] [Timeline] Timeline layout fixes (#93870)
## [Security Solution] [Timeline] Timeline layout fixes

- Fixes Timeline's layout to increase the available height of the table on the Query tab by ~ 40%
- Fixes an issue where the query builder is not displayed in full screen mode

### Query Tab Before

<img width="1790" alt="query-tab-before" src="https://user-images.githubusercontent.com/4459398/110192483-abeaa400-7deb-11eb-8b01-c1753d05ab1c.png">

### Query Tab After

<img width="1792" alt="query-tab-after" src="https://user-images.githubusercontent.com/4459398/110192491-b1e08500-7deb-11eb-9b78-fe8097ca9cd6.png">

### Query Tab: Full Screen Before

<img width="1792" alt="query-tab-full-screen-before" src="https://user-images.githubusercontent.com/4459398/110192497-b73dcf80-7deb-11eb-9553-865b6f7ffa84.png">

### Query Tab: Full Screen After

<img width="1792" alt="query-tab-full-screen-after" src="https://user-images.githubusercontent.com/4459398/110192505-befd7400-7deb-11eb-9e20-6b4a5bd1aaaa.png">

### Correlation Tab Before

<img width="1792" alt="eql-tab-before" src="https://user-images.githubusercontent.com/4459398/110192513-c6bd1880-7deb-11eb-9d20-3bc269498edb.png">

### Correlation Tab After

<img width="1792" alt="eql-tab-after" src="https://user-images.githubusercontent.com/4459398/110192534-db011580-7deb-11eb-8a0b-f92c3d8a64fd.png">

### Correlation Tab: Full Screen Before

<img width="1792" alt="eql-tab-full-screen-before" src="https://user-images.githubusercontent.com/4459398/110192538-e5bbaa80-7deb-11eb-9094-42719e5341f6.png">

### Correlation Tab: Full Screen After

<img width="1792" alt="eql-tab-full-sreen-after" src="https://user-images.githubusercontent.com/4459398/110192620-624e8900-7dec-11eb-9eed-e20a9aafeb90.png">

### Pinned Tab Before

<img width="1792" alt="pinned-tab-before" src="https://user-images.githubusercontent.com/4459398/110192557-07b52d00-7dec-11eb-9d93-2d1ffe0712e7.png">

### Pinned Tab After

<img width="1792" alt="pinned-tab-after" src="https://user-images.githubusercontent.com/4459398/110192559-0c79e100-7dec-11eb-8068-6eb0dd700086.png">

### Pinned Tab: Full Screen Before

<img width="1792" alt="pinned-tab-full-screen-before" src="https://user-images.githubusercontent.com/4459398/110192563-126fc200-7dec-11eb-9024-ffc7b2a887df.png">

### Pinned Tab: Full Screen After

<img width="1792" alt="pinned-tab-full-screen-after" src="https://user-images.githubusercontent.com/4459398/110192569-1865a300-7dec-11eb-9162-84547c929853.png">

### Desk testing

Desk tested in:

- Chrome `89.0.4389.82`
- Firefox `86.0`
- Safari `14.0.3`
2021-03-08 18:41:25 -07:00
Tim Sullivan 9fef424bba
Switch Reporting to Task Manager (#64853)
* [Reporting] Task Manager

* fix startup

* use synchronous config for task registration

* fix eslint

* pr-90365

* --wip-- [skip ci]

* set maxConcurrency to 0 if pollEnabled is false

* add test for execute_report

* remove unused test file

* more tests

* remove unused test files

* remove priority

* logging cleanups

* fix for queue.pollEnabled: false

* more logging fixes for less duplicated code

* update jest snapshots

* polish

* remove unnecessary

* Update mapping.ts

* polish

* fix bug if instance gets a monitoring task and pollEnabled is false

* simplification

* cosmetic

* fix test

* stop monitoring task sabotage

* update api docs

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-08 17:33:19 -07:00
James Rucker add02f13e8
[Workplace Search] Persist OAuth token package during OAuth connect flow (#93210)
* Store session data sent from Enterprise Search server

This modifies the EnterpriseSearchRequestHandler to remove any data in a
response under the _sessionData key and instead persist it on the server
side.

Ultimately, this data will be persisted in the login session, but for
now we'll just store it in a cookie. https://github.com/elastic/kibana/issues/92558

Also uses this functionality to persist Workplace Search's OAuth token
package.

* Only return a modified response body if _sessionData was found

The destructuring I'm doing to remove _sessionData from the response is
breaking routes that currently expect an empty response body. This
change just leaves those response bodies alone.

* Refactor from initial feedback & add tests

* Decrease levity

* Changes from PR feedback

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-08 16:17:35 -08:00
Zacqary Adam Xeper 0ce3dc7f10
[Fleet] Prevent duplicate enrollment token names (#92735) 2021-03-08 19:09:42 -05:00
Kevin Qualters 9b99f6d3d1
[Security Solution] Prevent EuiFocusTrap from blocking focus to global search (#93377)
* Prevent EuiFocusTrap from blocking focus to global search

* Only run when flyout is open

* Remove unused import

* Fix broken cypress test

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-08 19:03:48 -05:00
Scotty Bollinger a0e88ece91
[Enterprise Search] Fix bug where special chars breaks UI (#94000)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-08 18:27:17 -05:00
Davis Plumlee 4db502d85c
[Security Solution][Detection Rules] Rules table page size increase (#93993) 2021-03-08 16:53:36 -05:00
Xavier Mouligneau 5d96e5f334
[SECURITY SOLUTION] BUG Manual Alert in case (#93726)
* get the data where it belongs

* Fix layout when alert is deleted

Co-authored-by: Christos Nasikas <christos.nasikas@elastic.co>
2021-03-08 16:28:42 -05:00
spalger 5e634e9931 remove unused xpack.ml.alertContext.kibanaBasePathUrlDescription i18n key 2021-03-08 14:20:16 -07:00
Nathan Reese 7507d6417e
Convert file_upload components to typescript (#93814)
* Convert file_upload components to typescript

* i18n cleanup

* api doc updates

* fix i18n files

* tslint after merge

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-08 14:15:38 -07:00
Ryland Herrick 52787e9379
[Security Solution][Detections]Alerts migrations can be finalized/cleaned up in all spaces (#93809)
* Retrieve SOs by ID in a space-aware manner by using bulkGet

We were previously using a manual invocation of find(), which was a)
tied to the current implementation of how SOs generate their _ids, and
b) didn't respect spaces.

By replacing this with a call to bulkGet, which automatically respects
the space of the current request, and which abstracts away the building
of the actual _id based on the SO ID and type, we address the issues
above.

* Surface SO errors to the finalize/delete APIs

Now that we're using bulkGet, we receive an object with errors if the
object is not found, which by default breaks our subsequent validation.
In order to provider better UX, we re-raise the first of these errors
that we find, if present, and return that to the user.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-08 15:10:16 -06:00
Wylie Conlon c33987d929
Support for number, date and IP range data types (#76971)
* Support for number, date and IP ranges

* Update tests

* Ranges don't work with range agg

* Fix test case

* Allow Discover to create range filters

* Supports ranges in Visualize, KQL, remove Lens support

* Fix test mappings

* Bring back field cache to work around bug

* Fix some tests

* Fix test expectation

* Respond to review comments

* Fix type error

* Remove added sample data

* Fix api_docs

* Fix test
2021-03-08 15:50:36 -05:00
Dima Arnautov 6b26d19c4c
[ML] Fix time range query in the Anomaly detection alert execution (#93939) 2021-03-08 15:00:23 -05:00
Michael Olorunnisola 6174938758
[Security_Solution][Timeline][Flyout] - Make event details hostName and IpOverview navigate (#93825) 2021-03-08 14:40:11 -05:00
ymao1 8a1d7f5b99
[Alerting][Docs] Moving limitations from README to user docs (#93933)
* Moving limitations to user docs

* Moving limitations to user docs

* Removing outdated limitations
2021-03-08 12:53:40 -05:00
Nathan Reese 4dd0a7e0f7
[Maps] chunk geojson upload to keep import requests under 1MB (#93678)
* [Maps] chunk geojson upload to keep import requests under 1MB

* fix geojson_importer tests

* update failure.item to reflect location in file

* remove console statement

* clean up

* return instead of break if upload is no longer active

* add unit test for createChunks

* update file_upload API

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-08 10:25:59 -07:00
Jen Huang b8df640c95
[Fleet] Surface package version used in a package policy in UI (#93712)
* Surface package version used in a package policy in UI

* Fix i18n
2021-03-08 12:07:27 -05:00
Ester Martí Vilaseca 978226f39a
[Metrics UI] Add preview charts to Inventory alerts (#91658)
* add first version of preview chart for inventory alerts

* Make preview chart collapsible

* Add margin to expressions without charts

* Remove some duplication in metric alerts preview charts

* Add warning thresholds to inventory alerts preview chart

* Add threshold annotations component

* Clean imports and unused variables

* Add tests for threschold annotations component

* Remove unused translations

* Set correct id to inventory alerts preview chart

* Get accountId and region with useWaffleOptions for preview chart

* Save inventory alert thresholds in the same unit as ES

* minor fixes

* Revert "Save inventory alert thresholds in the same unit as ES"

This reverts commit 118d83efeb.

* Remove threshold formatter function and convert values inside expression chart component

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-08 17:54:10 +01:00
Nathan L Smith 749a22989b
Enable APM storybook publishing (#93353)
Changes to fix APM's Storybook setup were made in #93087 and #93294. This re-enables it and fixes a couple places where we weren't using a theme provider.
2021-03-08 10:39:25 -06:00
Marco Liberati adfbe976d6
[Lens] Carry previous configured formatter in Last value (#93784)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-08 17:38:14 +01:00
Mike Côté edb1c4b48e
Make alerts list sortable by name and status (#93426)
* Initial commit

* Update docs

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-08 11:15:53 -05:00
Alejandro Fernández Gómez 2aa0267957
[Fleet] Migrate ES client (#92805)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-08 10:46:31 -05:00
Alejandro Fernández Gómez baf0b3577b
[Logs UI] Pass dashboard filters to log stream embeddable (#91850)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-08 10:03:14 -05:00
Angela Chuang 98c1f94477
[Security Solution] Update the script of data provider's Cypress test (#93780)
* rollback timeout for dnd and rewrite script for the failing case

* rollback timeout for dnd and rewrite script for the failing case

* rollback timeout for dnd and rewrite script for the failing case

* rollback unnecessary change

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-08 14:50:44 +00:00
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