Browse Source

Use datasource name instead of measurement

pull/1/head
rozetko 6 years ago
parent
commit
67b23f2855
  1. 7
      src/routes/datasource.ts
  2. 3
      src/routes/tasks.ts

7
src/routes/datasource.ts

@ -40,10 +40,6 @@ function query(req, res) {
text: 'Datasource',
type: 'string'
},
{
text: 'Measurement',
type: 'string'
},
{
text: 'Exported Rows',
type: 'number'
@ -93,8 +89,7 @@ function query(req, res) {
resp.rows.push([
status.time,
status.user,
status.datasource,
status.measurement,
status.datasourceName,
status.exportedRows,
status.progress,
downloadLink,

3
src/routes/tasks.ts

@ -10,6 +10,7 @@ async function addTask(req, res) {
let panelUrl = body.panelUrl;
let targets = [body.target];
let datasource = body.datasourceRequest;
let datasourceName = body.datasourceName;
let user = body.user;
if(isNaN(from) || isNaN(to)) {
@ -18,7 +19,7 @@ async function addTask(req, res) {
res.status(500).send('Range error: "from" should be less than "to"');
} else {
res.status(200).send('Task added');
let target = new Target(panelUrl, user, datasource, targets, from, to);
let target = new Target(panelUrl, user, datasource, targets, from, to, datasourceName);
target.export();
}
}

Loading…
Cancel
Save