From f485d0a1dfd329691e3d324ebbe1131a594d246c Mon Sep 17 00:00:00 2001 From: "Grot (@grafanabot)" <43478413+grafanabot@users.noreply.github.com> Date: Thu, 19 Jan 2023 16:03:12 +0000 Subject: [PATCH] [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 3b718a3e8f971908b3465beda6e0f135753e95f3) Co-authored-by: Stephanie Hingtgen --- pkg/services/datasources/service/datasource.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/services/datasources/service/datasource.go b/pkg/services/datasources/service/datasource.go index 3b4bb78e01e..598dfadb474 100644 --- a/pkg/services/datasources/service/datasource.go +++ b/pkg/services/datasources/service/datasource.go @@ -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)