mirror of
https://github.com/pi-hole/web.git
synced 2025-12-24 12:48:29 +00:00
Add missing radix information in parseInt().
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
@@ -100,14 +100,14 @@ function updateQueriesOverTime() {
|
||||
|
||||
for (hour in data.domains_over_time[0]) {
|
||||
if (Object.prototype.hasOwnProperty.call(data.domains_over_time[0], hour)) {
|
||||
dates.push(parseInt(data.domains_over_time[0][hour]));
|
||||
dates.push(parseInt(data.domains_over_time[0][hour], 10));
|
||||
}
|
||||
}
|
||||
|
||||
for (hour in data.ads_over_time[0]) {
|
||||
if (Object.prototype.hasOwnProperty.call(data.ads_over_time[0], hour)) {
|
||||
if (dates.indexOf(parseInt(data.ads_over_time[0][hour])) === -1) {
|
||||
dates.push(parseInt(data.ads_over_time[0][hour]));
|
||||
if (dates.indexOf(parseInt(data.ads_over_time[0][hour], 10)) === -1) {
|
||||
dates.push(parseInt(data.ads_over_time[0][hour], 10));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -248,8 +248,8 @@ $(function () {
|
||||
label: function (tooltipItems, data) {
|
||||
if (tooltipItems.datasetIndex === 0) {
|
||||
var percentage = 0;
|
||||
var permitted = parseInt(data.datasets[1].data[tooltipItems.index]);
|
||||
var blocked = parseInt(data.datasets[0].data[tooltipItems.index]);
|
||||
var permitted = parseInt(data.datasets[1].data[tooltipItems.index], 10);
|
||||
var blocked = parseInt(data.datasets[0].data[tooltipItems.index], 10);
|
||||
if (permitted + blocked > 0) {
|
||||
percentage = (100 * blocked) / (permitted + blocked);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user