Commit graph

787 commits

Author SHA1 Message Date
James Gowdy
b540ada036
[ML] Allow editing of model_snapshot_retention_days (#69003)
* [ML] Allow editing of model_snapshot_retention_days

* removing commented code

* flooring number input

* adding daily_model_snapshot_retention_after_days

* updating default values

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-15 21:45:51 +01:00
James Gowdy
aae5729f04
[ML] Fix cloud deployment ID check (#68695)
* [ML] Fix cloud ID check

* updates for tests

* adding extra test

* updating test titles

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-12 21:19:18 +01:00
Pete Harverson
c307c8622f
[ML] Remove sub navigation menu from the Anomaly Detection pages (#68663)
* [ML] Remove sub navigation menu from the Anomaly Detection pages

* [ML] Use data-test-subj in results view selector button tests

* [ML] Fix settings page tests

* [ML] Remove redundant top_nav component

* [ML] Tidy up job selector scss

* [ML] Use EUI condensed tab style for main tabs

* [ML] Address review comments and fix type error

* [ML] Edits following review. Fix translations.

* [ML] Add anomaly_detection_settings_context
2020-06-12 10:41:35 +01:00
Quynh Nguyen
5f3c3c0354
[ML] Transforms - Updated: Add ability to delete dest index & index pattern when deleting transform job (#68896) 2020-06-11 10:39:31 -05:00
Mikhail Shustov
f593455a62
Bump TypeScript to v3.9 (#67666)
* add babel support for export type

* bump ts version to 3.9.3

* rebuild kbn-pm

* bump typescript-eslint

* fix error in security plugin UI

* check export as works

* fix app migration type

* use correct test subj attribute

* fix errors from the old PR

* embeddable is already passed in props

* explicitly define type of fetch

* add some types for viz

* fix fetch type p.2

* add null to allow spreading without type errors due to override

* add type guard to fix type error

* cast to any, since cannot assign unknown

* add timestamp to known types

* fix type error in fetch

* fix type error. id is always defined in attibutes

* declare a type

* move ts-ignore to the lines with errors

* declare tuple type explicitly

* mute type error. cannot assign unknown

* fix errors. id is always defined

* fix error type

* fix override errors. id is always defined

* fix error. extends any doesn't work anymore

* fix type error. type is always defined

* env doesn't always contain values

* fix type error

* cast to string

* add: logs is already declared in getNodeLogsUrl

* state is already  passed in props

* fix some errors in timelion

* number of fragments is always defined

* 'absolute' is not just string, but value

* TEMP: option is always defined

* always true if cast to promise manually

* both props are always defined

* explicitly define returned SO type

* workaround type

* bump tslib to be compatible with ts v3.9

* test private property

* rebuild kbn-pm

* Fix ts errors for beats management

* Fix type inference broken by the TS 3.9 upgrade

* Fix ingest manager saved object attributes typings

* Fix TS errors in cross_cluster_replication and index_management.

* Fix TS error in Watcher.

* roll back colorRange wrong type

* fix security plugin types

* TypeScript 3.9 fixes for APM

* Fix ColorRange types.

* fix actions & alerts errors. ByGidi

* fix lists error

* More APM fixes

* Remove paramaterization from `removeEmpty in agent config SettingsPage component (it's only used there and doesn't need to be parameterized.)
* Add option chain for case in registerTransactionDurationAlertType
* Cast `overallValue` in transform_metrics_chart
* Use more specific type for custom link filters
* Add more option chaining for local UI filters buckets response
* Remove unused parameters from routes
* Fix getProjection type parameter
* Use destructuring in serviceNodesLocalFiltersRoute to hide `never` error
* Revert `UnionToIntersection` change in `AggregationResponseMap`

Fixes #67804.

* fix platform type error

* Fix visualizations types.

* Fix data plugin types.

* bump TS version to 3.9.5

* Fix telemetry TS errors

* Fix dashboard code

* Adding Canvas Fixes for TS 3.9

* Fix case and security_solution types

* roll back to the old export syntax. new one might cause problems in api-extractor

* update docs

* Fix timelion code

* Fix meta

* Fix types

* fix type errors om ingest_manager

* bump babel deps

* enable private props & methods syntax

* update kbn-pm dist

* whitelist 0BSD license

* use @babel/plugin-proposal-private-methods in default set as well

* disable new babel plugins

* Revert "disable new babel plugins"

This reverts commit 04d959431d.

* cleanup security_solution types

* Fixes type error for newer TypeScript

* update docs

Co-authored-by: Nicolas Chaulet <nicolas.chaulet@elastic.co>
Co-authored-by: Felix Stürmer <stuermer@weltenwort.de>
Co-authored-by: CJ Cenizal <cj@cenizal.com>
Co-authored-by: Larry Gregory <larry.gregory@elastic.co>
Co-authored-by: Nathan L Smith <smith@nlsmith.com>
Co-authored-by: Walter Rafelsberger <walter@elastic.co>
Co-authored-by: Luke Elmers <luke.elmers@elastic.co>
Co-authored-by: Alejandro Fernández Haro <alejandro.haro@elastic.co>
Co-authored-by: Tim Roes <tim.roes@elastic.co>
Co-authored-by: Clint Andrew Hall <clint.hall@elastic.co>
Co-authored-by: Patryk Kopycinski <contact@patrykkopycinski.com>
Co-authored-by: FrankHassanabad <frank.hassanabad@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-11 10:04:09 +02:00
Quynh Nguyen
3197a00e79
Revert "[ML] Transforms: Add ability to delete dest index & index pattern when deleting transform job" (#68793) 2020-06-10 12:02:52 -05:00
Quynh Nguyen
9bc0936311
[ML] Transforms: Add ability to delete dest index & index pattern when deleting transform job (#67922) 2020-06-10 10:11:46 -05:00
Oliver Gupte
cac9018f81
[APM] Service maps - Fix missing ML status for services with jobs but no anomalies (#68486)
* Closes #68485 by:
  - use the ML plugin to query for all APM jobs
  - inspect the ml job groups to find all jobs related to a particular service
  - use the mlAnomalySearch client to get ml job buckets with the max anomaly score
  - query for the model_plot buckets to obtain actual/median values for the ML description
  - return the relevant ML job with the max anomaly score for a service
  - indicate to the user that no anomalies were found for a service with an ml job

* - Use the anomalyDetectorsProvider jobs API rather than the search endpoint directly
- Defines a specific return type for the ml jobs api
- Update the empty anomaly data message

* Code and types cleanup

* Return to using record result type on anomaly queries. These are the
same values used in the anomaly explorer and it includes actual &
typical values which greatly improve performance of the previous query.

* - If anomaly data is missing show a gray border around node

* - moved AnomalyDetection out of service map Contents into own component

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-09 20:58:46 -07:00
Melissa Alvarez
696d71e13a
[ML] DF Analytics: Creation wizard part 2 (#68462)
* Add ability to clone job

* remove deprecated creation form code

* ensure excludes cloned correctly and update clone action jest test

* remove unused translations

* update helper function name
2020-06-09 16:37:03 -04:00
Robert Oskamp
004df98c87
[ML] Sample data modules - use event.dataset instead of index name (#68538)
This PR adds event.dataset to the Kibana ecommerce sample data and makes the ML modules for ecommerce and weblog sample data use event.dataset to recognize the modules and also as the corresponding datafeed query instead of looking for the index name.
2020-06-09 11:30:15 +02:00
Melissa Alvarez
e2f11e9fe9
[ML] DFAnalytics results: ensure ml result fields are shown in data grid (#68305)
* wip: ensure top classes and influencer result col show up correctly

* ensure ml subFields columns are populated
2020-06-08 11:19:01 -04:00
Robert Austin
c98cfda890
upgrade eslint-plugin-react-hooks from 2.3.0 to 4.0.4 (#68295)
* updates `eslint-plugin-react-hooks` from `v2.3.0` to `v4.0.4`. 
* Disable rules on failing lines
2020-06-05 12:43:55 -04:00
Uladzislau Lasitsa
b87eefc753
[uiSettings]: Migrate items owned by app arch to new platform (#66040)
* Migrated uiSettings items to new platform

* API changes

* Fixed translations

* Fixed comment and i18n

* Fixed tests

* Fixed internalization

* Fix karma tests

* made code more explicit

* Fixed plugin

* Added consts for ui settings ids.

* Added id for another settings

* Fixed tests.

* Improved imports

* Fix imports to public which were happening from the server.

* Fixed paths

* Moved styles to plugin.ts

* Moved styles

* Fixed docs

* Fix ci

* Fix ci

* fix documentation

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Alexey Antonov <alexwizp@gmail.com>
Co-authored-by: Luke Elmers <luke.elmers@elastic.co>
2020-06-05 10:55:42 +03:00
Melissa Alvarez
edc4d58e12
[ML] DF Analytics: Creation wizard part 1 (#67564)
* create newJob route and start of wizard

* wip: create configStep component

* finish configStep form and details

* wip: create andvanced step components

* create details step component

* createStep component

* ensure advanced options are correct for each job type

* add validation to each step

* use custom table for excludes

* move customSelectionTable to shared components

* form validation for advanced fields

* wip: source index selection modal

* add source index preview

* update details

* ensure advanced parameters added to config on creation

* can create job from savedSearch. can set source query in ui

* validate source object has supported fields

* eslint updates

* update tests. comment out clone action for now

* add create button to advanced editor

* remove deprecated test helper functions

* fix translation errors

* update help text. read only once job created.

* fix functional tests

* add nextStepNav to df service for tests

* fix excludes table page jump and hyperParameter not showing in details

* fix checkbox width for custom table
2020-06-04 13:39:43 -04:00
Quynh Nguyen
a8f04f8304
[ML] Keep the edit rule flyout open if there are multiple rules (#68174) 2020-06-04 09:34:47 -05:00
James Gowdy
3d2c3f1eac
[ML] Remove assignment_explanation when cloning job (#68226) 2020-06-04 15:02:09 +01:00
James Gowdy
c9d1c1f945
[ML] Adding annotations_enabled to model plot config (#68228) 2020-06-04 14:59:27 +01:00
Dima Arnautov
63bb072064
[ML] Transforms: Filter aggregation support (#67591)
* [ML] WIP filter support

* [ML] value selector

* [ML] only supported filter aggs as options

* [ML] WIP apply config

* [ML] fix form persistence

* [ML] refactor

* [ML] support clone

* [ML] validation, get es config

* [ML] support "exists", fixes for the term form, validation

* [ML] fix ts issues

* [ML] don't perform request on adding incomplete agg

* [ML] basic range number support

* [ML] filter bool agg support

* [ML] functional tests

* [ML] getAggConfigFromEsAgg tests

* [ML] fix unit tests

* [ML] agg name update on config change, add unit tests

* [ML] update snapshot

* [ML] range selector enhancements

* [ML] improve types

* [ML] update step for range selector to support float numbers

* [ML] range validation

* [ML] term selector improvements

* [ML] fix switch between advanced editor

* [ML] prefix test ids

* [ML] support helper text for aggs item
2020-06-04 14:21:03 +02:00
Quynh Nguyen
2266dd969e
[ML] Extend population preview chart to show actual and typical value (#67569)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-03 20:19:04 -05:00
Alexey Antonov
d661d66faa
[New Platform Migration]: Management - Implement NP API (#66781)
* [New Platform Migration]: Management - Implement NP API

Part of #47432

* partial progress on a number of management sections

* fix passing history

* Fixed types

* Fixed routing for Ingest Node Pipelines

* introduce and use react router wrapped eui components

* react router utils

* work in progress => hashRouter to router

* more partial progress

* remove console.log

* use reactRouterNavigate for management_sidebar

* Breadcrumbs will need to make use of the reactRouterNavigate function

* [triggersActions] app. Hash Router -> Router

* Replace /app/kibana#/management urls to /app/management

* remove ui/public/management

* fix some links to management apps

* fix management url for functional tests

* add data-test-subj for EuiSideNavItem

* partial progress

* fix some of ts issues

* Fixed breadcrumbs for data index management

* [kibana/spaces] section

* fix functional test

* [role_management] fix Breadcrumbs

* [api_keys] fix Breadcrumbs and Navigation

* Fixed routing for remote cluster

* [role_mapping] Partial progress

* [users] partial progress

* [watcher] partial progress

* fix eslint issues

* [snapshot_restore] partial progress

* [rollup_jobs] partial progress

* Fixed routing for cross cluster replications (partial progress). Enhanced reactRouterNavigate

* Perf optimization: fix extra re-rendering

* fix TS errors

* x-pack fix config for functional tests

* Fixed routing for index lifecycle management

* fix some broken CI tests

* fix PR comment

* [snapshot_restore] move onClick into reactRouterNavigate

* fix some jest

* fix some functional tests

* fix functiona test: management  scripted fields testing regression for issue

* fix some functional tests

* [licence_management] partial progress

* Fixed x-pack jest tests

* [saved_object_management] partial progress

* Fixed some tests

* fix functional test: should add new role myroleEast

* Reverted part of changes for ml

* [transforms] partial progress

* fix TS errors

* fix functional:  redirects to Kibana home

* add support of Backward compatibility

* fix functional: Saved objects management feature controls saved objects management global visualize all privileges listing redirects to Kibana home

* fix PR comment

* fix TS issues

* Fixed x-pack jest tests

* fix oss JEST

* Fixed functional test

* fix functional test

* fix PR comment

* Fixed i18n

* fix typo

* fix Styles

* Fixed paths for cross_cluster_replication

* fix wrong link

* Fixed jest

* Fixed some comments

* fix sorting

* fix type check

* fixed x-pack jest

* fixed x-pack jest

* reverted using of parentHistory

* Add debugging toasts to CCR.

* Comment out non-CCR functional tests.

* Fix typo.

* Uncomment non-CCR functional tests.

* Enable CCR.

* fix CI

* Add comment to explain why CCR is enabled by default and move config variable back to original location in CCR plugin.

* revert some changes in APM

* add space between index pattern name and tags

* fix function test

* Update x-pack/plugins/security/public/management/management_urls.ts

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

* Update x-pack/plugins/security/public/management/api_keys/api_keys_management_app.tsx

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

* Update x-pack/plugins/spaces/public/management/spaces_management_app.tsx

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

* Update x-pack/plugins/security/public/management/roles/roles_management_app.tsx

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

* Update x-pack/plugins/security/public/management/users/users_management_app.tsx

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

* Update x-pack/plugins/security/public/management/management_urls.ts

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

* Update x-pack/plugins/security/public/management/management_urls.ts

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

* [security] getUrlForApp -> navigateToApp

* [mp] fix Uncaught (in promise) undefined

Co-authored-by: Matt Kime <matt@mattki.me>
Co-authored-by: Uladzislau Lasitsa <Uladzislau_Lasitsa@epam.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: CJ Cenizal <cj@cenizal.com>
Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com>
2020-06-03 18:55:06 +03:00
James Gowdy
c718afcbba
[ML] Fix expanded row bug when job has no datafeed (#68074) 2020-06-03 15:24:13 +01:00
James Gowdy
0897418795
[ML] Adding per_partition_categorization to job interface and schema (#67953)
* [ML] Adding per_partition_categorization to job interface and schema

* adding new fields to Category interface
2020-06-03 15:23:54 +01:00
Quynh Nguyen
daf26b9066
[ML] Add minor refresh button to DFA and AD Job Messages tabs (#67750)
* [ML] Add minor refresh button to DFA and AD Job Messages tabs

* [ML] Update refresh logic for DFA

[ML] Update refresh logic for DFA

* [ML] Update fetchMessages callback

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-01 11:13:59 -05:00
Quynh Nguyen
f31330a01b
[ML] Add ability to delete target index & index pattern when deleting DFA job (#66934)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-01 10:53:33 -05:00
Mikhail Shustov
53b95424fe
Deprecate es API exposed from setup contract (#67596)
* move elasticsearch client under legacy namespace

* update mocks and tests

* update platform code

* update legacy code

* update plugins using elasticsearch setup API

* update request handler context

* update docs

* rename remaining places

* address comments

* fix merge conflict error
2020-06-01 16:16:44 +02:00
James Gowdy
cae6b9e35a
[ML] Using mlClient callAsInternalUser in job validation (#67609) 2020-05-28 18:04:16 +01:00
James Gowdy
321a10d1df
[ML] Renaming mlSearch to mlAnomalySearch (#67602) 2020-05-28 18:02:50 +01:00
James Gowdy
dcca06bad2
[ML] Update job service id schema (#67462) 2020-05-28 11:50:56 +01:00
Mikhail Shustov
4040c3090b
Mark elasticsearch client exposed via request context as deprecated (#67319)
* add legacy prefix for es client exposed via request handler context

* update src/plugins

* update core mocks and tests

* update test plugins

* update xpack plugins

* include x-pack/mocks.ts

* update after master merge

* update docs

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-05-27 19:00:16 +02:00
restrry
bf04235dae apply prettier styles 2020-05-22 09:08:58 +02:00
Pete Harverson
3e6b3ae74d
[ML] Fixes capabilities check for evaluate analytics endpoint (#66983) 2020-05-19 15:46:18 +01:00
Matthew Kime
f7181a95dc
Index pattern management to Kibana platform (#65026)
* index pattern management to kibana platform
2020-05-18 22:25:20 -05:00
Pete Harverson
1c61ca2c6d
[ML] Enhances api docs for modules endpoints (#66738)
* [ML] Enhances api docs for modules endpoints

* [ML] Edits to modules schema following review

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-05-18 18:13:43 +01:00
CJ Cenizal
bfdeb10c15
Reorganize Management apps into Ingest, Data, Alerts and Insights, Security, Kibana, and Stack groups (#65796) 2020-05-15 16:11:27 -07:00
Quynh Nguyen
ae663eb7d0
[ML] Add linking to dataframe from job management tab (#65778)
* [ML] Add linking to dataframe from job management tab

* [ML] Add linking to df analytics job list from management tab

* [ML] Add ability to query text/job id from url for DFA page

* [ML] Add linking to dataframe from job management tab

* [ML] Add linking to df analytics job list from management tab

* [ML] Add ability to query text/job id from url for DFA page

* [ML] Refactor get_job_id_url util function & clean up

* [ML] Add declaration file for job_list's utils

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-05-15 14:31:12 -05:00
Dima Arnautov
f7a89601c7
[ML] Custom template for apiDoc markdown (#66567)
* [ML] custom template for apiDoc markdown

* [ML] update apiDoc description
2020-05-15 11:41:29 +02:00
Dima Arnautov
d0b9840041
[ML] API integration tests for job validation (#66265)
* [ML] TS refactoring

* [ML] fix page overflow

* [ML] tests

* [ML] fix typing issues and unit tests

* [ML] remove string conversion

* [ML] indexOf checks

* [ML] fix tooltip overflow

* [ML] fix i18n

* [ML] fix unit tests

* [ML] use MlJobAggregation

* [ML] use enums

* Revert "[ML] fix tooltip overflow"

This reverts commit 103c36bc

* Revert "[ML] fix page overflow"

This reverts commit 3c869228
2020-05-13 18:52:49 +02:00
Dima Arnautov
69d4199feb
[ML] Fix vertical overflow on Single Metric Viewer page (#66413)
* [ML] fix page overflow

* [ML] fix tooltip overflow
2020-05-13 18:16:14 +02:00
Walter Rafelsberger
115ede9fda
[ML] Data Frame Analytics: Fix steps to be named phases. (#65855)
- Fixes wrong names and renames everything related to step to phase.
- Renames column heading Progress per Step to just Progress.
- Hide the progress bar percentage, instead it's available in a tooltip.
- Changes the progress column content to Phase 1/4 [ProgressBar].
2020-05-13 12:16:39 +02:00
Walter Rafelsberger
a149915c52
[ML] Data Frame Analytics: Fix confusion matrix data grid width. (#65818)
- Fixes an issue where hiding all columns for the confusion matrix would hide the menu item to enable columns again.
- Replaces resizeHandler based workaround for EuiDataGrid within flex layouts with a CSS based workaround.
- Moves inline styles to SCSS file and imports that file directly.
- Fixes IE11 layout issues.
2020-05-13 09:30:24 +02:00
Joe Reuter
b7e87c2c8b
Switch to core application service (#63443) 2020-05-13 09:19:24 +02:00
Quynh Nguyen
7da7080fbc
[ML] Fix anomaly dot plotted in wrong location in Single Metric Viewer (#66071)
* [ML] Fix anomaly dot plotted in wrong location in SMV

* [ML] Validate if record's actual exists before setting it as chartPoint data

* [ML] Add logic for chartPoint in case record dne to use the cause's actual

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-05-12 15:28:21 -05:00
Quynh Nguyen
f24785f33b
[ML] Search should have a categorical option for job type (#65770)
* [ML] Add categorical filters to ist of df analytics jobs

* [ML] Removed unused ANALYSIS_CONFIG_TYPE

* [ML] Change getJobTypeBadge to implicit return

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-05-12 12:13:49 -05:00
Pete Harverson
0124977830
[ML] Fixes anomaly charts for rare detectors when model plot is enabled (#66075) 2020-05-12 14:53:48 +01:00
Melissa Alvarez
4174bab3cc
[ML] Anomaly Explorer: if filter includes wildcard ensure matching swimlanes are not masked (#65384)
* if wildcard search no mask for matching swimlanes

* update swimlane proptypes

* add helper function

* add tests for helper function
2020-05-11 12:56:25 -04:00
Dima Arnautov
d1e4d37c46
[ML] Cardinality validation API integration tests (#65971)
* [ML] refactor validate_cardinality to TS

* [ML] cardinality api integration tests

* [ML] resolve PR comments, validateJobObject as TS guard
2020-05-11 15:57:12 +02:00
Walter Rafelsberger
e148eb4437
[ML] Anomaly Detection: Fix test to reflect model memory limit change. (#65967)
Adapt jest test mocks to consider update introduced in #65652.
2020-05-11 11:41:01 +02:00
James Gowdy
af102afb7a
[ML] Fixing watch creation (#65956) 2020-05-11 10:00:44 +01:00
Quynh Nguyen
d3b155f843
[ML] Add job timing stats to anomaly jobs (#65696)
* [ML] Add anomaly job timing stats to Counts & JSON

* [ML] Remove roundTo3DecimalPlace and clean up

* [ML] Fix format_values to round decimals for time values

* [ML] Remove timing_stats and forecast_stats from cloneJob

* [ML] Remove timing_stats & forecasts in job_service instead of utils
2020-05-08 12:06:59 -05:00
Brian Seeders
d40387161e
Skipping failing tests. #65867 #65866 #65865 2020-05-08 11:35:17 -04:00