diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php index 60cdd89528..01b8407aa0 100644 --- a/pandora_console/include/functions_graph.php +++ b/pandora_console/include/functions_graph.php @@ -1025,10 +1025,17 @@ function graphic_combined_module ($module_list, $weight_list, $period, elseif ($temp_range <= SECONDS_1MONTH) { $time_format = 'M d'; $time_format_2 = 'H\h'; - } - else { + } + elseif ($temp_range <= SECONDS_1MONTH) { $time_format = 'M d'; $time_format_2 = 'H\h'; + } + elseif ($period < SECONDS_6MONTHS) { + $time_format = 'M d'; + $time_format_2 = 'H\h'; + } + else { + $time_format = "M Y"; } // Set variables @@ -3807,9 +3814,12 @@ function grafico_modulo_boolean_data ($agent_module_id, $period, $show_events, } elseif ($period < SECONDS_1MONTH) { $time_format = 'M d H\h'; - } + } + elseif ($period < SECONDS_6MONTHS) { + $time_format = "M d H\h"; + } else { - $time_format = 'M d H\h'; + $time_format = "M Y"; } $timestamp_short = date($time_format, $timestamp); @@ -3930,8 +3940,11 @@ function grafico_modulo_boolean_data ($agent_module_id, $period, $show_events, elseif ($period < SECONDS_1MONTH) { $time_format = 'M d H\h'; } + elseif ($period < SECONDS_6MONTHS) { + $time_format = "M d H\h"; + } else { - $time_format = 'M d H\h'; + $time_format = "M Y"; } // Flash chart @@ -4150,8 +4163,11 @@ function graph_netflow_aggregate_area ($data, $period, $width, $height, $unit = elseif ($period < SECONDS_1MONTH) { $chart_time_format = 'M d H\h'; } + elseif ($period < SECONDS_6MONTHS) { + $chart_time_format = "M d H\h"; + } else { - $chart_time_format = 'M d H\h'; + $chart_time_format = "M Y"; } // Calculate source indexes @@ -4276,8 +4292,11 @@ function graph_netflow_total_area ($data, $period, $width, $height, $unit = '', elseif ($period < SECONDS_1MONTH) { $chart_time_format = 'M d H\h'; } - else { - $chart_time_format = 'M d H\h'; + elseif ($period < SECONDS_6MONTHS) { + $chart_time_format = "M d H\h"; + } + else { + $chart_time_format = "M Y"; } // Calculate min, max and avg values @@ -4572,8 +4591,11 @@ function grafico_modulo_string ($agent_module_id, $period, $show_events, elseif ($period < SECONDS_1MONTH) { $time_format = 'M d H\h'; } + elseif ($period < SECONDS_6MONTHS) { + $time_format = "M d H\h"; + } else { - $time_format = 'M d H\h'; + $time_format = "M Y"; } $timestamp_short = date($time_format, $timestamp); @@ -4747,8 +4769,11 @@ function graphic_module_events ($id_module, $width, $height, $period = 0, $homeu elseif ($period < SECONDS_1MONTH) { $time_format = 'M d H\h'; } - else { - $time_format = 'M d H\h'; + elseif ($period < SECONDS_6MONTHS) { + $time_format = "M d H\h"; + } + else { + $time_format = "M Y"; } $legend = array();