Commit 435aa88c by Torkel Ödegaard

Merge branch 'issue_5372' of https://github.com/kipe/grafana into kipe-issue_5372

parents 782427b5 522a3408
...@@ -139,7 +139,8 @@ class TablePanelCtrl extends MetricsPanelCtrl { ...@@ -139,7 +139,8 @@ class TablePanelCtrl extends MetricsPanelCtrl {
} }
exportCsv() { exportCsv() {
FileExport.exportTableDataToCsv(this.table); var renderer = new TableRenderer(this.panel, this.table, this.dashboard.isTimezoneUtc());
FileExport.exportTableDataToCsv(renderer.render_values());
} }
link(scope, elem, attrs, ctrl) { link(scope, elem, attrs, ctrl) {
......
...@@ -141,4 +141,21 @@ export class TableRenderer { ...@@ -141,4 +141,21 @@ export class TableRenderer {
return html; return html;
} }
render_values() {
let rows = [];
for (var y = 0; y < this.table.rows.length; y++) {
let row = this.table.rows[y];
let new_row = [];
for (var i = 0; i < this.table.columns.length; i++) {
new_row.push(this.formatColumnValue(i, row[i]));
}
rows.push(new_row);
}
return {
columns: this.table.columns,
rows: rows,
};
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment