diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 2842dce58b..5cbfdcb55f 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,16 @@ +2013-01-29 Miguel de Dios + + * godmode/modules/manage_network_components_form.php, + godmode/servers/manage_recontask.php, + godmode/servers/manage_recontask_form.php, operation/menu.php, + operation/agentes/status_monitor.php, + operation/agentes/exportdata.excel.php, + operation/agentes/datos_agente.php, + operation/agentes/estado_generalagente.php, + operation/agentes/estado_agente.php, general/login_help_dialog.php, + general/shortcut_bar.php: uploaded a lost changes for to clean the + source code structure. + 2013-01-28 Miguel de Dios * include/functions_reporting.php: fixed the calculate the min, diff --git a/pandora_console/general/login_help_dialog.php b/pandora_console/general/login_help_dialog.php index 2f04369030..d15cbf0e34 100644 --- a/pandora_console/general/login_help_dialog.php +++ b/pandora_console/general/login_help_dialog.php @@ -22,24 +22,24 @@ global $config; if (is_ajax()) { $skip_login_help = get_parameter('skip_login_help', 0); - + // Updates config['skip_login_help_dialog'] in order to don't show login help message if ($skip_login_help) { if (isset ($config['skip_login_help_dialog'])) - $result_config = db_process_sql_update('tconfig', array("value" => 1), array("token" => "skip_login_help_dialog")); + $result_config = db_process_sql_update('tconfig', array("value" => 1), array("token" => "skip_login_help_dialog")); else $result_config = db_process_sql_insert ('tconfig', array ("value" => 1, "token" => "skip_login_help_dialog")); } - + return; } // Prints help dialog information echo '
'; - + echo '
'; echo '' . __('If this is your first time with Pandora FMS, we propose you a few links to learn more about Pandora FMS. Monitoring could be overwhelm, but take your time to learn how to use the power of Pandora!') . ''; - echo '
'; + echo '
'; echo '
'; echo ''; @@ -61,7 +61,7 @@ echo '
'; echo ''; echo ''; - echo '
'; + echo ''; echo ''; echo '
'; echo '
'; - echo '
'; - - echo '
'; + echo '
'; + + echo '
'; echo '
'; html_print_checkbox('skip_login_help', 1, false, false, false, 'cursor: \'pointer\''); echo ' ' .__("Click here to don't show again this message") . ''; @@ -99,18 +99,18 @@ echo '
'; /* "; + echo ""; } } html_print_image("images/bell.png", false, array("title" => __("Alerts fired"), "style" => "margin-bottom: -5px;")); @@ -163,17 +163,17 @@ $own_info = get_user_info ($config['id_user']); // If user is admin can see all groups if ($own_info['is_admin'] || check_acl ($config['id_user'], 0, "PM")){ - echo ""; + echo ""; } else { $own_groups = array_keys(users_get_groups($config['id_user'], "IR", false)); if (!empty($own_groups)){ $events_group = array_shift($own_groups); - echo ""; - } + echo ""; + } } html_print_image("images/lightning_go.png", false, array("title" => __("Critical events"), "style" => "margin-bottom: -5px;")); -echo " "; +echo " "; // Calculate critical events (not validated) $own_info = get_user_info ($config['id_user']); @@ -190,14 +190,14 @@ if ($shortcut_events == false) $critical_events = 0; foreach($shortcut_events as $event){ - if ($event['criticity'] == 4 and $event['estado'] == 0){ + if ($event['criticity'] == 4 and $event['estado'] == 0) { $critical_events++; } } echo "" . $critical_events . ""; echo ""; -echo "     "; +echo "     "; // Calculate opened incidents (id integria incidents are not enabled) if ($config['integria_enabled'] == 0){ echo ""; @@ -223,7 +223,7 @@ if ($config['integria_enabled'] == 0){ echo "" . $shortcut_incidents . ""; echo ""; - echo "     "; + echo "     "; } echo "   "; echo "|"; @@ -291,7 +291,7 @@ echo "
"; } else{ $('#shotcut_bar').css('height', '20px'); - $('#shortcut_button').css('height', '40px'); + $('#shortcut_button').css('height', '40px'); } } @@ -306,7 +306,7 @@ echo ""; }, function (data) { } - ); + ); } else { $('#shotcut_bar').css({height: 20}).animate({ height: '0' }, 900); @@ -322,7 +322,7 @@ echo ""; } }); }); - + var id_user = $('#hidden-shortcut_id_user').val(); function shortcut_check_alerts() { jQuery.post ("ajax.php", diff --git a/pandora_console/godmode/modules/manage_network_components_form.php b/pandora_console/godmode/modules/manage_network_components_form.php index 90ecad745a..3ffe9e1973 100644 --- a/pandora_console/godmode/modules/manage_network_components_form.php +++ b/pandora_console/godmode/modules/manage_network_components_form.php @@ -425,13 +425,13 @@ $(document).ready (function () { $("input[name=snmp3_auth_user]").css({backgroundColor: '#fff'}); $("input[name=snmp3_auth_user]").removeAttr('disabled'); - $("input[name=snmp3_auth_pass]").css({backgroundColor: '#fff'}); + $("input[name=snmp3_auth_pass]").css({backgroundColor: '#fff'}); $("input[name=snmp3_auth_pass]").removeAttr('disabled'); - $("#snmp3_privacy_method").css({backgroundColor: '#fff'}); + $("#snmp3_privacy_method").css({backgroundColor: '#fff'}); $("#snmp3_privacy_method").removeAttr('disabled'); - - $("input[name=snmp3_privacy_pass]").css({backgroundColor: '#fff'}); + + $("input[name=snmp3_privacy_pass]").css({backgroundColor: '#fff'}); $("input[name=snmp3_privacy_pass]").removeAttr('disabled'); $("#snmp3_auth_method").css({backgroundColor: '#fff'}); @@ -452,20 +452,20 @@ $(document).ready (function () { $("input[name=snmp3_auth_pass]").val(""); $("input[name=snmp3_auth_pass]").css({backgroundColor: '#ddd'}); $("input[name=snmp3_auth_pass]").attr("disabled", true); - + $("#snmp3_privacy_method").css({backgroundColor: '#ddd'}); $("#snmp3_privacy_method").attr("disabled", true); - + $("input[name=snmp3_privacy_pass]").val(""); $("input[name=snmp3_privacy_pass]").css({backgroundColor: '#ddd'}); $("input[name=snmp3_privacy_pass]").attr("disabled", true); - + $("#snmp3_auth_method").css({backgroundColor: '#ddd'}); $("#snmp3_auth_method").attr("disabled", true); - + $("#snmp3_security_level").css({backgroundColor: '#ddd'}); $("#snmp3_security_level").attr("disabled", true); - + $("input[name=active_snmp_v3]").val(0); $("input[name=snmp_community]").css({backgroundColor: '#fff'}); $("input[name=snmp_community]").removeAttr('disabled'); diff --git a/pandora_console/godmode/servers/manage_recontask.php b/pandora_console/godmode/servers/manage_recontask.php index 04f0cc4119..396125191e 100644 --- a/pandora_console/godmode/servers/manage_recontask.php +++ b/pandora_console/godmode/servers/manage_recontask.php @@ -135,7 +135,7 @@ if (isset($_GET["update"])) { $result = db_process_sql_update('trecon_task', $values, $where); else { if (!preg_match("/[0-9]+.+[0-9]+.+[0-9]+.+[0-9]+\/+[0-9]/", $network)) - $reason = __('Incorrect format in Subnet field'); + $reason = __('Incorrect format in Subnet field'); $result = false; } } @@ -147,7 +147,7 @@ if (isset($_GET["update"])) { } else { echo '

