Commit graph

22 commits

Author SHA1 Message Date
Quynh Nguyen (Quinn)
6010b64204
[ML] Enhance support for ES|QL Data visualizer (#176515)
## Summary

This PR enhances support for ES|QL data visualizer. Changes include:
- Add an Update button that when clicked, will update and run the query.
This is to complement the current cmd + Enter keyboard short cut.


5ca3ac0b-782e-404c-a04b-330c8eea6ab7


- Improve logic to no longer fetch total count & document count if only
the limit size is updated (so changing the limit size, but not the query
or time, will not refresh the count chart again)

- Remove dependency from data view's field format
- Refactor into a data fetching & processing into common hook to be used
for embeddable

- Support ES|QL in Field stats embeddable 

- Fix count % of documents where field exists is > 100% when there are
multi-field values. (E.g. when row is an array of values like ["a", "b",
"c"], the count is much higher than the total number of rows)

<img width="1492" alt="Screenshot 2024-02-09 at 12 48 13"
src="c437e4f9-10e4-4d26-b00a-57277c5e1287">

- Add support for `geo_point` and `geo_shape` field types

<img width="1492" alt="Screenshot 2024-02-09 at 12 47 37"
src="d72e1e73-9880-4a12-be65-29b569d80694">


### Checklist

Delete any items that are not applicable to this PR.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [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
- [ ] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [ ] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)


### Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to
identify risks that should be tested prior to the change/feature
release.

When forming the risk matrix, consider some of the following examples
and how they may potentially impact the change:

| Risk | Probability | Severity | Mitigation/Notes |

|---------------------------|-------------|----------|-------------------------|
| Multiple Spaces&mdash;unexpected behavior in non-default Kibana Space.
| Low | High | Integration tests will verify that all features are still
supported in non-default Kibana Space and when user switches between
spaces. |
| Multiple nodes&mdash;Elasticsearch polling might have race conditions
when multiple Kibana nodes are polling for the same tasks. | High | Low
| Tasks are idempotent, so executing them multiple times will not result
in logical error, but will degrade performance. To test for this case we
add plenty of unit tests around this logic and document manual testing
procedure. |
| Code should gracefully handle cases when feature X or plugin Y are
disabled. | Medium | High | Unit tests will verify that any feature flag
or plugin combination still results in our service operational. |
| [See more potential risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) |


### For maintainers

- [ ] 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)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-02-12 16:04:46 -07:00
Quynh Nguyen (Quinn)
53c3907529
[ML] Add support for ES|QL in Data visualizer (#174188)
## Summary

This PR adds support for ES|QL queries in Data visualizer.

<img width="1695" alt="Screenshot 2024-01-26 at 17 07 59"
src="8a54b859-60d6-4c47-b3dd-e5f3ed43b6b0">

<img width="1695" alt="Screenshot 2024-01-26 at 17 12 39"
src="32fd08e4-7f3b-43e6-81a7-7ec4e777bac0">


a3f540e9-461d-4ebc-bd69-de4ffa2bc554



### Changes:

- Add a new card from the Data visualizer main page

- Add a link from the ML navigation

<img width="1717" alt="Screenshot 2024-01-08 at 18 03 50"
src="832f7890-4ce6-44c1-ab87-cde01f4bf1c0">

- Added a new button to Use ES|QL

<img width="1714" alt="Screenshot 2024-01-09 at 11 23 09"
src="a38a9360-6691-4f3b-a824-8481ab543250">


- Support for **keyword**, **text**, **numeric**, **boolean**, **date**,
and **ip** fields

<img width="1714" alt="Screenshot 2024-01-09 at 11 24 38"
src="b122ee5c-1500-4e2b-9434-e64b0b6ea3be">

<img width="1441" alt="Screenshot 2024-01-09 at 11 25 25"
src="eb35ee78-8a34-467e-84da-2026b01fcda1">

<img width="969" alt="Screenshot 2024-01-09 at 11 44 02"
src="d0f9947d-2b2c-4c14-89ba-9fc5d0a2bf64">

<img width="981" alt="Screenshot 2024-01-10 at 12 01 42"
src="aa5a8d44-7447-41fc-a544-d1b626bf8bce">

- Default to user's fieldFormats for fields that are dynamic generated
by ES|QL, else use Data view's format

- Default to Data view's setting (e.g. type `bytes` in this case for
field `bytes_normal_counter`)
<img width="1037" alt="Screenshot 2024-01-10 at 12 10 38"
src="9fb7e31c-f397-4209-a463-e1a43fe27ffd">

