diff --git a/pandora_console/include/graphs/pandora.d3.js b/pandora_console/include/graphs/pandora.d3.js index a334a85357..9607397ea2 100644 --- a/pandora_console/include/graphs/pandora.d3.js +++ b/pandora_console/include/graphs/pandora.d3.js @@ -1169,7 +1169,7 @@ function createGauges(data, width, height, font_size, no_data_image, font) { maxinum, valor; - for (key in data) { + for (var key in data) { nombre = data[key].gauge; label = data[key].label; @@ -1189,8 +1189,8 @@ function createGauges(data, width, height, font_size, no_data_image, font) { mininum = round_with_decimals(parseFloat(data[key].min)); maxinum = round_with_decimals(parseFloat(data[key].max)); - critical_inverse = parseInt(data[key].critical_inverse); - warning_inverse = parseInt(data[key].warning_inverse); + var critical_inverse = parseInt(data[key].critical_inverse); + var warning_inverse = parseInt(data[key].warning_inverse); valor = round_with_decimals(data[key].value); diff --git a/pandora_console/include/javascript/pandora.js b/pandora_console/include/javascript/pandora.js index 6a29b6b552..391ed961ef 100644 --- a/pandora_console/include/javascript/pandora.js +++ b/pandora_console/include/javascript/pandora.js @@ -1763,7 +1763,7 @@ function round_with_decimals(value, multiplier) { if (typeof multiplier === "undefined") multiplier = 1; // Return non numeric types without modification - if (typeof value !== "number" || Number.isNaN(value)) { + if (typeof value !== "number" || isNaN(value)) { return value; }