Commit 485225f4 authored by Ad Schellevis's avatar Ad Schellevis

(proxy) check for existing log file in diag_logs_proxy.php...

(proxy) check for existing log file in diag_logs_proxy.php (https://github.com/opnsense/core/issues/186 )
parent 9fe1b635
...@@ -57,7 +57,11 @@ include("head.inc"); ...@@ -57,7 +57,11 @@ include("head.inc");
<div class="tab-content content-box col-xs-12"> <div class="tab-content content-box col-xs-12">
<div class="container-fluid"> <div class="container-fluid">
<p> <?php printf(gettext("Last %s log entries"), $max_logentries);?></p> <p> <?php printf(gettext("Last %s log entries"), $max_logentries);?></p>
<pre><?php echo trim(implode("", array_slice(file($logfile), -$max_logentries))); ?></pre> <pre><?php
if (file_exists($logfile)) {
echo trim(implode("", array_slice(file($logfile), -$max_logentries)));
}
?></pre>
<form method="post"> <form method="post">
<input name="clear" type="submit" class="btn" value="<?= gettext("Clear log");?>" /> <input name="clear" type="submit" class="btn" value="<?= gettext("Clear log");?>" />
</form> </form>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment