2012-07-16 Dario Rodriguez <dario.rodriguez@artica.es>

* operation/tree.php: Fixed all views: deleted alert fired
        when module is disabled.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6776 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
darode 2012-07-16 10:36:21 +00:00
parent b132f0d2e0
commit 60cb577c12
2 changed files with 11 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2012-07-16 Dario Rodriguez <dario.rodriguez@artica.es>
* operation/tree.php: Fixed all views: deleted alert fired
when module is disabled.
2012-07-16 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* operation/tree.php: Fixed module view: agents and modules disabled

View File

@ -437,7 +437,7 @@ if (is_ajax ())
switch ($type) {
case 'group':
case 'os':
$agent_info["monitor_alertsfired"] = agents_get_alerts_fired ($row["id_agente"]);
$agent_info["monitor_alertsfired"] = agents_get_alerts_fired ($row["id_agente"], array("disabled" => 0));
$agent_info["monitor_critical"] = agents_monitor_critical ($row["id_agente"]);
$agent_info["monitor_warning"] = agents_monitor_warning ($row["id_agente"]);
@ -460,6 +460,8 @@ if (is_ajax ())
if ($id) {
$filter = "tagente_modulo.id_policy_module != 0";
}
$filter .= " AND disabled = 0";
$agent_info["monitor_alertsfired"] = agents_get_alerts_fired ($row["id_agente"], $filter);
@ -478,7 +480,7 @@ if (is_ajax ())
$agent_info["modules"] = $agent_info["monitor_critical"] + $agent_info["monitor_warning"] + $agent_info["monitor_unknown"] + $agent_info["monitor_normal"];
break;
case 'module_group':
$agent_info["monitor_alertsfired"] = agents_get_alerts_fired ($row["id_agente"], "id_module_group = $id");
$agent_info["monitor_alertsfired"] = agents_get_alerts_fired ($row["id_agente"], "id_module_group = $id AND disabled = 0");
$agent_info["monitor_critical"] = agents_monitor_critical($row["id_agente"], "tagente_modulo.id_module_group = $id");
$agent_info["monitor_warning"] = agents_monitor_warning ($row["id_agente"], "tagente_modulo.id_module_group = $id");
@ -498,7 +500,7 @@ if (is_ajax ())
case 'module':
switch ($config["dbtype"]) {
case "mysql":
$agent_info["monitor_alertsfired"] = agents_get_alerts_fired ($row["id_agente"], ' tagente_modulo.nombre COLLATE utf8_general_ci = "' . $name . '"');
$agent_info["monitor_alertsfired"] = agents_get_alerts_fired ($row["id_agente"], ' tagente_modulo.nombre COLLATE utf8_general_ci = "' . $name . '" AND disabled = 0');
$agent_info["monitor_critical"] = agents_monitor_critical($row["id_agente"], ' tagente_modulo.nombre COLLATE utf8_general_ci = "' . $name . '"');
$agent_info["monitor_warning"] = agents_monitor_warning ($row["id_agente"], ' tagente_modulo.nombre COLLATE utf8_general_ci = "' . $name . '"');
$agent_info["monitor_unknown"] = agents_monitor_unknown ($row["id_agente"], ' tagente_modulo.nombre COLLATE utf8_general_ci = "' . $name . '"');
@ -517,7 +519,7 @@ if (is_ajax ())
case "postgresql":
case "oracle":
//TODO REVIEW ORACLE AND POSTGRESQL
$agent_info["monitor_alertsfired"] = agents_get_alerts_fired ($row["id_agente"], ' tagente_modulo.nombre = \'' . $name . '\'');
$agent_info["monitor_alertsfired"] = agents_get_alerts_fired ($row["id_agente"], ' tagente_modulo.nombre = \'' . $name . '\' AND disabled = 0');
$agent_info["monitor_critical"] = agents_monitor_critical($row["id_agente"], ' tagente_modulo.nombre = \'' . $name . '\'');
$agent_info["monitor_warning"] = agents_monitor_warning ($row["id_agente"], ' tagente_modulo.nombre = \'' . $name . '\'');
$agent_info["monitor_unknown"] = agents_monitor_unknown ($row["id_agente"], ' tagente_modulo.nombre = \'' . $name . '\'');