Commit graph

8777 commits

Author SHA1 Message Date
Marco Liberati 62623cdab9
[Lens] New sorting feature for the datatable visualization (#84435)
Co-authored-by: Wylie Conlon <wylieconlon@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-12-15 12:37:59 +01:00
Vadim Dalecky a57cba4978
Drilldown allow list (#85779)
* feat: 🎸 add ROW_CLICK_TRIGGER

* feat: 🎸 wire row click event to UI Actions trigger in Lens

* feat: 🎸 add row click trigger to url drilldown

* feat: 🎸 add datatable to row click context

* feat: 🎸 pass in row index in row click trigger context

* feat: 🎸 add columns to row click trigger context

* feat: 🎸 fill values and keys event scope array

* feat: 🎸 generate correct row scope variables

* fix: 🐛 report triggers from lens embeddable

* feat: 🎸 add sample preview for row click trigger

* feat: 🎸 remove url drilldown preview box

* chore: 🤖 remove mock variable generation functions

* feat: 🎸 generate context and global variable lists

* feat: 🎸 preview event variable list

* feat: 🎸 show empty url error on blur

* feat: 🎸 add ability to always show popup for executed actions

* refactor: 💡 rename multiple action execution method

* fix: 🐛 don't add separator befor group on no main items

* feat: 🎸 wire in uiActions service into datatable renderer

* feat: 🎸 check each row if it has compatible row click actions

* feat: 🎸 allow passing data to expression renderer

* feat: 🎸 add isEmbeddable helper

* feat: 🎸 pass embeddable to lens table renderer

* feat: 🎸 hide lens table row actions which are empty

* feat: 🎸 re-render lens embeddable when dynamic actions chagne

* feat: 🎸 hide actions column if there are no row actions

* feat: 🎸 re-render lens embeddable on view mode chagne

* fix: 🐛 fix TypeScript errors

* chore: 🤖 fix TypeScript errors

* docs: ✏️ update auto-generated docs

* feat: 🎸 add hasCompatibleActions to expression layer

* feat: 🎸 remove "data" from expression renderer handlers

* fix: 🐛 fix TypeScript errors

* test: 💍 fix Jest tests

* docs: ✏️ update autogenerated docs

* fix: 🐛 wrap event payload into data

* test: 💍 add "alwaysShowPopup" test

* chore: 🤖 add comment requested in review

https://github.com/elastic/kibana/pull/83167#discussion_r537340216

* test: 💍 add hasCompatibleActions test

* test: 💍 add datatable renderer test

* test: 💍 add Lens embeddable input change tests

* test: 💍 add embeddable row click test

* fix: 🐛 add url validation

* test: 💍 add url drilldown tests

* docs: ✏️ remove url drilldown preview from docs

* docs: ✏️ remove preview from url templating

* docs: ✏️ add row click description

* chore: 🤖 move 36.5 KB bundle balance to url_drilldown

* test: 💍 simplify test case

* feat: 🎸 check if external URL is valid before redirecting user

* test: 💍 check for external URL validity

* feat: 🎸 check if external URL is allowed in exec and getHref

* test: 💍 fix test import
2020-12-15 12:17:19 +01:00
Dario Gieselaar 8ccad311d0
[APM] Service overview instances table (#85770) 2020-12-15 11:04:32 +01:00
Angela Chuang e261aa2649
[Security Solution] Unskip timeline creation Cypress test (#85871)
* fix cypress

* add a comment
2020-12-15 09:29:37 +00:00
Pierre Gayvallet bd7e7090a1
properly recognize enterprise licenses (#85849) 2020-12-15 10:26:43 +01:00
Ryland Herrick 5febe5fa7e
[SecuritySolution][Detections] Adds SavedObject persistence to Signals Migrations (#85690)
* Adds new SO type for persisting our signals migrations

* WIP: Migration status SO client

Trying to forge a patterrn using io-ts to validate at runtime. I think
I've got it working but I want to refactor the pipeline out into a
reusable function(s).

* Implements our SavedObjects service for signals migrations

* Defines a simple client that delegates to the base SO client with
our SO type
* Defines a service that consumes the simpler client, adding validations
  and data transforms on top.

* Refactoring migration code to work with saved objects

As opposed to the previous ephemeral, encoded tokens, we now retrieve migration
info from saved objects.

At the API level, this means that both the create and finalize endpoints
receive a list of concrete indices. No more passing around tokens.

As both endpoints are idempotent, users can hammer them as much as they
want with the same lists of indices. Redundant creates and finalizes
will be met with inline 400 messages, and as one continues to poll the
finalize endpoint they should see more and more indices respond with
"completed: true"

* Fixing integration tests first, and anything upstream breaking them

* Clean up API integration tests

* standardize assignment of responses (with types)
* deletes migration SOs as test cleanup

* Split API tests into separate files

This was getting big and unwieldy; this splits these into one file per
endpoint.

* Refactor: split existing migration service functionality into atomic functions

This will allow us to repurpose the service to compose more
functionality and be more specifically useful, while keeping the
component logic separate.

* WIP: moving logic into migrationService.create

* Splitting get_migration_status into component functions

getMigrationStatus was really two separate aggregations, so I split them
out and we recompose them in the necessary routes.

* Move finalization logic into function

* migrationService exposes this as .finalize()
* adds an error field to our migration SO
  * We currently only have one error that we persist there, but it would
    be very time-consuming to track down that information were it not
    there.

* Adds function for migration "deletion" logic

* migrationService leverages this function
* adds new boolean to our savedObject
* deletes unused function (deleteMigrationSavedObject)

* Adds route for soft-deletion of migrations

* Updating tests related to migration status

* Adding/updating mocks/unit tests necessary to satisfy the things I
  need to test
* I mainly wanted to test that the the status endpoint filtered out the
  deleted migrations; this was accomplished with a unit test after
  fleshing out some mocks/sample data.

* Move old migration service tests to the relevant function tests

This logic was previously moved out into component functions; this moves
the tests accordingly.

* Add some unit tests around our reindex call

* Fix create migration route tests

Mocks out our migration functions, rather than stubbing ES calls
directly.

* Updates finalize route unit tests

Addresses functionality that hasn't been moved to finalizeMigration()

* Unit tests our finalization logic

Fixes a bug where we weren't accounting for soft-deleted migrations.
ALso updates our test migration SO to have a status of 'pending' as
that's a more useful default.

* Fixes finalization integration tests

These were failing due:
* a change in the migration status API response
* a bug I introduced in the finalize route

* Adds tests for our migration deletion endpoint

* unit tests
* API integration tests
* Caught/fixed bug with deleting a successful migration

* Fixes types

Removes unused code.

* Prevent race condition due to template rollover during migration

If a user has an out of date index (v1) relative to the template (v2), but the
template itself is out of date (newest is v3), then it's possible that
the template is rolled over to v3 after the v1-v2 migration has been
created but before the new index has been created.

In such a case, the new index would receive the v3 mappings but would
incorrectl be marked as v2. This shouldn't necessarily be an issue, but
it's an unnecessary state that can easily be prevented with the guard
introduced here.

* Add real usernames to migration savedObjects

In addition to the SOs themselves giving us observability into what
migration actions were performed, this gives us the additional info of
_who_ performed the action.

* Index minimal migration SO fields needed for current functionality

* Add additional migration info to status endpoint

This will allow users to finalize a migration if they've lost the
response to their POST call.

* Finalize endpoint receives an array of migration IDs, not indices

This disambiguates _which_ migrations we were finalizing if you passed
an index (which was previously: the most recent migration).

* Fix type errors in tests after we threaded through username

* Update responsibilities of migration finalize/delete endpoints

Discussions with @marshallmain lead to the following refactor:

* finalize does not delete tasks
* finalize only applies cleanup policy to a failed migration
* delete takes an array of migration ids (like finalize)
* delete hard-deletes the SavedObject of a completed (failed or
  successful) migration

This gives a bit more flexibility with the endpoints, as well as
disambiguates the semantics: it just deletes migrations!

* Fix tests that were broken during refactoring

* Fix type errors

I removed some logic here but forgot the imports :(

* Move outdated integration test

In the case of a successful migration, application of the cleanup policy
is done by the deletion endpoint. In the interest of data preservation,
we do not delete a sourceIndex unless it is explicitly deleted.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-12-15 03:25:39 -06:00
Silvia Mitter 98308f8680
[Fleet] Change permissions for Fleet enroll role (#85802)
* Add APM traces index names to Fleet enroll role

* Removes fleet permissions for `events-*` as they became obsolete

fixes #85761
2020-12-15 09:31:39 +01:00
Marshall Main 818246e467
[Security Solution][Detections] Add alert source to detection rule action context (#85488)
* Adds context.alerts as available parameter for detection rule actions

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-12-15 01:43:50 -05:00
Yuliia Naumenko 37525f80a0
License checks for alerts plugin (#85649)
* [Alerts][License] Define minimum license required for each alert type (#84997)

* Define minimum license required for each alert type

* fixed typechecks

* fixed tests

* fixed tests

* fixed due to comments

* fixed due to comments

* removed file

* removed casting to LicenseType

* [Alerts][License] Add license checks to alerts HTTP APIs and execution (#85223)

* [Alerts][License] Add license checks to alerts HTTP APIs and execution

* fixed typechecks

* resolved conflicts

* resolved conflicts

* added router tests

* fixed typechecks

* added license check support for alert task running

* fixed typechecks

* added integration tests

* fixed due to comments

* fixed due to comments

* fixed tests

* fixed typechecks

* [Alerting UI][License] Disable alert types in UI when the license doesn't support it. (#85496)

* [Alerting UI][License] Disable alert types in UI when the license doesn't support it.

* fixed typechecks

* added licensing for alert list and details page

* fixed multy select menu

* fixed due to comments

* fixed due to comments

* fixed due to comments

* fixed typechecks

* fixed license error message

* fixed license error message

* fixed typechecks

* fixed license error message

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-12-14 19:29:39 -08:00
Patrick Mueller 7873e3685b
Allow action types to perform their own mustache variable escaping in parameter templates (#83919)
resolves https://github.com/elastic/kibana/issues/79371
resolves https://github.com/elastic/kibana/issues/62928

In this PR, we allow action types to determine how to escape the
variables used in their parameters, when rendered as mustache
templates.  Prior to this, action parameters were recursively
rendered as mustache templates using the default mustache
templating, by the alerts library.  The default mustache
templating used html escaping.

Action types opt-in to the new capability via a new optional
method in the action type, `renderParameterTemplates()`.  If not
provided, the previous recursive rendering is done, but now with
no escaping at all.

For #62928, changed the mustache template rendering to be
replaced with the error message, if an error occurred,
so at least you can now see that an error occurred.  Useful
to diagnose problems with invalid mustache templates.
2020-12-14 20:41:13 -05:00
Yuliia Naumenko b7c9d22133
Removed Alerting & Event Log deprecated fields that should not be using (#85652)
* Removed Alerting & Event Log deprecated fields that should not be using

* fixed due to comments
2020-12-14 17:05:58 -08:00
Oliver Gupte 6f050779d7
Closes #79995 by adding new tab in transaction details to show related trace logs. (#85859) 2020-12-14 19:24:01 -05:00
Chandler Prall 9d60d2da41 Fix outdated jest snapshot 2020-12-14 16:54:44 -07:00
Thomas Neirynck 75ec9c1cab
[Maps] Surface on prem EMS (#85729) 2020-12-14 18:44:41 -05:00
Oliver Gupte 6017cb539d
[APM] Makes service overview page default (#85786)
* Closes #81948 by setting the default route for services to the service overview page
also updates links to the general path which gets redirected according to user settings

* fixes incorrect test names

* Update x-pack/plugins/apm/public/components/app/Main/route_config/index.tsx

Co-authored-by: Cauê Marcondes <55978943+cauemarcondes@users.noreply.github.com>

* fixes linting

Co-authored-by: Cauê Marcondes <55978943+cauemarcondes@users.noreply.github.com>
2020-12-14 18:31:34 -05:00
Nathan L Smith 84a0ab0dc0
APM Alerts Preview charts (#85868) 2020-12-14 17:30:37 -06:00
Nathan Reese 59390a60b1
[maps] geo_line aggregation notify licensed feature usage (#85807) 2020-12-14 16:24:28 -07:00
Tiago Costa b8954b6527
skip flaky suite (#85714) 2020-12-14 22:24:02 +00:00
Chandler Prall 84d7b9e4ac
Upgrade EUI to v30.6.0 and update jest snapshots (#85504) 2020-12-14 15:18:29 -07:00
Joe Portner dd34712ce6
Update core usage stats collection (#85706) 2020-12-14 17:12:05 -05:00
Paul Tavares f6cd2648af
[Security_Solution][Endpoint] Register Custom tab into Fleet Endpoint Integration Detail (#85643)
* Fleet: add component props to the Package Custom UI extension
* Endpoint: Register UI Extension with fleet for endpoint custom content
* Endpoint: UI for Trusted Apps custom entry
2020-12-14 17:09:34 -05:00
Tyler Smalley 504c8739de
test:jest improvements to better support our monorepo (#84848)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2020-12-14 14:07:50 -08:00
Patrick Mueller 1f774bb2e6
[task manager] provide warning when setting max_workers greater than limit (#85574)
resolves https://github.com/elastic/kibana/issues/56573

In this PR we create a new task manager limit on the config property
`xpack.task_manager.max_workers` of 100, but only log a deprecation
warning if that property exceeds the limit.  We'll enforce the limit
in 8.0.

The rationale is that it's unlikely going to be useful to run with
more than some number of workers, due to the amount of simultaneous
work that would end up happening.  In practice, too many workers can
slow things down more than speed them up.

We're setting the limit to 100 for now, but may increase / decrease it
based on further research.
2020-12-14 16:38:05 -05:00
nnamdifrankie 23c5daa622
[Fleet] add ilm policy per data stream (#85492)
Co-authored-by: kevinlog <kevin.logan@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-12-14 16:15:55 -05:00
Constance 4d398f2461
[App Search] Temporarily remove sidebar layout and internal engine links for 7.11 release (#85820)
* Hide layout/sidebar for main Engines Overview

* Remove internal links to Engine pages

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-12-14 13:02:49 -08:00
Kerry Gallagher dd7bbb817b
[Synthetics] Waterfall view (#84821)
* Add a new synthetics step detail page for displaying waterfall data
2020-12-14 20:59:12 +00:00
Jean-Louis Leysens b8ab3fdafc
[ILM] Rollover field redesign (#85579)
* implement form-level support for using default rollover action

* slight update to copy

* added use default rollover switch and tooltips for detailed copy

* fix legacy integration tests and do not unmount rollover field!!

* remove unused import

* fix client integration tests

* updated form to use new isUsingRollover check

* fix serialization of rollover

* Update x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/components/phases/hot_phase/hot_phase.tsx

Co-authored-by: Adam Locke <adam.locke@elastic.co>

* Update x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/components/phases/hot_phase/hot_phase.tsx

Co-authored-by: Adam Locke <adam.locke@elastic.co>

* Update x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/components/phases/hot_phase/hot_phase.tsx

Co-authored-by: Adam Locke <adam.locke@elastic.co>

Co-authored-by: Yulia Čech <6585477+yuliacech@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Adam Locke <adam.locke@elastic.co>
2020-12-14 21:10:00 +01:00
Jane Miller ac3e02aead
[SECURITY_SOLUTION] Advanced policy docs (#85203)
* started docs, removed kernel harden option

* Advanced policy field documentation

* consistent formatting

* consistent formatting

* drop unused fields

* grammar

* i18n first key

* i18n, change versions to 7.9, add some new fields, remove some that we don't want to expose

* Update x-pack/plugins/security_solution/public/management/pages/policy/models/advanced_policy_schema.ts

Co-authored-by: Daniel Ferullo <56368752+ferullo@users.noreply.github.com>

* Update x-pack/plugins/security_solution/public/management/pages/policy/models/advanced_policy_schema.ts

Co-authored-by: Daniel Ferullo <56368752+ferullo@users.noreply.github.com>

* Update x-pack/plugins/security_solution/public/management/pages/policy/models/advanced_policy_schema.ts

Co-authored-by: Daniel Ferullo <56368752+ferullo@users.noreply.github.com>

Co-authored-by: Daniel Ferullo <56368752+ferullo@users.noreply.github.com>
2020-12-14 15:00:22 -05:00
Steph Milovic 59b18a2b3a
[Security Solution] [Sourcerer] Cypress tests (#80410) 2020-12-14 12:38:38 -07:00
Candace Park 8279c2d1a2
[Security Solution][Endpoint][Admin] Adds instructional tooltip for malware custom user notification (#85651)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-12-14 14:27:58 -05:00
Candace Park 80ca5a5836
[Security Solution][Endpoint][Admin] Custom malware user notification message allows spaces now (#85207)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-12-14 14:26:51 -05:00
Christos Nasikas ea4e2224a9
[Security Solution][Case] Sync cases with alerts (#84731) 2020-12-14 21:11:53 +02:00
Jonathan Budzenski 5f6ed3dc3c skip custom detection rules. #83772 2020-12-14 12:51:14 -06:00
Kevin Logan 06993c469b
[Fleet] Installation of hidden field (#85703)
Co-authored-by: nnamdifrankie <franklin.ejoh@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-12-14 13:45:56 -05:00
Tyler Smalley d909a9617f Revert "[APM] Alerting: Show preview as chart of threshold (#84080)"
This reverts commit 9986aff82e.
2020-12-14 10:32:57 -08:00
Andrea Del Rio 12c40f7906
Remove feature_directory directory and link (#84464) 2020-12-14 13:03:16 -05:00
Marco Liberati 5304e88c3e
[Lens] Fix chart twitching on flyout open (#85430)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-12-14 18:43:25 +01:00
Cauê Marcondes 9986aff82e
[APM] Alerting: Show preview as chart of threshold (#84080) 2020-12-14 11:38:15 -06:00
Gidi Meir Morris fde0fe52ed
removed unnecessary field (#85792) 2020-12-14 17:30:49 +00:00
Cauê Marcondes 7a5c3b482c
[APM] Fix Transaction duration distribution barchart clickarea (#84394)
* [APM] select transaction distribution by clicking on the entire bucket

* fixing margins and bucket click

* changing annotation color

* adding tooltip placement bottom

* addressing pr comments

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-12-14 18:29:18 +01:00
Chris Roberson 6ae00fb514
[Monitoring] Convert Beats-related server files that read from _source to typescript (#85193)
* Beats to TS

* PR feedback

* Fix types

* Fix types

* Fix failing test

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-12-14 12:12:11 -05:00
Nathan Reese 8b6831a55a
[Maps] fix color-style disappears when mapping by percentiles when breaks are identical (#85654)
* [Maps] fix color-style disappears when mapping by percentiles when breaks are identical

* tslint

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-12-14 10:05:59 -07:00
Walter Rafelsberger a6e6b62658
[ML] Transforms: Support for missing_bucket in transform advanced pivot editor (#85758)
Adds support for missing_bucket with group-by configurations in the advanced editor for pivot configurations.
Previously, the editor would allow you to add the setting, but it would be stripped from the config once the transform gets created.
2020-12-14 17:51:18 +01:00
Sonja Krause-Harder 1b3a1bb385
Don't rollback on saved objects conflict errors. (#85131) 2020-12-14 17:36:25 +01:00
Yulia Čech 8858749ce4
[ILM] Added readonly field in hot phase (#85419)
* [ILM] Added readonly field in hot phase

* [ILM] Added readonly field in warm phase

* Update x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/components/phases/shared_fields/readonly_field.tsx

Co-authored-by: Alison Goryachev <alisonmllr20@gmail.com>

* Update x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/form/schema.ts

Co-authored-by: Alison Goryachev <alisonmllr20@gmail.com>

* Update x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/components/phases/hot_phase/hot_phase.tsx

Co-authored-by: Alison Goryachev <alisonmllr20@gmail.com>

* Updated labels for the form

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Alison Goryachev <alisonmllr20@gmail.com>
2020-12-14 17:27:56 +01:00
Shahzad eed6844004
[Uptime] Display tags in monitor list and details page (#85168) 2020-12-14 17:26:53 +01:00
Rudolf Meijering 8a34942f3f
Fix dead links to functional testing docs (#85097) 2020-12-14 17:00:53 +01:00
Yulia Čech a8d088febd
Added hidden filter to data streams tab (#85028)
* Added hidden filter to data streams tab

* Fix i18n import

* Fixed tests

* hidden ds pr feedback

* Added includeHidden query to data streams list

* Changed how badge group renders data streams badges

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-12-14 16:54:06 +01:00
Cauê Marcondes 542a8aa1d4
[APM] Latency chart for overview (#84634)
* adding latency chart

* adding loading indicator

* fixing unit test

* fixing y-axis format

* fixing some stuff

* using urlhelpers

* adding latency aggregation type on the transactions overview api

* fixing transaction group overview route

* fixing merge problems

* breaking /transactions/charts into /latency and /thoughput

* adding unit tests

* fixing UI

* fixing i18n

* addressing pr comments

* fix api test

* refactoring some stuff

* addressing pr comments

* addressing pr comments

* adding latecy chart

* fixing test

* fixing api tests

* fixing api test

* fixing build

* addressing pr comments

* addressing pr comments

* refactoring some stuff

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-12-14 16:45:54 +01:00
Xavier Mouligneau 0dfcbe92ed
[SECURITY SOLUTIONS] Ask user to save timeline before leaving the app + bugs (#85693)
* fix clicking on host on netwrok detail page

* Fetch signal index at plugin level to avoid weird behavior

* bing back full screen timeline

* Show health check on timeline

* fix focus on modal of description and title

* fix focus on modal of description and title

* allow to know the next appId

* if user leave security solution and timeline has not been saved, ask them if they want to save it before leaving

* fix test + types

* Fix siem signal loading on plugin + UX on timeline with no data

* Add a callback to cleaner from solution + test

* fix bug + improve prompt leaving msg

* update note

* css improvements

* fix code to be true to our test

* miss one test

* update test

* fix unit test

* core review

Co-authored-by: Patryk Kopycinski <contact@patrykkopycinski.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Angela Chuang <yi-chun.chuang@elastic.co>
2020-12-14 10:33:59 -05:00