From 24fb56460b692767c3ac0d027c6552fe68476e02 Mon Sep 17 00:00:00 2001 From: Brian Gann Date: Mon, 4 May 2020 22:34:09 -0500 Subject: [PATCH] fix ctrl ref (#93) --- src/ctrl.ts | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/ctrl.ts b/src/ctrl.ts index 341c6da..f84f37d 100644 --- a/src/ctrl.ts +++ b/src/ctrl.ts @@ -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()); }