Commit graph

426 commits

Author SHA1 Message Date
Liza Katz bdb73b55ef
[Search] Cleanup SearchRequest and SearchResponse types (#75471)
* improve test stability

* Replace SearchRequest = any with Record<string, any>

* Remove SearchResponse = any from data plugin

* docs

* logs

* Revert "Replace SearchRequest = any with Record<string, any>"

This reverts commit 9914ab5a01.

* code review

* list control

* null check

* null null null

* Jest fix
2020-08-23 15:34:40 +03:00
Zacqary Adam Xeper bcca9331b5
[Metrics UI] Get custom metrics working in inventory alerts with limited UI (#75073) 2020-08-20 13:28:10 -05:00
Zacqary Adam Xeper 0d8a4613e4
[Metrics UI] Support percentage format in threshold alerts (#72701)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-20 13:22:04 -05:00
Alejandro Fernández Gómez 96118624de
[Logs UI] Add "View in machine learning" links in the anomaly explorer (#74555)
Co-authored-by: Felix Stürmer <weltenwort@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-19 18:07:33 +02:00
Alejandro Fernández Gómez cf65b6ba8c
Track "view in context" usage (#74752)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-17 17:06:13 +02:00
Felix Stürmer 0f1128281e
[Logs UI] Remove apollo deps from log link-to routes (#74502)
This replaces the use of the old graphql-based `useSource` hook with the new plain JSON `useLogSource` hook.

It also fixes two more problems:

- A rendering problem with the source configuration loading screen and a `setState` race condition in the `useLogSource` hook.
- A non-backwards-compatible change of the `/link-to/:sourceId/logs` route in #61162.
2020-08-14 19:50:20 +02:00
Chris Cowan 1632391f35
[Metrics UI] Remove TSVB dependency from Metrics Explorer APIs (#74804)
* [Metrics UI] Remove TSVB dependency from Metrics Explorer APIs

* Update x-pack/plugins/infra/public/pages/metrics/metrics_explorer/components/chart_title.tsx

Co-authored-by: Zacqary Adam Xeper <Zacqary@users.noreply.github.com>

* Update x-pack/plugins/infra/server/lib/metrics/lib/calculate_bucket_size/calculate_auto.ts

Co-authored-by: Zacqary Adam Xeper <Zacqary@users.noreply.github.com>

* Update x-pack/plugins/infra/server/lib/metrics/lib/calculate_bucket_size/calculate_auto.ts

Co-authored-by: Zacqary Adam Xeper <Zacqary@users.noreply.github.com>

* Update x-pack/plugins/infra/server/lib/metrics/lib/convert_histogram_buckets_to_timeseries.ts

Co-authored-by: Zacqary Adam Xeper <Zacqary@users.noreply.github.com>

* Update x-pack/plugins/infra/server/lib/metrics/lib/convert_histogram_buckets_to_timeseries.ts

Co-authored-by: Zacqary Adam Xeper <Zacqary@users.noreply.github.com>

* Update x-pack/plugins/infra/server/routes/metrics_explorer/lib/find_interval_for_metrics.ts

Co-authored-by: Zacqary Adam Xeper <Zacqary@users.noreply.github.com>

* Fixing some names, changing some units

* Reverting TSVB calculate_auto; fixing names in infra

* Fixing translation names

* Fixing typo

Co-authored-by: Zacqary Adam Xeper <Zacqary@users.noreply.github.com>

Co-authored-by: Zacqary Adam Xeper <Zacqary@users.noreply.github.com>
2020-08-13 18:45:47 -07:00
Zacqary Adam Xeper cdc7d25561
[Metrics UI] Fix inventory footer misalignment (#74707) 2020-08-13 12:21:29 -05:00
Zacqary Adam Xeper 8095c7ba15
[Metrics UI] Add Jest tests for alert previews (#74890) 2020-08-13 09:32:14 -05:00
Kerry Gallagher 2e38f5a705
[Logs UI] Return 403s rather than 500s for ML privilege errors (#74506)
* Add ML privileges error checks to all routes
2020-08-12 15:22:00 +01:00
Zacqary Adam Xeper 8f15621cbd
[Metrics UI] Fix No Data preview pluralization (#74399)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-10 14:35:44 -05:00
Felix Stürmer 152f41c3b0
[Logs UI] Replace deprecated getInjectedVar with NP spaces API (#74280)
* Replace getInjectedVar() with NP spaces API

* Fix typo in comment

* Fix typo in comment

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-06 15:18:49 +02:00
Zacqary Adam Xeper 0737241dec
[Metrics UI] Fix validating Metrics Explorer URL (#74311) 2020-08-05 13:13:22 -05:00
Mikhail Shustov 88c0631344
Update @typescript-eslint to ensure compatibility with TypeScript v3.9 (#74091)
* bump @typescript-eslint deps

* update rules

* fix errors in pacakges

* fix src/

* fix x-pack

* fix test

* fix typings

* fix examples

* allow _ as prefix and suffix

* roll back prefix and suffix changes

* add eslint-plugin-eslint-comments

* report unused rules

* remove unused eslint comments from tests

* remove unused eslint comments 2nd pass

* remove unused eslint comments from src/

* remove unused comments in x-pack

* use no-script-url and no-unsanitized/property for ts files

* remove unused eslint comments

* eui/href-or-on-click removed when not complained

* no import/* rules for ts files

* cleanup

* remove the unused eslint-disable

* rollback unnecessary changes

* allow underscore prefix & sufix in type name

* update docs

* fix type error in enterprise search plugin mocks

* rename platform hack __coreProvider --> _coreProvider

* rollback space removal in src/core/public/legacy/legacy_service.test.ts

* fix naming convention in APM
2020-08-05 17:32:19 +02:00
Alejandro Fernández 22d6f09d31
[Logs UI] Correct trial period duration in anomaly splash screen (#74249) 2020-08-05 11:19:41 +02:00
Kerry Gallagher 89dba39273
Handle modifier keys (#74237) 2020-08-04 17:13:32 +01:00
Zacqary Adam Xeper 47d6be3b7e
[Metrics UI] Fix pluralization in Alert Preview (#74160) 2020-08-03 18:36:01 -05:00
Alejandro Fernández 909c9826ff
[Metrics UI] Fix typo on view selector in metrics explorer (#74084) 2020-08-03 18:27:28 +02:00
Chris Cowan 2e37239e50
[Metrics UI] Fix Metrics Explorer TSVB link to use workaround pattern (#73986)
* [Metrics UI] Fix Metrics Explorer TSVB link to use workaround pattern

* Adding link to TSVB bug to comment
2020-07-31 13:20:11 -07:00
Zacqary Adam Xeper 5fa162c699
[Metrics UI] Fix all threshold alert conditions disappearing due to alert prefill (#73708)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-30 22:39:34 -05:00
Zacqary Adam Xeper d3f498af9a
[Metrics UI] Fix alert previews of ungrouped alerts (#73735)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-30 22:37:54 -05:00
Chris Cowan aa668db796
[Metrics UI] Fix alert management to open without refresh (#73739)
* [Metrics UI] Fix alert management to open without refresh

* removing unecessary code

* Deleting unused imports

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-30 19:01:46 -07:00
Zacqary Adam Xeper c2d8869cca
[Metrics UI] Fix previewing of No Data results (#73753) 2020-07-30 15:52:32 -05:00
Alejandro Fernández 8307642098
[Logs UI] Tweak logs query for the observability dashboard (#73710) 2020-07-30 14:41:47 +02:00
Zacqary Adam Xeper f8ba95f1fe
[Metrics UI] Fix evaluating rate-aggregated alerts when there's no normalized value (#73545)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-29 13:05:19 -05:00
Zacqary Adam Xeper cbfdb36d9f
[Metrics UI] Fix formatting of values in inventory context.reason (#73155)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-29 13:04:41 -05:00
Zacqary Adam Xeper e202a830d7
[Metrics UI] Fix No Data in Inventory alerts/Snapshot API (#72513)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-29 11:07:41 -05:00
Chris Cowan 631c17c6f2
[Metrics UI] Fix hasData call to ensure it has data not just indices (#72969)
* [Metrics UI] Fix hasData call to ensure it has data not just indices

* Fixing formatting

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-29 06:56:25 -07:00
Phillip Burch 78aa24dbd6
Make button appear clickable, change state of empty text (#73496)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-28 19:30:42 -05:00
Zacqary Adam Xeper 48bb7c79c4
[Metrics UI] Fix filterQuery on Inventory alert preview (#73329)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-28 15:56:06 -05:00
Chris Cowan 2d8a41d367
[Metrics UI] Make composite size configurable to avoid max buckets (#72955)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-28 12:39:36 -07:00
Felix Stürmer cdb1c0d9a4
[Logs UI] Check for presence of data instead of presence of indices in overview page fetchers (#73101)
This causes the "has data" check for the observability overview page to not only check for the presence of log indices but also of log entries.
2020-07-28 16:44:27 +02:00
Gidi Meir Morris f4104743e3
[Alerting] Control Alerts Management via feature controls & privileges (#72029)
This PR removes the alerting and actions ui privileges (alerting:show, actions:show, etc...) and instead relies on the standard Kibana feature control model to decide whether management displays the Alerts Management section under management.
2020-07-28 15:20:24 +01:00
Larry Gregory 09b11b61f0
Introduce reserved ml privilege for the apm_user role (#72266)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-28 07:44:37 -04:00
Phillip Burch cc84ee3185
[Metrics UI] Saved views bugs (#72518)
* Add test for logs and metrics telemetry

* wait before you go

* Remove kubenetes

* Fix type check

* Add back kubernetes test

* Remove kubernetes

* Don't allow deleting default default view.

* Fix bug with duplicate loads of data.

Because the load data function takes options.source and the source of options can change, we need to remove it from deps

* Remove unused variable

* Reload when loadData function is changed

* Don't send the request immediately

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-27 21:28:39 -05:00
Felix Stürmer aa45ac89b0
[Logs UI] Return empty result sets instead of 500 or 404 for analysis results (#72824)
This changes the analysis results routes to return empty result sets with HTTP status code 200 instead of and inconsistent status codes 500 or 404.
2020-07-27 16:36:25 +02:00
Felix Stürmer ba55ca9e86
[Logs UI] Add missing ML capabilities checks (#72606)
This adds several missing Machine Learning capabilities checks to the UI to make sure the user doesn't run into downstream errors resulting from the lack of permissions. It also updates the messages of the permission prompt screens to refer to the new Kibana Machine Learning permissions instead of the old built-in roles.
2020-07-22 18:32:17 +02:00
Gidi Meir Morris 4abe864f10
Adds Role Based Access-Control to the Alerting & Action plugins based on Kibana Feature Controls (#67157)
This PR adds _Role Based Access-Control_ to the Alerting framework & Actions feature using  Kibana Feature Controls, addressing most of the Meta issue: https://github.com/elastic/kibana/issues/43994

This also closes https://github.com/elastic/kibana/issues/62438

This PR includes the following:

1. Adds `alerting` specific Security Actions (not to be confused with Alerting Actions) to the `security` plugin which allows us to assign alerting specific privileges to users of other plugins using the `features` plugin.
2. Removes the security wrapper from the savedObjectsClient in AlertsClient and instead plugs in the new AlertsAuthorization which performs the privilege checks on each api call made to the AlertsClient.
3. Adds privileges in each plugin that is already using the Alerting Framework which mirror (as closely as possible) the existing api-level tag-based privileges and plugs them into the AlertsClient.
4. Adds feature granted privileges arounds Actions (by relying on Saved Object privileges under the hood) and plugs them into the ActionsClient
5. Removes the legacy api-level tag-based privilege system from both the Alerts and Action HTTP APIs
2020-07-22 14:45:57 +01:00
Zacqary Adam Xeper 85d8ec8905
[Metrics UI] Fix Alert Preview Error design (#71005)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-20 13:18:43 -05:00
Kerry Gallagher 11182c8ef7
Fix match phrase and not match phrase comparators (#71850)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-20 15:51:22 +01:00
Felix Stürmer 44888d3536
[Logs UI] Fix display of dataset values in anomaly and category example rows (#71693)
This removes an unnecessary JSON encoding step of values before they are passed to the field column component used in the log entry example rows in both the Anomalies and Categories tabs.
2020-07-17 15:08:38 +02:00
Thomas Watson fc5bc6b6a2
Add @elastic/safer-lodash-set as an alternative to lodash.set (#67452) 2020-07-15 10:29:57 +02:00
James Gowdy a1e511a727
[ML] Changing all calls to ML endpoints to use internal user (#70487)
* [ML] Changing all calls to ML endpoints to use internal user

* updating alerting

* updating documentation

* [ML] Changing all calls to ML endpoints to use internal user

* updating alerting

* updating documentation

* fixing missed types

* adding authorization headers to endpoint calls

* correcting has privileges call

* updating security tests

* odd eslint error

* adding auth header to module setup

* fixing missing auth argument

* fixing delete DFA job permission checks

* removing debug test tag

* removing additional ml privilege checks

* adding authorization header to _evaluate

* updating alerting cluster client name

* code clean up

* changing authorizationHeader name

* updating alterting documentation

* fixing secondary credentials

* adding management links

* updating SIEM telemetry

* fixing merge conflicts

* granting access to index patterns

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-14 15:48:24 +01:00
Kerry Gallagher a91209c92f
[Logs UI] Anomalies page dataset filtering (#71110)
Adds dataset filtering to logs anomalies page
2020-07-14 15:26:22 +01:00
Alejandro Fernández d8204643fe
[Logs UI] Refine log entry row context button (#71260)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-14 13:28:35 +02:00
Zacqary Adam Xeper 6c4fc9ca20
[Logs UI] Remove UUID from Alert Instances (#71340)
* [Logs UI] Remove UUID from Alert Instances

* Fix bad template string

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-14 11:55:05 +01:00
Zacqary Adam Xeper 5ef8d3f509
[Metrics UI] Remove UUID from Alert Instance IDs (#71335)
* [Metrics UI] Use alertId instead of uuid for alertInstanceIds
2020-07-14 11:54:29 +01:00
Cauê Marcondes 3374b2d3b0
[Observability] Change appLink passing the date range (#71259)
* changing apm appLink

* changing apm appLink

* removing title from api

* adding absolute and relative times

* addressing pr comments

* addressing pr comments

* addressing pr comments

* fixing TS issues

* addressing pr comments

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-14 11:05:48 +02:00
Felix Stürmer ff7b736cc3
[Logs UI] Show log analysis ML jobs in a list (#71132)
This modifies the ML job setup flyout of the anomalies tab to offer a list of the two available modules. Via the list each of the modules' jobs can be created or re-created.
2020-07-13 23:29:55 +02:00
Kerry Gallagher 4db5816459
[Logs UI] Add category anomalies to anomalies page (#70982)
* Add category anomalies to anomalies page

Co-authored-by: Felix Stürmer <weltenwort@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-13 18:09:10 +01:00