Commit graph

42353 commits

Author SHA1 Message Date
Kibana Machine 8dcc71c0da
[Integrations UI] Add support for custom asset definitions in Integration assets tab (#103554) (#104230)
* Add UI extension logic for assets + set up custom log views

* Add endpoint security UI extension

* Add synthetics ui extension

* Address PR feedback

- Remove default filter for log stream url
- Fix missing basePath prepend on asset urls
- Expand accordion by default on assetless integrations

* Fix type errors

* Add initial APM extension setup

* Fix missing ExtensionWrapper for enrollment extension

* Fix custom logs asset extension

* Fix type errors

* Add new hook for enrollment flyout ui extensions

* Address PR review + refactor UI extension usage for flyout

* Update limits.yml via script

* Fix type errors

* Add tests for custom assets UI extensions

* Update tests for flyout

* Remove unused import

* Fix type errors in ui extension tests

* Skip view data tests and link to issue

* Use RedirectAppLinks + fix synthetics link

* Use constants for app ID's where possible

* Revert limits.yml

* Fix lazy imports for custom asset components

* Update endpoint custom assets link + description

* Add translation for custom assets UI

* Address PR review in APM

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kyle Pollich <kyle.pollich@elastic.co>
2021-07-01 20:44:32 -04:00
Kibana Machine f6be991ccc
[canvas] Create Platform Service; remove legacy service (#104113) (#104209)
Co-authored-by: Clint Andrew Hall <clint.hall@elastic.co>
2021-07-01 22:59:28 +00:00
Michael Dokolin c73e13d744
[Expressions] Update expressions public API to expose partial results support (#102403) (#104210)
* Add partial result flag to the execution result
* Update expressions plugin run method to return observable
* Update data getter in the execution contract to return observable
* Update the expression loader to take into account the partial results flag
2021-07-01 18:57:17 -04:00
Kibana Machine e601457bba
Fixes pipe I did incorrectly (#104162) (#104206)
## Summary

Fixes a Cypress pipe where I was not using the correct selector and methodology. I now use the check boxes for disable-all for the test.

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

Co-authored-by: Frank Hassanabad <frank.hassanabad@elastic.co>
2021-07-01 18:40:09 -04:00
Kibana Machine f8d194581e
Use EUI variables in favor of APM style variables (#104016) (#104204)
Remove many of the variables in style/variables and replace them with EUI theme equivalents.

* Remove all the `units.x` (double, triple, etc.) variables. They were used in few places.
* Remove `px(x)` and just use `${x}px`. Many of its uses were not necessary.
* Remove `pct(x)`; it was only used in one place.
* Allow `truncate` to take a string or number and use `px` when given a number.
* Move the remaining helpers (`unit` and `truncate`) to `utils/style`.
* Some very contrived unit-based constants (`${px(units.unit + units.half + units.quarter)}`) replaced with hard-coded pixel values (`28px`).
* Move shared/charts/Legend to shared/charts/Timeline/legend since that's the only place it's used.
* Import organization and file renaming according to conventions.
* Rename `WaterfallWithSummmary` to `WaterfallWithSummary`.
* Remove unused `HttpContext` component from span flyout directory.
* Clean up some Storybook path names

There should be no visible style changes anywhere in the app; it's all refactoring.

Fixes #90930.

Co-authored-by: Nathan L Smith <nathan.smith@elastic.co>
2021-07-01 22:35:07 +00:00
Kibana Machine 9b44a3298b
[CTI] fixes undefined selectedTab when AlertSummaryView displays an e… (#103970) (#104203)
* [CTI] fixes undefined selectedTab when AlertSummaryView displays an event after an alert

* updates data type

* updates data type

* updates data type

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Ece Özalp <ozale272@newschool.edu>
2021-07-01 18:34:08 -04:00
Thomas Watson f5e032a5c0
Bump Node.js from version 14.17.0 to 14.17.2 (#104148) (#104195) 2021-07-01 17:44:38 -04:00
Kaarina Tungseth 34a88b79f5
[DOCS] Adds Making dashboards interactive (#102815) (#104218)
* [DOCS] M Adds interactive dashboard content

* [DOCS] Adds Making dashboards interactive

* Fixes drilldowns broken links

* Update docs/user/dashboard/make-dashboards-interactive.asciidoc

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

* Adds metadata

* Update docs/user/dashboard/make-dashboards-interactive.asciidoc

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

* Update docs/user/dashboard/make-dashboards-interactive.asciidoc

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

* Update docs/user/dashboard/make-dashboards-interactive.asciidoc

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

* Review comments

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

Co-authored-by: Wylie Conlon <wylieconlon@gmail.com>
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
2021-07-01 17:32:17 -04:00
Kibana Machine 02319b11a0
[maps][docs] 7.14 doc updates (#103531) (#104214)
* [maps][docs] 7.14 doc updates

* more details

* timeslider screenshot

* Update docs/maps/search.asciidoc

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

* Update docs/maps/search.asciidoc

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

* review feedback

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

Co-authored-by: Nathan Reese <reese.nathan@gmail.com>
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
2021-07-01 17:20:41 -04:00
Kibana Machine 694be8feec
Timelion tests- migrate to kbnArchiver from esArchiver (#103969) (#104188)
* Timelion tests- migrate to kbnArchiver

* added the logic to handle custom space

* paths and version changed

Co-authored-by: Rashmi Kulkarni <rashmi.kulkarni@elastic.co>
2021-07-01 17:14:47 -04:00
Kibana Machine 062b4e044a
[Localization] Adds guidelines about markdown and long paragraphs (#104171) (#104193)
Co-authored-by: Christiane (Tina) Heiligers <christiane.heiligers@elastic.co>
2021-07-01 15:38:54 -04:00
Kibana Machine c54e9a692c
[ML] Data visualizer: Removes experimental badge from file data visualizer (#104075) (#104151)
* [ML] Data visualizer: Removes experimental badge from file data visualizer

* [ML] Remove experimental badge scss import

Co-authored-by: Pete Harverson <peteharverson@users.noreply.github.com>
2021-07-01 19:03:53 +00:00
debadair 516b375568
[DOCS] Updated xref to ES time units topic. (#104186)
* [DOCS] Link directly to units topics

* [DOCS] Fixed broken xref
2021-07-01 12:03:19 -07:00
Kibana Machine 24f8036f5b
Refactor security_solution's Cypress package (#103261) (#104146)
* Define reporter configuration in one place: 'yarn cypress:run:reporter'
* Define junit generation in one place: 'yarn junit:merge'

Co-authored-by: Domenico Andreoli <domenico.andreoli@elastic.co>
2021-07-01 14:43:51 -04:00
Kibana Machine 52aaec88f0
Addressing feedback for the migrations (#104104) (#104138)
Co-authored-by: Jonathan Buttner <56361221+jonathan-buttner@users.noreply.github.com>
2021-07-01 18:18:06 +00:00
Clint Andrew Hall 977b57a033
[canvas] Create Notify Service; remove legacy service (#103821) (#104136) 2021-07-01 14:17:54 -04:00
Kibana Machine 6bfc19031c
[canvas] Create Notify Service; remove legacy service (#103821) (#104137)
Co-authored-by: Clint Andrew Hall <clint.hall@elastic.co>
2021-07-01 14:16:40 -04:00
Alison Goryachev d953b3f672
[Ingest pipelines] Support output_format in date processor (#103729) (#104135) 2021-07-01 14:12:15 -04:00
Christos Nasikas ebefe938af
[Detections] Truncate case title in toaster when attaching an alert to case (#103228) (#104133) 2021-07-01 14:08:03 -04:00
Brandon Kobel 0c51e23395
[7.x] Update docs to explicitly state supported upgrade version (#103783)
* Update docs to explicitly state supported upgrade version

* Update docs/setup/upgrade.asciidoc

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>
2021-07-01 10:50:10 -07:00
Kibana Machine f2c54ea76e
Search integrations for all substrings + don't search on description (#104099) (#104128)
Co-authored-by: Kyle Pollich <kyle.pollich@elastic.co>
2021-07-01 17:34:11 +00:00
Kibana Machine f4de8acde3
[ML] Fix missing script aggs on the transform preview table (#103913) (#104126)
* [ML] get field type from sampled doc for script fields

* [ML] refactor, unit tests

Co-authored-by: Dima Arnautov <dmitrii.arnautov@elastic.co>
2021-07-01 13:33:33 -04:00
Joe Portner 3b20d04815
[Docs] Add documentation on multiple tenants (#103125) (#104156)
# Conflicts:
#	docs/user/security/authorization/index.asciidoc
2021-07-01 13:24:49 -04:00
Kibana Machine 2173fc4bda
[Task Manager] Fixing typo in field name (#103948) (#104112)
* Fixing typo

* Fixing typo

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: ymao1 <ying.mao@elastic.co>
2021-07-01 12:42:36 -04:00
Melissa Alvarez 7950c52b75
switch to using internal user (#103931) (#104107) 2021-07-01 12:29:27 -04:00
Kibana Machine 57daaa4a22
Aligning logger contexts (#103741) (#104108)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: ymao1 <ying.mao@elastic.co>
2021-07-01 12:29:07 -04:00
Kibana Machine ed386b69e1
[Security Solution] fix failed packages call infinite retry (#103998) (#104106)
Co-authored-by: Joey F. Poon <joey.poon@elastic.co>
2021-07-01 12:11:55 -04:00
Kibana Machine 43b854cba1
Add minimum bucket size when using metric powered ui (#103773) (#104102)
* Add minimum bucket size when using metric powered ui

* addressing PR comments

* addressing comments

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Cauê Marcondes <55978943+cauemarcondes@users.noreply.github.com>
2021-07-01 15:59:56 +00:00
John Dorlus bd3ee45db0
Added test for the date processor. (#103415) (#103761)
* Added test for the date processor.

* Fixed nits per PR comments.

* Fixed failure from removing a data test subject in the helpers file.
2021-07-01 11:58:54 -04:00
Kibana Machine 4dccd26246
[Security Solutions] Administration breadcrumbs shortened to be consistent with the rest (#103927) (#104059)
* Administration breadcrumbs shortened to bbe consistent with the rest

* remove comment

Co-authored-by: Sergi Massaneda <sergi.massaneda@elastic.co>
2021-07-01 15:35:30 +00:00
Kibana Machine 92667f5885
[Security Solution] Add advance policy keys for memory signature and shellcode protection (#101721) (#104096)
Co-authored-by: Gabriel Landau <42078554+gabriellandau@users.noreply.github.com>

Co-authored-by: Esteban Beltran <academo@users.noreply.github.com>
Co-authored-by: Gabriel Landau <42078554+gabriellandau@users.noreply.github.com>
2021-07-01 11:04:57 -04:00
Alison Goryachev b5f7aeb7fa
[Upgrade Assistant] Auto upgrade ML job model snapshots (#100066) (#104091)
# Conflicts:
#	x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/deprecations/cell.tsx
#	x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/deprecations/list.tsx
2021-07-01 10:47:59 -04:00
Kibana Machine c78eb8a6cc
[Security Solution] External alerts and Modal bug fix (#103933) (#104082)
Co-authored-by: Michael Olorunnisola <michael.olorunnisola@elastic.co>
2021-07-01 09:38:07 -04:00
Kibana Machine bdfb417a54
[Canvas] Expression reveal image. (#101987) (#104076)
* expression_reveal_image skeleton.

* expression_functions added.

* expression_renderers added.

* Backup of daily work.

* Fixed errors.

* Added legacy support. Added button for legacy.

* Added storybook.

* Removed revealImage from canvas.

* setState while rendering error fixed.

* tsconfig.json added.

* jest.config.js added.

* Demo doc added.

* Types fixed.

* added limits.

* Removed not used imports.

* i18n namespaces fixed.

* Fixed test suite error.

* Some errors fixed.

* Fixed eslint error.

* Removed more unused translations.

* Moved UI and elements, related to expressionRevealImage from canvas.

* Fixed unused translations errors.

* Moved type of element to types.

* Fixed types and added service for representing elements, ui and supported renderers to canvas.

* Added expression registration to canvas.

* Fixed

* Fixed mutiple call of the function.

* Removed support of a legacy lib for revealImage chart.

* Removed legacy presentation_utils plugin import.

* Doc error fixed.

* Removed useless translations and tried to fix error.

* One more fix.

* Small imports fix.

* Fixed translations.

* Made fixes based on nits.

* Removed useless params.

* fix.

* Fixed errors, related to jest and __mocks__.

* Removed useless type definition.

* Replaced RendererHandlers with IInterpreterRendererHandlers.

* fixed supported_shareable.

* Moved elements back to canvas.

* Moved views to canvas, removed expression service and imported renderer to canvas.

* Fixed translations.

* Types fix.

* Moved libs to presentation utils.

* Fixed one mistake.

* removed dataurl lib.

* Fixed jest files.

* elasticLogo removed.

* Removed elastic_outline.

* removed httpurl.

* Removed missing_asset.

* removed url.

* replaced mostly all tests.

* Fixed types.

* Fixed types and removed function_wrapper.ts

* Fixed types of test helpers.

* Changed limits of presentationUtil plugin.

* Fixed imports.

* One more fix.

* Fixed huge size of bundle.

* Reduced allow limit for presentationUtil

* Updated limits for presentationUtil.

* Fixed public API.

* fixed type errors.

* Moved css to component.

* Fixed spaces at element.

* Changed order of requiredPlugins.

* Updated limits.

* Removed unused plugin.

* Added rule for allowing import from __stories__ directory.

* removed useless comment.

* Changed readme.md

* Fixed docs error.

* A possible of smoke test.

* onResize changed to useResizeObserver.

* Remove useless events and `useEffect` block.

* Changed from passing handlers to separate functions.

* `function` moved to `server`.

* Fixed eslint error.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Yaroslav Kuznietsov <kuznetsov.yaroslav.yk@gmail.com>
2021-07-01 09:09:53 -04:00
Kibana Machine 92991327a4
[Logs & Metrics] refactor breadcrumbs (#103249) (#104074)
* [Logs & Metrics] refactor breadcrumbs

* [Logs & Metrics] remove Header component, move translations and create readonly badge hook

* add breadcrumb to metric detail page

* fix check_file_casing ci issues

* create separate breadcrumb hook for logs and metrics

* fix metrics translation title

* fix wrong imports and unused variables

* fix translation imports

* fix unused import

* refactor use_breadcrumbs

* remove Header component

* fix linter exhaustive-deps error by wrapping into useMemo

* refactor use_readonly_badge

* remove commented out code

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: mgiota <giota85@gmail.com>
2021-07-01 08:59:31 -04:00
Kibana Machine 98bda2d177
[Discover] fix sidebar content for old ff (#103424) (#104066)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Dmitry Tomashevich <39378793+Dmitriynj@users.noreply.github.com>
2021-07-01 08:42:11 -04:00
Stratoula Kalafateli 551f8a2a5d
[TSVB] Documents the new index pattern mode (#102880) (#104063)
* [TSVB] Document the new index pattern mode

* Add a callout to TSVB to advertise the new index pattern mode

* Conditionally render the callout, give capability to dismiss it

* Fix i18n

* Update the notification texts

* Update notification text

* Change callout storage key

* add UseIndexPatternModeCallout component

* Update docs/user/dashboard/tsvb.asciidoc

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>

* Update docs/user/dashboard/tsvb.asciidoc

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>

* Update docs/user/dashboard/tsvb.asciidoc

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>

* Update docs/user/dashboard/tsvb.asciidoc

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>

* Update docs/user/dashboard/tsvb.asciidoc

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>

* Update docs/user/dashboard/tsvb.asciidoc

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>

* Update docs/user/dashboard/tsvb.asciidoc

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>

* Update docs/user/dashboard/tsvb.asciidoc

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>

* Final docs changes

* Remove TSVB from title

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Alexey Antonov <alexwizp@gmail.com>
Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Alexey Antonov <alexwizp@gmail.com>
Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>
2021-07-01 07:43:26 -04:00
Kibana Machine 33f0c31340
[Lens] Move editorFrame state to redux (#100858) (#104057)
Co-authored-by: Joe Reuter <johannes.reuter@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: dej611 <dej611@gmail.com>

Co-authored-by: Marta Bondyra <marta.bondyra@gmail.com>
Co-authored-by: Joe Reuter <johannes.reuter@elastic.co>
Co-authored-by: dej611 <dej611@gmail.com>
2021-07-01 07:07:37 -04:00
Kibana Machine 88b9d3899a
[Lens] Add functional test for example integration (#103460) (#104054)
Co-authored-by: Joe Reuter <johannes.reuter@elastic.co>
2021-07-01 06:55:09 -04:00
Kibana Machine 15abbfff20
[Cases] Adding migration tests for owner field added in 7.14 (#102577) (#104050)
* Adding migration tests for 7.13 to 7.14

* Adding test for connector mapping

* Comments

Co-authored-by: Jonathan Buttner <56361221+jonathan-buttner@users.noreply.github.com>
2021-07-01 06:26:41 -04:00
Dmitry Tomashevich 0e420138eb
[Discover] Replace doc viewer table with EuiInMemoryTable (#102149) (#103678)
* [Discover] replace legacy table with euiInMemoryTable

* [Discover] update styles, add badge

* fix font in badge and adjust line height

* add tooltip

* [Discover] update unit tests, return actions column to left side

* [Discover] update field name test snapshot

* [Discover] update wording

* [Discover] handle pagination, return formatting value styles

* [Discover] fix failing stylelint error

* [Discover] return responsive prop, update classes

* [Discover] update test and meet formatting rules

* improve table view on medium

* remove extra file

* [Discover] fix unit test

* [Discover] align top vertically field name and action cells, disable table responsive design

* [Discover] adjust styles for cross browser compatibility

* [Discover] remove pagination optimize styles, update test

* [Discover] fix eslint

* [Discover] clean up styles

* [Discover] fix single doc view

* [Discover] add check lack of multifieldBadge

Co-authored-by: Andrea Del Rio <delrio.andre@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Andrea Del Rio <delrio.andre@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-07-01 05:59:36 -04:00
Kibana Machine a933484562
Make (empty) value subdued (#103833) (#104048)
* Make empty value subdued

* Fix highlighting in values

* Fix test failures

* Add unit tests

Co-authored-by: Tim Roes <tim.roes@elastic.co>
2021-07-01 05:34:33 -04:00
Kibana Machine ed55de00e5
[Metrics UI]: add system.cpu.total.norm.pct to default metrics (#102428) (#104045)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: mgiota <giota85@gmail.com>
2021-07-01 09:09:07 +00:00
Yuliia Naumenko e212da7792
[Alerting][Docs] Fixed formatting issues for alerting documentation. Added docs about rules statuses. (#103725) (#103953)
* [Alerting][Docs] Fixed formatting issues for alerting documentation. Added docs about rules statuses.

* Apply suggestions from code review

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

* Apply suggestions from code review

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

* fixed due to the comments

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: ymao1 <ying.mao@elastic.co>
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: ymao1 <ying.mao@elastic.co>
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
2021-07-01 03:43:17 -04:00
Kibana Machine 03fddd678b
Should make cypress less flake with two of our tests (#104033) (#104043)
## Summary

Should reduce flake in two of our Cypress tests.

* Removed skip on a test recently skipped
* Removes a wait() that doesn't seem to have been reducing flake added by a EUI team member
* Adds a `.click()` to give focus to a component in order to improve our chances of typing in the input box
* Adds some `.should('exists')` which will cause Cypress to ensure something exists and a better chance for click handlers to be added
* Adds a pipe as suggested by @yctercero in the flake test

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

Co-authored-by: Frank Hassanabad <frank.hassanabad@elastic.co>
2021-06-30 23:47:42 -04:00
Kibana Machine 709fdf1f57
chore(NA): upgrades bazel rules nodejs into v3.6.0 (#103895) (#104041)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
2021-06-30 23:03:24 -04:00
Kibana Machine d90bae4c29
Add CIT for Date Index Processor in Ingest Node Pipelines (#103416) (#104036)
* Added initial work for date index processor CITs.

* Fixed the tests and added the remaining coverage.

* Fixed message for date rounding error and updated tests to use GMT since that timezone actually works with the API.

* Update Date Index Name processor test name.

Co-authored-by: Yulia Čech <6585477+yuliacech@users.noreply.github.com>

Co-authored-by: Yulia Čech <6585477+yuliacech@users.noreply.github.com>

Co-authored-by: John Dorlus <silne.dorlus@elastic.co>
Co-authored-by: Yulia Čech <6585477+yuliacech@users.noreply.github.com>
2021-06-30 21:55:28 -04:00
Kibana Machine 062777ca90
Fixes the unHandledPromise rejections happening from unit tests (#104017) (#104035)
## Summary

We had `unHandledPromise` rejections within some of our unit tests which still pass on CI but technically those tests are not running correctly and will not catch bugs.

We were seeing them showing up like so:

```ts
PASS  x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/import_rules_route.test.ts (10.502 s)
(node:21059) UnhandledPromiseRejectionWarning: [object Object]
    at emitUnhandledRejectionWarning (internal/process/promises.js:170:15)
    at processPromiseRejections (internal/process/promises.js:247:11)
    at processTicksAndRejections (internal/process/task_queues.js:96:32)
(node:21059) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 3)
(node:21059) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
    at emitDeprecationWarning (internal/process/promises.js:180:11)
    at processPromiseRejections (internal/process/promises.js:249:13)
    at processTicksAndRejections (internal/process/task_queues.js:96:32)
 PASS  x-pack/plugins/security_solution/server/lib/detection_engine/signals/signal_rule_alert_type.test.ts
 PASS  x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/add_prepackaged_rules_route.test.ts
 PASS  x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/update_rules_route.test.ts
(node:21059) UnhandledPromiseRejectionWarning: Error: bulk failed
    at emitUnhandledRejectionWarning (internal/process/promises.js:170:15)
    at processPromiseRejections (internal/process/promises.js:247:11)
    at processTicksAndRejections (internal/process/task_queues.js:96:32)
(node:21059) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 7)
````

You can narrow down `unHandledPromise` rejections and fix tests one by one by running the following command:
```ts
node --trace-warnings --unhandled-rejections=strict scripts/jest.js --runInBand x-pack/plugins/security_solution
```

You can manually test if I fixed them by running that command and ensuring all tests run without errors and that the process exits with a 0 for detections only by running:

```ts
node --trace-warnings --unhandled-rejections=strict scripts/jest.js --runInBand x-pack/plugins/security_solution/public/detections
```

and

```ts
node --trace-warnings --unhandled-rejections=strict scripts/jest.js --runInBand x-pack/plugins/security_solution/server/lib/detection_engine
```

### Checklist
- [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or

Co-authored-by: Frank Hassanabad <frank.hassanabad@elastic.co>
2021-06-30 21:42:03 -04:00
debadair bc02990c46
[DOCS] Link directly to units topics (#104040) 2021-06-30 18:01:52 -07:00
Kibana Machine ded645a52d
[Security Solution][Hosts] Show Fleet Agent status and Isolation status for Endpoint Hosts when on the Host Details page (#103781) (#104030)
* Refactor: extract agent status to endpoint host status to reusable utiltiy
* Show Fleet Agent status + isolation status
* Refactor EndpoinAgentStatus component to use `<AgentStatus>` common component
* Move actions service to `endpoint/services` directory
* Add pending actions to the search strategy for endpoint data

Co-authored-by: Paul Tavares <56442535+paul-tavares@users.noreply.github.com>
2021-06-30 20:34:31 -04:00