From 3b718a3e8f971908b3465beda6e0f135753e95f3 Mon Sep 17 00:00:00 2001 From: Stephanie Hingtgen Date: Thu, 19 Jan 2023 09:49:45 -0600 Subject: [PATCH] Plugins: enable the plugin sdk to get the json data for all datasources (#61729) --- 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 6d91b515e47..39fa0f3c0d3 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)