OpenSearch-Dashboards icon indicating copy to clipboard operation
OpenSearch-Dashboards copied to clipboard

[workspace] fix default data source not set when re-associating after deletion

Open Qxisylolo opened this issue 5 months ago • 1 comments
trafficstars

Description

This pr fixes default data source not set when re-associating after deletion In this implementation, if a default data source is not set, automatically set the first selected data source as default.

To reproduce

  1. deletes all existing data sources.
  2. Then, re-associates a data source.

Screenshot

before: https://github.com/user-attachments/assets/77ca648e-f2be-42d4-8683-337312cf6ddf

after: https://github.com/user-attachments/assets/560fd387-0f9c-4050-969a-14c81e987575

Testing the changes

Changelog

  • fix: fix default data source not set when re-associating after deletion

Check List

  • [ ] All tests pass
    • [ ] yarn test:jest
    • [ ] yarn test:jest_integration
  • [ ] New functionality includes testing.
  • [ ] New functionality has been documented.
  • [ ] Update CHANGELOG.md
  • [ ] Commits are signed per the DCO using --signoff

Qxisylolo avatar May 21 '25 10:05 Qxisylolo