From e218052a904b5eaa27d9b486adc03e502984e845 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Tue, 9 May 2017 12:07:06 +0200 Subject: [PATCH] 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 --- public/app/plugins/panel/table/editor.html | 4 ---- public/app/plugins/panel/table/module.ts | 1 - public/app/plugins/panel/table/transformers.ts | 12 ++---------- 3 files changed, 2 insertions(+), 15 deletions(-) diff --git a/public/app/plugins/panel/table/editor.html b/public/app/plugins/panel/table/editor.html index 7eae11d7b0a..77860266b45 100644 --- a/public/app/plugins/panel/table/editor.html +++ b/public/app/plugins/panel/table/editor.html @@ -21,10 +21,6 @@ -
diff --git a/public/app/plugins/panel/table/module.ts b/public/app/plugins/panel/table/module.ts index 9b563ca5b18..06475caa332 100644 --- a/public/app/plugins/panel/table/module.ts +++ b/public/app/plugins/panel/table/module.ts @@ -45,7 +45,6 @@ class TablePanelCtrl extends MetricsPanelCtrl { scroll: true, fontSize: '100%', sort: {col: 0, desc: true}, - filterNull: false, }; /** @ngInject */ diff --git a/public/app/plugins/panel/table/transformers.ts b/public/app/plugins/panel/table/transformers.ts index 0f793fa0434..c7f957e0156 100644 --- a/public/app/plugins/panel/table/transformers.ts +++ b/public/app/plugins/panel/table/transformers.ts @@ -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; }