2012-07-24 Miguel de Dios <miguel.dedios@artica.es>
* godmode/agentes/module_manager_editor.php: fixed the javascript error when the module have "remote config" and set to translate some strings that were not translated. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6809 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
e6ae8a76e0
commit
2be7245510
|
@ -1,3 +1,9 @@
|
|||
2012-07-24 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* godmode/agentes/module_manager_editor.php: fixed the javascript
|
||||
error when the module have "remote config" and set to translate
|
||||
some strings that were not translated.
|
||||
|
||||
2012-07-24 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* operation/messages/message_edit.php,
|
||||
|
|
|
@ -73,11 +73,17 @@ if (is_ajax ()) {
|
|||
|
||||
switch ($config["dbtype"]) {
|
||||
case "mysql":
|
||||
$component['type'] = db_get_value_sql('SELECT id_tipo FROM ttipo_modulo WHERE nombre LIKE "' . $typeName . '"');
|
||||
$component['type'] = db_get_value_sql('
|
||||
SELECT id_tipo
|
||||
FROM ttipo_modulo
|
||||
WHERE nombre LIKE "' . $typeName . '"');
|
||||
break;
|
||||
case "postgresql":
|
||||
case "oracle":
|
||||
$component['type'] = db_get_value_sql('SELECT id_tipo FROM ttipo_modulo WHERE nombre LIKE \'' . $typeName . '\'');
|
||||
$component['type'] = db_get_value_sql('
|
||||
SELECT id_tipo
|
||||
FROM ttipo_modulo
|
||||
WHERE nombre LIKE \'' . $typeName . '\'');
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -105,9 +111,10 @@ if (is_ajax ()) {
|
|||
$snmp3_privacy_pass = get_parameter('snmp3_privacy_pass');
|
||||
$snmp_port = get_parameter('snmp_port');
|
||||
|
||||
$snmpwalk = get_snmpwalk($ip_target, $snmp_version, $snmp_community, $snmp3_auth_user,
|
||||
$snmp3_security_level, $snmp3_auth_method, $snmp3_auth_pass,
|
||||
$snmp3_privacy_method, $snmp3_privacy_pass, 1, "", $snmp_port);
|
||||
$snmpwalk = get_snmpwalk($ip_target, $snmp_version, $snmp_community,
|
||||
$snmp3_auth_user, $snmp3_security_level, $snmp3_auth_method,
|
||||
$snmp3_auth_pass, $snmp3_privacy_method, $snmp3_privacy_pass,
|
||||
1, "", $snmp_port);
|
||||
|
||||
if ($snmpwalk === false) {
|
||||
echo json_encode ($snmpwalk);
|
||||
|
@ -275,7 +282,6 @@ if($is_function_policies !== ENTERPRISE_NOT_HOOK) {
|
|||
|
||||
db_pandora_audit("Agent management", "Unlink module " . $id_agent_module);
|
||||
}
|
||||
|
||||
}
|
||||
global $__code_from;
|
||||
$__code_from = 'modules';
|
||||
|
@ -336,12 +342,13 @@ switch ($moduletype) {
|
|||
/* WARNING: type 7 is reserved on enterprise */
|
||||
default:
|
||||
if (enterprise_include ('godmode/agentes/module_manager_editor.php') === ENTERPRISE_NOT_HOOK) {
|
||||
echo '<h3 class="error">DEBUG: Invalid module type specified in '.__FILE__.':'.__LINE__.'</h3>';
|
||||
echo 'Most likely you have recently upgraded from an earlier version of Pandora and either <br />
|
||||
echo '<h3 class="error">';
|
||||
echo sprintf(__('DEBUG: Invalid module type specified in %s:%s'), __FILE__, __LINE__);
|
||||
echo '</h3>';
|
||||
echo __('Most likely you have recently upgraded from an earlier version of Pandora and either <br />
|
||||
1) forgot to use the database converter<br />
|
||||
2) used a bad version of the database converter (see Bugreport #2124706 for the solution)<br />
|
||||
3) found a new bug - please report a way to duplicate this error';
|
||||
|
||||
3) found a new bug - please report a way to duplicate this error');
|
||||
return;
|
||||
}
|
||||
break;
|
||||
|
@ -418,6 +425,7 @@ $(document).ready (function () {
|
|||
configure_modules_form ();
|
||||
|
||||
$("#module_form").submit(function() {
|
||||
if (typeof(check_remote_conf) != 'undefined') {
|
||||
if (check_remote_conf) {
|
||||
//Check the name
|
||||
name = $("#text-name").val();
|
||||
|
@ -427,19 +435,26 @@ $(document).ready (function () {
|
|||
|
||||
regexp_plugin = new RegExp('^module_plugin\\s*');
|
||||
|
||||
if (remote_config == '' || remote_config.match(regexp_name) || remote_config.match(regexp_plugin) || $("#id_module_type").val()==100 || $("#hidden-id_module_type_hidden").val()==100) return true;
|
||||
if (remote_config == '' || remote_config.match(regexp_name) ||
|
||||
remote_config.match(regexp_plugin) ||
|
||||
$("#id_module_type").val()==100 ||
|
||||
$("#hidden-id_module_type_hidden").val()==100) {
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
alert("<?php echo __("Error, The field name and name in module_name in data configuration are different.");?>");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
});
|
||||
|
||||
function checkKeepaliveModule() {
|
||||
// keepalive modules have id = 100
|
||||
if($("#id_module_type").val()==100 || $("#hidden-id_module_type_hidden").val()==100) {
|
||||
if ($("#id_module_type").val()==100 ||
|
||||
$("#hidden-id_module_type_hidden").val()==100) {
|
||||
$("#simple-configuration_data").hide();
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Reference in New Issue