From 3f0430ab9de7b40ef68fe831008a58d3446145cc Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Thu, 26 Oct 2017 12:12:44 +0200 Subject: [PATCH] added unit in custom graphs --- pandora_console/include/functions_graph.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php index c97867733b..7e5030b24c 100644 --- a/pandora_console/include/functions_graph.php +++ b/pandora_console/include/functions_graph.php @@ -1069,6 +1069,7 @@ function graphic_combined_module ($module_list, $weight_list, $period, if(!$fullscale){ $time_format_2 = ''; $temp_range = $period; + $unit_list_aux = array(); if ($projection != false) { if ($period < $prediction_period) @@ -1317,6 +1318,10 @@ function graphic_combined_module ($module_list, $weight_list, $period, $agent_id = agents_get_agent_id ($agent_name); + if(empty($unit_list)){ + $unit_aux = modules_get_unit($agent_module_id); + array_push($unit_list_aux,$unit_aux); + } //Get and process module name $module_name = io_safe_output( modules_get_agentmodule_name ($agent_module_id)); @@ -1500,6 +1505,8 @@ function graphic_combined_module ($module_list, $weight_list, $period, if (!empty($unit_list) && $units_number == $module_number && isset($unit_list[$i])) { $unit = $unit_list[$i]; + }else{ + $unit = $unit_list_aux[$i]; } if ($projection == false or ($projection != false and $i == 0)) {