@@ -180,7 +180,6 @@ func (d *CloudLoggingDatasource) QueryData(ctx context.Context, req *backend.Que
180180type queryModel struct {
181181 QueryText string `json:"queryText"`
182182 ProjectID string `json:"projectId"`
183- Hide bool `json:"hide"`
184183}
185184
186185func (d * CloudLoggingDatasource ) query (ctx context.Context , pCtx backend.PluginContext , query backend.DataQuery ) backend.DataResponse {
@@ -192,11 +191,6 @@ func (d *CloudLoggingDatasource) query(ctx context.Context, pCtx backend.PluginC
192191 return response
193192 }
194193
195- // Don't query if query should be hidden
196- if q .Hide {
197- return response
198- }
199-
200194 clientRequest := cloudlogging.Query {
201195 ProjectID : q .ProjectID ,
202196 Filter : q .QueryText ,
@@ -260,28 +254,7 @@ func (d *CloudLoggingDatasource) CheckHealth(ctx context.Context, req *backend.C
260254 return nil , fmt .Errorf ("unmarshal: %w" , err )
261255 }
262256
263- privateKey , ok := settings .DecryptedSecureJSONData [privateKeyKey ]
264- if ! ok || privateKey == "" {
265- return nil , errMissingCredentials
266- }
267-
268- serviceAccount , err := conf .toServiceAccountJSON (privateKey )
269- if err != nil {
270- return nil , fmt .Errorf ("create credentials: %w" , err )
271- }
272-
273- client , err := cloudlogging .NewClient (ctx , serviceAccount , conf .Endpoint )
274- if err != nil {
275- return nil , err
276- }
277-
278- defer func () {
279- if err := client .Close (); err != nil {
280- log .DefaultLogger .Warn ("failed closing client" , "error" , err )
281- }
282- }()
283-
284- if err := client .TestConnection (ctx , conf .DefaultProject ); err != nil {
257+ if err := d .client .TestConnection (ctx , conf .DefaultProject ); err != nil {
285258 return & backend.CheckHealthResult {
286259 Status : backend .HealthStatusError ,
287260 Message : fmt .Sprintf ("failed to run test query: %s" , err ),
0 commit comments