diff --git a/pandora_console/include/functions_agents.php b/pandora_console/include/functions_agents.php index 05b86ae0be..3acf172dad 100644 --- a/pandora_console/include/functions_agents.php +++ b/pandora_console/include/functions_agents.php @@ -1879,6 +1879,8 @@ function agents_delete_agent ($id_agents, $disableACL = false) { //And at long last, the agent db_process_delete_temp ("tagente", "id_agente", $id_agent); + db_process_sql ("delete from ttag_module where id_agente_modulo = (select id_agente_modulo from tagente_modulo where id_agente = ".$id_agent.")"); + db_pandora_audit( "Agent management", "Deleted agent '$agent_name'"); diff --git a/pandora_console/mobile/operation/modules.php b/pandora_console/mobile/operation/modules.php index 70ea40c20b..4513ee0fa5 100644 --- a/pandora_console/mobile/operation/modules.php +++ b/pandora_console/mobile/operation/modules.php @@ -548,12 +548,56 @@ class Modules { } } - $row[7] = $row[__('Data')] = - '' . - '' . - '' . - $output . '' . ''; + + $is_snapshot = is_snapshot_data($module["datos"]); + + $handle = "snapshot" . "_" . $module["id_agente_modulo"]; + $url = 'include/procesos.php?agente=' . $module["id_agente_modulo"]; + + $link = "window.open('../operation/agentes/snapshot_view.php?" . + "id=" . $module["id_agente_modulo"] . + "&refr=" . $module["module_interval"]."','".$handle."','width=700, height=480')"; + + if ($is_snapshot) { + + if (is_image_data($module["datos"])) { + $row[7] = $row[__('Data')] = '' . + html_print_image("images/photo.png", true, + array("border" => '0', + "alt" => "", + "title" => __("Snapshot view"))) . '   '; + } + else { + $row[7] = $row[__('Data')] = '' . + html_print_image("images/default_list.png", true, + array("border" => '0', + "alt" => "", + "title" => __("Snapshot view"))) . '   '; + + } + } + else{ + + $row[7] = $row[__('Data')] = '' . + '' . + '' . $output . '' . ''; + + } + + + /* + + '' . + '' . + '' . $output . '' . '';*/ if (!$ajax) { if ($this->columns['agent']) {