- Default to user's fieldFormats formatting for dynamically generated
fields (e.g. type `number` in this case for field `avg_price`)
<img width="1283" alt="Screenshot 2024-01-10 at 12 01 03"
src="acc25358-50bb-4237-9476-86067ef0badf">

- Add a new UI control to allow users to limit analysis to 5,000 -
10,000 - 100,000 - 1,000,000, rows. This speeds up fetching of the stats
for big data sets and avoid potential circuit breaking exceptions.
- Break overall stats request into smaller parallel requests (which
prevent time out or payload too big due by too many fields), at 10
requests at a time
- Break field stats for individual fields into more efficient batches
(which prevent time out or payload too big due by too many fields), at
10 requests at at ime
- Improve error handling by propagating up the error AND the ES|QL
request in both the UI and the developer's console (for better
debugging)
- Improve error handling in field stats rows: If one field, or a group
of fields, say 'keyword' fields fail to fetch for some reasons, it will
show error for that field but not affect all other fields.


<img width="1690" alt="Screenshot 2024-01-26 at 16 04 28"
src="6e240e12-76b4-42d6-b3be-c05342d76df9">

- Add deep linking in the top search bar

<img width="1185" alt="Screenshot 2024-01-26 at 16 56 49"
src="4f24df68-edc5-41c5-b2ed-d6150ba1e20b">

- More robust support for keyword fields with geo data

<img width="1438" alt="Screenshot 2024-01-26 at 16 55 01"
src="3b97925b-ca28-4952-8082-8d3242e3cb3f">




### Todos:
- [x] Add earliest/latest for date time fields -> Current blocker:
escape special characters in esql variable names
- [x] Fix formatting of numbers for dynamic query, where we don't know
the formatting based on the data view
- [x] Fix date time 'Update' not updating until Refresh is clicked
- [x] Better optimization to not fetch distribution & expanded row
content for pages that are not visible


### Good to have:
- [ ] Investigate bringing back the +/- filter buttons (either by
modifying the ES|QL query directly or by adding separate DSL filters?)

------------

### Checklist

Delete any items that are not applicable to this PR.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [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
- [ ] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [ ] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)


### Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to
identify risks that should be tested prior to the change/feature
release.

When forming the risk matrix, consider some of the following examples
and how they may potentially impact the change:

| Risk | Probability | Severity | Mitigation/Notes |

|---------------------------|-------------|----------|-------------------------|
| Multiple Spaces&mdash;unexpected behavior in non-default Kibana Space.
| Low | High | Integration tests will verify that all features are still
supported in non-default Kibana Space and when user switches between
spaces. |
| Multiple nodes&mdash;Elasticsearch polling might have race conditions
when multiple Kibana nodes are polling for the same tasks. | High | Low
| Tasks are idempotent, so executing them multiple times will not result
in logical error, but will degrade performance. To test for this case we
add plenty of unit tests around this logic and document manual testing
procedure. |
| Code should gracefully handle cases when feature X or plugin Y are
disabled. | Medium | High | Unit tests will verify that any feature flag
or plugin combination still results in our service operational. |
| [See more potential risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) |


### For maintainers

