Skip to content

Commit

Permalink
https://github.com/CorpGlory/grafana-data-exporter-panel/issues/40
Browse files Browse the repository at this point in the history
  • Loading branch information
sblrok committed Sep 15, 2020
1 parent 1293917 commit 6f034cd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/routes/tasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ async function addTask(req, res) {
} else if(from >= to) {
res.status(500).send('Range error: "from" should be less than "to"');
} else {
res.status(200).send('Exporting ' + datasourceName + ' data from ' + new Date(from).toLocaleString() + ' to ' + new Date(to).toLocaleString());
let target = new Target(panelUrl, user, datasource, targets, from, to, datasourceName);
target.export();
await target.export();

res.status(200).send('Exporting ' + datasourceName + ' data from ' + new Date(from).toLocaleString() + ' to ' + new Date(to).toLocaleString());
}
}

Expand Down

0 comments on commit 6f034cd

Please sign in to comment.