diff --git a/scripts/pi-hole/js/settings.js b/scripts/pi-hole/js/settings.js
index a3b99195..51f8a09a 100644
--- a/scripts/pi-hole/js/settings.js
+++ b/scripts/pi-hole/js/settings.js
@@ -82,19 +82,19 @@ $(".confirm-flushlogs").confirm({
dialogClass: "modal-dialog modal-mg"
});
-$(".confirm-disablelogging").confirm({
- text: "Are you sure you want to disable logging and flush your Pi-hole logs?",
+$(".confirm-flusharp").confirm({
+ text: "Are you sure you want to flush your network table?",
title: "Confirmation required",
confirm(button) {
- $("#disablelogsform").submit();
+ $("#flusharpform").submit();
},
cancel(button) {
// nothing to do
},
- confirmButton: "Yes, disable logs and flush my logs",
+ confirmButton: "Yes, flush my network table",
cancelButton: "No, go back",
post: true,
- confirmButtonClass: "btn-danger",
+ confirmButtonClass: "btn-warning",
cancelButtonClass: "btn-success",
dialogClass: "modal-dialog modal-mg"
});
diff --git a/scripts/pi-hole/php/savesettings.php b/scripts/pi-hole/php/savesettings.php
index ed7f2556..7a532fa8 100644
--- a/scripts/pi-hole/php/savesettings.php
+++ b/scripts/pi-hole/php/savesettings.php
@@ -735,6 +735,15 @@ function readAdlists()
$error .= "Invalid privacy level (".$level.")!";
}
break;
+ // Flush network table
+ case "flusharp":
+ exec("sudo pihole arpflush quiet", $output);
+ $error = implode($output, "
");
+ if(strlen($error) == 0)
+ {
+ $success .= "The network table has been flushed";
+ }
+ break;
default:
// Option not found
diff --git a/settings.php b/settings.php
index a77e3995..862864ed 100644
--- a/settings.php
+++ b/settings.php
@@ -1331,9 +1331,7 @@ if (isset($_GET['tab']) && in_array($_GET['tab'], array("sysadmin", "blocklists"