Commit graph

467 commits

Author SHA1 Message Date
Zacqary Adam Xeper 7836998e76
[Metrics UI] Display No Data context.values as [NO DATA] (#78038)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-10-01 11:31:39 -05:00
Phillip Burch ee7672aaf0
[Metrics UI] Add ability to override datafeeds and job config for partition field (#78875)
* Add ability to override datafeeds and job config for partition field

* Remove debug

* UX cleanup

* Fix types, delete dead code
2020-10-01 10:51:55 -05:00
Zacqary Adam Xeper 3599edbea9
[Logs UI] Move alerting components to public/alerting (#79035)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-10-01 09:42:18 -05:00
Alejandro Fernández Haro 97ac553d03
[Usage Collection] [schema] infra (#78581) 2020-10-01 13:30:39 +01:00
Quynh Nguyen 2344dcfae8
[ML] Migrate machine learning URLs to BrowserRouter format for APM, Security, and Infra (#78209)
* [ML] Adds ability to pass multiple jobIds to job management url

* [ML][APM] Update links to jobs management page for MLLink and LegacyJobsCallout

* [ML][APM] Update useTimeSeriesExplorerHref

* [ML][APM] Update tests

* [ML][APM] Move test from useTimeSeriesExplorerHref to MLJobLink.test.tsx

* [ML][Infra] Update ML links in infra to non-hash paths

* [ML] Move MlUrlGenerator registration outside of licensing block for security solution

* [ML][Security] Update ml links in security

* [ML][APM] Update test snapshots

* [ML][APM] Update snapshots

* [ML][Security solution] Update tests

* [ML] Update MLLink to include globalState

* [ML] Update useTimeSeriesExplorerHref

* [ML] Update apm and security_solution to use useMlHref hook

* [ML] Update APM to use useUrlParams hook, update security solution hook

* [ML] Update tests, fix duplicate imports

* [ML] Update imports, remove ml exports to shared cause it's not needed

[ML] Add import

* [ML] Update snapshot

* [ML] Fix warnings for jobs_table.test.tsx

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-30 18:53:17 -05:00
Spencer 06d1628a00
[ts] enable "resolveJsonModule" and disable existing failures (#78855)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-09-30 15:44:43 -07: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
Phillip Burch 46a595947e
[Metrics UI] Add anomalies to timeline (#78602)
* Add ability to fetch anomalies by metric

* Add ability to fetch anomalies to timeline

* Show anomaly annotation on timeline

* Fix type check

* Fix typos

* Add influencers to tooltip, add legend

* Remove unused variable

* Only show anomalies with a score greater than 50

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-29 18:06:38 -05:00
Chris Cowan 1edda05813
[Metrics UI] Inventory shows * node when there are no results (#78371)
* [Metrics UI] Inventory shows * node when there are no results

* fixing tests to handle the new behavoir
2020-09-29 12:55:09 -07:00
Kerry Gallagher 33d051b73c
[Logs UI] Log threshold ratio alerts (#76867)
* Add ratio alerting to log threshold alerts

* Fix i18n

* Move grouped query must not filtering from outer to inner clause

* Use new ratio alerting layout

* Use better defaults for ratio alerts

* Remove div wrapper

* Remove type casting, use user-defined type guards

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-29 14:59:18 -04:00
spalger 34b63bb498 fix eslint violation 2020-09-24 10:54:43 -07:00
Brittany Joiner 63ce752dc2
Adding comment about importing lodash library (#78156)
* added comment about importing lodash library

* fixed space with prefer

* cleaned up extra space and removed comments for lodash/fp

* took out the comment in server files

* Remove newlines

Co-authored-by: Nathan L Smith <smith@nlsmith.com>
2020-09-24 11:38:11 -05:00
Mikhail Shustov 8ba60a4004
bump query-string version to remove manual type definitions (#78143)
* bump query-string version to remove manual type definitions

* remove manual type declaration

* fix cypress tests

* add )
2020-09-24 17:15:15 +02:00
Felix Stürmer 3f2e9f7705
[Logs UI] Add dataset-specific categorization warnings (#75351)
This adds dataset-specific categorization warnings for the categorization module. The warnings are displayed in call-outs on the relevant tabs as well as the job setup screens if a prior job with warnings exists. To that end this also changes the categorization job configuration to enable the partitioned categorization mode.

Co-authored-by: Alejandro Fernández Gómez <antarticonorte@gmail.com>
2020-09-24 17:02:23 +02:00
Anton Dosov 89e1f087a2
bump @testing-library (#78270) 2020-09-24 15:02:59 +02:00
Chris Cowan ca27ec8385
[Metrics UI] Fix EC2 Query to only include aws.ec2 nodes (#78236)
* [Metrics UI] Fix EC2 Query to only include aws.ec2 nodes

* Making the filter more generic so we can apply it easily to any inventory model
2020-09-23 16:32:24 -07:00
Chris Cowan 8ea5c575eb
[Metrics UI] Reduce the pagination size for snapshot request (#78051)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-23 16:31:34 -07:00
Zacqary Adam Xeper f9e0679682
[Metrics UI] Minor fixes to inventory timeline (#78226) 2020-09-23 13:53:16 -05:00
Phillip Burch 14921a037e
[Metrics UI] Anomaly Detection setup flow for Metrics (#76787)
* adds metrics ml integration

* Add ability to create ml jobs from inventory

* Fix i18n stuff

* Fix typecheck

* renames jobs, updates datafeeds

* adds allow_no_indices: true for datafeeds

* Revert "[Metrics UI] Replace Snapshot API with Metrics API (#76253)"

This reverts commit 0ca647286a.

* Add ability to fetch anomalies

* Fix typecheck

* Fix typecheck

* Fix i18n

* Fix lint, use the right partition field

* Delete log files

* Fix merge

* Fix merge issues

* Update name of jobs

* Remove CPU job

* [Metrics UI] Replace Snapshot API with Metrics API (#76253)

- Remove server/lib/snapshot
- Replace backend for /api/infra/snapshot with data from Metrics API
- Fixing tests with updates to the snapshot node

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

* Add links back to ML for anomalies and manage jobs

* Fix typecheck

* Remove unecessary validation

Co-authored-by: Michael Hirsch <michaelahirsch@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Chris Cowan <chris@chriscowan.us>
2020-09-23 13:27:28 -05:00
Pierre Gayvallet 0d09cea436
Remove legacy plugins support (#77599)
* remove ALL the things.

* adapt some types and tests

* restore ensureValidConfiguration

* fix legacy service tests

* adapt uiRender mixin

* remove legacy types

* update generated doc

* restore legacy plugin schema

* update generated doc

* remove remaining code of x-pack/legacy

* adapt imports due to merge

* cleanup CODEOWNERS

* cleanup gitignore & i18nrc

* cleanup tsconfig.json

* remove unused i18n keys

* add back `"legacy/plugins/**/*",` to tsconfig until legacy space plugin is deleted

* fix create_jest_config

* remove references from eslintrc

* more eslint cleanup

* remove `x-pack/index.js`

* fix xpack gulp scripts

* fix bug with default + named imports from boom

* remove rules from eslintrc

* remove LegacyInternals

* review comments

* update generated doc

* cleanup legacy metadatas

* revert changes to eslintrc

* update generated doc
2020-09-23 09:52:51 +02:00
Zacqary Adam Xeper a0f03ddbd1
[Metrics UI] Add inventory view timeline (#77804)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-22 16:21:09 -05:00
Felix Stürmer e0aeebc149
[Logs UI] Correctly filter for log rate anomaly examples with missing dataset (#76775)
This fixes #76493 by querying for the "unknown" (i.e. empty) dataset using an exists clause. This should be in line with how ML anomaly detection treats missing partition values.
2020-09-22 19:32:50 +02:00
Alejandro Fernández Gómez 5832e97b69
[Logs UI] Use fields API in logs ML category examples (#77188)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-21 17:32:34 +02:00
Alejandro Fernández Gómez 414529a348
[Logs UI] Use fields API in log analysis results (#77147)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-21 16:59:41 +02:00
Zacqary Adam Xeper 9cf546f3d0
[Metrics UI] Use Notify Every in Alert Preview (#74401)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-18 14:42:23 -05:00
Larry Gregory 9f3992f6c2
Grouped features for space management (#74151)
* Grouped features for space management

* Apply suggestions from code review

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

* Address PR Feedback

* docs changes

* updating types/docs

* update APM feature name

* Reintroduce extraAction following EUI update

* change ordering of infra features, and render callout for management category

Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-18 12:30:59 -04:00
Alejandro Fernández Gómez 3c555e2ca2
Collapse alert chart previews by default (#77479) 2020-09-16 11:30:51 +02:00
Zacqary Adam Xeper e167bbfcd6
[Logs UI] [Metrics UI] Remove saved object field mappings (#75482)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-15 13:31:18 -05:00
Michail Yasonik 61c4e6fd8d
Stacked headers and navigational search (#72331)
Co-authored-by: Poff Poffenberger <poffdeluxe@gmail.com>
Co-authored-by: Ryan Keairns <contactryank@gmail.com>
Co-authored-by: pgayvallet <pierre.gayvallet@elastic.co>
Co-authored-by: cchaos <caroline.horn@elastic.co>
2020-09-14 14:32:30 -05:00
Larry Gregory 2e34eb239f
Hide management sections based on cluster/index privileges (#67791)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-14 09:30:47 -04:00
Chris Cowan 0ca647286a
[Metrics UI] Replace Snapshot API with Metrics API (#76253)
- Remove server/lib/snapshot
- Replace backend for /api/infra/snapshot with data from Metrics API
- Fixing tests with updates to the snapshot node

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-09 11:00:27 -05:00
Alejandro Fernández Gómez d89e6d3702
[Logs UI] Use fields api in log stream (#76919) 2020-09-09 12:58:32 +02:00
Alejandro Fernández Gómez 203f25645f
[Logs UI] Shared <LogStream /> component (#76262) 2020-09-07 16:08:27 +02:00
Kerry Gallagher ea47ff1f7b
[Logs UI] Update alert executor tests (#75764)
* Update executor unit tests
2020-09-07 11:46:56 +01:00
Spencer c778646318
[eslint] convert to @typescript-eslint/no-unused-expressions (#76471)
* [eslint] convert to @typescript-eslint/no-unused-expressions

* fix lint errors

Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-04 10:07:13 -07:00
James Gowdy 4762cf56f5
[ML] Switching to new es client (#74965)
* [ML] Switching to new es client

* further conversions

* fixing tests

* updating responses

* test commit

* refactoring shared services to removed context parameter

* removing last scoped clients

* removing ml js client

* udating file data viz errors

* fixing jest tests

* fixing types after merge with master

* error response changes

* adding default sizes to some requests

* adding custom error types for license checks

* tidying up shared function checks

* removing test data

* removing need for DummyKibanaRequest

* updating comment

* fixing functional api tests

* removing comments

* fixing types after master merge

* throw error rather than return it

* removing placeholder error

* changes based on review comments

* fixing types after merge with master

* fixing missing return

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-02 14:07:57 +01:00
Zacqary Adam Xeper b98e2e4f3d
[Metrics UI] Replace uses of any introduced by Lodash 4 (#75507)
Co-authored-by: Felix Stürmer <weltenwort@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-27 10:06:55 -05:00
Mikhail Shustov 37ec1e1053
Update to TS v4 (#73924)
* bump ts to v4

* MOAR RAM

* fix type errors for OSS

* first pass on x-pack errors

* second pass on x-pack type errors

* 3rd pass on x-pack type-errors

* mute errors if complex cases

* don't delete if spread suffices

* mute other complex cases

* make User fields optional

* fix optional types

* fix tests

* fix typings for time_range

* fix type errors in x-pack/tests

* rebuild kbn-pm

* remove leftovers from master update

* fix alert tests

* [Telemetry Checker] TS4 Fixes

* bump to 4.0.1-rc

* fix new errors in master

* bump typescript-eslint to version supporting TS v4 syntax

* fix merge commit errors

* update to the stable TS version 4.0.2

* bump ts-eslint to version supporting ts v4

* fix typo

* fix type errors after merge

* update ts in another new package.json

* TEMP: remove me

* Revert "TEMP: remove me"

This reverts commit dc0fc3bae6.

* [Telemetry] Update snapshot for new TS4 SyntaxKind

* bump prettier to support TS v4 syntax

* fix prettier rules

* last style change

* fix new type errors

Co-authored-by: Alejandro Fernández Haro <alejandro.haro@elastic.co>
2020-08-27 10:28:02 +02:00
Catherine Liu 532f2d70e8
[Home] Elastic home page redesign (#70571)
Co-authored-by: Catherine Liu <catherine.liu@elastic.co>
Co-authored-by: Ryan Keairns <contactryank@gmail.com>
Co-authored-by: Catherine Liu <catherineqliu@outlook.com>
Co-authored-by: Michael Marcialis <michael.marcialis@elastic.co>
2020-08-26 13:00:00 -07:00
Alejandro Fernández Gómez 686cde88af
[Logs UI] View log details for anomaly log examples (#75425)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-26 10:38:54 +02:00
Kerry Gallagher 43cac5af45
[Logs UI] Log alerts chart previews (#75296)
* Add chart previews for log threshold alerts
2020-08-25 11:23:57 +01:00
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