2011-09-27 Dario Rodriguez <dario.rodriguez@artica.es>

* util/pandora_manage.pl: Changed way to create and event now is possible
	to create an event without agent_name and without agent_module.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5014 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
darode 2011-09-27 09:36:59 +00:00
parent 180f785171
commit 6ea30f0ea3
2 changed files with 24 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2011-09-27 Dario Rodriguez <dario.rodriguez@artica.es>
* util/pandora_manage.pl: Changed way to create and event now is possible
to create an event without agent_name and without agent_module.
2011-09-26 Vanessa Gil <vanessa.gil@artica.es>
* pandora_server/util/pandora_manage.pl: Fixed bad behaviour of several

View File

@ -1101,10 +1101,25 @@ sub pandora_manage_main ($$$) {
exist_check($id_group,'group',$group_name);
}
my $id_agent = get_agent_id($dbh,$agent_name);
exist_check($id_agent,'agent',$agent_name);
my $id_agentmodule = get_agent_module_id($dbh,$module_name,$id_agent);
exist_check($id_agentmodule,'module',$module_name);
my $id_agent;
if (defined($agent_name) && $agent_name ne "") {
$id_agent = get_agent_id($dbh,$agent_name);
exist_check($id_agent,'agent',$agent_name);
} else {
$id_agent = 0;
}
my $id_agentmodule;
if (defined($module_name) && $module_name ne "") {
$id_agentmodule = get_agent_module_id($dbh,$module_name,$id_agent);
exist_check($id_agentmodule,'module',$module_name);
} else {
$id_agentmodule = 0;
}
my $id_alert_agent_module;