mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-04-08 18:55:09 +02:00
Merge branch 'ent-2707-System-Uptime-data-show-bug' into 'develop'
Fixed bug data in history show See merge request artica/pandorafms!2504
This commit is contained in:
commit
ec73be66f5
@ -392,11 +392,16 @@ if (check_login()) {
|
||||
switch ($row['module_type']) {
|
||||
case 15:
|
||||
$value = db_get_value('snmp_oid', 'tagente_modulo', 'id_agente_modulo', $module_id);
|
||||
// System Uptime:
|
||||
// In case of System Uptime module, shows data in format "Days hours minutes seconds" if and only if
|
||||
// selected module unit is "_timeticks_"
|
||||
// Take notice that selected unit may not be postrocess unit
|
||||
if ($value == '.1.3.6.1.2.1.1.3.0' || $value == '.1.3.6.1.2.1.25.1.1.0') {
|
||||
if ($post_process > 0) {
|
||||
$data[] = human_milliseconds_to_string(($row['data'] / $post_process));
|
||||
$data_macro = modules_get_unit_macro($row[$attr[0]], $unit);
|
||||
if ($data_macro) {
|
||||
$data[] = $data_macro;
|
||||
} else {
|
||||
$data[] = human_milliseconds_to_string($row['data']);
|
||||
$data[] = remove_right_zeros(number_format($row[$attr[0]], $config['graph_precision']));
|
||||
}
|
||||
} else {
|
||||
$data[] = remove_right_zeros(number_format($row[$attr[0]], $config['graph_precision']));
|
||||
|
@ -2230,6 +2230,7 @@ function modules_get_agentmodule_data(
|
||||
'module_name' => $values[$key]['module_name'],
|
||||
'agent_id' => $values[$key]['agent_id'],
|
||||
'agent_name' => $values[$key]['agent_name'],
|
||||
'module_type' => $values[$key]['module_type'],
|
||||
];
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user