2010-02-11 Miguel de Dios <miguel.dedios@artica.es>

* include/functions_gis.php: clean source code, delete javascript debug
	info messages for firebug.

	* godmode/agentes/module_manager_editor_network.php,
	godmode/agentes/configurar_agente.php: add support for SMNP ver3 in the
	forms to add or edit "Network module".


git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2352 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2010-02-11 18:44:12 +00:00
parent 5ce5a79d6c
commit ea3ba41b93
4 changed files with 71 additions and 11 deletions

View File

@ -1,3 +1,12 @@
2010-02-10 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_gis.php: clean source code, delete javascript debug
info messages for firebug.
* godmode/agentes/module_manager_editor_network.php,
godmode/agentes/configurar_agente.php: add support for SMNP ver3 in the
forms to add or edit "Network module".
2010-02-10 Sancho Lerena <slerena@artica.es>
* godmode/db/db_main.php: Added new metrics about DB usage. Added

View File

@ -470,15 +470,17 @@ if ($update_module || $create_module) {
$custom_string_2 = (string) get_parameter ('snmp3_privacy_pass');
$custom_string_3 = (string) get_parameter ('snmp3_security_level');
}
else {
$plugin_user = (string) get_parameter ('plugin_user');
if (get_parameter('id_module_component_type') == 7)
$plugin_pass = (int) get_parameter ('plugin_pass');
else
$plugin_pass = (string) get_parameter ('plugin_pass');
$plugin_parameter = (string) get_parameter ('plugin_parameter');
}
$ip_target = (string) get_parameter ('ip_target');
$plugin_user = (string) get_parameter ('plugin_user');
if (get_parameter('id_module_component_type') == 7)
$plugin_pass = (int) get_parameter ('plugin_pass');
else
$plugin_pass = (string) get_parameter ('plugin_pass');
$plugin_parameter = (string) get_parameter ('plugin_parameter');
$custom_id = (string) get_parameter ('custom_id');
$history_data = (int) get_parameter('history_data');
$min_warning = (float) get_parameter ('min_warning');
@ -486,6 +488,11 @@ if ($update_module || $create_module) {
$min_critical = (float) get_parameter ('min_critical');
$max_critical = (float) get_parameter ('max_critical');
$ff_event = (int) get_parameter ('ff_event');
$active_snmp_v3 = get_parameter('active_snmp_v3');
if ($active_snmp_v3) {
//
}
}
// MODULE UPDATE

View File

@ -123,4 +123,50 @@ if ($id_module_type >= 15 && $id_module_type <= 18) {
$table_simple->rowstyle['snmp_1'] = 'display: none';
$table_simple->rowstyle['snmp_2'] = 'display: none';
}
$data = array();
$data[0] = __('Auth user');
$data[1] = print_input_text ('snmp3_auth_user', $snmp3_auth_user, '', 15, 60, true);
$data[2] = __('Auth password');
$data[3] = print_input_text ('snmp3_auth_pass', $snmp3_auth_pass, '', 15, 60, true);
$data[3] .= print_input_hidden('active_snmp_v3', 0, true);
if ($snmp_version != 3) $table_simple->rowstyle['field_snmpv3_row1'] = 'display: none;';
push_table_simple($data, 'field_snmpv3_row1');
$data = array();
$data[0] = __('Privacy method');
$data[1] = print_select(array('DES' => __('DES'), 'AES' => __('AES')), 'snmp3_privacy_method', $snmp3_privacy_method, '', '', '', true);
$data[2] = __('privacy pass');
$data[3] = print_input_text ('snmp3_privacy_pass', $snmp3_privacy_pass, '', 15, 60, true);
if ($snmp_version != 3) $table_simple->rowstyle['field_snmpv3_row2'] = 'display: none;';
push_table_simple($data, 'field_snmpv3_row2');
$data = array();
$data[0] = __('Auth method');
$data[1] = print_select(array('MD5' => __('MD5'), 'SHA' => __('SHA')), 'snmp3_auth_method', $snmp3_auth_method, '', '', '', true);
$data[2] = __('Security level');
$data[3] = 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;';
push_table_simple($data, 'field_snmpv3_row3');
?>
<script type="text/javascript">
$(document).ready (function () {
$("#snmp_version").change(function () {
if (this.value == "3") {
$("#simple-field_snmpv3_row1").attr("style", "");
$("#simple-field_snmpv3_row2").attr("style", "");
$("#simple-field_snmpv3_row3").attr("style", "");
$("input[name=active_snmp_v3]").val(1);
}
else {
$("#simple-field_snmpv3_row1").css("display", "none");
$("#simple-field_snmpv3_row2").css("display", "none");
$("#simple-field_snmpv3_row3").css("display", "none");
$("input[name=active_snmp_v3]").val(0);
}
});
});
</script>

View File

@ -195,7 +195,7 @@ function activateAjaxRefresh($layers = null, $lastTimeOfData = null) {
var refreshAjaxIntervalSeconds = 1000;
var idIntervalAjax = null;
function searchPointAgentById(id) {console.log(id);
function searchPointAgentById(id) {
for (layerIndex = 0; layerIndex < map.getNumLayers(); layerIndex++) {
layer = map.layers[layerIndex];
@ -243,8 +243,6 @@ function activateAjaxRefresh($layers = null, $lastTimeOfData = null) {
for (var pointIndex in listPoints) {
if (isInt(pointIndex)) {
feature = searchPointAgentById(idAgent);
console.log(listPoints[pointIndex]);
var point = new OpenLayers.LonLat(listPoints[pointIndex].longitude, listPoints[pointIndex].latitude)
.transform(map.displayProjection, map.getProjectionObject());