Commit c450ffd7 by Torkel Ödegaard Committed by GitHub

ImageRendering: Fix rendering panel using shared query in png, PDF reports and…

ImageRendering: Fix rendering panel using shared query in png, PDF reports and embedded scenarios  (#27628)

* ImageRendering: Fixed issue rendering panel using shared query

* Fixed spelling
parent 078eb3c7
import { e2e } from '@grafana/e2e';
e2e.scenario({
describeName: 'Solo Route',
itName: 'Can view panels with shared queries in fullsceen',
addScenarioDataSource: false,
addScenarioDashBoard: false,
skipScenario: false,
scenario: () => {
// open Panel Tests - Bar Gauge
e2e.pages.SoloPanel.visit('ZqZnVvFZz/datasource-tests-shared-queries?orgId=1&panelId=4');
e2e()
.get('canvas')
.should('have.length', 6);
},
});
......@@ -133,4 +133,7 @@ export const Pages = {
navBar: () => '.explore-toolbar',
},
},
SoloPanel: {
url: (page: string) => `/d-solo/${page}`,
},
};
......@@ -116,7 +116,6 @@ export class PanelModel implements DataConfigSource {
collapsed?: boolean;
panels?: any;
soloMode?: boolean;
targets: DataQuery[];
transformations?: DataTransformerConfig[];
datasource: string | null;
......@@ -142,6 +141,7 @@ export class PanelModel implements DataConfigSource {
isViewing: boolean;
isEditing: boolean;
isInView: boolean;
hasRefreshed: boolean;
events: Emitter;
cacheTimeout?: any;
......
......@@ -26,7 +26,6 @@ export function runSharedRequest(options: QueryRunnerOptions): Observable<PanelD
return undefined;
}
const currentPanel = dashboard.getPanelById(options.panelId)!;
const listenToPanel = dashboard.getPanelById(listenToPanelId);
if (!listenToPanel) {
......@@ -43,7 +42,7 @@ export function runSharedRequest(options: QueryRunnerOptions): Observable<PanelD
// If we are in fullscreen the other panel will not execute any queries
// So we have to trigger it from here
if (currentPanel.isViewing || currentPanel.isEditing) {
if (!listenToPanel.isInView) {
const { datasource, targets } = listenToPanel;
const modified = {
...options,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment