mirror of
https://github.com/pi-hole/web.git
synced 2026-05-08 09:39:05 +01:00
Remove redundant variable.
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
This commit is contained in:
@@ -330,13 +330,12 @@ function editClient() {
|
||||
return;
|
||||
}
|
||||
|
||||
var ipName = ip;
|
||||
if (name.length > 0) {
|
||||
ipName += " (" + name + ")";
|
||||
ip += " (" + name + ")";
|
||||
}
|
||||
|
||||
utils.disableAll();
|
||||
utils.showAlert("info", "", "Editing client...", ipName);
|
||||
utils.showAlert("info", "", "Editing client...", ip);
|
||||
$.ajax({
|
||||
url: "scripts/pi-hole/php/groups.php",
|
||||
method: "post",
|
||||
@@ -351,7 +350,7 @@ function editClient() {
|
||||
success: function (response) {
|
||||
utils.enableAll();
|
||||
if (response.success) {
|
||||
utils.showAlert("success", "fas fa-pencil-alt", "Successfully " + done + " client", ipName);
|
||||
utils.showAlert("success", "fas fa-pencil-alt", "Successfully " + done + " client", ip);
|
||||
table.ajax.reload(null, false);
|
||||
} else {
|
||||
utils.showAlert(
|
||||
@@ -380,13 +379,12 @@ function deleteClient() {
|
||||
var ip = tr.find("#ip_" + id).text();
|
||||
var name = tr.find("#name_" + id).text();
|
||||
|
||||
var ipName = ip;
|
||||
if (name.length > 0) {
|
||||
ipName += " (" + name + ")";
|
||||
ip += " (" + name + ")";
|
||||
}
|
||||
|
||||
utils.disableAll();
|
||||
utils.showAlert("info", "", "Deleting client...", ipName);
|
||||
utils.showAlert("info", "", "Deleting client...", ip);
|
||||
$.ajax({
|
||||
url: "scripts/pi-hole/php/groups.php",
|
||||
method: "post",
|
||||
@@ -395,7 +393,7 @@ function deleteClient() {
|
||||
success: function (response) {
|
||||
utils.enableAll();
|
||||
if (response.success) {
|
||||
utils.showAlert("success", "far fa-trash-alt", "Successfully deleted client ", ipName);
|
||||
utils.showAlert("success", "far fa-trash-alt", "Successfully deleted client ", ip);
|
||||
table.row(tr).remove().draw(false).ajax.reload(null, false);
|
||||
reloadClientSuggestions();
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user