[BUG] Data source reference is removed when adding sample data #6850
Description
Describe the bug
In add sample data page when data source feature is turned on, the data source is added as reference to the index pattern. However, the behavior is lost due to https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6105/files#diff-fcdd5446e0a0ea3950cf54e2c6b9fee8011c5429016a8992380c62339e4d051fL63
To Reproduce
Steps to reproduce the behavior:
- Turn on data source
- Go to add sample data
- select a data source from picker.
- click on import
- go to dashboard management, then index pattern, and the data source connection is lost
Expected behavior
Data source should be the reference of the index pattern
OpenSearch Version
Please list the version of OpenSearch being used.
Dashboards Version
Please list the version of OpenSearch Dashboards being used.
Plugins
Please list all plugins currently enabled.
Screenshots
If applicable, add screenshots to help explain your problem.
Host/Environment (please complete the following information):
- OS: [e.g. iOS]
- Browser and version [e.g. 22]
Additional context
Add any other context about the problem here.