Cloudwatch: Remove unused parameters (#45237)

* Remove unused parameters

* Remove unused context

* Make plugin context first parameter
This commit is contained in:
Shirley
2022-02-10 17:15:11 +01:00
committed by GitHub
parent 642f0a250d
commit 89a0c0fc37
6 changed files with 56 additions and 61 deletions
+2 -3
View File
@@ -1,7 +1,6 @@
package cloudwatch
import (
"context"
"errors"
"time"
@@ -13,7 +12,7 @@ import (
"github.com/grafana/grafana/pkg/util/errutil"
)
func (e *cloudWatchExecutor) executeAnnotationQuery(ctx context.Context, model *simplejson.Json, query backend.DataQuery, pluginCtx backend.PluginContext) (*backend.QueryDataResponse, error) {
func (e *cloudWatchExecutor) executeAnnotationQuery(pluginCtx backend.PluginContext, model *simplejson.Json, query backend.DataQuery) (*backend.QueryDataResponse, error) {
result := backend.NewQueryDataResponse()
usePrefixMatch := model.Get("prefixMatching").MustBool(false)
@@ -29,7 +28,7 @@ func (e *cloudWatchExecutor) executeAnnotationQuery(ctx context.Context, model *
actionPrefix := model.Get("actionPrefix").MustString("")
alarmNamePrefix := model.Get("alarmNamePrefix").MustString("")
cli, err := e.getCWClient(region, pluginCtx)
cli, err := e.getCWClient(pluginCtx, region)
if err != nil {
return nil, err
}