Skip to content

Fix monitor deep-link datasource menu initialization - #1413

Open
jackiehanyang wants to merge 1 commit into
opensearch-project:mainfrom
jackiehanyang:adPrometheus
Open

Fix monitor deep-link datasource menu initialization#1413
jackiehanyang wants to merge 1 commit into
opensearch-project:mainfrom
jackiehanyang:adPrometheus

Conversation

@jackiehanyang

Copy link
Copy Markdown
Contributor

Summary

This PR fixes Alerting monitor deep-link initialization in datasource-enabled environments.

Related Issue

opensearch-project/OpenSearch-Dashboards#11439

What changed

  • Updated Main.js to always pass activeOption as an array to the datasource menu
  • Uses:
    • [] while datasource state is still loading
    • [{ id }] when a datasource is selected

Why

The monitor details deep link from Metrics can enter Alerting before datasource state is fully resolved. In that case, activeOption could be undefined, which is not the shape expected by the datasource menu and could break page initialization.

This keeps the Alerting-side fix minimal and localized to the deep-link boot path.

Testing

  • Verified View monitor link opens correctly from Metrics
  • Verified datasource-enabled monitor details page no longer boots into a blank state

Signed-off-by: Jackie <jkhanjob@gmail.com>
@lezzago

lezzago commented Apr 16, 2026

Copy link
Copy Markdown
Member

LGTM, but please add some unit tests for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants