Skip to content

Commit

Permalink
fix ctrl ref (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
briangann authored May 5, 2020
1 parent f945948 commit 24fb564
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/ctrl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,16 +246,10 @@ export class DatatablePanelCtrl extends MetricsPanelCtrl {

exportCsv() {
let isInUTC = false;
if (ctrl.dashboard && ctrl.dashboard.hasOwnProperty('isTimezoneUtc')) {
isInUTC = ctrl.dashboard.isTimezoneUtc();
if (this.dashboard && this.dashboard.hasOwnProperty('isTimezoneUtc')) {
isInUTC = this.dashboard.isTimezoneUtc();
}
const renderer = new DatatableRenderer(
this.panel,
this.table,
isInUTC,
this.$sanitize,
this.timeSrv
);
const renderer = new DatatableRenderer(this.panel, this.table, isInUTC, this.$sanitize, this.timeSrv);
FileExport.exportTableDataToCsv(renderer.render_values());
}

Expand Down

0 comments on commit 24fb564

Please sign in to comment.