From 46b052f259347551e9377045a59a9853e1c84c73 Mon Sep 17 00:00:00 2001 From: esanchezm Date: Fri, 22 May 2009 09:08:55 +0000 Subject: [PATCH] 2009-05-22 Esteban Sanchez * extras/pandoradb_migrate_v2.x_to_v3.0.sql, pandoradb.sql: Added id_plugin. Database breakage requested and approved. * godmode/modules/manage_network_components_form_common.php, godmode/modules/manage_network_components_form_plugin.php: Added to repository. New editor for network components. * godmode/modules/manage_network_components_form_network.php, godmode/modules/manage_network_components_form_wmi.php, godmode/modules/manage_network_components.php: Adapted to changes in component editors and missing fields. Added option to create plugin components. * godmode/modules/manage_network_components_form.php: Make the different network component editors to reutilize the code and have a common UI. * godmode/agentes/module_manager_editor.php: Style correction. * include/styles/pandora.css: Style for network component editor. * include/functions_ui.php: Security fix in get_url_refresh() to avoid showing login info. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1702 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 27 +++ .../extras/pandoradb_migrate_v2.x_to_v3.0.sql | 3 +- .../godmode/agentes/module_manager_editor.php | 2 +- .../modules/manage_network_components.php | 75 +++++-- .../manage_network_components_form.php | 164 +++++++++++++- .../manage_network_components_form_common.php | 99 +++++++++ ...manage_network_components_form_network.php | 210 +++--------------- .../manage_network_components_form_plugin.php | 53 +++++ .../manage_network_components_form_wmi.php | 61 +++-- pandora_console/include/functions_ui.php | 4 + pandora_console/include/styles/pandora.css | 6 +- pandora_console/pandoradb.sql | 1 + 12 files changed, 463 insertions(+), 242 deletions(-) create mode 100644 pandora_console/godmode/modules/manage_network_components_form_common.php create mode 100644 pandora_console/godmode/modules/manage_network_components_form_plugin.php diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index e150d60aeb..4f557f004e 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,30 @@ +2009-05-22 Esteban Sanchez + + * extras/pandoradb_migrate_v2.x_to_v3.0.sql, + pandoradb.sql: Added id_plugin. Database breakage requested and + approved. + + * godmode/modules/manage_network_components_form_common.php, + godmode/modules/manage_network_components_form_plugin.php: Added + to repository. New editor for network components. + + * godmode/modules/manage_network_components_form_network.php, + godmode/modules/manage_network_components_form_wmi.php, + godmode/modules/manage_network_components.php: Adapted to changes + in component editors and missing fields. Added option to create + plugin components. + + * godmode/modules/manage_network_components_form.php: Make the + different network component editors to reutilize the code and + have a common UI. + + * godmode/agentes/module_manager_editor.php: Style correction. + + * include/styles/pandora.css: Style for network component editor. + + * include/functions_ui.php: Security fix in get_url_refresh() to + avoid showing login info. + 2009-05-21 Esteban Sanchez * include/functions_network_components.php: Added to repository. diff --git a/pandora_console/extras/pandoradb_migrate_v2.x_to_v3.0.sql b/pandora_console/extras/pandoradb_migrate_v2.x_to_v3.0.sql index f4df163edc..a4d9fbaa30 100644 --- a/pandora_console/extras/pandoradb_migrate_v2.x_to_v3.0.sql +++ b/pandora_console/extras/pandoradb_migrate_v2.x_to_v3.0.sql @@ -183,7 +183,8 @@ UNSIGNED NOT NULL DEFAULT '1', ADD `min_warning` DOUBLE( 18, 2 ) NOT NULL DEFAULT '0', ADD `max_warning` DOUBLE( 18, 2 ) NOT NULL DEFAULT '0', ADD `min_critical` DOUBLE( 18, 2 ) NOT NULL DEFAULT '0', ADD `max_critical` DOUBLE( 18, 2 ) NOT NULL DEFAULT '0', ADD -`min_ff_event` INT( 4 ) UNSIGNED NOT NULL DEFAULT '0'; +`min_ff_event` INT( 4 ) UNSIGNED NOT NULL DEFAULT '0', ADD +`id_plugin` integer unsigned default 0; ALTER TABLE `tusuario` CHANGE `nombre_real` `fullname` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL; ALTER TABLE `tusuario` CHANGE `comentarios` `comments` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL; diff --git a/pandora_console/godmode/agentes/module_manager_editor.php b/pandora_console/godmode/agentes/module_manager_editor.php index 0141fe07d4..0b1c88423f 100644 --- a/pandora_console/godmode/agentes/module_manager_editor.php +++ b/pandora_console/godmode/agentes/module_manager_editor.php @@ -178,7 +178,7 @@ case 4: case "predictionserver": $moduletype = 5; case 5: - $categories = array (0,1); + $categories = array (0, 1); require ('module_manager_editor_common.php'); require ('module_manager_editor_prediction.php'); break; diff --git a/pandora_console/godmode/modules/manage_network_components.php b/pandora_console/godmode/modules/manage_network_components.php index 120951c876..f22369f4a9 100644 --- a/pandora_console/godmode/modules/manage_network_components.php +++ b/pandora_console/godmode/modules/manage_network_components.php @@ -30,11 +30,11 @@ if (! give_acl ($config['id_user'], 0, "PM")) { require_once ('include/functions_network_components.php'); -$type = (int) get_parameter ('tipo'); +$type = (int) get_parameter ('type'); $name = (string) get_parameter ('name'); -$description = (string) get_parameter ('descripcion'); -$modulo_max = (int) get_parameter ('modulo_max'); -$modulo_min = (int) get_parameter ('modulo_min'); +$description = (string) get_parameter ('description'); +$max = (int) get_parameter ('max'); +$min = (int) get_parameter ('min'); $tcp_send = (string) get_parameter ('tcp_send'); $tcp_rcv = (string) get_parameter ('tcp_rcv'); $tcp_port = (int) get_parameter ('tcp_port'); @@ -47,7 +47,14 @@ $plugin_user = (string) get_parameter ('plugin_user'); $plugin_pass = (string) get_parameter ('plugin_pass'); $plugin_parameter = (string) get_parameter ('plugin_parameter'); $max_timeout = (int) get_parameter ('max_timeout'); -$id_modulo = (string) get_parameter ('id_modulo'); +$id_modulo = (int) get_parameter ('id_component_type'); +$id_plugin = (int) get_parameter ('id_plugin'); +$min_warning = (int) get_parameter ('min_warning'); +$max_warning = (int) get_parameter ('max_warning'); +$min_critical = (int) get_parameter ('min_critical'); +$max_critical = (int) get_parameter ('max_critical'); +$ff_event = (int) get_parameter ('ff_event'); +$history_data = (bool) get_parameter ('history_data'); $id = (int) get_parameter ('id'); $create_component = (bool) get_parameter ('create_component'); @@ -59,8 +66,8 @@ if ($create_component) { $id = create_network_component ($name, $type, $id_group, array ('description' => $description, 'module_interval' => $module_interval, - 'max' => $modulo_max, - 'min' => $modulo_min, + 'max' => $max, + 'min' => $min, 'tcp_send' => $tcp_send, 'tcp_rcv' => $tcp_rcv, 'tcp_port' => $tcp_port, @@ -68,13 +75,20 @@ if ($create_component) { 'snmp_community' => $snmp_community, 'id_module_group' => $id_module_group, 'id_modulo' => $id_modulo, + 'id_plugin' => $id_plugin, 'plugin_user' => $plugin_user, 'plugin_pass' => $plugin_pass, 'plugin_parameter' => $plugin_parameter, - 'max_timeout' => $max_timeout)); + 'max_timeout' => $max_timeout, + 'history_data' => $history_data, + 'min_warning' => $min_warning, + 'max_warning' => $max_warning, + 'min_critical' => $min_critical, + 'max_critical' => $max_critical, + 'min_ff_event' => $ff_event)); if ($id === false) { print_error_message (__('Could not be created')); - include_once ('manage_network_components_form.php'); + include_once ('godmode/modules/manage_network_components_form.php'); return; } print_success_message (__('Created successfully')); @@ -90,8 +104,8 @@ if ($update_component) { 'id_group' => $id_group, 'description' => $description, 'module_interval' => $module_interval, - 'max' => $modulo_max, - 'min' => $modulo_min, + 'max' => $max, + 'min' => $min, 'tcp_send' => $tcp_send, 'tcp_rcv' => $tcp_rcv, 'tcp_port' => $tcp_port, @@ -99,13 +113,20 @@ if ($update_component) { 'snmp_community' => $snmp_community, 'id_module_group' => $id_module_group, 'id_modulo' => $id_modulo, + 'id_plugin' => $id_plugin, 'plugin_user' => $plugin_user, 'plugin_pass' => $plugin_pass, 'plugin_parameter' => $plugin_parameter, - 'max_timeout' => $max_timeout)); + 'max_timeout' => $max_timeout, + 'history_data' => $history_data, + 'min_warning' => $min_warning, + 'max_warning' => $max_warning, + 'min_critical' => $min_critical, + 'max_critical' => $max_critical, + 'min_ff_event' => $ff_event)); if ($result === false) { print_error_message (__('Could not be updated')); - include_once ('manage_network_components_form.php'); + include_once ('godmode/modules/manage_network_components_form.php'); return; } print_success_message (__('Updated successfully')); @@ -125,20 +146,23 @@ if ($delete_component) { } if ($id || $new_component) { - include_once ('manage_network_components_form.php'); + include_once ('godmode/modules/manage_network_components_form.php'); return; } $url = get_url_refresh (array ('offset' => false, + 'id' => false, 'create_component' => false, 'update_component' => false, 'delete_component' => false, 'id_network_component' => false, - 'tipo' => false, + 'upd' => false, + 'crt' => false, + 'type' => false, 'name' => false, - 'descripcion' => false, - 'modulo_max' => false, - 'modulo_min' => false, + 'description' => false, + 'max' => false, + 'min' => false, 'tcp_send' => false, 'tcp_rcv' => false, 'tcp_port' => false, @@ -151,7 +175,15 @@ $url = get_url_refresh (array ('offset' => false, 'plugin_pass' => false, 'plugin_parameter' => false, 'max_timeout' => false, - 'id_modulo' => false)); + 'id_modulo' => false, + 'id_plugin' => false, + 'history_data' => false, + 'min_warning' => false, + 'max_warning' => false, + 'min_critical' => false, + 'max_critical' => false, + 'ff_event' => false, + 'id_component_type' => false)); echo "

