Remove redundant variable.

Signed-off-by: XhmikosR <xhmikosr@gmail.com>
This commit is contained in:
XhmikosR
2020-05-22 17:12:14 +03:00
parent 34f6c753c7
commit 9c5fb734c4
+6 -8
View File
@@ -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 {