2011-10-28 Juan Manuel Ramon <juanmanuel.ramon@artica.es>

* godmode/modules/manage_network_components_form.php
	godmode/modules/manage_network_components_form_network.php
	godmode/modules/manage_network_components.php: Fixed network 
	components creation and interface problems.
	
	Fixes: #3421589

	* include/help/en/help_projection_graph.php
	include/help/en/help_prediction_date.php
	include/help/es/help_projection_graph.php
	include/help/es/help_prediction_date.php
	images/help/prediction_date.png
	images/help/projection_periods.png
	godmode/reporting/reporting_builder.item_editor.php: Added 
	contextual help. Forgot to update Changelog.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5099 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
juanmanuelr 2011-10-28 13:00:25 +00:00
parent eb1258cbcf
commit 7eaec51a89
4 changed files with 133 additions and 6 deletions

View File

@ -1,3 +1,21 @@
2011-10-28 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* godmode/modules/manage_network_components_form.php
godmode/modules/manage_network_components_form_network.php
godmode/modules/manage_network_components.php: Fixed network
components creation and interface problems.
Fixes: #3421589
* include/help/en/help_projection_graph.php
include/help/en/help_prediction_date.php
include/help/es/help_projection_graph.php
include/help/es/help_prediction_date.php
images/help/prediction_date.png
images/help/projection_periods.png
godmode/reporting/reporting_builder.item_editor.php: Added
contextual help. Forgot to update Changelog.
2011-10-28 Sergio Martin <sergio.martin@artica.es>
* extensions/snmp_explorer.php: Improved snmp explorer to use

View File

