Commit graph

8805 commits

Author SHA1 Message Date
John Schulz ec4fbf2901
[Fleet][EPM] Revert es-storage-related commits (#85942)
* Revert "[Fleet][EPM] Save installed package assets in ES (#83391)"

This reverts commit 81a340e681.

* Revert 00c2e96

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-12-15 15:11:46 -05:00
Nathan Reese 609d60705e
[Maps] provide function to create basemap layer descriptor (#85617)
* [Maps] provide function to create basemap layer descriptor

* update typing

* update APM map to use createBasemapLayerDescriptor

* fix useLayerList jest test

* tslint fixes

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-12-15 12:40:44 -07:00
Nathan Reese fa82f630a0
[Maps] 7.11 documentation updates (#85857)
* [Maps] 7.11 documenation updates

* update search docs with time filter legend indicator

* clean up tracks description

* fix duplicate id

* Update docs/maps/search.asciidoc

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

* Update docs/maps/vector-style.asciidoc

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

* Update docs/maps/vector-style.asciidoc

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

* review feedback

* add percentile metric aggregation

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
2020-12-15 12:37:16 -07:00
Paul Tavares 23cd2670e1
[SECURITY SOLUTION][ENDPOINT] Trusted Apps API to retrieve item summary by OS (#85870)
* API to return trusted apps summary
2020-12-15 14:21:25 -05:00
Jane Miller 1c1e4981bb
Add malware.threshold field to mac and windows (#85971) 2020-12-15 14:15:23 -05:00
Devon Thomson e4114dc08f
Dashboard Print Optimize Class Change (#85878)
* Fixed print oversight from deangularize PR & removed grey lines from background of print optimized dashboard PDF
2020-12-15 14:01:11 -05:00
Pierre Gayvallet f4b7916699
do not throw when query parsing fails (#85970) 2020-12-15 19:54:11 +01:00
Mike Côté ccfb4b6b1d
Add footer to all emails sent by Kibana email connector with a link to open Kibana or to the alert details page (#84371)
* Initial work

* Change messaging from copy

* Fix jest tests for email connector

* Fix jest tests for alerts plugin

* Update copy

* Use server.publicBaseUrl

* Fix jest tests

* Update tests

* Cleanup jest test

* Code cleanup

* Improve email parameter names for kibana footer url

* Cleanup

* Add test for kibana footer link

* Fix type check

* Fix jest test

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-12-15 13:51:44 -05:00
Kevin Qualters 47444e77c2
[Security Solution] Pass filters from SIEM to resolver, update resolver when refresh is clicked (#85812)
* Pass filters from SIEM to resolver

* Fix test type errors

* Revert loading state change, update snapshots

* Make correct check in nodeData selector

* Fix inverted logic in nodeData selector

* Revert nodeData invalidation logic

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-12-15 13:33:51 -05:00
Devon Thomson ee37f6dd91
[Time to Visualize] Transition Embeddable State Transfer to Session Storage (#85688)
* Transitioned embeddable state transfer service to use sessionStorage
2020-12-15 13:18:36 -05:00
Melissa Alvarez 11713acc7c
[ML] Data Frame Analytics: ensure map view supports dark theme (#85886)
* use current eui theme in map

* ensure labels do not overlap. add job type legend

* reduce padding in legend popover
2020-12-15 13:17:53 -05:00
Cauê Marcondes 013c1761ee
[APM] Bug: Service overview - change the Traffic and Error rate chart legend labels to the current metric (#85930)
* changing chart legends

* removing (avg) from value
2020-12-15 18:50:26 +01:00
Scotty Bollinger 7c6f1b8a0a
[Workplace Search] Add i18n to Add Source component tree (#85590)
* Add i18n for AddSourceList

* Add i18n for AvailableSourcesList

* Replace all instances of interal Link

This was missed during the migration. We need to use the components we wrap Eui components with internally.

Also fixes some imports that were unnecessarily going up one level and back down for imports.

* Add i18n for ConfigCompleted

* Add i18n for ConfigDocsLinks

* Add i18n for ConfigurationIntro

* Add i18n for ConfigureCustom

* Add i18n for ConfigureOauth

* Add i18n for ConfiguredSourcesList

* Add i18n for ReAuthenticate

* Add i18n for shared field labels

Also includea shared SourceConfigFields

* Add i18n for SaveConfig

* Add i18n for SaveCustom

* Add i18n for SourceFeatures

* Add i18n for ConnectInstance

* Fix duplicate i18n ID

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-12-15 11:44:18 -06:00
Melissa Alvarez 43e20112b1
[ML] Data Frame Analytics: check space permissions before deleting jobs (#85495)
* disable delete until checks complete

* add canDeleteJobs wrapper in saved objects service

* create DeleteJobCheckModal shared component

* wip: add deleteJobModal check in list and map views

* adding remove from current space endpoint

* updating error text

* fixing typo in variable name

* Update button content. Add untagging functionality

* adding anomaly detection delete job modal

* fix modal content bug

* refresh job map after deletion or untagging

* adding job refresh to anomaly detectors

* go straight to delete flow if only action available

* fixing test

* update text

* increase line spacing in check modal

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: James Gowdy <jgowdy@elastic.co>
2020-12-15 12:44:03 -05:00
Marco Liberati 9b71c94ff1
[Lens] Add datasource fields group help text (#85544)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-12-15 18:23:41 +01:00
Davis Plumlee 13e5e55901
[Security Solution][Detection Rules] Makes threat techniques optional (#85481) 2020-12-15 12:08:15 -05:00
Constance 07f395f7dd
Misc responsive tweaks to Documents view (#85440)
+ misc cleanup - extra div, true

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-12-15 09:02:12 -08:00
Cauê Marcondes 04d4e71ff5
removing margin for sparkline charts (#85917) 2020-12-15 16:34:11 +01:00
Tiago Costa 47ffefec09
skip flaky suite (#85899) 2020-12-15 15:15:11 +00:00
Tiago Costa 5fdace379c
skip flaky suite (#85714) 2020-12-15 15:02:26 +00:00
ymao1 853f30e23d
[Alerts] Remove Add Alerts flyout onClose (#85462)
* Remove add alerts flyout after onClose

* Updating tests

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Gidi Meir Morris <github@gidi.io>
2020-12-15 09:58:57 -05:00
Alison Goryachev 579ead8eaf
Handle multiple monaco editor instances for Painless lang (#85834) 2020-12-15 09:37:21 -05:00
Casper Hübertz 9ce6331ead
[APM] Increase Logstream height (#85913)
Increasing the component height for more optimal viewing experience.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-12-15 15:19:45 +01:00
Nicolas Chaulet 724b90e01b
[Fleet] Fix agent details logs on safari (#85884) 2020-12-15 09:10:17 -05:00
Steph Milovic 335cd1f6fc
[Security Solution] [Cases] Move field mappings from actions to cases (#84587) 2020-12-15 07:06:11 -07:00
Jonathan Buttner d4a631cf8e
[Security Solution][Resolver] Fixing resolver functional tests (#85647)
* Fixing resolver functional tests

* Import the animation constant

* Only check specific nodes instead of all the ones in view

* Removing check for link text

* updating test description

* Adding comments
2020-12-15 08:31:59 -05:00
Søren Louv-Jansen 20638a64e2
[APM] Correlations polish (#85116)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-12-15 13:15:00 +01:00
Daniil 845f716271
[Data table] Reactify & EUIficate the visualization (#70801)
* Use data grid for table vis

* Create basic table template

* Add table_vis_split component

* Apply cell filtering

* Add aria-label attributes

* Use field formatters for values

* Add no results component

* Remove legacy dependencies

* Add usePagination

* Create usePagination util

* Use percentage column and total row

* Use csv export button

* Update labels

* Fix merge conflicts

* Use split table

* Fix functional tests

* Fix dashboard tests

* Update data table functional tests

* Fix missed test

* Introduce showToolbar option

* Remove useless package

* Fix merge conflicts

* Return back kibanaUtils required bundle

* Revert "Remove useless package"

This reverts commit 144a7cd77c.

* Use feature flag for legacy vis

* Add footer row

* Remove lock files

* Revert "Remove lock files"

This reverts commit 5c5acd79f4.

* Minor fixes

* Use common no result message

* Fix broken tests

* Use ui state sorting

* Fix error

* Fix merge conflicts

* Add legacy functional tests

* Pull pagination footer up to keep with table

and fix column split growing continuously in dashboard

* Comments fixes

* Use cell actions for filtering

* Fix translations

* Fix comments

* Reduce legacy tests amount

* Update sorting

* Update split column layout

* Add telemetry for legacy vis

* Apply latest changes for split table

* Fix eslint errors

* Use aria labels with values

* Use aria label for export btn

* Fix functional test

* Update translations

* Cleanup

* Truncate cells content

* Enhance types in table_vis_response_handler.ts

* Persist columns width on change

* Fix sorting history

* Add a migration script for toolbar

* Export sorted table

* Use reportUiCounter instead of reportUiStats

* Fix integration tests

* Fix typos

* Adjust FieldFormat type

* Hide the density selector

* Update docs

* Fix pagination

* Restrict hiding the toolbar

* Fix column index on filter

* Add closePopover action

Co-authored-by: cchaos <caroline.horn@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-12-15 14:44:20 +03:00
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