".__('Module management')." » "; echo __('Module component management')."

"; @@ -214,6 +246,10 @@ $table->data = array (); foreach ($components as $component) { $data = array (); + if ($component['max'] == $component['min'] && $component['max'] == 0) { + $component['max'] = $component['min'] = __('N/A'); + } + $data[0] = ''; $data[0] .= $component['name']; $data[0] .= ''; @@ -240,6 +276,7 @@ echo '
'; echo '
'; print_input_hidden ('new_component', 1); print_select (array (2 => __('Create a new network component'), + 4 => __('Create a new plugin component'), 6 => __('Create a new WMI component')), 'id_component_type', '', '', '', '', ''); print_submit_button (__('Create'), 'crt', false, 'class="sub next"'); diff --git a/pandora_console/godmode/modules/manage_network_components_form.php b/pandora_console/godmode/modules/manage_network_components_form.php index 6ff9ad146f..de13bb8bf8 100644 --- a/pandora_console/godmode/modules/manage_network_components_form.php +++ b/pandora_console/godmode/modules/manage_network_components_form.php @@ -30,15 +30,173 @@ if (! give_acl ($config['id_user'], 0, "PM")) { $id_component_type = (int) get_parameter ('id_component_type'); if (isset ($id)) { - $component = get_network_component ($id, false, 'id_modulo'); - if ($component !== false) - $id_component_type =$component['id_modulo']; + $component = get_network_component ((int) $id); + if ($component !== false) { + $id_component_type = $component['id_modulo']; + $name = $component["name"]; + $type = $component["type"]; + $description = $component["description"]; + $max = $component["max"]; + $min = $component["min"]; + $module_interval = $component["module_interval"]; + $tcp_port = $component["tcp_port"]; + $tcp_rcv = $component["tcp_rcv"]; + $tcp_send = $component["tcp_send"]; + $snmp_community = $component["snmp_community"]; + $snmp_oid = $component["snmp_oid"]; + $id_module_group = $component["id_module_group"]; + $id_group = $component["id_group"]; + $id_plugin = $component['id_plugin']; + $plugin_user = $component["plugin_user"]; + $plugin_pass = $component["plugin_pass"]; + $plugin_parameter = $component["plugin_parameter"]; + $max_timeout = $component["max_timeout"]; + $min_warning = $component["min_warning"]; + $max_warning = $component["max_warning"]; + $max_critical = $component["max_critical"]; + $min_critical = $component["min_critical"]; + $ff_event = $component["min_ff_event"]; + $history_data = $component["history_data"]; + } elseif (isset ($new_component) && $new_component) { + $name = ""; + $snmp_oid = ""; + $description = ""; + $id_group = 1; + $oid = ""; + $max = "0"; + $min = "0"; + $module_interval = "0"; + $tcp_port = ""; + $tcp_rcv = ""; + $tcp_send = ""; + $snmp_community = ""; + $id_module_group = ""; + $id_group = ""; + $type = 0; + $min_warning = 0; + $max_warning = 0; + $max_critical = 0; + $min_critical = 0; + $ff_event = 0; + $history_data = true; + } } if ($id_component_type == 6) { + $categories = array (0, 1, 2); + require ("godmode/modules/manage_network_components_form_common.php"); require ("godmode/modules/manage_network_components_form_wmi.php"); +} else if ($id_component_type == 4) { + $categories = array (0, 1, 2); + require ("godmode/modules/manage_network_components_form_common.php"); + require ("godmode/modules/manage_network_components_form_plugin.php"); } else if ($id_component_type == 2) { + $categories = array (3, 4, 5); + require ("godmode/modules/manage_network_components_form_common.php"); require ("godmode/modules/manage_network_components_form_network.php"); +} else { + return; } +echo ''; + +/* $table came from manage_network_components_form_common.php */ +$table->colspan['description'][1] = 3; +$data = array (); +$data[0] = __('Description'); +$data[1] = print_textarea ('description', 2, 65, $description, '', true); +push_table_row ($data, 'description'); + +print_table ($table); + +echo '
'; +print_input_hidden ('id_component_type', $id_component_type); +if ($id) { + print_input_hidden ('update_component', 1); + print_input_hidden ('id', $id); + print_submit_button (__('Update'), 'upd', false, 'class="sub upd"'); +} else { + print_input_hidden ('create_component', 1); + print_submit_button (__('Create'), 'crt', false, 'class="sub next"'); +} +echo '
'; +echo ''; ?> + diff --git a/pandora_console/godmode/modules/manage_network_components_form_common.php b/pandora_console/godmode/modules/manage_network_components_form_common.php new file mode 100644 index 0000000000..5c82dd3545 --- /dev/null +++ b/pandora_console/godmode/modules/manage_network_components_form_common.php @@ -0,0 +1,99 @@ + $row); + else + $data = array ($row); + + $table->data = array_merge ($table->data, $data); +} + + +$table->id = 'network_component'; +$table->width = '90%'; +$table->class = 'databox_color'; +$table->style = array (); +$table->style[0] = 'font-weight: bold'; +$table->style[2] = 'font-weight: bold'; +$table->colspan = array (); +$table->colspan[0][1] = 3; +$table->data = array (); + +$table->data[0][0] = __('Name'); +$table->data[0][1] = print_input_text ('name', $name, '', 55, 255, true); + +$table->data[1][0] = __('Type').' '.print_help_icon ('module_type', true); +$sql = sprintf ('SELECT id_tipo, descripcion + FROM ttipo_modulo + WHERE categoria IN (%s) + ORDER BY descripcion', + implode (',', $categories)); +$table->data[1][1] = print_select_from_sql ($sql, 'type', + $type, ($id_component_type == 2 ? 'type_change()' : ''), '', '', true, + false, false); + +$table->data[1][2] = __('Module group'); +$table->data[1][3] = print_select_from_sql ('SELECT id_mg, name FROM tmodule_group ORDER BY name', + 'id_module_group', $id_module_group, '', '', '', true, false, false); + +$table->data[2][0] = __('Group'); +$table->data[2][1] = print_select (get_network_component_groups (), + 'id_group', $id_group, '', '', '', true, false, false); +$table->data[2][2] = __('Interval'); +$table->data[2][3] = print_input_text ('module_interval', $module_interval, '', + 5, 15, true); + +$table->data[3][0] = __('Warning status'); +$table->data[3][1] = ''.__('Min.').''; +$table->data[3][1] .= print_input_text ('min_warning', $min_warning, + '', 5, 15, true); +$table->data[3][1] .= '
'.__('Max.').''; +$table->data[3][1] .= print_input_text ('max_warning', $max_warning, + '', 5, 15, true); +$table->data[3][2] = __('Critical status'); +$table->data[3][3] = ''.__('Min.').''; +$table->data[3][3] .= print_input_text ('min_critical', $min_critical, + '', 5, 15, true); +$table->data[3][3] .= '
'.__('Max.').''; +$table->data[3][3] .= print_input_text ('max_critical', $max_critical, + '', 5, 15, true); + +$table->data[4][0] = __('FF threshold').' '.print_help_icon ('ff_threshold', true); +$table->data[4][1] = print_input_text ('ff_event', $ff_event, + '', 5, 15, true); +$table->data[4][2] = __('Historical data'); +$table->data[4][3] = print_checkbox ("history_data", 1, $history_data, true); + +$table->data[5][0] = __('Min. Value'); +$table->data[5][1] = print_input_text ('min', $min, '', 5, 15, true); +$table->data[5][2] = __('Max. Value'); +$table->data[5][3] = print_input_text ('max', $max, '', 5, 15, true); +?> diff --git a/pandora_console/godmode/modules/manage_network_components_form_network.php b/pandora_console/godmode/modules/manage_network_components_form_network.php index d8d9ca6487..991f5628dc 100644 --- a/pandora_console/godmode/modules/manage_network_components_form_network.php +++ b/pandora_console/godmode/modules/manage_network_components_form_network.php @@ -16,122 +16,6 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -?> - -".__('Module component management').""; +echo "

".__('Network component')."

"; -echo '
'; +$data = array (); +$data[0] = _('Port'); +$data[1] = print_input_text ('tcp_port', $tcp_port, '', 5, 20, true); +$data[2] = __('SNMP community'); +$data[3] = print_input_text ('snmp_community', $snmp_community, '', 15, 60, true); -echo ''; +push_table_row ($data, 'snmp_port'); -// Different Form url if it's a create or if it's a update form +$data = array (); +$data[0] = __('SNMP OID'); +$data[1] = print_input_text ('snmp_oid', $snmp_oid, '', 30, 120, true); +$table->colspan['snmp_2'][1] = 3; -echo ""; -echo '"; -echo ""; -echo ""; -echo ""; -echo ""; -echo '"; -echo ' diff --git a/pandora_console/godmode/modules/manage_network_components_form_plugin.php b/pandora_console/godmode/modules/manage_network_components_form_plugin.php new file mode 100644 index 0000000000..1147402b73 --- /dev/null +++ b/pandora_console/godmode/modules/manage_network_components_form_plugin.php @@ -0,0 +1,53 @@ +'.__('Module component management').''; +echo '

'.__('Plugin component').'

'; + +$data = array (); +$data[0] = __('Plugin'); +$data[1] = print_select_from_sql ('SELECT id, name FROM tplugin ORDER BY name', + 'id_plugin', $id_plugin, '', __('None'), 0, true, false, false); +$table->colspan['plugin_1'][1] = 3; + +push_table_row ($data, 'plugin_1'); + +$data = array (); +$data[0] = __('Username'); +$data[1] = print_input_text ('plugin_user', $plugin_user, '', 15, 60, true); +$data[2] = _('Password'); +$data[3] = print_input_password ('plugin_pass', $plugin_pass, '', 15, 60, true); + +push_table_row ($data, 'plugin_2'); + +$data = array (); +$data[0] = __('Plugin parameters'); +$data[0] .= print_help_icon ('plugin_parameters', true); +$data[1] = print_input_text ('plugin_parameter', $plugin_parameter, '', 30, 60, true); +$table->colspan['plugin_3'][1] = 3; + +push_table_row ($data, 'plugin_3'); + +?> + diff --git a/pandora_console/godmode/modules/manage_network_components_form_wmi.php b/pandora_console/godmode/modules/manage_network_components_form_wmi.php index 1fb2c7d1ee..0634c59fab 100644 --- a/pandora_console/godmode/modules/manage_network_components_form_wmi.php +++ b/pandora_console/godmode/modules/manage_network_components_form_wmi.php @@ -29,37 +29,37 @@ if (! give_acl ($config['id_user'], 0, "PM")) { return; } +echo '

'.__('Module component management').'

'; +echo '

'.__('WMI component management').'

'; + +$data = array (); +$data[0] = __('WMI query'); +$data[1] = print_input_text ('snmp_oid', $snmp_oid, '', 25, 255, true); +$data[2] = __('Key string').' '.print_help_icon ('wmikey', true); +$data[3] = print_input_text ('snmp_community', $snmp_community, '', 25, 255, true); + +push_table_row ($data, 'wmi_1'); + +$data = array (); +$data[0] = __('Field number').' '.print_help_icon ('wmifield', true); +$data[1] = print_input_text ('tcp_port', $tcp_port, '', 5, 25, true); +$data[2] = __('Namespace').' '.print_help_icon ('wminamespace', true); +$data[3] = print_input_text ('tcp_send', $tcp_send, '', 25, 255, true); + +push_table_row ($data, 'wmi_2'); + +$data = array (); +$data[0] = __('Username'); +$data[1] = print_input_text ('plugin_user', $plugin_user, '', 15, 255, true); +$data[2] = __('Password'); +$data[3] = print_input_password ('plugin_pass', $plugin_pass, '', 25, 255, true); + +push_table_row ($data, 'wmi_2'); + +return; // Update an existing component -if ($id) { - $component = get_network_component ($id); - if ($component === false) - return; - $name = $component["name"]; - $type = $component["type"]; - $description = $component["description"]; - $modulo_max = $component["max"]; - $modulo_min = $component["min"]; - $module_interval = $component["module_interval"]; - $tcp_port = $component["tcp_port"]; - $tcp_rcv = $component["tcp_rcv"]; - $tcp_send = $component["tcp_send"]; - $snmp_community = $component["snmp_community"]; - $snmp_oid = $component["snmp_oid"]; - $id_module_group = $component["id_module_group"]; - $id_group = $component["id_group"]; - $plugin_user = $component["plugin_user"]; - $plugin_pass = $component["plugin_pass"]; - $plugin_parameter = $component["plugin_parameter"]; - $max_timeout = $component["max_timeout"]; -} else { - $name = ""; - $snmp_oid = ""; - $description = ""; - $id_group = 1; - $oid = ""; - $modulo_max = "0"; - $modulo_min = "0"; - $module_interval = "300"; +if (! $id) { + $module_interval = 300; $tcp_port = ""; $tcp_rcv = ""; $tcp_send = ""; @@ -73,7 +73,6 @@ if ($id) { $max_timeout = 10; } -echo '

' . __('WMI component management') . '

'; echo ''; echo '
'.__('Module name'); -echo ""; +push_table_row ($data, 'snmp_2'); -//-- Module type combobox -echo "".__('Module type').""; -echo '"; +/* Advanced stuff */ +$data = array (); +$data[0] = __('TCP send').' '.print_help_icon ("tcp_send", true); +$data[1] = print_textarea ('tcp_send', 2, 65, $tcp_send, '', true); +$table->colspan['tcp_send'][1] = 3; -echo "
".__('Group').""; -print_select (get_network_component_groups (), - 'id_group', $id_group, '', '', '', false, false, false); +push_table_row ($data, 'tcp_send'); -echo "".__('Module group')."'; -echo '"; +$data[0] = __('TCP receive'); +$data[1] = print_textarea ('tcp_rcv', 2, 65, $tcp_rcv, '', true); +$table->colspan['tcp_receive'][1] = 3; -echo "
'.__('Module Interval'); -echo ''; -echo ''; +push_table_row ($data, 'tcp_receive'); + +return; ?>
'; diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 9787d9a081..cf9af1c048 100644 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -1170,6 +1170,10 @@ function get_url_refresh ($params = false, $relative = true, $add_post = true) { if (! is_array ($params)) $params = array (); + /* Avoid showing login info */ + $params['pass'] = false; + $params['nick'] = false; + $params['unnamed'] = false; //We don't clean these variables up as they're only being passed along foreach ($_GET as $key => $value) { diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index dc3edcb29a..7d848553e2 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -781,11 +781,13 @@ input[type=image] { } table#simple select#id_module_type, table#alert_search select#id_agent, -table#alert_search select#id_group { +table#alert_search select#id_group, +table#network_component select#type { width: 200px; } table#simple select#select_snmp_oid, -table#simple select#id_plugin { +table#simple select#id_plugin, +table#network_component select#id_plugin { width: 270px; } table#simple input#text-plugin_parameter, diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index c752e530a2..eb7a58368e 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -483,6 +483,7 @@ CREATE TABLE IF NOT EXISTS `tnetwork_component` ( `snmp_oid` varchar(400) NOT NULL, `id_module_group` tinyint(4) unsigned NOT NULL default '0', `id_modulo` int(10) unsigned default '0', + `id_plugin` INTEGER unsigned default '0', `plugin_user` varchar(250) default '', `plugin_pass` varchar(250) default '', `plugin_parameter` text,