CloudWatch: Fix cachedQueries insights not being updated for metric queries (#65495)

This commit is contained in:
Kevin Yu
2023-04-03 06:31:14 -07:00
committed by GitHub
parent a18ea77aac
commit 96453c6e69
5 changed files with 16 additions and 13 deletions

View File

@@ -117,12 +117,12 @@ export class CloudWatchMetricsQueryRunner extends CloudWatchRequest {
performTimeSeriesQuery(request: MetricRequest, { from, to }: TimeRange): Observable<DataQueryResponse> {
return this.awsRequest(this.dsQueryEndpoint, request).pipe(
map((res) => {
const dataframes: DataFrame[] = toDataQueryResponse({ data: res }).data;
const dataframes: DataFrame[] = toDataQueryResponse(res).data;
if (!dataframes || dataframes.length <= 0) {
return { data: [] };
}
const lastError = findLast(res.results, (v) => !!v.error);
const lastError = findLast(res.data.results, (v) => !!v.error);
dataframes.forEach((frame) => {
frame.fields.forEach((field) => {