Normalize hostapd + dhcp log output, update en_US

This commit is contained in:
billz 2020-12-26 09:55:54 +00:00
parent cb10bf684c
commit 37ea945516
5 changed files with 30 additions and 17 deletions

Binary file not shown.

View File

@ -353,6 +353,9 @@ msgstr "Format"
msgid "Choose a hosted server"
msgstr "Choose a hosted server"
msgid "Enable these options to log DHCP server activity."
msgstr "Enable these options to log DHCP server activity."
msgid "Log DHCP requests"
msgstr "Log DHCP requests"
@ -468,6 +471,9 @@ msgstr "Executing RaspAP service start"
msgid "Close"
msgstr "Close"
msgid "Enable this option to log <code>hostapd</code> activity."
msgstr "Enable this option to log <code>hostapd</code> activity."
#: includes/networking.php
msgid "Summary"
msgstr "Summary"

View File

@ -12,9 +12,17 @@
<label class="custom-control-label" for="log-queries"><?php echo _("Log DNS queries") ?></label>
</div>
<?php
exec('sudo chmod o+r /tmp/dnsmasq.log');
$log = file_get_contents('/tmp/dnsmasq.log');
echo '<textarea class="logoutput my-3">'.htmlspecialchars($log, ENT_QUOTES).'</textarea>';
?>
<div class="row">
<div class="form-group col-md-8 mt-2">
<?php
if ($conf['log-dhcp'] == 1 || $conf['log-queries'] == 1) {
exec('sudo chmod o+r /tmp/dnsmasq.log');
$log = file_get_contents('/tmp/dnsmasq.log');
echo '<textarea class="logoutput">'.htmlspecialchars($log, ENT_QUOTES).'</textarea>';
} else {
echo '<textarea class="logoutput my-3"></textarea>';
}
?>
</div>
</div>
</div><!-- /.tab-pane -->

View File

@ -19,15 +19,6 @@
</div>
</div>
</div>
<div class="row">
<div class="col-md-6 mb-2">
<div class="custom-control custom-switch">
<?php $checked = $arrHostapdConf['LogEnable'] == 1 ? 'checked="checked"' : '' ?>
<input class="custom-control-input" id="chxlogenable" name="logEnable" type="checkbox" value="1" <?php echo $checked ?> />
<label class="custom-control-label" for="chxlogenable"><?php echo _("Logfile output"); ?></label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6 mb-2">
<div class="custom-control custom-switch">

View File

@ -1,15 +1,23 @@
<!-- logfile output tab -->
<div class="tab-pane fade" id="logoutput">
<h4 class="mt-3"><?php echo _("Logging"); ?></h4>
<p><?php echo _("Enable this option to log <code>hostapd</code> activity.") ?></p>
<div class="custom-control custom-switch">
<?php $checked = $arrHostapdConf['LogEnable'] == 1 ? 'checked="checked"' : '' ?>
<input class="custom-control-input" id="chxlogenable" name="logEnable" type="checkbox" value="1" <?php echo $checked ?> />
<label class="custom-control-label" for="chxlogenable"><?php echo _("Logfile output"); ?></label>
</div>
<div class="row">
<div class="form-group col-md-8">
<div class="form-group col-md-8 mt-2">
<?php
if ($arrHostapdConf['LogEnable'] == 1) {
exec('sudo /bin/chmod o+r /tmp/hostapd.log');
$log = file_get_contents('/tmp/hostapd.log');
echo '<br /><textarea class="logoutput">'.htmlspecialchars($log, ENT_QUOTES).'</textarea>';
echo '<textarea class="logoutput">'.htmlspecialchars($log, ENT_QUOTES).'</textarea>';
} else {
echo "<br />Logfile output not enabled";
echo '<textarea class="logoutput my-3"></textarea>';
}
?>
</div>