Commit graph

31673 commits

Author SHA1 Message Date
Cauê Marcondes 7eec879547
[APM]Create custom link from Trace summary (#59648)
* adding custom links to actions menu

* user should have at least gold license to be able to manage custom links

* replacing variable for the correspondent value

* refactoring license prompt to a shared place

* fixing query to return filters that were saved separated by comma

* refactoring license prompt to a shared place

* fixing query to return filters that were saved separated by comma

* adding unit test, splitting value by comma and removing empty ones

* adding custom links to actions menu

* UI fixes

* moving stuff to common

* changing flyout texts

* refactoring getSelectOption

* refactoring getSelectOption

* refactoring filter options name

* adding preview panel

* adding preview panel

* fixing test

* adding unit test for replace template variables

* fixing typo

* polishing preview panel

* fixing pr comments

* fixing pr comments

* adding links

* fixing unit test

* removing servicemap license prompt
2020-03-23 12:48:58 +01:00
James Gowdy b03a3628dd
[ML] Fixing app clean up (#60853) 2020-03-23 10:38:51 +00:00
Tudor Golubenco 7bafeb1d6f
[SIEM] Use ECS categorisation for Authentication widgets (#60734)
* Update the Authentication histogram to use categorization fields

* linting

* Use categorization fields for the Authentications table

* Use event.outcome for authentications KPIs

* Adjust mock to fix unit test

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-23 10:29:38 +01:00
Daniil Suleiman afd1179c0d
[NP] Remove kbnUrl usage in discover/dashboard/visualize (#60016)
* Remove kbnUrl usages from disciver/dashboard/visualize

* Remove kbnUrl usage in angular_config

* Wrap with encodeURIComponent

* Fix reloading when base path

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-23 10:57:03 +03:00
Brian Seeders 8b2ffafa1d
Skip failing test 2020-03-22 20:32:42 -04:00
Shahzad b909742a40
[Uptime]Update fetch effect failed action handling (#60742)
* update fetch effect

* added test

* update type
2020-03-22 18:17:03 +01:00
Spencer 33af1c154b
[npm] upgrade elastic/maki (#60829)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-03-21 17:37:55 -07:00
Andrew Cholakian c2e57af277
[Uptime] Add Settings Page (#53550)
Adds a settings page to the Uptime UI. The settings page values are per-space. The only current setting is heartbeatIndices.

To test this against alternate indices try changing setup.ilm.rollover_alias in heartbeat.yml to something like alt-prefix. See the ilm docs for more details.

This should be tested with read-only and write only roles. To test this in kibana try creating two users with two different roles in kibana. One roll should have read access to the Uptime space in kibana. The other should have all access. Both should have read permissions for the heartbeat-* index pattern.

This patch also splits API perms from just heartbeat to uptime-read and uptime-write.

This patch also refactors some of the header component functionality, using hooks for breadcrumbs, and making the top links optional.

Fixes elastic/uptime#43
2020-03-21 18:13:01 -05:00
Søren Louv-Jansen d3a9531270
[APM] service maps: avoid unnecesary useDeepObjectIdentity (#60836)
* [APM] service maps: avoid unnecesary `useDeepObjectIdentity`

* Remove unused dep
2020-03-21 21:41:54 +01:00
Sébastien Loix 8ccaa2e62f
[Index management] Re-enable index template tests (#60780) 2020-03-21 17:01:01 +01:00
Yuliia Naumenko 0390251f69
Fixed UI/UX issues: alerts delete confirmation, combobox behaviors (#60703)
* Fixed UI/UX issues: alerts delete confirmation

* Fixed 4. Popover disappears when clearing the field selector

* Fixed tests

* Fixed due to comments

* fixed tests

* Fixed test
2020-03-20 21:29:06 -07:00
Ryland Herrick 9e911469a3
[SIEM] Fix patching of ML Rules (#60830)
* Allow ML Rules to be patched

* Test passing of params from our patch routes to our helpers

Since patchRules accepts a partial there's no way to verify this in
typescript, we need regression tests instead.

* Update lists when importing with overwrite

This was simply missed earlier.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-20 21:32:51 -05:00
Oliver Gupte 9de2d815fc
[APM] Service Map - Separate overlapping edges by rotating nodes (#60477)
* Adds rotation transform which does the top->bottom to left->right
transformation + an extra 5 degrees which results in taxi edges
separating when rendered.

* PR feedback to reduce edge width on hover, and assure that connected
edges are highlighted when node is selected/focused

* update disabled kuery bar placeholder text for service map
2020-03-20 18:56:08 -07:00
Patrick Mueller e73159281e
[Alerting] fix flaky test for index threshold grouping (#60792)
resolves https://github.com/elastic/kibana/issues/60744

This is a fairly complex test, with alerts that run actions that write to
an index which we then do queries over.  The tests didn't account for some
slop in all that async activity, but now should be about as flake-free as they
can be.
2020-03-20 20:00:47 -04:00
Frank Hassanabad 74ceceb324
[SIEM][Detection Engine] Adds test scripts for machine learning feature
## Summary

* Adds ad-hoc testing scripts for machine learning feature

## Testing

```ts
./post_rule.sh ./rules/queries/query_with_machine_learning.json
./update_rule.sh ./rules/updates/update_machine_learning.json
./patch_rule.sh ./rules/patches/update_machine_learning.json
```
2020-03-20 17:33:09 -06:00
kqualters-elastic 677055f3ad
Flatten child api response for resolver (#60810) 2020-03-20 18:07:41 -04:00
Brittany Joiner 0bf199757f
Change "url" to "urls" in APM agent instructions (#60790) 2020-03-20 17:05:46 -05:00
Kaarina Tungseth fda3196611
[DOCS] Updates API requests and examples (#60695)
* [DOCS] Updates API requests and examples

* Review comments
2020-03-20 16:33:20 -05:00
Steph Milovic cf9b64eada
[SIEM] [Cases] Create case from timeline (#60711) 2020-03-20 15:14:09 -06:00
Wylie Conlon fc24febec9
[Lens] Resetting a layer generates new suggestions (#60674)
* [Lens] Resetting a layer generates new suggestions

* Include preview in tests
2020-03-20 17:03:59 -04:00
MadameSheema 5d93a0890c
increases loading timeout (#60788) 2020-03-20 21:52:26 +01:00
Patrick Mueller 5efd59b43f
[Alerting]: harden APIs of built-in alert index-threshold (#60702)
resolves https://github.com/elastic/kibana/issues/59889

The index threshold APIs - used by both the index threshold UI and the
alert executor - were returning errors (500's from http endpoints) when
getting errors from ES.

These have been changed so that the error is logged as a warning, and the
relevant API returns an "empty" result.

Another 500 response was found while experimenting with this.  Apparently
the date_range agg requires a date format to be passed in if the date format
in ES is not an ISO date.  The repro on this was to select the `.security`
alias (or it's index) within the index threshold alert UI, and then select
one of it's date fields.
2020-03-20 16:36:01 -04:00
Paul Tavares 7983d1dff7
[Endpoint] Integrate the Policy list with ingest datasources api (#60548)
* Use ingest API to get endpoint datasources

* Add `application` service to `KibanaContextProvider`

* Adjust Policy list to show data available from API

* Added ingest service + refactored middleware

* handle api failures/errors

* Removed policy list fake_data generator

* Fix typing

* Rename method + added explicit return type

* move dispatch outside of try block

* Removed unnecessary action

* Added FIXME comments with link to issue

* Skip some functional tests

* added tests for ingest service

* Policy list tests - turn it all off

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-20 16:32:55 -04:00
Catherine Liu ca55db53c1
[Canvas] Switch to using EUI SuperDatePicker in time filter el… (#59249)
* Replaced custom custom time filter component with EuiSuperDatePicker

* Added advanced settings dateFormat and timepicker:quickRanges to time filter

* Round up end date in time filter

* Updated snapshots

* Fixed timefilter function

* Fixed import

* reduce margin between datepicker and selection border (#59498)

* Added time_filter renderer stories

* Updated storyshots

* Updated timefilter element thumbnail

* Updated snapshots

* Used Filter type instead of any

* Renamed timefilter components folder

* Removed unused time range i18n strings

* Updated translations

* BROKEN

* Updated snapshots

* Revert "BROKEN"

This reverts commit e3b8bd7865.

* Fix time-filter element preview image

* Upated time filter preview image

* Fix time-filter renderer

* fixed storybook tests

* Fixed time filter renderer
2020-03-20 13:32:01 -07:00
Chandler Prall 0bf62cbf3e
Upgrade EUI to 21.0.1 (#60282)
* update to eui 21.0.1

* most changes needed for search bar ts changes

* Passing types

* snapshots

* jest tests

* Removed IQuery placeholder types

* Updated functional test to only look at table headers with content

* Moved 'filters' definition around in api docs

* Update types

* update snapshot

* typo

* Move DATA_FRAME_TASK_STATE enum to its own file to fix x-pack functional test config imports

* merge public api 'changes'

Co-authored-by: patrykkopycinski <patryk.kopycinski@elastic.co>
Co-authored-by: Patryk Kopycinski <contact@patrykkopycinski.com>
2020-03-20 14:07:04 -06:00
Tim Sullivan d896292b6f
[Reporting] revert skip telemetry step (#60450)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-20 12:37:22 -07:00
Jen Huang b01832249d
[Ingest] Support input-level config fields (#60594)
* Support input-level config fields

* Adjust tests

* Adjust server schema
2020-03-20 12:18:07 -07:00
Yuliia Naumenko 67a01a71bd
Removed restriction on adding multiple connectors of the same action type to an alert (#60720)
* Allows multiple action under the same connector for alert

* Fixed due to comments

* fixed ui issue
2020-03-20 12:14:32 -07:00
Wylie Conlon 6d1479fc08
[Lens] Fix bug when removing dimensions from non-XY chart (#60704) 2020-03-20 14:59:51 -04:00
Gidi Meir Morris ce0722b558
[Alerting] retains empty AlertsList when filter has removed all items (#60501)
Ensure that when the filtering on the AlertList removes all items we show the empty list rather than the Create Your First Alert CTA
2020-03-20 18:49:16 +00:00
Nathan L Smith b5f460fb6e
Remove all client-side map munging (#60701)
Remove the getCytoscapeElements function.

On the server:

* Replace `source` with `sourceData`, `destination` with `targetData`, `source.id` with `source`, and `destination.id` with `target`.
* Return a single array as an `elements` property instead of `nodes` and `connections`
* Map all of the items data to be inside of a `data` object
* Replace SERVICE_AGENT_NAME with AGENT_NAME
* Add some missing constants

On the client:

* Remove getCytoscapeElements
* Move all presentation-specific data transformation to use the original attributes in the place where they're needed
* Remove `href` since it wasn't being used
* Move BetaBadge to its own file
* Move cytoscapeDivStyle to cytoscapeOptions
* Fix storybook to work with new data formats
2020-03-20 13:14:39 -05:00
Chris Roberson 3a396027f6
[Monitoring] Migrate server to NP (#56675)
* First pass

* First pass

* Add new routes

* Getting closer

* Remove legacy server code, and other fixes

* Register the plugin with xpack

* Pass a legacy client to telemetry

* Suport callWithInternalUser

* Remove this

* More NP work

* Fix some tests

* Fix broken test

* Move over new telemetry changes, and fix other issues

* Fix TODO item

* Reuse the same schema as elasticsearch module

* Use a singular config definition here

* Disable this for now

* Use the right method

* Use custom config again

* Tweak the config to make this optional

* Remove these

* Remove these unnecessary files

* Fix jest test

* Fix some linting issues

* Fix type issue

* Fix localization issues

* Use the elasticsearch config

* Remove todos

* Fix this check

* Move kibana alerting over

* PR feedback

* Use new metrics core service

* Change config for xpack_api_polling_frequency_millis

* Make sure this is disabled for now

* Disable both

* Update this to the new function

* Tighten up legacy api needs

* Check for existence

* Fix jest tests

* Cleaning up the plugin definition

* Create custom type in our plugin

* Revert this change

* Fix CI issues

* Add these tests back

* Just use a different collector type

* Handle errors better

* Use custom type

* PR feedback

* Fix type issues

* PR feedback
2020-03-20 14:02:15 -04:00
Gidi Meir Morris da2ec4bf40
[alerting] fixes View In App Functional test (#60606)
Enables the FT that tests the View inApp functionality.
It addresses an issue that causes a race condition on CI where the ViewInApp button was thought to be enabled when it was, in fact, still disabled.
This meant that the click on the button didn't trigger the handler which, in turn, made the test fail.
2020-03-20 17:42:25 +00:00
Gidi Meir Morris 55814addac
[Alerting] Unifies the use of a single constant for Api urls in alerting & actions (#60430)
Unifies the use of a single constant for Api urls in alerting & actions
2020-03-20 17:39:07 +00:00
Nicolas Chaulet 558aaaa8ba
[Fleet] Create a fleet_enroll user and role during fleet setup (#60562) 2020-03-20 13:31:56 -04:00
Nathan Reese 103f217964
[Maps] convert Vector style descriptor to typescript (#60526)
* vector style descriptor TS

* revert color_utils TS conversion

* clean up TS errors

* updated blended layer to use vector style descriptor type

* fix eslint error

* use FIELD_ORIGIN.SOURCE instead of SOURCE_DATA_ID_ORIGIN

* fix other incorrect uses of SOURCE_DATA_ID_ORIGIN

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-20 11:29:31 -06:00
Melissa Alvarez c9cc04423d
[ML] Data Visualizer: error toast shows error text (#60682)
* dataviz searchbar:update error toast with full message

* update error toast title
2020-03-20 13:04:08 -04:00
Jen Huang 22f14b53cd
Fix config value type and schema (#60688) 2020-03-20 09:54:01 -07:00
Marco Vettorello 88612743a9
Update dependency @elastic/charts to v18.1.0 (#60578) 2020-03-20 17:37:11 +01:00
Jonathan Budzenski 854f242dc5
Only set timezone when user setting is a valid timezone (#57850)
* Only set timezone when user setting is a valid timezone

Currently we set the global browser timezone based on the user's
advanced settings.  This setting includes a list of timezones and a
non-standard 'Browser' option which can be translated as set the
timezone to my current.  In order to avoid warnings and possible future
errors we only set timezone if it exists in moments list of installed
timezones

Closes #38515

* feedback

* only set timezone if defined

* Update src/core/public/integrations/moment/moment_service.ts

Co-Authored-By: Mikhail Shustov <restrry@gmail.com>

* Update src/core/public/integrations/moment/moment_service.ts

Co-Authored-By: Mikhail Shustov <restrry@gmail.com>

* Update src/core/public/integrations/moment/moment_service.test.ts

Co-Authored-By: Mikhail Shustov <restrry@gmail.com>

* Update src/core/public/integrations/moment/moment_service.test.ts

Co-Authored-By: Mikhail Shustov <restrry@gmail.com>

* update test name

Co-authored-by: Mikhail Shustov <restrry@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-20 10:58:50 -05:00
Daniil Suleiman 1a1e2e7b2e
[NP] Remove ui/agg_types dependencies and move paginated table to kibana_legacy (#60276)
* fix agg type shims and move paginated table to kibana_legacy

* fix types

* fix i18n ids

* fix unit tests

* Update imports

* Remove ui/agg_types imports

* Clean up vis_default_editor plugin

* Remove agg_types imports in vis_type_table

* Clean up x-pack

* Clean up vis_type_vislib

* Last cleanups

* Update docs

* Mock Schemas in vis_type_metric

* Use data plugin mocks

* Remove ui/directives/paginate reference

* Remove snapshot

* Remove shallow

Co-authored-by: Joe Reuter <johannes.reuter@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-20 18:39:44 +03:00
patrykkopycinski 87e07ef64f
[SIEM] Fix types in rules tests (#60736)
* [SIEM] Fix types in rules tests

* Update create_rules.test.ts

* Update create_rules.test.ts
2020-03-20 14:57:07 +00:00
Gidi Meir Morris 4c19cad11b
[Alerting] prevent flickering when fields are updated in an alert (#60666)
This addresses the flickering in the graph when updating the Alert Add & Edit forms and adds an automatic refresh of the graph every 5 seconds.
2020-03-20 14:50:35 +00:00
Mike Côté 851b8a82a5
License checks for actions plugin (#59070)
* Define minimum license required for each action type (#58668)

* Add minimum required license

* Require at least gold license as a minimum license required on third party action types

* Use strings for license references

* Ensure license type is valid

* Fix some tests

* Add servicenow to gold

* Add tests

* Set license requirements on other built in action types

* Use jest.Mocked<ActionType> instead

* Change servicenow to platinum

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

* Make actions config mock and license state mock use factory pattern and jest mocks (#59370)

* Add license checks to action HTTP APIs (#59153)

* Initial work

* Handle errors in update action API

* Add unit tests for APIs

* Make action executor throw when action type isn't enabled

* Add test suite for basic license

* Fix ESLint errors

* Fix failing tests

* Attempt 1 to fix CI

* ESLint fixes

* Create sendResponse function on ActionTypeDisabledError

* Make disabled action types by config return 403

* Remove switch case

* Fix ESLint

* Add license checks within alerting / actions framework (#59699)

* Initial work

* Handle errors in update action API

* Add unit tests for APIs

* Verify action type before scheduling action task

* Make actions plugin.execute throw error if action type is disabled

* Bug fixes

* Make action executor throw when action type isn't enabled

* Add test suite for basic license

* Fix ESLint errors

* Stop action task from re-running when license check fails

* Fix failing tests

* Attempt 1 to fix CI

* ESLint fixes

* Create sendResponse function on ActionTypeDisabledError

* Make disabled action types by config return 403

* Remove switch case

* Fix ESLint

* Fix confusing assertion

* Add comment explaining double mock

* Log warning when alert action isn't scheduled

* Disable action types in UI when license doesn't support it (#59819)

* Initial work

* Handle errors in update action API

* Add unit tests for APIs

* Verify action type before scheduling action task

* Make actions plugin.execute throw error if action type is disabled

* Bug fixes

* Make action executor throw when action type isn't enabled

* Add test suite for basic license

* Fix ESLint errors

* Stop action task from re-running when license check fails

* Fix failing tests

* Attempt 1 to fix CI

* ESLint fixes

* Return enabledInConfig and enabledInLicense from actions get types API

* Disable cards that have invalid license in create connector flyout

* Create sendResponse function on ActionTypeDisabledError

* Make disabled action types by config return 403

* Remove switch case

* Fix ESLint

* Disable when creating alert action

* Return minimumLicenseRequired in /types API

* Disable row in connectors when action type is disabled

* Fix failing jest test

* Some refactoring

* Card in edit alert flyout

* Sort action types by name

* Add tooltips to create connector action type selector

* Add tooltips to alert flyout action type selector

* Add get more actions link in alert flyout

* Add callout when creating a connector

* Typos

* remove float right and use flexgroup

* replace pixels with eui variables

* turn on sass lint for triggers_actions_ui dir

* trying to add padding around cards

* Add callout in edit alert screen when some actions are disabled

* improve card selection for Add Connector flyout

* Fix cards for create connector

* Add tests

* ESLint issue

* Cleanup

* Cleanup pt2

* Fix type check errors

* moving to 3-columns cards for connector selection

* Change re-enable to enable terminology

* Revert "Change re-enable to enable terminology"

This reverts commit b497dfd6b6.

* Add re-enable comment

* Remove unecessary fragment

* Add type to actionTypeNodes

* Fix EuiLink to not have opacity of 0.7 when not hovered

* design cleanup in progress

* updating classNames

* using EuiIconTip

* Remove label on icon tip

* Fix failing jest test

Co-authored-by: Andrea Del Rio <delrio.andre@gmail.com>

* Add index to .index action type test

* PR feedback

* Add isErrorThatHandlesItsOwnResponse

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Andrea Del Rio <delrio.andre@gmail.com>
2020-03-20 10:49:37 -04:00
Yuliia Naumenko 64e09af107
Implemented ability to clear and properly validate alert interval (#60571)
* Implemented ability to clear and properly validate alert interval

* Fixed due to comments

* Fixed additional request for the last field

* Fixed failing test
2020-03-20 07:18:54 -07:00
Dmitry Lemeshko 992c502cf5
WebElementWrapper: add findByTestSubject/findAllByTestSubject to search with data-test-subj (#60568)
* [web_element_wrapper] add find/findAll to search with data-test-subj

* fixes

* fix wrong function call

* review fixes

* simplify test

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-20 17:18:35 +03:00
Aaron Caldwell 592ded89c0
[Maps] Update layer dependencies to NP (#59585)
* Layers dir up through sources migrated. Kibana services updated

* Create separate init method for plugin setup, leverage in embeddable factory

* Add NP timefilter, http, IndexPatternSelect

* Pull vis color utils into Maps

* Add NP dark mode and toast handling. Some fixes

* Init autocomplete and indexPattern via normal paths

* Test fixes and clean up

* Update index pattern and autocomplete refs. Make getters functions

* Fix remaining broken jest tests

* Update inspector start contract

* Clean up plugin and legacy files. Fix type issues

* Set inspector in plugin start method not external function

* Keep both injected var functions (legacy and NP). Move inspector init back to separate init function

* Add back ts-ignore on NP kibana services import
2020-03-20 08:17:05 -06:00
Matthias Wilhelm 9b07ddc1e2
[Discover] Remove StateManagementConfigProvider (#60221)
* Remove StateManagementConfigProvider from Discover

* Code cleanups
2020-03-20 14:45:00 +01:00
James Gowdy f18c571ed6
[ML] Listing all categorization wizard checks (#60502)
* [ML] Listing all categorization wizard checks

* fixing translation

* changes based on review

* moving check

* adding real values to messages

* reordering checks enum

* fixing types

* updating tests

* updating id
2020-03-20 12:07:54 +00:00
Jean-Louis Leysens 2c25520051
[Upgrade Assistant] First iteration of batch reindex docs (#59887)
* First iteration of batch reindex docs

Tested with docs generator repo

* Add top level bullet points and remove cruft

* Address PR feedback

Also move the experimental marker to similar position (before
description) on existing endpoint docs for UA.
2020-03-20 11:44:35 +01:00