kibana/x-pack/test/functional
Walter Rafelsberger f391ed6bcf
[ML] AIOps: Update fields filter popover to be able to filter fields from analysis (not just grouping) (#188913)
## Summary

Part of #187684.

So far the popover to filter fields was only available when grouping was
enabled. This PR updates the behavior so it's available all the time and
can be used to exclude field candidates from the analysis. If we detect
the index to be based on an ECS schema, we auto-select a set of
predefined fields.

Changes in this PR:

- Creates a new route
`/internal/aiops/log_rate_analysis/field_candidates` to be able to fetch
field candidates independent of the main streaming API call.
- Fixes the code to consider "remaining" field candidates to also
consider text field candidates. This was originally developed to allow
to continue an analysis that errored for some reason. We use that option
to also pass on the custom field list from the field selection popover.
- Fetching the field candidates is done in a new redux slice
`logRateAnalysisFieldCandidatesSlice` using an async thunk.
- Filters the list of field candidates by a predefined field of allowed
fields when an ECS schema gets detected.
- Renames `fieldCandidates` to `keywordFieldCandidates` for clearer
distinction against `textFieldCandidates`.
- Refactors `getLogRateAnalysisTypeForCounts` args to a config object.
- Bump the API version for the full log rate analysis to version 3. We
missed bumping the version in
https://github.com/elastic/kibana/pull/188648. This update manages
proper versioning between v2 and v3, also the API integration tests
cover both versions.


[aiops-log-rate-analysis-fields-filter-0001.webm](https://github.com/user-attachments/assets/e3ed8d5b-f01c-42ef-8033-caa7135b8cc0)

### 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
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [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-07-30 10:12:53 +02:00
..
apps [ML] AIOps: Update fields filter popover to be able to filter fields from analysis (not just grouping) (#188913) 2024-07-30 10:12:53 +02:00
es_archives [Security Solution][Detections][BUG] Rule execution error when source document has a non-ECS compliant text field (#187630) (#187673) 2024-07-22 13:32:38 -05:00
fixtures [Lens] Change legendStats from values to currentAndLastValue/value (#181993) 2024-04-30 08:04:02 -07:00
page_objects Minimize shared-common everywhere (#188606) 2024-07-29 12:47:46 -06:00
screenshots/baseline [FTR] Switch to new browser headless mode (#153828) 2023-04-04 15:53:56 +02:00
services Minimize shared-common everywhere (#188606) 2024-07-29 12:47:46 -06:00
config.base.js Minimize shared-common everywhere (#188606) 2024-07-29 12:47:46 -06:00
config.ccs.ts CCS Tests for Machine Learning (#144869) 2022-11-14 11:31:27 -05:00
config.edge.js [ftr] automatically determine config run order (#130983) 2022-05-04 17:05:58 -05:00
config.firefox.js unskip tests for chrome, fix tags (#158405) 2023-05-26 09:19:53 +01:00
config.upgrade_assistant.ts [ML] Transforms: Enable SLO transforms installer on CI (#165470) 2023-09-22 17:13:38 +02:00
config_security_basic.ts Minimize shared-common everywhere (#188606) 2024-07-29 12:47:46 -06:00
ftr_provider_context.ts
README.md

Kibana Functional Testing

See our Functional Testing Guide