mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-30 01:05:39 +02:00
Merge branch '1375-Que-se-muestre-la-unidad-en-las-custom-graphs-dev' into 'develop'
added unit in custom graphs See merge request artica/pandorafms!979
This commit is contained in:
commit
1895bf3fe9
@ -1122,6 +1122,7 @@ function graphic_combined_module ($module_list, $weight_list, $period,
|
|||||||
if(!$fullscale){
|
if(!$fullscale){
|
||||||
$time_format_2 = '';
|
$time_format_2 = '';
|
||||||
$temp_range = $period;
|
$temp_range = $period;
|
||||||
|
$unit_list_aux = array();
|
||||||
|
|
||||||
if ($projection != false) {
|
if ($projection != false) {
|
||||||
if ($period < $prediction_period)
|
if ($period < $prediction_period)
|
||||||
@ -1370,6 +1371,10 @@ function graphic_combined_module ($module_list, $weight_list, $period,
|
|||||||
|
|
||||||
$agent_id = agents_get_agent_id ($agent_name);
|
$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
|
//Get and process module name
|
||||||
$module_name = io_safe_output(
|
$module_name = io_safe_output(
|
||||||
modules_get_agentmodule_name ($agent_module_id));
|
modules_get_agentmodule_name ($agent_module_id));
|
||||||
@ -1553,6 +1558,8 @@ function graphic_combined_module ($module_list, $weight_list, $period,
|
|||||||
|
|
||||||
if (!empty($unit_list) && $units_number == $module_number && isset($unit_list[$i])) {
|
if (!empty($unit_list) && $units_number == $module_number && isset($unit_list[$i])) {
|
||||||
$unit = $unit_list[$i];
|
$unit = $unit_list[$i];
|
||||||
|
}else{
|
||||||
|
$unit = $unit_list_aux[$i];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($projection == false or ($projection != false and $i == 0)) {
|
if ($projection == false or ($projection != false and $i == 0)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user