mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Avg column was being added at every rendering, if the table was empty. Now the column will be added once as an initialization when selecting a 'timeseries_aggregations' transform.
This commit is contained in:
parent
ee8799de88
commit
d6eefcb5ce
@ -53,6 +53,10 @@ export class TablePanelEditorCtrl {
|
||||
|
||||
transformChanged() {
|
||||
this.panel.columns = [];
|
||||
if (this.panel.transform === 'timeseries_aggregations') {
|
||||
this.panel.columns.push({text: 'Avg', value: 'avg'});
|
||||
}
|
||||
|
||||
this.render();
|
||||
}
|
||||
|
||||
|
@ -89,10 +89,6 @@ transformers['timeseries_aggregations'] = {
|
||||
var i, y;
|
||||
model.columns.push({text: 'Metric'});
|
||||
|
||||
if (panel.columns.length === 0) {
|
||||
panel.columns.push({text: 'Avg', value: 'avg'});
|
||||
}
|
||||
|
||||
for (i = 0; i < panel.columns.length; i++) {
|
||||
model.columns.push({text: panel.columns[i].text});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user