diff --git a/queries.php b/queries.php index 616696ed..09819465 100644 --- a/queries.php +++ b/queries.php @@ -140,7 +140,6 @@ if(strlen($showing) > 0) Client Status Reply - DNSSEC Action @@ -152,7 +151,6 @@ if(strlen($showing) > 0) Client Status Reply - DNSSEC Action diff --git a/scripts/pi-hole/js/queries.js b/scripts/pi-hole/js/queries.js index 059e0a95..3ea38cff 100644 --- a/scripts/pi-hole/js/queries.js +++ b/scripts/pi-hole/js/queries.js @@ -145,72 +145,65 @@ $(document).ready(function() { tableApi = $("#all-queries").DataTable( { "rowCallback": function( row, data, index ){ var blocked = false; + + var dnssec_status = ""; + if (data[5] === "1") + { + dnssec_status = "
SECURE"; + } + else if (data[5] === "2") + { + dnssec_status = "
INSECURE"; + } + else if (data[5] === "3") + { + dnssec_status = "
BOGUS"; + } + else if (data[5] === "4") + { + dnssec_status = "
ABANDONED"; + } + else if (data[5] === "5") + { + dnssec_status = "
?"; + } if (data[4] === "1") { blocked = true; $(row).css("color","red"); - $("td:eq(4)", row).html( "Pi-holed" ); - $("td:eq(7)", row).html( "" ); + $("td:eq(4)", row).html( "Pi-holed"+dnssec_status ); + $("td:eq(6)", row).html( "" ); } else if (data[4] === "2") { $(row).css("color","green"); - $("td:eq(4)", row).html( "OK (forwarded)" ); - $("td:eq(7)", row).html( "" ); + $("td:eq(4)", row).html( "OK (forwarded)"+dnssec_status ); + $("td:eq(6)", row).html( "" ); } else if (data[4] === "3") { $(row).css("color","green"); - $("td:eq(4)", row).html( "OK (cached)" ); - $("td:eq(7)", row).html( "" ); + $("td:eq(4)", row).html( "OK (cached)"+dnssec_status ); + $("td:eq(6)", row).html( "" ); } else if (data[4] === "4") { blocked = true; $(row).css("color","red"); - $("td:eq(4)", row).html( "Pi-holed (wildcard)" ); - $("td:eq(7)", row).html( "" ); + $("td:eq(4)", row).html( "Pi-holed (wildcard)"); + $("td:eq(6)", row).html( "" ); } else if (data[4] === "5") { blocked = true; $(row).css("color","red"); $("td:eq(4)", row).html( "Pi-holed (blacklist)" ); - $("td:eq(7)", row).html( "" ); + $("td:eq(6)", row).html( "" ); } else { $("td:eq(4)", row).html( "Unknown" ); - $("td:eq(7)", row).html( "" ); - } - if (data[5] === "1") - { - $("td:eq(6)", row).css("color","green"); - $("td:eq(6)", row).html( "SECURE" ); - } - else if (data[5] === "2") - { - $("td:eq(6)", row).css("color","orange"); - $("td:eq(6)", row).html( "INSECURE" ); - } - else if (data[5] === "3") - { - $("td:eq(6)", row).css("color","red"); - $("td:eq(6)", row).html( "BOGUS" ); - } - else if (data[5] === "4") - { - $("td:eq(6)", row).css("color","red"); - $("td:eq(6)", row).html( "ABANDONED" ); - } - else if (data[5] === "5") - { - $("td:eq(6)", row).css("color","red"); - $("td:eq(6)", row).html( "?" ); - } - else - { - $("td:eq(6)", row).html( "-" ); + $("td:eq(6)", row).html( "" ); } // Check for existance of sixth column and display only if not Pi-holed @@ -267,9 +260,8 @@ $(document).ready(function() { { "width" : "4%" }, { "width" : "36%", "render": $.fn.dataTable.render.text() }, { "width" : "8%", "render": $.fn.dataTable.render.text() }, - { "width" : "10%", "orderData": 4 }, + { "width" : "14%", "orderData": 4 }, { "width" : "8%", "orderData": 6 }, - { "width" : "4%", "orderData": 5 }, { "width" : "10%", "orderData": 4 } ], "lengthMenu": [[10, 25, 50, 100, -1], [10, 25, 50, 100, "All"]],