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: Single Metric Viewer embeddable enhancements #187483

Closed
4 of 6 tasks
peteharverson opened this issue Jul 3, 2024 · 2 comments
Closed
4 of 6 tasks
Assignees

Comments

@peteharverson
Copy link
Contributor

peteharverson commented Jul 3, 2024

Describe the feature:

Follow up to #181272.

Enhancements:

Maintenance tasks:

  • right now timeseriesexlorer.js and timeseriesexplorer_embeddable_chart.js are near duplicates of each other (with the latter having less functionality)
    • would be good to start pulling out reusable components and functionality to avoid further duplication
  • wrap required services/utilities in providers and remove reliance on dependency_cache
  • Migrate to new services/providers

Tests:

  • Functional Tests for the click on anomaly markers in embeddables
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

alvarezmelissa87 added a commit that referenced this issue Jul 30, 2024
## Summary

Related meta issue: #187483

This PR adds the ability to forecast to the SMV embeddable in
dashboards.

<img width="1058" alt="image"
src="https://github.com/user-attachments/assets/79fe38f6-3210-4cfe-b70b-7517150fd3e9">

<img width="1124" alt="image"
src="https://github.com/user-attachments/assets/ad7c0dd3-1c07-49e6-bac2-4d683315baba">

## Current tasks:
- [x] Ensure forecast is persisted when going from ML SMV to cases
- [x] Ensure forecast is persisted when going from ML SMV add to
dashboard action
- [x] Ensure the dashboard 'Save' button is enabled and unsaved changes
are recognized when changing forecast id selection
- Follow up: add clearing action for selected forecast 

### 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]>
Co-authored-by: kibanamachine <[email protected]>
alvarezmelissa87 added a commit that referenced this issue Nov 18, 2024
…ly filter from the embeddable to the page (#198869)

## Summary

Related meta issue: #187483

This PR adds the ability to add a filter and a negate filter to a
dashboard via plus and minus icons in the SMV embeddable panel.
This PR also updates the behavior of the anomaly charts panel in
dashboards so that the minus icon works as a negate filter instead of
removing the filter. This behavior is consistent with other plus/minus
icons next to values in dashboard panels.

In dashboard:

<img width="1217" alt="Screenshot 2024-11-11 at 09 54 41"
src="https://github.com/user-attachments/assets/a8e12ce8-3794-4ddc-93da-e3d0bf139df7">


With a by and partition field:
<img width="1214" alt="Screenshot 2024-11-11 at 09 59 09"
src="https://github.com/user-attachments/assets/3b508a64-8bb1-4d89-89b2-9b8d195d1cbe">


In cases:

<img width="1555" alt="Screenshot 2024-11-11 at 10 00 41"
src="https://github.com/user-attachments/assets/1d1ac6d7-29c8-4e84-a758-3dfc293d58fe">


Anomaly Charts in explorer:


![image](https://github.com/user-attachments/assets/6e738171-5f1a-46c2-bd34-2c8581f2a3e3)

Anomaly charts in dashboard:


![image](https://github.com/user-attachments/assets/5011b44c-0a33-42a2-a869-413d4fffe4ad)



### 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]>
Co-authored-by: kibanamachine <[email protected]>
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Nov 18, 2024
…ly filter from the embeddable to the page (elastic#198869)

## Summary

Related meta issue: elastic#187483

This PR adds the ability to add a filter and a negate filter to a
dashboard via plus and minus icons in the SMV embeddable panel.
This PR also updates the behavior of the anomaly charts panel in
dashboards so that the minus icon works as a negate filter instead of
removing the filter. This behavior is consistent with other plus/minus
icons next to values in dashboard panels.

In dashboard:

<img width="1217" alt="Screenshot 2024-11-11 at 09 54 41"
src="https://github.com/user-attachments/assets/a8e12ce8-3794-4ddc-93da-e3d0bf139df7">

With a by and partition field:
<img width="1214" alt="Screenshot 2024-11-11 at 09 59 09"
src="https://github.com/user-attachments/assets/3b508a64-8bb1-4d89-89b2-9b8d195d1cbe">

In cases:

<img width="1555" alt="Screenshot 2024-11-11 at 10 00 41"
src="https://github.com/user-attachments/assets/1d1ac6d7-29c8-4e84-a758-3dfc293d58fe">

Anomaly Charts in explorer:

![image](https://github.com/user-attachments/assets/6e738171-5f1a-46c2-bd34-2c8581f2a3e3)

Anomaly charts in dashboard:

![image](https://github.com/user-attachments/assets/5011b44c-0a33-42a2-a869-413d4fffe4ad)

### 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]>
Co-authored-by: kibanamachine <[email protected]>
(cherry picked from commit f876540)
@alvarezmelissa87
Copy link
Contributor

Closing and moving final items to #201020

CAWilson94 pushed a commit to CAWilson94/kibana that referenced this issue Dec 12, 2024
…ly filter from the embeddable to the page (elastic#198869)

## Summary

Related meta issue: elastic#187483

This PR adds the ability to add a filter and a negate filter to a
dashboard via plus and minus icons in the SMV embeddable panel.
This PR also updates the behavior of the anomaly charts panel in
dashboards so that the minus icon works as a negate filter instead of
removing the filter. This behavior is consistent with other plus/minus
icons next to values in dashboard panels.

In dashboard:

<img width="1217" alt="Screenshot 2024-11-11 at 09 54 41"
src="https://github.com/user-attachments/assets/a8e12ce8-3794-4ddc-93da-e3d0bf139df7">


With a by and partition field:
<img width="1214" alt="Screenshot 2024-11-11 at 09 59 09"
src="https://github.com/user-attachments/assets/3b508a64-8bb1-4d89-89b2-9b8d195d1cbe">


In cases:

<img width="1555" alt="Screenshot 2024-11-11 at 10 00 41"
src="https://github.com/user-attachments/assets/1d1ac6d7-29c8-4e84-a758-3dfc293d58fe">


Anomaly Charts in explorer:


![image](https://github.com/user-attachments/assets/6e738171-5f1a-46c2-bd34-2c8581f2a3e3)

Anomaly charts in dashboard:


![image](https://github.com/user-attachments/assets/5011b44c-0a33-42a2-a869-413d4fffe4ad)



### 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]>
Co-authored-by: kibanamachine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants