mirror of
https://github.com/pi-hole/web.git
synced 2024-12-06 19:36:21 +01:00
Enable/Disable query logging implemented
This commit is contained in:
@@ -67,6 +67,20 @@
|
||||
|
||||
break;
|
||||
|
||||
// Set query logging
|
||||
case "Logging":
|
||||
|
||||
if($_POST["action"] === "Disable")
|
||||
{
|
||||
exec("sudo pihole -l off");
|
||||
}
|
||||
else
|
||||
{
|
||||
exec("sudo pihole -l on");
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
break;
|
||||
|
||||
+10
-4
@@ -155,10 +155,16 @@
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<form role="form" method="post">
|
||||
<div class="form-group">
|
||||
<div class="checkbox"><label><input type="checkbox" <?php if($piHoleLogging) { ?>checked<?php } ?>>Enabled (recommended)</label></div>
|
||||
</div>
|
||||
Note that disabling will render graphs on the web user interface useless
|
||||
<p>Current status: <?php if($piHoleLogging) { ?>Enabled (recommended)<?php }else{ ?>Disabled<?php } ?></p>
|
||||
<input type="hidden" name="field" value="Logging">
|
||||
<?php if($piHoleLogging) { ?>
|
||||
<input type="hidden" name="action" value="Disable">
|
||||
<button type="submit" class="btn btn-primary pull-right">Disable query logging</button>
|
||||
<?php } else { ?>
|
||||
<input type="hidden" name="action" value="Enable">
|
||||
<button type="submit" class="btn btn-primary pull-right">Enable query logging</button>
|
||||
<?php } ?>
|
||||
<?php if($piHoleLogging) { ?><p>Note that disabling will render graphs on the web user interface useless</p><?php } ?>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user