From e0880b99df1e4d10617b92d3c603cf498a9cad45 Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Diaz Date: Tue, 13 Oct 2015 12:15:03 +0200 Subject: [PATCH] Fixed module proc data in tree view. Ticket #2713 --- .../include/functions_treeview.php | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/pandora_console/include/functions_treeview.php b/pandora_console/include/functions_treeview.php index f8dc28c8d9..a046ada35d 100755 --- a/pandora_console/include/functions_treeview.php +++ b/pandora_console/include/functions_treeview.php @@ -140,11 +140,21 @@ function treeview_printModuleTable($id_module, $server_data = false) { // Data $last_data = db_get_row_filter ('tagente_estado', array('id_agente_modulo' => $module['id_agente_modulo'], 'order' => array('field' => 'id_agente_estado', 'order' => 'DESC'))); - if (is_numeric($last_data["datos"])) - $data = "" . format_numeric($last_data["datos"]) . ""; - else - $data = "" . substr(io_safe_output($last_data['datos']),0,12) . ""; - + if ($config["render_proc"]) { + if (is_numeric($last_data["datos"]) && $last_data["datos"] == 1) { + $data = "" . $config["render_proc_ok"] . ""; + } + else { + $data = "" . $config["render_proc_fail"] . ""; + } + } + else { + if (is_numeric($last_data["datos"])) + $data = "" . format_numeric($last_data["datos"]) . ""; + else + $data = "" . substr(io_safe_output($last_data['datos']),0,12) . ""; + } + echo ''.__('Last data').''; echo '';