diff --git a/pandora_console/include/ajax/graph.ajax.php b/pandora_console/include/ajax/graph.ajax.php index 3daacb97d2..7b96d1e85b 100644 --- a/pandora_console/include/ajax/graph.ajax.php +++ b/pandora_console/include/ajax/graph.ajax.php @@ -14,7 +14,7 @@ require_once 'include/functions_custom_graphs.php'; require_once 'include/functions_graph.php'; $save_custom_graph = (bool) get_parameter('save_custom_graph'); -$print_custom_graph = (bool) get_parameter('print_custom_graph'); +$print_custom_graph = (bool) get_parameter('print_custom_graph', false); $print_sparse_graph = (bool) get_parameter('print_sparse_graph'); $get_graphs = (bool) get_parameter('get_graphs_container'); @@ -52,13 +52,13 @@ if ($save_custom_graph) { return; } -if ($print_custom_graph) { +if ($print_custom_graph === true) { ob_clean(); $width_value = (int) get_parameter('width', CHART_DEFAULT_WIDTH); if ($width_value === -1) { - $width_value = ''; + $width_value = '95%'; } $params = [ @@ -214,7 +214,7 @@ if ($get_graphs) { ]; $table .= grafico_modulo_sparse($params); - $contador --; + $contador--; } // $table .= "
"; @@ -253,7 +253,7 @@ if ($get_graphs) { $params_combined ); - $contador --; + $contador--; } break; @@ -323,7 +323,7 @@ if ($get_graphs) { ]; $table .= grafico_modulo_sparse($params); - $contador --; + $contador--; } } break; diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php index 99dd0cad88..955b496d31 100644 --- a/pandora_console/include/functions_graph.php +++ b/pandora_console/include/functions_graph.php @@ -1444,7 +1444,7 @@ function graphic_combined_module( array_push($modules, $modulepush); array_push($weights, $source['weight']); - if ($source['label'] != '' || $params_combined['labels']) { + if (empty($source['label']) === false || $params_combined['labels']) { $agent_description = agents_get_description($id_agent); $agent_group = agents_get_agent_group($id_agent); $agent_address = agents_get_address($id_agent);