diff --git a/src/panels/corpglory-dataexporter-panel/components/Panel.tsx b/src/panels/corpglory-dataexporter-panel/components/Panel.tsx index e2b1b17..e537936 100644 --- a/src/panels/corpglory-dataexporter-panel/components/Panel.tsx +++ b/src/panels/corpglory-dataexporter-panel/components/Panel.tsx @@ -100,12 +100,11 @@ export function Panel({ width, height, timeRange, eventBus }: Props) { } panel.targets?.forEach((target: DataQuery) => { - console.log('uid', target.datasource?.uid); const datasource = getDatasourceByUid(target.datasource?.uid); if (!datasource) { return; } - queries.push({ ...target, selected: false, panel, datasource }); + queries.push({ selected: false, target, panel, datasource }); }); setQueries(queries); @@ -246,7 +245,7 @@ export function Panel({ width, height, timeRange, eventBus }: Props) { { name: 'RefId', type: FieldType.string, - values: _.map(queries, (query) => query.refId), + values: _.map(queries, (query) => query.target.refId), }, { name: 'Datasource', diff --git a/src/panels/corpglory-dataexporter-panel/types.ts b/src/panels/corpglory-dataexporter-panel/types.ts index edacd6f..1af9a8d 100644 --- a/src/panels/corpglory-dataexporter-panel/types.ts +++ b/src/panels/corpglory-dataexporter-panel/types.ts @@ -43,8 +43,9 @@ export type ExportTask = { id?: string; }; -export type DashboardQuery = DataQuery & { +export type DashboardQuery = { selected: boolean; + target: DataQuery; panel: PanelModel; datasource: DataSourceSettings; };