mirror of
https://github.com/pi-hole/web.git
synced 2024-12-06 19:36:21 +01:00
Codacy
This commit is contained in:
@@ -107,9 +107,13 @@ function updateQueryTypes() {
|
||||
var v = [], c = [], k = [];
|
||||
// Collect values and colors, and labels
|
||||
if(data.hasOwnProperty("querytypes"))
|
||||
{
|
||||
iter = data.querytypes;
|
||||
}
|
||||
else
|
||||
{
|
||||
iter = data;
|
||||
}
|
||||
$.each(iter, function(key , value) {
|
||||
v.push(value);
|
||||
c.push(colors.shift());
|
||||
@@ -190,9 +194,13 @@ function updateForwardDestinations() {
|
||||
var v = [], c = [], k = [], iter;
|
||||
// Collect values and colors, immediately push individual labels
|
||||
if(data.hasOwnProperty("forward_destinations"))
|
||||
{
|
||||
iter = data.forward_destinations;
|
||||
}
|
||||
else
|
||||
{
|
||||
iter = data;
|
||||
}
|
||||
$.each(iter, function(key , value) {
|
||||
v.push(value);
|
||||
c.push(colors.shift());
|
||||
|
||||
@@ -89,7 +89,7 @@ function handleAjaxError( xhr, textStatus, error ) {
|
||||
}
|
||||
else
|
||||
{
|
||||
alert( "An unknown error occured while loading the data." );
|
||||
alert( "An unknown error occured while loading the data.\n"+xhr.responseText );
|
||||
}
|
||||
$("#all-queries_processing").hide();
|
||||
tableApi.clear();
|
||||
|
||||
Reference in New Issue
Block a user