diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php index 24b3693533..36b36a345d 100644 --- a/pandora_console/include/functions_graph.php +++ b/pandora_console/include/functions_graph.php @@ -1704,14 +1704,16 @@ function graphic_combined_module ( if ($do_it_warning_min && $do_it_warning_max && $do_it_warning_inverse) { $yellow_threshold = $compare_warning; - $threshold_data['yellow_up'] = $yellow_up; - $threshold_data['yellow_inverse'] = (bool)$yellow_inverse; + $threshold_data['yellow_threshold'] = $compare_warning; + $threshold_data['yellow_up'] = $yellow_up; + $threshold_data['yellow_inverse'] = (bool)$yellow_inverse; } if ($do_it_critical_min && $do_it_critical_max && $do_it_critical_inverse) { $red_threshold = $compare_critical; - $threshold_data['red_up'] = $red_up; - $threshold_data['red_inverse'] = (bool)$red_inverse; + $threshold_data['red_threshold'] = $compare_critical; + $threshold_data['red_up'] = $red_up; + $threshold_data['red_inverse'] = (bool)$red_inverse; } $params['threshold_data'] = $threshold_data; diff --git a/pandora_console/include/graphs/functions_flot.php b/pandora_console/include/graphs/functions_flot.php index 87e7b0d9ea..22f6aba2ed 100644 --- a/pandora_console/include/graphs/functions_flot.php +++ b/pandora_console/include/graphs/functions_flot.php @@ -141,10 +141,21 @@ function flot_area_graph ( } if(isset($params['graph_combined']) && $params['graph_combined'] && (!isset($params['from_interface']) || !$params['from_interface']) ){ - $yellow_up = 0; - $red_up = 0; - $yellow_inverse = false; - $red_inverse = false; + if( isset($params['threshold_data']) && is_array($params['threshold_data'])){ + $yellow_threshold = $params['threshold_data']['yellow_threshold']; + $red_threshold = $params['threshold_data']['red_threshold']; + $yellow_up = $params['threshold_data']['yellow_up']; + $red_up = $params['threshold_data']['red_up']; + $yellow_inverse = $params['threshold_data']['yellow_inverse']; + $red_inverse = $params['threshold_data']['red_inverse']; + } + else{ + $yellow_up = 0; + $red_up = 0; + $yellow_inverse = false; + $red_inverse = false; + } + } elseif(!isset($params['combined']) || !$params['combined']){ $yellow_threshold = $data_module_graph['w_min']; @@ -164,10 +175,12 @@ function flot_area_graph ( } elseif(isset($params['from_interface']) && $params['from_interface']){ if( isset($params['threshold_data']) && is_array($params['threshold_data'])){ - $yellow_up = $params['threshold_data']['yellow_up']; - $red_up = $params['threshold_data']['red_up']; - $yellow_inverse = $params['threshold_data']['yellow_inverse']; - $red_inverse = $params['threshold_data']['red_inverse']; + $yellow_threshold = $params['threshold_data']['yellow_threshold']; + $red_threshold = $params['threshold_data']['red_threshold']; + $yellow_up = $params['threshold_data']['yellow_up']; + $red_up = $params['threshold_data']['red_up']; + $yellow_inverse = $params['threshold_data']['yellow_inverse']; + $red_inverse = $params['threshold_data']['red_inverse']; } else{ $yellow_up = 0;