Commit graph

37155 commits

Author SHA1 Message Date
Sébastien Loix a8b1b9e281
[Index management] Update TemplateDeserialized interface (#78913)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-05 15:19:36 +02:00
Ahmad Bamieh f960e89ef6
[Telemetry] server fetcher check all collectors ready before sending (#79398)
Co-authored-by: Alejandro Fernández Haro <afharo@gmail.com>
2020-10-05 16:16:07 +03:00
Sébastien Loix 519d4905bc
[Mappings editor] Fix app crash when selecting "other" field type (#79434) 2020-10-05 15:15:38 +02:00
Alejandro Fernández Haro 43493bb0d9
[/api/stats] Add documentation + small improvement (#79330)
Co-authored-by: Christiane (Tina) Heiligers <christiane.heiligers@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Ahmad Bamieh <ahmadbamieh@gmail.com>
2020-10-05 12:40:00 +01:00
Alexey Antonov 3ff90ce709
[Discover] "View surrounding documents" encodes spaces in filters (#79283)
* [Discover] "View surrounding documents" encodes spaces in filters

Closes: #72958

* fix CI

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-05 14:34:31 +03:00
Marta Bondyra ce97982522
[Lens] refactor DimensionContainer and fix flyout bug (#79277) 2020-10-05 12:41:09 +02:00
Alexey Antonov 4db22034d7
[Vega] Maps still experimental (#79114)
* [Vega] Maps still experimental

* fix TS issues

* cleanup

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-05 12:29:51 +03:00
Pierre Gayvallet 1e9135c0e5
[GS] Show all applications when opening the search bar (#78741)
* increase default number of results to show all apps

* fix circuit breaker

* fix ut

* add unit test
2020-10-05 11:04:25 +02:00
Spencer 9e1c44fcc0
add core-js production dependency (#79395)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-10-04 21:33:12 -07:00
Joe Portner caa5da26f0
Add support for sharing saved objects to all spaces (#76132) 2020-10-04 23:28:49 -04:00
Yuliia Naumenko 1d9a2a4492
[Alerting UI] Display a banner to users when some alerts have failures, added alert statuses column and filters (#79038)
* Added ui for alert failures banner

* Added UI for alerts statuses

* Adjusted form

* Added banned on the details page

* Fixed failing intern. check and type checks

* Added unit test for displaying alert error banner

* Fixed type check

* Fixed due to comments

* Changes due to comments

* Fixed due to comments

* Fixed text on banners

* Added i18n translations
2020-10-04 15:32:05 -07:00
Mikhail Shustov 5cc945f9e8
load js-yaml lazily (#79092) 2020-10-04 21:10:19 +02:00
Brian Seeders acedb35033 skip flaky suite (#77278) 2020-10-03 21:07:45 -04:00
Paul Tavares e859fe7c65
Fix agentPolicyUpdateEventHandler() to use app context soClient for creation of actions (#79341)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-03 19:24:39 -04:00
Angela Chuang 513ebb50f9
[Security Solution] Untitled Timeline created when first action is to add note (#78988)
* init tests

* Untitled Timeline created

* remove console

* fix from server side

* set timeline status to draft if created by saving notes

* add unit test

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-10-03 17:50:23 +01:00
Frank Hassanabad 6da7dc8695
[Security Solutions][Detection Engine] Updates the edit rules page to only have what is selected for editing (#79233)
## Summary

Before when you would edit rules you get all the rules as disabled but you cannot switch between them in edit mode as it's already a rule you created:
<img width="1063" alt="Screen Shot 2020-10-01 at 5 06 18 PM" src="https://user-images.githubusercontent.com/1151048/94872518-0bdaba00-040a-11eb-8b7d-3b3a59980e99.png">

After, now we remove those cards and only show the card of the rule type you're editing:
<img width="1074" alt="Screen Shot 2020-10-02 at 6 29 48 PM" src="https://user-images.githubusercontent.com/1151048/94978954-50835580-04dd-11eb-9e08-8e473fc216bf.png">

Changes the card's icon placement and text.

Before:
<img width="1098" alt="Screen Shot 2020-10-02 at 9 27 44 AM" src="https://user-images.githubusercontent.com/1151048/94979008-9dffc280-04dd-11eb-8bce-88cd49b063a8.png">

After:
<img width="1190" alt="Screen Shot 2020-10-02 at 6 31 01 PM" src="https://user-images.githubusercontent.com/1151048/94979005-95a78780-04dd-11eb-92ec-e81bc3ce436e.png">

Fixes the Schedule/Actions and weirdness with CSS.
Before:
<img width="588" alt="Screen Shot 2020-10-02 at 5 42 09 PM" src="https://user-images.githubusercontent.com/1151048/94979030-c5568f80-04dd-11eb-9c91-683d75dc37da.png">
<img width="516" alt="Screen Shot 2020-10-02 at 5 42 05 PM" src="https://user-images.githubusercontent.com/1151048/94979035-c8ea1680-04dd-11eb-9049-120c9d676b1a.png">

After:
<img width="1099" alt="Screen Shot 2020-10-02 at 5 42 51 PM" src="https://user-images.githubusercontent.com/1151048/94979038-d0112480-04dd-11eb-8a2a-8eb314023669.png">

<img width="1067" alt="Screen Shot 2020-10-02 at 5 42 57 PM" src="https://user-images.githubusercontent.com/1151048/94979040-d30c1500-04dd-11eb-85ab-a09e4def6adb.png">

### 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
- [ ] This was checked for [keyboard-only and screenreader accessibility](https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing/Accessibility#Accessibility_testing_checklist)
- [ ] This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server)
- [ ] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers)

### For maintainers

- [ ] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
2020-10-03 09:08:02 -06:00
Patryk Kopyciński 8a8066ffe8
Cleanup yarn.lock from duplicates (#66617) 2020-10-03 11:53:03 +02:00
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