diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 82c700fef5..e267b3f4cd 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,10 @@ +2011-08-16 Juan Manuel Ramon + + * pandoradb.oracle.sql + include/functions_agents.php + include/functions_networkmap.php: Removed several mistakes in Pandora + console over Oracle. + 2011-08-16 Ramon Novoa * include/functions_servers.php: Renamed enterprise ICMP and SNMP diff --git a/pandora_console/include/functions_agents.php b/pandora_console/include/functions_agents.php index f3fa90bb7a..8e5f8f98bc 100644 --- a/pandora_console/include/functions_agents.php +++ b/pandora_console/include/functions_agents.php @@ -1041,25 +1041,33 @@ function agents_get_modules ($id_agent = null, $details = false, $filter = false $details = "nombre"; break; case "oracle": - $details = "dbms_lob.substr(nombre,4000,1) as nombre"; + $details = "nombre"; + break; } } else { if ($config['dbtype'] == 'oracle'){ - $details_new = array(); - foreach ($details as $detail){ - if ($detail == 'nombre') - $details_new[] = 'dbms_lob.substr(nombre,4000,1) as nombre'; + $details_new = array(); + if (is_array($details)){ + foreach ($details as $detail){ + if ($detail == 'nombre') + $details_new[] = 'dbms_lob.substr(nombre,4000,1) as nombre'; + else + $details_new[] = $detail; + } + } + else{ + if ($details == 'nombre') + $details_new = 'dbms_lob.substr(nombre,4000,1) as nombre'; else - $details_new[] = $detail; + $details_new = $details; } - $details = io_safe_input ($details_new); + $details = io_safe_input ($details); } else $details = io_safe_input ($details); } - switch ($config["dbtype"]) { case "mysql": case "postgresql": diff --git a/pandora_console/include/functions_networkmap.php b/pandora_console/include/functions_networkmap.php index 3609ce94cc..cdbd9eb71a 100644 --- a/pandora_console/include/functions_networkmap.php +++ b/pandora_console/include/functions_networkmap.php @@ -291,7 +291,6 @@ function networkmap_generate_dot_groups ($pandora_name, $group = 0, $simple = 0, unset ($nodes[$node_id]); continue; } - switch($node['type']){ case 'group': $graph .= networkmap_create_group_node ($node , $simple, $font_size)."\n\t\t"; @@ -304,7 +303,6 @@ function networkmap_generate_dot_groups ($pandora_name, $group = 0, $simple = 0, break; } } - // Define edges foreach ($parents as $node => $parent_id) { // Verify that the parent is in the graph diff --git a/pandora_console/pandoradb.oracle.sql b/pandora_console/pandoradb.oracle.sql index d1e9b25c36..9995025c73 100644 --- a/pandora_console/pandoradb.oracle.sql +++ b/pandora_console/pandoradb.oracle.sql @@ -486,7 +486,7 @@ CREATE TABLE tevento ( id_alert_am NUMBER(10, 0) default 0 NOT NULL, criticity NUMBER(10, 0) default 0 NOT NULL, user_comment CLOB, - tags CLOB NOT NULL, + tags CLOB, CONSTRAINT tevento_event_type_cons CHECK (event_type IN ('unknown','alert_fired','alert_recovered','alert_ceased','alert_manual_validation','recon_host_detected','system','error','new_agent','going_up_warning','going_up_critical','going_down_warning','going_down_normal','going_down_critical','going_up_normal', 'configuration_change')) ); CREATE INDEX tevento_id_1_idx ON tevento(id_agente, id_evento);