mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
2014-03-10 Miguel de Dios <miguel.dedios@artica.es>
* 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 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9540 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
fe7067425f
commit
eb9a8dadf9
@ -1,3 +1,13 @@
|
|||||||
|
2014-03-10 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
|
* 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 <juanmanuel.ramon@artica.es>
|
2014-03-10 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
||||||
|
|
||||||
* include/functions_reporting.php: sla reports with sla
|
* include/functions_reporting.php: sla reports with sla
|
||||||
|
@ -14,8 +14,13 @@
|
|||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
require_once($config['homedir'] . "/include/functions_snmp_browser.php");
|
require_once($config['homedir'] . "/include/functions_snmp_browser.php");
|
||||||
ui_require_javascript_file ('pandora_snmp_browser');
|
?>
|
||||||
|
<script type="text/javascript" src="include/javascript/pandora_snmp_browser.js"></script>
|
||||||
|
<?php
|
||||||
|
//This line does not run with the dinamic loader editor in policies.
|
||||||
|
//ui_require_javascript_file ('pandora_snmp_browser');
|
||||||
|
|
||||||
// Save some variables for javascript functions
|
// Save some variables for javascript functions
|
||||||
html_print_input_hidden ('ajax_url', ui_get_full_url("ajax.php"), false);
|
html_print_input_hidden ('ajax_url', ui_get_full_url("ajax.php"), false);
|
||||||
@ -185,7 +190,8 @@ $data[1] = html_print_select(array('MD5' => __('MD5'), 'SHA' => __('SHA')), 'snm
|
|||||||
$data[2] = __('Security level');
|
$data[2] = __('Security level');
|
||||||
$data[3] = html_print_select(array('noAuthNoPriv' => __('Not auth and not privacy method'),
|
$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);
|
'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');
|
push_table_simple($data, 'field_snmpv3_row3');
|
||||||
|
|
||||||
snmp_browser_print_container (false, '100%', '60%', 'none');
|
snmp_browser_print_container (false, '100%', '60%', 'none');
|
||||||
@ -245,13 +251,13 @@ $(document).ready (function () {
|
|||||||
});
|
});
|
||||||
$('#snmp_version').change(function() {
|
$('#snmp_version').change(function() {
|
||||||
$('#snmp_browser_version').val($(this).val());
|
$('#snmp_browser_version').val($(this).val());
|
||||||
|
|
||||||
// Display or collapse the SNMP browser's v3 options
|
// Display or collapse the SNMP browser's v3 options
|
||||||
checkSNMPVersion ();
|
checkSNMPVersion ();
|
||||||
});
|
});
|
||||||
$('#snmp_browser_version').change(function() {
|
$('#snmp_browser_version').change(function() {
|
||||||
$('#snmp_version').val($(this).val());
|
$('#snmp_version').val($(this).val());
|
||||||
|
|
||||||
// Display or collapse the SNMP v3 options in the main window
|
// Display or collapse the SNMP v3 options in the main window
|
||||||
if ($(this).val() == "3") {
|
if ($(this).val() == "3") {
|
||||||
$("#simple-field_snmpv3_row1").attr("style", "");
|
$("#simple-field_snmpv3_row1").attr("style", "");
|
||||||
@ -319,7 +325,7 @@ function snmpBrowserWindow () {
|
|||||||
$('#snmp3_browser_auth_pass').val($('#snmp3_auth_pass').val());
|
$('#snmp3_browser_auth_pass').val($('#snmp3_auth_pass').val());
|
||||||
$('#snmp3_browser_privacy_method').val($('#snmp3_privacy_method').val());
|
$('#snmp3_browser_privacy_method').val($('#snmp3_privacy_method').val());
|
||||||
$('#snmp3_browser_privacy_pass').val($('#snmp3_privacy_pass').val());
|
$('#snmp3_browser_privacy_pass').val($('#snmp3_privacy_pass').val());
|
||||||
|
|
||||||
$("#snmp_browser_container").show().dialog ({
|
$("#snmp_browser_container").show().dialog ({
|
||||||
title: '',
|
title: '',
|
||||||
resizable: true,
|
resizable: true,
|
||||||
|
@ -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][2] .= html_print_input_text ('starting_oid', '.1.3.6.1.2', '', 25, 0, true);
|
||||||
|
|
||||||
$table->data[0][3] = '<strong>' . __('Version') . '</strong>';
|
$table->data[0][3] = '<strong>' . __('Version') . '</strong>';
|
||||||
$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->cellstyle[0][3] = 'width: 15px;';
|
||||||
|
|
||||||
$table->data[0][4] = html_print_button(__('Browse'), 'browse', false, 'snmpBrowse()', 'class="sub search"', true);
|
$table->data[0][4] = html_print_button(__('Browse'), 'browse', false, 'snmpBrowse()', 'class="sub search"', true);
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
// Load the SNMP tree via AJAX
|
// Load the SNMP tree via AJAX
|
||||||
function snmpBrowse () {
|
function snmpBrowse () {
|
||||||
|
|
||||||
// Empty the SNMP tree
|
// Empty the SNMP tree
|
||||||
$("#snmp_browser").html('');
|
$("#snmp_browser").html('');
|
||||||
|
|
||||||
// Hide the data div
|
// Hide the data div
|
||||||
hideOIDData();
|
hideOIDData();
|
||||||
|
|
||||||
// Reset previous searches
|
// Reset previous searches
|
||||||
$("#search_results").css('display', 'none');
|
$("#search_results").css('display', 'none');
|
||||||
$("#hidden-search_count").val(-1);
|
$("#hidden-search_count").val(-1);
|
||||||
|
|
||||||
// Show the spinner
|
// Show the spinner
|
||||||
$("#spinner").css('display', '');
|
$("#spinner").css('display', '');
|
||||||
|
|
||||||
// Read the target IP and community
|
// Read the target IP and community
|
||||||
var target_ip = $('#text-target_ip').val();
|
var target_ip = $('#text-target_ip').val();
|
||||||
var community = $('#text-community').val();
|
var community = $('#text-community').val();
|
||||||
@ -42,7 +42,7 @@ function snmpBrowse () {
|
|||||||
"action=" + "snmptree",
|
"action=" + "snmptree",
|
||||||
"page=operation/snmpconsole/snmp_browser"
|
"page=operation/snmpconsole/snmp_browser"
|
||||||
];
|
];
|
||||||
|
|
||||||
// Browse!
|
// Browse!
|
||||||
jQuery.ajax ({
|
jQuery.ajax ({
|
||||||
data: params.join ("&"),
|
data: params.join ("&"),
|
||||||
@ -63,7 +63,7 @@ function snmpBrowse () {
|
|||||||
|
|
||||||
// Expand or collapse an SNMP tree node
|
// Expand or collapse an SNMP tree node
|
||||||
function toggleTreeNode(node) {
|
function toggleTreeNode(node) {
|
||||||
|
|
||||||
var display = $("#ul_" + node).css('display');
|
var display = $("#ul_" + node).css('display');
|
||||||
var src = $("#anchor_" + node).children("img").attr('src');
|
var src = $("#anchor_" + node).children("img").attr('src');
|
||||||
|
|
||||||
@ -81,7 +81,7 @@ function toggleTreeNode(node) {
|
|||||||
|
|
||||||
// Expand an SNMP tree node
|
// Expand an SNMP tree node
|
||||||
function expandTreeNode(node) {
|
function expandTreeNode(node) {
|
||||||
|
|
||||||
if (node == 0) {
|
if (node == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -97,7 +97,7 @@ function expandTreeNode(node) {
|
|||||||
|
|
||||||
// Expand an SNMP tree node
|
// Expand an SNMP tree node
|
||||||
function collapseTreeNode(node) {
|
function collapseTreeNode(node) {
|
||||||
|
|
||||||
if (node == 0) {
|
if (node == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -113,7 +113,7 @@ function collapseTreeNode(node) {
|
|||||||
|
|
||||||
// Expand all tree nodes
|
// Expand all tree nodes
|
||||||
function expandAll(node) {
|
function expandAll(node) {
|
||||||
|
|
||||||
$('#snmp_browser').find('ul').each ( function () {
|
$('#snmp_browser').find('ul').each ( function () {
|
||||||
var id = $(this).attr('id').substr(3);
|
var id = $(this).attr('id').substr(3);
|
||||||
expandTreeNode (id);
|
expandTreeNode (id);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user