[v9.3.x] Plugins: enable the plugin sdk to get the json data for all datasources (#61792)

Plugins: enable the plugin sdk to get the json data for all datasources (#61729)

(cherry picked from commit 3b718a3e8f)

Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>
This commit is contained in:
Grot (@grafanabot)
2023-01-19 16:03:12 +00:00
committed by GitHub
co-authored by Stephanie Hingtgen
parent 727470dee3
commit f485d0a1df
@@ -416,6 +416,8 @@ func (s *Service) httpClientOptions(ctx context.Context, ds *datasources.DataSou
if ds.JsonData != nil {
opts.CustomOptions = ds.JsonData.MustMap()
// allow the plugin sdk to get the json data in JSONDataFromHTTPClientOptions
opts.CustomOptions["grafanaData"] = ds.JsonData.MustMap()
}
if ds.BasicAuth {
password, err := s.DecryptedBasicAuthPassword(ctx, ds)