opensearch-project / anomaly-detection-dashboards-plugin

Manage your detectors and identify atypical data in OpenSearch Dashboards
https://opensearch.org/docs/latest/monitoring-plugins/ad/index/
Apache License 2.0
30 stars 58 forks source link

Anomaly by index and detector overview page should link to the anomaly detector that detected the anomaly #151

Open prpaluch opened 2 years ago

prpaluch commented 2 years ago

Is your feature request related to a problem? Please describe. If an anomaly detector detected an anomaly, this is shown under Anomaly detection Dashboards as a big yellow circle with index name in the middle and on the bottom with the detector name. If you click on it nothing happens.

Describe the solution you'd like If you hover over the yellow circle it changes its color, but why is it not linked to detector, customer is interested in the results of the detector, the next thing he would do is to click in the links of the detector of the upper right corner?. Wouldn't it be useful to direct click on the yellow circle and redirected to the anomaly detector overview?

Describe alternatives you've considered Click on the detector on the right hand side.

Additional context Add any other context or screenshots about the feature request here.

ohltyler commented 2 years ago

@prpaluch thank you! This is a great suggestion. I've done some digging into the sunburst chart and I believe it should support functionality to redirect to the detector details page if a user clicks on the detector name in the chart directly.

Putting some details about the investigation here:

  1. Adding <Settings onElementClick={(d: Datum) => <functionality to link to detector>} /> as a top-level component in the <Chart> in public/pages/Dashboard/Components/AnomaliesDistribution.tsx
  2. The Datum will only contain the detector name; the detector ID (which is needed to construct the detector details URL) can be mapped using the anomalyDistribution obj in AnomaliesDistribution, which contains mappings from detector name to ID.