Skip to content

Commit

Permalink
Send datasource name to backend CorpGlory/grafana-data-exporter#7
Browse files Browse the repository at this point in the history
  • Loading branch information
rozetko committed Sep 21, 2018
1 parent 7700bd9 commit 44680bd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,13 +157,16 @@ class Ctrl extends MetricsPanelCtrl {
let panelUrl = window.location.origin + window.location.pathname + `?panelId=${panelId}&fullscreen`;

let user = await this._getCurrentUser();
let panel = this.panels.find(el => el.id === panelId);
let datasourceName = panel.datasource;

this._backendSrv.post(`${this.panel.backendUrl}/tasks`, {
from: moment(this.rangeOverride.from).valueOf(),
to: moment(this.rangeOverride.to).valueOf(),
panelUrl,
target,
datasourceRequest: this._datasourceRequest,
datasourceName,
user
})
.then(data => {
Expand Down

0 comments on commit 44680bd

Please sign in to comment.