Commit graph

11491 commits

Author SHA1 Message Date
Shahzad 4aa3920746
[Index Patterns Field Formatter] Added human readable precise formatter for duration (#100540)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-01 14:05:56 +02:00
Marta Bondyra 5da47f8969
[Lens] Reduce lodash footprint (#101029)
* [Lens] extract lodash methods

* remove lodash from files that don't use it
2021-06-01 13:46:13 +02:00
Dmitry Tomashevich 69883de634
[Discover] Add EUIDataGrid to surrounding documents (#99447)
* [Discover] migrate remaining context files from js to ts

* [Discover] get rid of any types

* [Discover] replace constants with enums, update imports

* [Discover] use unknown instead of any, correct types

* [Discover] skip any type for tests

* [Discover] add euiDataGrid view

* [Discover] add support dataGrid columns, provide ability to do not change sorting, highlight anchor doc, rename legacy variables

* [Discover] update context_legacy test and types

* [Discover] update unit tests, add context header

* [Discover] update unit and functional tests

* [Discover] remove docTable from context test which uses new data grid

* [Discover] update EsHitRecord type, use it for context app. add no pagination support

* [Discover] resolve type error in test

* [Discover] add disabling control columns option, change loading feedback

* [Discover] clean up, update functional tests

* [Discover] remove invalid translations

* [Discover] support both no results found and loading feedback

* [Discover] provide loading status for discover

* [Discover] fix functional test

* [Discover] add useDataGridColumns test, update by comments

* [Discover] fix types

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-01 14:29:01 +03:00
Felix Stürmer f7698bd8aa
[Observability] Expose options to customize sidebar route matching (#100886)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-01 11:21:29 +02:00
Joe Reuter 79fa4f405b
[Lens][Dashboard] Share session between lens and dashboard (#100214) 2021-05-31 11:14:31 +02:00
Esteban Beltran 2281e9da5e
[Security Solution] Add modified at and modified by fields to the trusted apps card (#100868)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-31 10:08:53 +02:00
CJ Cenizal 1c5b302fea
Remove license check from Index Management (#100188) 2021-05-28 17:19:40 -07:00
CJ Cenizal 67b8a43684
Remove license check from Ingest Node Pipelines UI (#100189) 2021-05-28 17:13:09 -07:00
James Gowdy e93c18fea7
[ML] Fixing management app race condition (#100785)
* [ML] Fixing management app race condition

* updating test id

* translation id

* adding link to license page

* fixing tests

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-28 21:23:10 +01:00
Cauê Marcondes 0bcd78b0e9
[APM] Move APM tutorial from apm_oss to x-pack/apm (#100780)
* Register tutorial on APM plugin

* using files from apm

* removing tutorial from apm_oss

* removing export

* fixing i18n

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-28 15:43:30 -04:00
Dima Arnautov d50a3db2b1
[ML] Severity control for Anomaly timeline (#99489) 2021-05-28 21:34:29 +02:00
Garrett Spong 4c48993bb0
[RAC][Security Solution] Register Security Detection Rules with Rule Registry (#96015)
## Summary

This PR starts the migration of the Security Solution rules to use the rule-registry introduced in https://github.com/elastic/kibana/pull/95903. This is a pathfinding effort in porting over the existing Security Solution rules, and may include some temporary reference rules for testing out different paradigms as we move the rules over. See https://github.com/elastic/kibana/issues/95735 for details


Enable via the following feature flags in your `kibana.dev.yml`:

```
# Security Solution Rules on Rule Registry
xpack.ruleRegistry.index: '.kibana-[USERNAME]-alerts' # Only necessary to scope from other devs testing, if not specified defaults to `.alerts-security-solution`
xpack.securitySolution.enableExperimental: ['ruleRegistryEnabled']
```

> Note: if setting a custom `xpack.ruleRegistry.index`, for the time being you must also update the [DEFAULT_ALERTS_INDEX](9e213fb7a5/x-pack/plugins/security_solution/common/constants.ts (L28)) in order for the UI to display alerts within the alerts table.

---

Three reference rule types have been added (`query`, `eql`, `threshold`), along with scripts for creating them located in:

```
x-pack/plugins/security_solution/server/lib/detection_engine/reference_rules/scripts/
```

Main Detection page TGrid queries have been short-circuited to query `.alerts-security-solution*` for displaying alerts from the new alerts as data indices.

To test, checkout, enable the above feature flag(s), and run one of the scripts from the above directory, e.g.  `./create_reference_rule_query.sh` (ensure your ENV vars as set! :)


Alerts as data within the main Detection Page 🎉 
<p align="center">
  <img width="500" src="https://user-images.githubusercontent.com/2946766/119911768-39cfba00-bf17-11eb-8996-63c0b813fdcc.png" />
</p>




cc @madirey @dgieselaar @pmuellr @yctercero @dhurley14 @marshallmain
2021-05-28 12:38:49 -06:00
Constance 8529040a92
[Enterprise Search] Log warning for Kibana/EntSearch version mismatches (#100809)
* Add server log warnings whenever Kibana and Enterprise Search versions are mismatched

* Copy feedback
2021-05-28 10:57:30 -07:00
Pete Harverson 5dbec05289
[ML] Fix categorization job view examples link when datafeed uses multiple indices (#100789)
* [ML] Fix categorization job view examples link when datafeed uses multiple indices

* [ML] Fix operator in index pattern check

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-28 17:43:44 +01:00
Nathan L Smith a00fa53000
Fix bug with Observability > APM header navigation (#100845)
Call `setHeaderActionMenu(undefined)` when the HeaderMenuPortal is unmounted.

Found this line in the docs:

> Calling the handler with `undefined` will unmount the current mount point.

Which we weren't doing before.

Previous behavior:

* Go to /app/observability/alerts
* Click the "View in app" button for an APM alert
* Click back
* Click the "View in app" button for an APM alert
* Get a weird toast error message and the header menu is gone forever

Now:

* Go to /app/observability/alerts
* Click the "View in app" button for an APM alert
* Click back
* Click the "View in app" button for an APM alert
* Get a working header menu

Fixes #97140
2021-05-28 11:10:14 -05:00
David Sánchez cec62cb706
[Security Solution][Endpoint] Add event filters summary card to the fleet endpoint tab (#100668)
* Shows event filters card on fleet page

* Uses aggs instead of while loop to retrieve summary data

* Add request and response types in the lists package

* Fixes old import

* Removes old i18n keys

* Removes more old i18n keys

* Use consts for exception lists url and endpoint event filter list id

* Uses event filters service to retrieve summary data

* Fixes addressed pr comments such as changing the route without underscore, adding aggs type, validating response, and more

* Uses useMemo instead of useState to memoize object

* Add new e2e test for summart endpoint

* Handle api errors on event filters and trusted apps summary api calls

* Add api error message to the toast

* Fix wrong i18n key

* Change span tag by react fragment

* Uses styled components instead of modify compontent style directly and small improvements on test -> ts

* Adds curls script for summary route

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-28 18:07:54 +02:00
ymao1 b4e8cfe0d7
[Actions] Taking space id into account when creating email footer link (#100734)
* Taking space id into account when creating email footer link

* Handling undefined space when spaces is disabled

* Handling undefined space when spaces is disabled

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-28 11:56:51 -04:00
Marshall Main 7f6d7b3642
[Security Solution] Improve find rule and find rule status route performance (#99678)
* Fetch rule statuses using single aggregation instead of N separate requests

* Optimize _find API and _find_statuses

* Merge alerting framework errors into rule statuses

* Add sortSchema for top hits agg, update terms.order schema

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-28 11:49:49 -04:00
Nicolas Chaulet a0622d51da
[Fleet] Improve combo box for fleet settings (#100603) 2021-05-28 11:25:20 -04:00
Paul Tavares e3517edd22
[Security Solution][Endpoint] Endpoint generator and data loader support for Host Isolation (#100813)
Re-introduces the changes from #100727 which was backed out due to a bug. Changes included:

* Generate random isolation values for endpoint metadata
* Generator for Fleet Actions
* Added creation of actions to the index test data loader

Plus:

* Fix generator `randomBoolean()` to ensure it works with seeded random numbers
* Update resolver snapshots due to additional call to randomizer
2021-05-28 10:40:34 -04:00
ymao1 c0f9970a55
[Alerting] Adding feature flag for enabling/disabling rule import and export (#100718)
* Adding feature flag for enabling rule import and export

* Removing item from docs

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-28 09:52:58 -04:00
Marco Liberati 51616e1b8d
[Lens] Adds dynamic table cell coloring (#95217)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Greg Thompson <thompson.glowe@gmail.com>
Co-authored-by: Michael Marcialis <michael@marcial.is>
2021-05-28 15:24:28 +02:00
Esteban Beltran 4b486d3d1a
[Security Solution][Endpoint] Do not display searchbar in security-trusted apps if there are no items (#100853)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-28 15:19:15 +02:00
Alison Goryachev 90e43431a5
[Infra] Update LogStream component docs (#100795) 2021-05-28 08:42:44 -04:00
Søren Louv-Jansen 79945fe027
[Observability] Fix typo in readme for new navigation (#100861)
* [Observability] Fix typo in readme for new navigation

* Add rxjs dep
2021-05-28 14:41:42 +02:00
Marta Bondyra a4f6d43783
[Lens] Move app state to redux toolkit (#100338) 2021-05-28 10:06:06 +02:00
Marta Bondyra 48f7a479b5
[Lens] fix error when adding a new layer (#100766)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-28 00:24:38 +02:00
Yuliia Naumenko 134a3def03
[Actions] Converted rejectUnauthorized config usages to verificationMode. (#100179)
* [Actions] Converted `rejectUnauthorized` config usages to `verificationMode`.

* added new verificationMode config options for tls, proxy tls and custom hosts

* added unit tests

* added unit tests

* added kibana docker

* Apply suggestions from code review

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

* Update alert-action-settings.asciidoc

* Apply suggestions from code review

Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com>

* removed legacyRegectUnauthorized logic from getNodeTLSOptions

* added deprecations

* fixed doc links

* fixed docs

* Update x-pack/plugins/actions/server/builtin_action_types/lib/send_email.ts

Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com>

* [DOCS] Fixes build error

* fixed deprecations to set custom message

* fixed doc

* changed to not throw exception on non existing verification mode

* added tests

* fixed tests

* fixed tests

* added integration tests for legacy rejectUnauthorized fale

* fixed tests

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com>
Co-authored-by: lcawl <lcawley@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-27 14:20:57 -07:00
Craig Chamberlain 697b00f7d5
Fixes Field used in RDP ML job to event.type (#100000)
* Update datafeed_windows_rare_user_type10_remote_login.json

refactor df query to work with newer field values

* Update datafeed_windows_rare_user_type10_remote_login.json

remove event.code test - was failing a test on the build server using the original data b/c this field was not there when the query was first developed.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-27 16:45:56 -04:00
Zacqary Adam Xeper 780d23e7af
[Fleet] Link to docs for Fleet Server and ES hosts (#100698)
* [Fleet] Link to docs for Fleet Server and ES hosts

* Fix CN/JP i18n

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-27 15:11:58 -05:00
Jason Stoltzfus be001f2aa6
[App Search] Added a query tester button (#100560) 2021-05-27 15:39:16 -04:00
Devon Thomson ca82b9b10a
[Lens] By Value Migrations for 7.13 (#100622)
* quick fix for 7.13 lens migration not being run on by value panels

Co-authored-by: Joe Reuter <johannes.reuter@elastic.co>
2021-05-27 15:37:58 -04:00
Casper Hübertz de2f3c468a
[Observability] Fix README.md link to component (#100801) 2021-05-27 21:27:16 +02:00
Pete Hampton 3149d46301
Remove / Consolidate legacy usage adoption metrics (#100480)
* Remove legacydetection rule stat summaries

* Remove ML usage summary and consolidate with ML metric telemetry.

* Remove ML usage summary and consolidate with ML metric telemetry.

* Move legacy helper constructs into index.

* Separate rule logic from ml logic. Add ml unit tests.

* Abstract types away into their own file.

* Update telemetry schema.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-27 20:10:01 +01:00
ymao1 71379b755a
[Alerting] Split alerting feature privilege between rules and alerts and handle subfeature privilege specification (#100127)
* WIP - creating alerting authorization client factory and exposing authorization client on plugin start contract

* Updating alerting feature privilege builder to handle different alerting types

* Passing in alerting authorization type to AlertingActions class string builder

* Passing in authorization type in each function call

* Passing in exempt consumer ids. Adding authorization type to audit logger

* Changing alertType to ruleType

* Changing alertType to ruleType

* Updating unit tests

* Updating unit tests

* Passing field names into authorization query builder. Adding kql/es dsl option

* Converting to es query if requested

* Fixing functional tests

* Removing ability to specify feature privilege name in constructor

* Fixing some types and tests

* Consolidating alerting authorization kuery filter options

* Cleanup and tests

* Cleanup and tests

* Initial commit with changes needed for subfeature privilege

* Throwing error when AlertingAuthorizationClientFactory is not defined

* Renaming authorizationType to entity

* Renaming AlertsAuthorization to AlertingAuthorization

* Fixing unit tests

* Changing schema of alerting feature privilege

* Changing schema of alerting feature privilege

* Updating feature privilege iterator

* Updating feature privilege builder

* Fixing types check

* Updating privilege string terminology

* Updating privilege string terminology

* Wip

* Fixing unit tests

* Unit tests

* Updating README and removing stack subfeature privilege changes

* Fixing README

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-27 14:59:02 -04:00
Nathan Reese 8420605352
[Maps] timeslider (#99661)
* [Maps timeslider]

* just arrowLeft and arrowRight icons

* tslint

* color icon when timeslider is open, auto select first section on open

* increase width to prevent timeslider from changing sizes during interaction

* fix filters disappearing when timeslice advances

* use shorter date format for ticks

* review feedback

* do not show timeslider button when map is embedded

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-27 12:32:13 -06:00
Jonathan Budzenski 5dde07ff6f Revert "[Security solution][Endpoint] Add Host Isolation related data to the endpoint generator and test data loader (#100727)"
This reverts commit 57f59bd15d.
2021-05-27 12:21:48 -05:00
Paul Tavares 57f59bd15d
[Security solution][Endpoint] Add Host Isolation related data to the endpoint generator and test data loader (#100727)
* Generate random isolation values for endpoint metadata
* Generator for Fleet Actions
* Added creation of actions to the index test data loader
2021-05-27 11:55:50 -04:00
Georgii Gorbachev 7fd6539dca
[RAC] Rule monitoring: Event Log for Rule Registry (#98353)
**Needed for:** rule execution log for Security https://github.com/elastic/kibana/pull/94143
**Related to:**

- alerts-as-data: https://github.com/elastic/kibana/issues/93728, https://github.com/elastic/kibana/issues/93729, https://github.com/elastic/kibana/issues/93730
- RFC for index naming https://github.com/elastic/kibana/issues/98912

## Summary

This PR adds a mechanism for writing to / reading from / bootstrapping indices for RAC project into the `rule_registry` plugin. Particularly, indices for alerts-as-data and rule execution events. This implementation is similar to existing implementations like `event_log` plugin (see https://github.com/elastic/kibana/pull/98353#issuecomment-833045980 for historical perspective), but we're going to converge all of them into 1 or 2 implementations. At least we should have a single one in `rule_registry` itself.

In this PR I tried to incorporate most of the feedback received in the RFC (https://github.com/elastic/kibana/issues/98912), but if you notice I missed/forgot something, please let me know in the comments.

Done in this PR:

- [x] Schema-agnostic APIs for working with Elasticsearch.
- [x] Schema-aware log definition and bootstrapping API (creating hierarchical logs).
- [x] Schema-aware write API (logging events).
- [x] Schema-aware read API (searching logs, filtering, sorting, pagination, aggregation).
- [x] Support for Kibana spaces, space-aware index bootstrapping (either at rule creation or rule execution time).

As for reviewing this PR, perhaps it might be easier to start with:

- checking description of https://github.com/elastic/kibana/issues/98912
- checking usage examples https://github.com/elastic/kibana/pull/98353/files#diff-c049ff2198cc69bd50a69e92d29e88da7e10b9a152bdaceaf3d41826e712c12b
- checking public api https://github.com/elastic/kibana/pull/98353/files#diff-8e9ef0dbcbc60b1861d492a03865b2ae76a56ec38ada61898c991d3a74bd6268

## Next steps

Next steps towards rule execution log in Security (https://github.com/elastic/kibana/pull/94143):

- define actual schema for rule execution events
- inject instance of rule execution log into Security rule executors and route handlers
- implement actual execution logging in rule executors
- update route handlers to start fetching execution events and metrics from the log instead of custom saved objects

Next steps in the context of RAC and unified implementation:

- converge this implementation with `RuleDataService` implementation
  - implement robust index bootstrapping
  - reconsider using FieldMap as a generic type parameter
  - implement validation for documents being indexed
- cover the final implementation with tests
- write comprehensive docs: update plugin README, add JSDoc comments to all public interfaces
2021-05-27 18:28:19 +03:00
Shahzad 413132008b
[Uptime] Waterfall use different styling for number (#97216)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-27 17:01:52 +02:00
Felix Stürmer 06d276e060
[Logs UI] Add shared observability page template and navigation (#99380)
Co-authored-by: Kerry Gallagher <471693+Kerry350@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-27 16:58:15 +02:00
Nathan L Smith 7fc4a1f80f
Add kibana.yml configuration for cases (#100583)
Make it so `xpack.observability.unsafe.alertingExperience.enabled` only shows and hides the Alerts page, and `xpack.observability.unsafe.cases.enabled` show and hides the Cases page.
2021-05-27 09:43:12 -05:00
Candace Park 1c4d338668
[Security Solution][Endpoint][Host Isolation] User can unisolate host from alert details (#100401) 2021-05-27 09:32:32 -04:00
Joe Reuter f6266c431b
[Lens] Improve caching with more stable Elasticsearch requests (#100414) 2021-05-27 15:25:10 +02:00
Patrick Mueller 11b3ab167d
[alerting] add ignore_above to alerts params mappings to handle immense params (#100726)
resolves https://github.com/elastic/kibana/issues/100607

This fixes a problem when very large parameters (over 32K bytes) are saved with
an alert.  Before this fix, an error from elasticsearch would be thrown with
the following message, and a 400 returned from create (and presumably update).

    Document contains at least one immense term in field=\"alert.params\"
    (whose UTF8 encoding is longer than the max length 32766), all of which
    were skipped.

After the fix, alerts with immense params can be saved and executed.

Note that the immense params will not be searchable, since they won't be indexed,
but that seems both unavoidable, and not a severe issue.
2021-05-27 09:17:12 -04:00
Alejandro Fernández Gómez 83e5b6c689
[Fleet] Remove beats management plugin (#99789) 2021-05-27 11:30:15 +02:00
Thomas Neirynck 5da329a809
[Maps] Isolate mapbox-gl types and align downstream package versions. (#100610) 2021-05-26 21:09:38 -04:00
Tim Sullivan 417c06b9a1
[Reporting] Use the deprecations service to advise critical config changes (#100427)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-26 17:31:55 -07:00
Mikhail Shustov 881d89fba7
remove src/legacy and src/optimizer from configs (#100538)
* cleanup removed dirs

* delete removed folders from other places in the repo

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-26 22:01:33 +02:00
Justin Kambic b189d05bc3
[Uptime] Move uptime actions to Header Actions Menu (#100298)
* Move uptime actions to Kibana's HeaderActionsMenu.

* Delete a comment.

* Extract ActionMenu content to dedicated component to make testing easier.

* Add tests.

* Use `EuiHeaderLinks` instead of `EuiFlexItem`.

* Clean up tests.

* Prefer `getByRole` for a test.

* Fix copy mistake.

* Fix a test broken by the previous commit.

* Prefer `EuiHeaderSectionItem` over `EuiHeaderSectionLink` to avoid nesting `button`s within `buttons`.

* Reverse "Settings" and "Alerts" menu options to make them uniform with APM.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-26 15:31:15 -04:00
Jen Huang ba7c0275ca
[Fleet] Support browsing granular integrations (#99866)
* Manual cherry pick of work to support integration tiles and package-level vars

* Fix types

* Remove registry input group typings

* Show integration-specific readme, title, and icon in package details page

* Revert unnecessary changes

* Add package-level `vars` field to package policy SO mappings

* Fix types

* Fix test

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-26 09:59:09 -07:00
Pete Harverson f77ff2d396
[ML] Adds functional tests for anomaly detection job custom URLs (#100455)
* [ML] Adds functional tests for anomaly detection job custom URLs

* [ML] Remove debug test tag from custom URL tests

* [ML] Update custom URL editor Jest snapshots

* [ML] Clean up in embeddables tests to fix dashboard test

* [ML] Delete test dashboard after test suites complete

* [ML] Edits to custom URL tests following review

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-26 17:48:03 +01:00
Ignacio Rivas ae63fb1c17
[Ingest pipelines] add support for fingerprint processor (#100541) 2021-05-26 18:29:05 +02:00
Thomas Neirynck c5aa39835d
[Maps] Add draw wizard (#100278) 2021-05-26 11:21:38 -04:00
Nathan Reese e49db7127d
[Maps] filter dashboard by map extent (#99860)
* [Maps] filter dashboard by map extent

* clean up

* remove warning from filter pill

* tslint

* API doc updates, i18n fixes, tslint

* only show context menu option in edit mode

* add functional test

* review feedback

* do not use search session when filtering by map bounds

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-26 08:51:39 -06:00
Stratoula Kalafateli 638ab8247b
[Gauge] Fixes wrong translations on ranges less than symbol (#100535) 2021-05-26 16:02:28 +03:00
Larry Gregory 5d5cc55b3a
Fix spaces test flakyness (#100605) 2021-05-26 06:47:28 -04:00
Ignacio Rivas 93acfb4d43
[Ingest pipelines] add support for ip type in convert processor (#100531)
* add ip option type to convert processor

* remove duped option

* small CR changes

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-26 11:36:06 +02:00
Mikhail Shustov f915b6fe73
[telemetry] report config deprecations (#99887)
* return the list of changes config keys during deprecation

* gather changed config keys in the core

* adjust Security plugin deprecations tests

* update docs

* update interface

* update telemetry schema

* update spaces tests

* update tests in other x-pack plugins

* remove testing instruction

* improve tests. get rid of snapshots
2021-05-26 10:57:01 +02:00
Yuliia Naumenko 5ebded2105
[triggersActionsUi] Reduce page load bundle to under 100kB (#97770)
* [triggersActionsUi] Reduce page load bundle to under 100kB

* removed old code

* removed fragment

* changed svg logo to lazy react components

* fixed type checks and translations

* fixed type checks

* fixed type checks

* fixed type checks

* fixed tests

* fixed tests

* fixed iconClass

* fixed due to comments

* added info about new IconType to readme file

* fixed key errors
2021-05-25 19:00:29 -07:00
Nathan Reese b30d96e7f2
[Maps] convert LayerPanel to typescript (#100481)
* [Maps] convert LayerPanel to typescript

* layer_errors

* style panel

* layer_panel component

* rename to EditLayerPanel

* clean up

* fix scss imports for rename

* one more scss path clean up

* fix EditLayerPanel errors
2021-05-25 13:25:18 -06:00
Alison Goryachev a0ddca8b07
[Upgrade Assistant] Address copy feedback (#99632) 2021-05-25 14:14:08 -04:00
Nathan L Smith e61c6660f7
Open/Closed filter for observability alerts page (#99217) 2021-05-25 12:40:14 -05:00
Frank Hassanabad 5dc85c69b7
One liner to expose the EQL query for debugging for users (#100565)
## Summary

Expose the EQL query in the Kibana logs for detections when they are being run when Kibana in debug mode.
2021-05-25 13:35:52 -04:00
Stratoula Kalafateli d8c2594789
[XY] [Lens] Adds opacity slider (#100453)
* [XY] Add opacity slider and dots size slider

* [Lens] Adds fill opacity slider

* Make the new sliders to appear fullwidth

* Change property name and fix unit tests

* Add a comment

* useDebouncedValue hook

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-25 18:56:29 +03:00
Jean-Louis Leysens 662fe74757
[Reporting] ILM policy for managing reporting indices (#100130)
* wip; added logic for creating ILM policy at start up

* added log when ilm policy is not created

* added test for start function

* updated ilm policy to not delete data

* actually update jest snapshots and remove unused import

* updated the ilm policy, removed the min_age for the hot phase

* update jest snapshot

* removed TODO comment

* debug log -> info log

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-25 17:02:48 +02:00
Thomas Neirynck 73b6048ba1
[Maps][Vega] Isolate mapbox-gl library into bazel package (#99931) 2021-05-25 09:51:57 -04:00
David Sánchez ca324c63be
Removes event filters feature flag and exposes this feature by default (#100389)
* Removes event filters feature flag and expose this feature by default

* Fixes manifest unit test

* Fixes functional test adding event filter list case

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-25 15:19:42 +02:00
Sandra Gonzales 60b5c842cd
[Metrics UI] use EuiTooltip to control tooltip component and simplify ConditionalTooltip (#99224)
* use EuiTooltip to control tooltip component

* fix style

* update unit tests

* add functional waffle map tooltip tests

* remove reload() from useEffect

* fix type

* update unit test
2021-05-25 08:51:24 -04:00
Sergi Massaneda 206a64fc4c
[Security Solution] Application register deepLinks instead of meta.searchDeepLinks (#100129)
* refactor meta.searchDeepLinks to deepLinks and remove meta

* remove comments

* obsolete snapshot removed

* documentation updated

* [deepLinks] refactor ml nav ids and translation keys

* flaky test fix attempt [sync with glo]

* default deepLinks navLinkStatus

* api_docs restored

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-25 14:49:51 +02:00
Frank Hassanabad aa2f5b535d
[Security Solution] Utilizes constants package and deletes duplicate code (#100513)
## Summary

Utilizes constants package and deletes duplicate code

* Renames the `securitysolution-constants` to be `securitysolution-list-constants` to be specific
* Deletes duplicated code found during cleanup
* Moves more tests into the packages found along the way with the duplicated code
* Moves `parseScheduleDates` from `@kbn/securitysolution-io-ts-types` to `@kbn/securitysolution-io-ts-utils`

### 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-05-24 18:38:14 -06:00
Zacqary Adam Xeper 676d40ebbe
[Fleet] Add clear button to search input bars (#100476) 2021-05-24 17:30:18 -05:00
Zacqary Adam Xeper 71acd98082
[Fleet] Add color distinction between offline and inactive agents (#100490) 2021-05-24 17:30:06 -05:00
Zacqary Adam Xeper f95bbb38c9
[Fleet] Fix incomplete agent count message on policy tab (#100497) 2021-05-24 17:29:27 -05:00
Jen Huang cc9c5be022
[Fleet] Pass policy namespace to agent monitoring settings (#100500)
* Pass agent policy namespace to agent monitoring settings

* Adjust copy
2021-05-24 18:02:23 -04:00
ymao1 eb0deac8d0
[Alerting] Update README (#100478)
* Updating readme

* Updating readme

* Fix plugin list docs
2021-05-24 16:24:15 -04:00
Josh Dover c9f7ab3f72
Remove chrome.navLinks.update (#99633) 2021-05-24 13:00:45 -05:00
Quynh Nguyen 9793a8fefb
[ML] Fix missing selected-interval styling for Explorer anomaly charts and mismatched scheduled markers styling (#100272)
* [ML] Fix missing selected-interval sass

* [ML] Only show interval box in explorer page and not in dashboard

* [ML] Remove console

* [ML] Move showSelectedInterval up

* [ML] Update snapshot

* [ML] Update styling of scheduled events to match and to be visible

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-24 11:56:09 -05:00
Pete Hampton bb6c2ef3d0
Add remaining descriptions to security usage telemetry schema. (#100454) 2021-05-24 10:41:19 -06:00
Mikhail Shustov 95e8eed7d1
security solution and lists to TS incremental builds (#100447)
* lists to ts incremental builds

* security_solution to ts incremental

* import ResizeObserver explicitly as it is not declared in dom types
2021-05-24 16:34:29 +02:00
ymao1 496999fbfc
[Alerting] Passing additional rule fields to rule executor (#99819)
* Passing additional rule fields to rule executor

* Fixing types check

* Api docs

* Adding enabled and actions

* Api docs

* Encapsulating rule information into RuleConfig type

* Functional tests

* Functional tests

* Adding producer, ruleTypeId and ruleTypeName

* Api docs

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-24 10:25:52 -04:00
Paul Tavares 093044f10f
[Security Solution][Endpoint] Add host isolation action to the endpoint list (#100240)
* Refactor TableRowAction into separate component and enable menu close on item click
* add `show=isolate` to valid url param string for details panel
* Reusable BackToEndpointDetailsFlyoutSubHeader component
* new FlyoutBodyNoTopPadding compoent + refactor Policy response to use it
* Endpoint Isolate flyout panel
* New Service for doing isolate/unisolate of hosts
* Refactor detection isolate API call to use common method from new service
2021-05-24 09:50:21 -04:00
Lukas Olson f728b222e6
[data.search] Add Kibana request to search strategy dependencies (#98566)
* [data.search] Add Kibana request to search strategy dependencies

* Don't register internal strategy

* Update docs
2021-05-20 14:10:12 -07:00
Frank Hassanabad 192c8ba743
Adds two more packages and moves files into the packages (#100375)
## Summary

* Adds package `kbn-securitysolution-list-api`
* Adds package `kbn-securitysolution-list-hooks`
* Moves files into the packages
* Moves a few additional types into the other packages such as the `kbn-securitysolution-io-ts-types` package to remove more things from the shard_export/shared_import between lists and security solution
* Removes more duplicated code

### 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-05-20 12:36:07 -06:00
Alison Goryachev 3523a937f6
[CCR] Replace EuiCodeEditor with EuiCodeBlock (#100122) 2021-05-20 14:05:42 -04:00
Pete Hampton 97b6d1eca8
Add ML usage collector descriptions to the schema. (#100387)
* Add ML usage collector descriptions to the schema.

* Update the telemetry mappings file
2021-05-20 08:39:50 -06:00
Jen Huang 320c9e0198
Add back install button for integrations that aren't installed yet (#100370) 2021-05-20 06:04:41 -07:00
Pete Hampton 59adbb069e
Refactor away from expected error. Handle 404 as any other error. (#100383) 2021-05-20 14:02:05 +01:00
Ignacio Rivas e62887b9d7
[Ingest pipelines] fix default paramenter for ignore_missing in csv processor (#100316)
* fix: set ignoreMissingField to true by default
* Add missing serializer to trim fieldConfig

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-20 14:56:52 +02:00
Alison Goryachev f3f08ff1f6
Rename client integration test folders (#100119) 2021-05-20 08:54:47 -04:00
Michael Dokolin cb0c584c0b
[Reporting] Add logging of CPU usage and memory consumption by Chromium (#99109)
* Add logging of CPU usage by chromium
* Add logging of memory consumption by chromium
* Add PDF report byte length logging
* Add PNG report byte length logging
2021-05-20 11:51:16 +02:00
Pierre Gayvallet 8ee78d393e
remove ui settings client-side validation (#100311)
* remove ui settings client-side validation

* fix linter

* fix tests

* update generated doc
2021-05-20 11:40:57 +02:00
Pierre Gayvallet 8fc9115a6d
Migrate joi to 17.4.0 and adapt the codebase (#99899)
* bump joi to 17.4.0, start adapting stuff

* remove custom validation rule, adapt instead

* fix error handling

* fix error handling again

* fix strings type & validation

* fix buffers and arrays

* fix bytes

* fix bytes_size type

* update conditional_type error messages in tests

* fix duration and map types

* first attempt to fix union type error messages

* revert conditional type assertions back to master state

* fix object type

* fix record type

* fix stream types

* rename test files to match sources

* fix union type tests

* temporary adapt feature/home usages of Joi

* fix lint

* adapt test assertion

* fix http config schema validation

* fix @kbn/test Config class

* fix config again

* fix reporting schema tests

* fix security solution schema

* adapt url tests

* remove useless comment

* remove space

* typo

* review comments
2021-05-20 10:55:59 +02:00
Frank Hassanabad 9bf488e826
[Security Solutions] Re-arranges and adds more packages to remove copied code (#100310)
## Summary

* Creates a `securitysolution-list-utils` packaged and moves the first set of utilities into there
* Fixes a slight bug with `kbn-securitysolution-io-ts-list-types` where the wrong name was used
* Moves _all_ of the lists schemas and types into the package `kbn-securitysolution-io-ts-list-types`
* Removes copied code found in a few places

## Tech debt
* Some spots I have to use an `any` in the package as Kibana kbn packages don't have the types I need
* Some spots I copy constants until we can straighten out those pieces.
* I keep copied mock files until we figure out how to share mocks from these packages without adding weight or we create dedicated mock packages for all of this. 


### 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-05-19 15:59:52 -06:00
Kevin Logan 00479968a1
[Security Solution] Add linux malware config options and migration (#100166) 2021-05-19 17:37:43 -04:00
Aleh Zasypkin c6e8ee2268
Cleanup package.json resolutions. (#99456) 2021-05-19 16:39:52 -04:00
Kevin Logan 9da1a707d7
[Security Solution] Add supported field to ransomware (#100135) 2021-05-19 11:43:18 -04:00
Thomas Neirynck ef42620624
[Maps] Add grid-resolution telemetry (#99808) 2021-05-19 11:37:59 -04:00
Larry Gregory 4256c18230
Remove circular dependency between features and security (#100206)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-19 11:33:44 -04:00
Larry Gregory 907203d68e
Ban use of lodash.template (#100277)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-19 10:06:52 -04:00
Jean-Louis Leysens f97aad30f4
[Screenshot mode] Create plugin to provide "screenshot mode" awareness (#99627)
* initial version of the screenshot mode service

* First iteration of client side of screenshot mode plugin

Also hooked it up to the chromium browser imitating the preload
functionality of electron to set up the environment before
code runs.

* First implementation of server-side logic for detecting
screenshot mode

* fix some type issues and do a small refactor

* fix size limits, docs and ts issues

* fixed types issues and made sure screenshot mode is correctly detected on the client

* Moved the screenshot mode header definition to common
Added a server-side example for screenshot mode
Export the screenshot mode header in both public and server

* move require() to screenshotMode plugin

* Update chromium_driver.ts

* cleaned up some comments, minor refactor in ReportingCore and
changed the screenshotmode detection function to check for a
specific value.

* fix export

* Expanded server-side screenshot mode contract with function that
checks a kibana request to determine whether we in screenshot
mode

* added comments to explain use of literal value rather than external reference

* updated comment

* update reporting example

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Timothy Sullivan <tsullivan@elastic.co>
Co-authored-by: Tim Sullivan <tsullivan@users.noreply.github.com>
2021-05-19 16:03:27 +02:00
Nathan Reese 2a84b428b5
[Maps] convert TooltipControl to typescript (#100059)
* [Maps] convert ToolbarControl to typescript

* fix scss import

* remove unused function from APM map tooltip

* apm tslint

* pass loadFeatureGeometry to renderTooltipContent

* security_solution: pass mbProperties to loadFeatureProperties

* security_solution tslint

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-18 17:17:42 -06:00
ymao1 0f0cee2510
[Alerting] Refactor alerts authorization client (#99078)
* WIP - creating alerting authorization client factory and exposing authorization client on plugin start contract

* Updating alerting feature privilege builder to handle different alerting types

* Passing in alerting authorization type to AlertingActions class string builder

* Passing in authorization type in each function call

* Passing in exempt consumer ids. Adding authorization type to audit logger

* Changing alertType to ruleType

* Changing alertType to ruleType

* Updating unit tests

* Updating unit tests

* Passing field names into authorization query builder. Adding kql/es dsl option

* Converting to es query if requested

* Fixing functional tests

* Removing ability to specify feature privilege name in constructor

* Fixing some types and tests

* Consolidating alerting authorization kuery filter options

* Cleanup and tests

* Cleanup and tests

* Throwing error when AlertingAuthorizationClientFactory is not defined

* Renaming authorizationType to entity

* Renaming AlertsAuthorization to AlertingAuthorization

* Fixing unit tests

* Updating privilege string terminology

* Updating privilege string terminology

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-18 18:32:43 -04:00
Frank Hassanabad 79b2c5826a
[Security Solutions] Removes commented out "last look back date" code (#100269)
## Summary

* Removes commented out code which promises we are going to do something past 7.11. This code has been checked in and the column of `last_look_back_date` has been removed since 7.11, which means we haven't had it for 7.11, 7.12, and now 7.13.

Related: https://github.com/elastic/kibana/pull/89801
2021-05-18 13:25:23 -04:00
Tim Sullivan 7369a48de0
[Reporting] Switch Mac Chromium to the internally-hosted custom build (#100165) (#100232)
* switch mac chromium download location to kibana team gcs

* oops, fix the path to the binary

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

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-18 19:03:39 +02:00
David Sánchez ebc4cfc246
[Security Solutions][Endpoint] Fixes weird 'flash' when entries does not exists on event filters page (#100203)
* Fixes weird 'flash' when entries does not exists on event filters page. Also fixes a multilang and query when empty string

* Removes old comment

* Use function to retrieve async resource state

* Fix unit test

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-18 18:37:48 +02:00
Claire Burn 6f31c10baf
Update detection rule telemetry field name. (#100256)
* Changing variable name of cases_count_daily to cases_count_total.

* Taking comments out of tests and reverting tests to previosu state.

* Changing meta description to be more descriptive.

* Changing meta description to be more descriptive.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-18 10:10:06 -06:00
Thomas Neirynck 85a515ac15
[Maps] Allow layers to be excluded from fit to data (#100098) 2021-05-18 11:43:01 -04:00
Stratoula Kalafateli 3926331633
[Timelion] Changes the version of removal message (#100022)
* Change the version of timelion removal on our documentation and warnings

* Remove translations in order to be revisited

* Remove double

* Update docs/user/dashboard/timelion.asciidoc

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

* Update src/plugins/timelion/public/components/timelion_deprecation.tsx

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

* Update src/plugins/timelion/server/deprecations.ts

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

* Update src/plugins/timelion/server/deprecations.ts

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

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-18 17:33:56 +03:00
Thom Heymann 574b4559e7
Simplify deleting spaces (#99960)
* Simplify deleting spaces

* Fixed i18n

* Fix functional tests

* Update x-pack/plugins/spaces/public/management/spaces_management_app.tsx

Co-authored-by: Larry Gregory <lgregorydev@gmail.com>

* Fix snapshots

Co-authored-by: Larry Gregory <lgregorydev@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-18 11:37:18 +01:00
Joe Reuter 3c166a1472
[Lens] Specify Y axis extent (#99203) 2021-05-18 12:36:35 +02:00
Mikhail Shustov 574f6595ad
Migrate from Joi to @kbn/config-schema in "home" and "features" plugins (#100201)
* add a link for issue to remove circular deps

* features: migrate from joi to config-schema

* update tests

* migrate home tutorials to config-schema

* migrate home dataset validation to config schema

* remove unnecessary type. we cannot guarantee this is a valid SO

* address Pierres comments
2021-05-18 06:33:16 -04:00
Marta Bondyra 15abf24339
[Lens] Debounce axis name inputs mob programming (#100108) 2021-05-18 10:13:39 +02:00
Frank Hassanabad e15b887e43
[Security Solutions] Replaces most deprecated io-ts alerting and list types (#100234)
## Summary

Replaces most of the deprecated io-ts alerting and list types within securitysolution as part of Phase 3 of 4 phases outlined in earlier PR's such as https://github.com/elastic/kibana/pull/99260

### 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-05-17 23:28:06 -06:00
Dominique Clarke 6d4cca29a7
[Uptime] [Synthetics Integration] Add functional tests for Synthetics Integration (#100161)
* add functional tests for synthetics fleet package
2021-05-17 16:44:30 -04:00
James Gowdy 7f9364ac8a
[ML] Fixing use_null setting in advanced job wizard (#100028)
* [ML] Fixing use_null setting in advanced job wizard

* fixing types

* fixing false checks for detector fields

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-17 21:04:35 +01:00
Spencer 808b44f2c1
[kbn/test] move types/ftr into src (#99555)
* [kbn/test] move types/ftr into src

* Apply eslint updates

* fix import of Lifecycle type

Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-17 09:51:53 -07:00
Catherine Liu 49b1ccdc9a
[Canvas] Fix column object shape in datatable created by CSV function (#98561)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-17 09:45:48 -07:00
Paul Tavares 532a33b051
[Security Solution][Endpoint] Refactor Host Isolation component used in Isolate use case (#100159)
* EndpointHostIsolateForm component
* Refactor Detections Host isolation flyout to use isolateform
2021-05-17 11:16:50 -04:00
Tiago Costa ac35d6cd59
skip flaky suite #(95899) 2021-05-17 16:04:57 +01:00
Nicolas Chaulet 30ea190031
[Fleet] Fix migration 7.12 to 7.13 migrate settings (#100054) 2021-05-17 10:21:47 -04:00
Nicolas Chaulet 8efb922fc5
[Fleet] Improve fleet server upgrade modal (#99796) 2021-05-17 10:17:53 -04:00
Ignacio Rivas 391e9aa0e9
[Ingest pipelines] add support for registered_domain processor (#99643)
The Ingest Node Pipelines UI added support to configure a registered domain processor. This processor extracts the registered domain, sub-domain and top-level domain from a fully qualified domain name.
2021-05-17 14:22:37 +02:00
Jean-Louis Leysens dbfd76d7c8
[Reporting] Added appropriate table caption for table listing generated reports (#100118)
* added appropriate table caption for table listing generated reports

* updated jest snapshot

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-17 13:45:29 +02:00
Dominique Clarke 5e410f5d86
[Uptime] [Synthetics Integration] update tls passphrase and http password field to use EuiFieldPassword (#100162)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-16 18:09:12 -04:00
Byron Hulcher ea8c92b353
[App Search] Allow user to manage source engines through Kibana UX (#98866)
* New bulk create route for meta engine source engines

* New delete route for meta engine source engines

* Add removeSourceEngine and onSourceEngineRemove to SourceEnginesLogicActions

* New SourceEnginesTable component

* Use new SourceEnginesTable component in SourceEngines view

* Added closeAddSourceEnginesModal and openAddSourceEnginesModal to SourceEnginesLogic

* New AddSourceEnginesModal component

* New AddSourceEnginesButton component

* Add AddSourceEnginesButton and AddSourceEnginesModal to SourceEngines view

* Allow user to select source engines to add

* Add addSourceEngines and onSourceEnginesAdd to SourceEnginesLogic

* Submit new source engines when user saves from inside AddSourceEnginesModal

* Fix failing tests

* fix i18n

* Fix imports

* Use body instead of query params for source engines bulk create endpoint

* Tests for SouceEnginesLogic actions setIndexedEngines and fetchIndexedEngines

* Re-enabling two skipped tests

* Feedback: move source engine APIs to own file

- We generally organize routes/logic etc. by view, and since this is its own view, it can get its own file

* Misc UI polish

Table:
- Add EuiPageContent bordered panel (matches Curations & API logs which is a table in a panel)
- Remove bolding on engine name (matches rest of Kibana UI)
- Remove responsive false (we do want responsive tables in Kibana)

Modal:
- Remove EuiOverlayMask - per recent EUI changes, this now comes baked in with EuiModal
- Change description text to subdued to match other modals (e.g. Curations queries) in Kibana

* Misc i18n/copy tweaks

Modal:
- Add combobox placeholder text
- i18n cancel/save buttons
- inline i18n and change title casing to sentence casing

* Table refactors

- DRY out table columns shared with the main engines tables (title & formatting change slightly from the standalone UI, but this is fine / we should prefer Kibana standardization moving forward)
- Actions column changes
  - Give it a name - axe will throw issues for table column missing headings
  - Do not make actions a conditional empty array - we should opt to remove the column totally if there is no content present, otherwise screen readers will read out blank cells unnecessarily
  - Switch to icons w/ description tooltips to match the other Kibana tables
- Remove unnecessary sorting props (we don't have sorting enabled on any columns)

Tests
- Add describe block for organization
- Add missing coverage for window confirm branch and canManageMetaEngineSourceEngines branch

* Modal test fixes

- Remove unnecessary type casting
- Remove commented out line
- Fix missing onChange function coverage

* Modal: move unmemoized array iterations to Kea selectors

- more performant: kea selectors are memoized
- cleaner/less logic in views
- easier to write unit tests for

+ rename setSelectedEngineNamesToAdd to onAddEnginesSelection
+ remove unused selectors test code

* Modal: Add isLoading UX to submit button + value renames

- isLoading prevents double clicks/dupe events, and also provides a responsive UX hint that something is happening

- Var renames: there's only one modal on the page, being extra specific with the name isn't really necessary. If we ever add more than one to this view it would probably make sense to split up the logic files or do something else. Verbose modal names/states shouldn't necessarily be the answer

* Source Engines view test fixes

- Remove unused mock values/actions
- Move constants to within main describe
- Remove unhappy vs happy path describes - there aren't enough of either scenario to warrant the distinction
- add page actions describe block and fix skipped/mounted test by shallow diving into EuiPageHeader

* [Misc] Single components/index.ts export

For easier group importing

* Move all copy consts/strings to their own i18n constants file

* Refactor recursive fetchEngines fn to shared util

+ update MetaEnginesTableLogic to use new helper/DRY out code
+ write unit tests for just that helper
+ simplify other previous logic checks to just check that the fn was called + add mock

* Tests cleanup

- Move consts into top of describe blocks to match rest of codebase
- Remove logic comments for files that are only sourcing 1 logic file
- Modal:
  - shallow is fairly cheap and it's easier / more consistent w/ other tests to start a new wrapper every test
- Logic:
  - Remove unnecessarily EnginesLogic mocks
  - Remove mount() in beforeEach - it doesn't save us that many extra lines / better to be more consistent when starting tests that mount with values vs not
  - mock clearing in beforeEach to match rest of codebase
  - describe blocks: split up actions vs listeners, move selectors between the two
  - actions: fix tests that are in a describe() but not an it() (incorrect syntax)
  - Reducer/value checks: check against entire values obj to check for regressions or untested reducers & be consistent rest of codebase
  - listeners - DRY out beforeEach of success vs error paths, combine some tests that are a bit repetitive vs just having multiple assertions
- Logic comments:
  - Remove unnecessary comments (if we're not setting a response, it seems clear we're not using it)
  - Add extra business logic context explanation as to why we call re-initialize the engine

Co-authored-by: Constance Chen <constance.chen.3@gmail.com>
2021-05-15 01:10:53 -04:00
Frank Hassanabad bfe08d25c5
[Security Solutions] Removes deprecation and more copied code between security solutions and lists plugin (#100150)
## Summary

* Removes deprecations 
* Removes duplicated code

### 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-05-14 16:56:08 -06:00
Constance 091ca4384a
[App Search] Meta engines schema view (#100087)
* Set up TruncatedEnginesList component

- Used for listing source engines
- New in Kibana: now links to source engine schema pages for easier schema fixes!

* Add meta engines schema active fields table

* Render meta engine schema conflicts table & warning callout

* Update x-pack/plugins/enterprise_search/public/applications/app_search/components/schema/components/truncated_engines_list.tsx

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

Co-authored-by: Jason Stoltzfus <jastoltz24@gmail.com>
2021-05-14 18:13:26 -04:00
Justin Kambic 90db9dfae8
[Uptime] Improve accessibility labeling for FilterPopover component (#99714)
* Improve accessibility labeling for `FilterPopover` component.

* Simplify test revisions.

* Simplify unit test.

* Refactor test to use text formatter helper functions.
2021-05-14 17:14:18 -04:00
Wylie Conlon 47f4bfc782
[Lens] Create managedReference type for formulas (#99729)
* [Lens] Create managedReference type for formulas

* Fix test failures

* Fix i18n types

* Delete managedReference when replacing

* Tests for formula

* Refactoring from code review

Co-authored-by: Joe Reuter <johannes.reuter@elastic.co>
Co-authored-by: Marco Liberati <marco.liberati@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-14 17:07:21 -04:00
Joe Portner b2d36b863b
Sharing saved objects phase 3 (#94383) 2021-05-14 14:46:17 -04:00
Dan Panzarella 97cc6ddb6b
[Security Solution] Interim Host Isolation Case Commenting (#100092) 2021-05-14 14:40:24 -04:00
Dominique Clarke 4674762657
[APM][RUM] adjust data types for uiFilters and range in APM requests (#99257)
* update has_rum_data api query types

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-14 14:10:18 -04:00
Zacqary Adam Xeper 2f3e175417
[Metrics UI] Replace date_histogram with date_range aggregation in threshold alert (#100004)
* [Metrics UI] Replace date_histogram with date_range aggregation in threshold alert

* Remove console.log

* Fix rate aggregation and offset
2021-05-14 13:57:34 -04:00
Dominique Clarke 42fa42a00a
[Observability] [Exploratory view] update v7 button styles (#100113)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-14 12:19:31 -04:00
Yulia Čech df47ae1e1d
Added missing padding to the popover title and footer in 'Test documents' popover (#99921)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-14 16:56:31 +02:00
Yuliia Naumenko 8a344fa385
[Alerting] Enabling import of rules and connectors (#99857)
* [Alerting] Enabling import of rules and connectors

* changed export to set pending executionStatus for rule

* fixed tests

* added docs

* Apply suggestions from code review

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

* fixed docs

* fixed docs

* Update x-pack/plugins/alerting/server/saved_objects/get_import_warnings.ts

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

* fixed test

* fixed test

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
2021-05-14 07:43:09 -07:00
Pablo Machado fab96050a4
Disable selection of filter status 'All' on AddToCaseAction (#99757)
* Fix: Disable selection of filter status 'All' on AddToCaseAction

* UI: Hide disabled statuses on AddToCaseAction

* Refactor: Rename disabledStatuses to hiddenStatuses

* Fix: Pick the first valid status for initialFilterOptions

Previously it was always picking 'open', but it wouldn't work when hiddenStatuses contains "open".

* Add missing test

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-14 16:04:44 +02:00
David Sánchez b6635b00e7
Change search bar placeholder and make it dynamic by props (#100049) 2021-05-14 15:59:17 +02:00
Marta Bondyra 0b5c672c11
[Lens] Remove separate mounting point for editor frame to use redux freely (#99892)
remove separate mounting point for editor frame
2021-05-14 15:41:37 +02:00
Larry Gregory c572ddd780
Introduce capabilities provider and switcher to file upload plugin (#96593)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-14 08:31:03 -04:00
David Sánchez 108252bd8d
Disable contextMenu when event is not event.kind=event (#100027) 2021-05-14 10:24:08 +02:00
Frank Hassanabad 7dd29a56ad
[Security Solutions] Breaks down the io-ts packages to decrease plugin size (#100058)
## Summary

The io-ts package was too large and needed to broken down more by domain to decrease the lists plugin size and any other plugin wanting to use the packages will not incur big hits as well.

Before we had one large io-ts package:

```
@kbn/securitysolution-io-ts-utils
```

Now we have these broken down 4 packages:

```
@kbn/securitysolution-io-ts-utils
@kbn/securitysolution-io-ts-types
@kbn/securitysolution-io-ts-alerting-types
@kbn/securitysolution-io-ts-list-types   
```

Deps between these packages are:

```
@kbn/securitysolution-io-ts-utils (none)
@kbn/securitysolution-io-ts-types -> @kbn/securitysolution-io-ts-utils
@kbn/securitysolution-io-ts-alerting-types -> @kbn/securitysolution-io-ts-types, @kbn/securitysolution-io-ts-utils
@kbn/securitysolution-io-ts-list-types  -> @kbn/securitysolution-io-ts-types, @kbn/securitysolution-io-ts-utils
```

Short description and function of each (Also in each of their README.md):

```
@kbn/securitysolution-io-ts-utils, Smallest amount of utilities such as format, validate, etc...
@kbn/securitysolution-io-ts-types, Base types such as to_number, to_string, etc...
@kbn/securitysolution-io-ts-alerting-types, Alerting specific types such as severity, from, to, etc...
@kbn/securitysolution-io-ts-list-types, list specific types such as exception lists, exception list types, etc...
```

### 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-05-13 15:36:06 -06:00
Alejandro Fernández Haro 6bafb59fd5
fix-typo: Use of than instead of then (#100030) 2021-05-13 17:35:38 -04:00
John Schulz 0364e8f5aa
[Fleet] Fix error when searching for keys whose names have spaces (#100056)
## Summary
fixes #99895

Can reproduce #99895 with something like
```shell
curl 'http://localhost:5601/api/fleet/enrollment-api-keys' \
  -H 'content-type: application/json' \
  -H 'kbn-version: 8.0.0' \
  -u elastic:changeme \
  --data-raw '{"name":"with spaces","policy_id":"d6a93200-b1bd-11eb-90ac-052b474d74cd"}'
```

Kibana logs this stack trace

```
server    log   [10:57:07.863] [error][fleet][plugins] KQLSyntaxError: Expected AND, OR, end of input but "\" found.
policy_id:"d6a93200-b1bd-11eb-90ac-052b474d74cd" AND name:with\ spaces*
--------------------------------------------------------------^
    at Object.fromKueryExpression (/Users/jfsiii/work/kibana/src/plugins/data/common/es_query/kuery/ast/ast.ts:52:13)
    at listEnrollmentApiKeys (/Users/jfsiii/work/kibana/x-pack/plugins/fleet/server/services/api_keys/enrollment_api_key.ts:37:69)
    at Object.generateEnrollmentAPIKey (/Users/jfsiii/work/kibana/x-pack/plugins/fleet/server/services/api_keys/enrollment_api_key.ts:160:31)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at postEnrollmentApiKeyHandler (/Users/jfsiii/work/kibana/x-pack/plugins/fleet/server/routes/enrollment_api_key/handler.ts:53:20)
    at Router.handle (/Users/jfsiii/work/kibana/src/core/server/http/router/router.ts:273:30)
    at handler (/Users/jfsiii/work/kibana/src/core/server/http/router/router.ts:228:11)
    at exports.Manager.execute (/Users/jfsiii/work/kibana/node_modules/@hapi/hapi/lib/toolkit.js:60:28)
    at Object.internals.handler (/Users/jfsiii/work/kibana/node_modules/@hapi/hapi/lib/handler.js:46:20)
    at exports.execute (/Users/jfsiii/work/kibana/node_modules/@hapi/hapi/lib/handler.js:31:20)
    at Request._lifecycle (/Users/jfsiii/work/kibana/node_modules/@hapi/hapi/lib/request.js:370:32)
    at Request._execute (/Users/jfsiii/work/kibana/node_modules/@hapi/hapi/lib/request.js:279:9) {
  shortMessage: 'Expected AND, OR, end of input but "\\" found.'
```

the `kuery` value which causes the `KQLSyntaxError` is
```
policy_id:\"d6a93200-b1bd-11eb-90ac-052b474d74cd\" AND name:with\\ spaces*
``` 

a value without spaces, e.g. `no_spaces` 

```
policy_id:\"d6a93200-b1bd-11eb-90ac-052b474d74cd\" AND name:no_spaces*
```

is converted to this query object

```
{
  "bool": {
    "filter": [
      {
        "bool": {
          "should": [
            {
              "match_phrase": {
                "policy_id": "d6a93200-b1bd-11eb-90ac-052b474d74cd"
              }
            }
          ],
          "minimum_should_match": 1
        }
      },
      {
        "bool": {
          "should": [
            {
              "query_string": {
                "fields": [
                  "name"
                ],
                "query": "no_spaces*"
              }
            }
          ],
          "minimum_should_match": 1
        }
      }
    ]
  }
```

I tried some other approaches for handling the spaces based on what I saw in the docs like `name:"\"with spaces\"` and `name:(with spaces)*`but they all failed as well, like

```
KQLSyntaxError: Expected AND, OR, end of input but "*" found.
policy_id:"d6a93200-b1bd-11eb-90ac-052b474d74cd" AND name:(with spaces)*
-----------------------------------------------------------------------^
    at Object.fromKueryExpression (/Users/jfsiii/work/kibana/src/plugins/data/common/es_query/kuery/ast/ast.ts:52:13)
    at listEnrollmentApiKeys (/Users/jfsiii/work/kibana/x-pack/plugins/fleet/server/services/api_keys/enrollment_api_key.ts:37:69)
    at Object.generateEnrollmentAPIKey (/Users/jfsiii/work/kibana/x-pack/plugins/fleet/server/services/api_keys/enrollment_api_key.ts:166:31)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at postEnrollmentApiKeyHandler (/Users/jfsiii/work/kibana/x-pack/plugins/fleet/server/routes/enrollment_api_key/handler.ts:53:20)
    at Router.handle (/Users/jfsiii/work/kibana/src/core/server/http/router/router.ts:273:30)
    at handler (/Users/jfsiii/work/kibana/src/core/server/http/router/router.ts:228:11)
    at exports.Manager.execute (/Users/jfsiii/work/kibana/node_modules/@hapi/hapi/lib/toolkit.js:60:28)
    at Object.internals.handler (/Users/jfsiii/work/kibana/node_modules/@hapi/hapi/lib/handler.js:46:20)
    at exports.execute (/Users/jfsiii/work/kibana/node_modules/@hapi/hapi/lib/handler.js:31:20)
    at Request._lifecycle (/Users/jfsiii/work/kibana/node_modules/@hapi/hapi/lib/request.js:370:32)
    at Request._execute (/Users/jfsiii/work/kibana/node_modules/@hapi/hapi/lib/request.js:279:9) {
  shortMessage: 'Expected AND, OR, end of input but "*" found.'
```

So I logged out the query object for a successful request, and put that in a function

```
{
  "query": {
    "bool": {
      "filter": [
        {
          "bool": {
            "should": [
              {
                "match_phrase": {
                  "policy_id": "d6a93200-b1bd-11eb-90ac-052b474d74cd"
                }
              }
            ],
            "minimum_should_match": 1
          }
        },
        {
          "bool": {
            "should": [
              {
                "query_string": {
                  "fields": [
                    "name"
                  ],
                  "query": "(with spaces) *"
                }
              }
            ],
            "minimum_should_match": 1
          }
        }
      ]
    }
  }
}
```


### 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-05-13 17:32:14 -04:00
Scotty Bollinger 5507ba6226
[Workplace Search] Fix bug when transitioning to personal dashboard (#100061)
The unmount callback should have never been in the useEffect keyed off of the pathname. Another issue appeared earlier and I tried to fix it with the now removed conditional, but it should have been removed into it’s own useEffect that only runs when the component is unmounted, not on every route change.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-13 16:16:28 -05:00
Poff Poffenberger ead8a4668a
[Canvas] Remove unused legacy autocomplete component (#99215)
* Remove unused autocomplete component

* Remove reference to autocomplete CSS

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-13 15:24:40 -05:00
Poff Poffenberger 61bc47f8e9
Re-enable formerly flaky shareable test (#98826)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-13 15:24:26 -05:00
Dominique Clarke 0bc97c4a58
[Uptime] [Synthetics Integration] ensure that proxy url is not overwritten (#99944) 2021-05-13 16:15:59 -04:00
Frank Hassanabad f492feee6e
[Security Solutions][Lists] Trims down list plugin size by breaking out the exception builder into chunks by using react lazy loading (#99989)
## Summary

Trims down the list plugin size by breaking out the exception builder into a dedicated chunk by using React Suspense and React lazy loading.

Before this PR the page load bundle size was `260503`, after the page load bundle size will be `194132`:

You can calculate this through:
```ts
node ./scripts/build_kibana_platform_plugins --dist --focus lists
cat ./x-pack/plugins/lists/target/public/metrics.json
```

Before
```json
[
  {
    "group": "@kbn/optimizer bundle module count",
    "id": "lists",
    "value": 227
  },
  {
    "group": "page load bundle size",
    "id": "lists",
    "value": 260503, <--- Very large load bundle size
    "limit": 280504,
    "limitConfigPath": "packages/kbn-optimizer/limits.yml"
  },
  {
    "group": "async chunks size",
    "id": "lists",
    "value": 0
  },
  {
    "group": "async chunk count",
    "id": "lists",
    "value": 0
  },
  {
    "group": "miscellaneous assets size",
    "id": "lists",
    "value": 0
  }
]
```

After:
```json
[
  {
    "group": "@kbn/optimizer bundle module count",
    "id": "lists",
    "value": 227
  },
  {
    "group": "page load bundle size",
    "id": "lists",
    "value": 194132, <--- Not as large bundle size
    "limit": 280504,
    "limitConfigPath": "packages/kbn-optimizer/limits.yml"
  },
  {
    "group": "async chunks size",
    "id": "lists",
    "value": 70000
  },
  {
    "group": "async chunk count",
    "id": "lists",
    "value": 1
  },
  {
    "group": "miscellaneous assets size",
    "id": "lists",
    "value": 0
  }
]
```

### 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-05-13 14:05:02 -06:00