'.__('Error updating recon task').'

'; - echo $reason; + echo $reason; } } diff --git a/pandora_console/godmode/servers/manage_recontask_form.php b/pandora_console/godmode/servers/manage_recontask_form.php index ab502fd5c6..10d3b6f2eb 100644 --- a/pandora_console/godmode/servers/manage_recontask_form.php +++ b/pandora_console/godmode/servers/manage_recontask_form.php @@ -43,14 +43,14 @@ if (is_ajax ()) { } if (isset ($_GET["update"]) or (isset($_GET["crt"]))) { // Edit mode - + $update_recon = true; if (isset ($_GET["crt"])){ if ($_GET["crt"] != "update"){ $update_recon = false; } else{ - $id_rt = get_parameter("upd"); + $id_rt = get_parameter("upd"); } } diff --git a/pandora_console/operation/agentes/datos_agente.php b/pandora_console/operation/agentes/datos_agente.php index 837791d9df..b24468dea9 100644 --- a/pandora_console/operation/agentes/datos_agente.php +++ b/pandora_console/operation/agentes/datos_agente.php @@ -235,26 +235,27 @@ foreach ($result as $row) { foreach($columns as $col => $attr) { if ($attr[1] != "modules_format_data") $data[] = $attr[1] ($row[$attr[0]]); - + // Its a single-data, multiline data (data snapshot) ? elseif (preg_match ("/[\n]+/i", $row[$attr[0]])){ - + // Detect string data with \n and convert to
's $datos = preg_replace ('/\n/i','
',$row[$attr[0]]); $datos = preg_replace ('/\s/i',' ',$datos); // Because this *SHIT* of print_table monster, I cannot format properly this cells // so, eat this, motherfucker :)) - + $datos = "".$datos.""; - + // I dont why, but using index (value) method, data is automatically converted to html entities ¿? $data[$attr[1]]=$datos; - - } else { - // Just a string of alphanumerical data... just do print - - $data[$attr[1]]=$row[$attr[0]]; + + } + else { + // Just a string of alphanumerical data... just do print + + $data[$attr[1]]=$row[$attr[0]]; } } diff --git a/pandora_console/operation/agentes/estado_agente.php b/pandora_console/operation/agentes/estado_agente.php index 94b273f52f..c6002479fe 100644 --- a/pandora_console/operation/agentes/estado_agente.php +++ b/pandora_console/operation/agentes/estado_agente.php @@ -46,7 +46,7 @@ if (is_ajax ()) { $usr_groups = users_get_groups($config['id_user'], 'LW', true); $filter_groups = ''; - $filter_groups = implode(',', array_keys($usr_groups)); + $filter_groups = implode(',', array_keys($usr_groups)); switch ($config["dbtype"]) { case "mysql": @@ -442,7 +442,7 @@ foreach ($agents as $agent) { $data[0] .= '