PublicDashboards: Query order bug fixed (#73293)

This commit is contained in:
Juan Cabanas 2023-08-15 14:47:56 -03:00 committed by GitHub
parent d7574a9a74
commit c9ed2c80b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -90,8 +90,6 @@ export class PublicDashboardDataSource extends DataSourceApi<DataQuery, DataSour
queryCachingTTL, queryCachingTTL,
range: { from: fromRange, to: toRange }, range: { from: fromRange, to: toRange },
} = request; } = request;
let queries: DataQuery[];
// Return early if no queries exist // Return early if no queries exist
if (!request.targets.length) { if (!request.targets.length) {
return of({ data: [] }); return of({ data: [] });
@ -129,7 +127,7 @@ export class PublicDashboardDataSource extends DataSourceApi<DataQuery, DataSour
}) })
.pipe( .pipe(
switchMap((raw) => { switchMap((raw) => {
return of(toDataQueryResponse(raw, queries)); return of(toDataQueryResponse(raw, request.targets));
}), }),
catchError((err) => { catchError((err) => {
return of(toDataQueryResponse(err)); return of(toDataQueryResponse(err));