Browse Source

add todo

pull/4/head
vargburz 2 years ago
parent
commit
99e7dc2ffe
  1. 3
      src/panels/corpglory-dataexporter-panel/components/Panel.tsx

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

@ -43,7 +43,7 @@ export function Panel({ options, data, width, height, timeRange, onChangeTimeRan
const refId = queries[0].refId; const refId = queries[0].refId;
const rawSql = queries[0].rawSql; const rawSql = queries[0].rawSql;
const uid = queries[0].datasource.uid; const uid = queries[0].datasource.uid;
// TODO: it works only with sql (rawSql will be empty in prometheus)
const isDatasourceExist = _.some( const isDatasourceExist = _.some(
datasources, datasources,
(ds: DatasourceTableRowConfig) => (ds: DatasourceTableRowConfig) =>
@ -52,7 +52,6 @@ export function Panel({ options, data, width, height, timeRange, onChangeTimeRan
if (isDatasourceExist) { if (isDatasourceExist) {
return; return;
} }
const newConfig = createDatasourceConfig({ datasource, refId, rawSql, uid }, timestampRange); const newConfig = createDatasourceConfig({ datasource, refId, rawSql, uid }, timestampRange);
setDatasources([...datasources, newConfig]); setDatasources([...datasources, newConfig]);
}, },

Loading…
Cancel
Save