Removed last value on visual console boolean static graphs
This commit is contained in:
parent
3493b9c15c
commit
6c519ff08a
|
@ -987,6 +987,28 @@ function modules_is_string($id_agentmodule) {
|
||||||
return modules_is_string_type($id_type);
|
return modules_is_string_type($id_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Know if a module type is a boolean or not
|
||||||
|
*
|
||||||
|
* @param int $id_type Type id
|
||||||
|
*
|
||||||
|
* @return bool true if boolean. false if not
|
||||||
|
*/
|
||||||
|
function modules_is_boolean_type ($id_type) {
|
||||||
|
$type_name = modules_get_type_name($id_type);
|
||||||
|
|
||||||
|
return (bool)preg_match('/_proc$/', $type_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
function modules_is_boolean($id_agentmodule) {
|
||||||
|
$id_type = db_get_value('id_tipo_modulo',
|
||||||
|
'tagente_modulo', 'id_agente_modulo',
|
||||||
|
(int) $id_agentmodule);
|
||||||
|
|
||||||
|
return modules_is_boolean_type($id_type);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the icon of a module type
|
* Get the icon of a module type
|
||||||
*
|
*
|
||||||
|
|
|
@ -1583,8 +1583,12 @@ function visual_map_print_item($mode = "read", $layoutData,
|
||||||
if (!empty($unit_text))
|
if (!empty($unit_text))
|
||||||
$value .= " " . $unit_text;
|
$value .= " " . $unit_text;
|
||||||
|
|
||||||
$img_style_title .= " <br>" . __("Last value: ") .
|
// Hide value on boolean modules
|
||||||
$value;
|
if (!modules_is_boolean($layoutData['id_agente_modulo'])) {
|
||||||
|
$img_style_title .=
|
||||||
|
" <br>" . __("Last value: ")
|
||||||
|
. $value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(get_parameter('action') == 'edit'){
|
if(get_parameter('action') == 'edit'){
|
||||||
|
|
Loading…
Reference in New Issue