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 = { ...@@ -133,4 +133,7 @@ export const Pages = {
navBar: () => '.explore-toolbar', navBar: () => '.explore-toolbar',
}, },
}, },
SoloPanel: {
url: (page: string) => `/d-solo/${page}`,
},
}; };
...@@ -116,7 +116,6 @@ export class PanelModel implements DataConfigSource { ...@@ -116,7 +116,6 @@ export class PanelModel implements DataConfigSource {
collapsed?: boolean; collapsed?: boolean;
panels?: any; panels?: any;
soloMode?: boolean;
targets: DataQuery[]; targets: DataQuery[];
transformations?: DataTransformerConfig[]; transformations?: DataTransformerConfig[];
datasource: string | null; datasource: string | null;
...@@ -142,6 +141,7 @@ export class PanelModel implements DataConfigSource { ...@@ -142,6 +141,7 @@ export class PanelModel implements DataConfigSource {
isViewing: boolean; isViewing: boolean;
isEditing: boolean; isEditing: boolean;
isInView: boolean; isInView: boolean;
hasRefreshed: boolean; hasRefreshed: boolean;
events: Emitter; events: Emitter;
cacheTimeout?: any; cacheTimeout?: any;
......
...@@ -26,7 +26,6 @@ export function runSharedRequest(options: QueryRunnerOptions): Observable<PanelD ...@@ -26,7 +26,6 @@ export function runSharedRequest(options: QueryRunnerOptions): Observable<PanelD
return undefined; return undefined;
} }
const currentPanel = dashboard.getPanelById(options.panelId)!;
const listenToPanel = dashboard.getPanelById(listenToPanelId); const listenToPanel = dashboard.getPanelById(listenToPanelId);
if (!listenToPanel) { if (!listenToPanel) {
...@@ -43,7 +42,7 @@ export function runSharedRequest(options: QueryRunnerOptions): Observable<PanelD ...@@ -43,7 +42,7 @@ export function runSharedRequest(options: QueryRunnerOptions): Observable<PanelD
// If we are in fullscreen the other panel will not execute any queries // If we are in fullscreen the other panel will not execute any queries
// So we have to trigger it from here // So we have to trigger it from here
if (currentPanel.isViewing || currentPanel.isEditing) { if (!listenToPanel.isInView) {
const { datasource, targets } = listenToPanel; const { datasource, targets } = listenToPanel;
const modified = { const modified = {
...options, ...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