Merge branch 'ent-4088-Falta-campo-estado-en-modulos-plugin-erroneos' into 'develop'

Added image for unknown and no data status - 4088

See merge request artica/pandorafms!2484
This commit is contained in:
Daniel Rodriguez 2019-06-11 12:07:45 +02:00
commit 1436ec0782
1 changed files with 28 additions and 0 deletions

View File

@ -1389,6 +1389,34 @@ if (!empty($result)) {
true
);
}
} else if ($row['estado'] == 3) {
if (is_numeric($row['datos'])) {
$data[6] = ui_print_status_image(
STATUS_MODULE_UNKNOWN,
__('UNKNOWN').': '.remove_right_zeros(number_format($row['datos'], $config['graph_precision'])),
true
);
} else {
$data[6] = ui_print_status_image(
STATUS_MODULE_UNKNOWN,
__('UNKNOWN').': '.$row['datos'],
true
);
}
} else if ($row['estado'] == 4) {
if (is_numeric($row['datos'])) {
$data[6] = ui_print_status_image(
STATUS_MODULE_NO_DATA,
__('NO DATA').': '.remove_right_zeros(number_format($row['datos'], $config['graph_precision'])),
true
);
} else {
$data[6] = ui_print_status_image(
STATUS_MODULE_NO_DATA,
__('NO DATA').': '.$row['datos'],
true
);
}
} else {
$last_status = modules_get_agentmodule_last_status(
$row['id_agente_modulo']