Fixed problems with simple value, when this value is a string. Tiquet: #2999

(cherry picked from commit 86f6fa6665)
This commit is contained in:
m-lopez-f 2015-11-25 10:43:47 +01:00
parent 84615a259d
commit 7acd0c7446
1 changed files with 8 additions and 4 deletions

View File

@ -1093,7 +1093,8 @@ function visual_map_get_simple_value($type, $id_module, $period = SECONDS_1DAY)
$value = __('Unknown');
}
else {
$value = format_for_graph($value, 2);
if ( is_numeric($value) )
$value = format_for_graph($value, 2);
if (!empty($unit_text)) {
$value .= " " . $unit_text;
}
@ -1106,7 +1107,8 @@ function visual_map_get_simple_value($type, $id_module, $period = SECONDS_1DAY)
$value = __('Unknown');
}
else {
$value = format_for_graph($value, 2);
if ( is_numeric($value) )
$value = format_for_graph($value, 2);
if (!empty($unit_text))
$value .= " " . $unit_text;
}
@ -1118,7 +1120,8 @@ function visual_map_get_simple_value($type, $id_module, $period = SECONDS_1DAY)
$value = __('Unknown');
}
else {
$value = format_for_graph($value, 2);
if ( is_numeric($value) )
$value = format_for_graph($value, 2);
if (!empty($unit_text))
$value .= " " . $unit_text;
}
@ -1130,7 +1133,8 @@ function visual_map_get_simple_value($type, $id_module, $period = SECONDS_1DAY)
$value = __('Unknown');
}
else {
$value = format_for_graph($value, 2);
if ( is_numeric($value) )
$value = format_for_graph($value, 2);
if (!empty($unit_text))
$value .= " " . $unit_text;
}