diff --git a/scripts/pi-hole/js/index.js b/scripts/pi-hole/js/index.js index 9bd1401a..002fec42 100644 --- a/scripts/pi-hole/js/index.js +++ b/scripts/pi-hole/js/index.js @@ -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()); diff --git a/scripts/pi-hole/js/queries.js b/scripts/pi-hole/js/queries.js index f5abc74e..073ed50a 100644 --- a/scripts/pi-hole/js/queries.js +++ b/scripts/pi-hole/js/queries.js @@ -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();