2020-07-10 13:36:29 +02:00
|
|
|
<!-- logfile output tab -->
|
|
|
|
<div class="tab-pane fade" id="logoutput">
|
2020-07-11 10:04:28 +02:00
|
|
|
<h4 class="mt-3"><?php echo _("Logging"); ?></h4>
|
2020-12-26 10:55:54 +01:00
|
|
|
<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 ?> />
|
2022-09-26 21:54:52 +02:00
|
|
|
<label class="custom-control-label align-middle" for="chxlogenable"><?php echo _("Logfile output"); ?></label>
|
|
|
|
<input type="button" class="btn btn-outline btn-warning btn-sm align-top ml-2" id="js-clearhostapd-log" value="<?php echo _("Clear log"); ?>" />
|
2020-12-26 10:55:54 +01:00
|
|
|
</div>
|
|
|
|
|
2020-07-10 13:36:29 +02:00
|
|
|
<div class="row">
|
2020-12-26 10:55:54 +01:00
|
|
|
<div class="form-group col-md-8 mt-2">
|
2020-07-10 13:36:29 +02:00
|
|
|
<?php
|
|
|
|
if ($arrHostapdConf['LogEnable'] == 1) {
|
|
|
|
exec('sudo /bin/chmod o+r /tmp/hostapd.log');
|
|
|
|
$log = file_get_contents('/tmp/hostapd.log');
|
2022-09-26 21:54:52 +02:00
|
|
|
echo '<textarea class="logoutput" id="hostapd-log">'.htmlspecialchars($log, ENT_QUOTES).'</textarea>';
|
2020-07-10 13:36:29 +02:00
|
|
|
} else {
|
2020-12-26 10:55:54 +01:00
|
|
|
echo '<textarea class="logoutput my-3"></textarea>';
|
2020-07-10 13:36:29 +02:00
|
|
|
}
|
|
|
|
?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div><!-- /.tab-pane | logging tab -->
|