Skip to content

Commit

Permalink
Attenuate non-domain warning (#2507)
Browse files Browse the repository at this point in the history
  • Loading branch information
yubiuser authored Jan 21, 2023
2 parents 7a4be9e + 4bc3d73 commit ec7b753
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions scripts/pi-hole/js/groups-adlists.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,6 @@ function format(data) {
}
}

var invalidStyle =
data.invalid_domains !== null && data.invalid_domains > 0 && numbers === true
? ' style="color:red; font-weight:bold;"'
: "";

// Compile extra info for displaying
return (
"<table>" +
Expand All @@ -103,8 +98,7 @@ function format(data) {
'</td></tr><tr class="dataTables-child"><td>Number of domains on this list:&nbsp;&nbsp;</td><td>' +
(data.number !== null && numbers === true ? parseInt(data.number, 10) : "N/A") +
'</td></tr><tr class="dataTables-child"' +
invalidStyle +
"><td>Number of invalid domains on this list:&nbsp;&nbsp;</td>" +
"><td>Number of non-domains on this list:&nbsp;&nbsp;</td>" +
"<td>" +
(data.invalid_domains !== null && numbers === true
? parseInt(data.invalid_domains, 10)
Expand Down Expand Up @@ -185,15 +179,9 @@ function initTable() {
break;
}

// Append red exclamation-triangle when there are invalid lines on the list
var extra = "";
if (data.invalid_domains !== null && data.invalid_domains > 0) {
extra = "<i class='fa fa-exclamation-triangle list-status-3'></i>";
}

$("td:eq(1)", row).addClass("list-status-" + statusCode);
$("td:eq(1)", row).html(
"<i class='fa " + statusIcon + "' title='Click for details about this list'></i>" + extra
"<i class='fa " + statusIcon + "' title='Click for details about this list'></i>"
);

if (data.address.startsWith("file://")) {
Expand Down

0 comments on commit ec7b753

Please sign in to comment.