Added fixes to new report item
This commit is contained in:
parent
b912834ce7
commit
cc1ab47a65
|
@ -5503,7 +5503,11 @@ function reporting_increment ($report, $content) {
|
|||
|
||||
$last_data = db_get_value_sql('SELECT datos FROM tagente_datos WHERE id_agente_modulo = ' . $id_agent_module . ' ORDER BY utimestamp DESC');
|
||||
|
||||
if (is_numeric($old_data) && is_numeric($last_data)) {
|
||||
if ($old_data === false || $last_data === false) {
|
||||
$return["data"]['message'] = __('The monitor have no data in this range of dates or monitor type is not numeric');
|
||||
$return["data"]['error'] = true;
|
||||
}
|
||||
else if (is_numeric($old_data) && is_numeric($last_data)) {
|
||||
$return["data"]['old'] = $old_data;
|
||||
$return["data"]['now'] = $last_data;
|
||||
$increment = $old_data - $last_data;
|
||||
|
|
|
@ -2257,8 +2257,8 @@ function reporting_html_increment(&$table, $item) {
|
|||
$table1_row = array();
|
||||
$table1_row[0] = agents_get_alias($item['id_agent']);
|
||||
$table1_row[1] = modules_get_agentmodule_name($item['id_agent_module']);
|
||||
$table1_row[2] = date("F j, Y, g:i a", $item['from']);
|
||||
$table1_row[3] = date("F j, Y, g:i a", $item['to']);
|
||||
$table1_row[2] = date("F j, Y, G:i", $item['from']);
|
||||
$table1_row[3] = date("F j, Y, G:i", $item['to']);
|
||||
$table1_row[4] = $item["data"]['old'];
|
||||
$table1_row[5] = $item["data"]['now'];
|
||||
if ($item["data"]['inc'] == 'negative') {
|
||||
|
|
Loading…
Reference in New Issue