From 05f40a21fcdd6cf3d6f0d0eec94a51c5e912ffc5 Mon Sep 17 00:00:00 2001 From: Alejandro Gallardo Escobar Date: Wed, 15 Jul 2015 16:55:08 +0200 Subject: [PATCH] Now the data column of the module's raw data dialog are casted to double when is numeric --- pandora_console/include/ajax/module.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/pandora_console/include/ajax/module.php b/pandora_console/include/ajax/module.php index a4360c388b..98a9a8ab6c 100755 --- a/pandora_console/include/ajax/module.php +++ b/pandora_console/include/ajax/module.php @@ -57,7 +57,7 @@ if ($get_agent_modules_json_for_multiple_agents) { $result = array(); - if (defined("METACONSOLE")) { + if (is_metaconsole()) { $rows = db_get_all_rows_filter('tmetaconsole_agent', array("id_tagente" => $idAgents), @@ -194,7 +194,7 @@ if ($get_module_detail) { $agentId = (int) get_parameter("id_agent"); $server_name = (string) get_parameter('server_name'); - if (defined ('METACONSOLE')) { + if (is_metaconsole()) { $server = metaconsole_get_connection ($server_name); if (metaconsole_connect($server) != NOERR) @@ -381,10 +381,15 @@ if ($get_module_detail) { else { // Just a string of alphanumerical data... just do print //Fixed the data from Selenium Plugin - if ($row[$attr[0]] != strip_tags($row[$attr[0]])) + if ($row[$attr[0]] != strip_tags($row[$attr[0]])) { $data[] = io_safe_input($row[$attr[0]]); - else + } + else if (is_numeric($row[$attr[0]])) { + $data[] = (double) $row[$attr[0]]; + } + else { $data[] = $row[$attr[0]]; + } } } @@ -401,7 +406,7 @@ if ($get_module_detail) { html_print_table($table); } - if (defined ('METACONSOLE')) + if (is_metaconsole()) metaconsole_restore_db(); return;