Commit graph

206 commits

Author SHA1 Message Date
Shahzad f367deca48
[Exploratory View] Refactor series storage (#100571)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-03 08:59:22 +02:00
Shahzad b8f6bf5747
[Exploratory view] Core web vitals (#100320)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-02 12:41:44 +02:00
Felix Stürmer f7698bd8aa
[Observability] Expose options to customize sidebar route matching (#100886)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-01 11:21:29 +02:00
Nathan L Smith a00fa53000
Fix bug with Observability > APM header navigation (#100845)
Call `setHeaderActionMenu(undefined)` when the HeaderMenuPortal is unmounted.

Found this line in the docs:

> Calling the handler with `undefined` will unmount the current mount point.

Which we weren't doing before.

Previous behavior:

* Go to /app/observability/alerts
* Click the "View in app" button for an APM alert
* Click back
* Click the "View in app" button for an APM alert
* Get a weird toast error message and the header menu is gone forever

Now:

* Go to /app/observability/alerts
* Click the "View in app" button for an APM alert
* Click back
* Click the "View in app" button for an APM alert
* Get a working header menu

Fixes #97140
2021-05-28 11:10:14 -05:00
Søren Louv-Jansen 79945fe027
[Observability] Fix typo in readme for new navigation (#100861)
* [Observability] Fix typo in readme for new navigation

* Add rxjs dep
2021-05-28 14:41:42 +02:00
Casper Hübertz de2f3c468a
[Observability] Fix README.md link to component (#100801) 2021-05-27 21:27:16 +02:00
Georgii Gorbachev 7fd6539dca
[RAC] Rule monitoring: Event Log for Rule Registry (#98353)
**Needed for:** rule execution log for Security https://github.com/elastic/kibana/pull/94143
**Related to:**

- alerts-as-data: https://github.com/elastic/kibana/issues/93728, https://github.com/elastic/kibana/issues/93729, https://github.com/elastic/kibana/issues/93730
- RFC for index naming https://github.com/elastic/kibana/issues/98912

## Summary

This PR adds a mechanism for writing to / reading from / bootstrapping indices for RAC project into the `rule_registry` plugin. Particularly, indices for alerts-as-data and rule execution events. This implementation is similar to existing implementations like `event_log` plugin (see https://github.com/elastic/kibana/pull/98353#issuecomment-833045980 for historical perspective), but we're going to converge all of them into 1 or 2 implementations. At least we should have a single one in `rule_registry` itself.

In this PR I tried to incorporate most of the feedback received in the RFC (https://github.com/elastic/kibana/issues/98912), but if you notice I missed/forgot something, please let me know in the comments.

Done in this PR:

- [x] Schema-agnostic APIs for working with Elasticsearch.
- [x] Schema-aware log definition and bootstrapping API (creating hierarchical logs).
- [x] Schema-aware write API (logging events).
- [x] Schema-aware read API (searching logs, filtering, sorting, pagination, aggregation).
- [x] Support for Kibana spaces, space-aware index bootstrapping (either at rule creation or rule execution time).

As for reviewing this PR, perhaps it might be easier to start with:

- checking description of https://github.com/elastic/kibana/issues/98912
- checking usage examples https://github.com/elastic/kibana/pull/98353/files#diff-c049ff2198cc69bd50a69e92d29e88da7e10b9a152bdaceaf3d41826e712c12b
- checking public api https://github.com/elastic/kibana/pull/98353/files#diff-8e9ef0dbcbc60b1861d492a03865b2ae76a56ec38ada61898c991d3a74bd6268

## Next steps

Next steps towards rule execution log in Security (https://github.com/elastic/kibana/pull/94143):

- define actual schema for rule execution events
- inject instance of rule execution log into Security rule executors and route handlers
- implement actual execution logging in rule executors
- update route handlers to start fetching execution events and metrics from the log instead of custom saved objects

Next steps in the context of RAC and unified implementation:

- converge this implementation with `RuleDataService` implementation
  - implement robust index bootstrapping
  - reconsider using FieldMap as a generic type parameter
  - implement validation for documents being indexed
- cover the final implementation with tests
- write comprehensive docs: update plugin README, add JSDoc comments to all public interfaces
2021-05-27 18:28:19 +03:00
Felix Stürmer 06d276e060
[Logs UI] Add shared observability page template and navigation (#99380)
Co-authored-by: Kerry Gallagher <471693+Kerry350@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-27 16:58:15 +02:00
Nathan L Smith 7fc4a1f80f
Add kibana.yml configuration for cases (#100583)
Make it so `xpack.observability.unsafe.alertingExperience.enabled` only shows and hides the Alerts page, and `xpack.observability.unsafe.cases.enabled` show and hides the Cases page.
2021-05-27 09:43:12 -05:00
Nathan L Smith e61c6660f7
Open/Closed filter for observability alerts page (#99217) 2021-05-25 12:40:14 -05:00
Larry Gregory 907203d68e
Ban use of lodash.template (#100277)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-19 10:06:52 -04:00
Dominique Clarke 4674762657
[APM][RUM] adjust data types for uiFilters and range in APM requests (#99257)
* update has_rum_data api query types

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-14 14:10:18 -04:00
Dominique Clarke 42fa42a00a
[Observability] [Exploratory view] update v7 button styles (#100113)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-14 12:19:31 -04:00
Alejandro Fernández Haro 6bafb59fd5
fix-typo: Use of than instead of then (#100030) 2021-05-13 17:35:38 -04:00
Dario Gieselaar bdde884d09
[RAC] Decouple registry from alerts-as-data client (#98935) 2021-05-13 17:12:47 +02:00
Dominique Clarke 497cc5a8e8
[Observability] update exploratory view title to analyze data (#99270)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-12 11:05:00 -04:00
Nathan L Smith f736df990c
Observability alerting flyout and page layout improvements (#99103)
* Make the flyout `s` instead of `m` size
* Remove flyout tabs
* Make flyout description list `compressed`
* Make spacer before description list `s` size
* Use `EuiPageTemplate` on alerts and cases pages.
2021-05-03 20:53:33 -05:00
Shahzad d9bc163603
[Exploratory view] Restore links for ux/synthetics data (#98759) 2021-04-30 13:08:45 -04:00
Shahzad 8ac4892abd
[Exploratory View] Fixed brushing/scrubbing on time series charts (#98623)
Co-authored-by: Casper Hübertz <casper@formgeist.com>
2021-04-29 14:14:11 +02:00
Katrin Freihofner b322f20cfe
Polish: wording, experimental badge and button sizes (#98655) 2021-04-29 11:56:48 +02:00
Shahzad 5023dce97c
[Exploratory View] Polish design and layout fixes (#98123)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-28 16:08:16 +02:00
Shahzad 92da713f26
[Exploratory View] Fix/Improve field values search in exploratory view (#97836)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-26 18:05:13 +02:00
Nathan L Smith 7c9475e36c
Fix metric unit wrapping on observability overview sparklines (#97718)
Wrap these in a flex group the same way the APM sparklines work to prevent the wrapping of the units.
2021-04-26 08:00:09 -05:00
Shahzad 5de8ee101d
[Exploratory view] use synthetics and rum indices settings (#97425) 2021-04-20 22:00:21 +02:00
Shahzad df7ff908cb
[Exploratory view] Added ping histogram link (#97437)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-20 21:59:23 +02:00
Dominique Clarke a4d35601b5
[Uptime] Add Custom Fleet Integration UI (#91584)
Register Synthetics integration package override to provide custom integration ui
2021-04-20 13:33:46 -04:00
Dario Gieselaar 7271827ff1
[APM] Show alerts in context (#97450) 2021-04-20 15:07:09 +02:00
Nathan L Smith 042fa1a2ce
Remove alerting feature flag from advanced settings (#97265)
* Remove alerting feature flag from advanced settings

Make it so the alerting UI in Observability can only be turned on and off in kibana.yml with `xpack.observability.enableAlertingExperience`.

We no longer:

* Allow turning this on and off for the current space in the advanced settings in Kibana
* Allow turning this on on cloud
* Send telemetry on whether or not the flag is enabled

Add some docs in READMEs as well.
2021-04-19 22:09:51 -05:00
Nathan L Smith c67cda194f
Flyout and alerts table improvements (#96976)
* Extend the TopAlert interface to include all the properties of the alert as well as the computed properties we add. Use these in the table and flyout.
* Create a severity badge and use it in the table and flyout

![image](https://user-images.githubusercontent.com/9912/114796499-bc7d2b00-9d56-11eb-89fa-17c0240819ee.png)

* Fix the query language toggle in the search bar

![image](https://user-images.githubusercontent.com/9912/114796507-c69f2980-9d56-11eb-8cfc-8432e4a71e77.png)

# Table

* Update status badges to match design

![image](https://user-images.githubusercontent.com/9912/114796518-ce5ece00-9d56-11eb-80a7-b8c8aa63d6b5.png)

* Remove checkbox column
* Make flyout open when clicking the reason
* Change alert details link to a view in app link

![image](https://user-images.githubusercontent.com/9912/114796530-d74f9f80-9d56-11eb-951c-91e544c6e1d5.png)

# Flyout

* Add action button to flyout
* Replace table on flyout with description list
* Remove unused tabs on flyout
* Add rule type to flyout heading
* Add expected and actual value to the flyout

![image](https://user-images.githubusercontent.com/9912/114796550-e59dbb80-9d56-11eb-9825-25da979c3b22.png)

Fixes #96907.
2021-04-19 15:12:05 -05:00
Shahzad 1bc7e5462f
[Exploratory view] integerate page views to exploratory view (#97258) 2021-04-19 09:28:44 +02:00
Dario Gieselaar fed17c2b6e
Rule registry bundle size (#97251) 2021-04-18 16:40:54 +02:00
Dario Gieselaar 5bb9eecd26
[RAC] Populate Observability alerts table with data from alerts indices (#96692)
* Set up Observability rule APIs

* Populate alerts table with data from API

* Move field map types/utils to common

* Format reason/link in alert type

* Format reason/link in alert type

* Fix issues with tsconfigs

* Storybook cleanup for example alerts

* Use `MemoryRouter` in the stories and `useHistory` in the component to get the history
* Replace examples with ones from "real" data
* Use `() => {}` instead of `jest.fn()` in mock registry data

* Store/display evaluations, add active/recovered badge

* Some more story fixes

* Decode rule data with type from owning registry

* Use transaction type/environment in link to app

* Fix type issues

* Fix API tests

* Undo changes in task_runner.ts

* Remove Mutable<> wrappers for field map

* Remove logger.debug calls in alerting es client

* Add API test for recovery of alerts

* Revert changes to src/core/server/http/router

* Use type imports where possible

* Update limits

* Set limit to 100kb

Co-authored-by: Nathan L Smith <smith@nlsmith.com>
2021-04-15 18:25:50 +02:00
Shahzad cbf24cd640
[Lens] Open lens in new tab via state transfer (#96723) 2021-04-15 14:49:55 +02:00
Shahzad c68eab6298
[Exploratory view] Improve/Polish components usage (#96782) 2021-04-15 11:55:57 +02:00
Shahzad a2c47ef5f5
[Exploratory View]Additional metrics for kpi over time (#96532) 2021-04-12 15:53:53 +02:00
Dario Gieselaar dfaf3ac8f5
[RAC] Rule registry plugin (#95903)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-09 10:35:44 +02:00
Shahzad 391e92ead3
[Exploratory view] Use index patterns for formatting (#96280) 2021-04-08 07:16:23 +02:00
Nathan L Smith 8d2d2ad864
Replace EuiPanel with EuiCard when using beta badges (#96147)
In elastic/eui#4649 the `betaBadgeLabel` and related props have been removed from `EuiPanel` and it's now recommended to use an `EuiCard` instead.

Replace these in APM and Observability plugins and update stories so examples can be viewed.
2021-04-07 16:51:05 -05:00
Chris Cowan 91b727f412
[Metrics UI] Observability Overview Host Summary (#90879)
* [Metrics UI] Observability Overview Host Summary

* Adding UI elements

* Adding logos

* Changing the size of the request

* Change to new ECS fields for network traffic

* Adding logos to HostLink component

* Round seconds

* fixing data handler test

* Fixing test for metrics_overview_fetchers

* Adding types for SVG to observability

* Adding i18n support to table labels

* removing unused translations

* move back to host.network.(in,out).bytes

* Adding changes to source from #95334

* Fixing source type

* Removing unintentional change.

* Maybe, fixing types

* removing svg typings

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-06 08:38:12 -07:00
Shahzad 390821d884
[Uptime] Simplift rtl test (#96296) 2021-04-06 15:59:46 +02:00
Mikhail Shustov e457f212c4
Revert "TS Incremental build exclude test files (#95610)" (#96223)
This reverts commit b6e582c53e.
2021-04-05 11:59:26 -07:00
Cauê Marcondes 9cebff1298
[OBS]home page is showing incorrect value of APM throughput (tpm) (#95991)
* fixing obs transaction per minute value

* addressing PR comments

* fixing unit test

* addressing PR comments

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-05 10:51:56 -04:00
Shahzad a640522140
[Observability] Exploratory View initial skeleton (#94426)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-05 15:26:48 +02:00
Mikhail Shustov b6e582c53e
TS Incremental build exclude test files (#95610)
* add base config for all the TS projects

* all the project use new tsconfig.project.json

* compile test files in the high-level tsconfig.json

* fix TS error in maps plugin

* fix TS error in infra plugin

* exclude mote test and test until folders

* uptime. do not import test code within prod code

* expressions. do not import test code within prod code

* data: export mocks from high level folder

* task_manager: comply with es client typings

* infra: remove unused enzyme_helpers

* check_ts_project requires "include" key

* ts_check should handle parent configs

* all ts configs should extend base one

* exclude test folders from plugins

* update patterns to fix ts_check errors

* Apply suggestions from code review

Co-authored-by: Constance <constancecchen@users.noreply.github.com>

* uptime: MountWithReduxProvider to test helpers

Co-authored-by: Constance <constancecchen@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-01 14:40:47 +02:00
Søren Louv-Jansen 84adfe551b
[APM] Add elasticsearch queries to api response (#95146) 2021-03-29 07:50:27 +02:00
Shahzad b9f5d0c2e1
[Observability] Update plugin start/setup types naming (#95301) 2021-03-26 14:48:08 +01:00
Casper Hübertz e894ee973f
[Observability] Change icon ref (#95367) 2021-03-25 14:29:51 +01:00
Tomas Della Vedova 238791b942
ES client : use the new type definitions (#83808)
* Use client from branch

* Get type checking working in core

* Fix types in other plugins

* Update client types + remove type errors from core

* migrate Task Manager Elasticsearch typing from legacy library to client library

* use SortOrder instead o string in alerts

* Update client types + fix core type issues

* fix maps ts errors

* Update Lens types

* Convert Search Profiler body from a string to an object to conform to SearchRequest type.

* Fix SOT types

* Fix/mute Security/Spaces plugins type errors.

* Fix bootstrap types

* Fix painless_lab

* corrected es typing in Event Log

* Use new types from client for inferred search responses

* Latest type defs

* Integrate latest type defs for APM/UX

* fix core errors

* fix telemetry errors

* fix canvas errors

* fix data_enhanced errors

* fix event_log errors

* mute lens errors

* fix or mute maps errors

* fix reporting errors

* fix security errors

* mute errors in task_manager

* fix errors in telemetry_collection_xpack

* fix errors in data plugins

* fix errors in alerts

* mute errors in index_management

* fix task_manager errors

* mute or fix lens errors

* fix upgrade_assistant errors

* fix or mute errors in index_lifecycle_management

* fix discover errors

* fix core tests

* ML changes

* fix core type errors

* mute error in kbn-es-archiver

* fix error in data plugin

* fix error in telemetry plugin

* fix error in discover

* fix discover errors

* fix errors in task_manager

* fix security errors

* fix wrong conflict resolution

* address errors with upstream code

* update deps to the last commit

* remove outdated comments

* fix core errors

* fix errors after update

* adding more expect errors to ML

* pull the lastest changes

* fix core errors

* fix errors in infra plugin

* fix errors in uptime plugin

* fix errors in ml

* fix errors in xpack telemetry

* fix or mute errors in transform

* fix errors in upgrade assistant

* fix or mute fleet errors

* start fixing apm errors

* fix errors in osquery

* fix telemetry tests

* core cleanup

* fix asMutableArray imports

* cleanup

* data_enhanced cleanup

* cleanup events_log

* cleaup

* fix error in kbn-es-archiver

* fix errors in kbn-es-archiver

* fix errors in kbn-es-archiver

* fix ES typings for Hit

* fix SO

* fix actions plugin

* fix fleet

* fix maps

* fix stack_alerts

* fix eslint problems

* fix event_log unit tests

* fix failures in data_enhanced tests

* fix test failure in kbn-es-archiver

* fix test failures in index_pattern_management

* fixing ML test

* remove outdated comment in kbn-es-archiver

* fix error type in ml

* fix eslint errors in osquery plugin

* fix runtime error in infra plugin

* revert changes to event_log cluser exist check

* fix eslint error in osquery

* fixing ML endpoint argument types

* fx types

* Update api-extractor docs

* attempt fix for ese test

* Fix lint error

* Fix types for ts refs

* Fix data_enhanced unit test

* fix lens types

* generate docs

* Fix a number of type issues in monitoring and ml

* fix triggers_actions_ui

* Fix ILM functional test

* Put search.d.ts typings back

* fix data plugin

* Update typings in typings/elasticsearch

* Update snapshots

* mute errors in task_manager

* mute fleet errors

* lens. remove unnecessary ts-expect-errors

* fix errors in stack_alerts

* mute errors in osquery

* fix errors in security_solution

* fix errors in lists

* fix errors in cases

* mute errors in search_examples

* use KibanaClient to enforce promise-based API

* fix errors in test/ folder

* update comment

* fix errors in x-pack/test folder

* fix errors in ml plugin

* fix optional fields in ml api_integartoon tests

* fix another casting problem in ml tests

* fix another ml test failure

* fix fleet problem after conflict resolution

* rollback changes in security_solution. trying to fix test

* Update type for discover rows

* uncomment runtime_mappings as its outdated

* address comments from Wylie

* remove eslint error due to any

* mute error due to incompatibility

* Apply suggestions from code review

Co-authored-by: John Schulz <github.com@jfsiii.org>

* fix type error in lens tests

* Update x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.ts

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

* Update x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.test.ts

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

* update deps

* fix errors in core types

* fix errors for the new elastic/elasticsearch version

* remove unused type

* remove unnecessary manual type cast and put optional chaining back

* ML: mute Datafeed is missing indices_options

* Apply suggestions from code review

Co-authored-by: Josh Dover <1813008+joshdover@users.noreply.github.com>

* use canary pacakge instead of git commit

Co-authored-by: Josh Dover <me@joshdover.com>
Co-authored-by: Josh Dover <1813008+joshdover@users.noreply.github.com>
Co-authored-by: Gidi Meir Morris <github@gidi.io>
Co-authored-by: Nathan Reese <reese.nathan@gmail.com>
Co-authored-by: Wylie Conlon <wylieconlon@gmail.com>
Co-authored-by: CJ Cenizal <cj@cenizal.com>
Co-authored-by: Aleh Zasypkin <aleh.zasypkin@gmail.com>
Co-authored-by: Dario Gieselaar <dario.gieselaar@elastic.co>
Co-authored-by: restrry <restrry@gmail.com>
Co-authored-by: James Gowdy <jgowdy@elastic.co>
Co-authored-by: John Schulz <github.com@jfsiii.org>
Co-authored-by: Alison Goryachev <alisonmllr20@gmail.com>
2021-03-25 04:47:16 -04:00
Shahzad 9724051f92
[Observability] add loading state in use fetcher (#95292) 2021-03-25 09:06:58 +01:00
Cauê Marcondes 134959d224
[APM] The Observability Getting Started page infinitely redirects, breaking browser's back button (#95083)
* fixing browser back button

* fixing test
2021-03-23 12:42:36 -04:00
Nathan L Smith 5e31f91614
Alerts and cases page components for observability plugin (#93365)
Create components for the alerts and cases pages. This only contains basic empty components and stories for them.
2021-03-23 07:57:56 -05:00
Shahzad 2b4bd10781
[Observability] Shared Field Suggestion value component (#94841)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-23 09:25:00 +01:00
Mike Côté 23ce8dcfdb
Rename alerts plugin to alerting (#92898)
* Rename alerts plugin to alerting

* Deprecate old config values

* Few more renames

* Update plugin list

* Rename xpack.alerts -> xpack.alerting

* Fix some ESLint rules

* Fix typecheck

* Fix some test failures

* Some more renames

* Fix ESLint

* Fix some test failures

* Fix failing jest test

* Undo exclusive test

* Fix APM deps

* Fix docs

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-05 13:59:34 -05:00
Dario Gieselaar 75364aa11e
[APM] Hoist HeaderMenuPortal to prevent unmounts (#92012) 2021-02-22 19:17:55 +01:00
Dario Gieselaar b71f49fca3
[APM] Wrap Elasticsearch client errors (#91125)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-17 09:28:46 +01:00
Shahzad a1a2536b5b
[Uptime] Waterfall filters (#89185)
* WIP

* Use multi canvas solution

* type

* fix test

* adde unit tests

* reduce item to 150

* update margins

* use constant

* update z-index

* added key

* wip

* wip

* wip filters

* reorgnaise components

* fix issue

* update filter

* only highlight button

* water fall test

* styling

* fix styling

* test

* fix types

* update test

* update ari hidden

* added click telemetry for waterfall filters

* added input click telemetry

* update filter behaviour

* fixed typo

* fix type

* fix styling

* persist original resource number in waterfall sidebar when showing only highlighted resources

* update waterfall filter collapse checkbox content

* update use_bar_charts to work with filtered data

* update network request total label to include filtered requests

* adjust telemetry

* add accessible text

* add waterfall chart view telemetry

* updated mime type filter label translations

* adjust total network requests to use FormattedMessage

* adjust translations and tests

* use FormattedMessage in NetworkRequestsTotal

* ensure sidebar persists when 0 resources match filter

* use destructuring in waterfall sidebar item

* reset collapse requests checkbox when filters are removed

* update license headers

Co-authored-by: Dominique Clarke <dominique.clarke@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-08 15:26:57 -05:00
Pierre Gayvallet 3b3327dbc3
Migrate most plugins to synchronous lifecycle (#89562)
* first pass

* migrate more plugins

* migrate yet more plugins

* more oss plugins

* fix test file

* change Plugin signature on the client-side too

* fix test types

* migrate OSS client-side plugins

* migrate OSS client-side test plugins

* migrate xpack client-side plugins

* revert fix attempt on fleet plugin

* fix presentation start signature

* fix yet another signature

* add warnings for server-side async plugins in dev mode

* remove unused import

* fix isPromise

* Add client-side deprecations

* update migration examples

* update generated doc

* fix xpack unit tests

* nit

* (will be reverted) explicitly await for license to be ready in the auth hook

* Revert "(will be reverted) explicitly await for license to be ready in the auth hook"

This reverts commit fdf73feb

* restore await on on promise contracts

* Revert "(will be reverted) explicitly await for license to be ready in the auth hook"

This reverts commit fdf73feb

* Revert "restore await on on promise contracts"

This reverts commit c5f2fe51

* add delay before starting tests in FTR

* update deprecation ts doc

* add explicit contract for monitoring setup

* migrate monitoring plugin to sync

* change plugin timeout to 10sec

* use delay instead of silence
2021-02-08 10:19:54 +01:00
Brandon Kobel 4584a8b570
Elastic License 2.0 (#90099)
* Updating everything except the license headers themselves

* Applying ESLint rules

* Manually replacing the stragglers
2021-02-03 18:12:39 -08:00
Nathan L Smith 4940a1cbd9
TypeScript project references for Observability plugin (#89320)
References #80508. References #81003.
2021-02-02 11:38:20 -06:00
Nathan L Smith 5884daeba5
Remove circular dependecy between apm and infra (#89739)
* Move `getTraceUrl` in the APM plugin to `getApmTraceUrl` in the observability plugin and use that instead in infra.
* Remove unused APM plugin depenency in infra.
* Use `pathname` instead of `hash` in infra to apm link to avoid unnecessary redirect.
2021-02-01 14:09:33 -06:00
Casper Hübertz f0717a0a79
[Observability] ActionMenu style fixes (#89547)
* [Observability] Reduced space between title and subtitle

* [Observability] Reduce margin between sections

* [Observability] Reduce list item font size

* [Observability] Remove spacer

* [APM] Changes button style and label

* [Logs] Changes the actions button label and style

* [Logs] Fixes the overlap of actions button and close

* Updated test and snapshot

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-01 10:54:08 +01:00
Dario Gieselaar 9e68975054
[APM] Upgrade ES client (#86594)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-27 12:35:38 +01:00
Nathan L Smith e5588a129b
Move EUI styled components integration to kibana_react (#86065)
...from xpack_legacy.

Remove the duplicated typings from the observability plugin and only use the ones from kibana_react.

Fixes #78248.
2021-01-25 13:48:35 -06:00
Shahzad 6391ef9c45
[Observability] Lazy load shared components (#88802)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-25 17:08:31 +01:00
Mikhail Shustov b3a9754394
[Core] Explicit typings for request handler context (#88718)
* move context to server part. couple with RequestHandlerContext

Context implementation will be simplified in follow-up.

* adopt core code

* adopt bfetch code

* adopt data code

* adopt search examples

* adopt vis_type_timelion

* adopt vis_type_timeseries

* adopt plugin functional tests

* adopt actions

* adopt alerting plugin

* adopt APM plugin

* adopt beats_management

* adopt case plugin

* adopt cross_cluster_replication

* adopt data_enhanced

* adopt event_log

* adopt global_search

* adopt index_management

* adopt infra

* adopt licensing

* adopt lists

* adopt logstash

* adopt reporting

* adopt observability

* adopt monitoring

* adopt rollup

* adopt so tagging

* adopt security

* adopt security_solutions

* adopt watcher

* adopt uptime

* adopt spaces

* adopt snapshot_restore

* adopt features changes

* mute error when null used to extend context

* update docs

* small cleanup

* add type safety for return type

* refactor registerRouteHandlerContext type

* update docs

* update license header

* update docs

* fix type error. fetch body does not accept array of strings

* fix telemetry test

* remove unnecessary ts-ignore

* address comments

* update docs
2021-01-21 15:20:22 +01:00
Mikhail Shustov 6e4c70848d
[Core] Remove public context (#88448)
* remove client side context

* update docs

* fix tests

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-18 21:47:53 +01:00
Jonathan Budzenski 51ba94d3e5
[dev] Replace sass-lint with stylelint (#86177)
Co-authored-by: Tyler Smalley <tylersmalley@me.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Dave Snider <dave.snider@gmail.com>
2021-01-15 11:52:29 -06:00
Oliver Gupte 5ed91585a8
[APM] Fixes inconsistent labels for throughput & latency (#88101)
* Closes #87483. Updates several labels to be consistent accross views.

* Updates integration tests/snapshots with new term

* Changes "traffic" => "throughput" in the labels

* addresses feedback from PR

* includes tpm unit in Observability overview page and updates test
2021-01-13 12:09:03 -08:00
Dominique Clarke ff17581f45
[Uptime] update synthentics screenshot preview images (#87602)
* update PingTimestamp caption and add spinner for loading images

* use FETCH_STATUS to determine render state for PingTimestamp

* add tests for ping timestamp

* adjust ping timestamp caption

* update screenshot to use EuiImage

* remove deprecated translations

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-13 04:48:37 -05:00
Dominique Clarke cf6afe04ad
[Uptime] Fix/85236 user experience display low values (#86026)
* add hasVitals prop to CoreVitalItem

* pass hasVitals prop to CoreVitalsItem based on coreVitalPages

* adjust criteria for displaying no core vital item data

* add stories for CoreVitalItem edge cases

* remove comment from core web vitals index page

* update test comment in CoreVitalItem

* adjust APM get_web_core_vitals endpoint to return a number for cls value, and adjust corresponding observability components

* remove hasVitals from CoreVitalItem props and adjust storybook stories

* add comment to EuiStat aria-label in CoreVitalItem

* adjust CoreVitalItem tests

* adjust APM KeyUXMetrics test

* adjust APM get_web_core_vitals endpoint to return null for cls when cls is undefined

* adjust unit and integration tests that rely on apm get_web_core_vitals

* add comment in get_web_core_vitals

* update CLS value in Observability core_web_vitals index

* add withKibanaIntl to CoreVitalItem test to wrap in Intl Provider and KibanaReact provider

* update CoreVitalItem test to use testing-library/react test_helper

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-12-23 14:25:34 -05: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 Cowan 20bad37aa9
[Observability][Metrics UI] Refactor Observability Overview for Performance (#84955)
* [Observability][Metrics UI] Refactor Observability Overview for Performance

* Fixing case to match EUI guidelines

* Changing alert consumer for Metrics UI to infrastructure

* Removing unused translations

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-12-10 12:35:27 -07:00
Dario Gieselaar 04428ff93b
[APM] Service overview: Dependencies table (#83416)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-12-10 10:32:01 +01:00
Shahzad e476baf276
[Uptime] Details page refactor for browser monitor (#84425)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-12-07 14:35:19 +01:00
Ahmad Bamieh aa9a353205
[Telemetry] Introduce UI Counters (#84224)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-12-04 17:47:04 +02:00
Tyler Smalley b593781009
Jest multi-project configuration (#77894)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2020-12-02 11:42:23 -08:00
Nathan L Smith 3714658760
Transaction type handling and breakdown chart (#83587) 2020-11-24 13:37:24 +01:00
Cauê Marcondes ac73b6a5b4
[Observability] Load hasData call asynchronously (#80644)
* obs perf

* fixing unit tests

* fixing ts issues

* fixing empty state

* addressing pr comments

* addressing pr comments

* fixing TS issue

* fixing some stuff

* refactoring

* fixing ts issues and unit tests

* addressing PR comments

* fixing TS issues

* fixing eslint issue

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-23 11:58:49 +01:00
Søren Louv-Jansen a703524853
[APM] Only fetch custom links for users with a valid license (#83836)
* [APM] Only fetch custom links when user has valid license

* Rename more files for consistency

* i18n fixes

* Fix tests

* Addess feedback and minor cleanup

* Fix test (and more cleanup)

* Make cachable
2020-11-20 19:59:30 +01:00
Søren Louv-Jansen f741c63690
[Observability] Fix telemetry for Observability Overview (#83847) 2020-11-20 11:34:50 +01:00
Nicolas Chaulet 1b6cfe819d
[Fleet] Rename ingestManager plugin ID fleet (#83200) 2020-11-19 08:43:14 -05:00
Mikhail Shustov 4917df30b9
Update typescript eslint to v4.8 (#83520)
* update deps

* update rules

use type-aware @typescript-eslint/no-shadow instead of no-shadow. do not use no-undef, rely on TypeScript instead

* fix or mute all lint errors

* react-hooks eslint plugin fails on ? syntax

* fix wrong typings in viz

* remove React as a global type

* fix eslint errors

* update version to 4.8.1

* fix a new error
2020-11-18 18:23:08 +01:00
Nathan L Smith 452d4c8a8f
APM header changes (#82870)
- Make APM and UX headers size medium instead of large
- Remove margin around APM main container
- Make APM tabs condensed
- Switch environment filter and date picker positions
- Move search bar (kuery + date picker) below the tabs
- Wrap pages in `EuiPage` components
- Set a minimum width on the enironment selector so it doesn't collapse when loading
- Don't show search bar on service map

Fixes #81954.
2020-11-12 16:26:37 -06:00
Nathan L Smith 5ab41f5845
Put APM links into header action menu (#82292) 2020-11-10 19:16:02 -06:00
Nathan L Smith 387593d723
Copy dateAsStringRt to observability plugin (#82839)
Observability was importing `dateAsStringRt` from APM, which creates an implicit circular dependency between the two plugins.

Copy that function into where it was being used in observability to remove the dependency.

Related to #80508.
2020-11-07 19:15:37 -06:00
Thomas Watson 700225061a
Upgrade to hapi version 18 (#80468) 2020-11-02 13:18:00 +01:00
Greg Thompson 6fdc7eb1fa
Upgrade EUI to v30.1.1 (#81499)
* eui to v30.0.0

* removed unused RecentLinks component

* update compressed -> display prop

* euiformrow compressed -> display

* euipopover remove withtitle

* euibuttongroup prop updates

* remove euibuttontoggle

* src snapshot updates

* tutorial euibuttongroup update

* x-pack snapshot updates

* euibuttongroup test updates

* TODO

* misc. js file updates

* remove euinavdrawer scss references

* translation removals

* more x-pack snapshot updates

* update data-test-subj lookup

* icons logoAMP -> logoObservability

* cypress selector updates

* update euibuttontoggle onchange, test interaction

* Fix auto-update toggle in Visualize

* some more change -> click test updates

* idtoselectedmap change

* Fix feature table button group

* Remove empty SASS file

* Fix feature table button group II

* Using `compressed` to also dictate dual range row

* Fix a few security labels

* An ML fix

* Apply suggestions from code review

Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>

* remove unused translation

* update view_type_toggle snapshot

* more snapshot updates

* eui to 30.1.0

* undo temp ts-ignore

* more x-pack snapshot updates

* eui to 30.1.1

* update feature privilege text

* Update x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/feature_table/sub_feature_form.tsx

Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com>

* reuse i18n token

* Adapt log entry action button to new `minWidth` prop

* clean up label

* Combine auto apply strings into one

* ternary fix

* cases status useCallback

Co-authored-by: cchaos <caroline.horn@elastic.co>
Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>
Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com>
Co-authored-by: Felix Stürmer <stuermer@weltenwort.de>
2020-10-30 16:18:27 -06:00
Shahzad 2a4337e8b5
[UX] Fix core vitals empty state (#81781) 2020-10-28 19:33:30 +01:00
Justin Kambic c11163d004
[O11y Overview] Add code to display/hide UX section when appropriate (#80873)
* Add code to display/hide UX section when appropriate.

* Suppress errors with link to dedicated issue.

* Fix typo in call to action.

* Remove type error suppression.
2020-10-21 07:26:08 -04:00
Justin Kambic d2c776d1cf
[UX] Add empty states (#80904)
* Add empty state for user experience metrics.

* Add empty state for page load duration metrics.

* Add empty state for core web vitals.

* Fix bug injected by these changes.

* Add a test.
2020-10-20 10:14:42 -04:00
Cauê Marcondes a8b34561e4
[Observability] Kibana home page Observability link pointing to /landing (#80636) 2020-10-15 15:46:43 +02:00
Shahzad 8f49154100
[UX] Update help labels for web core vitals (#79662)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-07 10:17:53 +02:00
Catherine Liu 63b76f2cd5
[Core UI] Kibana Overview Page (#75827)
* Added kibana landing page

Created kivana_overview plugin

Removed test from home plugin

Added CSS

Fixed page header links

Added news feed

Fixed spacers between news items

[Core UI] Kibana Overview Page Style Tweaks (#76712)

Fixed link to index management

Added solution cards to kibana landing page

Added solution links

Fixed ts errors

Using publishReplay() to support multiple consumers in newsfeed plugin

Added createNewsFeed$ to newsfeed plugin start

Added tests

Removed unnecessary export

Hides overview link when other Kibana apps are not available

Added icon to overview plugin

Removed question mark from news feed title

Updated plugin-list

Fixed i18n errors

Revert snapshot

Updated getting started page copy

Hide news feed when no news feed results

Disables Kibana overview page when kibana apps are unavailable

Updated snapshots

Refactor to use KibanaContextProvider

Fixed security tests

Fixed newsfeed api test

Moved overview_footer and overview_header to kibana-react plugin

[Core UI] Kibana Overview Page Style Fixes (#78677)

* Fixed a11y issues

* Made newsfeed optional dep of kibana overview plugin

* Removed duplicate license copy

* Fixed management security test

* Added toast to change default route button

* Updated snapshots

* Simplified toast notification

* Fixed i18n error

* Assigned kibana_overview plugin to Core UI in CODEOWNERS

* Updated snapshots

* Fix import

* [Core UI] Kibana Overview Page Style Fixes, Part 3 (#78970)

* fix overview cards not stretching height equally

* change var name for better specificity

* [Core UI] Kibana Overview Page Style Fixes, Part 4 (#79136)

* Adds support for all newsfeed plugin config settings in createNewsFeed$

* Fixed type

* Updated kibana overview page route

* Fixed imports in page_footer and page_header

* Update Kibana overview graphics (#79534)

* Updated snapshots

* Updated snapshots

* Changes newsfeed endpoint to kibana analytics in kibana_overview plugin

* Renamed components

* Fixed overview page footer and header component class names

* Removed extraneous files

* Fixed import

* Replaced SVGs with optimized SVGs

* Fixed header and footer in home and kibana overview pages

* Updated snapshots

* Changed url_forwarding plugin appRoute

* Fixed aria-labelledby value

* Updated snapshots

* Added base paths

Co-authored-by: Michael Marcialis <michael.marcialis@elastic.co>
Co-authored-by: Ryan Keairns <contactryank@gmail.com>
2020-10-06 09:13:31 -07:00
Cauê Marcondes d8b4472a72
[Observability] Persist time range across apps (#79258)
* using kibana persisted date when available to set the date time

* fixing types

* adding setTime when changin the dates in the url

* renaming

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-06 13:29:15 +02:00
Shahzad de130abfbc
[UX] Add core web vitals in obsv homepage (#78976) 2020-10-05 19:15:13 +02:00
Cauê Marcondes eebe4ad648
[Observability] Kibana nav when docked overlaps the content of the pages. (#78593)
* adding padding left

* adding space left to appSection
2020-09-30 14:16:16 +02:00
Shahzad a31dd64778
[UX] Add percentile selector (#78562) 2020-09-30 10:24:38 +02:00
Nathan L Smith 564a7b1a17
Storybook 6 and config changes (#75357)
Upgrade to Storybook 6 and attempt to use the declarative configuration.

The goals of this PR (as part of Kibana's Storybook roadmap, are:

Upgrade to Storybook 6
Still allow running Storybooks with yarn storybook plugin_name
Use the declarative configuration to (hopefully) make the configuration simpler to use an easier to understand, as well as avoiding deprecation warnings and loss of future compatibility
The ways in which what I have so far differs from how we do things today are:

In the alias configuration it takes a path to a storybook configuration directory instead of the storybook.js file from before
Each plugin (it doesn't have to be a plugin; can be any directory) has a .storybook/main.js (the aliases file in @kbn/storybook specifies these locations) where they can define their Storybook configuration. You can require('@kbn/storybook').defaultConfig to get defaults and override them
@kbn/storybook has a preset that can provide Webpack and Babel configuration and Storybook parameters and decorators
Instead of dynamically creating the list of stories to import, we define them in the globs of the stories property in .storybook/main.js.
Do not build a DLL. We are using @kbn/ui-shared-deps as externals. Startup time is not quite as fast but still acceptable.
Other things done in this PR:

Allow default exports in .stories. to allow for Common Story Format CSF stories
Add guard in Webpack configuration needed for overriding CSS rules
Update filename casing check to allow for files with required names in Storybook
Clean up observability stories
Rename *.examples.tsx and *.story.tsx to *.stories.tsx
2020-09-29 19:34:05 -05:00
Chris Roberson a88c27258e
[Monitoring] Usage collection (#75878)
* First stab at some internal telemetry

* Add missing files

* mbCount telemetry

* Include more data

* Remove unused field

* This file isn't used

* Mock in tests

* Add schema

* Store schema

* Use sample cluster instead

* Fix telemetry schema

* Fix type issues

* Updates

* Fix schema and tests

* Add tests

* Add tests

* Go back to using an array

* Fix schema

* Add page view data

* Remove debug

* Handle loading scenario here

* Add delay tracking too

* Add clicks for setup mode

* Add clicks for setup mode

* Fix beats/apm page views

* Fix typings
2020-09-25 10:19:53 -04:00
Cauê Marcondes 0cf3bf2731
[Observability] Collect UI telemetry (#78258)
* adding telemetry to obs pages

* adding telemetry to obs pages

* increasing delay
2020-09-23 15:44:40 +02:00