Plugins: Fix bug with copying grafanaData (#64446)
This commit is contained in:
@@ -424,10 +424,11 @@ 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"] = make(map[string]interface{})
|
||||
deepJsonDataCopy := make(map[string]interface{}, len(opts.CustomOptions))
|
||||
for k, v := range opts.CustomOptions {
|
||||
opts.CustomOptions[k] = v
|
||||
deepJsonDataCopy[k] = v
|
||||
}
|
||||
opts.CustomOptions["grafanaData"] = deepJsonDataCopy
|
||||
}
|
||||
if ds.BasicAuth {
|
||||
password, err := s.DecryptedBasicAuthPassword(ctx, ds)
|
||||
|
||||
Reference in New Issue
Block a user