From dca374bfcd30aaff1f348549b66530c5fb3f00ca Mon Sep 17 00:00:00 2001 From: DL6ER Date: Sun, 1 Apr 2018 16:39:54 +0200 Subject: [PATCH] Simplify NODATA reply type (no need to show A/AAAA here as we show that in the second column) and add reply time if available Signed-off-by: DL6ER --- scripts/pi-hole/js/queries.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/pi-hole/js/queries.js b/scripts/pi-hole/js/queries.js index d4c469b2..04c3a771 100644 --- a/scripts/pi-hole/js/queries.js +++ b/scripts/pi-hole/js/queries.js @@ -224,7 +224,7 @@ $(document).ready(function() { } else if (data[6] === "1") { - $("td:eq(5)", row).html("NODATA-" + data[1]); + $("td:eq(5)", row).html("NODATA"); } else if (data[6] === "2") { @@ -248,6 +248,11 @@ $(document).ready(function() { $("td:eq(5)", row).css("color","black"); $("td:eq(5)", row).html("-"); } + if(data.length > 7 && data[7] > 0) + { + var content = $("td:eq(5)", row).html(); + $("td:eq(5)", row).html(content + " (" + (0.1*data[7]).toFixed(1)+"ms)"); + } }, dom: "<'row'<'col-sm-12'f>>" +