Commit graph

31647 commits

Author SHA1 Message Date
Peter Pisljar ed55531207
cleanup visualizations api (#59958) 2020-03-23 19:19:39 +01:00
Matthias Wilhelm c537d453e6
Inline timezoneProvider function, remove ui/vis/lib/timezone (#60475)
* Inline getTimezone in discover, vis_type_timeseries,  timelion app & vis_type_timelion
2020-03-23 19:14:14 +01:00
MadameSheema 10afcf4be8
[SIEM] Adds 'Open one signal' Cypress test (#60484)
* adds data for having closed signals

* adds 'Open one signal when more than one closed signals are selected' test'

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-23 18:46:35 +01:00
Alison Goryachev 85481a7017
[UA] Upgrade assistant migration meta data can become stale (#60789) 2020-03-23 13:35:27 -04:00
Zacqary Adam Xeper 3c66662630
[Metrics Alerts] Remove metric field from doc count on backend (#60679)
* Remove metric field from doc count on backend

* Fix tests

* Type fix

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-23 12:33:00 -05:00
Andrew Cholakian 8143c078b6
[Uptime] Skip failing location test temporarily (#60938) 2020-03-23 12:54:49 -04:00
James Gowdy de7151e204
[ML] Disabling datafeed editing when job is running (#60751)
* [ML] Disabling datafeed editing when job is running

* changing variable

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-23 16:40:56 +00:00
Mike Côté 91e8e3e883
Adding authc.invalidateAPIKeyAsInternalUser (#60717)
* Initial work

* Fix type check issues

* Fix test failures

* Fix ESLint issues

* Add back comment

* PR feedback

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-23 12:39:55 -04:00
Ryland Herrick 21e8cea183
[SIEM] Add license check to ML Rule form (#60691)
* Gate ML Rules behind a license check

If they don't have a Platinum or Trial license, then we disable the ML
Card and provide them a link to the subscriptions marketing page.

* Add aria-describedby for new ML input fields

* Add data-test-subj to new ML input fields

* Remove unused prop

This is already passed as isLoading

* Fix capitalization on translation id

* Declare defaulted props as optional

* Gray out entire ML card when ML Rules are disabled

If we're editing an existing rule, or if the user has an insufficient
license, we disable both the card and its selectability. This is more
visually striking, and a more obvious CTA.
2020-03-23 11:10:40 -05:00
Brandon Kobel cca23c26fc
Adding authc.grantAPIKeyAsInternalUser (#60423)
* Parsing the Authorization HTTP header to grant API keys

* Using HTTPAuthorizationHeader and BasicHTTPAuthorizationHeaderCredentials

* Adding tests for grantAPIKey

* Adding http_authentication/ folder

* Removing test route

* Using new classes to create the headers we pass to ES

* No longer .toLowerCase() when parsing the scheme from the request

* Updating snapshots

* Update x-pack/plugins/security/server/authentication/http_authentication/http_authorization_header.ts

Co-Authored-By: Aleh Zasypkin <aleh.zasypkin@gmail.com>

* Updating another inline snapshot

* Adding JSDoc

* Renaming `grant` to `grantAsInternalUser`

* Adding forgotten test. Fixing snapshot

* Fixing mock

* Apply suggestions from code review

Co-Authored-By: Aleh Zasypkin <aleh.zasypkin@gmail.com>
Co-Authored-By: Mike Côté <mikecote@users.noreply.github.com>

* Using new classes for changing password

* Removing unneeded asScoped call

Co-authored-by: Aleh Zasypkin <aleh.zasypkin@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Mike Côté <mikecote@users.noreply.github.com>
2020-03-23 09:03:13 -07:00
Devon Thomson 05c995a939
Support Histogram Data Type (#59387)
Added the histogram field type to Kibana, to be used in the percentiles, percentiles ranks, and median aggregations.
2020-03-23 11:53:51 -04:00
Jean-Louis Leysens 938ad37640
[Upgrade Assistant] Fix edge case where reindex op can falsely be seen as stale (#60770)
* Fix edge case where reindex op is can falsely be seen as stale

This is for multiple Kibana workers, to ensure that an item just
coming off the queue is seen as "new" we set a "startedAt" field
which will update the reindex op and give it the full timeout
window.

* Update tests to use new api too

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-23 16:47:49 +01:00
Steph Milovic 969811eb20
[SIEM] [Cases] Update case icons (#60812) 2020-03-23 09:42:35 -06:00
Daniil Suleiman 1b583a2e27
[TSVB] Fix percentiles band mode (#60741)
* Fix percentiles band mode

* Add support of bar chart, fix tests

* Use accessor formatters

* Fix tests
2020-03-23 18:42:04 +03:00
Wylie Conlon 85615bdb3f
Fix formatter on range aggregation (#58651)
* Fix formatter on range aggregation

* Fix test that was using unformatted byte ranges

* Fix test

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-23 11:32:07 -04:00
Luke Elmers 3401ae42e0
Goodbye, legacy data plugin 👋 (#60449) 2020-03-23 09:17:27 -06:00
Phillip Burch a790877694
[Metrics UI] Alerting for metrics explorer and inventory (#58779)
* Add flyout with expressions

* Integrate frontend with backend

* Extended AlertContextValue with metadata optional property

* Progress

* Pre-fill criteria with current page filters

* Better validation. Naming for clarity

* Fix types for flyout

* Respect the groupby property in metric explorer

* Fix lint errors

* Fix text, add toast notifications

* Fix tests. Make sure update handles predefined expressions

* Dynamically load source from alert flyout

* Remove unused import

* Simplify and add group by functionality

* Remove unecessary useEffect

* disable exhastive deps

* Remove unecessary useEffect

* change language

* Implement design feedback

* Add alert dropdown to the header and snapshot screen

* Remove icon

* Remove unused props. Code cleanup

* Remove unused values

* Fix formatted message id

* Remove create alert option for now.

* Fix type issue

* Add rate, card and count as aggs

* Fix types

Co-authored-by: Yuliia Naumenko <yuliia.naumenko@elastic.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Henry Harding <henry.harding@elastic.co>
2020-03-23 10:02:11 -05:00
Alison Goryachev 8572e3f18f
[Remote clustersadopt changes to remote info API (#60795) 2020-03-23 10:42:40 -04:00
Brian Seeders 42539a56eb
Only run xpack siem cypress in PRs when there are siem changes (#60661) 2020-03-23 10:30:14 -04:00
Brian Seeders c22dbb1764
[CI] Add error steps and help links to PR comments (#60772) 2020-03-23 10:29:33 -04:00
Dmitry Lemeshko c7b0ade01d
skip flaky functional test (#60898) 2020-03-23 17:06:19 +03:00
Gidi Meir Morris a5aafc039d
[Alerting] Fixes mistake in empty list assertion (#60896) 2020-03-23 13:56:26 +00:00
Bhavya RM e235321903
a11y tests for login and logout (#60799)
a11y login screen
2020-03-23 09:45:19 -04:00
Gidi Meir Morris 7dc45f5441
removed boom errors from AlertNavigationRegistry (#60887) 2020-03-23 13:12:53 +00:00
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