Merge branch 'ent-4213-SNMP-Walk-dede-modulo-creado-no-muestra-parametros-v3' into 'develop'
Ent 4213 snmp walk dede modulo creado no muestra parametros v3 See merge request artica/pandorafms!2511
This commit is contained in:
commit
47838a1134
|
@ -173,7 +173,7 @@ function pandora_realtime_graphs()
|
||||||
$table->colspan[2]['snmp_oid'] = 2;
|
$table->colspan[2]['snmp_oid'] = 2;
|
||||||
|
|
||||||
$data['snmp_ver'] = __('Version').' '.html_print_select($snmp_versions, 'snmp_version', $snmp_ver, '', '', 0, true);
|
$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->colspan[2]['snmp_ver'] = 2;
|
||||||
|
|
||||||
$table->data[] = $data;
|
$table->data[] = $data;
|
||||||
|
|
|
@ -10,7 +10,9 @@
|
||||||
|
|
||||||
var plot;
|
var plot;
|
||||||
var plotOptions = {
|
var plotOptions = {
|
||||||
legend: { container: $("#chartLegend") },
|
legend: {
|
||||||
|
container: $("#chartLegend")
|
||||||
|
},
|
||||||
xaxis: {
|
xaxis: {
|
||||||
tickFormatter: function(timestamp, axis) {
|
tickFormatter: function(timestamp, axis) {
|
||||||
var date = new Date(timestamp * 1000);
|
var date = new Date(timestamp * 1000);
|
||||||
|
@ -131,47 +133,6 @@
|
||||||
resetDataPooling();
|
resetDataPooling();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 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");
|
|
||||||
}
|
|
||||||
|
|
||||||
// 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());
|
|
||||||
$("#snmp3_browser_auth_user").val($("#snmp3_auth_user").val());
|
|
||||||
$("#snmp3_browser_security_level").val($("#snmp3_security_level").val());
|
|
||||||
$("#snmp3_browser_auth_method").val($("#snmp3_auth_method").val());
|
|
||||||
$("#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,
|
|
||||||
draggable: true,
|
|
||||||
modal: true,
|
|
||||||
overlay: {
|
|
||||||
opacity: 0.5,
|
|
||||||
background: "black"
|
|
||||||
},
|
|
||||||
width: 920,
|
|
||||||
height: 500
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function shortNumber(number) {
|
function shortNumber(number) {
|
||||||
if (Math.round(number) != number) return number;
|
if (Math.round(number) != number) return number;
|
||||||
number = Number.parseInt(number);
|
number = Number.parseInt(number);
|
||||||
|
@ -187,6 +148,7 @@
|
||||||
|
|
||||||
return number + " " + shorts[pos];
|
return number + " " + shorts[pos];
|
||||||
}
|
}
|
||||||
|
|
||||||
function roundToTwo(num) {
|
function roundToTwo(num) {
|
||||||
return +(Math.round(num + "e+2") + "e-2");
|
return +(Math.round(num + "e+2") + "e-2");
|
||||||
}
|
}
|
||||||
|
|
|
@ -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>
|
</script>
|
||||||
|
|
|
@ -417,3 +417,50 @@ function checkSNMPVersion() {
|
||||||
$("#snmp3_browser_options").css("display", "none");
|
$("#snmp3_browser_options").css("display", "none");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 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()
|
||||||
|
);
|
||||||
|
|
||||||
|
checkSNMPVersion();
|
||||||
|
|
||||||
|
$("#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");
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue