Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ML][Fleet] Adds link to anomaly detection configurations from Integration > Assets tab #193105

Conversation

alvarezmelissa87
Copy link
Contributor

@alvarezmelissa87 alvarezmelissa87 commented Sep 16, 2024

Summary

Related issue: #182199

This PR adds a link to ML > Anomaly Detection > Supplied Configurations from Integration > Assets tab for 'ML Modules' assets.

The naming of the asset is also updated in Fleet to be consistent with the ML UI.

Screenshot 2024-09-19 at 13 46 47 Screenshot 2024-09-19 at 13 47 52

Checklist

Delete any items that are not applicable to this PR.

@alvarezmelissa87 alvarezmelissa87 marked this pull request as ready for review September 16, 2024 23:29
@alvarezmelissa87 alvarezmelissa87 requested review from a team as code owners September 16, 2024 23:29
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@@ -66,10 +66,10 @@ export const AssetTitleMap: Record<
}
),
'ml-module': i18n.translate('xpack.fleet.epm.assetTitles.mlModules', {
defaultMessage: 'ML modules',
defaultMessage: 'Anomaly Detection configurations',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit. I think it should be sentence case:

Suggested change
defaultMessage: 'Anomaly Detection configurations',
defaultMessage: 'Anomaly detection configurations',

When we use anomaly detection as the name of a menu item in the nav, it's Anomaly Detection, otherwise sentence case is preferred.

@alvarezmelissa87
Copy link
Contributor Author

alvarezmelissa87 commented Sep 18, 2024

This has been updated and is ready for a final look when you get a chance 🙏 cc @peteharverson, @szabosteve, @walterra

@alvarezmelissa87 alvarezmelissa87 added the backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) label Sep 18, 2024
Copy link
Contributor

@peteharverson peteharverson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Latest changes LGTM

@peteharverson peteharverson changed the title [ML][Fleet] Adds link to ML assets from Integration > Assets tab [ML][Fleet] Adds link to anomaly detection configurations from Integration > Assets tab Sep 19, 2024
@alvarezmelissa87
Copy link
Contributor Author

@elasticmachine merge upstream

Copy link
Contributor

@walterra walterra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just added a question about schema. About stringMatch: Would be good to add some unit tests that work with the update but would fail with the previous version. In a follow we could also consolidate the duplicate code into a package.

Comment on lines 104 to 114
const schema = useMemo(
() => ({
strict: true,
fields: {
tags: {
type: 'string',
},
},
}),
[]
);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like it's just initialized once without any options, could it be moved outside the component without the useMemo()?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh good catch - updated in 6434887

@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Fleet Cypress Tests #4 / View agents list Agent status filter should filter on healthy (16 result)

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
ml 4.6MB 4.6MB +379.0B
transform 549.6KB 549.6KB +23.0B
total +402.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
fleet 171.2KB 171.2KB +44.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @alvarezmelissa87

@alvarezmelissa87
Copy link
Contributor Author

LGTM, just added a question about schema. About stringMatch: Would be good to add some unit tests that work with the update but would fail with the previous version. In a follow we could also consolidate the duplicate code into a package.

Added unit tests in 6434887
Agree on moving to a package in follow-up work 👍

@alvarezmelissa87 alvarezmelissa87 merged commit 052187c into elastic:main Sep 19, 2024
23 checks passed
@alvarezmelissa87 alvarezmelissa87 deleted the ml-link-resources-from-integrations branch September 19, 2024 20:40
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Sep 19, 2024
…ation > Assets tab (elastic#193105)

## Summary

Related issue: elastic#182199

This PR adds a link to `ML > Anomaly Detection > Supplied
Configurations` from `Integration > Assets tab` for 'ML Modules' assets.

The naming of the asset is also updated in Fleet to be consistent with
the ML UI.

<img width="429" alt="Screenshot 2024-09-19 at 13 46 47"
src="https://github.com/user-attachments/assets/9fcc3606-cc08-483f-88b4-00c07de3fc57">

<img width="717" alt="Screenshot 2024-09-19 at 13 47 52"
src="https://github.com/user-attachments/assets/847f3d6e-95a1-491c-aa3e-7d54da7df98a">

### 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 <[email protected]>
(cherry picked from commit 052187c)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Sep 19, 2024
…Integration &gt; Assets tab (#193105) (#193485)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[ML][Fleet] Adds link to anomaly detection configurations from
Integration &gt; Assets tab
(#193105)](#193105)

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

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

<!--BACKPORT [{"author":{"name":"Melissa
Alvarez","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-09-19T20:40:44Z","message":"[ML][Fleet]
Adds link to anomaly detection configurations from Integration > Assets
tab (#193105)\n\n## Summary\r\n\r\nRelated issue:
#182199 PR
adds a link to `ML > Anomaly Detection > Supplied\r\nConfigurations`
from `Integration > Assets tab` for 'ML Modules' assets.\r\n\r\nThe
naming of the asset is also updated in Fleet to be consistent
with\r\nthe ML UI.\r\n\r\n<img width=\"429\" alt=\"Screenshot 2024-09-19
at 13 46
47\"\r\nsrc=\"https://github.com/user-attachments/assets/9fcc3606-cc08-483f-88b4-00c07de3fc57\">\r\n\r\n<img
width=\"717\" alt=\"Screenshot 2024-09-19 at 13 47
52\"\r\nsrc=\"https://github.com/user-attachments/assets/847f3d6e-95a1-491c-aa3e-7d54da7df98a\">\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
<[email protected]>","sha":"052187ce180f0cbcb062486f36a562495f840bef","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:enhancement",":ml","Team:Fleet","v9.0.0","backport:prev-minor","v8.16.0"],"title":"[ML][Fleet]
Adds link to anomaly detection configurations from Integration > Assets
tab","number":193105,"url":"https://github.com/elastic/kibana/pull/193105","mergeCommit":{"message":"[ML][Fleet]
Adds link to anomaly detection configurations from Integration > Assets
tab (#193105)\n\n## Summary\r\n\r\nRelated issue:
#182199 PR
adds a link to `ML > Anomaly Detection > Supplied\r\nConfigurations`
from `Integration > Assets tab` for 'ML Modules' assets.\r\n\r\nThe
naming of the asset is also updated in Fleet to be consistent
with\r\nthe ML UI.\r\n\r\n<img width=\"429\" alt=\"Screenshot 2024-09-19
at 13 46
47\"\r\nsrc=\"https://github.com/user-attachments/assets/9fcc3606-cc08-483f-88b4-00c07de3fc57\">\r\n\r\n<img
width=\"717\" alt=\"Screenshot 2024-09-19 at 13 47
52\"\r\nsrc=\"https://github.com/user-attachments/assets/847f3d6e-95a1-491c-aa3e-7d54da7df98a\">\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
<[email protected]>","sha":"052187ce180f0cbcb062486f36a562495f840bef"}},"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/193105","number":193105,"mergeCommit":{"message":"[ML][Fleet]
Adds link to anomaly detection configurations from Integration > Assets
tab (#193105)\n\n## Summary\r\n\r\nRelated issue:
#182199 PR
adds a link to `ML > Anomaly Detection > Supplied\r\nConfigurations`
from `Integration > Assets tab` for 'ML Modules' assets.\r\n\r\nThe
naming of the asset is also updated in Fleet to be consistent
with\r\nthe ML UI.\r\n\r\n<img width=\"429\" alt=\"Screenshot 2024-09-19
at 13 46
47\"\r\nsrc=\"https://github.com/user-attachments/assets/9fcc3606-cc08-483f-88b4-00c07de3fc57\">\r\n\r\n<img
width=\"717\" alt=\"Screenshot 2024-09-19 at 13 47
52\"\r\nsrc=\"https://github.com/user-attachments/assets/847f3d6e-95a1-491c-aa3e-7d54da7df98a\">\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
<[email protected]>","sha":"052187ce180f0cbcb062486f36a562495f840bef"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Melissa Alvarez <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) :ml release_note:enhancement Team:Fleet Team label for Observability Data Collection Fleet team v8.16.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants