mirror of
https://github.com/pi-hole/web.git
synced 2024-12-06 19:36:21 +01:00
Add info boxes
This commit is contained in:
@@ -68,3 +68,10 @@ $(document).ready(function() {
|
||||
});
|
||||
}
|
||||
} );
|
||||
|
||||
// Handle hiding of alerts
|
||||
$(function(){
|
||||
$("[data-hide]").on("click", function(){
|
||||
$(this).closest("." + $(this).attr("data-hide")).hide();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -191,14 +191,17 @@ function validDomain($domain_name)
|
||||
|
||||
case "reboot":
|
||||
exec("sudo pihole -a reboot");
|
||||
$success = "The system will reboot in 5 seconds...";
|
||||
break;
|
||||
|
||||
case "restartdns":
|
||||
exec("sudo pihole -a restartdns");
|
||||
$success = "The DNS server has been restarted";
|
||||
break;
|
||||
|
||||
case "flushlogs":
|
||||
exec("sudo pihole -f");
|
||||
$success = "The Pi-Hole log file has been flushed";
|
||||
break;
|
||||
|
||||
case "DHCP":
|
||||
|
||||
@@ -4,6 +4,13 @@
|
||||
// Reread ini file as things might have been changed
|
||||
$setupVars = parse_ini_file("/etc/pihole/setupVars.conf");
|
||||
?>
|
||||
|
||||
<?php if($success){ ?>
|
||||
<div id="alInfo" class="alert alert-info alert-dismissible fade in" role="alert">
|
||||
<button type="button" class="close" data-hide="alert" aria-label="Close"><span aria-hidden="true">×</span></button><?php echo $success; ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6"><p>Debug output: <?php print_r($debug); ?></p></div>
|
||||
<div class="col-md-6"><p>Error output: <?php print_r($error); ?></p></div>
|
||||
|
||||
Reference in New Issue
Block a user