From b82c013c5fdf4f1e99850a11f9d750fd09e8258f Mon Sep 17 00:00:00 2001 From: "grafana-delivery-bot[bot]" <132647405+grafana-delivery-bot[bot]@users.noreply.github.com> Date: Mon, 11 Dec 2023 09:45:48 +0100 Subject: [PATCH] [v10.2.x] Revert "Panel: omit query API call when the panel is a row (#75847)" (#79293) Revert "Panel: omit query API call when the panel is a row (#75847)" (#78475) (cherry picked from commit cbb607b36f026349fe989d37ff2b0f7055ae6f5b) Co-authored-by: Juan Cabanas --- public/app/features/dashboard/state/PanelModel.test.ts | 9 --------- public/app/features/dashboard/state/PanelModel.ts | 4 ---- 2 files changed, 13 deletions(-) diff --git a/public/app/features/dashboard/state/PanelModel.test.ts b/public/app/features/dashboard/state/PanelModel.test.ts index 1848b0f43bf..22612a0951a 100644 --- a/public/app/features/dashboard/state/PanelModel.test.ts +++ b/public/app/features/dashboard/state/PanelModel.test.ts @@ -590,15 +590,6 @@ describe('PanelModel', () => { expect(model.getQueryRunner).toBeCalled(); }); - it('when called then it should not call all pending queries if the panel is a row', () => { - model.getQueryRunner = jest.fn().mockReturnValue({ - run: jest.fn(), - }); - model.type = 'row'; - model.runAllPanelQueries({}); - - expect(model.getQueryRunner).not.toBeCalled(); - }); }); }); }); diff --git a/public/app/features/dashboard/state/PanelModel.ts b/public/app/features/dashboard/state/PanelModel.ts index 6fb41e402fb..806190fbda8 100644 --- a/public/app/features/dashboard/state/PanelModel.ts +++ b/public/app/features/dashboard/state/PanelModel.ts @@ -362,10 +362,6 @@ export class PanelModel implements DataConfigSource, IPanelModel { } runAllPanelQueries({ dashboardUID, dashboardTimezone, timeData, width }: RunPanelQueryOptions) { - if (this.type === 'row') { - return; - } - this.getQueryRunner().run({ datasource: this.datasource, queries: this.targets,