Commit graph

39 commits

Author SHA1 Message Date
Walter Rafelsberger
71e7f5ae55
[ML] Anomaly Detection: Use data view esTypes instead of custom field caps wrapper endpoint. (#182588)
## Summary

Fixes #182514.

The links menu for the anomalies table used a custom field caps wrapper
API endpoint to identify the type of the categorization field. This PR
changes this to use the data view API instead to use `esTypes` for the
same check. This allows us to remove the custom field caps API endpoint
completely.

Removes the route `POST /internal/ml/indices/field_caps` as it is no
longer required by the ml plugin.

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
2024-05-10 07:40:00 +02:00
Dima Arnautov
b3f036b554
[ML] API integration tests for model_management endpoints (#164668) 2023-08-24 19:32:34 +02:00
Robert Oskamp
7d00fa6fa8
[ML] Functional tests - reenable evaluate DFA API tests (#141588)
This PR re-enables the API integration tests for the data_frame/_evaluate endpoint.
2023-01-31 10:26:29 +01:00
Apoorva Joshi
9e4cb9d2f7
Updates to pre-built Security ML jobs (#146760)
## Summary
This PR makes the following updates to our pre-built Security ML jobs:
- Adds user-friendly names to our pre-built Anomaly Detection jobs.
These will be displayed in the Anomalies tab on the new Entity Analytics
page in the Security App instead of job IDs.
- Fixes formatting
- One job was missing the `security` job group which is required to
display jobs in the Security App. Added that as well.
- Changed the names of two modules: `siem_cloudtrail` ->
`security_cloudtrail` and `siem_packetbeat` -> `security_packetbeat`.
This should have happened a while ago per
[this](https://github.com/elastic/kibana/issues/69319) issue.

## Side effects
- Any QA tests that reference the `siem_cloudtrail` and
`siem_packetbeat` modules will need to be changed to reference the new
modules instead
- Any references to the siem modules in the Security App will need to be
updated

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Robert Oskamp <robert.oskamp@elastic.co>
2022-12-15 22:24:03 +01:00
Dima Arnautov
042c76687c
[ML] Update the Notification indicator tooltip, add functional tests (#141775) 2022-09-28 03:34:30 -07:00
James Gowdy
292a6a6afb
[ML] Management page refactor (#134893)
* [ML] Management page refactor

* updating props

* adding search and filters

* fixing types

* fixing types

* adding links

* fixing dependency cache problem

* fixing dependency cache problems

* fixing types

* translations

* translations

* moving common code

* upating endpoint comments

* fixing tests

* fixing tests

* fixing tests

* removing comment

* code clean up

* adding id check to spaces test

* translations

* fixing tests

* changes based on review

* adding unmounted and tab change race condition checks

* adding endpoint test

* adding table state

* fixing test

* translations

* renaming variables

* fixing tests

* using vars in expects
2022-06-30 16:53:17 +01:00
Robert Oskamp
c79eb03319
[ML] Functional tests - split ML test groups (#131716)
This PR splits up the ML functional UI test groups and renames them to better match the contained test suites.
2022-05-09 17:22:03 +02:00
Robert Oskamp
25e26c6b6f
[ML] Functional tests - stop re-using saved objects (#122669)
This PR stabilizes tests that use saved searches be removing the re-use of saved objects from all ML + TFM tests.
2022-01-12 13:20:01 +01:00
Pete Harverson
c47899fe83
[ML] Removes APM NodeJS and RUM Javascript modules (#119945)
* [ML] Removes APM NodeJS and RUM Javascript modules

* [ML] Delete unnecessary module_apm archive

* [ML] Fix get_module API test
2021-12-01 11:51:08 +00:00
Quynh Nguyen
6e18f3ff09
[ML] Fix data visualizer grid failing if one of the fields failed and not updating when refreshed (#115644)
* [ML] Initial embed

* [ML] Initial embed props

* [ML] Add top nav link to data viz

* Add visible fields

* Add add data service to register links

* Renames, refactor, use constants

* Renames, refactor, use constants

* Update tests and mocks

* Embeddable

* Update hook to update upon time udpate

* Add filter support to query

* Refactor filter utilities

* Add filter support for embeddable

* Fix saved search data undefined

* Prototype aggregated view/document view switcher

* Prototype flyout

* Prototype save document view option in storage

* Fix filter and query conflict with saved search

* Minor styling edits

* [ML] Initial embed

* [ML] Initial embed props

* Add embeddable 1

* Add visible fields

* Embeddable 2

* Add filter support to query

* Refactor filter utilities

* Add filter support for embeddable

* Fix saved search data undefined

* Prototype aggregated view/document view switcher

* Prototype flyout

* Prototype save document view option in storage

* Fix filter and query conflict with saved search

* Minor styling edits

* Fix missing code after conflicts

* Remove dv locator and flyout

* Make types happy

* Fix types

* Rename toggle option

* Resolve conflicts

* [ML] Reduce size of chart

* [ML] Unbold name, switch icons of show distributions

* [ML] Make size consistent

* [ML] Make page size 25

* [ML] Switch to arrow right and down

* [ML] Make legend font smaller

* [ML] Add user setting

* [ML] Add show preview by default setting

* [ML] Match icon

* Add panels around the subcontent

* Add preference for aggregated vs doc

* Fix types

* Fix types, add constants for adv settings

* Change to data view type

* Temp fix for Kibana/EUI table overflow issue

* Modify line height so text is not cut off, modify widths for varying screen sizes

* Different width padders for different screens

* Fix CI

* Merge latest, move button to the right

* Fix width for bar charts previews

* Fix toggle buttons, fix maps

* Delete unused file

* Fix boolean styling

* Change to enum, discover mode

* Hide field stats

* Hide field stats

* Persist show mini preview/distribution settings

* Remove window size, use size observer instead

* Default to document view

* Remove bold, switch icon

* Set fixed width for top values, reduce font size in table

* Fix custom url tests

* Update width styling for panels

* Fix missing flag for Discover sidebar, jest tests

* Fix max width

* Workaround for sorting

* Fix import

* Fix styling

* Make height uniform, center alignment, fix map and keyword map not same size

Move styling

* Revert "Make height uniform, center alignment, fix map and keyword map not same size"

This reverts commit 8fc42e2f

* Revert "Make height uniform, center alignment, fix map and keyword map not same size"

This reverts commit 8fc42e2f

* Uniform height, left aligned, flex grid

* Switch top values to have labels

* Center content

* Replace fixed widths with percentage

* Fix table missing field types

* Add dashboard embeddable and filter support

* Fix file data viz styling and tests, lean up imports, remove hard coded pixels

* Add search panel/kql filter bar

* Temporarily fix scrolling

* New kql filters for data visualizer

* Set map height so it will fit the sampler shard size text

* Use eui progress labels

* Fix spacer

* Add beta badge

* Temporarily fix scrolling

* Fix grow for Top Values for

* [ML] Update functional tests to reflect new arrow icons

* [ML] Add filter buttons and KQL bars

* [ML] Update filter bar onChange behavior

* [ML] Update top values filter onChange behavior

* [ML] Update search filters when opening saved search

* [ML] Clean up

* [ML] Remove fit content for height

* [ML] Fix boolean legend

* [ML] Fix header section when browser width is small to large and when index pattern title is too large

* [ML] Hide expander icon when dimension is xs or s & css fixes

* [ML] Delete embeddables because they are not use

* [ML] Rename view mode, refactor to separate hook, add error prompt if can't show, rename wrapper, clean up & fix tests

* [ML] Make doc count 0 for empty fields, update t/f test

* [ML] Add unit testing for search utils

* Fix missing unsubscribe for embeddable output

* Remove redundant onAddFilter for this PR, fix width

* Rename Field Stats to Field stats to match convention

* [ML] Fix expand all/collapse all behavior to override individual setting

* [ML] Fix functional tests should be 0/0%

* [ML] Fix docs content spacing, rename classnames, add filters to Discover, lens, and maps

* [ML] Fix doc count for fields that exists but have no stats

* [ML] Fix icon styling to match Discover but have text/keyword/histogram

* [ML] Fix doc count for fields that exists but have no stats

* [ML] Rename classnames to BEM style

* Resolve latest changes

* Add in place ss

* Refactor helper functions

* Refactor helper functions

* Add error log

* Migrate overall stats to data's search

* Better handle errors

* Fix url so restore session brings back correct view

* Add progress bar

* [ML] Add tests for data viz in Discover

* [ML] Change to combinelatest

* Update tests & dashboard behavior to reflect new advanced settings

* Update telemetry

* Remove workaround after eui bump fix

* Remove dataloader

* Snapshot

* Migrate search to client side

* Consolidate types

* Change back to forkjoin instead of combinelatest for overallstats

* Fix missing bool clause

* Add login

* Fix saved search attributes broken with latest changes

* Update tests

* Fix import

* Match the no results found

* Reset field stats so it reloads when query is refreshed

* Reset field stats so it reloads when query is refreshed

* Add doc stats

* Merge to use hook completely

* Merge to use hook completely

* Fix doc chart doesn't show up when page is first mounted

* Fix Discover auto refresh previously didn't update

* Fix query util to return search source's results right away. Fix texts.

* Refactor documentStats

* Fix doc stats not showing upon page mount

* Fix types

* Delete old files

* Update tests & i18n

* Fix examples, tests

* Remove old files & routes

* Add telemetry, clean up, rename components for clarity

* Fix size of callout message

* Fix texts field

* Consolidate field type

* Consolidate field type, add count to top values

* Clean up

* Update tests

* Remove progress on embedadble

* Update snapshot

* Clean up, consolidate searchOptions

* Fix new es client types

* Fix types

* Fix loading state in Discover

* Remove unused services, Change switchMap to map, mergeMap -> switchMap, update types

* Fix missing filters

* Fix message of table to show searching instead of no items found

* Fix dashboard saved search source persisting time range

* [ML] Fix table message state

* [ML] Fix to not fetch field stats if cardinality is 0

* [ML] Fix locator missing view mode

* [ML] Quit right away if field doesn't exist in docs

* [ML] Change to use batch and only retry with individual field if failed

* [ML] Batch requests for speed and retry failures for resiliency

* No need to fetch field stats if overall stats haven't completed

* Wait on overallStats to complete

* Fix types after merge

* Fix payload size too big 413, num of requests

* Update field icon to using kbn/react-field package

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-11-08 14:36:10 -06:00
James Gowdy
27866cec6e
[ML] Adding datafeed api tests (#116133)
* [ML] Adding datafeed api tests

* updating tests

* adding more AD tests

* adding test include

* renaming function
2021-10-26 07:41:01 +01:00
Robert Oskamp
729481ed59
[ML] Functional tests - stabilize categorization examples endpoint test (#115910)
This PR stabilizes the categorization example endpoint tests by using a different esArchive.
2021-10-21 17:11:24 +02:00
Dima Arnautov
0ae7455377
[ML] Add job audit messages API integration tests (#110793) 2021-09-02 14:43:14 +02:00
Dima Arnautov
0809d5d15f
[ML] Add integration tests for trained_models API (#104819)
* [ML] api integration tests for get trained models endpoint

* [ML] delete ingest pipelines after tests execution

* [ML] deleteIngestPipeline method

* [ML] test for unauthorized user

* [ML] tests for model stats

* [ML] delete trained model tests

* [ML] fix typo

* [ML] fix expect package path

* [ML] get model pipelines tests

* [ML] test for aliases

* [ML] add tests for a 404 response

* [ML] fix typo

* [ML] fix typo
2021-07-09 12:53:20 -04:00
James Gowdy
85f831bb16
[ML] Adding tests for ML's field caps endpoint (#104315)
* [ML] Adding tests for ML's field caps endpoint

* fixing typos
2021-07-07 09:01:30 +01:00
Spencer
f466ebf1a3
[esArchiver] drop support for --dir, use repo-relative paths instead (#101345)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-06-08 17:37:42 -04:00
Robert Oskamp
c44e5f75a3
[ML] Functional tests - increase module test coverage (#99758)
This PR adds a couple API integrations tests to get, recognize and setup modules.
2021-05-12 13:18:36 +02:00
James Gowdy
3b66bf7cc5
[ML] Adding ml_capabilities api tests (#92786)
* [ML] Adding ml_capabilities api tests

* updating test text

* changes based on review
2021-02-25 18:24:39 +00: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
Robert Oskamp
d4f4a2c94f
[ML] API integration tests - security_linux and security_windows modules (#85743)
This PR adds API integration tests to create and setup the security_linux and security_windows modules.
2020-12-14 15:17:25 +01:00
Robert Oskamp
0366a892b3
[ML] Initial API integration tests for ML jobs in spaces (#84789)
This PR adds initial API integration tests for the endpoints related to ML jobs in spaces.
2020-12-07 16:26:57 +01:00
Robert Oskamp
d28897b275
[ML] Functional tests - recognize and setup module tests for heartbeat and auditbeat (#83796)
This PR adds api integration tests to recognize and setup the modules uptime_heartbeat and auditbeat_process_hosts_ecs.
2020-11-20 17:35:21 +01:00
Quynh Nguyen
69844e45eb
[ML] Add API integration testing for AD annotations (#73068)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-31 11:22:14 -05:00
Quynh Nguyen
6d480c7f22
[ML] Add API integration tests for /filters and /calendars (#72564)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-23 11:38:29 -05:00
Robert Oskamp
55260dde18
[ML] Functional tests - add more recognize and setup module API tests (#69251)
This PR adds a couple recognize module and setup module API integration tests.
2020-06-17 15:19:55 +02:00
Robert Oskamp
e492cf138d
[ML] Functional tests - add validation messages (#67583)
This PR adds validation messages to all ML and Transform services in order to make it easier to debug test failures.
2020-05-28 15:19:25 +02:00
restrry
bf04235dae apply prettier styles 2020-05-22 09:08:58 +02:00
Melissa Alvarez
840ae20656
[ML] API integration tests for GET data frame analytics endpoints (#66136)
* wip: create analytics api integration dir

* add get analytics tests

* update types and naming

* update api test types
2020-05-12 16:47:14 -04:00
Dima Arnautov
d005a55d16
[ML] API integration tests for fetching anomalies table data (#65844) 2020-05-11 14:06:54 +02:00
Pete Harverson
09c2727d78
[ML] Adds API integration tests for data viz and fields endpoints (#64165)
* [ML] Adds API integration tests for data viz and fields endpoints

* [ML] Fix review comments and errors from settings endpoints

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-23 18:06:33 +01:00
Robert Oskamp
1992716086
[ML] Functional tests - refactor test resources (#63724)
This PR changes the way how test resources like indices and saved objects are used in ML and Transform functional tests. No actual test logic is changed.
2020-04-17 18:10:46 +02:00
Larry Gregory
9d89a4fb49
Support multiple reserved feature privileges (#61980)
* support multiple reserved feature privileges

* update reserved privilege ids

* additional testing

* Add ml_user and ml_admin reserved privileges

* prrevent reserved privilege ids from sttarting with 'reserved_'

* address pr feedback: dedicated reserved privilege type

* re-enable ML test suites

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-08 13:03:15 -04:00
Robert Oskamp
b7d05573e7 [ML] Disable functional tests 2020-04-07 16:38:04 +02:00
Robert Oskamp
ef72135527
[ML] API integration tests - add recognize and setup module tests (#61793)
This PR adds initial functional API tests for the modules/recognize and modules/setup endpoints.
2020-03-31 08:38:43 +02:00
Robert Oskamp
f5e94c4ca3
[ML] Move get_module Jest tests to functional API test (#61613)
This PR removes the flaky listModules and getModule Jest tests and adds them as functional API tests.
2020-03-27 16:12:15 +01:00
Robert Oskamp
7b125e3ce0
[ML] Functional tests - run all tests as poweruser (#57809)
This PR runs all functional ML and transform tests (except existing security and feature controls tests) as a poweruser instead of the default superuser.
2020-02-19 08:47:18 +01:00
James Gowdy
02319b7da8
[ML] Categorization field example endpoint tests (#57471)
* [ML] Categorization example endpoint tests

* adding data

* removing debug code

* adding endpoint error test

* updating version in archive
2020-02-13 13:11:31 +00:00
Dima Arnautov
d082c03e9d
[ML] Calculate model memory limit API integration tests (#54557)
* [ML] calculate model memory limit api integration tests

* [ML] extra test cases
2020-01-15 13:42:35 +01:00
Robert Oskamp
248904ec87
[ML] API integration tests - initial tests for bucket span estimator (#52636)
This PR adds basic API integration tests for the bucket span estimator.
2019-12-11 11:05:36 +01:00