Commit 002455da by Torkel Ödegaard

fix(table): minor fix to table panel and transform time series to aggregations

parent e9e6ac64
......@@ -45,8 +45,13 @@ export class TablePanelEditorCtrl {
};
$scope.addColumn = function() {
$scope.panel.columns.push({text: $scope.addColumnSegment.value, value: $scope.addColumnSegment.value});
$scope.render();
var columns = transformers[$scope.panel.transform].getColumns($scope.dataRaw);
var column = _.findWhere(columns, {text: $scope.addColumnSegment.value});
if (column) {
$scope.panel.columns.push(column);
$scope.render();
}
var plusButton = uiSegmentSrv.newPlusButton();
$scope.addColumnSegment.html = plusButton.html;
......
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