Fixed the string module data in reports of items 'general'. #1819

(cherry picked from commit 609802eb44)
This commit is contained in:
mdtrooper 2015-02-23 15:13:21 +01:00
parent 30a05aa62f
commit 6446d9d93e
2 changed files with 22 additions and 3 deletions

View File

@ -866,6 +866,14 @@ function modules_is_string_type ($id_type) {
return (bool)preg_match('/_string$/', $type_name);
}
function modules_is_string($id_agentmodule) {
$id_type = db_get_value('id_tipo_modulo',
'tagente_modulo', 'id_agente_modulo',
(int) $id_agentmodule);
return modules_is_string_type($id_type);
}
/**
* Get the icon of a module type
*

View File

@ -5461,8 +5461,13 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
$data[3] = '--';
}
else {
$data[3] = format_for_graph($d, 2) . " " .
$units[$i];
if (!is_numeric($d)) {
$data[3] = $d;
}
else {
$data[3] = format_for_graph($d, 2) . " " .
$units[$i];
}
}
array_push ($table1->data, $data);
$i++;
@ -5631,7 +5636,13 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
$data[$i] = '--';
}
else {
$data[$i] = format_for_graph($value_res, 2) . " " . $unit;
if (!is_numeric($d)) {
$data[$i] = $value_res;
}
else {
$data[$i] = format_for_graph($value_res, 2) . " " . $unit;
}
}
$found = true;
}