28 lines
1.5 KiB
PHP
Raw Normal View History

2020-03-06 16:53:22 +01:00
<!-- logfile output tab -->
<div class="tab-pane fade" id="logging">
<h4><?php echo _("Logging") ?></h4>
2022-09-27 12:04:29 +02:00
<p><?php echo _("Enable these options to log <code>dhcpcd</code> and <code>dnsmasq</code> activity.") ?></p>
2020-03-06 16:53:22 +01:00
<div class="form-check form-switch">
2024-12-16 17:52:31 -08:00
<input class="form-check-input" id="log-dhcp" type="checkbox" name="log-dhcp" value="1" <?php echo !empty($conf['log-dhcp']) ? ' checked="checked"' : "" ?> aria-describedby="log-dhcp-requests">
<label class="form-check-label" for="log-dhcp"><?php echo _("Log DHCP requests") ?></label>
2020-03-06 16:53:22 +01:00
</div>
<div class="form-check form-switch">
2024-12-16 17:52:31 -08:00
<input class="form-check-input" id="log-queries" type="checkbox" name="log-queries" value="1" <?php echo !empty($conf['log-queries']) ? ' checked="checked"' : "" ?> aria-describedby="log-dhcp-queries">
<label class="form-check-label align-middle" for="log-queries"><?php echo _("Log DNS queries") ?></label>
<input type="button" class="btn btn-outline btn-warning btn-sm align-top ms-4" id="js-cleardnsmasq-log" value="<?php echo _("Clear log"); ?>" />
2020-03-06 16:53:22 +01:00
</div>
<div class="row">
<div class="mb-3 col-md-8 mt-2">
<?php
2024-12-16 17:52:31 -08:00
if (($conf['log-dhcp'] ?? 0) == 1 || ($conf['log-queries'] ?? 0) == 1) {
2024-10-24 10:30:53 -07:00
echo '<textarea class="logoutput text-secondary" id="dnsmasq-log">'.htmlspecialchars($logdata, ENT_QUOTES).'</textarea>';
} else {
echo '<textarea class="logoutput my-3"></textarea>';
}
?>
</div>
</div>
2020-03-06 16:53:22 +01:00
</div><!-- /.tab-pane -->