From 079f81e62a46f33e2351054b3f234d1caaec87c8 Mon Sep 17 00:00:00 2001 From: Alejandro Gallardo Escobar Date: Wed, 5 Aug 2015 13:58:15 +0200 Subject: [PATCH 1/2] Added support to the transform property for old browsers (and for others that does not follow the standards, like Safari) --- pandora_console/include/styles/pandora.css | 26 ++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index b0404b67c5..37c905b2e3 100755 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -454,6 +454,12 @@ div#login_in, #login_f { .version_login{ transform: rotate(36deg); + /* Old browser support */ + -ms-transform: rotate(36deg); /* IE */ + -moz-transform: rotate(36deg); /* FF */ + -o-transform: rotate(36deg); /* Opera */ + -webkit-transform: rotate(36deg); /* Safari and Chrome */ + float: right; margin-top: 18px; width: 80px; @@ -3056,22 +3062,34 @@ table#policy_modules td * { @-webkit-keyframes spinner { 0% { - -webkit-transform: rotate(0deg); + -ms-transform: rotate(0deg); /* IE */ + -moz-transform: rotate(0deg); /* FF */ + -o-transform: rotate(0deg); /* Opera */ + -webkit-transform: rotate(0deg); /* Safari and Chrome */ transform: rotate(0deg); } 100% { - -webkit-transform: rotate(359deg); + -ms-transform: rotate(359deg); /* IE */ + -moz-transform: rotate(359deg); /* FF */ + -o-transform: rotate(359deg); /* Opera */ + -webkit-transform: rotate(359deg); /* Safari and Chrome */ transform: rotate(359deg); } } @keyframes spinner { 0% { - -webkit-transform: rotate(0deg); + -ms-transform: rotate(0deg); /* IE */ + -moz-transform: rotate(0deg); /* FF */ + -o-transform: rotate(0deg); /* Opera */ + -webkit-transform: rotate(0deg); /* Safari and Chrome */ transform: rotate(0deg); } 100% { - -webkit-transform: rotate(359deg); + -ms-transform: rotate(359deg); /* IE */ + -moz-transform: rotate(359deg); /* FF */ + -o-transform: rotate(359deg); /* Opera */ + -webkit-transform: rotate(359deg); /* Safari and Chrome */ transform: rotate(359deg); } } From 4d62e41d242c068b70aa95df0a53f35debc61dd5 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Wed, 5 Aug 2015 14:01:37 +0200 Subject: [PATCH 2/2] Added functions in modules to get table of data and raw data. (cherry picked from commit 2f98c1fc863a1ed4ff6a350be0cc84ba16064667) --- pandora_console/include/functions_modules.php | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/pandora_console/include/functions_modules.php b/pandora_console/include/functions_modules.php index 4373058d11..9401a6e74b 100755 --- a/pandora_console/include/functions_modules.php +++ b/pandora_console/include/functions_modules.php @@ -762,6 +762,56 @@ function modules_get_agentmodule ($id_agentmodule) { } } +function modules_get_table_data($id_agent_module) { + $id_type = db_get_value('id_tipo_modulo', + 'tagente_modulo', 'id_agente_modulo', $id_agent_module); + + $name_type = db_get_value('nombre', 'ttipo_modulo', 'id_tipo', $id_type); + + $chunks = explode('_', $name_type); + $subtype = end($chunks); + + + switch ($subtype) { + case 'data': + case 'proc': + case 'icmp': + case 'tcp': + case 'snmp': + case 'inc': + // Numeric + return "tagente_datos"; + break; + case 'log4x': + // Log4x + return "tagente_datos_log4x"; + break; + case 'string': + // String + return "tagente_datos_string"; + break; + default: + return null; + break; + } +} + +function modules_get_raw_data($id_agent_module, $date_init, $date_end) { + $table = modules_get_table_data($id_agent_module); + + $datelimit = $date_init - $date_end; + $search_in_history_db = db_search_in_history_db($datelimit); + + $data = db_get_all_rows_sql(' + SELECT * + FROM ' . $table . ' + WHERE id_agente_modulo = ' . $id_agent_module . ' + AND utimestamp >= ' . $date_init . ' + AND utimestamp <= ' . $date_end, $search_in_history_db); + + return $data; +} + function modules_get_agent_group($id_agent_module) { $return = false;