Browse Source

fix queries list containing queries only from one panel

pull/13/head
rozetko 2 years ago
parent
commit
a4e4dc637f
  1. 6
      src/panels/corpglory-dataexporter-panel/components/Panel.tsx

6
src/panels/corpglory-dataexporter-panel/components/Panel.tsx

@ -114,8 +114,9 @@ export function Panel({ width, height, timeRange, eventBus, timeZone }: Props) {
console.warn(`Can't update queries if there is no dashboard or datasources`);
return;
}
const queries: DashboardQuery[] = [];
dashboard.panels?.forEach((panel: PanelModel) => {
const queries: DashboardQuery[] = [];
// @ts-ignore
if (panel.type === PANEL_ID) {
@ -133,9 +134,8 @@ export function Panel({ width, height, timeRange, eventBus, timeZone }: Props) {
}
queries.push({ selected: false, target, panel, datasource });
});
setQueries(queries);
});
setQueries(queries);
}
function fetchTasks(): void {

Loading…
Cancel
Save