Commit graph

437 commits

Author SHA1 Message Date
Kibana Machine
7e0ea54b45
[8.16] [ML] Trained Models: Fixes spaces sync to retrieve 10000 models (#202712) (#202742)
# Backport

This will backport the following commits from `main` to `8.16`:
- [[ML] Trained Models: Fixes spaces sync to retrieve 10000 models
(#202712)](https://github.com/elastic/kibana/pull/202712)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Dima
Arnautov","email":"dmitrii.arnautov@elastic.co"},"sourceCommit":{"committedDate":"2024-12-03T14:29:28Z","message":"[ML]
Trained Models: Fixes spaces sync to retrieve 10000 models
(#202712)\n\n## Summary\r\n\r\nThe default page size for the
/trained_models API is 100. As a result,\r\nthe spaces sync task only
fetched the first 100 models, leaving the rest\r\nunassigned to spaces
and therefore invisible in the ML UI.\r\n\r\nThis PR increases the page
size to 10,000 to ensure all models are\r\nproperly assigned to Kibana
spaces.\r\n\r\n### Checklist\r\n\r\n- [ ] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"ded18eeaac82787ea57d4991bad28b983d43ad0c","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix",":ml","v9.0.0","Feature:3rd
Party
Models","Team:ML","backport:version","v8.17.0","v8.18.0","v8.16.2"],"title":"[ML]
Trained Models: Fixes spaces sync to retrieve 10000
models","number":202712,"url":"https://github.com/elastic/kibana/pull/202712","mergeCommit":{"message":"[ML]
Trained Models: Fixes spaces sync to retrieve 10000 models
(#202712)\n\n## Summary\r\n\r\nThe default page size for the
/trained_models API is 100. As a result,\r\nthe spaces sync task only
fetched the first 100 models, leaving the rest\r\nunassigned to spaces
and therefore invisible in the ML UI.\r\n\r\nThis PR increases the page
size to 10,000 to ensure all models are\r\nproperly assigned to Kibana
spaces.\r\n\r\n### Checklist\r\n\r\n- [ ] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"ded18eeaac82787ea57d4991bad28b983d43ad0c"}},"sourceBranch":"main","suggestedTargetBranches":["8.17","8.x","8.16"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/202712","number":202712,"mergeCommit":{"message":"[ML]
Trained Models: Fixes spaces sync to retrieve 10000 models
(#202712)\n\n## Summary\r\n\r\nThe default page size for the
/trained_models API is 100. As a result,\r\nthe spaces sync task only
fetched the first 100 models, leaving the rest\r\nunassigned to spaces
and therefore invisible in the ML UI.\r\n\r\nThis PR increases the page
size to 10,000 to ensure all models are\r\nproperly assigned to Kibana
spaces.\r\n\r\n### Checklist\r\n\r\n- [ ] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"ded18eeaac82787ea57d4991bad28b983d43ad0c"}},{"branch":"8.17","label":"v8.17.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.x","label":"v8.18.0","branchLabelMappingKey":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.16","label":"v8.16.2","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Dima Arnautov <dmitrii.arnautov@elastic.co>
2024-12-03 10:26:06 -06:00
Kibana Machine
2e1ed36c0a
[8.16] [ML] Trained Models: Show deployment stats for unallocated deployments (#202005) (#202166)
# Backport

This will backport the following commits from `main` to `8.16`:
- [[ML] Trained Models: Show deployment stats for unallocated
deployments (#202005)](https://github.com/elastic/kibana/pull/202005)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Dima
Arnautov","email":"dmitrii.arnautov@elastic.co"},"sourceCommit":{"committedDate":"2024-11-28T13:22:31Z","message":"[ML]
Trained Models: Show deployment stats for unallocated deployments
(#202005)\n\n## Summary\r\n\r\nFixes #201930 \r\n\r\nShow deployment on
the Deployent stats table even if it hasn't been\r\nallocated to any
node yet.\r\n\r\n\r\n<img width=\"875\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/858041fd-16d4-44f3-8d13-1ad45550452e\">","sha":"c06adbc8ec55cb211aba6a154f8d740b25c2b9c0","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix",":ml","v9.0.0","Feature:3rd
Party
Models","Team:ML","ci:cloud-deploy","backport:version","v8.17.0","v8.18.0","v8.16.2"],"title":"[ML]
Trained Models: Show deployment stats for unallocated deployments
","number":202005,"url":"https://github.com/elastic/kibana/pull/202005","mergeCommit":{"message":"[ML]
Trained Models: Show deployment stats for unallocated deployments
(#202005)\n\n## Summary\r\n\r\nFixes #201930 \r\n\r\nShow deployment on
the Deployent stats table even if it hasn't been\r\nallocated to any
node yet.\r\n\r\n\r\n<img width=\"875\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/858041fd-16d4-44f3-8d13-1ad45550452e\">","sha":"c06adbc8ec55cb211aba6a154f8d740b25c2b9c0"}},"sourceBranch":"main","suggestedTargetBranches":["8.17","8.x","8.16"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/202005","number":202005,"mergeCommit":{"message":"[ML]
Trained Models: Show deployment stats for unallocated deployments
(#202005)\n\n## Summary\r\n\r\nFixes #201930 \r\n\r\nShow deployment on
the Deployent stats table even if it hasn't been\r\nallocated to any
node yet.\r\n\r\n\r\n<img width=\"875\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/858041fd-16d4-44f3-8d13-1ad45550452e\">","sha":"c06adbc8ec55cb211aba6a154f8d740b25c2b9c0"}},{"branch":"8.17","label":"v8.17.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.x","label":"v8.18.0","branchLabelMappingKey":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.16","label":"v8.16.2","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Dima Arnautov <dmitrii.arnautov@elastic.co>
2024-11-28 09:18:14 -06:00
Kibana Machine
107ff84cbf
[8.x] [ML] Update vCPUs ranges for start model deployment (#195617) (#196156)
# Backport

This will backport the following commits from `main` to `8.x`:
- [[ML] Update vCPUs ranges for start model deployment
(#195617)](https://github.com/elastic/kibana/pull/195617)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Dima
Arnautov","email":"dmitrii.arnautov@elastic.co"},"sourceCommit":{"committedDate":"2024-10-14T14:38:26Z","message":"[ML]
Update vCPUs ranges for start model deployment (#195617)\n\n##
Summary\r\n\r\n#### Different vCPUs ranges and enabling support for
static allocations\r\nbased on the serverless project type\r\n\r\n- Each
serverless config yml,
e.g.\r\n[search.es.yml](84b3b79a15/config/serverless.es.yml (L61))\r\nnow
contains parameters required for start model
deployment:\r\n\r\n```yml\r\nxpack.ml.nlp:\r\n enabled: true\r\n
modelDeployment:\r\n allowStaticAllocations: true\r\n vCPURange:\r\n
low:\r\n min: 0\r\n max: 2\r\n static: 2\r\n medium:\r\n min: 1\r\n max:
32\r\n static: 32\r\n high:\r\n min: 1\r\n max: 512\r\n static:
512\r\n```\r\n\r\nNote: _There will be no static allocations option for
serverless O11y\r\nand serverless Security._\r\n\r\n#### The minimum
values of vCPUs\r\n\r\n- 0 for the Low usage level on both serverless
and ESS.\r\n- 1 for the Medium and High usage levels on both serverless
and ESS.\r\n \r\n#### The default vCPUs usage levels\r\n- Low in
serverless.\r\n- Medium in ESS and on-prem\r\n\r\n### Checklist\r\n\r\n-
[x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"13897083dc8c465a16ddb3856d4e4904b9629610","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:enhancement",":ml","v9.0.0","Feature:3rd
Party
Models","Team:ML","ci:project-deploy-elasticsearch","ci:project-deploy-observability","v8.16.0","backport:version"],"title":"[ML]
Update vCPUs ranges for start model deployment
","number":195617,"url":"https://github.com/elastic/kibana/pull/195617","mergeCommit":{"message":"[ML]
Update vCPUs ranges for start model deployment (#195617)\n\n##
Summary\r\n\r\n#### Different vCPUs ranges and enabling support for
static allocations\r\nbased on the serverless project type\r\n\r\n- Each
serverless config yml,
e.g.\r\n[search.es.yml](84b3b79a15/config/serverless.es.yml (L61))\r\nnow
contains parameters required for start model
deployment:\r\n\r\n```yml\r\nxpack.ml.nlp:\r\n enabled: true\r\n
modelDeployment:\r\n allowStaticAllocations: true\r\n vCPURange:\r\n
low:\r\n min: 0\r\n max: 2\r\n static: 2\r\n medium:\r\n min: 1\r\n max:
32\r\n static: 32\r\n high:\r\n min: 1\r\n max: 512\r\n static:
512\r\n```\r\n\r\nNote: _There will be no static allocations option for
serverless O11y\r\nand serverless Security._\r\n\r\n#### The minimum
values of vCPUs\r\n\r\n- 0 for the Low usage level on both serverless
and ESS.\r\n- 1 for the Medium and High usage levels on both serverless
and ESS.\r\n \r\n#### The default vCPUs usage levels\r\n- Low in
serverless.\r\n- Medium in ESS and on-prem\r\n\r\n### Checklist\r\n\r\n-
[x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"13897083dc8c465a16ddb3856d4e4904b9629610"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/195617","number":195617,"mergeCommit":{"message":"[ML]
Update vCPUs ranges for start model deployment (#195617)\n\n##
Summary\r\n\r\n#### Different vCPUs ranges and enabling support for
static allocations\r\nbased on the serverless project type\r\n\r\n- Each
serverless config yml,
e.g.\r\n[search.es.yml](84b3b79a15/config/serverless.es.yml (L61))\r\nnow
contains parameters required for start model
deployment:\r\n\r\n```yml\r\nxpack.ml.nlp:\r\n enabled: true\r\n
modelDeployment:\r\n allowStaticAllocations: true\r\n vCPURange:\r\n
low:\r\n min: 0\r\n max: 2\r\n static: 2\r\n medium:\r\n min: 1\r\n max:
32\r\n static: 32\r\n high:\r\n min: 1\r\n max: 512\r\n static:
512\r\n```\r\n\r\nNote: _There will be no static allocations option for
serverless O11y\r\nand serverless Security._\r\n\r\n#### The minimum
values of vCPUs\r\n\r\n- 0 for the Low usage level on both serverless
and ESS.\r\n- 1 for the Medium and High usage levels on both serverless
and ESS.\r\n \r\n#### The default vCPUs usage levels\r\n- Low in
serverless.\r\n- Medium in ESS and on-prem\r\n\r\n### Checklist\r\n\r\n-
[x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"13897083dc8c465a16ddb3856d4e4904b9629610"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Dima Arnautov <dmitrii.arnautov@elastic.co>
2024-10-14 11:27:52 -05:00
Kibana Machine
6eb8471c31
[8.x] [ML] Anomaly Detection: adds ability to delete forecasts from job (#194896) (#195547)
# Backport

This will backport the following commits from `main` to `8.x`:
- [[ML] Anomaly Detection: adds ability to delete forecasts from job
(#194896)](https://github.com/elastic/kibana/pull/194896)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Melissa
Alvarez","email":"melissa.alvarez@elastic.co"},"sourceCommit":{"committedDate":"2024-10-09T08:40:45Z","message":"[ML]
Anomaly Detection: adds ability to delete forecasts from job
(#194896)\n\n## Summary\r\n\r\nRelated issues:\r\n-
https://github.com/elastic/kibana/issues/18511\r\n-
https://github.com/elastic/kibana/issues/192301\r\n\r\nIn this PR, in
Job management > expanded row > Forecasts tab - a delete\r\naction has
been added to each row in the forecasts table. A confirmation\r\nmodal
allows the user to confirm the delete action.\r\n\r\nIn the SMV view,
the forecast being currently viewed is now highlighted\r\nin the
Forecast modal to make it easier to
identify.\r\n\r\n\r\n![image](https://github.com/user-attachments/assets/87814889-d41d-4780-98ab-695c6f12a023)\r\n\r\n<img
width=\"881\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/accbd7d9-1bae-4f1f-af8f-8bd36eae0572\">\r\n\r\n<img
width=\"1099\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/6011936d-3773-41ce-bbce-3ca4c0154cab\">\r\n\r\nDark
mode:\r\n\r\n<img width=\"882\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/cbec6fc8-0c62-4e34-9546-0124ae80a568\">\r\n\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [ ] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [ ] [Unit
or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n- [ ] Any UI touched in this PR is
usable by keyboard only (learn more\r\nabout [keyboard
accessibility](https://webaim.org/techniques/keyboard/))\r\n- [ ] Any UI
touched in this PR does not create any new axe failures\r\n(run axe in
browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n-
[ ] If a plugin configuration key changed, check if it needs to
be\r\nallowlisted in the cloud and added to the
[docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n-
[ ] This renders correctly on smaller devices using a
responsive\r\nlayout. (You can test this [in
your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n-
[ ] This was checked for
[cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n---------\r\n\r\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"f4a4a681f58c1c64eb8a05070b44f0605c625458","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:enhancement",":ml","Feature:Anomaly
Detection","v9.0.0","v8.16.0","backport:version"],"title":"[ML] Anomaly
Detection: adds ability to delete forecasts from
job","number":194896,"url":"https://github.com/elastic/kibana/pull/194896","mergeCommit":{"message":"[ML]
Anomaly Detection: adds ability to delete forecasts from job
(#194896)\n\n## Summary\r\n\r\nRelated issues:\r\n-
https://github.com/elastic/kibana/issues/18511\r\n-
https://github.com/elastic/kibana/issues/192301\r\n\r\nIn this PR, in
Job management > expanded row > Forecasts tab - a delete\r\naction has
been added to each row in the forecasts table. A confirmation\r\nmodal
allows the user to confirm the delete action.\r\n\r\nIn the SMV view,
the forecast being currently viewed is now highlighted\r\nin the
Forecast modal to make it easier to
identify.\r\n\r\n\r\n![image](https://github.com/user-attachments/assets/87814889-d41d-4780-98ab-695c6f12a023)\r\n\r\n<img
width=\"881\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/accbd7d9-1bae-4f1f-af8f-8bd36eae0572\">\r\n\r\n<img
width=\"1099\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/6011936d-3773-41ce-bbce-3ca4c0154cab\">\r\n\r\nDark
mode:\r\n\r\n<img width=\"882\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/cbec6fc8-0c62-4e34-9546-0124ae80a568\">\r\n\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [ ] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [ ] [Unit
or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n- [ ] Any UI touched in this PR is
usable by keyboard only (learn more\r\nabout [keyboard
accessibility](https://webaim.org/techniques/keyboard/))\r\n- [ ] Any UI
touched in this PR does not create any new axe failures\r\n(run axe in
browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n-
[ ] If a plugin configuration key changed, check if it needs to
be\r\nallowlisted in the cloud and added to the
[docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n-
[ ] This renders correctly on smaller devices using a
responsive\r\nlayout. (You can test this [in
your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n-
[ ] This was checked for
[cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n---------\r\n\r\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"f4a4a681f58c1c64eb8a05070b44f0605c625458"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/194896","number":194896,"mergeCommit":{"message":"[ML]
Anomaly Detection: adds ability to delete forecasts from job
(#194896)\n\n## Summary\r\n\r\nRelated issues:\r\n-
https://github.com/elastic/kibana/issues/18511\r\n-
https://github.com/elastic/kibana/issues/192301\r\n\r\nIn this PR, in
Job management > expanded row > Forecasts tab - a delete\r\naction has
been added to each row in the forecasts table. A confirmation\r\nmodal
allows the user to confirm the delete action.\r\n\r\nIn the SMV view,
the forecast being currently viewed is now highlighted\r\nin the
Forecast modal to make it easier to
identify.\r\n\r\n\r\n![image](https://github.com/user-attachments/assets/87814889-d41d-4780-98ab-695c6f12a023)\r\n\r\n<img
width=\"881\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/accbd7d9-1bae-4f1f-af8f-8bd36eae0572\">\r\n\r\n<img
width=\"1099\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/6011936d-3773-41ce-bbce-3ca4c0154cab\">\r\n\r\nDark
mode:\r\n\r\n<img width=\"882\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/cbec6fc8-0c62-4e34-9546-0124ae80a568\">\r\n\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [ ] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [ ] [Unit
or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n- [ ] Any UI touched in this PR is
usable by keyboard only (learn more\r\nabout [keyboard
accessibility](https://webaim.org/techniques/keyboard/))\r\n- [ ] Any UI
touched in this PR does not create any new axe failures\r\n(run axe in
browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n-
[ ] If a plugin configuration key changed, check if it needs to
be\r\nallowlisted in the cloud and added to the
[docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n-
[ ] This renders correctly on smaller devices using a
responsive\r\nlayout. (You can test this [in
your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n-
[ ] This was checked for
[cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n---------\r\n\r\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"f4a4a681f58c1c64eb8a05070b44f0605c625458"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Melissa Alvarez <melissa.alvarez@elastic.co>
2024-10-09 12:27:15 +02:00
Kibana Machine
8811474e3c
[8.x] [ML] Daylight saving time calendar events (#193605) (#195262)
# Backport

This will backport the following commits from `main` to `8.x`:
- [[ML] Daylight saving time calendar events
(#193605)](https://github.com/elastic/kibana/pull/193605)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"James
Gowdy","email":"jgowdy@elastic.co"},"sourceCommit":{"committedDate":"2024-10-07T13:35:25Z","message":"[ML]
Daylight saving time calendar events (#193605)\n\nAdds new pages for
creating and managing DST calendars.\r\nCloses
https://github.com/elastic/kibana/issues/189469\r\n\r\nNew section added
to Settings home
page.\r\n\r\n![image](https://github.com/user-attachments/assets/9165906f-e571-46be-a5ac-bf7dc9cd2801)\r\n\r\nNew
page for listing DST calendars. The original calendar page does
not\r\nshow DST
calendars.\r\n\r\n![image](https://github.com/user-attachments/assets/32a64a31-b4e5-4516-85fd-19e63aa9d5c4)\r\n\r\nNew
page for creating DST calendars.\r\nThe ability to apply to all jobs and
add a description has been removed.\r\nIt is not possible manually add
events. Events are automatically\r\ngenerated for a selected time
zone.\r\n<img width=\"1170\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/557b8d39-6c17-448a-aa30-a282d8a424a7\">\r\n\r\nIf
the selected time zone does not observe daylight savings, an
info\r\ncallout is displayed\r\n<img width=\"1178\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/627043bf-0368-4ab3-8ca7-1931f9622387\">\r\n\r\n\r\nA
new DST calendar section is added to all AD job
wizards.\r\n\r\n![image](https://github.com/user-attachments/assets/6359192b-faac-4ffb-ad3e-b8193f40f02f)","sha":"2881b0423d099649243ee01887f27a1fb6dbffe7","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":[":ml","Feature:Anomaly
Detection","v9.0.0","release_note:feature","v8.16.0","backport:version"],"title":"[ML]
Daylight saving time calendar
events","number":193605,"url":"https://github.com/elastic/kibana/pull/193605","mergeCommit":{"message":"[ML]
Daylight saving time calendar events (#193605)\n\nAdds new pages for
creating and managing DST calendars.\r\nCloses
https://github.com/elastic/kibana/issues/189469\r\n\r\nNew section added
to Settings home
page.\r\n\r\n![image](https://github.com/user-attachments/assets/9165906f-e571-46be-a5ac-bf7dc9cd2801)\r\n\r\nNew
page for listing DST calendars. The original calendar page does
not\r\nshow DST
calendars.\r\n\r\n![image](https://github.com/user-attachments/assets/32a64a31-b4e5-4516-85fd-19e63aa9d5c4)\r\n\r\nNew
page for creating DST calendars.\r\nThe ability to apply to all jobs and
add a description has been removed.\r\nIt is not possible manually add
events. Events are automatically\r\ngenerated for a selected time
zone.\r\n<img width=\"1170\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/557b8d39-6c17-448a-aa30-a282d8a424a7\">\r\n\r\nIf
the selected time zone does not observe daylight savings, an
info\r\ncallout is displayed\r\n<img width=\"1178\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/627043bf-0368-4ab3-8ca7-1931f9622387\">\r\n\r\n\r\nA
new DST calendar section is added to all AD job
wizards.\r\n\r\n![image](https://github.com/user-attachments/assets/6359192b-faac-4ffb-ad3e-b8193f40f02f)","sha":"2881b0423d099649243ee01887f27a1fb6dbffe7"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/193605","number":193605,"mergeCommit":{"message":"[ML]
Daylight saving time calendar events (#193605)\n\nAdds new pages for
creating and managing DST calendars.\r\nCloses
https://github.com/elastic/kibana/issues/189469\r\n\r\nNew section added
to Settings home
page.\r\n\r\n![image](https://github.com/user-attachments/assets/9165906f-e571-46be-a5ac-bf7dc9cd2801)\r\n\r\nNew
page for listing DST calendars. The original calendar page does
not\r\nshow DST
calendars.\r\n\r\n![image](https://github.com/user-attachments/assets/32a64a31-b4e5-4516-85fd-19e63aa9d5c4)\r\n\r\nNew
page for creating DST calendars.\r\nThe ability to apply to all jobs and
add a description has been removed.\r\nIt is not possible manually add
events. Events are automatically\r\ngenerated for a selected time
zone.\r\n<img width=\"1170\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/557b8d39-6c17-448a-aa30-a282d8a424a7\">\r\n\r\nIf
the selected time zone does not observe daylight savings, an
info\r\ncallout is displayed\r\n<img width=\"1178\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/627043bf-0368-4ab3-8ca7-1931f9622387\">\r\n\r\n\r\nA
new DST calendar section is added to all AD job
wizards.\r\n\r\n![image](https://github.com/user-attachments/assets/6359192b-faac-4ffb-ad3e-b8193f40f02f)","sha":"2881b0423d099649243ee01887f27a1fb6dbffe7"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: James Gowdy <jgowdy@elastic.co>
2024-10-07 10:39:56 -05:00
Kibana Machine
366679cebf
[8.x] [ML] Single Metric Viewer: Enable cross-filtering for &#x27;by&#x27;, &#x27;over&#x27; and &#x27;partition&#x27; field values (#193255) (#194280)
# Backport

This will backport the following commits from `main` to `8.x`:
- [[ML] Single Metric Viewer: Enable cross-filtering for &#x27;by&#x27;,
&#x27;over&#x27; and &#x27;partition&#x27; field values
(#193255)](https://github.com/elastic/kibana/pull/193255)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Robert
Jaszczurek","email":"92210485+rbrtj@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-09-27T10:30:53Z","message":"[ML]
Single Metric Viewer: Enable cross-filtering for 'by', 'over' and
'partition' field values (#193255)\n\n## Summary\r\n\r\nEnables
cross-filtering for 'by', 'over' and 'partition' field values in\r\nthe
Single Metric Viewer.\r\n\r\nFixes
[#171932](d86d0688-dc69-43f0-aa24-130ff38935e6","sha":"07290bfac955c7d62ba93b52d888499dd6006cf3","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:enhancement",":ml","Feature:Anomaly
Detection","v9.0.0","Team:ML","backport:prev-minor","v8.16.0"],"title":"[ML]
Single Metric Viewer: Enable cross-filtering for 'by', 'over' and
'partition' field
values","number":193255,"url":"https://github.com/elastic/kibana/pull/193255","mergeCommit":{"message":"[ML]
Single Metric Viewer: Enable cross-filtering for 'by', 'over' and
'partition' field values (#193255)\n\n## Summary\r\n\r\nEnables
cross-filtering for 'by', 'over' and 'partition' field values in\r\nthe
Single Metric Viewer.\r\n\r\nFixes
[#171932](d86d0688-dc69-43f0-aa24-130ff38935e6","sha":"07290bfac955c7d62ba93b52d888499dd6006cf3"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/193255","number":193255,"mergeCommit":{"message":"[ML]
Single Metric Viewer: Enable cross-filtering for 'by', 'over' and
'partition' field values (#193255)\n\n## Summary\r\n\r\nEnables
cross-filtering for 'by', 'over' and 'partition' field values in\r\nthe
Single Metric Viewer.\r\n\r\nFixes
[#171932](d86d0688-dc69-43f0-aa24-130ff38935e6","sha":"07290bfac955c7d62ba93b52d888499dd6006cf3"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Robert Jaszczurek <92210485+rbrtj@users.noreply.github.com>
2024-09-27 07:08:26 -05:00
Kibana Machine
e72fd8f18a
[8.x] [ML] Redesign start/update model deployment dialog (#190243) (#194143)
# Backport

This will backport the following commits from `main` to `8.x`:
- [[ML] Redesign start/update model deployment dialog
(#190243)](https://github.com/elastic/kibana/pull/190243)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Dima
Arnautov","email":"dmitrii.arnautov@elastic.co"},"sourceCommit":{"committedDate":"2024-09-26T13:26:31Z","message":"[ML]
Redesign start/update model deployment dialog (#190243)\n\n##
Summary\r\n\r\n#### Notes for
reviewers\r\n\r\nhttps://github.com/elastic/elasticsearch/pull/113455 PR
has to be merged\r\nfirst to support `min_number_of_allocation: 0`. At
the moment it's not\r\npossible to start a `Low` vCPUs usage deployment
from the UI.\r\n\r\nResolves #189975\r\n\r\n- Updates the Start/Update
model deployment dialogue, replacing\r\nallocation and threading params
with use cases and advanced settings\r\nwith vCPUs/VCUs
controls.\r\n\r\nThe vCPUs (or VCUs for serverless env) are derived from
the number of\r\nallocations times threads per
allocation.\r\n\r\n_Optimised for ingest_ sets 1 thread per
allocation.\r\n_Optimised for search_ for low vCPUs level sets 2 threads
per\r\nallocation, and the maximum available number of threads for
medium and\r\nhigh. This value is limited to the
`max_single_ml_node_processors`.\r\n\r\nvCPUs control acts differently
depending on \"Adaptive resources\". \r\n\r\n- When On, it enables
`adaptive_allocations` and sets the range\r\n`min_number_of_allocations`
and `max_number_of_allocations` based on the\r\nuse-case (threads per
allocation) and cluster configuration.\r\n- For cloud deployments with
enabled ML autoscaling, vCPUs ranges are 1\r\n-2 for, 2-32, 33-max\r\n-
For on-prem deployments and cloud deployments with
disabled\r\nautoscaling, vCPUs ranges are based on the hardware
limitations. E.g.\r\nwith `total_ml_processors` = 32, and
`max_single_ml_node_processors` =\r\n16 ranges are 1-2, 3-16,
17-32.\r\n- When Off, it sets a static `number_of_allocations`. The
number of\r\nallocations is an upper bound of the ranges mentioned
above.\r\n\r\nFor serverless deployments adaptive resources are enabled
at all times,\r\nand control is hidden.\r\n\r\n<img width=\"795\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/20b2528f-b631-49f9-82f8-fef6175873fd\">\r\n\r\n-
Start deployment modal checks if there is a deployment optimized for
a\r\ncertain use case, and sets another use case by default. E.g. If
an\r\noptimized deployment for a certain use case (e.g., ingestion) is
found,\r\nthe modal will set a different use case (e.g., search) as the
default\r\nupon opening.\r\n\r\n- For the cloud deployments, also
display a message about vCPU values in\r\nthe Cloud Console and a link
to edit the deployment:\r\n<img width=\"791\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/2f98ebca-579e-43c1-ab78-e0dd38ce4786\">\r\n\r\n-
For Serverless, the \"Adaptive Resources\" control is hidden,
as\r\nadaptive allocations are enabled at all times.\r\n<img
width=\"659\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/8133ebf9-6b2b-4fea-95f1-7351cfcf85b6\">\r\n\r\n-
Update action was updated accordingly. As it is not possible to
update\r\nthreads per allocation, the optimize control is disabled.
Advanced\r\nsettings are expanded by default and allows the user to
adjust vCPUs\r\nlevel and enable/disable adaptive resources.\r\n<img
width=\"785\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/13c3f0bc-4436-4528-8641-d33eb5384ea2\">\r\n\r\n\r\n-
Indicate if adaptive allocations are enabled in the expanded row
\r\n<img width=\"1322\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/894916df-4c77-4e75-b175-229131b8ecc8\">\r\n\r\n\r\n\r\n###
Checklist\r\n\r\n\r\n- [x] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [x] [Unit
or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n- [x] Any UI touched in this PR is
usable by keyboard only (learn more\r\nabout [keyboard
accessibility](https://webaim.org/techniques/keyboard/))\r\n- [x] Any UI
touched in this PR does not create any new axe failures\r\n(run axe in
browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n-
[x] This renders correctly on smaller devices using a
responsive\r\nlayout. (You can test this [in
your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n-
[ ] This was checked for
[cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n---------\r\n\r\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>\r\nCo-authored-by: István
Zoltán Szabó
<istvan.szabo@elastic.co>","sha":"718444fec14ae2d22894cca1349a7e577443dd99","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:enhancement",":ml","v9.0.0","Feature:3rd
Party Models","Team:ML","v8.16.0","backport:version"],"title":"[ML]
Redesign start/update model deployment dialog
","number":190243,"url":"https://github.com/elastic/kibana/pull/190243","mergeCommit":{"message":"[ML]
Redesign start/update model deployment dialog (#190243)\n\n##
Summary\r\n\r\n#### Notes for
reviewers\r\n\r\nhttps://github.com/elastic/elasticsearch/pull/113455 PR
has to be merged\r\nfirst to support `min_number_of_allocation: 0`. At
the moment it's not\r\npossible to start a `Low` vCPUs usage deployment
from the UI.\r\n\r\nResolves #189975\r\n\r\n- Updates the Start/Update
model deployment dialogue, replacing\r\nallocation and threading params
with use cases and advanced settings\r\nwith vCPUs/VCUs
controls.\r\n\r\nThe vCPUs (or VCUs for serverless env) are derived from
the number of\r\nallocations times threads per
allocation.\r\n\r\n_Optimised for ingest_ sets 1 thread per
allocation.\r\n_Optimised for search_ for low vCPUs level sets 2 threads
per\r\nallocation, and the maximum available number of threads for
medium and\r\nhigh. This value is limited to the
`max_single_ml_node_processors`.\r\n\r\nvCPUs control acts differently
depending on \"Adaptive resources\". \r\n\r\n- When On, it enables
`adaptive_allocations` and sets the range\r\n`min_number_of_allocations`
and `max_number_of_allocations` based on the\r\nuse-case (threads per
allocation) and cluster configuration.\r\n- For cloud deployments with
enabled ML autoscaling, vCPUs ranges are 1\r\n-2 for, 2-32, 33-max\r\n-
For on-prem deployments and cloud deployments with
disabled\r\nautoscaling, vCPUs ranges are based on the hardware
limitations. E.g.\r\nwith `total_ml_processors` = 32, and
`max_single_ml_node_processors` =\r\n16 ranges are 1-2, 3-16,
17-32.\r\n- When Off, it sets a static `number_of_allocations`. The
number of\r\nallocations is an upper bound of the ranges mentioned
above.\r\n\r\nFor serverless deployments adaptive resources are enabled
at all times,\r\nand control is hidden.\r\n\r\n<img width=\"795\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/20b2528f-b631-49f9-82f8-fef6175873fd\">\r\n\r\n-
Start deployment modal checks if there is a deployment optimized for
a\r\ncertain use case, and sets another use case by default. E.g. If
an\r\noptimized deployment for a certain use case (e.g., ingestion) is
found,\r\nthe modal will set a different use case (e.g., search) as the
default\r\nupon opening.\r\n\r\n- For the cloud deployments, also
display a message about vCPU values in\r\nthe Cloud Console and a link
to edit the deployment:\r\n<img width=\"791\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/2f98ebca-579e-43c1-ab78-e0dd38ce4786\">\r\n\r\n-
For Serverless, the \"Adaptive Resources\" control is hidden,
as\r\nadaptive allocations are enabled at all times.\r\n<img
width=\"659\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/8133ebf9-6b2b-4fea-95f1-7351cfcf85b6\">\r\n\r\n-
Update action was updated accordingly. As it is not possible to
update\r\nthreads per allocation, the optimize control is disabled.
Advanced\r\nsettings are expanded by default and allows the user to
adjust vCPUs\r\nlevel and enable/disable adaptive resources.\r\n<img
width=\"785\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/13c3f0bc-4436-4528-8641-d33eb5384ea2\">\r\n\r\n\r\n-
Indicate if adaptive allocations are enabled in the expanded row
\r\n<img width=\"1322\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/894916df-4c77-4e75-b175-229131b8ecc8\">\r\n\r\n\r\n\r\n###
Checklist\r\n\r\n\r\n- [x] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [x] [Unit
or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n- [x] Any UI touched in this PR is
usable by keyboard only (learn more\r\nabout [keyboard
accessibility](https://webaim.org/techniques/keyboard/))\r\n- [x] Any UI
touched in this PR does not create any new axe failures\r\n(run axe in
browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n-
[x] This renders correctly on smaller devices using a
responsive\r\nlayout. (You can test this [in
your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n-
[ ] This was checked for
[cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n---------\r\n\r\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>\r\nCo-authored-by: István
Zoltán Szabó
<istvan.szabo@elastic.co>","sha":"718444fec14ae2d22894cca1349a7e577443dd99"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/190243","number":190243,"mergeCommit":{"message":"[ML]
Redesign start/update model deployment dialog (#190243)\n\n##
Summary\r\n\r\n#### Notes for
reviewers\r\n\r\nhttps://github.com/elastic/elasticsearch/pull/113455 PR
has to be merged\r\nfirst to support `min_number_of_allocation: 0`. At
the moment it's not\r\npossible to start a `Low` vCPUs usage deployment
from the UI.\r\n\r\nResolves #189975\r\n\r\n- Updates the Start/Update
model deployment dialogue, replacing\r\nallocation and threading params
with use cases and advanced settings\r\nwith vCPUs/VCUs
controls.\r\n\r\nThe vCPUs (or VCUs for serverless env) are derived from
the number of\r\nallocations times threads per
allocation.\r\n\r\n_Optimised for ingest_ sets 1 thread per
allocation.\r\n_Optimised for search_ for low vCPUs level sets 2 threads
per\r\nallocation, and the maximum available number of threads for
medium and\r\nhigh. This value is limited to the
`max_single_ml_node_processors`.\r\n\r\nvCPUs control acts differently
depending on \"Adaptive resources\". \r\n\r\n- When On, it enables
`adaptive_allocations` and sets the range\r\n`min_number_of_allocations`
and `max_number_of_allocations` based on the\r\nuse-case (threads per
allocation) and cluster configuration.\r\n- For cloud deployments with
enabled ML autoscaling, vCPUs ranges are 1\r\n-2 for, 2-32, 33-max\r\n-
For on-prem deployments and cloud deployments with
disabled\r\nautoscaling, vCPUs ranges are based on the hardware
limitations. E.g.\r\nwith `total_ml_processors` = 32, and
`max_single_ml_node_processors` =\r\n16 ranges are 1-2, 3-16,
17-32.\r\n- When Off, it sets a static `number_of_allocations`. The
number of\r\nallocations is an upper bound of the ranges mentioned
above.\r\n\r\nFor serverless deployments adaptive resources are enabled
at all times,\r\nand control is hidden.\r\n\r\n<img width=\"795\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/20b2528f-b631-49f9-82f8-fef6175873fd\">\r\n\r\n-
Start deployment modal checks if there is a deployment optimized for
a\r\ncertain use case, and sets another use case by default. E.g. If
an\r\noptimized deployment for a certain use case (e.g., ingestion) is
found,\r\nthe modal will set a different use case (e.g., search) as the
default\r\nupon opening.\r\n\r\n- For the cloud deployments, also
display a message about vCPU values in\r\nthe Cloud Console and a link
to edit the deployment:\r\n<img width=\"791\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/2f98ebca-579e-43c1-ab78-e0dd38ce4786\">\r\n\r\n-
For Serverless, the \"Adaptive Resources\" control is hidden,
as\r\nadaptive allocations are enabled at all times.\r\n<img
width=\"659\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/8133ebf9-6b2b-4fea-95f1-7351cfcf85b6\">\r\n\r\n-
Update action was updated accordingly. As it is not possible to
update\r\nthreads per allocation, the optimize control is disabled.
Advanced\r\nsettings are expanded by default and allows the user to
adjust vCPUs\r\nlevel and enable/disable adaptive resources.\r\n<img
width=\"785\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/13c3f0bc-4436-4528-8641-d33eb5384ea2\">\r\n\r\n\r\n-
Indicate if adaptive allocations are enabled in the expanded row
\r\n<img width=\"1322\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/894916df-4c77-4e75-b175-229131b8ecc8\">\r\n\r\n\r\n\r\n###
Checklist\r\n\r\n\r\n- [x] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [x] [Unit
or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n- [x] Any UI touched in this PR is
usable by keyboard only (learn more\r\nabout [keyboard
accessibility](https://webaim.org/techniques/keyboard/))\r\n- [x] Any UI
touched in this PR does not create any new axe failures\r\n(run axe in
browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n-
[x] This renders correctly on smaller devices using a
responsive\r\nlayout. (You can test this [in
your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n-
[ ] This was checked for
[cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n---------\r\n\r\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>\r\nCo-authored-by: István
Zoltán Szabó
<istvan.szabo@elastic.co>","sha":"718444fec14ae2d22894cca1349a7e577443dd99"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Dima Arnautov <dmitrii.arnautov@elastic.co>
2024-09-26 09:58:37 -05:00
Walter Rafelsberger
bc2bb0d77a
[8.x] [ML] Move FieldStatsFlyout, parseInterval, validators to packages. (#193657) (#193859)
# Backport

This will backport the following commits from `main` to `8.x`:
- [[ML] Move FieldStatsFlyout, parseInterval, validators to packages.
(#193657)](https://github.com/elastic/kibana/pull/193657)

<!--- Backport version: 8.9.8 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Walter
Rafelsberger","email":"walter.rafelsberger@elastic.co"},"sourceCommit":{"committedDate":"2024-09-24T12:00:55Z","message":"[ML]
Move FieldStatsFlyout, parseInterval, validators to packages.
(#193657)\n\n## Summary\r\n\r\nPart of #159917.\r\n\r\nMoves code from
`plugins/ml/common|public` to packages that is used by\r\ntransforms
too.\r\n\r\nWhile the transforms plugin is maintained by the ML team
too, the\r\ntransform plugin itself is independently available from the
ML UI in the\r\nKibana management section. We should try to avoid that
the transform\r\nplugin is directly depending on the `ml` plugin. This
PR moves some code\r\nfrom `plugins/ml/common|public` to packages so
that we can remove `ml`\r\nfrom the list of `requiredBundles` of the
`transform` plugin.\r\n\r\nThe packages were created with these
commands:\r\n\r\n```\r\nnode scripts/generate package
@kbn/ml-field-stats-flyout --dir
./x-pack/packages/ml/field_stats_flyout\r\nnode scripts/generate package
@kbn/ml-parse-interval --dir ./x-pack/packages/ml/parse_interval\r\nnode
scripts/generate package @kbn/ml-validators --dir
./x-pack/packages/ml/validators\r\n```\r\n\r\nThe following commands
were used to check missing jsdoc comments
and\r\nexports:\r\n\r\n```\r\nnode scripts/build_api_docs --plugin
@kbn/ml-field-stats-flyout --stats comments\r\nnode
scripts/build_api_docs --plugin @kbn/ml-field-stats-flyout --stats
exports\r\nnode scripts/build_api_docs --plugin @kbn/ml-parse-interval
--stats comments\r\nnode scripts/build_api_docs --plugin
@kbn/ml-parse-interval --stats exports\r\nnode scripts/build_api_docs
--plugin @kbn/ml-validators --stats comments\r\nnode
scripts/build_api_docs --plugin @kbn/ml-validators --stats
exports\r\n```\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n- [x] This was checked for breaking
API changes and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"b2d85d5f8f10f7c460c3a3b732844a19c8b20d7b","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":[":ml","release_note:skip","Feature:Transforms","v9.0.0","backport:prev-minor","v8.16.0"],"number":193657,"url":"https://github.com/elastic/kibana/pull/193657","mergeCommit":{"message":"[ML]
Move FieldStatsFlyout, parseInterval, validators to packages.
(#193657)\n\n## Summary\r\n\r\nPart of #159917.\r\n\r\nMoves code from
`plugins/ml/common|public` to packages that is used by\r\ntransforms
too.\r\n\r\nWhile the transforms plugin is maintained by the ML team
too, the\r\ntransform plugin itself is independently available from the
ML UI in the\r\nKibana management section. We should try to avoid that
the transform\r\nplugin is directly depending on the `ml` plugin. This
PR moves some code\r\nfrom `plugins/ml/common|public` to packages so
that we can remove `ml`\r\nfrom the list of `requiredBundles` of the
`transform` plugin.\r\n\r\nThe packages were created with these
commands:\r\n\r\n```\r\nnode scripts/generate package
@kbn/ml-field-stats-flyout --dir
./x-pack/packages/ml/field_stats_flyout\r\nnode scripts/generate package
@kbn/ml-parse-interval --dir ./x-pack/packages/ml/parse_interval\r\nnode
scripts/generate package @kbn/ml-validators --dir
./x-pack/packages/ml/validators\r\n```\r\n\r\nThe following commands
were used to check missing jsdoc comments
and\r\nexports:\r\n\r\n```\r\nnode scripts/build_api_docs --plugin
@kbn/ml-field-stats-flyout --stats comments\r\nnode
scripts/build_api_docs --plugin @kbn/ml-field-stats-flyout --stats
exports\r\nnode scripts/build_api_docs --plugin @kbn/ml-parse-interval
--stats comments\r\nnode scripts/build_api_docs --plugin
@kbn/ml-parse-interval --stats exports\r\nnode scripts/build_api_docs
--plugin @kbn/ml-validators --stats comments\r\nnode
scripts/build_api_docs --plugin @kbn/ml-validators --stats
exports\r\n```\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n- [x] This was checked for breaking
API changes and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"b2d85d5f8f10f7c460c3a3b732844a19c8b20d7b"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/193657","number":193657,"mergeCommit":{"message":"[ML]
Move FieldStatsFlyout, parseInterval, validators to packages.
(#193657)\n\n## Summary\r\n\r\nPart of #159917.\r\n\r\nMoves code from
`plugins/ml/common|public` to packages that is used by\r\ntransforms
too.\r\n\r\nWhile the transforms plugin is maintained by the ML team
too, the\r\ntransform plugin itself is independently available from the
ML UI in the\r\nKibana management section. We should try to avoid that
the transform\r\nplugin is directly depending on the `ml` plugin. This
PR moves some code\r\nfrom `plugins/ml/common|public` to packages so
that we can remove `ml`\r\nfrom the list of `requiredBundles` of the
`transform` plugin.\r\n\r\nThe packages were created with these
commands:\r\n\r\n```\r\nnode scripts/generate package
@kbn/ml-field-stats-flyout --dir
./x-pack/packages/ml/field_stats_flyout\r\nnode scripts/generate package
@kbn/ml-parse-interval --dir ./x-pack/packages/ml/parse_interval\r\nnode
scripts/generate package @kbn/ml-validators --dir
./x-pack/packages/ml/validators\r\n```\r\n\r\nThe following commands
were used to check missing jsdoc comments
and\r\nexports:\r\n\r\n```\r\nnode scripts/build_api_docs --plugin
@kbn/ml-field-stats-flyout --stats comments\r\nnode
scripts/build_api_docs --plugin @kbn/ml-field-stats-flyout --stats
exports\r\nnode scripts/build_api_docs --plugin @kbn/ml-parse-interval
--stats comments\r\nnode scripts/build_api_docs --plugin
@kbn/ml-parse-interval --stats exports\r\nnode scripts/build_api_docs
--plugin @kbn/ml-validators --stats comments\r\nnode
scripts/build_api_docs --plugin @kbn/ml-validators --stats
exports\r\n```\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n- [x] This was checked for breaking
API changes and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"b2d85d5f8f10f7c460c3a3b732844a19c8b20d7b"}},{"branch":"8.x","label":"v8.16.0","labelRegex":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
2024-09-24 08:44:26 -05:00
Kibana Machine
e0e48ccfb1
[8.x] [ML] Anomaly Detection: Adds popover links menu to anomaly explorer charts. (#186587) (#193383)
# Backport

This will backport the following commits from `main` to `8.x`:
- [[ML] Anomaly Detection: Adds popover links menu to anomaly explorer
charts. (#186587)](https://github.com/elastic/kibana/pull/186587)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Walter
Rafelsberger","email":"walter.rafelsberger@elastic.co"},"sourceCommit":{"committedDate":"2024-09-19T06:10:38Z","message":"[ML]
Anomaly Detection: Adds popover links menu to anomaly explorer charts.
(#186587)\n\n## Summary\r\n\r\nAdds support for clicking on Anomaly
Explorer charts to trigger the\r\nactions popover menu.\r\n\r\n- [x]
ExplorerChartSingleMetric\r\n- [x] ExplorerChartDistribution\r\n- [x]
Support for embedded charts\r\n\r\nAnomaly
Explorer\r\n\r\n[ml-anomaly-charts-actions-0001.webm](ee519b47-e924-4947-b127-4f3ecf62616e)\r\n\r\n###
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [x] This was
checked for breaking API changes and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"854cb15725f059aa80abea6d7155190ef88622ef","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:enhancement",":ml","Feature:Anomaly
Detection","v9.0.0","v8.16.0"],"title":"[ML] Anomaly Detection: Adds
popover links menu to anomaly explorer
charts.","number":186587,"url":"https://github.com/elastic/kibana/pull/186587","mergeCommit":{"message":"[ML]
Anomaly Detection: Adds popover links menu to anomaly explorer charts.
(#186587)\n\n## Summary\r\n\r\nAdds support for clicking on Anomaly
Explorer charts to trigger the\r\nactions popover menu.\r\n\r\n- [x]
ExplorerChartSingleMetric\r\n- [x] ExplorerChartDistribution\r\n- [x]
Support for embedded charts\r\n\r\nAnomaly
Explorer\r\n\r\n[ml-anomaly-charts-actions-0001.webm](ee519b47-e924-4947-b127-4f3ecf62616e)\r\n\r\n###
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [x] This was
checked for breaking API changes and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"854cb15725f059aa80abea6d7155190ef88622ef"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/186587","number":186587,"mergeCommit":{"message":"[ML]
Anomaly Detection: Adds popover links menu to anomaly explorer charts.
(#186587)\n\n## Summary\r\n\r\nAdds support for clicking on Anomaly
Explorer charts to trigger the\r\nactions popover menu.\r\n\r\n- [x]
ExplorerChartSingleMetric\r\n- [x] ExplorerChartDistribution\r\n- [x]
Support for embedded charts\r\n\r\nAnomaly
Explorer\r\n\r\n[ml-anomaly-charts-actions-0001.webm](ee519b47-e924-4947-b127-4f3ecf62616e)\r\n\r\n###
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [x] This was
checked for breaking API changes and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"854cb15725f059aa80abea6d7155190ef88622ef"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Walter Rafelsberger <walter.rafelsberger@elastic.co>
2024-09-20 09:30:29 -05:00
Kibana Machine
6113e6c1e5
[8.x] [ML] Anomaly Explorer: Display markers for scheduled events in distribution type anomaly charts (#192377) (#193118)
# Backport

This will backport the following commits from `main` to `8.x`:
- [[ML] Anomaly Explorer: Display markers for scheduled events in
distribution type anomaly charts
(#192377)](https://github.com/elastic/kibana/pull/192377)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Robert
Jaszczurek","email":"92210485+rbrtj@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-09-17T07:53:32Z","message":"[ML]
Anomaly Explorer: Display markers for scheduled events in distribution
type anomaly charts (#192377)\n\n## Summary\r\n\r\nFix for
[#129304](https://github.com/elastic/kibana/issues/129304)\r\n\r\nPreviously,
for distribution type charts, we displayed calendar event\r\nmarkers
only for anomalous data points. The changes improve the display\r\nof
event markers for such chart types, including showing calendar
event\r\nmarkers even when there is no underlying data point.\r\n\r\n|
Scenario | Before | After |\r\n| :---: | :---: | :---: |\r\n| Rare chart
|\r\n![image](3dd51cd1-6972-4343-bbc8-8e5f38d7c6bd)\r\n|\r\n|
Population chart | ![Zrzut ekranu 2024-09-9 o 16
16\r\n01](c198e75e-14c8-4194-9d71-2358d25f21d5)\r\n|\r\n|
Single metric chart (no difference)
|\r\n![image](c11ec696-b1f4-4ddf-9542-037b8dd2d31f)\r\n|","sha":"d5b1fdf49af8eb23210e3b15a20fe1f9b660eea8","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:enhancement",":ml","Feature:Anomaly
Detection","v9.0.0","Team:ML","v8.16.0"],"title":"[ML] Anomaly Explorer:
Display markers for scheduled events in distribution type anomaly
charts","number":192377,"url":"https://github.com/elastic/kibana/pull/192377","mergeCommit":{"message":"[ML]
Anomaly Explorer: Display markers for scheduled events in distribution
type anomaly charts (#192377)\n\n## Summary\r\n\r\nFix for
[#129304](https://github.com/elastic/kibana/issues/129304)\r\n\r\nPreviously,
for distribution type charts, we displayed calendar event\r\nmarkers
only for anomalous data points. The changes improve the display\r\nof
event markers for such chart types, including showing calendar
event\r\nmarkers even when there is no underlying data point.\r\n\r\n|
Scenario | Before | After |\r\n| :---: | :---: | :---: |\r\n| Rare chart
|\r\n![image](3dd51cd1-6972-4343-bbc8-8e5f38d7c6bd)\r\n|\r\n|
Population chart | ![Zrzut ekranu 2024-09-9 o 16
16\r\n01](c198e75e-14c8-4194-9d71-2358d25f21d5)\r\n|\r\n|
Single metric chart (no difference)
|\r\n![image](c11ec696-b1f4-4ddf-9542-037b8dd2d31f)\r\n|","sha":"d5b1fdf49af8eb23210e3b15a20fe1f9b660eea8"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/192377","number":192377,"mergeCommit":{"message":"[ML]
Anomaly Explorer: Display markers for scheduled events in distribution
type anomaly charts (#192377)\n\n## Summary\r\n\r\nFix for
[#129304](https://github.com/elastic/kibana/issues/129304)\r\n\r\nPreviously,
for distribution type charts, we displayed calendar event\r\nmarkers
only for anomalous data points. The changes improve the display\r\nof
event markers for such chart types, including showing calendar
event\r\nmarkers even when there is no underlying data point.\r\n\r\n|
Scenario | Before | After |\r\n| :---: | :---: | :---: |\r\n| Rare chart
|\r\n![image](3dd51cd1-6972-4343-bbc8-8e5f38d7c6bd)\r\n|\r\n|
Population chart | ![Zrzut ekranu 2024-09-9 o 16
16\r\n01](c198e75e-14c8-4194-9d71-2358d25f21d5)\r\n|\r\n|
Single metric chart (no difference)
|\r\n![image](c11ec696-b1f4-4ddf-9542-037b8dd2d31f)\r\n|","sha":"d5b1fdf49af8eb23210e3b15a20fe1f9b660eea8"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Robert Jaszczurek <92210485+rbrtj@users.noreply.github.com>
2024-09-17 04:33:10 -05:00
Melissa Alvarez
e5600b18b1
[ML] Anomaly Detection supplied configurations: adds page in ML UI for Supplied configurations (ML Modules) (#191564)
## Summary

This PR adds a page in the UI for 'Supplied configurations'
Dependent on this fix to the endpoint schema going in first:
https://github.com/elastic/kibana/pull/191633

NOTE: This item will be added to the side-nav of oblt serverless once
this update is in: https://github.com/elastic/kibana/issues/190458

Adds dedicated UI page for preconfigured job packages - subitem of the
Anomaly Detection navigation:
<img width="1721" alt="image"
src="https://github.com/user-attachments/assets/194bbf44-aa7c-4afa-94e3-587fb9e5f601">

When they can't be run in the ML UI: 
<img width="1467" alt="image"
src="https://github.com/user-attachments/assets/487463e8-7520-48de-8806-1d45a82e452e">

When selected - flyout opens to reveal package assets:
<img width="1098" alt="image"
src="https://github.com/user-attachments/assets/a648a6d8-df79-4bb3-a797-61f02e246c9b">

Clicking the `Run data recognizer` button shows matching data views (if
any) with link to job creation:
<img width="1099" alt="image"
src="https://github.com/user-attachments/assets/05e9f7f7-e41f-486d-ba41-84cacf534cd0">

Empty table when no matching dataviews are found:
<img width="999" alt="image"
src="https://github.com/user-attachments/assets/d8bbf3be-7035-4e2f-956e-83dfbc26b247">

Jobs tab of flyout:
<img width="1102" alt="image"
src="https://github.com/user-attachments/assets/e94efb2e-1f21-4883-aa2b-2c42db5be970">

kibana tab of flyout:
<img width="1100" alt="image"
src="https://github.com/user-attachments/assets/0021a527-8d9d-4e06-9fae-d832015f7f7d">




### 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)

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-09-12 10:30:09 -06:00
James Gowdy
0a1be162fe
[ML] Improve expired license check (#191503)
When a trial license expires, the license falls into a state where it is
not seen as being a valid basic license, but rather an "expired"
license.
The license is still valid and our `isMinimumLicense` check needs to
return true in this situation to allow the ML app to redirect to the
expired license page.

Before (ML page fails to load):


![image](https://github.com/user-attachments/assets/0e73b2a5-0645-4253-9737-1393fe58f8a1)



After (we redirect to the license page):


![image](https://github.com/user-attachments/assets/3f579c1e-ee7f-45e8-87d3-258caa5d42c2)
2024-08-29 14:24:09 +01:00
James Gowdy
5ea65f9ed7
[ML] Improving empty object creation (#191518)
Replacing instances of empty object creation with `Object.create(null)`
to remove any risk of prototype pollution.
Only touching server and common code.

Follows on from https://github.com/elastic/kibana/pull/186821
2024-08-28 16:41:34 +01:00
Larry Gregory
74d88580a5
Migrate codebase to use Object.hasOwn instead of Object.hasOwnProperty (#186829)
## Summary

This PR has breadth, but not depth. This adds 3 new `eslint` rules. The
first two protect against the use of code generated from strings (`eval`
and friends), which will not work client-side due to our CSP, and is not
something we wish to support server-side. The last rule aims to prevent
a subtle class of bugs, and to defend against a subset of prototype
pollution exploits:

- `no-new-func` to be compliant with our CSP, and to prevent code
execution from strings server-side:
https://eslint.org/docs/latest/rules/no-new-func
- `no-implied-eval` to be compliant with our CSP, and to prevent code
execution from strings server-side:
https://eslint.org/docs/latest/rules/no-implied-eval. Note that this
function implies that it prevents no-new-func, but I don't see [test
cases](https://github.com/eslint/eslint/blob/main/tests/lib/rules/no-implied-eval.js)
covering this behavior, so I think we should play it safe and enable
both rules.
- `no-prototype-builtins` to prevent accessing shadowed properties:
https://eslint.org/docs/latest/rules/no-prototype-builtins


In order to be compliant with `no-prototype-builtins`, I've migrated all
usages and variants of `Object.hasOwnProperty` to use the newer
[`Object.hasOwn`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwn).
2024-08-13 10:30:19 -05:00
Melissa Alvarez
8be5ad8fc9
[ML][Fleet] Link to ML assets from Integration > Assets tab (#189767)
## Summary

Related issue: https://github.com/elastic/kibana/issues/182199

This PR adds links for ML assets installed via Integrations. 

For `transform` and `ml_model` (as they are ES asset types) the manual
mappings in
[get_bulk_assets.ts](ac6f643904/x-pack/plugins/fleet/server/services/epm/packages/get_bulk_assets.ts (L21))
has been modified to include a link to the Transform management page and
the Trained models page, respectively. The pages will be filtered to the
asset id.

This PR also adds the ability to save state in the url for the Transform
list to allow the url to link to a filtered list of transforms.

### To test:

- From the side navigation - click the `Add integrations` button at the
bottom to get to the Integrations page.
<img width="318" alt="image"
src="https://github.com/user-attachments/assets/d4632221-7f83-4678-ac0f-cb1e20853a6d">

- To test ml models link, install the `Living off the Land Attack
Detection` integration
- To test transform link, install the `Lateral Movement Detection`
integration

- Once they are installed you can navigate to the `Installed
Integrations` tab on the Integrations page
<img width="660" alt="image"
src="https://github.com/user-attachments/assets/8dc1db76-4b93-4057-b502-a90980a2a484">

- Select the installed package you want to view and then go to the
`Assets` tab
<img width="1256" alt="image"
src="https://github.com/user-attachments/assets/c3382f9d-b1ed-4043-ac3f-73180effefe8">

- You can then expand the desired asset section (Ml models or
transforms) and click the link to ensure it takes you to the correct
place


### 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)

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-08-13 08:55:55 -06:00
Dima Arnautov
514db549d2
[ML] Support E5 model download from the list view, mark not supported/not optimized models (#189372)
## Summary

- Adds the "Show all" switch at the top of the page (off by default)
that responsible for hiding unsupported/not optimised model versions
- Adds a download action for E5 models 
- Removes the toast notification on successful start of a model download
- Adds a warning icon with an appropriate tooltip text if model version
is not supported by the cluster architecture or not optimised for it

<img width="1401" alt="image"
src="https://github.com/user-attachments/assets/30748315-3018-46e2-91dd-fd5128b0695e">



### 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
2024-08-07 08:43:18 +02:00
Lisa Cawley
841e95c64b
[OAS][ML] Add sync API tags and description, minor OpenAPI fixes (#189230) 2024-07-26 15:28:43 -05:00
Valeriy Khakhutskyy
bd843dda3f
[ML] Add new custom rule action to force time shift (#188710)
This PR follows up https://github.com/elastic/elasticsearch/pull/110974
and extends the schema for custom rules.

A valid schema looks like this:
```http
POST _ml/anomaly_detectors/my_job/_update
{
	"detectors": {
		"detector_index": 0,
		"custom_rules": [
			// update the detector with a custom rule that forces a time shift of 1 hour back starting now
			{
				"actions": [
					"force_time_shift"
				],
				"params": {
					"force_time_shift": {
"time_shift_amount": 3600}
					}
				},
				"conditions": [{
					"applies_to": "time",
					"operator": "gt",
					"value": "now"
				},
{
					"applies_to": "time",
					"operator": "lt",
					"value": "now+bucket_span"
				},

]
			},
			...
```

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-07-26 09:04:43 +02:00
Nick Partridge
49a985625b
Upgrade prettier dependencies (#188032)
## Summary

- Upgrade `prettier` to `v2.8.x`.
- Upgrade related decencies.
- Adds `prettier` group to renovate config.
- Fixes bootstrapping type error.

## Main Changes

### Add parentheses for `TypeofTypeAnnotation` to improve readability

[link](https://github.com/prettier/prettier/blob/main/CHANGELOG.md#add-parentheses-for-typeoftypeannotation-to-improve-readability-14458-by-fisker)

```ts
// Input
type A = (typeof node.children)[];

// Prettier 2.8.4
type A = typeof node.children[];

// Prettier 2.8.5
type A = (typeof node.children)[];
```

### Add parentheses to head of `ExpressionStatement` instead of the
whole statement


[link](https://github.com/prettier/prettier/blob/main/CHANGELOG.md#add-parentheses-to-head-of-expressionstatement-instead-of-the-whole-statement-14077-by-fisker)

```ts
// Input
({}).toString.call(foo) === "[object Array]"
  ? foo.forEach(iterateArray)
  : iterateObject(foo);

// Prettier 2.8.1
({}.toString.call(foo) === "[object Array]"
  ? foo.forEach(iterateArray)
  : iterateObject(foo));

// Prettier 2.8.2
({}).toString.call(foo.forEach) === "[object Array]"
  ? foo.forEach(iterateArray)
  : iterateObject(foo);
```

## Details

This started because I noticed we were on `typescript@^5` but still on
an old prettier that complained about use of new TS features such as
[`satisfies`](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-9.html#the-satisfies-operator).

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-07-24 17:29:05 +01:00
Dima Arnautov
9669bfde47
[ML] Fixes display of model state in trained models list with starting and stopping deployments (#188847)
## Summary

Fixes #188035 and #181093

<img width="1434" alt="image"
src="https://github.com/user-attachments/assets/6c14afa3-2908-45ff-a68d-88ee18f18964">



### 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
2024-07-23 14:18:49 +02:00
Eyo O. Eyo
22e0545d0e
Redesign the "Add Panel" Experience (#183764)
## Summary

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

This PR introduces changes to the dashboard add panel selection
functionality, so that panel selection would now happen from within a
flyout, and as such panels are now grouped together logically.

With this implementation any panel that is intended to show up within
this new flyout is required to have either been registered leveraging
the ui action trigger `ADD_PANEL_TRIGGER` and have it's `grouping` value
defined or belong to a subset of visualization types (`PROMOTED`,
`TOOLS`, and `LEGACY`) that would automatically get grouped.

It's worth pointing out that because we can't control the order at which
UI actions gets registered, we won't always get the the panel groups in
the same order, for this specific reason ~a new optional property
(`placementPriority`) has been added in~ the property `order` is now
leveraged such that it allows a user registering a UI action define a
relative weight for where they'd like their group to show up. All
registered actions would be rendered in descending order considering all
`order` defined, in the case where no order is defined `0` is assumed
for the group. In addition an action which is registered without a
group, would automatically get assigned into a default group titled
"Other".

The search implemented within the add panel is rudimentary, checking if
the group titles and group item titles contain the input character; when
a group title is matched the entire group is remains highlighted, in the
case that the group isn't matched and it's just the group item, only
said item is highlighted within it's group.

## Visuals

#### Default view
<img width="2560" alt="Screenshot 2024-06-10 at 17 44 17"
src="90aadf82-684a-4263-aecd-2843c3eff3c1">


#### Search match view
<img width="2560" alt="Screenshot 2024-06-10 at 17 45 11"
src="5a766f29-a3b7-40e3-b1f7-8b423073cd87">


##### P.S.

This changes also includes changes to the display of certain panels;
- ML group has a new title i.e. *Machine Learning and Analytics*
- In serverless, the observability panels (SLO*) only shows as a
selection choice in the observability project type.


### Checklist

Delete any items that are not applicable to this PR.

- [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)
<!--
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] 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)
-->
- [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] 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)


<!--
### 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: Catherine Liu <catherine.liu@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-06-26 13:55:28 -07:00
Lisa Cawley
dde8ef93bb
[OAS] Edits OpenAPI documents for machine learning sync API (#186318) 2024-06-18 10:25:34 -07:00
Dima Arnautov
074220db87
[ML] Progress bar for trained models download (#184906)
## Summary

Closes #182004

Adds a progress bar for trained model downloads. 

<img width="1592" alt="image"
src="c69f2ad8-c211-4349-be98-d8844218aa5c">



### 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] 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)
2024-06-13 03:42:31 -07:00
Melissa Alvarez
2ec4ec362d
[ML] Anomaly Detection: Single Metric Viewer - add cases action (#183423)
## Summary

Related meta issue https://github.com/elastic/kibana/issues/181272

This PR adds the 'Add to case' action in the Single Metric Viewer


### 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)

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Dima Arnautov <arnautov.dima@gmail.com>
2024-05-23 09:02:23 -06:00
Patryk Kopyciński
0780c19322
Add explicit children types (#181257)
## Summary

Prep work for React@18 bump

tl;dr In React@18 `React.FC` doesn't contain `children` anymore, so in
order to make the bump easier I have decided to split the effort in
multiple faces and hopefully this will make it easier for everyone

This PR focuses only on adding explicit `children` declaration either by
using `React.PropsWithChildren` type or by adding `children:
React.ReactNode` to the existing props types

https://github.com/DefinitelyTyped/DefinitelyTyped/issues/46691

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Sergi Massaneda <sergi.massaneda@gmail.com>
Co-authored-by: Marco Vettorello <marco.vettorello@elastic.co>
Co-authored-by: James Gowdy <jgowdy@elastic.co>
2024-04-29 16:56:41 +01:00
Saarika Bhasi
439f4a8876
[ML] Support adding inference_id in a flyout (#180330)
## Summary

* Creates a new package - ` @kbn/inference_integration_flyout` 
* Above package has implementation for adding new inference endpoint id,
including Elastic, third party integration and instructions to upload
via Eland python client, in a flyout.
* The above package is used for supporting semantic_text feature and is
accessed via`add a new inference endpoint` button

## Screen Recording


dbd36634-bd4a-49f1-b1d5-d7b6c90444bc


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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-04-21 21:20:28 -04:00
Clint Andrew Hall
67ab4f7732
[ml] Optimize bundles, reduce page load async chunks by 74% (#179311)
## Summary

The `AnomalyExplorerChartsService` was importing the
`SWIM_LANE_LABEL_WIDTH` numerical constant from
`swimlane_container.tsx`. As a result, the _entirety_ of that file was
being included in the async bundle.

`AnomalyExplorerChartsService` is loaded asynchronously on page load by
the embeddable. By relocating the constant to its own file-- as well as
other optimizations (see below)-- we reduce the async page load by 74%,
(in dev mode).

### Before - `351k`
<img width="1220" alt="Screenshot 2024-03-24 at 10 09 31 AM"
src="6cea41f5-fb10-41c3-8951-a4be897174f9">

### After - `93.4k`
<img width="1471" alt="Screenshot 2024-04-05 at 11 45 45 AM"
src="a07e7a19-c1af-4b45-a195-69730fc61b0c">

Unfortunately, this change led to a bloating of async modules, the cause
of which is still unclear. The application async chunk weighed in at 2.2
MB compressed! To get this PR to a shippable state, I refactored
additional code to bring down duplication and bloat.

The result is an `ml` experience that fetches small bundles on demand as
someone interacts with it:

![Apr-05-2024
11-51-18](75ba423e-7071-4867-ae4b-05308bf319f3)

More work can be done to continue to optimize the plugin, of course, but
this set of changes is an excellent start, (and case study on bundle
load).

### Other optimizations in this PR

- Registration of some `start` services are conditional, and contain
their own async calls. I've removed these from the register helper,
(which itself is a brute-force offload of code from the plugin, but is
still loaded every time), and loaded them async if the conditions apply.
- Routing in `ml` use factories to create individual routes. In a lot of
cases, the pages these routes displayed were not asynchronously loaded,
adding tremendous amounts of React code to the root application.
  - I made all pages loaded by routes async.
- In some cases, the components themselves were colocated with the route
factory. I moved those to their own files for async import.
- Similarly, some state managers were colocated. Those were moved to
their own files, as well.
- Moved flyouts, modals, expanding rows to `React.lazy` async modules,
(using `dynamic` from `@kbn/shared-ux-utility`.
- Refactored `export * from` directives from `public/shared.ts` to
accurately reflect what is being consumed outside the `ml` plugin, (and
also reduce the size of _that_ bundle.
- Refactored `lodash` imports to submodule imports to enable
tree-shaking, (if ever enabled in webpack).
- Moved `getMlGlobalServices` off of the `app.tsx` file for import by
others, (to avoid depending on the rest of the code there).
- Moved some types to `/common` to avoid importing code, (though,
admittedly, types are compiled away). But it felt cleaner to move them
out.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-04-11 12:15:14 -07:00
Saikat Sarkar
fff6bcffde
Add semantic_text to index mapping (#179575)
In this PR, we added the following items.

- Add a semantic_text field type
- Allow the users to add semantic_text to index mapping
- Allow the user to select a text field as reference field
- Allow the user to select inference_id for semantic_text field

Please be aware that currently, we won't be able to save the mapping
using the 'Save mappings' button because the 'semantic_text'
functionality doesn't support 'inference_id'. However, there is ongoing
parallel work in a GitHub
[branch](https://github.com/elastic/elasticsearch/tree/feature/semantic-text)
to enable 'inference_id' in 'semantic_text' for Elasticsearch.
2024-04-04 09:03:10 -07:00
Alejandro Fernández Haro
1c1e20afdb
Use rxjs instead of rxjs/operators (#179553) 2024-04-02 11:41:33 -07:00
Zacqary Adam Xeper
bfc91b0cb0
[RAM] [Rule Form v2] Add feature flag (#179184)
## Summary

Closes #179110 

This adds a series of feature flags to all plugins that are currently
using the **Rule Form Flyout**, in preparation for development of the
new Create Rule Flow V2 (#175634).

Unfortunately true Kibana feature-flagging is still not yet implemented,
so we need to implement this as a config option for every individual
affected plugin. The following `kibana.yml` config will enable the
upcoming V2 rule form:

```yaml
xpack.trigger_actions_ui.enableExperimental: ['ruleFormV2']
xpack.infra.featureFlags.ruleFormV2Enabled: true
xpack.ml.experimental.ruleFormV2.enabled: true
xpack.transform.experimental.ruleFormV2Enabled: true
xpack.legacy_uptime.experimental.ruleFormV2Enabled: true
xpack.observability.unsafe.ruleFormV2.enabled: true
xpack.slo.experimental.ruleFormV2.enabled: true
xpack.apm.featureFlags.ruleFormV2Enabled: true

discover.experimental.ruleFormV2Enabled: true
``` 

**These feature flags will not enable anything yet.** This PR is for the
sole purpose of adding these browser-enabled flags now, so that we can
reduce the amount of code committed later.

### Why feature flag every plugin?

The V1 rule form is currently exported from Triggers Actions UI. In V2,
we're moving away from this model and exporting the rule form in a KBN
package. Therefore we can't simply export the results of a single
feature flag from Triggers Actions UI, we need to signal to each
individual plugin whether it should be pulling from the new KBN package
or from the old cross-plugin export.

### Plugins affected

#### Triggers Actions UI, Infra, Observability, APM

These plugins already contained interfaces for experimental features or
feature flags, so this PR simply adds a new flag to these existing
structures.

#### Discover, ML, Transform, Uptime, SLO

These plugins did **not** have existing browser-exposed feature flag
systems, so this PR adds these interfaces. The transform plugin notably
did not yet have any config options configured at all.
2024-03-27 13:17:21 -07:00
James Gowdy
a66d42b50c
[ML] Fixes polling for blocked anomaly detection jobs (#178246)
Fixes two issues:
- When a job is in a blocked state (resetting, deleting reverting) but
the underlying task [cannot be
found](https://github.com/elastic/elasticsearch/issues/105928), the task
polling fails to start correctly and instead enters a loop where the
tasks are checked as fast as possible.
- Some tasks can legitimately take a long time to run, but we still poll
at the same 2 second rate.

This PR fixes the feedback loop and adds a check for when a poll has
been running for over a minute, the poll interval is increased to 2
minutes.

Related to https://github.com/elastic/kibana/issues/171626
2024-03-12 08:17:54 -07:00
James Gowdy
3670b4fa5f
[ML] Enable consistent-type-imports eslint rule (#176921)
Enabling `consistent-type-imports` rule and running `node scripts/eslint
--no-cache --fix` to fix every type import.

Affects x-pack plugins: `ml`, `transform`, `aiops`, `data_visualizer`
and `x-pack/packages/ml`

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-03-07 03:29:20 -07:00
James Gowdy
64fa491043
[ML] Fixing quick create geo job created by ID (#177691)
We should differentiate between geo jobs created in lens, and the ones
created in the original wizards.
We do this for single and multi metric jobs.
2024-03-05 09:40:12 +00:00
Dima Arnautov
ec8e464251
[ML] Update alerts-as-data payload for Anomaly detection health and Transform health rules (#176307) 2024-02-13 20:55:30 +01:00
Dima Arnautov
2598b81704
[ML] Warn the user if trained model is referenced by the _inference API (#175880) 2024-02-13 20:54:46 +01:00
Dima Arnautov
550c10dc5e
[ML] AIOps: UI action for Change Point Detection embeddable to open in the ML app (#176694)
## Summary

Closes #161248 

Added a UI action to open change point detection in the AIOps labs.

<img width="1137" alt="image"
src="077c0e34-0ac0-4790-8cbe-c6048ee90d22">

### 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)
- [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] 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)
2024-02-13 08:36:09 -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
Xavier Mouligneau
5d5f0d1073
[RAM] Stack management rules available with only ml feature (#174791)
## Summary

Fix => https://github.com/elastic/kibana/issues/173573
2024-01-16 09:13:02 -07:00
Dima Arnautov
2a61da251b
[ML] Fix Allocation rendering for failed deployments (#174882)
## Summary

Fixes "Allocation" rendering for failed deployments of trained models.

_We should also update the type definition in elasticsearch
specification marking `number_of_allocations` and
`threads_per_allocation` as optional for [Get Trained Model
Stats](https://www.elastic.co/guide/en/elasticsearch/reference/current/get-trained-models-stats.html)
endpoint._

#### How to reproduce
1. Start a model deployment 
2. Find a Process ID 
```
ps -ef | grep pytorch_inference
```
3. Kill the inference process manually 
```
kill -9 <PID>
```

Before:

![image](b89545a6-6216-4ac8-b0c3-f2b755a41179)

After: 
<img width="1732" alt="image"
src="be970ae8-f4a2-4b06-aff4-f27ce374178c">
2024-01-16 13:43:31 +01:00
Xavier Mouligneau
80edac1d53
[RAM] Makes anomaly detection rule visible in Observability (#170451)
## Summary

From the rule management page in observability, user will be able to
create an anomaly detection rule.

<img width="1789" alt="image"
src="9ce84628-bf1b-44f6-a51b-5bd2ad94d9bd">

<img width="1792" alt="image"
src="0add536c-2e62-4de5-9e06-2beedd0c0fe2">
2023-12-21 09:12:58 -05:00
Dima Arnautov
50dabea70f
[ML] Add anomaly description as an alert message for anomaly detection rule type (#172473)
## Summary

Closes #136391 

Uses a description of the anomaly for the alert message for anomaly
detection alerting rules with the `record` result type. This messages is
used for example in the `Reason` field in the alert table and details
flyout.

<img width="753" alt="image"
src="072fe833-204b-4d38-bd3d-50d00015a43f">


### Checklist

- [ ]
[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
2023-12-05 12:04:36 -07:00
Dima Arnautov
808990a78d
[ML] Validate and limit threading parameters for starting model deployment (#171921)
## Summary

Closes #171883

This PR adds:
- Limiting options for "Threads per allocation" control for a model
deployment based on the `max_single_ml_node_processors` limit
- Validation of the number of allocation according to the
`total_ml_processors` field

<img width="1018" alt="image"
src="b8debd82-5f84-469a-8440-4a48b00a9dc3">


### 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)
- [ ] [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-11-27 14:08:22 +01:00
Lisa Cawley
2f258a229c
[OAS] Migrate machine learning APIs to v3.1.0 (#171594) 2023-11-23 11:46:05 -08: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
Melissa Alvarez
39af788067
[ML] Trained models list: disable 'View training data' action if data frame analytics job no longer exists (#171061)
## Summary

Fixes https://github.com/elastic/kibana/issues/167667, disabling the
'View training data' action for models in the Trained Models list if the
data frame analytics job which created the model no longer exists

Adds `origin_job_exists` property to trained models list model items.
This is set during the models fetch for models with associated data
frame analytics jobs.

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

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-11-21 08:50:38 -07:00
Dima Arnautov
875268d558
[ML] Show alerts data on the Anomaly timeline (#167998)
## Summary

With alerts-as-data integration added in
https://github.com/elastic/kibana/pull/166349, we're enabled to
incorporate alerts historical data into views in the ML UI to see how it
correlates with the anomaly results.

This PR add alerts data to the Anomaly Explorer page. If selected
anomaly detection jobs have associated alerting rules, we show a new
"Alerts" panel.
It contains: 

<img width="1675" alt="image"
src="1945d1f1-7f12-4a03-8ebd-e0b36c8fce68">

#### A line chart with alerts count over time using the Lens embeddable

It support sync cursor with the Anomaly swim lane making it easier to
align anomalous buckets with alerts spikes.

<img width="1189" alt="image"
src="343b9bcf-bfa4-479d-bf8f-c1572402aa42">

#### Summary of the alerting rules
Shows an aggregated information for each alerting rule associated with
the current job selection:
  - An indicator if alerting rule is active
  - Total number of alerts 
  - Duration of the latest alerts 
  - Start time for active rules and Recovery time for recovered
  
Rules summary has a descending order based on the following criteria: 

- Number of active alerts in rule 
- Total number of alerts in rule 
- Duration of the most recent alert in rule 

<img width="1032" alt="image"
src="899f37f3-dd8c-4cb6-b7f6-263ed86d20ee">

#### Alert details 

It contains an alerts table provided by `triggersActionsUI` plugin. For
each alert the user can:
- Open alerts details page
- Attach an alert to a new case
- Attach n alert to an existing case 

<img width="1177" alt="image"
src="d3b7768a-bae2-404f-b364-ff7d7493cb9b">


#### Alert context menu 

When an anomaly swim lane cells are selected, and there are alerts
within the chosen time range, a context menu displaying alert details is
shown.

<img width="1202" alt="image"
src="2b684c51-db5a-4f8c-bda9-c3e9aabde0d4">


### 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)
- [ ]
[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
- [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-11-10 05:07:04 -07:00
Lisa Cawley
8924218d6a
[OAS] Simplify server declaration in ML APIs (#169885) 2023-10-26 13:45:47 -07:00
James Gowdy
6a6df9d72f
[ML] Module filtering (#168721)
Adds a new `tags` property to our ML Modules which contains an array of
strings to used to filter the modules returned when calling
`/internal/ml/modules/get_module` or `/internal/ml/modules/recognize`

Adds a new kibana config setting `xpack.ml.compatibleModuleType` which
will enforce a module filter.
This setting supports the values `security`, `observability` or `search`
and will be used by the serverless projects to ensure only modules
relevant to the current project are discoverable.

When matching against the `xpack.ml.compatibleModuleType` setting,
modules with no tags will be returned along with modules which match the
`compatibleModuleType` value.

The endpoints `/internal/ml/modules/get_module` and
`/internal/ml/modules/recognize` can also take a `filter` query
parameter in the form of a comma separated list of values. If any of
these filter values match a module's tags, the module will be returned.
Modules with no tags will not be matched when using the `filter`
parameter.

This PR also updates the security plugin to apply a `security` filter
when retrieving modules and running recognize. This will improve
performance, especially for recognize which runs the queries from every
module on the supplied index pattern.

Examples

**Running the Security serverless project.**
Request:
`/internal/ml/modules/get_module` 
Response:
All modules containing `tags: ["security"]`
Plus all modules with no `tags` or `tags: []`

Request:
`/internal/ml/modules/get_module?filter=observability` 
Response:
An empty list

**Running stateful es**
Request:
`/internal/ml/modules/get_module` 
Response:
All modules

Request:
`/internal/ml/modules/get_module?filter=security` 
Response:
Only modules containing `tags: ["security"]` 

Request:
`/internal/ml/modules/get_module?filter=security,observability` 
Response:
Modules containing `tags: ["security"]`  and `tags: ["observability"]`

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-10-26 16:55:48 +01:00
Lisa Cawley
61e8ca2a39
[OAS] Add Serverless machine learning APIs (#168777) 2023-10-13 09:55:47 -07:00
Dima Arnautov
0c6dfbf209
[ML] ELSER v2 download in the Trained Models UI (#167407)
## Summary

Adds support for ELSER v2 download from the Trained Models UI.

- Marks an appropriate model version for the current cluster
configuration with the recommended flag.
- Updates the state column with better human-readable labels and colour
indicators.
- Adds a callout promoting a new version of ELSER

<img width="1686" alt="image"
src="0deea53a-6d37-4af6-97bc-9f46e36f113b">

#### Notes for reviews
- We need to wait for
https://github.com/elastic/elasticsearch/pull/99584 to get the start
deployment validation functionality. At the moment you can successfully
start deployment of the wrong model version.

### 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)
- [ ]
[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
- [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=
- [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-10-03 02:19:49 -07:00