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] Anomaly Detection: Add ability to insert "Single Metric Viewer" into a dashboard #173555

Closed
4 of 22 tasks
alvarezmelissa87 opened this issue Dec 18, 2023 · 2 comments
Closed
4 of 22 tasks
Assignees
Labels
Feature:Anomaly Detection ML anomaly detection :ml release_note:feature Makes this part of the condensed release notes v8.13.0

Comments

@alvarezmelissa87
Copy link
Contributor

alvarezmelissa87 commented Dec 18, 2023

Describe the feature:

Update the single metric viewer so it can be used as an embeddable and added to dashboards.(https://github.com/elastic/enhancements/issues/20331)

Main Tasks:

  • add single metric viewer from dashboard ([ML] Anomaly Detection: Adds single metric viewer embeddable for dashboards #175857)
  • In dashboard SMV should have:
    • ability to use slider
    • see annotations in chart/remove annotations from chart
    • see model bounds (when available) in chart/remove model bounds from chart
    • ability to forecast
    • 'Open in Single metric viewer' action
    • 'Edit' action
  • add single metric viewer to dashboard from ML plugin single metric viewer page

Maintenance Tasks:

  • wrap required services/utilities in providers and remove reliance on dependency_cache
    • Migrate to new services/providers
    • Remove duplicates
      • ml/public/application/services/forecast_service_provider.ts should replace ml/public/application/services/forecast_service.js
      • ml/public/application/timeseriesexplorer/timeseriesexplorer_utils/time_series_search_service.ts should replace ml/public/application/timeseriesexplorer/timeseries_search_service.ts
      • ml/public/application/util/index_service.ts is a partial duplicate of ml/public/application/util/index_utils.ts - it needs to be completed and then replace the original utils file
      • ml/public/application/util/time_buckets_service.ts should replace ml/public/application/util/time_buckets.js
      • ml/public/application/util/time_series_explorer_service.ts is a partial duplicate of ml/public/application/timeseriesexplorer/timeseriesexplorer_utils/timeseriesexplorer_utils.js - it needs to be completed and then replace the original file
  • Add correct types

Follow ups:

  • Add single metric viewer embeddable to dashboard from ML > Anomaly Detection > Single metric viewer
  • Add single metric viewer embeddable to a Case from ML > Anomaly Detection > Single metric viewer
  • Add action (for Dashboard, not Cases) to apply filter from the embeddable to the page
  • Add telemetry to count number of SMV embeddables added to Dashboards

Describe a specific use case for the feature:

@alvarezmelissa87 alvarezmelissa87 added :ml Feature:Anomaly Detection ML anomaly detection release_note:feature Makes this part of the condensed release notes v8.13.0 labels Dec 18, 2023
@alvarezmelissa87 alvarezmelissa87 self-assigned this Dec 18, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

alvarezmelissa87 added a commit that referenced this issue Feb 8, 2024
…oards (#175857)

## Summary

Related issue to [add ability to insert "Single Metric Viewer" into a
dashboard](#173555)

This PR adds the single metric viewer as an embeddable that can be added
to dashboards.

### NOTE FOR TESTING:

This PR relies on the SMV fix for 'metric' jobs
#176354
If that fix has not been merged, you will need to find
`getAnomalyRecordsSchema` definition and add `functionDescription:
schema.maybe(schema.nullable(schema.string())),` to it for local
testing.

### Screenshots of feature

<img width="698" alt="image"
src="https://github.com/elastic/kibana/assets/6446462/425e701a-3c9d-4a82-bf2e-1db5b3689165">

<img width="1193" alt="image"
src="https://github.com/elastic/kibana/assets/6446462/e941ec1c-14f6-4723-b80c-71124f617dc9">

<img width="1209" alt="image"
src="https://github.com/elastic/kibana/assets/6446462/dddd1dde-844c-47ae-ba94-61de5301746f">

<img width="1214" alt="image"
src="https://github.com/elastic/kibana/assets/6446462/39439b4f-d296-4f3d-bdc9-4922553af6fa">


### 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>
@alvarezmelissa87
Copy link
Contributor Author

Closed via #175857 and moved over remaining tasks to #176651

CoenWarmer pushed a commit to CoenWarmer/kibana that referenced this issue Feb 15, 2024
…oards (elastic#175857)

## Summary

Related issue to [add ability to insert "Single Metric Viewer" into a
dashboard](elastic#173555)

This PR adds the single metric viewer as an embeddable that can be added
to dashboards.

### NOTE FOR TESTING:

This PR relies on the SMV fix for 'metric' jobs
elastic#176354
If that fix has not been merged, you will need to find
`getAnomalyRecordsSchema` definition and add `functionDescription:
schema.maybe(schema.nullable(schema.string())),` to it for local
testing.

### Screenshots of feature

<img width="698" alt="image"
src="https://github.com/elastic/kibana/assets/6446462/425e701a-3c9d-4a82-bf2e-1db5b3689165">

<img width="1193" alt="image"
src="https://github.com/elastic/kibana/assets/6446462/e941ec1c-14f6-4723-b80c-71124f617dc9">

<img width="1209" alt="image"
src="https://github.com/elastic/kibana/assets/6446462/dddd1dde-844c-47ae-ba94-61de5301746f">

<img width="1214" alt="image"
src="https://github.com/elastic/kibana/assets/6446462/39439b4f-d296-4f3d-bdc9-4922553af6fa">


### 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>
fkanout pushed a commit to fkanout/kibana that referenced this issue Mar 4, 2024
…oards (elastic#175857)

## Summary

Related issue to [add ability to insert "Single Metric Viewer" into a
dashboard](elastic#173555)

This PR adds the single metric viewer as an embeddable that can be added
to dashboards.

### NOTE FOR TESTING:

This PR relies on the SMV fix for 'metric' jobs
elastic#176354
If that fix has not been merged, you will need to find
`getAnomalyRecordsSchema` definition and add `functionDescription:
schema.maybe(schema.nullable(schema.string())),` to it for local
testing.

### Screenshots of feature

<img width="698" alt="image"
src="https://github.com/elastic/kibana/assets/6446462/425e701a-3c9d-4a82-bf2e-1db5b3689165">

<img width="1193" alt="image"
src="https://github.com/elastic/kibana/assets/6446462/e941ec1c-14f6-4723-b80c-71124f617dc9">

<img width="1209" alt="image"
src="https://github.com/elastic/kibana/assets/6446462/dddd1dde-844c-47ae-ba94-61de5301746f">

<img width="1214" alt="image"
src="https://github.com/elastic/kibana/assets/6446462/39439b4f-d296-4f3d-bdc9-4922553af6fa">


### 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Anomaly Detection ML anomaly detection :ml release_note:feature Makes this part of the condensed release notes v8.13.0
Projects
None yet
Development

No branches or pull requests

2 participants