|
|
@ -100,12 +100,11 @@ export function Panel({ width, height, timeRange, eventBus }: Props) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
panel.targets?.forEach((target: DataQuery) => { |
|
|
|
panel.targets?.forEach((target: DataQuery) => { |
|
|
|
console.log('uid', target.datasource?.uid); |
|
|
|
|
|
|
|
const datasource = getDatasourceByUid(target.datasource?.uid); |
|
|
|
const datasource = getDatasourceByUid(target.datasource?.uid); |
|
|
|
if (!datasource) { |
|
|
|
if (!datasource) { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
queries.push({ ...target, selected: false, panel, datasource }); |
|
|
|
queries.push({ selected: false, target, panel, datasource }); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
setQueries(queries); |
|
|
|
setQueries(queries); |
|
|
@ -246,7 +245,7 @@ export function Panel({ width, height, timeRange, eventBus }: Props) { |
|
|
|
{ |
|
|
|
{ |
|
|
|
name: 'RefId', |
|
|
|
name: 'RefId', |
|
|
|
type: FieldType.string, |
|
|
|
type: FieldType.string, |
|
|
|
values: _.map(queries, (query) => query.refId), |
|
|
|
values: _.map(queries, (query) => query.target.refId), |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
name: 'Datasource', |
|
|
|
name: 'Datasource', |
|
|
|