Hide "Whitelist" button on wildcard blocked entries (Query Log page)

This commit is contained in:
DL6ER
2017-01-11 12:41:35 +01:00
parent bd36baa18b
commit 3c0c92e8b1
+5 -1
View File
@@ -103,10 +103,14 @@ $(document).ready(function() {
tableApi = $("#all-queries").DataTable( {
"rowCallback": function( row, data, index ){
status = data[4];
if (status.substr(0,2) === "Pi") {
if (status === "Pi-holed (exact)") {
$(row).css("color","red");
$("td:eq(5)", row).html( "<button style=\"color:green; white-space: nowrap;\"><i class=\"fa fa-pencil-square-o\"></i> Whitelist</button>" );
}
else if (status === "Pi-holed (wildcard)") {
$(row).css("color","red");
$("td:eq(5)", row).html( "" );
}
else{
$(row).css("color","green");
$("td:eq(5)", row).html( "<button style=\"color:red; white-space: nowrap;\"><i class=\"fa fa-ban\"></i> Blacklist</button>" );