diff --git a/groups.php b/groups.php
index 1cc6e2ed..56b2c44d 100644
--- a/groups.php
+++ b/groups.php
@@ -56,13 +56,14 @@
| ID |
- Status |
Name |
+ Status |
Description |
Action |
+
diff --git a/scripts/pi-hole/js/groups-clients.js b/scripts/pi-hole/js/groups-clients.js
index 697650bb..98a9ddc5 100644
--- a/scripts/pi-hole/js/groups-clients.js
+++ b/scripts/pi-hole/js/groups-clients.js
@@ -334,7 +334,8 @@ function deleteClient() {
showAlert(
"success",
"glyphicon glyphicon-trash",
- "Successfully deleted client ", ip_name
+ "Successfully deleted client ",
+ ip_name
);
reload_client_suggestions();
table.ajax.reload();
diff --git a/scripts/pi-hole/js/groups.js b/scripts/pi-hole/js/groups.js
index 42baa98d..59d5045a 100644
--- a/scripts/pi-hole/js/groups.js
+++ b/scripts/pi-hole/js/groups.js
@@ -61,6 +61,10 @@ function showAlert(type, icon, title, message) {
$(document).ready(function() {
$("#btnAdd").on("click", addGroup);
+ $("#resetButton").on("click", function() {
+ table.order([[0, "asc"]]).draw();
+ $("#resetButton").hide();
+ });
table = $("#groupsTable").DataTable({
ajax: {
@@ -70,6 +74,7 @@ $(document).ready(function() {
},
order: [[0, "asc"]],
columns: [
+ { data: "id", visible: false },
{ data: "name" },
{ data: "enabled", searchable: false },
{ data: "description" },
@@ -144,6 +149,15 @@ $(document).ready(function() {
return data;
}
});
+
+ table.on("order.dt", function() {
+ var order = table.order();
+ if (order[0][0] !== 0 || order[0][1] !== "asc") {
+ $("#resetButton").show();
+ } else {
+ $("#resetButton").hide();
+ }
+ });
});
function addGroup() {