Elasticsearch and Cloudwatch: Replace deprecated experimental/errorsource (#97363)
* Update elasticsearch
* Update azure monitor
* Update test
* Revert "Update azure monitor"
This reverts commit 21b53845b8.
* Update cloudwatch
This commit is contained in:
@@ -16,7 +16,6 @@ import (
|
||||
|
||||
"github.com/grafana/grafana-plugin-sdk-go/backend"
|
||||
"github.com/grafana/grafana-plugin-sdk-go/backend/log"
|
||||
"github.com/grafana/grafana-plugin-sdk-go/experimental/errorsource"
|
||||
"github.com/grafana/grafana/pkg/tsdb/cloudwatch/kinds/dataquery"
|
||||
"github.com/grafana/grafana/pkg/tsdb/cloudwatch/utils"
|
||||
)
|
||||
@@ -311,7 +310,7 @@ func (q *CloudWatchQuery) migrateLegacyQuery(query metricsDataQuery) {
|
||||
func (q *CloudWatchQuery) validateAndSetDefaults(refId string, metricsDataQuery metricsDataQuery, startTime, endTime time.Time,
|
||||
defaultRegionValue string, crossAccountQueryingEnabled bool) error {
|
||||
if metricsDataQuery.Statistic == nil && metricsDataQuery.Statistics == nil {
|
||||
return errorsource.DownstreamError(fmt.Errorf("query must have either statistic or statistics field"), false)
|
||||
return backend.DownstreamError(fmt.Errorf("query must have either statistic or statistics field"))
|
||||
}
|
||||
|
||||
var err error
|
||||
|
||||
Reference in New Issue
Block a user