Add info boxes

This commit is contained in:
DL6ER
2016-12-13 12:56:04 +01:00
parent 6fae811f82
commit 07987b5a04
3 changed files with 17 additions and 0 deletions
+7
View File
@@ -68,3 +68,10 @@ $(document).ready(function() {
});
}
} );
// Handle hiding of alerts
$(function(){
$("[data-hide]").on("click", function(){
$(this).closest("." + $(this).attr("data-hide")).hide();
});
});
+3
View File
@@ -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":
+7
View File
@@ -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">&times;</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>