From 67b23f2855156fd650d3f2fe51b4bd06de151822 Mon Sep 17 00:00:00 2001 From: rozetko Date: Fri, 21 Sep 2018 16:36:11 +0300 Subject: [PATCH] Use datasource name instead of measurement --- src/routes/datasource.ts | 7 +------ src/routes/tasks.ts | 3 ++- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/routes/datasource.ts b/src/routes/datasource.ts index 7cb94f1..bf7d766 100644 --- a/src/routes/datasource.ts +++ b/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, diff --git a/src/routes/tasks.ts b/src/routes/tasks.ts index c609b90..56ff35e 100644 --- a/src/routes/tasks.ts +++ b/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(); } }