2012-04-18 Sancho Lerena <slerena@artica.es>

* operation/servers/recon_view.php: Fix	column header.

        * godmode/agentes/module_manager_editor_plugin.php: Now	plugin description
        is shown formatted (\n -> <br>). 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.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6028 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
slerena 2012-04-18 18:28:08 +00:00
parent fb53a163aa
commit 9195bc889b
9 changed files with 54 additions and 22 deletions

View File

@ -1,3 +1,23 @@
2012-04-18 Sancho Lerena <slerena@artica.es>
* operation/servers/recon_view.php: Fix column header.
* godmode/agentes/module_manager_editor_plugin.php: Now plugin description
is shown formatted (\n -> <br>). 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 <juanmanuel.ramon@artica.es>
* include/styles/pandora_minimal.css

View File

@ -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] = '<span style="font-weight: normal;" id="plugin_description"></span>';
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", "<br>", $preload);
} else {
$preload = "";
}
$data[2] = '<span style="font-weight: normal;" id="plugin_description">'.$preload.'</span>';
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);

View File

@ -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] = '<a href="index.php?sec=estado_server&sec2=operation/servers/view_server_detail&server_id='.$row["id_recon_server"].'">' . html_print_image("images/eye.png", true) . '</a>&nbsp;';
$data[8] = '<a href="index.php?sec=estado&sec2=operation/servers/recon_view">' . html_print_image("images/eye.png", true) . '</a>&nbsp;';
$data[8] .= '<a href="index.php?sec=gservers&sec2=godmode/servers/manage_recontask&delete='.$row["id_rt"].'">' . html_print_image("images/cross.png", true, array("border" => '0')) . '</a>&nbsp;';
$data[8] .= '<a href="index.php?sec=gservers&sec2=godmode/servers/manage_recontask_form&update='.$row["id_rt"].'">' .html_print_image("images/config.png", true) . '</a>&nbsp;';

View File

@ -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] = "<b>".__('Task name')."</b>";
$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] = "<b>" . __('Explanation') . "</b>";
$table->data[12][1] = "<span id='spinner_layour' style='display: none;'>" . html_print_image ("images/spinner.gif", true) .
"</span>" . html_print_textarea('explanation', 4, 40, '', 'style="width: 288px;"', true);
"</span>" . html_print_textarea('explanation', 4, 60, '', 'style="width: 388px;"', true);
// Field1

View File

@ -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", "<br>", $preload);
echo $preload;
return;
}

View File

