mirror of
https://github.com/pi-hole/web.git
synced 2025-12-23 04:08:39 +00:00
More codacy
This commit is contained in:
@@ -148,21 +148,23 @@ function updateForwardedOverTime() {
|
|||||||
{
|
{
|
||||||
if (!{}.hasOwnProperty.call(timestamps, j)) continue;
|
if (!{}.hasOwnProperty.call(timestamps, j)) continue;
|
||||||
var sum = 0.0;
|
var sum = 0.0;
|
||||||
for (var i in plotdata[j])
|
var key;
|
||||||
|
for (key in plotdata[j])
|
||||||
{
|
{
|
||||||
sum += plotdata[j][i];
|
if (!{}.hasOwnProperty.call(plotdata[j], key)) continue;
|
||||||
|
sum += plotdata[j][key];
|
||||||
}
|
}
|
||||||
var dd = [];
|
var dd = [];
|
||||||
for (var i in plotdata[j])
|
for (key in plotdata[j])
|
||||||
{
|
{
|
||||||
if (!{}.hasOwnProperty.call(plotdata[j], i)) continue;
|
if (!{}.hasOwnProperty.call(plotdata[j], key)) continue;
|
||||||
var singlepoint = plotdata[j][i];
|
var singlepoint = plotdata[j][key];
|
||||||
if(singlepoint === 0)
|
if(singlepoint === 0)
|
||||||
{
|
{
|
||||||
// Don't plot this line
|
// Don't plot this line
|
||||||
singlepoint = NaN;
|
singlepoint = NaN;
|
||||||
}
|
}
|
||||||
forwardDestinationChart.data.datasets[i].data.push(singlepoint/sum);
|
forwardDestinationChart.data.datasets[key].data.push(singlepoint/sum);
|
||||||
}
|
}
|
||||||
|
|
||||||
var d = new Date(1000*parseInt(timestamps[j]));
|
var d = new Date(1000*parseInt(timestamps[j]));
|
||||||
|
|||||||
Reference in New Issue
Block a user