elastic / kibana

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

[Rules] Check interval input box on Create ML anomaly detection errors out if user deletes interval input to enter a manual interval #190732

Closed bhavyarm closed 1 month ago

bhavyarm commented 2 months ago

Kibana version: 8.15.0

Browser version: chrome latest

Original install method (e.g. download page, yum, from source, etc.): from elastic.co on cloud

Describe the bug: If user deletes the interval in "Check every" input box to manually enter the input on "Create ML anomaly detection" Kibana errors out on the panel with Error: Cannot read properties of null (reading 'asSeconds')

Steps to reproduce:

  1. Click on rule management->create->pick anomaly detection->select a pre-existing ML job
  2. In this panel, delete 1 in "Check every"
  3. Kibana displays error in the panel
    
    Error

Error: Cannot read properties of null (reading 'asSeconds') at https://ml.kb.us-west2.gcp.elastic-cloud.com/f5dc24d1969f/bundles/plugin/ml/1.0.0/ml.chunk.14.js:3:17495 at la (https://ml.kb.us-west2.gcp.elastic-cloud.com/f5dc24d1969f/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:425:59279) at Za (https://ml.kb.us-west2.gcp.elastic-cloud.com/f5dc24d1969f/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:425:69022) at Xa (https://ml.kb.us-west2.gcp.elastic-cloud.com/f5dc24d1969f/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:425:68341) at ec (https://ml.kb.us-west2.gcp.elastic-cloud.com/f5dc24d1969f/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:425:118584) at Pc (https://ml.kb.us-west2.gcp.elastic-cloud.com/f5dc24d1969f/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:425:99978) at Nc (https://ml.kb.us-west2.gcp.elastic-cloud.com/f5dc24d1969f/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:425:99800) at Dc (https://ml.kb.us-west2.gcp.elastic-cloud.com/f5dc24d1969f/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:425:99633) at wc (https://ml.kb.us-west2.gcp.elastic-cloud.com/f5dc24d1969f/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:425:96466) at https://ml.kb.us-west2.gcp.elastic-cloud.com/f5dc24d1969f/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:425:45201

<img width="1728" alt="Screenshot 2024-08-19 at 2 41 11 PM" src="https://github.com/user-attachments/assets/9a4077bf-a136-4d3f-84ad-f32b51691629">

Browser error:

core.entry.js:1 TypeError: Cannot read properties of null (reading 'asSeconds') at ml.chunk.14.js:3:17495 at la (kbn-ui-shared-deps-npm.dll.js:425:59279) at Za (kbn-ui-shared-deps-npm.dll.js:425:69022) at Xa (kbn-ui-shared-deps-npm.dll.js:425:68341) at ec (kbn-ui-shared-deps-npm.dll.js:425:118584) at Pc (kbn-ui-shared-deps-npm.dll.js:425:99978) at Nc (kbn-ui-shared-deps-npm.dll.js:425:99800) at Dc (kbn-ui-shared-deps-npm.dll.js:425:99633) at wc (kbn-ui-shared-deps-npm.dll.js:425:96466) at kbn-ui-shared-deps-npm.dll.js:425:45201 Et @ core.entry.js:1Understand this error

elasticmachine commented 2 months ago

Pinging @elastic/response-ops (Team:ResponseOps)

elasticmachine commented 2 months ago

Pinging @elastic/ml-ui (:ml)