diff --git a/public/app/plugins/datasource/cloudwatch/annotationSupport.ts b/public/app/plugins/datasource/cloudwatch/annotationSupport.ts index bf3659a020a..4c1d91746bd 100644 --- a/public/app/plugins/datasource/cloudwatch/annotationSupport.ts +++ b/public/app/plugins/datasource/cloudwatch/annotationSupport.ts @@ -38,18 +38,9 @@ export const CloudWatchAnnotationSupport = { return undefined; } - const { - prefixMatching, - actionPrefix, - alarmNamePrefix, - statistic, - namespace, - metricName, - dimensions = {}, - } = anno.target; + const { prefixMatching, actionPrefix, alarmNamePrefix, statistic, namespace, metricName } = anno.target; const validPrefixMatchingQuery = !!prefixMatching && !!actionPrefix && !!alarmNamePrefix; - const validMetricStatQuery = - !prefixMatching && !!namespace && !!metricName && !!statistic && !!Object.values(dimensions).length; + const validMetricStatQuery = !prefixMatching && !!namespace && !!metricName && !!statistic; if (validPrefixMatchingQuery || validMetricStatQuery) { return anno.target;