Commit graph

43972 commits

Author SHA1 Message Date
Justin Kambic
0c8d5e8f89
[Synthetics] Support synthetics dedupe strategy in Uptime app (#101678)
* Add new runtime types for parsing on client/server.

* Add more runtime types.

* Remove dead code.

* Mark parameter as unused.

* Improve typing for failed journey request function.

* Add new API functions, improve typing in a few others.

* Modify API calls to work with new screenshot_ref data.

* Fix untested refactor error.

* Add required fields to runtime type.

* Update typing in failed steps component.

* Adapt client to work with old screenshots as well as new screenshot_ref.

* Refactor composite code to reusable hook.

* Implement screenshot blocks endpoint.

* Define runtime types for full-size screenshots.

* Delete dedicated screenshot and ref queries.

* Optimize screenshot endpoint by combining queries.

* Handle parsing error.

* Clean up screenshot/ref typings.

* Remove dead types. DRY a type out.

* Simplify types.

* Improve typing in step screenshot components.

* Prefer PNG to JPG for canvas composite op.

* Simplify and clean up some code.

* Remove reliance on `Ping` type, clean up types.

* Add a comment.

* Add a comment.

* Fix typing for `FailedStep` component.

* Standardize loading spinner sizes.

* Add comments to composite code.

* Remove unnecessary optional chaining.

* Reformat error string.

* Remove unneeded key from request return object.

* Add a comment to a return object explaining very large cache value.

* Make type annotation more accurate.

* Resolve some type and test errors.

* Clean up remaining type errors.

* Move type definitions to simplify imports.

* Simplify `PingTimestamp` interface.

* Refactor failing unit test to use RTL and actually test things.

* Add tests for new helper functions.

* Add a comment.

* Test `PingTimestamp` for screenshot ref data.

* Test `StepImageCaption` for ref data.

* Improve typing for step list column definitions.

* Harden a test.

* Extract code to avoid repeated declarations.

* Create centralized mock for `useCompositeImage`.

* Add test for ref to `StepScreenshotDisplay`.

* Add tests for `getJourneyDetails`.

* Extract search results wrapper to helper lib.

* Add tests for `getJourneyFailedSteps`.

* Add support for aggs to result helper wrapper.

* Write tests for `getJourneyScreenshot` and simplify type checking.

* Write tests for `getJourneyScreenshotBlocks`.

* Simplify prop types for `FailedStep`.

* Remove unused type.

* Fix regression in step navigating for new style screenshots.

* Implement PR feedback.

* Implement PR feedback.

* Implement PR feedback.

* Reduce limit of screenshot block queries from 10k to 1k.

* Remove redundant field selection from ES query.

* Implement PR feedback.

* Fix regression that caused "Last successful step" to not show an image.

* Delete unused props from `Ping` runtime type.

* More precise naming.

* Naming improvements. Add `useCallback` to prevent callback re-declaration.

* Prefer explicit props to `{...spread}` syntax.

* Remove redundant type checking.

* Delete obsolete unit tests.

* Fix a regression.

* Add effect to `useEffect`.
2021-06-29 08:08:52 -04:00
Yulia Čech
39ba747728
[ILM] Add missing a11y tests (#102887)
* [ILM] Added missing a11y tests

* Fixed ILM functional tests, added after tests cleanup

* Added review suggestions

* Fixed section header renaming

* Fixed section header renaming

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-29 13:01:36 +02:00
Aaron Caldwell
436ddef784
[Maps] Only allow feature deletion when in delete-mode 2021-06-29 12:43:58 +02:00
Ahmad Bamieh
6e308a2a1e
[Migrations V2] Unskip migration_7.7.2_xpack_100k (#103435) 2021-06-29 13:28:40 +03:00
James Gowdy
2e00e9c11b
[ML] Rare anomaly detection job wizard (#100390)
* [ML] Rare anomaly detection job wizard

* fixing fields selection

* small improvements

* adding event rate chart to summary step

* [ML] Changes UI text for rare wizard.

* improving detector summary

* fixing translations

* removing comments

* fixing field selection

* fixing advanced wizard

* updating detector text

* fixing bucketspan estimator

* bug fixes

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: István Zoltán Szabó <istvan.szabo@elastic.co>
2021-06-29 11:02:17 +01:00
James Gowdy
824463ace5
[ML] Fixing categorization tokens for multi-line messages (#103007)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-29 10:28:51 +01:00
Pete Hampton
b774e37ea1
Update security telemetry allowlist. (#103471) 2021-06-29 10:22:11 +01:00
Shahzad
409a0f21cc
[Exploratory view] use percentages in distribution chart (#103080) 2021-06-29 11:21:07 +02:00
Marco Liberati
5c87807da1
[Lens] Remove reference tooltip in Formula panel when the popup is open (#103283)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-29 10:47:45 +02:00
Joe Reuter
ce2fabe420
add formula telemetry (#103451) 2021-06-29 10:31:41 +02:00
Joe Reuter
4f63abc1e5
[Lens] Do not persist time zone (#102735) 2021-06-29 10:19:50 +02:00
Esteban Beltran
ac17ab1436
Add signal and abort controller to agent metadata and TakeAction button (#103217) 2021-06-29 08:58:37 +02:00
Ignacio Rivas
09bd6301d6
[CCR & Snapshot+Restore] Center align states under tabs (#103237)
* fix up CCR centered sates in tabs content

* update snapshots list

* fix lint errors

* Change tab states for all pages in snapshot+restore

* Remove unnecessary variables

* Seems we dont need the class wrapper

* fix broken type

* Fix bug in ILM table when filtering it down

* center align search box

* fix linter errors

* fix prettier warnings

* revert content var refactor and just focus on ux

* add breakword class to paragraph so we avoid text overflowing

* fix prettier errors

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-29 09:57:30 +03:00
Nathan L Smith
1dce600efe
Collect host.os.platform telemetry for APM (#103520)
Fixes #97958.
2021-06-28 21:27:10 -05:00
Candace Park
da13795ed4
Task/host isolation status pending (#103549) 2021-06-28 22:03:08 -04:00
Patryk Kopyciński
ccf42c0b80
[Osquery] Add Saved queries (#100965) 2021-06-28 21:19:02 -04:00
ymao1
c05588f077
[Alerting] Enable rule import/export and allow rule types to exclude themselves from export (#102999)
* Removing feature flag changes

* Adding isExportable flag to rule type definition

* Adding isExportable flag to rule type definition

* Adding isExportable flag to rule type definition

* Filtering rule on export by rule type isExportable flag

* Fixing types

* Adding docs

* Fix condition when exportCount is 0

* Unit test for fix condition when exportCount is 0

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-28 20:35:27 -04:00
Constance
633649460a
[Enterprise Search] Improve flash messages screen reader UX (#103412)
* Remove role region on flash messages

- just `aria-live` is enough for screen readers to read it out, and `role` was causing "Flash messages" to get read out loud repeatedly between page navigation even when empty which was annoying and not good

* Further a11y attribute recommendations from @myasonik
2021-06-28 20:25:24 -04:00
Tim Sullivan
aafcc473f3
[Reporting] Reorganize UI components (#103571) 2021-06-28 17:23:10 -07:00
Scotty Bollinger
699c875b21
[Workplace Search] Fix edge case API error (#103574)
This PR fixes an edge case where a race condition mught cause the total_results from a federated content source to come back null from the server. This PR tells the server to expect null in those edge cases to prevent browser errors
2021-06-28 20:18:14 -04:00
fgierlinger
ad3601c260
fix: typo in time dropdown list (#103407)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-29 09:17:26 +09:00
Aaron Caldwell
f28bfa71ad
[Maps] Move edit tools to beta and remove experimental config flags (#103556) 2021-06-28 20:13:12 -04:00
Frank Hassanabad
d7d4a14c8d
[Security Solutions][Detection Engine] Implements best effort merging of constant_keyword, runtime fields, aliases, and copy_to fields (#102280)
## Summary

This adds utilities and two strategies for merging using the [fields API](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-fields.html) and the `_source` document during signal generation. This gives us the ability to support `constant_keyword`, field alias value support, some runtime fields support, and `copy_to` support. Previously we did not copy any of these values and only generated signals based on the `_source` record values. This changes the behavior to allow us to copy some of the mentioned values above.

The folder of `source_fields_merging` contains a `strategy` folder and a `utils` folder which contains both the strategies and the utilities for this implementation. The two strategies are `merge_all_fields_with_source` and `merge_missing_fields_with_source`. The defaulted choice for this PR is we use `merge_missing_fields_with_source` and not the `merge_all_fields_with_source`. The reasoning is that this is much lower risk and lower behavior changes to the signals detection engine.

The main driving force behind this PR is that ECS has introduced `constant_keyword` and that field has the possibility of only showing up in the fields section of a document and not `_source` when index authors do not push the `constant_keyword` into the `_source` section. The secondary driving forces behind this behavioral change is that some users have been expecting their runtime fields, `copy_to` fields, and field alias values of their indexes to be copied into the signals index.

Both strategies of `merge_missing_fields_with_source` and  `merge_all_fields_with_source` are considered Best Effort meaning that both strategies will not always merge as expected when they encounter ambiguous use cases as outlined in the `README.md` text at the top of `source_fields_merging` in detail.

The default used strategy of `merge_missing_fields_with_source` which has the simplest behavior will work in most common use cases. This is simply if the `_source` document is missing a value that is present in the `fields`, and the `fields` value is a primitive concrete value such as a `string` or `number` or `boolean` and the `_source` document does not contain an existing object or ambiguous array, then the value will be merged into `_source` and a new reference is returned. If you call the strategy twice it should be idempotent meaning that the second call will detect a value is now present in `_source` and not re-merge a second time.

* 301 unit tests were added
* Extensive README.md docs are added
* e2e tests are updated to test scenarios and ambiguity and conflicts from previously to support this effort.
* Other e2e tests were updated
* One bug with EQL and fields was found with a workaround implemented. See https://github.com/elastic/elasticsearch/issues/74582
* SearchTypes adjusted to use recursive TypeScript types
* Changed deprecated for `@deprecated` in a few spots
* Removed some `ts-expect-error` in favor of `??` in a few areas
* Added a new handling of epoch strings and tests to `detection_engine/signals/utils.ts` since fields returns `epoch_millis` as a string instead of as a number. 
* Uses lodash safer set to reduce changes of prototype pollution

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

### Risk Matrix


| Risk                      | Probability | Severity | Mitigation/Notes        |
|---------------------------|-------------|----------|-------------------------|
| Prototype pollution | Low | High | Used lodash safer set |
| Users which have existing rules that work, upgrade and now we do not generate signals due to bad merging of fields and _source | Mid | High | We use the safer strategy method, `merge_missing_fields_with_source `, that is lighter weight to start with. We might add a follow up PR which enables a key in Kibana to turn off merging of fields with source. We added extensive unit tests and e2e tests. However, unexpected unknowns and behaviors from runtime fields and fields API such as geo-points looking like nested fields or `epoch_milliseconds` being a string value or runtime fields allowing invalid values were uncovered and tests and utilities around that have been added which makes this PR risky |
| Found a bug with using fields and EQL which caused EQL rules to not run. | Low | High | Implemented workaround for tests to pass and created an Elastic ticket and communicated the bug to EQL developers. |
2021-06-28 18:11:10 -06:00
Spencer
7442a99168
[dev_docs] add tutorial for setting up a development env (#103566)
Co-authored-by: Jonathan Budzenski <jon@budzenski.me>
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-28 19:44:29 -04:00
Ece Özalp
1b5cc2a7bc
[Security Solution] Disables loadPrebuiltRulesAndTemplatesButton if loading is in progress (#103568) 2021-06-28 19:43:38 -04:00
Bhavya RM
bc097856e6
Unskip the reporting screenshots.ts by fixing unable to update UI settings error. (#103184) 2021-06-28 19:33:35 -04:00
Scotty Bollinger
6085f90e2d
[Workplace Search] Port 4 PRs from ent-search to kibana (#103547)
* Poprt #3567 to Kibana

https://github.com/elastic/ent-search/pull/3567

* Poer #3582 to Kibana

https://github.com/elastic/ent-search/pull/3582

Also adds missing i18n

* Port #3634 to Kibana

https://github.com/elastic/ent-search/pull/3634

* Port #3758 to Kibana

* Rename var
2021-06-28 19:20:12 -04:00
Constance
6feea1a506
[Enterprise Search] Distinguish between error connecting vs. 5xx responses from Enterprise Search in UI (#103555)
* Update Enterprise Search request handler to send back an error connecting header

- vs only distinguishing error connecting issues by 502 status

+ clarify comment where this.handleConnectionError is called - for the most part, auth issues should already be caught by 401s in logic above

* Update HttpLogic to set errorConnecting state based on header

+ update tests etc to match read-only-mode state

* [Tech debt] Gracefully handle invalid HTTP responses

I've noticed this error a few times after Kibana gets shut down (http.response is undefined) so figured I would catch it here

* Fix missing try/catch/flashAPIErrors on engines overview

- This is the only http call I found missing a try/catch across our codebase, so we should be set for all views correctly flashing an API error that receive a 5xx response from ent-search

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-28 18:56:03 -04:00
Jason Stoltzfus
068aef82bc
[App Search] Remove analytics tracking from the entire dashboard (#103534) 2021-06-28 18:45:48 -04:00
James Rucker
b6fb390ea9
[Workplace Search] OAuth flows for Custom Search and Default Search (#101996)
* Add OAuth authorize endpoint support for custom search experiences

* Add support for default search experience authentication

Co-authored-by: scottybollinger <scotty.bollinger@elastic.co>
2021-06-28 18:27:49 -04:00
Nathan Reese
bf6be219e8
[Maps] deprecate 'map.regionmap' kibana config and 'Configured GeoJSON' source (#103373)
* [Maps] deprecate 'map.regionmap' kibana config and 'Configured GeoJSON' source

* clean up message

* revert change to KibanaRegionmapSource.getGeoJsonWithMeta

* tslint

* doc updates

* clean up

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-28 16:27:41 -06:00
Joe Portner
196531502f
Sharing saved objects phase 3.5 (#100424) 2021-06-28 18:06:54 -04:00
Zacqary Adam Xeper
899ee5e0de
[Fleet] Add multi field support to preconfiguration API (#103347)
* [Fleet] Add multi field support to preconfiguration API

* Loosen preconfig value schema
2021-06-28 16:34:20 -05:00
Spencer
407b96e021
[eslint/module-migration] add support for re-export defs and test rule (#102840)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-28 14:28:10 -07:00
Constance
d655c05ef0
[Enterprise Search] Add beta notification (#103535)
* Set up new BetaNotification component

* Update shared page template to append new beta notification item to side nav

NOTE: I'm mutating the array because:
- returning a new instance leads to a lot of really annoying type errors
- the side nav's we're getting are entirely static with predictable items & and always come from us anyway
- this is eventually going to get removed, and I'm optimizing for easy-to-remove code

* Add beta notification to error connecting state

- to help users/SDH cases where users cannot connect at all

* Fix type error

- sideNav itself can be undefined but not `sideNav.items`
2021-06-28 17:12:55 -04:00
Tiago Costa
f3a5ff2b98
skip flaky suite (#100968) 2021-06-28 20:56:05 +01:00
Kyle Pollich
4e20645fee
Allow for versionless integration details urls (#103484)
Default to either the installed version of an integration, or the latest
available version based on installation status when a version is not
included in the integration details URL.

Closes #93393
2021-06-28 15:53:19 -04:00
Tiago Costa
906b4fcc29
skip flaky suite (#103538) 2021-06-28 20:48:32 +01:00
Vadim Dalecky
82e32faf1a
Locator docs (#103129)
* feat: 🎸 add locator_examples plugin

* feat: 🎸 add example app in locator_examples

* feat: 🎸 add locator_explorer plugin

* chore: 🤖 remove url_generaotrs_* example plugins

* docs: ✏️ update share plugin readme

* docs: ✏️ add locators readme

* docs: ✏️ update docs link in example plugin

* docs: ✏️ update navigation docs

* fix: 🐛 make P extend SerializableState

* test: 💍 update test mocks

* fix: 🐛 use correct type in ingest pipeline locator

* test: 💍 add missing methods in mock

* test: 💍 update test mocks

* chore: 🤖 update plugin list

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-28 21:44:11 +02:00
Steph Milovic
64df69890d
[RAC] [Cases] Push to 3rd party UI updates (#103418) 2021-06-28 13:31:48 -06:00
Melissa Alvarez
8a57c9dad5
[ML] Anomaly Detection: Visualize delayed - data Part 3 (#103150)
* move content from modal to flyout with message table below chart

* update file name from modal to flyout

* update messages endpoint for range to use with chart range

* add show in chart action for messages table

* add job messages title and make flyout smaller
2021-06-28 15:13:20 -04:00
Luke Elmers
928c4b8353
Convert image names to snake_case in RFC 0020. (#103536) 2021-06-28 14:00:26 -05:00
Yuliia Naumenko
73e8871be0
[Alerting][Docs] Support enablement documentation. (#101457)
* [Alerting][Docs] Support enablement documentation.

* additional docs

* fixed links

* Apply suggestions from code review

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

* fixed common issues

* Apply suggestions from code review

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

* fixed due to comments

* fixed TM health api page

* fixed TM health api page 2

* Apply suggestions from code review

Co-authored-by: ymao1 <ying.mao@elastic.co>
Co-authored-by: Mike Côté <mikecote@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Mike Côté <mikecote@users.noreply.github.com>
Co-authored-by: ymao1 <ying.mao@elastic.co>

* fixed due to the comments

* fixed due to the comments

* fixed experimental flag

* fixed due to the comments

* Apply suggestions from code review

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

* Update docs/user/alerting/alerting-troubleshooting.asciidoc

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

* fixed due to the comments

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
Co-authored-by: ymao1 <ying.mao@elastic.co>
Co-authored-by: Mike Côté <mikecote@users.noreply.github.com>
2021-06-28 11:57:17 -07:00
Byron Hulcher
043a2e2fe8
[App Search] New Precision Slider for Relevance Tuning (#103015)
* Precision is now a required param for search settings

* Made RelevanceTuningLogic aware of precision param

* New PrecisionSlider component

* Add PrecisionSlider to RelevanceTuning

* Fix types in test

* Fix imports for PrecisionSlider

* Slight panel and text adjustments.

* Comment out docs link

* Add commented out test for docs

* Can we just all agree not to talk about this commit

* Restore docs link

* Fix docs link again

* Clean-up step description logic

* Test for documentation link

* Moving the spacer to align titles.

* Missing test for updatePrecision

* Fix CSS for step description

* Remove containing EuiPanel

* Improve screen reader experience

Co-authored-by: Davey Holler <daveyholler@hey.com>
2021-06-28 14:50:32 -04:00
Wylie Conlon
cfd836014d
[Vega] Allow faceted Vega-Lite charts to take correct size (#103352)
* [Vega] Allow faceted Vega-Lite charts to take correct size

* Add unit test

* Update autosize docs

* Add warning when autosize=none

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-28 14:41:06 -04:00
Jonathan Budzenski
3f0197e323 Revert "[Enterprise Search] Add beta notification (#103429)"
This reverts commit 60d1ef9f92.
2021-06-28 13:35:10 -05:00
Kevin Logan
73919aa766
[Security Solution] Add Windows and macOs option to dropdown for creating Exceptions from scratch (#103404) 2021-06-28 14:23:27 -04:00
Pierre Gayvallet
62e79ffaae
[RFC] Node.js clustering in Kibana (#94057)
Co-authored-by: Luke Elmers <luke.elmers@elastic.co>
2021-06-28 12:22:49 -06:00
Constance
d1c3183ca7
Update jest.sh file to strip leading './' dir (#103507) 2021-06-28 14:21:54 -04:00
Poff Poffenberger
9c2605398f
[Canvas] Improvements to datasource expressions including SQL parameter support and array leniency (#99549)
* Remove es sql strategy from behind Labs project, remove legacy essql code, remove last spot of legacy elasticsearch client from canvas

* clean up test

* fix es field test

* remove comment

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-28 13:19:22 -05:00