diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 5521a9bb3b..e6e4a072e1 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,23 @@ +2012-04-18 Sancho Lerena + + * operation/servers/recon_view.php: Fix column header. + + * godmode/agentes/module_manager_editor_plugin.php: Now plugin description + is shown formatted (\n ->
). Some fields have better layout. + + * godmode/servers/plugin.php: Ajax load of description is now formatted. + + * godmode/servers/manage_recontask.php: Fix link to show recon server. + + * godmode/servers/manage_recontask_form.php: Wider textarea. + + * pandoradb_data.sql: New defaults (4 plugins, 2 recon scripts). + + * include/functions_events.php: More space visible in event info, smaller + font. + + * include/config_process.php: Updated version. + 2012-04-18 Juan Manuel Ramon * include/styles/pandora_minimal.css diff --git a/pandora_console/godmode/agentes/module_manager_editor_plugin.php b/pandora_console/godmode/agentes/module_manager_editor_plugin.php index 91c7125e87..0430842493 100644 --- a/pandora_console/godmode/agentes/module_manager_editor_plugin.php +++ b/pandora_console/godmode/agentes/module_manager_editor_plugin.php @@ -43,7 +43,16 @@ $data[0] = __('Plugin'); $data[1] = html_print_select_from_sql ('SELECT id, name FROM tplugin ORDER BY name', 'id_plugin', $id_plugin, 'changePluginSelect();', __('None'), 0, true, false, false, $disabledBecauseInPolicy); $table_simple->colspan['plugin_1'][2] = 2; -$data[2] = ''; + +if (!empty($id_plugin)){ + $preload = db_get_sql ("SELECT description FROM tplugin WHERE id = $id_plugin"); + $preload = io_safe_output ($preload); + $preload = str_replace ("\n", "
", $preload); +} else { + $preload = ""; +} + +$data[2] = ''.$preload.''; push_table_simple ($data, 'plugin_1'); @@ -51,13 +60,14 @@ $data = array (); $data[0] = __('Target IP'); $data[1] = html_print_input_text ('ip_target', $ip_target, '', 15, 60, true); $data[2] = __('Port'); -$data[3] = html_print_input_text ('tcp_port', $tcp_port, '', 5, 20, true); +$data[3] = html_print_input_text ('tcp_port', $tcp_port, '', 15, 20, true); push_table_simple ($data, 'target_ip'); $data = array (); $data[0] = __('Username'); $data[1] = html_print_input_text ('plugin_user', $plugin_user, '', 15, 60, true); + $data[2] = __('Password'); $data[3] = html_print_input_password ('plugin_pass', $plugin_pass, '', 15, 60, true); diff --git a/pandora_console/godmode/servers/manage_recontask.php b/pandora_console/godmode/servers/manage_recontask.php index e13910c86a..787e567259 100644 --- a/pandora_console/godmode/servers/manage_recontask.php +++ b/pandora_console/godmode/servers/manage_recontask.php @@ -2,7 +2,7 @@ // Pandora FMS - http://pandorafms.com // ================================================== -// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas +// Copyright (c) 2005-2012 Artica Soluciones Tecnologicas // Please see http://pandorafms.org for full contribution list // This program is free software; you can redistribute it and/or @@ -89,6 +89,7 @@ if ((isset ($_GET["update"])) OR ((isset ($_GET["create"])))) { $id_recon_script = 'NULL'; else $id_network_profile = 0; + $os_detect = (int) get_parameter ("os_detect", 0); $resolve_names = (int) get_parameter ("resolve_names", 0); $parent_detection = (int) get_parameter ("parent_detection", 0); @@ -276,7 +277,7 @@ if ($result !== false) { } // ACTION - $data[8] = '' . html_print_image("images/eye.png", true) . ' '; + $data[8] = '' . html_print_image("images/eye.png", true) . ' '; $data[8] .= '' . html_print_image("images/cross.png", true, array("border" => '0')) . ' '; $data[8] .= '' .html_print_image("images/config.png", true) . ' '; diff --git a/pandora_console/godmode/servers/manage_recontask_form.php b/pandora_console/godmode/servers/manage_recontask_form.php index 97f7528e40..3a4d5400f2 100644 --- a/pandora_console/godmode/servers/manage_recontask_form.php +++ b/pandora_console/godmode/servers/manage_recontask_form.php @@ -144,6 +144,7 @@ $table->rowclass[12]="recon_script"; $table->rowclass[13]="recon_script"; $table->rowclass[14]="recon_script"; $table->rowclass[15]="recon_script"; +$table->rowclass[16]="recon_script"; // Name $table->data[0][0] = "".__('Task name').""; $table->data[0][1] = html_print_input_text ('name', $name, '', 25, 0, true); @@ -227,7 +228,7 @@ $table->data[11][1] = html_print_input_text ('snmp_community', $snmp_community, $table->data[12][0] = "" . __('Explanation') . ""; $table->data[12][1] = "" . html_print_textarea('explanation', 4, 40, '', 'style="width: 288px;"', true); +"" . html_print_textarea('explanation', 4, 60, '', 'style="width: 388px;"', true); // Field1 diff --git a/pandora_console/godmode/servers/plugin.php b/pandora_console/godmode/servers/plugin.php index 993d11a0c0..ab5929b64e 100644 --- a/pandora_console/godmode/servers/plugin.php +++ b/pandora_console/godmode/servers/plugin.php @@ -19,8 +19,10 @@ if (is_ajax ()) { $id_plugin = get_parameter('id_plugin'); $description = db_get_value_filter('description', 'tplugin', array('id' => $id_plugin)); - - echo htmlentities (io_safe_output($description), ENT_QUOTES, "UTF-8", true); + $preload = io_safe_output($description); + $preload = str_replace ("\n", "
", $preload); + + echo $preload; return; } diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index f76f193219..d5cf37c17a 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -416,13 +416,8 @@ function events_print_event_table ($filter = "", $limit = 10, $width = 440, $ret /* Event type */ $data[2] = events_print_type_img ($event["event_type"], true); - - // Event description wrap around by default at 44 or ~3 lines (10 seems to be a good ratio to wrap around for most sizes. Smaller number gets longer strings) - $wrap = floor ($width / 10); - - - - $data[3] = ''. ui_print_string_substr (io_safe_output($event["evento"]), 45, true, '9.5'). ''; + + $data[3] = ''. ui_print_string_substr (io_safe_output($event["evento"]), 75, true, '9'). ''; if ($event["id_agente"] > 0) { // Agent name diff --git a/pandora_console/install.php b/pandora_console/install.php index deb3b3b2e1..3469208065 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -66,8 +66,8 @@ function ChangeDBAction(causer) { "; echo "
Upgrade: - If you want to upgrade from Pandora FMS 3.2 to 4.0 version, - please download the migration tool from our website at - PandoraFMS.com web site.
"; + If you want to upgrade from Pandora FMS 4.x to 5.0 version, please use the migration tool inside /extras directory in this setup."; echo ""; diff --git a/pandora_console/operation/servers/recon_view.php b/pandora_console/operation/servers/recon_view.php index 1073aab052..195e58cd64 100644 --- a/pandora_console/operation/servers/recon_view.php +++ b/pandora_console/operation/servers/recon_view.php @@ -93,7 +93,7 @@ foreach ($servers as $serverItem) { $table->head[4] = __('Status'); $table->align[4] = "center"; - $table->head[5] = __('Recon module'); + $table->head[5] = __('Template'); $table->align[5] = "center"; $table->head[6] = __('Progress'); diff --git a/pandora_console/pandoradb_data.sql b/pandora_console/pandoradb_data.sql index 30d42f6297..590002128a 100644 --- a/pandora_console/pandoradb_data.sql +++ b/pandora_console/pandoradb_data.sql @@ -229,10 +229,10 @@ INSERT INTO `torigen` VALUES -- Identifiers 30 and 31 are reserved for Enterprise data types INSERT INTO `ttipo_modulo` VALUES -(1,'generic_data',0,'Generic data','mod_data.png'), +(1,'generic_data',0,'Generic numeric','mod_data.png'), (2,'generic_proc',1,'Generic boolean','mod_proc.png'), (3,'generic_data_string',2,'Generic string','mod_string.png'), -(4,'generic_data_inc',0,'Generic data incremental','mod_data_inc.png'), +(4,'generic_data_inc',0,'Generic numeric incremental','mod_data_inc.png'), (6,'remote_icmp_proc',4,'Remote ICMP network agent, boolean data','mod_icmp_proc.png'), (7,'remote_icmp',3,'Remote ICMP network agent (latency)','mod_icmp_data.png'), @@ -427,4 +427,9 @@ INSERT INTO `treport_custom_sql` (`id`, `name`, `sql`) VALUES (4, 'Group vi INSERT INTO `trecon_script` VALUES (1,'SNMP Recon Script','This script is used to automatically detect SNMP Interfaces on devices, used as Recon Custom Script in the recon task. Parameters used are: * custom_field1 = network. i.e.: 192.168.100.0/24 * custom_field2 = snmp_community. * custom_field3 = optative parameter to force process downed interfaces (use: '-a'). Only up interfaces are processed by default See documentation for more information.','/usr/share/pandora_server/util/recon_scripts/snmpdevices.pl'); +INSERT INTO `trecon_script` VALUES +(2,'IMPI Recon', 'Specific Pandora FMS Intel DCM Discovery (c) Artica ST 2011 Usage: ./ipmi-recon.pl * custom_field1 = network. i.e.: 192.168.100.0/24 * custom_field2 = username * custom_fiedl3 = password ', '/usr/share/pandora_server/util/recon_scripts/ipmi-recon.pl'); + +INSERT INTO `tplugin` (`id`, `name`, `description`, `max_timeout`, `execute`, `net_dst_opt`, `net_port_opt`, `user_opt`, `pass_opt`, `plugin_type`) VALUES (1,'IPMI Plugin','Plugin to get IPMI monitors from a IPMI Device.',0,'/usr/share/pandora_server/util/plugin/ipmi-plugin.pl','-h','','-u','-p',0),(2,'DNS Plugin','This plugin is used to check if a specific domain return a specific IP address, and to check how time (milisecs) takes the DNS to answer. Use IP address parameter to specify the IP of your domain. Use these custom parameters for the other parameters: -d domain to check (for example pandorafms.com) -s DNS Server to check (for example 8.8.8.8) Optional parameters: -t Do a DNS time response check instead DNS resolve test ',15,'/usr/share/pandora_server/util/plugin/dns_plugin.sh','-i','','','',0),(3,'UDP port check','Check a remote UDP port (by using NMAP). Use IP address and Port options.',5,'/usr/share/pandora_server/util/plugin/udp_nmap_plugin.sh','-t','-p','','',0),(4,'SMTP Check','This plugin is used to send a mail to a SMTP server and check if works. Parameters in the plugin IP Addres - SMTP Server IP address User - AUTH login Pass - AUTH password Port - SMTP port (optional) Optional parameters -d Destination email -f Email of the sender -a Autentication system, could be LOGIN, PLAIN, CRAM-MD5 or DIGEST-MD ',10,'/usr/share/pandora_server/util/plugin/SMTP_check.pl','-h','-o','-u','-p',0); +