elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.63k stars 8.22k forks source link

[ML] Single Metric Viewer embeddable: error when creating job rule from anomaly click actions #183451

Closed alvarezmelissa87 closed 5 months ago

alvarezmelissa87 commented 6 months ago

Seen in 8.14 and latest main.

Describe the bug:

When using the 'Configure job rules' action from the click action menu (when clicking on an anomaly in the single metric viewer panel in dashboards) and trying to save changes there is an error toast and the save cannot be made.

NOTE: This functionality works as expected when the panel is first created - the create flow loads all the necessary services. This bug is is seen when an SMV panel already exists when they navigate to dashboards and they attempt the action.

image

Steps to reproduce:

  1. Create an anomaly detection job
  2. Navigate to Dashboards and click Edit > Add panel > Machine Learning > Single metric viewer and select your job and config
  3. Once the panel is added and the dashboard saved, close the browser tab and open a new one.
  4. In the fresh tab - navigate to the dashboard with the SMV panel and click on an anomaly so the menu shows up.
  5. Click on 'Configure job rules' and make a change in the flyout and attempt to save
  6. See the error toast pop up

Expected behavior: The save should happen and no error toast should appear

Screenshots (if relevant):

image
elasticmachine commented 6 months ago

Pinging @elastic/ml-ui (:ml)