Commit graph

724 commits

Author SHA1 Message Date
Mikhail Shustov 1cfc2ebf90
[Maps] [Infra] do not import types from the legacy elasticsearch package (#107118)
* remove elasticsearch import from infra

* remove elasticsearch import from maps
2021-07-29 19:14:37 +02:00
mgiota 7f6ff62402
[Metrics UI]: register metric threshold rule type with RAC (#106684)
* [Metrics UI]: register metric threshold rule type with RAC

* index reason in metric threshold executor

* fix failing metric executor unit tests

* refactor createLifecycleRuleExecutor

* create LifecycleRuleExecutor mock

* fix types

* fix option types

* avoid empty reason field

* more type fixes
2021-07-29 17:58:18 +02:00
Phillip Burch 2093447203
[Metrics UI] Correct inaccurate offsetting for non-rate aggregations inside of metrics threshold alerts (#106947)
* Don't skip last bucket for most aggs

* Allow alerting on partial buckets for certain aggs

* Fix test, PR feedback, and some comments

* Remove all offset logic for date_range aggs

* Remove code comment

* Add delivery delay

* Fix the date range for query

* Add TODO
2021-07-28 17:29:46 -05:00
Alejandro Fernández Gómez 040cf56d8e
[RAC][Metrics UI] Index reason field on inventory metric alerts (#106842)
Co-authored-by: mgiota <giota85@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-07-28 13:32:09 -04:00
Yuliia Naumenko f589c2fc29
[Alerting] Rename alertTypeRegistry to ruleTypeRegistry according to the new terminology. (#106519)
* [Alerting] Renamed Alerting framework AlertsClient to RulesClient according to the new terminology.

* fixed path

* fixed type checks

* fixed type checks

* [Alerting] Rename alertTypeRegistry to ruleTypeRegistry.

* Apply suggestions from code review

Co-authored-by: ymao1 <ying.mao@elastic.co>

* fixed type checks

* fixed tests

* fixed merge issues

* fixed merge issues

* fixed tests

* fixed tests

* fixed functional tests

Co-authored-by: ymao1 <ying.mao@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-07-27 10:03:00 -07:00
Alexey Antonov fcaa4aaf40
[TSVB] [Table] js -> ts conversion (#105094)
* table js -> ts

* remove any's

* fix CI

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-07-27 18:07:43 +03:00
Felix Stürmer 2392b4f24a
[Logs UI] Improve log threshold alert factory argument order (#106532)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-07-26 15:26:39 +02:00
Chris Cowan bda98e70f2
[Metrics UI] Ensure alert dropdown closes properly (#106343) 2021-07-22 18:21:14 -07:00
Chris Cowan 75d4250fd4
[Metrics UI] Create functional tests for Metrics Explorer (#105869)
* [Metrics UI] Create saved view tests for Metrics Explorer

* Adding basic functionality tests

* Adding missing metric test

* Adding chart customizations

* Fixing import

* Fixing es archive path

* fixing home page tests for saved objects to match metrics explorer

* Update x-pack/test/functional/apps/infra/home_page.ts

Co-authored-by: Sandra Gonzales <neptunian@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Sandra Gonzales <neptunian@users.noreply.github.com>
2021-07-22 15:37:25 -07:00
Chris Cowan d921df04c9
[Metrics UI] Increase number of saved objects fetched to 1000 (#106310) 2021-07-22 06:44:34 -07:00
Felix Stürmer 1a7469f756
[Logs UI] Index reason in log threshold executor (#106291) 2021-07-22 15:06:36 +02:00
Alejandro Fernández Gómez a397e0f60a
[Logs UI] Prevent the "Alerts and rules" context menu from sticking (#106408) 2021-07-22 14:46:41 +02:00
mgiota eaa6dcb579
[RAC] [Metrics UI] Register Inventory rule types with new RAC rules registry (#105706)
* WIP: register inventory metric threshold as lifecycle rule

* fix inventory executor error

* save alerts into ES

* temp

* basic format reason for inventory threshold

* clean up, fix i18n error and temporarily remove types

* delete serialized params

* include group name in the reason

* cleanup

* link to default metrics page

* grab the value and threshold for the inventory item

* fix typo

* fix check types

* remove threshold and currentValue, the reason field will contain this info for combined conditions

* remove thereshold and value from the reason, soon will be replaced by indexed reason field

* remove unnecessary export

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-07-22 11:46:40 +02:00
Liza Katz a6af9d5050
[Es query] Move to package (#103530)
May the forces of bootstrapping helps us 🙏🏻 😉
2021-07-21 17:10:55 +02:00
ymao1 e2aacdc186
[Alerting] Allow rule types to extract/inject saved object references on rule CRU (#101896)
* Adding function hooks into rule type definition and call extract fn on rule create

* Adding hooks for extracting and injecting saved object references. Adding extractReferences to create and update workflow

* Adding type template for extracted params

* Adding type template for extracted params

* Adding type template for extracted params

* Adding type template for extracted params

* Calling injectReferences function if defined. Finishing unit tests for create and update

* Adding tests for get

* Adding tests for find

* Cleanup

* Fixing types check

* Fixing functional tests

* Fixing functional tests

* Fixing tests

* Updating README

* Throwing boom error instead of normal error

* Adding framework level prefix to extracted saved object reference names

* Fixing types

* Fixing types

* PR fixes

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-07-20 17:09:02 -04:00
Constance bc4928fd0b
[Enterprise Search] Create reusable EntSearchLogStream component (#105804)
* Set up Kibana dependencies required by LogStream component

- notably, `infra` and `data` - @see https://github.com/elastic/kibana/blob/master/x-pack/plugins/infra/public/components/log_stream/log_stream.stories.mdx#prerequisites

- tsconfig.json note - I believe I missed kibana_react from when we previously started requiring it for KibanaPageTemplate. Because LogStream requires it for KibanaContextProvider anyway I decided to add as a reference just in case

* Set up log source configuration for ent search logs

@see https://github.com/elastic/kibana/blob/master/x-pack/plugins/infra/public/components/log_stream/log_stream.stories.mdx#with-a-source-configuration

or, monitoring plugin also has example usage

* Set up providers required by the LogStream component

@see https://github.com/elastic/kibana/blob/master/x-pack/plugins/infra/public/components/log_stream/log_stream.stories.mdx#prerequisites

Note: there's some overlap in KibanaContextProvider with KibanaLogic that may be worth investigating/DRYing out in the future

* Create reusable EntSearchLogStream component

- light wrapper over LogStream with certain prepopulated defaults

+ Update LogStreamProps from infra team to be exported publicly for reuse (eslint will error otherwise)

* Fix bad type export

- thanks @afgomez!!

* Fix failing security_only nav_links test

- which was caused by `spaces` being required by infra but optional for our plugin. I moved `spaces` to required by `enterprise_search for clarity.

- I'm still not sure I actually fixed the nav_links test correctly. I have almost no memory of adding those lines 12 months ago 🙈

* Fix spaces typing

- remove `?` notation now that it's a required and non-optional plugin
+ reorder required plugins slightly

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-07-20 13:58:57 -04:00
Kerry Gallagher 32206b9284
Fix top controls responsive layout (#106107) 2021-07-20 12:01:42 +01:00
Chris Cowan cb7187f71f
[Metrics UI] Drop partial buckets from ALL Metrics UI queries (#104784)
* [Metrics UI] Change dropLastBucket to dropPartialBuckets

- Change offset calculation to millisecond percission
- Change dropLastBucket to dropPartialBuckets
- Impliment partial bucket filter
- Adding partial bucket filter to metric threshold alerts

* Cleaning up getElasticsearchMetricQuery

* Change timestamp to from_as_string to align to how date_histgram works

* Fixing tests to be more realistic

* fixing types; removing extra imports

* Fixing new mock data to work with previews

* Removing value checks since they don't really provide much value

* Removing test for refactored functinality

* Change value to match millisecond resolution

* Fixing values for new partial bucket scheme

* removing unused var

* Fixing lookback since drops more than last buckets

* Changing results count

* fixing more tests

* Removing empty describe

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-07-19 12:11:50 -07:00
Kate Farrar 2079d61544
[Metrics UI] Inventory layout issues - interval language to tooltip (#105687)
inventory view - moved interval label language to a tooltip to make more room for waffle map controls responsively
2021-07-15 12:29:00 -06:00
mgiota 6e30483cbf
[Logs&Metrics UI] add owner properties to plugin manifest (#105580) 2021-07-14 22:25:17 +02:00
Felix Stürmer e9f42d27eb
[Logs UI] Register log threshold rule as lifecycle rule (#104341)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-07-13 11:59:11 +02:00
Caroline Horn 42c743be88
[Top Menu] Increase size of top menu links to s (#103144)
* Increased non-emphasized header links size from `xs` to `s`
* [Observability] Updating header links to use EuiHeaderLink
* [Spaces Menu] Larger spinner
* [Help Menu] Increase size of links
* [Canvas] Increase size to `s`
2021-07-12 12:50:41 -04:00
Vadim Dalecky 15d47ec2c1
ML locator (#103652)
* fix: 🐛 cast type

* chore: 🤖 remove unused parameter

* feat: 🎸 implement ML locator

* test: 💍 add locator tests

* feat: 🎸 expose ML locator form plugin contract

* feat: 🎸 deprecate ml url generator

* feat: 🎸 use locator in useMlHref() React hook

* fix: 🐛 remove non-existing property

* fix: 🐛 remove unused parameter

* feat: 🎸 replace url generator by locator

* refactor: 💡 remove ML url generator and replace by locator

* fix: 🐛 correct type check error

* test: 💍 add share plugin mock and use it

* test: 💍 update mock

* Remove usage of excludeBasePath

* Fix recently accessed url for create job to data visualizer

* refactor: 💡 rename interface

* test: 💍 move locator mock into the share plugin

* test: 💍 update Jest snapshot

* test: 💍 use shared URL service mock

* refactor: 💡 update usage after merging latest

* refactor: 💡 use locator instead of generator

* chore: 🤖 remove unused import

Co-authored-by: Quynh Nguyen <quynh.nguyen@elastic.co>
2021-07-08 16:24:12 +02:00
Alejandro Fernández Gómez f5c4a05701
[Fleet][Logs UI] Ensure the <LogStream /> component reacts to query changes (#103876)
* Ensure the <LogStream /> component reacts to query changes

* Remove unused import
2021-07-07 11:37:01 +02:00
mgiota ba85f45014
[Logs & Metrics] refactor breadcrumbs (#103249)
* [Logs & Metrics] refactor breadcrumbs

* [Logs & Metrics] remove Header component, move translations and create readonly badge hook

* add breadcrumb to metric detail page

* fix check_file_casing ci issues

* create separate breadcrumb hook for logs and metrics

* fix metrics translation title

* fix wrong imports and unused variables

* fix translation imports

* fix unused import

* refactor use_breadcrumbs

* remove Header component

* fix linter exhaustive-deps error by wrapping into useMemo

* refactor use_readonly_badge

* remove commented out code

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-07-01 12:13:33 +02:00
mgiota de9b62ac4f
[Metrics UI]: add system.cpu.total.norm.pct to default metrics (#102428)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-07-01 09:03:56 +02:00
Kate Farrar 5fa6cdf1b2
[Metrics UI] [Logs UI] Updating alerts language in headers and Metrics (#103589)
* updating language in metrics ui to indicate rule type and updating language in header menu to Alerts and Rules
2021-06-30 14:40:33 -06:00
Caroline Horn 7d45fcf8ee
[Page layouts] Some light fixes (#103197)
* [Solution Toolbar] Fixing button border on non-text color versions

* [Alerts] Removed extra wrappers and use EuiPageHeader

* [Logstash] Basic conversion to template

* [Reporting] Adding bottomBorder to page header

* [ML] Fix display of main navigation tabs

* [Stack Management] Fix side nav not updating when going back to landing page

* [Tags] Add spacing after page header

* [License Management] Full width on file uploader

* [Page Template] Fixed `emptyState` default template for pages with side nav

* [Infra] Removing some page header displays in empty states

* [Enterprise Search] Fix some error layouts

* [Index Patterns] Quick fix for empty state

* snaps

* [Page Template] Remove forced padding when `centeredBody`

* small hack for tab padding for ml

* scroll ML page to fix test

* fix test method type signature

Co-authored-by: Dave Snider <dave.snider@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Michail Yasonik <michail.yasonik@elastic.co>
2021-06-29 19:50:15 -05:00
ymao1 c05588f077
[Alerting] Enable rule import/export and allow rule types to exclude themselves from export (#102999)
* Removing feature flag changes

* Adding isExportable flag to rule type definition

* Adding isExportable flag to rule type definition

* Adding isExportable flag to rule type definition

* Filtering rule on export by rule type isExportable flag

* Fixing types

* Adding docs

* Fix condition when exportCount is 0

* Unit test for fix condition when exportCount is 0

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-28 20:35:27 -04:00
fgierlinger ad3601c260
fix: typo in time dropdown list (#103407)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-29 09:17:26 +09:00
Chris Cowan b12095b079
[Metrics UI] Prevent saved views from trampling URL state (#103146)
* [Metrics UI] Prevent saved views from trampling URL state

* Adding space back in
2021-06-24 14:13:15 -07:00
Kerry Gallagher 9ba1ead7c8
[Logs UI] Log threshold rule performance improvements (#102650)
* Add optimisations for executor / chart previews

Co-authored-by: Felix Stürmer <weltenwort@users.noreply.github.com>
2021-06-24 20:12:52 +01:00
Anton Dosov be1c5bbd72
Don't import react-intl directly to reduce bundle sizes (#102497) 2021-06-24 16:52:55 +02:00
Alejandro Fernández Gómez 1ef5a6aa05
[Fleet][Logs UI] Prevent double loading of entries in <LogStream /> component. (#102980)
* Use better loading indicator for `useLogSource`

* Use clearer name for the loading entries flag

* Reuse query object if its value persists
2021-06-24 14:06:07 +01:00
Katrin Freihofner 65de579d5a
Renamed button and dropdown items in headers (apm, logs, metrics and uptime) from alerts to rules (#100918)
Co-authored-by: Jonathan Buttner <jonathan.buttner@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Christos Nasikas <christos.nasikas@elastic.co>
Co-authored-by: Jonathan Buttner <56361221+jonathan-buttner@users.noreply.github.com>
Co-authored-by: Steph Milovic <stephanie.milovic@elastic.co>
2021-06-22 13:15:17 +02:00
Casper Hübertz 38604863e5
[Metrics] Update ActionsMenu create alert styles (#102316)
* [Metrics] Add divider in the actions menu
* [Metrics] Add color and icon to the alert link

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-22 10:07:20 +02:00
Mikhail Shustov f3ec948bee
Cleanup outdated @elastic/elasticsearch client type errors (#101741)
* fix errors and update comments in Core

* fix errors or update comments in Security plugin

* update spaces test

* update task_manager files

* update comments in monitoring plugin

* fix errors in update comments in security_solutions

* fix errors and update comments in data_enhanced

* update fleet code

* update infra code

* update comment in trigger_actions_ui

* update comment in lens

* update comments in ES-UI code

* update typings for search

* update monitoring

* remove outdated export
2021-06-21 10:03:00 -04:00
Felix Stürmer ee1710cf39
[Logs UI] Add event.original fallback to message reconstruction rules (#102236)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-18 14:50:58 +02:00
mgiota fd5883b465
update readme of logs-metrics-ui (#101968) 2021-06-17 08:28:34 +02:00
Liza Katz 8abb656d7f
[Kuery] Move json utils (#102058)
* Move JSON utils to utils package

* Imports from tests

* delete

* split package

* docs

* test

* test

* imports

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-16 18:15:47 +03:00
Casper Hübertz d3c1f7c54d
[Observability] Updating header menu links across Observability apps (#101472)
* [Observability] POC aligning menu links across apps

* [APM] Changed guttersize

* [APM] Replace placeholder button

* [Uptime] Remove icon from Settings header link

* [APM] Reordered anomaly detection and alerts

* [Logs] Remove icon from settings and change guttersize

* [Metrics] Remove icon from settings and change guttersize

* [Logs] Change button style of `isStreaming` state

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-16 14:38:04 +02:00
Pete Harverson 35e10ba770
[ML] Adds optimizations for Logs UI anomaly detection jobs (#102191)
* [ML] Adds optimizations for Logs UI anomaly detection jobs

* [ML] Increment version for log-entry-categories-count job

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-16 11:31:10 +01:00
Kerry Gallagher 8f5dad98a1
[Logs / Metrics UI] Convert logs and metrics pages to the new Observability page template (#101239)
* Convert Logs and Metrics pages to use the Observability page template
2021-06-14 19:28:08 +01:00
Felix Stürmer 664cc5f163
[Logs UI] Fix applying a filter from the log entry detail flyout (#101011)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-08 18:29:50 +02:00
Mikhail Shustov d920682e4e
Update @elastic/elasticsearch to 8.0.0-canary13 (#98266)
* bump @elastic/elasticsearch to canary.7

* address errors in core

* address errors in data plugin

* address errors in Alerting team plugins

* remove outdated messages in Lens

* remove unnecessary comments in ML

* address errors in Observability plugin

* address errors in reporting plugin

* address errors in Rule registry plugin

* fix errors in Security plugins

* fix errors in ES-UI plugin

* remove unnecessary union.

* update core tests

* fix kbn-es-archiver

* update to canary 8

* bump to v9

* use new typings

* fix new errors in core

* fix errors in core typeings

* fix type errors in data plugin

* fix type errors in telemetray plugin

* fix data plugin tests

* fix search examples type error

* fix errors in discover plugin

* fix errors in index_pattern_management

* fix type errors in vis_type_*

* fix errors in typings/elasticsearch

* fix type errors in actions plugin

* fix type errors in alerting and apm plugins

* fix type errors in canvas and cases

* fix errors in event_log

* fix type errors in ILM and ingest_pipelines

* fix errors in lens plugin

* fix errors in lists plugin

* fix errors in logstash

* fix errors in metrics_entities

* fix errors in o11y

* fix errors in watcher

* fix errors in uptime

* fix errors in upgrade_assistant

* fix errors in task_manager

* fix errors in stack_alerts

* fix errors in security_solution

* fix errors in rule_registry

* fix errors in snapshot_restore

* fix remaining errors

* fix search intergration tests

* adjust assetion

* bump version to canary.10

* adapt code to new naming schema

* use mapping types provided by the client library

* Revert "adjust assetion"

This reverts commit 19b8fe0464.

* fix so intergration tests

* fix http integration tests

* bump version to canary 11

* fix login test

* fix http integration test

* fix apm test

* update docs

* fixing some ml types

* fix new errors in data plugin

* fix new errors in alerting plugin

* fix new errors in lists plugin

* fix new errors in reporting

* fix or mute errors in rule_registry plugin

* more ML type fixes

* bump to canary 12

* fix errors after merge conflict

* additional ML fixes

* bump to canary 13

* fix errors in apm plugin

* fix errors in fleet plugin

* fix errors in infra plugin

* fix errors in monitoring plugin

* fix errors in osquery plugin

* fix errors in security solution plugins

* fix errors in transform plugin

* Update type imports for ES

* fix errors in x-pack plugins

* fix errors in tests

* update docs

* fix errors in x-pack/test

* update error description

* fix errors after master merge

* update comment in infra plugin

* fix new errors on xpack tests/

Co-authored-by: James Gowdy <jgowdy@elastic.co>
Co-authored-by: Dario Gieselaar <dario.gieselaar@elastic.co>
2021-06-08 15:06:06 +02:00
renovate[bot] 4fbb6f0baa
Update dependency @elastic/charts to v30 (master) (#101409)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: nickofthyme <nick.ryan.partridge@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Marco Vettorello <vettorello.marco@gmail.com>
2021-06-08 10:49:31 +02:00
Felix Stürmer 081cf98f61
[Logs UI] Fix the LogStream story to work with KIPs (#100862)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-04 19:13:35 +02:00
Greg Thompson 38fd8a268a
Upgrade EUI to v33.0.0 (#99382)
* eui to 33.0.0

* resize observer type inclusion - revisit

* src snapshot updates

* x-pack snapshot updates

* table sort test updates

* code block language sh -> bash

* datagrid datetime sort inversion

* types

* kbn-crypto

* refractor yarn resolution

* refractor yarn resolution

* update cypress tests

* url state test

* trial

* Revert "trial"

This reverts commit adc3538145.

* trial anomaly timeout

* Revert "trial anomaly timeout"

This reverts commit 9a11711ba8.

* kbn-telemetry-tools

* Change a useMemo to useCallback so the code executes when intended

* Removed no-longer-used import

* exitOrFail already retries for longer than tryForTime

* Wait for loading indicator to disappear

* Intentionally adding `.only`

* Revert .only

* Increase wait time for the ML chart to load

* Remove unused var

* overflow

* chartWidth

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Alejandro Fernández Haro <alejandro.haro@elastic.co>
Co-authored-by: Chandler Prall <chandler.prall@gmail.com>
2021-06-01 10:53:07 -05:00
Felix Stürmer 61a49c6119
[Logs UI] Replace legacy es client usage in category examples (#100716)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-01 15:48:40 +02:00
Alison Goryachev 90e43431a5
[Infra] Update LogStream component docs (#100795) 2021-05-28 08:42:44 -04:00