2013-09-30 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_agents.php: added code for to delete the nodes of any agent when it is deleted. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8830 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
8338f1aeaf
commit
c5cca52494
|
@ -1,3 +1,8 @@
|
|||
2013-09-30 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/functions_agents.php: added code for to delete the nodes
|
||||
of any agent when it is deleted.
|
||||
|
||||
2013-09-30 Vanessa Gil <vanessa.gil@artica.es>
|
||||
|
||||
* include/languages/ar.mo
|
||||
|
|
|
@ -1621,7 +1621,8 @@ function agents_delete_agent ($id_agents, $disableACL = false) {
|
|||
$addresses = array ();
|
||||
}
|
||||
foreach ($addresses as $address) {
|
||||
db_process_delete_temp ("taddress_agent", "id_ag", $address["id_ag"]);
|
||||
db_process_delete_temp ("taddress_agent",
|
||||
"id_ag", $address["id_ag"]);
|
||||
}
|
||||
|
||||
// We cannot delete tagente_datos and tagente_datos_string here
|
||||
|
@ -1630,20 +1631,40 @@ function agents_delete_agent ($id_agents, $disableACL = false) {
|
|||
// daily maintance process, all data for that modules are deleted
|
||||
|
||||
//Alert
|
||||
db_process_delete_temp ("talert_template_modules", "id_agent_module", $where_modules);
|
||||
db_process_delete_temp ("talert_template_modules",
|
||||
"id_agent_module", $where_modules);
|
||||
|
||||
//Events (up/down monitors)
|
||||
// Dont delete here, could be very time-exausting, let the daily script
|
||||
// delete them after XXX days
|
||||
// db_process_delete_temp ("tevento", "id_agente", $id_agent);
|
||||
|
||||
//Graphs, layouts & reports
|
||||
db_process_delete_temp ("tgraph_source", "id_agent_module", $where_modules);
|
||||
db_process_delete_temp ("tlayout_data", "id_agente_modulo", $where_modules);
|
||||
db_process_delete_temp ("treport_content", "id_agent_module", $where_modules);
|
||||
//Graphs, layouts, reports & networkmapenterprise
|
||||
db_process_delete_temp ("tgraph_source",
|
||||
"id_agent_module", $where_modules);
|
||||
db_process_delete_temp ("tlayout_data",
|
||||
"id_agente_modulo", $where_modules);
|
||||
db_process_delete_temp ("treport_content",
|
||||
"id_agent_module", $where_modules);
|
||||
if (enterprise_installed()) {
|
||||
$nodes = db_get_all_rows_filter(
|
||||
"tnetworkmap_enterprise_nodes",
|
||||
array("id_agent" => $id_agent));
|
||||
|
||||
foreach ($nodes as $node) {
|
||||
db_process_delete_temp ("tnetworkmap_enterprise_relation_nodes",
|
||||
"parent", $node['id']);
|
||||
db_process_delete_temp ("tnetworkmap_enterprise_relation_nodes",
|
||||
"child", $node['id']);
|
||||
}
|
||||
|
||||
db_process_delete_temp ("tnetworkmap_enterprise_nodes",
|
||||
"id_agent", $id_agent);
|
||||
}
|
||||
|
||||
//Planned Downtime
|
||||
db_process_delete_temp ("tplanned_downtime_agents", "id_agent", $id_agent);
|
||||
db_process_delete_temp ("tplanned_downtime_agents", "id_agent",
|
||||
$id_agent);
|
||||
|
||||
//The status of the module
|
||||
db_process_delete_temp ("tagente_estado", "id_agente", $id_agent);
|
||||
|
|
Loading…
Reference in New Issue