@ -158,7 +158,7 @@ if ($update_component) {
$custom_string_1 = '';
$custom_string_2 = '';
$custom_string_3 = '';
$name_check = db_get_value ('name', 'tnetwork_component', 'name', $name);
//$name_check = db_get_value ('name', 'tnetwork_component', 'name', $name);
if ($type >= 15 && $type <= 18) {
// New support for snmp v3
$tcp_send = $snmp_version;
@ -168,9 +168,9 @@ if ($update_component) {
$custom_string_1 = $snmp3_privacy_method;
$custom_string_2 = $snmp3_privacy_pass;
$custom_string_3 = $snmp3_security_level;
$name_check = db_get_value ('name', 'tnetwork_component', 'name', $name);
//$name_check = db_get_value ('name', 'tnetwork_component', 'name', $name);
}
if ($name && !$name_check) {
if (!empty($name)) {
$result = network_components_update_network_component ($id,
array ('type' => $type,
'name' => $name,

View File

@ -128,7 +128,7 @@ else if ($id_component_type == 4) {
require ("godmode/modules/manage_network_components_form_common.php");
require ("godmode/modules/manage_network_components_form_plugin.php");
}
else if ($id_component_type == 2) {
else if ($id_component_type == 2) {
$categories = array (3, 4, 5);
require ("godmode/modules/manage_network_components_form_common.php");
require ("godmode/modules/manage_network_components_form_network.php");
@ -193,7 +193,7 @@ function type_change () {
document.component.snmp3_security_level.disabled=true;
}
// type 15-18- SNMP
if ((document.component.type.value > 14) && (document.component.type.value < 19 )) {
if ((document.component.type.value > 14) && (document.component.type.value < 19 )) {
document.component.snmp_oid.style.background="#fff";
document.component.snmp_oid.style.disabled=false;
document.component.snmp_community.style.background="#fff";
@ -309,6 +309,114 @@ function type_change () {
document.component.snmp3_security_level.disabled=true;
}
}
$(document).ready (function () {
$("#snmp_version").change(function () {
if (this.value == "3") {
$("input[name=snmp3_auth_user]").css({backgroundColor: '#fff'});
$("input[name=snmp3_auth_user]").attr("disabled", false);
$("input[name=snmp3_auth_pass]").css({backgroundColor: '#fff'});
$("input[name=snmp3_auth_pass]").attr("disabled", false);
$("#snmp3_privacy_method").css({backgroundColor: '#fff'});
$("#snmp3_privacy_method").attr("disabled", false);
$("input[name=snmp3_privacy_pass]").css({backgroundColor: '#fff'});
$("input[name=snmp3_privacy_pass]").attr("disabled", false);
$("#snmp3_auth_method").css({backgroundColor: '#fff'});
$("#snmp3_auth_method").attr("disabled", false);
$("#snmp3_security_level").css({backgroundColor: '#fff'});
$("#snmp3_security_level").attr("disabled", false);
$("input[name=active_snmp_v3]").val(1);
$("input[name=snmp_community]").css({backgroundColor: '#ddd'});
$("input[name=snmp_community]").attr("disabled",true);
}
else {
$("input[name=snmp3_auth_user]").val("");
$("input[name=snmp3_auth_user]").css({backgroundColor: '#ddd'});
$("input[name=snmp3_auth_user]").attr("disabled", true);
$("input[name=snmp3_auth_pass]").val("");
$("input[name=snmp3_auth_pass]").css({backgroundColor: '#ddd'});
$("input[name=snmp3_auth_pass]").attr("disabled", true);
$("#snmp3_privacy_method").css({backgroundColor: '#ddd'});
$("#snmp3_privacy_method").attr("disabled", true);
$("input[name=snmp3_privacy_pass]").val("");
$("input[name=snmp3_privacy_pass]").css({backgroundColor: '#ddd'});
$("input[name=snmp3_privacy_pass]").attr("disabled", true);
$("#snmp3_auth_method").css({backgroundColor: '#ddd'});
$("#snmp3_auth_method").attr("disabled", true);
$("#snmp3_security_level").css({backgroundColor: '#ddd'});
$("#snmp3_security_level").attr("disabled", true);
$("input[name=active_snmp_v3]").val(0);
$("input[name=snmp_community]").css({backgroundColor: '#fff'});
$("input[name=snmp_community]").attr("disabled", false);
}
});
$("#type"). change(function () {
if ($("#snmp_version").value == "3") {
$("input[name=snmp3_auth_user]").css({backgroundColor: '#fff'});
$("input[name=snmp3_auth_user]").attr("disabled", false);
$("input[name=snmp3_auth_pass]").css({backgroundColor: '#fff'});
$("input[name=snmp3_auth_pass]").attr("disabled", false);
$("#snmp3_privacy_method").css({backgroundColor: '#fff'});
$("#snmp3_privacy_method").attr("disabled", false);
$("input[name=snmp3_privacy_pass]").css({backgroundColor: '#fff'});
$("input[name=snmp3_privacy_pass]").attr("disabled", false);
$("#snmp3_auth_method").css({backgroundColor: '#fff'});
$("#snmp3_auth_method").attr("disabled", false);
$("#snmp3_security_level").css({backgroundColor: '#fff'});
$("#snmp3_security_level").attr("disabled", false);
$("input[name=active_snmp_v3]").val(1);
$("input[name=snmp_community]").css({backgroundColor: '#ddd'});
$("input[name=snmp_community]").attr("disabled",true);
}else{
$("input[name=snmp3_auth_user]").val("");
$("input[name=snmp3_auth_user]").css({backgroundColor: '#ddd'});
$("input[name=snmp3_auth_user]").attr("disabled", true);
$("input[name=snmp3_auth_pass]").val("");
$("input[name=snmp3_auth_pass]").css({backgroundColor: '#ddd'});
$("input[name=snmp3_auth_pass]").attr("disabled", true);
$("#snmp3_privacy_method").css({backgroundColor: '#ddd'});
$("#snmp3_privacy_method").attr("disabled", true);
$("input[name=snmp3_privacy_pass]").val("");
$("input[name=snmp3_privacy_pass]").css({backgroundColor: '#ddd'});
$("input[name=snmp3_privacy_pass]").attr("disabled", true);
$("#snmp3_auth_method").css({backgroundColor: '#ddd'});
$("#snmp3_auth_method").attr("disabled", true);
$("#snmp3_security_level").css({backgroundColor: '#ddd'});
$("#snmp3_security_level").attr("disabled", true);
$("input[name=active_snmp_v3]").val(0);
$("input[name=snmp_community]").css({backgroundColor: '#fff'});
$("input[name=snmp_community]").attr("disabled", false);
}
});
});
<?php if ($id_component_type == 2) :?>
type_change ();
<?php endif; ?>

View File

@ -66,7 +66,7 @@ push_table_row($data, 'field_snmpv3_row1');
$data = array();
$data[0] = __('Privacy method');
$data[1] = html_print_select(array('DES' => __('DES'), 'AES' => __('AES')), 'snmp3_privacy_method', $snmp3_privacy_method, '', '', '', true);
$data[2] = __('privacy pass');
$data[2] = __('Privacy pass');
$data[3] = html_print_input_text ('snmp3_privacy_pass', $snmp3_privacy_pass, '', 15, 60, true);
push_table_row($data, 'field_snmpv3_row2');
@ -101,3 +101,4 @@ $table->colspan['tcp_receive'][1] = 3;
push_table_row ($data, 'tcp_receive');
?>