Removing the text dnsmasq[nnnn] from the log.

Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
This commit is contained in:
RD WebDesign
2022-07-13 19:12:41 -03:00
parent 91ad168100
commit 5b56a6871f

View File

@@ -10,12 +10,14 @@ require "password.php";
if(!$auth) die("Not authorized");
function formatLine($line){
$txt = preg_replace("/ dnsmasq\[[0-9]*\]/", "", htmlspecialchars($line));
if (strpos($line, "blacklisted") || strpos($line, "gravity blocked")) {
$txt = '<b class="log-red">'.htmlspecialchars($line).'</b>';
$txt = '<b class="log-red">'.$txt.'</b>';
} elseif (strpos($line, "query[A") || strpos($line, "query[DHCP")) {
$txt = '<b>'.htmlspecialchars($line).'</b>';
$txt = '<b>'.$txt.'</b>';
} else {
$txt = '<span class="text-muted">'.htmlspecialchars($line).'</span>';
$txt = '<span class="text-muted">'.$txt.'</span>';
}
return $txt;
}