fixed typo and issue of not being able to add fields in table transformation

This commit is contained in:
slqgsm
2016-07-29 16:30:38 +00:00
parent afb55fb3bd
commit 93cb08d9d0
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -94,6 +94,7 @@ class TablePanelCtrl extends MetricsPanelCtrl {
onDataReceived(dataList) {
this.dataRaw = dataList;
this.pageIndex = 0;
this.panel.columns = [];
// automatically correct transform mode based on data
if (this.dataRaw && this.dataRaw.length) {
@@ -142,7 +142,7 @@ transformers['table'] = {
if (!data || data.length === 0) {
return [];
}
return data[0]
return data[0].columns;
},
transform: function(data, panel, model) {
if (!data || data.length === 0) {