Commit e218052a by Torkel Ödegaard

fix: fixed slow down issue in table panel by removing the fillter null values…

fix: fixed slow down issue in table panel by removing the fillter null values feature (#7602), not sure the filter null values is a good table option, should be done in metric query, fixes #8234
parent 84141eb1
......@@ -21,10 +21,6 @@
<metric-segment segment="editor.addColumnSegment" get-options="editor.getColumnOptions()" on-change="editor.addColumn()"></metric-segment>
</div>
</div>
<gf-form-switch class="gf-form" label-class="width-10"
label="Filter null values"
checked="editor.panel.filterNull"
on-change="editor.render()"></gf-form-switch>
</div>
<div class="section gf-form-group">
......
......@@ -45,7 +45,6 @@ class TablePanelCtrl extends MetricsPanelCtrl {
scroll: true,
fontSize: '100%',
sort: {col: 0, desc: true},
filterNull: false,
};
/** @ngInject */
......
......@@ -220,8 +220,7 @@ transformers['json'] = {
};
function transformDataToTable(data, panel) {
var model = new TableModel(),
copyData = angular.copy(data);
var model = new TableModel();
if (!data || data.length === 0) {
return model;
......@@ -232,14 +231,7 @@ function transformDataToTable(data, panel) {
throw {message: 'Transformer ' + panel.transform + ' not found'};
}
if (panel.filterNull) {
for (var i = 0; i < copyData.length; i++) {
copyData[i].datapoints = copyData[i].datapoints.filter((dp) => dp[0] != null);
}
}
transformer.transform(copyData, panel, model);
transformer.transform(data, panel, model);
return model;
}
......
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