Fixed and refactored duplicated functions SNMP Browser not showing v3 paramethers
This commit is contained in:
parent
08c035a612
commit
9bdf048fae
|
@ -173,7 +173,7 @@ function pandora_realtime_graphs()
|
|||
$table->colspan[2]['snmp_oid'] = 2;
|
||||
|
||||
$data['snmp_ver'] = __('Version').' '.html_print_select($snmp_versions, 'snmp_version', $snmp_ver, '', '', 0, true);
|
||||
$data['snmp_ver'] .= ' '.html_print_button(__('SNMP walk'), 'snmp_walk', false, 'javascript:realtimeGraphs.snmpBrowserWindow();', 'class="sub next"', true);
|
||||
$data['snmp_ver'] .= ' '.html_print_button(__('SNMP walk'), 'snmp_walk', false, 'javascript:snmpBrowserWindow();', 'class="sub next"', true);
|
||||
$table->colspan[2]['snmp_ver'] = 2;
|
||||
|
||||
$table->data[] = $data;
|
||||
|
|
|
@ -506,45 +506,5 @@ $(document).ready (function () {
|
|||
});
|
||||
});
|
||||
|
||||
// Show the SNMP browser window
|
||||
function snmpBrowserWindow () {
|
||||
|
||||
// Keep elements in the form and the SNMP browser synced
|
||||
$('#text-target_ip').val($('#text-ip_target').val());
|
||||
$('#text-community').val($('#text-snmp_community').val());
|
||||
$('#snmp_browser_version').val($('#snmp_version').val());
|
||||
$('#text-snmp3_browser_auth_user').val($('#text-snmp3_auth_user').val());
|
||||
$('#snmp3_browser_security_level').val($('#snmp3_security_level').val());
|
||||
$('#snmp3_browser_auth_method').val($('#snmp3_auth_method').val());
|
||||
$('#password-snmp3_browser_auth_pass').val($('#password-snmp3_auth_pass').val());
|
||||
$('#snmp3_browser_privacy_method').val($('#snmp3_privacy_method').val());
|
||||
$('#password-snmp3_browser_privacy_pass').val($('#password-snmp3_privacy_pass').val());
|
||||
|
||||
$("#snmp_browser_container").show().dialog ({
|
||||
title: '',
|
||||
resizable: true,
|
||||
draggable: true,
|
||||
modal: true,
|
||||
overlay: {
|
||||
opacity: 0.5,
|
||||
background: "black"
|
||||
},
|
||||
width: 920,
|
||||
height: 500
|
||||
});
|
||||
}
|
||||
|
||||
// Set the form OID to the value selected in the SNMP browser
|
||||
function setOID () {
|
||||
|
||||
if($('#snmp_browser_version').val() == '3'){
|
||||
$('#text-snmp_oid').val($('#table1-0-1').text());
|
||||
} else {
|
||||
$('#text-snmp_oid').val($('#snmp_selected_oid').text());
|
||||
}
|
||||
|
||||
// Close the SNMP browser
|
||||
$('.ui-dialog-titlebar-close').trigger('click');
|
||||
}
|
||||
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue