Change the ConfigEditor to have a button to detect the version. Instead of having the version selected from a dropdown, we have a button to detect the version and set it. When the button is pushed, we can save the datasource, fetch the OpenSearch version, and re-save the datasource with that information. Note that the datasource needs to be saved first, so that the backend has the correct http address and credentials to send the request. We should still display the version in the editor
We should also change testDatasource to fail for ElasticSearch v7.10+ and v8.x and point the user toward the ElasticSearch datasource, and to default to a null version instead of OpenSearch 1.0.x, to make it clearer when it hasn't been set.
Change the ConfigEditor to have a button to detect the version. Instead of having the version selected from a dropdown, we have a button to detect the version and set it. When the button is pushed, we can save the datasource, fetch the OpenSearch version, and re-save the datasource with that information. Note that the datasource needs to be saved first, so that the backend has the correct http address and credentials to send the request. We should still display the version in the editor We should also change testDatasource to fail for ElasticSearch v7.10+ and v8.x and point the user toward the ElasticSearch datasource, and to default to a null version instead of OpenSearch 1.0.x, to make it clearer when it hasn't been set.