Commit graph

36938 commits

Author SHA1 Message Date
Spencer ddf2d82e44
[kbn/optimizer] implement more efficient auto transpilation for node (#79052)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-10-02 18:36:25 -07:00
Nicolas Chaulet 92a629fc1f
[Ingest Manager] Rename Fleet setup and requirement, Fleet => Central… (#79291) 2020-10-02 20:11:37 -04:00
Spencer 9ee9bc7f20
[core/server/plugins] don't run discovery in dev server parent process (take 2) (#79358)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-02 16:41:05 -07:00
Spencer dc0bccf8f8
[babel/register] remove from build (take 2) (#79379)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-10-02 16:30:16 -07:00
Davis Plumlee bd80d3c747
[Security Solution] Changes rules table tag display (#77102) 2020-10-02 16:18:55 -06:00
Lee Drengenberg ed10d9f8dd
define integrationTestRoot in config file and use to define screensho… (#79247) 2020-10-02 17:07:14 -05:00
spalger f7a18e6454 Revert "[babel/register] remove from build (#79176)"
This reverts commit 511eb0f23b.
2020-10-02 14:49:01 -07:00
Brian Seeders a6e9d16310 skip flaky suite (#75241) 2020-10-02 17:28:47 -04:00
Justin Kambic 0ce802522c
[Uptime] Synthetics UI (#77960)
* Checkpoint

* Various

* Display synthetics steps.

* Add loading state for snapshots. Add error and stack trace fields.

* Lazy load screenshot images and cache screenshot GET endpoint.

* Fix extra requests bug.

* Improve screenshot empty state.

* Switch to use of code block for stack and error.

* Add onmouseenter and onmouseleave for image input/popover.

* Add image overlay.

* Support `skipped` state.

* Add synthetics type for Ping.

* Fix type references in reducer, api request, components.

* Add required mapping logic to journey request function.

* Modularize new components.

* Delete obsolete code.

* Delete unused code.

* Test expanded row changes.

* Add a test for ping list expand check.

* Various fixes

* Extract code accordion to new component

* Subsume synthetics type into Ping type.

* Add new journey viz for 0 steps case.

* Use code block for console output.

* Expand step count cap.

* Improve formatting of console steps visualization.

* Improve empty prompt.

* Extract empty prompt to dedicated file.

* Extract executed journey UI to dedicated file.

* Extract console step list components to dedicated files.

* Update empty journey prompt to accept only check_group.

* Clean up script expanded row component.

* Translate console output steps component.

* Fix logic error.

* Clean up console step component.

* Translate empty journey component.

* Translate status badge component.

* Translate screenshot component.

* Add experimental warning callout.

* Re-introduce deleted code.

* Simplify console output step list.

* Support skipped step for executed journeys.

* Simplify executed journey component.

* Add translations for executed step.

* Refresh outdated test snapshots.

* Simplify journey reducer signature.

* Repair types.

* Fix broken i18n naming.

* Add summary field to outdated ping test data.

* Fix linting error.

* Remove @ts-ignore comment.

* Add tests for step screenshot display.

* Add tests for status badge.

* Rename test file.

* Add tests for script expanded row.

* Add tests for executed step.

* Delete request and response fields from Ping's `synthetics` field.

* Fix screenshot querying effect, add flag to journey step state.

* Update screenshot api route to reply 404 when screenshot is null.

* Simplify screenshot image fetching.

* Delete obsolete code.

* Rename BrowserExpandedRow component.

* Remove all references to "suitejourney".

* Add intentional var names.

* Rename Console components to use "event" terminology instead of "step".

* Employ better copy.

* First names always bad names.

* Rename CodeBlockAccordion component.

* Add blob_mime field to Ping type.

* Fix busted import path.

* Update ping type for new position of errors field.

* Repair broken types.

* Fix summary querying

* Type fixes.

* Switch state object from list to KVP.

* Checkpoint.

* Fix screenshot display test.

* Fix executed step test.

* Refresh outdated test snapshots.

* Repair broken types.

* More typing fixes.

* Fix console log and add a test.

Co-authored-by: Andrew Cholakian <andrew@andrewvc.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-02 16:52:51 -04:00
Devin W. Hurley 43cf97e1f2
[Security Solution] [Detections] Only display actions options if user has "read" privileges (#78812)
* adds new 'can_read_actions' property to privileges api

* only display rule actions piece if user has 'read' privileges for actions

* display dropdown with custom text telling user they do not have read privileges for actions

* fixes type error

* update tests

* utilize application capabilities instead of making a server request

* remove changes to route tests

* don't show form unless user has read permissions for actions, display text saying user is missing required privileges

* pr feedback: refactor logic for rendering form fields
2020-10-02 16:46:12 -04:00
Spencer 511eb0f23b
[babel/register] remove from build (#79176)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-02 13:24:39 -07:00
Madison Caldwell c456f64a7e
[Security Solution][Exceptions] Add lowercase normalizer for case-insensitivity + deprecate _tags field (new OS field) (#77379)
* Finish adding .lower to exceptionable fields

* Add back migrations

* .lower -> .caseless

* Add separate field for os type

* updates

* Type updates

* Switch over to osTypes

* get rid of _tags

* Add tests for schema validation

* Remove remaining references to _tags

* Another round of test fixes

* DefaultArray tests

* More test fixes

* Fix remaining test failures

* types / tests

* more test updates

* lowercase os values

* Address feedback + fix test failure

* tests

* Fix integration test

* process.executable.path -> process.executable.caseless

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-10-02 15:54:43 -04:00
Joe Reuter b66de2ce1d
improve lens lazy loading (#79292) 2020-10-02 21:50:25 +02:00
spalger 66878b4285 Revert "[core/server/plugins] don't run discovery in dev server parent process (#79235)"
This reverts commit 9021c836cd.
2020-10-02 12:31:47 -07:00
Paul Tavares 1310ac61fc
[SECURITY_SOLUTION][ENDPOINT] Trusted apps create form UX mocks sync (#79155)
* Make flyout size `m` + condition entry value should be 100% wide
* Condition entry and group components support for small screens
* Adjust spacing below each entry in the condition group
* Move `AND` button to the condition group + style it to design mock
2020-10-02 15:13:28 -04:00
Bohdan Tsymbala 00d2105650
Added view type parameter to routing in trusted apps (#79297)
* Refactored store code to group properties related to location so that would be easy to introduce a new view type parameter.

* Added view type to the location and routing.

* Fixed type errors.

* Fixed and completed tests.
2020-10-02 21:11:23 +02:00
Aleh Zasypkin 388a905b29
Add support for the encryption key rotation to the encrypted saved objects. (#72420) 2020-10-02 21:08:39 +02:00
Spencer 9021c836cd
[core/server/plugins] don't run discovery in dev server parent process (#79235)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-02 12:05:59 -07:00
Pierre Gayvallet 952bb0730f
prepend basePath when navigating from home links (#79318) 2020-10-02 21:00:41 +02:00
Michael Olorunnisola 95102ab132
[Security Solution][Resolver] Panel state tests (#78975) 2020-10-02 14:52:50 -04:00
Nicolas Chaulet 54fa55d691
[Ingest Manager] Set the default timeout to 5 minute with a 20 seconds margin and improve the rate limitter (#79307) 2020-10-02 14:25:41 -04:00
Alejandro Fernández Haro 9973667f4c
[Usage Collection] [schema] apm (#79000) 2020-10-02 19:24:08 +01:00
Ryland Herrick 7cfdeaeede
[Security Solution][Detections] EQL Validation (#77493)
* WIP: Adding new route for EQL Validation

This is mostly boilerplate with some rough parameter definitions; the
actual implementation of the validation is going to live in our
validateEql function.

A few tests are failing as the mocks haven't yet been implemented, I
need to see the shape of the responses first.

* Cherry-pick Marshall's EQL types

* Implements actual EQL validation

* Performs an EQL search
* filters out non-parsing errors, and returns what remains in the
  response
* Adds mocks for empty EQL responses (we don't yet have a need for
  mocked data, but we will when we unit-test validateEql)

* Adds validation calls to the EQL form input

* Adds EQL Validation response schema,mocks,tests
* Adds frontend function to call our validation endpoint
* Adds hook, useEqlValidation, to call the above function and return
  state
* Adds labels/help text for EQL Query bar
* EqlQueryBar consumes useEqlValidation and marks the field as invalid,
  but does not yet report errors.

* Do not call the validation API if query is not present

This causes a broader error that results in a 400 response; we can (and
do) handle the case of a blank query in the form itself.

* Remove EQL Help Text

It doesn't add any information for the user, and it currently looks bad
when combined with validation errors.

* Flesh out and use our popover for displaying validation errors

* Fixes issue where old errors were persisted after the user had made
  modifications

* Include verification_exception errors as validation errors

These include errors related to index fields and mappings.

* Generalize our validation helpers

We're concerned with validation errors; the source of those errors is an
implementation detail of these functions.

* Move error popover and EQL reference link to footer

This more closely resembles the new Eui Markdown editor, which places
errors and doc links in a footer.

* Fix jest tests following additional prop

* Add icon for EQL Rule card

* Fixes existing EqlQueryBar tests

These were broken by our use of useAppToasts and the EUI theme.

* Add unit tests around error rendering on EQL Query Bar

* Add tests for ErrorPopover

* Remove unused schema type

Decode doesn't do any additional processing, so we can use t.TypeOf here
(the default for buildRouteValidation).

* Remove duplicated header

* Use ignore parameter to prevent EQL validations from logging errors

Without `ignore: [400]` the ES client will log errors and then throw
them. We can catch the error, but the log is undesirable.

This updates the query to use the ignore parameter, along with updating
the validation logic to work with the updated response.

Adds some mocks and tests around these responses and helpers, since
these will exist independent of the validation implementation.

* Include mapping_exceptions during EQL query validation

These include errors for inaccessible indexes, which should be useful to
the rule writer in writing their EQL query.

* Display toast messages for non-validation messages

* fix type errors

This type was renamed.

* Do not request data in our validation request

By not having the cluster retrieve/send any data, this should saves us
a few CPU cycles.

* Move EQL validation to an async form validator

Rather than invoking a custom validation hook (useEqlValidation) at custom times (onBlur) in our EqlQueryBar
component, we can instead move this functionality to a form validation
function and have it be invoked automatically by our form when values
change. However, because we still need to handle the validation messages
slightly differently (place them in a popover as opposed to an
EuiFormRow), we also need custom error retrieval in the form of
getValidationResults.

After much pain, it was determined that the default behavior of
_.debounce does not work with async validator functions, as a debounced
call will not "wait" for the eventual invocation but will instead return
the most recently resolved value. This leads to stale validation
results and terrible UX, so I wrote a custom function (debounceAsync)
that behaves like we want/need; see tests for details.

* Invalidate our query field when index patterns change

Since EQL rules actually validate against the relevant indexes, changing
said indexes should invalidate/revalidate the query.

With the form lib, this is beautifully simple :)

* Set a min-height on our EQL textarea

* Remove unused prop from EqlQueryBar

Index corresponds to the value from the index field; now that our EQL
validation is performed by the form we have no need for it here.

* Update EQL overview link to point to elasticsearch docs

Adds an entry in our doclinks service, and uses that.

* Remove unused prop from stale tests

* Update docLinks documentation with new EQL link

* Fix bug where saved query rules had no type selected on Edit

* Wait for kibana requests to complete before moving between rule tabs

With our new async validation, a user can quickly navigate away from the
Definition tab before the validation has completed, resulting in the
form being invalidated. Any subsequent user actions cause the form to
correct itself, but until I can find a better solution here this really
just gives the validation time to complete and sidesteps the issue.
2020-10-02 13:19:02 -05:00
Wylie Conlon 374ccfd66f
[Lens] Show runtime fields in field list and improve performance (#79167)
* [Lens] Simplify request to determine existing fields

* Remove duplicate values
2020-10-02 14:18:01 -04:00
Jonathan Buttner 92ff5178c6
[Security Solution][EPM] Reenabling the ingest and endpoint tests (#79290)
* Reenabling the ingest and endpoint tests

* Fixing list test and reenabling security functional tests
2020-10-02 14:15:03 -04:00
Robert Oskamp 819ccf1247
Adjust extend_es_archiver to handle additional cases (#79308)
This PR enables the extend_es_archiver to recognize additional indices like .kibana_1 as well as a list of indices.
2020-10-02 20:14:42 +02:00
Thomas Neirynck 86cb97adf6
[Maps] Simplify IDynamicStyle-api (#79217) 2020-10-02 14:04:31 -04:00
Thomas Neirynck 85528d0ecd
[Maps] Register gold+ feature use (#79011) 2020-10-02 14:04:03 -04:00
Nick Partridge e9fd3902c5
upgrade @elastic/charts to v23.0.0 (#79226)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-10-02 19:48:40 +02:00
Alejandro Fernández Gómez 2899e83df8
[Logs UI] Remove legacy singletons (#77743)
Removes the `npStart` legacy singleton used during the migration to the new platform. The singleton was used in API calls to access the `http.fetch` service. To remove the singleton we have injected `fetch` as a dependency in all functions.
2020-10-02 18:57:50 +02:00
Spencer bb4ad196ea
normalize paths before printing them into the generated plugin list (#79232)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-10-02 09:50:49 -07:00
Ryan Keairns d9915fdee0
Re-style and re-order top menu buttons (#79206)
* Re-style and re-order top menu buttons

* Update snapshot due to removed fill prop

* Fix link order for Maps
2020-10-02 11:47:20 -05:00
Alejandro Fernández Haro 7afb8b4d7b
[Usage Collection] [schema] alerts (#78933) 2020-10-02 17:45:47 +01:00
Marco Liberati d679624532
[Lens] Fix open custom ranges saved issue (#78915)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-10-02 18:41:40 +02:00
Devon Thomson 6364c14ffd
Panel Description Tooltip Design Change (#79213)
* wrapped Embeddable Panel title in EuiTooltip and centered description icon
2020-10-02 12:31:08 -04:00
Marta Bondyra fccfad24cb
[Lens] remove test warnings about improper HTML structure (#79251)
* [Lens] remove test warnings about improper HTML structure
2020-10-02 17:18:20 +02:00
Alejandro Fernández Haro f398b49200
[Usage Collection] [schema] actions (#78832) 2020-10-02 16:03:42 +01:00
Marshall Main 46af5fcc2d
[Security Solution][Detections] Enrich shell signals with fields common to all building blocks (#79130)
* Enrich shell signals with fields common to all building blocks

* PR comments + additional unit test
2020-10-02 10:10:38 -04:00
Bohdan Tsymbala 95bf8750cd
Refactored store code to group properties related to location so that would be easy to introduce a new view type parameter. (#79083) 2020-10-02 16:00:09 +02:00
Ryan Keairns a7d9e2f481
Improved empty state for nav search (#79123)
* Improved empty state for nav search

* Updates tests to include required props

* Update empty state text
2020-10-02 08:39:37 -05:00
Tiago Costa 0628cfecf4
skip flaky suite (#79249) 2020-10-02 14:30:32 +01:00
Paul Tavares 79eb9b7b7a
Use process.executable instead of process.path (#79216) 2020-10-02 08:53:55 -04:00
Larry Gregory b9a79836f8
Grouped features for role management (#78152)
* Grouped features for role management

* address PR feedback

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-10-02 08:45:28 -04:00
Søren Louv-Jansen ea6bec6c9b
[APM] Use history.replace to preserve back-button functionality (#78978) 2020-10-02 14:33:33 +02:00
MadameSheema b01140fc2e
improves eql test (#79014)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-10-02 13:52:03 +02:00
ymao1 09b0b6630a
Rearranged PagerDuty action params so non-optional params are at the top (#79026) 2020-10-02 07:40:47 -04:00
Tim Roes 70dac72ad3
Move legacy plugins to appropriate teams (#79078)
* Move legacy plugins to appropriate teams

* More cleanup
2020-10-02 13:39:38 +02:00
PavithraCP 94ef651d7b
[Lens]Do not enable histogram mode for multiple un-stacked bar series (#78525) 2020-10-02 13:16:46 +02:00
Pete Hampton e52884cfa2
[7.10][Telemetry] Display collected security event sample (#78963)
* Add security example to usage data opt in panel.

* Update translations.

* Fix docs.

* Fix broken type.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-10-02 10:28:37 +01:00
Matthias Wilhelm d772c8ca95
[Discover] Change context query to prevent duplicates (#77014) 2020-10-02 11:22:41 +02:00