@ -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] = '<span class="'.get_priority_class ($event["criticity"]).'f9">'. ui_print_string_substr (io_safe_output($event["evento"]), 45, true, '9.5'). '</span>';
$data[3] = '<span class="'.get_priority_class ($event["criticity"]).'f9">'. ui_print_string_substr (io_safe_output($event["evento"]), 75, true, '9'). '</span>';
if ($event["id_agente"] > 0) {
// Agent name

View File

@ -66,8 +66,8 @@ function ChangeDBAction(causer) {
<?php
$version = '4.0.1';
$build = '111213';
$version = '5.0';
$build = '120418';
$banner = "v$version Build $build";
error_reporting(0);
@ -394,9 +394,7 @@ function install_step1() {
</div>";
echo "<div class='info'><b>Upgrade</b>:
If you want to upgrade from Pandora FMS 3.2 to 4.0 version,
please download the migration tool from our website at
<a href='http://www.pandorafms.com'>PandoraFMS.com web site</a>.</div>";
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.</div>";
echo "</div>";

View File

@ -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');

View File

@ -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&#x20;vi
INSERT INTO `trecon_script` VALUES (1,'SNMP&#x20;Recon&#x20;Script','This&#x20;script&#x20;is&#x20;used&#x20;to&#x20;automatically&#x20;detect&#x20;SNMP&#x20;Interfaces&#x20;on&#x20;devices,&#x20;used&#x20;as&#x20;Recon&#x20;Custom&#x20;Script&#x20;in&#x20;the&#x20;recon&#x20;task.&#x20;Parameters&#x20;used&#x20;are:&#x0d;&#x0a;&#x0d;&#x0a;*&#x20;custom_field1&#x20;=&#x20;network.&#x20;i.e.:&#x20;192.168.100.0/24&#x0d;&#x0a;*&#x20;custom_field2&#x20;=&#x20;snmp_community.&#x20;&#x0d;&#x0a;*&#x20;custom_field3&#x20;=&#x20;optative&#x20;parameter&#x20;to&#x20;force&#x20;process&#x20;downed&#x20;interfaces&#x20;&#40;use:&#x20;&#039;-a&#039;&#41;.&#x20;Only&#x20;up&#x20;interfaces&#x20;are&#x20;processed&#x20;by&#x20;default&#x20;&#x0d;&#x0a;&#x0d;&#x0a;See&#x20;documentation&#x20;for&#x20;more&#x20;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 <info@artica.es> Usage: ./ipmi-recon.pl <task_id> <group_id> <create_incident_flag> <custom_field1> <custom_field2> <custom_field3> * 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&#x20;Plugin','Plugin&#x20;to&#x20;get&#x20;IPMI&#x20;monitors&#x20;from&#x20;a&#x20;IPMI&#x20;Device.',0,'/usr/share/pandora_server/util/plugin/ipmi-plugin.pl','-h','','-u','-p',0),(2,'DNS&#x20;Plugin','This&#x20;plugin&#x20;is&#x20;used&#x20;to&#x20;check&#x20;if&#x20;a&#x20;specific&#x20;domain&#x20;return&#x20;a&#x20;specific&#x20;IP&#x20;address,&#x20;and&#x20;to&#x20;check&#x20;how&#x20;time&#x20;&#40;milisecs&#41;&#x20;takes&#x20;the&#x20;DNS&#x20;to&#x20;answer.&#x20;Use&#x20;IP&#x20;address&#x20;parameter&#x20;to&#x20;specify&#x20;the&#x20;IP&#x20;of&#x20;your&#x20;domain.&#x20;Use&#x20;these&#x20;custom&#x20;parameters&#x20;for&#x20;the&#x20;other&#x20;parameters:&#x0d;&#x0a;&#x0d;&#x0a;-d&#x20;domain&#x20;to&#x20;check&#x20;&#40;for&#x20;example&#x20;pandorafms.com&#41;&#x0d;&#x0a;-s&#x20;DNS&#x20;Server&#x20;to&#x20;check&#x20;&#x20;&#40;for&#x20;example&#x20;8.8.8.8&#41;&#x0d;&#x0a;&#x0d;&#x0a;Optional&#x20;parameters:&#x0d;&#x0a;&#x0d;&#x0a;-t&#x20;Do&#x20;a&#x20;DNS&#x20;time&#x20;response&#x20;check&#x20;instead&#x20;DNS&#x20;resolve&#x20;test&#x0d;&#x0a;&#x0d;&#x0a;',15,'/usr/share/pandora_server/util/plugin/dns_plugin.sh','-i','','','',0),(3,'UDP&#x20;port&#x20;check','Check&#x20;a&#x20;remote&#x20;UDP&#x20;port&#x20;&#40;by&#x20;using&#x20;NMAP&#41;.&#x20;Use&#x20;IP&#x20;address&#x20;and&#x20;Port&#x20;options.',5,'/usr/share/pandora_server/util/plugin/udp_nmap_plugin.sh','-t','-p','','',0),(4,'SMTP&#x20;Check','This&#x20;plugin&#x20;is&#x20;used&#x20;to&#x20;send&#x20;a&#x20;mail&#x20;to&#x20;a&#x20;SMTP&#x20;server&#x20;and&#x20;check&#x20;if&#x20;works.&#x20;Parameters&#x20;in&#x20;the&#x20;plugin&#x20;&#x0d;&#x0a;IP&#x20;Addres&#x20;-&#x20;SMTP&#x20;Server&#x20;IP&#x20;address&#x0d;&#x0a;User&#x20;-&#x20;AUTH&#x20;login&#x20;&#x20;&#x0d;&#x0a;Pass&#x20;-&#x20;AUTH&#x20;password&#x0d;&#x0a;Port&#x20;-&#x20;SMTP&#x20;port&#x20;&#40;optional&#41;&#x0d;&#x0a;&#x0d;&#x0a;Optional&#x20;parameters&#x20;&#x0d;&#x0a;&#x0d;&#x0a;&#x20;-d&#x20;Destination&#x20;email&#x0d;&#x0a;&#x20;-f&#x20;Email&#x20;of&#x20;the&#x20;sender&#x0d;&#x0a;&#x20;-a&#x20;Autentication&#x20;system,&#x20;could&#x20;be&#x20;LOGIN,&#x20;PLAIN,&#x20;CRAM-MD5&#x20;or&#x20;DIGEST-MD&#x0d;&#x0a;&#x0d;&#x0a;&#x0d;&#x0a;',10,'/usr/share/pandora_server/util/plugin/SMTP_check.pl','-h','-o','-u','-p',0);