opensearch-project / OpenSearch-Dashboards

📊 Open source visualization dashboards for OpenSearch.
https://opensearch.org/docs/latest/dashboards/index/
Apache License 2.0
1.69k stars 893 forks source link

[Docs] Document SampleDataRegistry to add sample saved objects from plugins #3244

Open VijayanB opened 1 year ago

VijayanB commented 1 year ago

Is your feature request related to a problem? Please describe.

Plugins can extend or add new saved objects that are part of sample data.

Describe the solution you'd like

Maps ( dashboards-maps) would like to add additional saved objects of type maps, whenever sample data is added to dashboards. This will help Maps users to experiment Maps with sample data set .

Describe alternatives you've considered

N/A

Additional context

It will be great if plugins could also contribute new sample data and saved objects.

ashwin-pc commented 1 year ago

@VijayanB I think you can already do this using the SampleDataRegistry service exposed by the home plugin. I personally haven't used it, but its api exposes exactly what you need. e.g. addSavedObjectsToSampleDataset or if you want to add a new same dataset all together, you can simply use the registerSampleDataset api

joshuarrrr commented 1 year ago

For some additional context, you may also be interested in reviewing https://github.com/opensearch-project/OpenSearch-Dashboards/issues/1747 and https://github.com/opensearch-project/OpenSearch-Dashboards/issues/1869. But we'd love to have an example of sample data integration for other plugin authors to reference, so please link any issue you have to track this work on the mapping side.

joshuarrrr commented 1 year ago

I also added the needs-documentation label as a reminder that having a service or API is a great start, but it's not that useful if it lacks usage docs.

ashwin-pc commented 1 year ago

Renaming the issue title since the feature already exists