diff --git a/scripts/pi-hole/js/customdns.js b/scripts/pi-hole/js/customdns.js
index 572d844696..87d90917eb 100644
--- a/scripts/pi-hole/js/customdns.js
+++ b/scripts/pi-hole/js/customdns.js
@@ -30,7 +30,7 @@ function showAlert(type, message) {
return;
}
- if (messageElement != null) messageElement.html(message);
+ if (messageElement !== null) messageElement.html(message);
alertElement.fadeIn(200);
alertElement.delay(8000).fadeOut(2000);
diff --git a/scripts/pi-hole/js/db_lists.js b/scripts/pi-hole/js/db_lists.js
index 1b33643a78..c4a8c2f845 100644
--- a/scripts/pi-hole/js/db_lists.js
+++ b/scripts/pi-hole/js/db_lists.js
@@ -97,7 +97,7 @@ function updateTopClientsChart() {
.parent()
.remove();
var clienttable = $("#client-frequency").find("tbody:last");
- var client, percentage, clientname, clientip;
+ var client, percentage, clientname;
var sum = 0;
for (client in data.top_sources) {
if (Object.prototype.hasOwnProperty.call(data.top_sources, client)) {
@@ -117,10 +117,8 @@ function updateTopClientsChart() {
if (client.indexOf("|") > -1) {
var idx = client.indexOf("|");
clientname = client.substr(0, idx);
- clientip = client.substr(idx + 1, client.length - idx);
} else {
clientname = client;
- clientip = client;
}
var url = clientname;
diff --git a/scripts/pi-hole/js/db_queries.js b/scripts/pi-hole/js/db_queries.js
index 15af7cc9d6..57bad1d9b5 100644
--- a/scripts/pi-hole/js/db_queries.js
+++ b/scripts/pi-hole/js/db_queries.js
@@ -264,63 +264,54 @@ $(document).ready(function() {
tableApi = $("#all-queries").DataTable({
rowCallback: function(row, data) {
- var blocked, fieldtext, buttontext, color;
+ var fieldtext, buttontext, color;
switch (data[4]) {
case 1:
- blocked = true;
color = "red";
fieldtext = "Blocked (gravity)";
buttontext =
'';
break;
case 2:
- blocked = false;
color = "green";
fieldtext = "OK
(forwarded)";
buttontext =
'';
break;
case 3:
- blocked = false;
color = "green";
fieldtext = "OK
(cached)";
buttontext =
'';
break;
case 4:
- blocked = true;
color = "red";
fieldtext = "Blocked
(regex/wildcard)";
buttontext =
'';
break;
case 5:
- blocked = true;
color = "red";
fieldtext = "Blocked
(blacklist)";
buttontext =
'';
break;
case 6:
- blocked = true;
color = "red";
fieldtext = "Blocked
(external, IP)";
buttontext = "";
break;
case 7:
- blocked = true;
color = "red";
fieldtext = "Blocked
(external, NULL)";
buttontext = "";
break;
case 8:
- blocked = true;
color = "red";
fieldtext = "Blocked
(external, NXRA)";
buttontext = "";
break;
default:
- blocked = false;
color = "black";
fieldtext = "Unknown";
buttontext = "";
diff --git a/scripts/pi-hole/js/footer.js b/scripts/pi-hole/js/footer.js
index 72468a9fd3..1decdc68a6 100644
--- a/scripts/pi-hole/js/footer.js
+++ b/scripts/pi-hole/js/footer.js
@@ -34,6 +34,9 @@ function piholeChanged(action) {
ena.show();
dis.hide();
break;
+
+ default:
+ // nothing
}
}
@@ -86,6 +89,9 @@ function piholeChange(action, duration) {
}
});
break;
+
+ default:
+ // nothing
}
}
diff --git a/scripts/pi-hole/js/index.js b/scripts/pi-hole/js/index.js
index 157cf256ee..6d1be22838 100644
--- a/scripts/pi-hole/js/index.js
+++ b/scripts/pi-hole/js/index.js
@@ -7,8 +7,8 @@
// Define global variables
/* global Chart:false, updateSessionTimer:false */
-var timeLineChart, forwardDestinationChart;
-var queryTypePieChart, forwardDestinationPieChart, clientsChart;
+var forwardDestinationChart; // eslint-disable-line no-unused-vars
+var timeLineChart, queryTypePieChart, forwardDestinationPieChart, clientsChart;
function padNumber(num) {
return ("00" + num).substr(-2, 2);
@@ -723,9 +723,13 @@ function updateSummaryData(runOnce) {
"unique_clients"
].forEach(function(today) {
var todayElement = $("span#" + today);
- todayElement.text() !== data[today] &&
- todayElement.text() !== data[today] + "%" &&
+
+ if (
+ todayElement.text() !== data[today] &&
+ todayElement.text() !== data[today] + "%"
+ ) {
$("span#" + today).addClass("glow");
+ }
});
if (Object.prototype.hasOwnProperty.call(data, "dns_queries_all_types")) {