Commit graph

14948 commits

Author SHA1 Message Date
Tiago Costa 017a2b8413
skip flaky suite (#94535) 2021-03-24 13:46:38 +00:00
Joe Reuter 6295ae71b5
[Lens] Cache avilable operations meta data (#95034) 2021-03-24 14:04:19 +01:00
Ester Martí Vilaseca 326abc2a94
Add filters to query total groupings (#94792)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-24 13:51:20 +01:00
Ester Martí Vilaseca ad1004519a
[Metrics UI] Fix preview charts for inventory alerts when using a filter (#94561)
* Pass filterQuery instead of filterQueryText to invertory alerts preview chart

* Add test to verify that filterQuery is sent to the expression chart

* Improve test description

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-24 13:45:56 +01:00
Joe Reuter e6f4770213
[Lens] Add telemetry for popovers (#94903) 2021-03-24 13:24:31 +01:00
Joe Reuter c218ce292a
[Lens] Add ability to remove runtime field (#94949) 2021-03-24 11:47:56 +01:00
Joe Reuter f07b1722cb
[Lens] Implement filtered metric (#92589) 2021-03-24 11:44:23 +01:00
James Gowdy fdda564a84
[ML] Adding additional runtime mapping checks (#94760)
* [ML] Adding additional runtime mapping checks

* adding functional test for datafeed preview

* renaming findFieldsInAgg

* updating query check

* always use runtime mappings if present in agg field exists check

* changes based on review

* updating tests based on review

* fixing permission check on endpoint and test

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-24 10:29:46 +00:00
Aleh Zasypkin 3f3cc8ee35
Expose session invalidation API. (#92376) 2021-03-24 09:54:08 +01:00
Scotty Bollinger 80b05b914a
[Workplace Search] Add missing tests to get 100% coverage (#95240) 2021-03-23 18:39:57 -04:00
Scotty Bollinger 3ff76fd022
[Workplace Search] Fix redirect and state for personal oAuth plugin (#95238)
* Move source added route to top-level index component

* Use state passed back from oAuth app to determine context

The previous tests weren’t actually using this state so they have been updated with actual state data for proper testing
2021-03-23 18:02:36 -04:00
Larry Gregory ba21c315c9
Document spaces telemetry fields (#95087) 2021-03-23 15:47:14 -04:00
Paul Tavares 8933037bd0
[Fleet] Add fleetServerEnabled config setting and use it in SO migration for Endpoint Policies (#95204)
* Add `agents.fleetServerEnabled` to plugin configuration
* Use feature flag in Endpoint package policy SO migration
2021-03-23 15:24:24 -04:00
Candace Park 3998a83871
[Security Solution][Endpoint][Admin] Refactor policy details protections (#94970) 2021-03-23 15:23:58 -04:00
Alejandro Fernández Haro 55e513364a
isClusterOptedIn should fallback to true when not found (#94980)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-23 15:23:23 -04:00
Scotty Bollinger 29ee309dd8
[App Search] Role mappings migration part 3 (#94763)
* Remove validaition of ID property in route body

The ID is inferred from the param in the URL. This was fixed in the logic file but the server route was never updated

* Add RoleMappings component

- ROLE_MAPPINGS_TITLE was moved to a shared constant in an earlier PR
- Also removing redundant exports of interface

* Add RoleMapping component

- Also removing redundant export of interface from AppLogic

* Add RoleMappingsRouter

ROLE_MAPPINGS_TITLE was moved to a shared constant in an earlier PR

# Conflicts:
#	x-pack/plugins/enterprise_search/public/applications/app_search/components/role_mappings/index.ts

* Add route and update link in navigation

* Remove unused translations

* Change casing

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

* Change casing

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

* Change casing

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

* Add ability test

* Refactor conditional constants

* Refactor role type constants

* Remove EuiPageContent

* Refactor action mocks

Co-authored-by: Constance <constancecchen@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-23 15:18:11 -04:00
Jen Huang d886979e3b
[Fleet] Remove upgradePackage and consolidate it with installPackage, optimize calls to create index patterns (#94490)
* Add data plugin to server app context

* First attempt at switching to indexPatternService for EPM index pattern creation & deletion, instead of interacting directly with index pattern SOs

* Simplify bulk install package, remove upgradePackage() method in favor of consolidating with installPackage(), use installPackage() for bulk install instead

* Update tests

* Change cache logging of objects to trace level

* Install index patterns as a post-package installation operation, for bulk package installation, install index pattern only if one or more packages are actually new installs, add debug logging

* Allow getAsSavedObjectBody to return non-scripted fields when allowNoIndex is true

* Allow `getFieldsForWildcard` to return fields saved on index pattern when allowNoIndices is true

* Bring back passing custom ID for index pattern SO

* Fix tests

* Revert "Merge branch 'index-pattern/allow-no-index' into epm/missing-index-patterns"

This reverts commit 8e712e9c00, reversing
changes made to af0fb0eaa8.

* Allow getAsSavedObjectBody to return non-scripted fields when allowNoIndex is true

(cherry picked from commit 69b93da180)

* Update API docs

* Run post-install ops for install by upload too

* Remove allowedInstallTypes param

* Adjust force install conditions

* Revert "Update API docs"

This reverts commit b9770fdc56.

* Revert "Allow getAsSavedObjectBody to return non-scripted fields when allowNoIndex is true"

This reverts commit afc91ce32f.

* Go back to using SO client for index patterns :(

* Stringify attributes again for SO client saving

* Fix condition for reinstall same pkg version

* Remove unused type

* Adjust comment

* Update snapshot

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-23 11:34:20 -07:00
Phillip Burch dc1f7d51d4
[Metrics UI] Add anomalies table to flyout (#90305)
* Add anomalies table to flyout

* Fix type

* Update i18n

* use anomalyThreshold from configuration

* use EuiBasicTable and format date

* add actions menu

* update text

* change host/k8s toggle to EuiComboBox

* add open in inventory to actions

* add search functionality back

* debounce api call

* loading messaging

* change types, cleanup

* query with partition field instead of influencers to prevent long query ES server errors

* show text when no jobs enabled

* adjust date

* close flyout after clicking show in inventory

* fix callout

Co-authored-by: neptunian <sandra.gonzales@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-23 14:14:05 -04:00
Jason Stoltzfus 97a03479e3
[App Search] Fix Relevance Tuning bugs (#95069) 2021-03-23 13:37:17 -04:00
Xavier Mouligneau 8a42049acb
[SECURITY SOLUTIONS] Bug top-n alerts (#94920)
* Associate timeline filter/query/dataprovider to top-n for alerts events

* fix pinned view when opening details panel

* fix top-n to bring the right raw/all indices

* review + do not add filter/query/dataprovider on Correlation/Pinned tab for topN

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-23 13:36:46 -04:00
Cauê Marcondes 134959d224
[APM] The Observability Getting Started page infinitely redirects, breaking browser's back button (#95083)
* fixing browser back button

* fixing test
2021-03-23 12:42:36 -04:00
Joe Reuter b2433cdcd9
[Lens] Telemetry: Add missing operations (#95040) 2021-03-23 17:33:06 +01:00
Larry Gregory a158f9d771
Remove duplicative RBAC tests (#95162) 2021-03-23 12:00:21 -04:00
Nicolas Chaulet 76b55207f7
[Fleet] Fix agent status count (#95099) 2021-03-23 11:24:25 -04:00
John Schulz c0c5fba4b0
[Fleet] Support force flag in bulk upgrade agents API (#94952)
## Summary

0cbbb41da2 is just a rearrangement of the tests.  5cad301e87 has the real changes: 
* Bug fix: `force: true` should bypass any restrictions re: managed policies
* Refactoring towards new response shape coming as part of https://github.com/elastic/kibana/issues/90437
* Added test to confirm new behavior


### 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-23 11:22:03 -04:00
James Rucker f3b71bce2a
Change the type of content source errorReason to match ent-search (#95098)
A recent refactor of content source jobs models unintentionally
changed this API. This change restores the functionality of the
re-authentication "Fix" link.
2021-03-23 08:04:22 -07:00
Larry Gregory 61db3f3cac
Only check required fields for the default space (#95147) 2021-03-23 10:45:59 -04:00
Byron Hulcher 4dec429fc9
Use string values for EngineTypes instead of int (#94823)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-23 10:09:11 -04:00
Nathan L Smith 5e31f91614
Alerts and cases page components for observability plugin (#93365)
Create components for the alerts and cases pages. This only contains basic empty components and stories for them.
2021-03-23 07:57:56 -05:00
Alejandro Fernández Haro 1e6a024c4d
[Monitoring] Bulk Uploader uses new ES client (#94908)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-23 08:31:02 -04:00
Nathan Reese 71466b2dd0
[Maps] fix tooltips with timestamp appear as epoch (#95106)
* [Maps] fix tooltips with timestamp appear as epoch

* request dates as strict_date_optional_time for tooltips
2021-03-23 06:27:41 -06:00
Dario Gieselaar bfe6c5186c
[APM] Fix TypeScript optimization script (#95137) 2021-03-23 11:20:21 +01:00
Shahzad 2b4bd10781
[Observability] Shared Field Suggestion value component (#94841)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-23 09:25:00 +01:00
Stratoula Kalafateli 7d303eb42d
[TSVB] Integrates the color service (#93749)
* [TSVB] Integrates the color service

* Fix i18n failure

* Sync colors :)

* Fix unit tests

* Apply the multiple colors also for gauge

* Fix

* More unit tests

* Cleanup

* Be backwards compatible

* Fetch palettesService on vis renderer

* Fix eslint

* Fix jest test

* Fix color mapping for empty labels

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-23 08:24:58 +02:00
Søren Louv-Jansen e90e5bae8c
[APM] Fix readme for running tsc (#95074) 2021-03-22 23:19:58 +01:00
Jason Stoltzfus 19aeb99dc3
[App Search] Remaining Result Settings logic and routes (#94947) 2021-03-22 15:58:32 -04:00
Paul Tavares 7ebffc3728
[FLEET][SECURITY_SOLUTION] Fix .fleet-artifacs index property names and add endpoint package policy migrations (#94977)
* migration of Endpoint Integration policies to adjust artifact relative urs
* Fix ``.fleet-artifacts` property name to be snake_cased
2021-03-22 15:26:37 -04:00
Steph Milovic 416eea750c
[Security Solution] [Cases] Add deprecation in cases plugin for rename (#94808) 2021-03-22 12:31:22 -06:00
David Sánchez 7270f6d318
[SECURITY_SOLUTION] Adds hash validation on UI for trusted app (#94958)
* Adds hash validation on UI. Display as many error messages as they are instead of displaying just the first one on entry fields. Updates related unit test

* Fixes failing test and added new test case

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-22 17:55:20 +01:00
Paul Tavares e7bb8b7b8a
[SECURITY SOLUTION] add enableExperimental plugin configuration setting (#94944)
* Added new setting (enableExperimental) to plugin configuration
* Remove plugin config setting `fleetServerEnabled` and use instead `enableExperimental`
2021-03-22 11:59:18 -04:00
Angela Chuang 04e4661cbf
[Security Solution] fix data providers cypress tests (#94933)
* fix data providers cypress tests

* add scrollToBottom to common tasks file

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-22 14:45:45 +00:00
David Sánchez 0a5ca7bb04
[SECURITY_SOLUTION] Better BE validation message for multiple same fields (#94935)
* WIP: Use schema.conditional instead of schema.oneOf to ensure the right schema validation from an specific field type

* Adds some comments on new schema definition

* Use validate functions to set custom messages

* Fixes type issue after schema changes. An overwrite of the schema inferred type is needed to match with the NewTrustedApp custom type

* Updates schema test after schema changes

* Changes error key by type. Updates related unit test

* WIP: Parse BE message into an user friendly one. Waiting for final texts

* Updates text messages for create trusted app errors

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-22 12:55:14 +01:00
Madison Caldwell c0f9bfcd21
[Security Solution][Detections][Threshold Rules][7.12] Threshold summary view (#94345)
* Add threshold summary view items

* Add threshold field desgination

* Add threshold fields to signal doc

* Fix unit test

* Handle error
2021-03-21 10:02:45 -04:00
Nathan Reese a6c0ff6e40
[ml] migrate file_data_visualizer/analyze_file to file_upload plugin (#94259)
* [ml] migrate file_data_visualizer/analyze_file to file_upload plugin

* tslint

* give analyze route access to ml user

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-20 14:59:52 -06:00
Walter Rafelsberger dd7ea1d4b2
[ML] Data Frame Analytics: Fix ROC Curve Chart for binary classification. (#94791)
- Updates the ROC Curve Chart to show only one line for binary classification.
- Improves type specs for the evaluate panel's data.
2021-03-20 18:41:25 +01:00
Tiago Costa 7e5dbdf5b9
skip flaky suite (#84440) 2021-03-19 23:21:31 +00:00
Walter Rafelsberger 778bb69cba
[ML] Functional Tests: Extend canvas assertion options. (#91473)
Updates the canvas element assertion service and stabilizes tests.
2021-03-19 21:06:59 +01:00
Steph Milovic 5f4939be76
Revert "[Security Solution] [Cases] Move create page components and dependencies to Cases (#94444)" (#94975)
This reverts commit c497239d55.
2021-03-18 18:25:39 -06:00
Constance ab0f45c053
[Curation] Add Result Manually flyout/search (#94887)
* Set up curation search server route

- not really sure which API endpoint to use, hedging my bets

* Set up AddResultLogic

- fairly simple, mostly concerned with flyout behavior & search query
- could likely be reused (or replaced with??) query tester logic in the future

* Add main AddResultFlyout component

- with custom isPromoted / isHidden logic & actions

* Update AddResultButton to open flyout

* Update Curation page to render the flyout

* PR feedback: reset search query on flyout re-open
2021-03-18 14:53:46 -07:00
Davis Plumlee cdca44a639
[Security Solution][Detection Rules] Fixes rule details activate switch (#94010) 2021-03-18 17:45:03 -04:00
Alison Goryachev 1592e3c01a
[Upgrade Assistant] use request hook (#94473) 2021-03-18 13:42:20 -04:00
Devon Thomson 882248c671
[Time to Visualize] Add Discrete Library Option to Save Modal (#94589)
* save modal UI and Redirect and save to library

Co-authored-by: Poff Poffenberger <poffdeluxe@gmail.com>
2021-03-18 13:40:02 -04:00
Constance 704d22b699
Improve responsiveness of promoted/hidden panel button actions (#94888) 2021-03-18 08:47:04 -07:00
Alison Goryachev 2f102b758b
[Upgrade Assistant] Address copy feedback (#94730) 2021-03-18 11:40:31 -04:00
Tyler Smalley 1060f8f05e
[test] Unskips delete component template test (#94856)
Test was skipped to allow for the promotion of the ES snapshot.

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2021-03-18 10:56:56 -04:00
Anton Dosov 8820e00bba
[Search Session] Make session name editable (#94610) 2021-03-18 14:41:38 +01:00
Marco Liberati 8f6a6e2ae5
[Lens] Improves lost indexpattern scenario in saved visualization (#91377)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-18 14:29:17 +01:00
Jason Stoltzfus 49aef21bd4
[App Search] Result settings logic - actions and reducers (#94629) 2021-03-18 09:27:16 -04:00
Nicolas Chaulet 11f02f78c6
[Fleet] Remove unused Fleet settings package|agent auto upgrade (#94805) 2021-03-18 09:08:35 -04:00
Jean-Louis Leysens 628bb4b377
[Ingest Pipelines] Fix serialization and deserialization of user input for "patterns" fields (#94689)
* updated serialization and deserialization behavior of dissect and gsub processors, also addded a test

* also fix grok processor

* pivot input checking to use JSON.stringify and JSON.parse

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-18 10:07:39 +01:00
Joe Reuter 52a1ce1723
[Lens] Runtime field editor (#91882) 2021-03-18 08:21:39 +01:00
Joe Reuter 90e3013449
add mocks for Lens plugin (#94593)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-18 08:18:59 +01:00
Xavier Mouligneau 051be90763
[SECURITY SOLUTIONS][Alerts Actions] Fix migration from 7.11.0/7.11.1 to 7.12 (#94722)
* do not modify connector with the right structure

* review trying to bring back incident to live when we can

* manage custom action

* fix cypress test

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-17 23:52:52 -04:00
Nicolas Chaulet 85d5f40d0c
[Fleet] Fix version on agent details screen (#94867) 2021-03-17 23:50:08 -04:00
John Schulz 34b6267893
Collapse two unenroll functions into one (#94848)
## Summary

Refactoring in progress towards https://github.com/elastic/kibana/issues/90437 

Collapse `forceUninstallAgents` into `uninstallAgents` into one function with an option. The pseudocode diff is

```diff
- function uninstallAgents() {
-   // filtering logic A
-   // side effects A
- }
- function forceUninstallAgents() {
-   // filtering logic A
-   // side effects B
- }

+ function uninstallAgents({ flag: boolean}) {
+   // filtering logic A
+   // if flag: side effects B
+   // else: side effects A
+ }
```

actually, there is [_one difference_](5564f25383 (diff-ecc3c625f2366949f1723e56b8477f6afb552ccfbcf3a71e0c28b2062fd05195)) in the filtering logic
 
### 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-17 23:46:03 -04:00
Constance f4da06349d
[Curation] Add promoted/hidden documents section & logic + Restore defaults button (#94769)
* Set up promoted & hidden documents logic

* Set up result utility for converting CurationResult to Result

* Set up AddResultButton in documents sections

- not hooked up to anything right now, but will be in the next PR

* Add HiddenDocuments section

* Add PromotedDocuments section w/ draggable results

* Update OrganicDocuments results with promote/hide actions

* Add the Restore Defaults button+logic

* PR feedback: key ID

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-17 20:01:50 -07:00
Aaron Caldwell ad18739de7
[Maps] Add endpoint to server for creating empty index & index pattern (#94028)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-17 21:40:51 -04:00
John Dorlus 6df27f322f
Re-Enabling Grok Debugger Functional UI Tests (#91274)
* Adding .only clause for testing purposes.

* Removing .only and reenabling test. Also changing back to group 13.

* Removing .only and reenabling test. Also changing back to group 13.

* Removed comment mentioning github issue.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-17 21:13:01 -04:00
spalger a4c41851e8 skip flaky suite (#93188) 2021-03-17 17:42:17 -07:00
Scotty Bollinger e1371b3d33
[Workplace Search] Fix confirm modal (#94844)
This PR addresses an issue where the confirmation modal when removing a content source connector was brokedn. The issue was that the component was not passed the props to render correctly
2021-03-17 19:55:35 -04:00
Vadim Yakhin 1b65ea91e5
Remove custom styles (#94839)
* Replace custom margin style with EuiFlexGroup gutter

* Replace custom padding style with EuiFlexGroup gutter

* Remove custom wrapper around Loading on Overview page (alpha)

* Replace custom range value output with EuiRange's showInput prop

* Remove custom style

I'll refer the correct handling of this to design pass

* Remove "euiPanel--inset" className, as it doesn't do anything in Amsterdam theme

* Remove unused className `euiPanel--noShadow`

We're already using hasShadow={false} prop that does the same

* Remove `euiPanel--outline` className, as it doesn't do anything in Amsterdam theme

* Inline classNames declaration with the goal to remove them later

They don't do anything in Amsterdam theme, but I'm not removing them to keep context for design pass.

* Remove `eui-textNoWrap` className from buttons, as it's already included in button styles

* Remove classNames with no styles attached

* Replace custom padding in content_section with EuiSpacer

* Remove source-row styles

Most of the classNames were redundant and not needed anymore. The ones that were actually used were either replaced with EUI props or deleted, so we could apply EUI styles during design pass.

* Replace source_icon styles with EUI components and props

* Replace source-card icon styles with EUI prop

* Remove className declarations with no styles attached to classes

* Fix tests

* Increase space between source overview panels

* Use smaller icons on source prioritization and connectors pages

* Invert SourceIcon default size and size provided via props

The default size was "xxl", now it's "m". "m" size is default in EUI, so it's more consistent.

* Get rid of &nbsp; as horizontal spacer
2021-03-17 18:26:50 -04:00
Scotty Bollinger 74b604608a
[Workplace Search] Add conditional props for Gmail (#94855)
THis PR adds conditional query params that gmail sends when doing an oauth redirect.
2021-03-17 18:22:59 -04:00
spalger 3ec9a17e2e skip failing suite (#94854) 2021-03-17 14:16:12 -07:00
Tim Sullivan 0d1a1af57d
[Reporting/UI Settings] Validation for the Reporting UI Setting Custom Logo (#94746)
* Validation for the Reporting UI Setting Custom Logo

* add more validations

* check if image is too large

* fix i18n

* clean redundant

* large test strings not necessary

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-17 10:39:49 -07:00
Spencer 37ff43b0c3
[theme] default to v8 theme (#94370)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-03-17 09:49:39 -07:00
Alison Goryachev 238610491b
[Component templates] Fix failing API test (#94831)
* fix failing component templates  test

* temporarily skip test
2021-03-17 09:21:02 -07:00
Melissa Alvarez e9627510fd
[ML] Data Frame Analytics creation: ensure job config validity persists when switching from/to form/editor (#94654)
* persisted validation form state  when switching from editor to form

* persist complete form state when switching from json editor
2021-03-17 12:14:45 -04:00
Liza Katz 2ef7f3bd0c
use index patterns and search services for autocomplete (#92861)
* use index patterns and search services for autocomplete

* imports

* extend DataRequestHandlerContext

* Catch error if index patterns service can't be created.

* doc

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-17 17:16:01 +02:00
Christos Nasikas 78ac6f9713
[Cases] Add SIR connector in case connector schema (#94786) 2021-03-17 11:01:43 -04:00
Alejandro Fernández Haro f62a3153cd
Define schema for monitoring-sourced telemetry (#94434)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-17 10:54:12 -04:00
James Rodewig 7cc9f01843
Update doc links for ingest pipelines app (#94742) 2021-03-17 10:14:42 -04:00
Tim Roes 34f8f62d4a
Cleanup advanced settings (#93437)
* Cleanup advanced settings

* Fix translations/telemetry settings

* Fix telemetry settings

* Fix discover api docs

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-17 14:44:55 +01:00
Marco Liberati 6479e410d7
[Lens] Expose ES errors in workspace (#94606)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-17 14:26:43 +01:00
Joe Portner fc45b2007c
Fix invalid integration test data (#94616) 2021-03-17 08:56:07 -04:00
Diana Derevyankina bdcd2ec859
Replace EuiCodeBlock with JsonCodeEditor in DiscoverGrid (#92442)
* Replace EuiCodeBlock with JsonCodeEditor in DiscoverGrid

* Add optional "hasLineNumbers" property to JsonCodeEditor and removed line numbers from the popover

* Update json_code_editor snapshot

* Add functional test for cell expanded content popover

* Remove unused code

* Fix geo point case and refactor some code

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-17 11:17:48 +03:00
Walter Rafelsberger 83c6bcc554
[ML] Anomaly Detection: Migrate validation messages links to use docLinks. (#94568)
- To make use of the docsLinks service which is only usable in client side code, Anomaly Detection's validation messages are not fully returned from the server anymore. Instead just the message ID and necessary metadata to parse the message template gets returned.
- getMessages() no longer uses inline hard coded documentation links but picks links from the docsLinks service.
- The code that rendered the messages originally on the server has been move to a function parseMessages() which can now be used on the client side and accepts the docsLinks services to get URLs to documentation from it.
- This means we no longer need to get the current version/branch information for the server side code.
- Tests have been updated to reflect the changes: API integration tests only check for the now reduced messages containing only message IDs and metadata. The expected results of the API integration tests are used as mocks for the client side function parseMessages(), this allows use to cover the same code and messages as previously.
2021-03-17 07:53:46 +01:00
Yara Tercero bbee40c819
[Lists][Exceptions] - Adding basic linting, i18n and storybook support (#94772)
### Summary

In preparation for moving all the exceptions UI components into the lists plugin adds some linting, adds the lists plugin to the i18n config and adds storybook support. Tried to add a bit stricter linting than exists in the security solution right now, rules that we've talked about wanting to enable.
2021-03-16 21:46:20 -04:00
John Schulz 044a94ac46
[Fleet] Add test/fix for invalid/missing ids in bulk agent reassign (#94632)
## Problem
While working on changes for bulk reassign https://github.com/elastic/kibana/issues/90437, I found that the server has a runtime error and returns a 500 if given an invalid or missing id.

<details><summary>server error stack trace</summary>

```
   │ proc [kibana] server    log   [12:21:48.953] [error][fleet][plugins] TypeError: Cannot read property 'policy_revision_idx' of undefined
   │ proc [kibana]     at map (/Users/jfsiii/work/kibana/x-pack/plugins/fleet/server/services/agents/helpers.ts:15:34)
   │ proc [kibana]     at Array.map (<anonymous>)
   │ proc [kibana]     at getAgents (/Users/jfsiii/work/kibana/x-pack/plugins/fleet/server/services/agents/crud.ts:191:32)
   │ proc [kibana]     at runMicrotasks (<anonymous>)
   │ proc [kibana]     at processTicksAndRejections (internal/process/task_queues.js:93:5)
   │ proc [kibana]     at Object.reassignAgents (/Users/jfsiii/work/kibana/x-pack/plugins/fleet/server/services/agents/reassign.ts:91:9)
   │ proc [kibana]     at postBulkAgentsReassignHandler (/Users/jfsiii/work/kibana/x-pack/plugins/fleet/server/routes/agent/handlers.ts:314:21)
   │ proc [kibana]     at Router.handle (/Users/jfsiii/work/kibana/src/core/server/http/router/router.ts:272:30)
   │ proc [kibana]     at handler (/Users/jfsiii/work/kibana/src/core/server/http/router/router.ts:227:11)
   │ proc [kibana]     at exports.Manager.execute (/Users/jfsiii/work/kibana/node_modules/@hapi/hapi/lib/toolkit.js:60:28)
   │ proc [kibana]     at Object.internals.handler (/Users/jfsiii/work/kibana/node_modules/@hapi/hapi/lib/handler.js:46:20)
   │ proc [kibana]     at exports.execute (/Users/jfsiii/work/kibana/node_modules/@hapi/hapi/lib/handler.js:31:20)
   │ proc [kibana]     at Request._lifecycle (/Users/jfsiii/work/kibana/node_modules/@hapi/hapi/lib/request.js:370:32)
   │ proc [kibana]     at Request._execute (/Users/jfsiii/work/kibana/node_modules/@hapi/hapi/lib/request.js:279:9)
```
</details>

<details><summary>see test added in this PR fail on master</summary>

```
1)    Fleet Endpoints
       reassign agent(s)
         bulk reassign agents
           should allow to reassign multiple agents by id -- some invalid:

      Error: expected 200 "OK", got 500 "Internal Server Error"
```
</details>

## Root cause
Debugging runtime error in `searchHitToAgent` found some TS type mismatches for the ES values being returned. Perhaps from one or more of the recent changes to ES client & Fleet Server. Based on `test:jest` and `test:ftr`, it appears the possible types are `GetResponse` or `SearchResponse`, instead of only an `ESSearchHit`.

https://github.com/elastic/kibana/pull/94632/files#diff-254d0f427979efc3b442f78762302eb28fb9c8857df68ea04f8d411e052f939cL11

While a `.search` result will include return matched values, a `.get` or `.mget` will return a row for each input and a `found: boolean`. e.g. `{ _id: "does-not-exist", found: false }`. The error occurs when [`searchHitToAgent`](1702cf98f0/x-pack/plugins/fleet/server/services/agents/helpers.ts (L11)) is run on a get miss instead of a search hit.

## PR Changes
* Added a test to ensure it doesn't fail if invalid or missing IDs are given
* Moved the `bulk_reassign` tests to their own test section
* Filter out any missing results before calling `searchHitToAgent`, to match current behavior
* Consolidate repeated arguments into and code for getting agents into single [function](https://github.com/elastic/kibana/pull/94632/files#diff-f7377ed9ad56eaa8ea188b64e957e771ccc7a7652fd1eaf44251c25b930f8448R70-R87):  and [TS type](https://github.com/elastic/kibana/pull/94632/files#diff-f7377ed9ad56eaa8ea188b64e957e771ccc7a7652fd1eaf44251c25b930f8448R61-R68)
* Rename some agent service functions to be more explicit (IMO) but behavior maintained. Same API names exported.

This moves toward the "one result (success or error) per given id" approach for https://github.com/elastic/kibana/issues/90437

### 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-16 20:51:57 -04:00
Steph Milovic c497239d55
[Security Solution] [Cases] Move create page components and dependencies to Cases (#94444) 2021-03-16 16:05:30 -06:00
Melissa Alvarez 769243cc98
[ML] Data Frame Analytics accessibility tests: fix flaky outlier creation test (#94735)
* ensure callouts exist before moving to continue button

* unskip ml accessibility suite
2021-03-16 17:49:24 -04:00
Frank Hassanabad 3afaebc49b
[Security Solutions] Remove commented out old linter rules (#94753)
## Summary

Cleanup .. 

* Removes commented out old linter rules from 2+ years ago. The project is very large and a lot of people are in the code base now and the comments are not relevant.
* Removes ts config optimize we don't use anymore
* Removes old script for rules we don't use anymore with elastic searches.
2021-03-16 17:40:09 -04:00
Scotty Bollinger 4aa7036d77
[App Search] Role mappings migration part 2 (#94461)
* Add engines mock and fix mock role mapping

The original asRoleMapping was merely for a smoke test in the shared component. Refactored to work better in App Search component

* Add RoleMappingsLogic

* Fix test description

Co-authored-by: Jason Stoltzfus <jastoltz24@gmail.com>

* Fix test description

Co-authored-by: Jason Stoltzfus <jastoltz24@gmail.com>

* Add flash messages when creating, updating or deleting

* Add path and resetState calls

Refactoring the tests showed me that some parts of the state weren’t being reset.

* Refactor handleAuthProviderChange logic

I some how got the test coverage at 100% with my wrong way of doing tests before (scary). When I fixed it I noticed that noting I could do would trigger the fallback of just returning the `[ANY_AUTH_PROVIDER]` array. After talking with Constance, we could not come up with a way to trigger it either, given the conditions.

She had suggested removing the first return statement but that caused an empty array being returned sometimes.

Ultimately, I was able to get it working and covered with these changes.

* Refactor tests per PR feedback

The places where `role: 'superuser’` was deleted in the listeners was a side effect of using `setRoleMappingData` and not `mount`

* Add back deleted assertion

* Copy nit

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

Co-authored-by: Jason Stoltzfus <jastoltz24@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Constance <constancecchen@users.noreply.github.com>
2021-03-16 17:06:21 -04:00
Yuliia Naumenko 25baa3b558
[Connectors UI] Make UI use new connector APIs (#94180)
* [Connectors UI] Make UI use new connector APIs

* fixed tests

* fixed due to comment

* fixed due to comment

* fixed test

* fixed test

* fixed test

* moved rewrite_request_case to the common folder

* fixed due to comments
2021-03-16 12:59:46 -07:00
James Gowdy 4914acc0d1
[ML] Use indices options in anomaly detection job wizards (#91830)
* [ML] WIP Datafeed preview refactor

* adding indices options to ad job creation searches

* update datafeed preview schema

* updating types

* recalculating wizard time range on JSON edit save

* updating endpoint docs

* fixing types

* more type fixes

* fixing missing runtime fields

* using isPopulatedObject

* adding indices options schema

* fixing test

* fixing schema

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-16 19:54:56 +00:00
Jen Huang 2374af3011
Remove string as a valid registry var type value (#94174)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-16 12:32:02 -07:00
Yuliia Naumenko 21587dc79e
[Alerts] Replaces legacy es client with the ElasticsearchClient for alerts and triggers_actions_ui plugins. (#93364)
* [Alerts] Replaces legasy es client with the ElasticsearchClient

* fixed build

* fixed build

* fixed ci build

* fixed ci build

* fixed infra callCLuster

* fixed infra callCLuster

* fixed infra callCLuster

* fixed ci build

* fixed ci build

* fixed ci build

* fixed infra tests

* fixed security tests

* fixed security tests

* fixed security tests

* fixed tests

* fixed monitoring unit tests

* fixed monitoring unit tests

* fixed type checks

* fixed type checks

* fixed type checks

* migrated lists plugin

* fixed type checks

* fixed tests

* fixed security tests

* fixed type checks

* fixed tests

* fixed type checks

* fixed tests

* fixed tests

* fixed tests

* fixed due to comments

* fixed tests

* fixed comment

* fixed tests

* fixed tests

* fixed searh

* fixed searh

* fixed test

* fixed due to comment

* fixed detections failing test and replaces scopedClusterClient exposure with IScopedClusterClient instead of ElasticsearchClient asCurrentUser

* fixed test

* fixed test

* fixed test

* fixed typecheck

* fixed typecheck

* fixed typecheck

* fixed merge
2021-03-16 12:03:24 -07:00
Tim Sullivan ec41ae3c49
[Reporting-CSV Export] Re-write CSV Export using SearchSource (#88303)
* [Reporting-CSV Export] Re-write CSV Export using SearchSource

* replace PIT solution with scan-and-scroll

* update tests

* cleanup

* simplify pr

* update docs

* update docs

* update telemetry schema

* use getSearchRequestBody instead of flatten

* Revert "update docs"

This reverts commit ab9f4d9642.

* optimize some async calls

* cleanup

* --wip-- [skip ci]

* fix telemetry schema

* fix telemetry tests

* fix snapshot

* api docs

* api doc updates

* use import type

* format the data through chains of maps

* add another saved search to reporting/ecommerce_kibana

* add a failing test

* add error logging to query failures

* put clear scroll in a finally so the ES error can be captured

* log dat error

* set dat fieldsFromSource

* --wip-- [skip ci]

* Revert "add another saved search to reporting/ecommerce_kibana"

This reverts commit 6edf26eff2.

* functional test fixes

* clean up ecommerce test archive

* add test for new search with fieldsFromSource set

* add tests and refactor tests

* cleanup redundant conditionals

* add GenerateCsv.getFields

* fix some tests

* fix double-escaping

* fix test snapshots and refactoring

* fix other tests

* fix test

* fix default index pattern in functional tests

* fix ts and sort fields when they come from API response

* --wip-- [skip ci]

* fix formatting and increase maxSizeBytes for testing

* remove client-side logic for sanitizing fields

* do not prepend timefield name if it already is a column

* test the logic to prepend timeField

* test the logic to sort the fields

* fix functional test

* preserve the error from data.search

* add functional test for ES returning an error

* fix snapshot

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-16 11:54:47 -07:00
Casper Hübertz 70bdb28d79
[APM] Settings: Update layout and update/add descriptions (#94398)
* [APM] Align naming

* [APM] Add agent config description

* [APM] Update layout and styles

* [APM] Update text styles and spacing

* [APM] Updating styles and layout

* [APM] Update layout and styles

* [APM] Update description

* [APM] Update layout and styles

* [APM] Update i18n name

* [APM] Add i18n description

* [APM] Update layout and styles

* Update x-pack/plugins/apm/public/components/app/Settings/CustomizeUI/index.tsx

Co-authored-by: Brandon Morelli <bmorelli25@gmail.com>

* [APM] Update agent config description

* Update x-pack/plugins/apm/public/components/app/Settings/AgentConfigurations/index.tsx

Co-authored-by: Brandon Morelli <bmorelli25@gmail.com>

* [APM] Remove empty state description

Not needed as we have a description by the main title

* [APM] Remove unneeded translations

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Brandon Morelli <bmorelli25@gmail.com>
2021-03-16 19:24:26 +01:00
Tyler Smalley 36ca26d290 skip flaky suite (#94666) 2021-03-16 11:08:02 -07:00
Stratoula Kalafateli a1f15fbe5d
[XY axis] Integrates legend color picker with the eui palette (#90589)
* XY Axis, integrate legend color picker with the eui palette

* Fix functional test to work with the eui palette

* Order eui colors by group

* Add unit test for use color picker

* Add useMemo to getColorPicker

* Remove the grey background from the first focused circle

* Fix bug caused by comparing lowercase with uppercase characters

* Fix bug on complimentary palette

* Fix CI

* fix linter

* Use uppercase for hex color

* Use eui variable instead

* Changes on charts.json

* Make the color picker accessible

* Fix ci and tests

* Allow keyboard navigation

* Close the popover on mouse click event

* Fix ci

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-16 19:36:48 +02:00
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