- [ ] 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)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-01-31 12:52:31 -06:00
Pete Harverson
2c51f63dd1
[ML] Enhances toast notifications to improve error reporting (#173362)
## Summary

Several enhancements to the error toast notifications in the ML plugin
to improve error reporting.

The bulk of the changes are to add 'See the full error' buttons to the
toasts allowing the user to see further details on the error that has
occurred. Also makes minor edits to some of the error messages to
improve clarity.

Also closes #171839 by changes to
`x-pack/plugins/ml/public/application/jobs/jobs_list/components/utils.js`
so that the the 'Jobs started successfully' toast is only shown if 1 or
more jobs have been started successfully.

Fixes #171839

### Checklist

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-12-20 14:00:27 +00:00
Pierre Gayvallet
04b93f92cc
flag more packages without side effects (#173602)
## Summary

Follow-up of https://github.com/elastic/kibana/pull/173351

`-1.8MB` more on async chunks
2023-12-20 13:17:18 +01:00
James Gowdy
5e3b124ae0
[ML] Create categorization job from pattern analysis (#170567)
Adds the ability to quickly create a categorisation anomaly detection
job from the pattern analysis flyout.
Adds a new `created_by` ID `categorization-wizard-from-pattern-analysis`
which can be picked up by telemetry.

Creates a new package for sharing our AIOPs ui actions IDs. I think we
should move the pattern analysis ID to this package too, but that can be
done in a separate PR.


51349f93-f072-4983-85f0-98741902fb5a



6e618581-8916-4e63-930f-945c96c25e6c

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-11-21 15:52:12 +00:00
James Gowdy
046718c18f
[Transforms] Fixing use full data button (#167404)
Fixing bug introduced by a merge clash between
https://github.com/elastic/kibana/pull/166622 and
https://github.com/elastic/kibana/pull/166651

The `hideFrozenDataTierChoice` prop is no longer available in the
`FullTimeRangeSelector` component and so the transforms plugin needs to
set `showFrozenDataTierChoice` in the data picker context.
2023-09-28 11:09:25 +01:00
James Gowdy
c18513e23d
[ML] Removing global isServerless flag (#166651)
Removed `isServerless` flag which lived in our global context and had to
be passed about to the various components which create their own version
of the context using `getMlGlobalServices`
This PR adds a new context which contains flags for all of the features
which can be toggled when in serverless mode.
Flags added:
```
 showNodeInfo
 showMLNavMenu
 showLicenseInfo
 isADEnabled
 isDFAEnabled
 isNLPEnabled
```
The enabled features flags are now read from the config file client
side, rather than using capabilities.

Additional changes:
- Changes the wording of the awaiting ML node callout in serverless.
- In the search project, the default ML page is the trained models list
and not Overview
- Reenables the Memory Usage page for all projects

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-09-27 09:32:17 +01:00
Quynh Nguyen (Quinn)
7a9a916260
[ML] Hide Exclude frozen data tier option in Transforms creation page (#166622)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-09-25 15:10:52 -07:00
James Gowdy
09faf897c9
[ML] Serverless compatibility fixes (#163724)
**ML Management page**
- Fixes general page loading issues.
- Ensures only enabled features are shown as tabs
- Ensures only jobs for enabled features can be exported and imported.
- Ensures only enabled features are listed in the saved object sync
output.
- On trained models tab:
  - Only lists DFA models if NLP is disabled.
  - Only lists non-DFA models if DFA is disabled.

**Anomaly Detection**
- Hides node information in anomaly detection jobs list.
- Hides the Exclude frozen data option in the Use full time range
selector in job wizards.

**Data frame analytics**
 - Hides all node and license level information.

**Trained models**
 - Only lists DFA models if NLP is disabled.
 - Only lists non-DFA models if DFA is disabled.
 - Hides all node and license level information.
 - Hides DFA nodes 

**Notifications and memory usage**
- Ensures only enabled features are mentioned. Including selectable
types in the search bar filters.

**Integrations with other plugins**
- Changes registration for integrations into other plugins so they only
happen if the relevant feature is enabled.
   - Client side: UI actions, cases, embeddables, alerts, maps.
   - Server side: Sample data sets, cases

**AIOPS**
- Hides the Exclude frozen data option in the Use full time range
selector on all pages

**Notes for non ML team reviewers**

**response-ops**
I've divided the
[persistable_state.ts](https://github.com/elastic/kibana/pull/163724#diff-e02dc0b6cb5b63965372b1f4a84d2287cba31a15ab525ab7983f02d09f23879f)
test into basic and trial version.
The ML cases attachments should only be registered if anomaly detection
is available in a trial or platinum license. This was a bug which I
noticed when making serverless changes.

 **Observability**
I've made a few minor changes to the nav menu, fixing names of ML
features and adding the missing Change point detection AIOPs page.

**Security solution**
I've made a few minor changes to the nav menu, fixing names of ML
features and adding some missing ML features.
I think the icons being used will need to be revisited before release as
we have [official ML
icons](https://elastic.github.io/eui/#/display/icons#apps) but not for
every page. So we should probably either have new icons created or all
agree on which standard non-ML icons should be used for the ones which
are missing.

**Search**
The NLP feature is currently disabled in main, I believe this was an
attempt to stop ML anomaly detection alert rules from being registered.
I've reenabled NLP and changed the way we're registering the alerts.
They will now only be registered if the anomaly detection feature is
enabled.


Fixes https://github.com/elastic/kibana/issues/163372
2023-09-13 12:07:55 -07:00
James Gowdy
af440aae4b
[ML] Fixes dark mode in flyouts and modals (#164399)
A recent EUI change has caused a problem with the theme when using the
deprecated `toMountPoint` inside `overlays.openFlyout` to create
flyouts.
This causes the contents of the rendered flyout to not know the current
theme, this is obvious when running in dark mode.

The fix is to switch to the non-deprecated version of `toMountPoint`.

Flyouts:
Create anomaly detection job from Lens flyout in Dashboard.
Anomaly swim lane and anomaly chart job embeddables job selection flyout
in Dashboard.
Log pattern analysis flyout in Discover.

Modals:
Trained models start deployment modal.
Trained models force stop deployment modal.
Trained models stop deployment modal when there are multiple
deployments.

Misc:
Page not found banner.
Jobs list header, which contains the settings button.
DFA clone job warning toast when the original data view no longer
exists.
Components in ml's date picker package

Fixes https://github.com/elastic/kibana/issues/164379

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Dima Arnautov <arnautov.dima@gmail.com>
2023-08-23 11:47:18 +01:00
Jean-Louis Leysens
6cf0c8c564
[http] Require version headers for internal endpoints (#159009)
## Summary

Makes version headers required for internal endpoints. We also require
version headers for public endpoints when in dev mode.

### Note to reviewers

This PR is a re-revert of the original
https://github.com/elastic/kibana/pull/158667 with some minor additions
(see comments).

The original was reverted due to failing Cypress tests blocking Kibana
promotion for 8.8.1 (CC @stephmilovic,
https://github.com/elastic/kibana/pull/158961)

Not sending headers to versioned, internal endpoints will return 400!
Due to the somewhat sensitive nature of this change, I went through all
of the existing `.versioned` endpoints and tried to ensure that for
_internal_ endpoints we send through a version as this is now
**required**.

I would greatly appreciate it if code owners could check their code,
think of any existing consumers of your versioned endpoints and ensure
they are sending a version.

Closes https://github.com/elastic/kibana/issues/158722

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Patryk Kopycinski <contact@patrykkopycinski.com>
2023-06-06 11:51:06 -06:00
Jon
43928cc9f5
Revert "[http] Make http headers required for internal and when in … (#158961)
…dev mode (#158667)"

This reverts commit de6d8ca33f.
2023-06-02 14:46:10 -05:00
Jean-Louis Leysens
de6d8ca33f
[http] Make http headers required for internal and when in dev mode (#158667)
## Summary

Updates the versioned router behaviour to require the setting of version
on requests when either requesting against:

(1) internal endpoints
or
(2) all endpoints when Kibana is in dev mode

The idea is that when calling our versioned endpoints we should always
be requesting a specific version to avoid possible inconsistent
behaviour if our defaults resolution changes onprem (oldest version) vs
serverless (newest version).

Partially addresses https://github.com/elastic/kibana/issues/158722

### Follow up
* We should update our dev docs to point out this behaviour


### Checklist

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [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
2023-06-02 07:16:35 -07:00
James Gowdy
203d3068e8
[ML] Versioning all ML APIs (#156949)
Adds versioning to all of the ML kibana APIs.
Versions are added to the server side routes and to the client side
functions which call the routes.
Makes some small refactors to ensure only the functions inside
`ml/public/application/services/ml_api_service/` are where the ML APIs
are called.
Updates external plugins which call ML APIs to add the new versioning.
Updates API tests to add the API version to the request headers.

Our one public API has been given the version `'2023-05-15'`, all of the
internal APIs have been given the version `'1'`.

**Public APIs:**
`/api/ml/saved_objects/sync`

**Internal APIS:**
`/internal/ml/alerting/preview`
`/internal/ml/annotations`
`/internal/ml/annotations/index`
`/internal/ml/annotations/delete/{annotationId}`
`/internal/ml/anomaly_detectors`
`/internal/ml/anomaly_detectors/{jobId}`
`/internal/ml/anomaly_detectors/_stats`
`/internal/ml/anomaly_detectors/{jobId}/_stats`
`/internal/ml/anomaly_detectors/{jobId}`
`/internal/ml/anomaly_detectors/{jobId}/_update`
`/internal/ml/anomaly_detectors/{jobId}/_open`
`/internal/ml/anomaly_detectors/{jobId}/_close`
`/internal/ml/anomaly_detectors/{jobId}/_reset`
`/internal/ml/anomaly_detectors/{jobId}`
`/internal/ml/anomaly_detectors/_validate/detector`
`/internal/ml/anomaly_detectors/{jobId}/_forecast`
`/internal/ml/anomaly_detectors/{jobId}/results/records`
`/internal/ml/anomaly_detectors/{jobId}/results/buckets/{timestamp?}`
`/internal/ml/anomaly_detectors/{jobId}/results/overall_buckets`
`/internal/ml/anomaly_detectors/{jobId}/results/categories/{categoryId}`
`/internal/ml/anomaly_detectors/{jobId}/model_snapshots`
`/internal/ml/anomaly_detectors/{jobId}/model_snapshots/{snapshotId}`

`/internal/ml/anomaly_detectors/{jobId}/model_snapshots/{snapshotId}/_update`
`/internal/ml/anomaly_detectors/{jobId}/model_snapshots/{snapshotId}`
`/internal/ml/calendars`
`/internal/ml/calendars/{calendarIds}`
`/internal/ml/calendars`
`/internal/ml/calendars/{calendarId}`
`/internal/ml/calendars/{calendarId}`
`/internal/ml/data_frame/analytics`
`/internal/ml/data_frame/analytics/{analyticsId}`
`/internal/ml/data_frame/analytics/_stats`
`/internal/ml/data_frame/analytics/{analyticsId}/_stats`
`/internal/ml/data_frame/analytics/{analyticsId}`
`/internal/ml/data_frame/_evaluate`
`/internal/ml/data_frame/analytics/_explain`
`/internal/ml/data_frame/analytics/{analyticsId}`
`/internal/ml/data_frame/analytics/{analyticsId}/_start`
`/internal/ml/data_frame/analytics/{analyticsId}/_stop`
`/internal/ml/data_frame/analytics/{analyticsId}/_update`
`/internal/ml/data_frame/analytics/{analyticsId}/messages`
`/internal/ml/data_frame/analytics/jobs_exist`
`/internal/ml/data_frame/analytics/map/{analyticsId}`
`/internal/ml/data_frame/analytics/new_job_caps/{indexPattern}`
`/internal/ml/data_frame/analytics/validate`
`/internal/ml/data_visualizer/get_field_histograms/{indexPattern}`
`/internal/ml/datafeeds`
`/internal/ml/datafeeds/{datafeedId}`
`/internal/ml/datafeeds/_stats`
`/internal/ml/datafeeds/{datafeedId}/_stats`
`/internal/ml/datafeeds/{datafeedId}`
`/internal/ml/datafeeds/{datafeedId}/_update`
`/internal/ml/datafeeds/{datafeedId}`
`/internal/ml/datafeeds/{datafeedId}/_start`
`/internal/ml/datafeeds/{datafeedId}/_stop`
`/internal/ml/datafeeds/{datafeedId}/_preview`
`/internal/ml/fields_service/field_cardinality`
`/internal/ml/fields_service/time_field_range`
`/internal/ml/filters`
`/internal/ml/filters/{filterId}`
`/internal/ml/filters`
`/internal/ml/filters/{filterId}`
`/internal/ml/filters/{filterId}`
`/internal/ml/filters/_stats`
`/internal/ml/indices/field_caps`
`/internal/ml/job_audit_messages/messages/{jobId}`
`/internal/ml/job_audit_messages/messages`
`/internal/ml/job_audit_messages/clear_messages`
`/internal/ml/jobs/force_start_datafeeds`
`/internal/ml/jobs/stop_datafeeds`
`/internal/ml/jobs/delete_jobs`
`/internal/ml/jobs/close_jobs`
`/internal/ml/jobs/reset_jobs`
`/internal/ml/jobs/force_stop_and_close_job`
`/internal/ml/jobs/jobs_summary`
`/internal/ml/jobs/jobs_with_geo`
`/internal/ml/jobs/jobs_with_time_range`
`/internal/ml/jobs/job_for_cloning`
`/internal/ml/jobs/jobs`
`/internal/ml/jobs/groups`
`/internal/ml/jobs/update_groups`
`/internal/ml/jobs/blocking_jobs_tasks`
`/internal/ml/jobs/jobs_exist`
`/internal/ml/jobs/new_job_caps/{indexPattern}`
`/internal/ml/jobs/new_job_line_chart`
`/internal/ml/jobs/new_job_population_chart`
`/internal/ml/jobs/all_jobs_and_group_ids`
`/internal/ml/jobs/look_back_progress`
`/internal/ml/jobs/categorization_field_examples`
`/internal/ml/jobs/top_categories`
`/internal/ml/jobs/datafeed_preview`
`/internal/ml/jobs/revert_model_snapshot`
`/internal/ml/jobs/bulk_create`
`/internal/ml/validate/estimate_bucket_span`
`/internal/ml/validate/calculate_model_memory_limit`
`/internal/ml/validate/cardinality`
`/internal/ml/validate/job`
`/internal/ml/validate/datafeed_preview`
`/internal/ml/json_schema`
`/internal/ml/management/list/{listType}`
`/internal/ml/model_management/nodes_overview`
`/internal/ml/model_management/memory_usage`
`/internal/ml/modules/recognize/{indexPatternTitle}`
`/internal/ml/modules/get_module/{moduleId?}`
`/internal/ml/modules/setup/{moduleId}`
`/internal/ml/modules/jobs_exist/{moduleId}`
`/internal/ml/notifications`
`/internal/ml/notifications/count`
`/internal/ml/results/anomalies_table_data`
`/internal/ml/results/category_definition`
`/internal/ml/results/max_anomaly_score`
`/internal/ml/results/category_examples`
`/internal/ml/results/partition_fields_values`
`/internal/ml/results/anomaly_search`
`/internal/ml/results/{jobId}/categorizer_stats`
`/internal/ml/results/category_stopped_partitions`
`/internal/ml/results/datafeed_results_chart`
`/internal/ml/results/anomaly_charts`
`/internal/ml/results/anomaly_records`
`/internal/ml/saved_objects/status`
`/internal/ml/saved_objects/initialize`
`/internal/ml/saved_objects/sync_check`
`/internal/ml/saved_objects/update_jobs_spaces`
`/internal/ml/saved_objects/update_trained_models_spaces`
`/internal/ml/saved_objects/remove_item_from_current_space`
`/internal/ml/saved_objects/jobs_spaces`
`/internal/ml/saved_objects/trained_models_spaces`
`/internal/ml/saved_objects/can_delete_ml_space_aware_item/{jobType}`
`/internal/ml/_has_privileges`
`/internal/ml/ml_capabilities`
`/internal/ml/ml_node_count`
`/internal/ml/info`
`/internal/ml/es_search`
`/internal/ml/index_exists`
`/internal/ml/trained_models/{modelId?}`
`/internal/ml/trained_models/_stats`
`/internal/ml/trained_models/{modelId}/_stats`
`/internal/ml/trained_models/{modelId}/pipelines`
`/internal/ml/trained_models/{modelId}`
`/internal/ml/trained_models/{modelId}`
`/internal/ml/trained_models/{modelId}/deployment/_start`

`/internal/ml/trained_models/{modelId}/{deploymentId}/deployment/_update`
`/internal/ml/trained_models/{modelId}/{deploymentId}/deployment/_stop`
`/internal/ml/trained_models/pipeline_simulate`
`/internal/ml/trained_models/infer/{modelId}/{deploymentId}`
2023-05-23 21:21:22 +01:00
Dima Arnautov
a3fad62c34
[ML] AIOps: Change point detection fixes (#156481) 2023-05-03 18:31:03 +02:00
Walter Rafelsberger
74fb6b0928
[ML] AIOps: Fix use full data button when time range returns null. (#152889)
In certain cases the endpoint to get the full date range may return `{
start: null, end: null }`, for example when querying against a
frozen-only index but with the option enabled to exclude the frozen
tier. In AIOps we added a callback to push that information to the URL's
global state but that would corrupt then the global state with the page
crashing.

This PR fixes it with an update to `setFullTimeRange`. The function will
now only return the time range if it's fully populated. After that, the
`FullTimeRangeSelector` component will only call the callback if it
receives such a time range and will skip the callback if
`setFullTimeRange` returned `undefined`.

Jest unit tests for `setFullTimeRange` and `FullTimeRangeSelector` have
been updated/created to cover both cases with populated time ranges and
without.
2023-03-10 16:58:05 +01:00
Walter Rafelsberger
1b9b77fd12
[ML] Fix regression to skip considering future data on use full data button in ML plugin. (#152435)
Fixes a regression where the "Use full data" button in the ML plugin
would no longer avoid considering future data.
2023-03-02 11:47:24 +01:00
Walter Rafelsberger
07d1adfb14
[ML] Date Picker: Fix to not trigger use full data button when changing frozen setting. (#151673)
Previously, when changing the frozen tier settings in the popover menu
of the date picker, this would also trigger an action like you were
clicking on the "Use full data" button at the same time. This PR fixes
the behavior and only updates the frozen tier settings, to update the
time range you now have to click "Use full data" separately.
2023-02-21 16:59:23 +01:00
Spencer
1b85815402
[packages] migrate all plugins to packages (#148130)
Fixes https://github.com/elastic/kibana/issues/149344

This PR migrates all plugins to packages automatically. It does this
using `node scripts/lint_packages` to automatically migrate
`kibana.json` files to `kibana.jsonc` files. By doing this automatically
we can simplify many build and testing procedures to only support
packages, and not both "packages" and "synthetic packages" (basically
pointers to plugins).

The majority of changes are in operations related code, so we'll be
having operations review this before marking it ready for review. The
vast majority of the code owners are simply pinged because we deleted
all `kibana.json` files and replaced them with `kibana.jsonc` files, so
we plan on leaving the PR ready-for-review for about 24 hours before
merging (after feature freeze), assuming we don't have any blockers
(especially from @elastic/kibana-core since there are a few core
specific changes, though the majority were handled in #149370).

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-02-08 21:06:50 -06:00
Dima Arnautov
c8b75b3b72
[ML] Adds change point detection feature (#150308)
## Summary

Part of #145703, adding enhancements to the new Change Point Detection
page for technical preview under the AIOps Labs section in the ML
plugin.

<img width="1406" alt="image"
src="https://user-images.githubusercontent.com/5236598/217035513-86325cd9-17a9-46ed-8aea-77585038a427.png">

- Use the data bounds mode for the Y-axis 
- Add a cardinality check for the split field with a hard limit of
10,000
-  Show series labels above charts 
- Replace fields `select` controls with the `EuiComboBox`
- Add a filter for change point type 
- Display aggregation interval 
- Add a docs link to the Change Point Aggregation 
- Make split field optional 

### Checklist


- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [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] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [x] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [x] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)
2023-02-07 12:51:02 -07:00
Walter Rafelsberger
2a57862668
[ML] Fix responsive behaviour of page header with date picker (#149073)
Improve responsive behaviour of page header with date picker.
- Removes custom breakpoint based code to determine date picker width
and instead use it's native `width` option.
- Adds a `flexGroup` boolean toggle to be able to get back the flex
items only without the flex group if you want to embed the date picker
in an already existing flex group to avoid additional nesting.
- Sets the `fill` option of the refresh button to `false` to avoid the
dark blue "primary".
- In the `aiops` plugin and the `ml_page.tsx` component, migrates away
from EUI's deprecated components for the page layout.
- Adds a `min-width` to page titles to avoid narrow wrapping (e.g.
wrapping after each character on narrow screens).
2023-01-23 13:55:29 +01:00
Walter Rafelsberger
ae5594849c
[ML] Move DatePickerWrapper and related code to package (#148063)
- Moves duplicates of `DatePickerWrapper` and related code to package
`@kbn/ml-date-picker`. The duplicated components across the code base
have been consolidated and diverging features combined. Each duplicate
has been checked with a diff against the package before deletion.
- Moves duplicates of `query_utils.ts` to a package
`@kbn/ml-query_utils`.
- Some jest test were migrated from enzyme to react-testing-lib.
- `i18n` strings and data-test-subjects have been updated to be prefixes
in line with package names.
- Replaces custom code related to the `compact` flag with EUI's
breakpoints.
2023-01-12 11:04:49 +01:00