From 21521498b5614fbd1da6323e8a5f7e1b53b2241f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Sun, 28 Aug 2022 20:15:36 +0200 Subject: [PATCH] Keep conversion for long-term data MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian König --- scripts/pi-hole/js/db_queries.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/pi-hole/js/db_queries.js b/scripts/pi-hole/js/db_queries.js index 9fa16959..6fe714dd 100644 --- a/scripts/pi-hole/js/db_queries.js +++ b/scripts/pi-hole/js/db_queries.js @@ -377,7 +377,15 @@ $(function () { $("td:eq(5)", row).append(" (" + (1000 * data[7]).toFixed(1) + "ms)"); } + // Substitute domain by "." if empty + // This was introduced by https://github.com/pi-hole/AdminLTE/pull/1244 but is considered obsolete since + // https://github.com/pi-hole/FTL/pull/1413. However, we keep the conversion here to keep user's + // statistic accurat when they import older data with empty domain fields var domain = data[2]; + if (domain.length === 0) { + domain = "."; + } + $("td:eq(2)", row).text(domain); }, dom: