diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index d5d7e85299..56a93a2865 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,13 @@ +2014-03-10 Miguel de Dios + + * include/javascript/pandora_snmp_browser.js, + include/functions_snmp_browser.php: cleaned source code style. + + * godmode/agentes/module_manager_editor_network.php: fixed the + javascript include for policies. + + Incident: #616 + 2014-03-10 Juan Manuel Ramon * include/functions_reporting.php: sla reports with sla diff --git a/pandora_console/godmode/agentes/module_manager_editor_network.php b/pandora_console/godmode/agentes/module_manager_editor_network.php index 9ecfbf81a6..f2d81c7ea6 100644 --- a/pandora_console/godmode/agentes/module_manager_editor_network.php +++ b/pandora_console/godmode/agentes/module_manager_editor_network.php @@ -14,8 +14,13 @@ // GNU General Public License for more details. global $config; + require_once($config['homedir'] . "/include/functions_snmp_browser.php"); -ui_require_javascript_file ('pandora_snmp_browser'); +?> + + __('MD5'), 'SHA' => __('SHA')), 'snm $data[2] = __('Security level'); $data[3] = html_print_select(array('noAuthNoPriv' => __('Not auth and not privacy method'), 'authNoPriv' => __('Auth and not privacy method'), 'authPriv' => __('Auth and privacy method')), 'snmp3_security_level', $snmp3_security_level, '', '', '', true); -if ($snmp_version != 3) $table_simple->rowstyle['field_snmpv3_row3'] = 'display: none;'; +if ($snmp_version != 3) + $table_simple->rowstyle['field_snmpv3_row3'] = 'display: none;'; push_table_simple($data, 'field_snmpv3_row3'); snmp_browser_print_container (false, '100%', '60%', 'none'); @@ -245,13 +251,13 @@ $(document).ready (function () { }); $('#snmp_version').change(function() { $('#snmp_browser_version').val($(this).val()); - + // Display or collapse the SNMP browser's v3 options checkSNMPVersion (); }); $('#snmp_browser_version').change(function() { $('#snmp_version').val($(this).val()); - + // Display or collapse the SNMP v3 options in the main window if ($(this).val() == "3") { $("#simple-field_snmpv3_row1").attr("style", ""); @@ -319,7 +325,7 @@ function snmpBrowserWindow () { $('#snmp3_browser_auth_pass').val($('#snmp3_auth_pass').val()); $('#snmp3_browser_privacy_method').val($('#snmp3_privacy_method').val()); $('#snmp3_browser_privacy_pass').val($('#snmp3_privacy_pass').val()); - + $("#snmp_browser_container").show().dialog ({ title: '', resizable: true, diff --git a/pandora_console/include/functions_snmp_browser.php b/pandora_console/include/functions_snmp_browser.php index 13edd78549..aa7520a28b 100644 --- a/pandora_console/include/functions_snmp_browser.php +++ b/pandora_console/include/functions_snmp_browser.php @@ -446,7 +446,12 @@ function snmp_browser_print_container ($return = false, $width = '95%', $height $table->data[0][2] .= html_print_input_text ('starting_oid', '.1.3.6.1.2', '', 25, 0, true); $table->data[0][3] = '' . __('Version') . ''; - $table->data[0][3] .= html_print_select (array ('1' => 'v. 1', '2' => 'v. 2', '2c' => 'v. 2c', '3' => 'v. 3'), 'snmp_browser_version', '', 'checkSNMPVersion();', '', '', true, false, false, ''); + $table->data[0][3] .= html_print_select ( + array ('1' => 'v. 1', + '2' => 'v. 2', + '2c' => 'v. 2c', + '3' => 'v. 3'), + 'snmp_browser_version', '', 'checkSNMPVersion();', '', '', true, false, false, ''); $table->cellstyle[0][3] = 'width: 15px;'; $table->data[0][4] = html_print_button(__('Browse'), 'browse', false, 'snmpBrowse()', 'class="sub search"', true); diff --git a/pandora_console/include/javascript/pandora_snmp_browser.js b/pandora_console/include/javascript/pandora_snmp_browser.js index eb7d30cde8..bfada5f5e6 100644 --- a/pandora_console/include/javascript/pandora_snmp_browser.js +++ b/pandora_console/include/javascript/pandora_snmp_browser.js @@ -1,19 +1,19 @@ // Load the SNMP tree via AJAX function snmpBrowse () { - + // Empty the SNMP tree $("#snmp_browser").html(''); - + // Hide the data div hideOIDData(); - + // Reset previous searches $("#search_results").css('display', 'none'); $("#hidden-search_count").val(-1); // Show the spinner $("#spinner").css('display', ''); - + // Read the target IP and community var target_ip = $('#text-target_ip').val(); var community = $('#text-community').val(); @@ -42,7 +42,7 @@ function snmpBrowse () { "action=" + "snmptree", "page=operation/snmpconsole/snmp_browser" ]; - + // Browse! jQuery.ajax ({ data: params.join ("&"), @@ -63,7 +63,7 @@ function snmpBrowse () { // Expand or collapse an SNMP tree node function toggleTreeNode(node) { - + var display = $("#ul_" + node).css('display'); var src = $("#anchor_" + node).children("img").attr('src'); @@ -81,7 +81,7 @@ function toggleTreeNode(node) { // Expand an SNMP tree node function expandTreeNode(node) { - + if (node == 0) { return; } @@ -97,7 +97,7 @@ function expandTreeNode(node) { // Expand an SNMP tree node function collapseTreeNode(node) { - + if (node == 0) { return; } @@ -113,7 +113,7 @@ function collapseTreeNode(node) { // Expand all tree nodes function expandAll(node) { - + $('#snmp_browser').find('ul').each ( function () { var id = $(this).attr('id').substr(3); expandTreeNode (id);