diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 70264586b8..52fdd6b1b5 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,15 @@ +2013-04-09 Miguel de Dios + + * mobile/index.php, mobile/operation/groups.php, + mobile/operation/agents.php, mobile/operation/alerts.php, + mobile/operation/agent.php, mobile/operation/events.php, + mobile/operation/modules.php, mobile/include/style/main.css: + + * include/functions_alerts.php include/functions_groups.php: some + changes for the mobile. + + * operation/agentes/ver_agente.php: cleaned source code style. + 2013-04-08 Miguel de Dios * mobile/operation/modules.php, mobile/include/style/main.css: some diff --git a/pandora_console/include/functions_alerts.php b/pandora_console/include/functions_alerts.php index 593e63903e..549cba8a32 100644 --- a/pandora_console/include/functions_alerts.php +++ b/pandora_console/include/functions_alerts.php @@ -23,7 +23,7 @@ require_once($config['homedir'] . "/include/functions_agents.php"); require_once($config['homedir'] . '/include/functions_modules.php'); require_once($config['homedir'] . '/include/functions_users.php'); -function alerts_get_alerts($id_group = 0, $free_search = "", $status = "all", $standby = -1, $acl = false, $total = false) { +function alerts_get_alerts($id_group = 0, $free_search = "", $status = "all", $standby = -1, $acl = false, $total = false, $id_agent = 0) { $sql = ""; $alerts = array(); @@ -108,6 +108,10 @@ function alerts_get_alerts($id_group = 0, $free_search = "", $status = "all", $s OR t2.nombre LIKE "%' . $free_search . '%" OR t3.nombre LIKE "%' . $free_search . '%")'; + if ($id_agent != 0) { + $sql .= ' AND t3.id_agente = ' . $id_agent; + } + $row_alerts = db_get_all_rows_sql($sql); if ($total) { diff --git a/pandora_console/include/functions_groups.php b/pandora_console/include/functions_groups.php index 875b1bebbd..f33684b6ee 100644 --- a/pandora_console/include/functions_groups.php +++ b/pandora_console/include/functions_groups.php @@ -775,7 +775,7 @@ function groups_get_group_row($id_group, $group_all, $group, &$printed_groups, $ else { //if ($data["total_agents"] > 0) { if (true) { - $row[__('Agents')] = ""; + $row[__('Agents')] = ""; $row[__('Agents')] .= $data["total_agents"]; $row[__('Agents')] .= ""; } @@ -804,7 +804,7 @@ function groups_get_group_row($id_group, $group_all, $group, &$printed_groups, $ else { //if ($data["agents_unknown"] > 0) { if (true) { - $row[__('Agents unknown')] = ""; + $row[__('Agents unknown')] = ""; $row[__('Agents unknown')] .= $data["agents_unknown"]; $row[__('Agents unknown')] .= ""; } @@ -830,7 +830,7 @@ function groups_get_group_row($id_group, $group_all, $group, &$printed_groups, $ else { //if ($data["monitor_unknown"] > 0) { if (true) { - $row[__('Unknown')] = ""; + $row[__('Unknown')] = ""; $row[__('Unknown')] .= $data["monitor_unknown"]; $row[__('Unknown')] .= ""; } @@ -857,7 +857,7 @@ function groups_get_group_row($id_group, $group_all, $group, &$printed_groups, $ else { //if ($data["monitor_not_init"] > 0) { if (true) { - $row[__('Not init')] = ""; + $row[__('Not init')] = ""; $row[__('Not init')] .= $data["monitor_not_init"]; $row[__('Not init')] .= ""; } @@ -883,7 +883,7 @@ function groups_get_group_row($id_group, $group_all, $group, &$printed_groups, $ else { //if ($data["monitor_ok"] > 0) { if (true) { - $row[__('Normal')] = ""; + $row[__('Normal')] = ""; $row[__('Normal')] .= $data["monitor_ok"]; $row[__('Normal')] .= ""; } @@ -910,7 +910,7 @@ function groups_get_group_row($id_group, $group_all, $group, &$printed_groups, $ else { //if ($data["monitor_warning"] > 0) { if (true) { - $row[__('Warning')] = ""; + $row[__('Warning')] = ""; $row[__('Warning')] .= $data["monitor_warning"]; $row[__('Warning')] .= ""; } @@ -937,7 +937,7 @@ function groups_get_group_row($id_group, $group_all, $group, &$printed_groups, $ else { //if ($data["monitor_critical"] > 0) { if (true) { - $row[__('Critical')] = ""; + $row[__('Critical')] = ""; $row[__('Critical')] .= $data["monitor_critical"]; $row[__('Critical')] .= ""; } @@ -964,7 +964,7 @@ function groups_get_group_row($id_group, $group_all, $group, &$printed_groups, $ else { //if ($data["monitor_alerts_fired"] > 0) { if (true) { - $row[__('Alerts fired')] = "";; + $row[__('Alerts fired')] = "";; $row[__('Alerts fired')] .= $data["monitor_alerts_fired"]; $row[__('Alerts fired')] .= ""; } diff --git a/pandora_console/mobile/include/style/main.css b/pandora_console/mobile/include/style/main.css index 115fd0018d..b3183b19f5 100644 --- a/pandora_console/mobile/include/style/main.css +++ b/pandora_console/mobile/include/style/main.css @@ -226,6 +226,17 @@ tr.group_view_data, .group_view_data { text-shadow: none !important; font-size: 12px !important; } + +.list_groups .link_count { + display: inline !important; +} + +.list_groups .link_count.ui-link-inherit { + margin-top: -5px; + position: absolute; + right: 10px; + top: 0; +} /*END-----------Groups styles-----------------------------------------*/ @@ -432,6 +443,10 @@ table#list_events th { font-weight: bold; } +.cell_0 a { + color: #000000 !important; +} + @media screen and (max-width: 35em) { #list_agents .cell_2 .ui-table-cell-label, #list_agents .cell_3 .ui-table-cell-label, diff --git a/pandora_console/mobile/index.php b/pandora_console/mobile/index.php index 3d92fd4cb0..21bab6ae17 100644 --- a/pandora_console/mobile/index.php +++ b/pandora_console/mobile/index.php @@ -33,6 +33,7 @@ require_once('operation/alerts.php'); require_once('operation/agents.php'); require_once('operation/modules.php'); require_once('operation/module_graph.php'); +require_once('operation/agent.php'); $enterpriseHook = enterprise_include('mobile/include/enterprise.class.php'); $system = System::getInstance(); @@ -124,6 +125,10 @@ switch ($action) { $module_graph = new ModuleGraph(); $module_graph->show(); break; + case 'agent': + $agent = new Agent(); + $agent->show(); + break; } break; } diff --git a/pandora_console/mobile/operation/agent.php b/pandora_console/mobile/operation/agent.php new file mode 100644 index 0000000000..2cdcc752d5 --- /dev/null +++ b/pandora_console/mobile/operation/agent.php @@ -0,0 +1,166 @@ +id = $system->getRequest('id', 0); + $this->agent = agents_get_agents(array( + 'disabled' => 0, + 'id_agente' => $this->id), array('*')); + + if (!empty($this->agent)) { + $this->agent = $this->agent[0]; + + + if ($system->checkACL('AR', $this->agent['id_grupo'])) { + $this->correct_acl = true; + } + else { + $this->correct_acl = false; + } + } + else { + $this->agent = null; + $this->correct_acl = true; + } + } + + public function show() { + if (!$this->correct_acl) { + $this->show_fail_acl(); + } + else { + $this->show_agent(); + } + } + + private function show_fail_acl() { + $ui = Ui::getInstance(); + + $ui->createPage(); + + $options['type'] = 'onStart'; + $options['title_text'] = __('You don\'t have access to this page'); + $options['content_text'] = __('Access to this page is restricted to authorized users only, please contact system administrator if you need assistance.

Please know that all attempts to access this page are recorded in security logs of Pandora System Database'); + $ui->addDialog($options); + + $ui->showPage(); + } + + private function show_agent() { + $ui = Ui::getInstance(); + $system = System::getInstance(); + + $ui->createPage(); + if ($this->id != 0) { + $agent_name = (string) agents_get_name ($this->id); + + $ui->createDefaultHeader(sprintf(__("PandoraFMS: %s"), $agent_name)); + } + else { + $ui->createDefaultHeader(__("PandoraFMS: Agents")); + } + $ui->showFooter(false); + $ui->beginContent(); + if (empty($this->agent)) { + $ui->contentAddHtml('' . __('No agent found') . ''); + } + else { + $ui->contentBeginGrid(); + if ($this->agent['disabled']) { + $agent_name = "" . $agent_name . "" . ui_print_help_tip(__('Disabled'), true); + } + else if ($agent['quiet']) { + $agent_name = "" . $agent_name . " " . html_print_image("images/dot_green.disabled.png", true, array("border" => '0', "title" => __('Quiet'), "alt" => "")) . ""; + } + else { + $agent_name = $agent_name; + } + + + $addresses = agents_get_addresses($this->id); + $address = agents_get_address($id_agente); + foreach ($addresses as $k => $add) { + if($add == $address) { + unset($addresses[$k]); + } + } + $ip = html_print_image('images/world.png', true, array('title' => __('IP address'))) . '  '; + $ip .= empty($address) ? '' . __('N/A') . '' : $address; + if (!empty($addresses)) { + $ip .= ui_print_help_tip(__('Other IP addresses').':
'.implode('
',$addresses), true); + } + + $last_contant = '' . __('Last contact') . ' / ' . __('Remote') . ' ' + .ui_print_timestamp ($agent["ultimo_contacto"], true); + + $description = + empty($agent["comentarios"]) ? '' . __('N/A') . '' : $this->agent["comentarios"]; + + + + $html = ui_print_group_icon ($this->agent["id_grupo"], true) . '  '; + $html .= $agent_name . '
'; + $html .= $ip . '
'; + $html .= $last_contant . '
'; + $html .= $description . '
'; + + $ui->contentGridAddCell($html); + ob_start(); + $html = graph_agent_status ($this->id, 160, 160, true); + $graph_js = ob_get_clean(); + $html = $graph_js . $html; + $html .= "" . __('Events (24h)') . "
"; + $html .= graph_graphic_agentevents ($id_agente, 250, 15, 86400, '', true); + $ui->contentGridAddCell($html); + $ui->contentEndGrid(); + + + $modules = new Modules(); + $filters = array('id_agent' => $this->id, 'all_modules' => true); + $modules->setFilters($filters); + $modules->disabledColumns(array('agent')); + $ui->contentBeginCollapsible(__('Modules')); + $ui->contentCollapsibleAddItem($modules->listModulesHtml(0, true)); + $ui->contentEndCollapsible(); + + $alerts = new Alerts(); + $filters = array('id_agent' => $this->id, 'all_alerts' => true); + $alerts->setFilters($filters); + $alerts->disabledColumns(array('agent')); + $ui->contentBeginCollapsible(__('Alerts')); + $ui->contentCollapsibleAddItem($alerts->listAlertsHtml(true)); + $ui->contentEndCollapsible(); + + $events = new Events(); + $filters = array('id_agent' => $this->id); + $events->setFilters($filters); + $events->disabledColumns(array('agent')); + $events->setReadOnly(); + $ui->contentBeginCollapsible(sprintf(__('Last %s Events'), $system->getPageSize())); + $ui->contentCollapsibleAddItem($events->listEventsHtml(0, true)); + $ui->contentEndCollapsible(); + } + $ui->endContent(); + $ui->showPage(); + } +} \ No newline at end of file diff --git a/pandora_console/mobile/operation/agents.php b/pandora_console/mobile/operation/agents.php index 7e100ea1a0..08e90c4e84 100644 --- a/pandora_console/mobile/operation/agents.php +++ b/pandora_console/mobile/operation/agents.php @@ -248,11 +248,11 @@ class Agents { if (empty($agents_db)) $agents_db = array(); - + html_debug_print($agents_db, true); foreach ($agents_db as $agent) { $row = array(); - $row[0] = $row[__('Agent')] = io_safe_output($agent['nombre']); + $row[0] = $row[__('Agent')] = '' . io_safe_output($agent['nombre']) . ''; $row[1] = $row[__('Description')] = '' . ui_print_truncate_text($agent["description"], 'description', false, true) . ''; diff --git a/pandora_console/mobile/operation/alerts.php b/pandora_console/mobile/operation/alerts.php index 7f1cf123e8..a7696b5bfc 100644 --- a/pandora_console/mobile/operation/alerts.php +++ b/pandora_console/mobile/operation/alerts.php @@ -22,10 +22,14 @@ class Alerts { private $group = 0; private $status = 'all'; private $standby = -1; + private $id_agent = 0; + private $all_alerts = false; private $alert_status_items = null; private $alert_standby_items = null; + private $columns = null; + function __construct() { $this->alert_status_items = array( 'all_enabled' => __('All (Enabled)'), @@ -39,6 +43,8 @@ class Alerts { '1' => __('Standby on'), '0' => __('Standby off')); + $this->columns = array('agent' => 1); + $system = System::getInstance(); if ($system->checkACL($this->acl)) { @@ -86,6 +92,15 @@ class Alerts { } } + public function setFilters($filters) { + if (isset($filters['id_agent'])) { + $this->id_agent = $filters['id_agent']; + } + if (isset($filters['all_alerts'])) { + $this->all_alerts = $filters['all_alerts']; + } + } + public function ajax($parameter2 = false) { $system = System::getInstance(); @@ -193,13 +208,20 @@ class Alerts { $ui->showPage(); } + public function disabledColumns($columns = null) { + if (!empty($columns)) { + foreach ($columns as $column) { + unset($this->columns[$column]); + } + } + } - private function listAlertsHtml () { + public function listAlertsHtml ($return = false) { $countAlerts = alerts_get_alerts($this->group, - $this->free_search, $this->status, $this->standby, "LM", true); + $this->free_search, $this->status, $this->standby, "LM", true, $this->id_agent); $alerts = alerts_get_alerts($this->group, - $this->free_search, $this->status, $this->standby, "LM"); + $this->free_search, $this->status, $this->standby, "LM", false, $this->id_agent); if (empty($alerts)) $alerts = array(); @@ -226,8 +248,10 @@ class Alerts { } $row = array(); - $row[__('Agent')] = sprintf($disabled_style, - '' . io_safe_output($alert['agent_name'])) . ''; + if ($this->columns['agent']) { + $row[__('Agent')] = sprintf($disabled_style, + '' . io_safe_output($alert['agent_name'])) . ''; + } $row[__('Module')] = sprintf($disabled_style, io_safe_output($alert['module_name'])); $row[__('Template')] = sprintf($disabled_style, @@ -242,12 +266,23 @@ class Alerts { $ui = UI::getInstance(); if (empty($table)) { - $ui->contentAddHtml('

' . __('No alerts') . '

'); + $html = '

' . __('No alerts') . '

'; + if (!$return) { + $ui->contentAddHtml($html); + } + else { + return $html; + } } else { $tableHTML = new Table(); $tableHTML->importFromHash($table); - $ui->contentAddHtml($tableHTML->getHTML()); + if (!$return) { + $ui->contentAddHtml($tableHTML->getHTML()); + } + else { + return $tableHTML->getHTML(); + } } } diff --git a/pandora_console/mobile/operation/events.php b/pandora_console/mobile/operation/events.php index 8c7ecfc919..33dadcd646 100644 --- a/pandora_console/mobile/operation/events.php +++ b/pandora_console/mobile/operation/events.php @@ -24,10 +24,18 @@ class Events { private $severity = -1; private $filter = 0; private $group = 0; + private $id_agent = 0; + private $all_events = false; + + private $columns = null; + + private $readOnly = false; function __construct() { $system = System::getInstance(); + $this->columns = array('agent' => 1); + if ($system->checkACL($this->acl)) { $this->correct_acl = true; } @@ -36,6 +44,10 @@ class Events { } } + public function setReadOnly() { + $this->readOnly = true; + } + public function ajax($parameter2 = false) { $system = System::getInstance(); @@ -262,6 +274,14 @@ class Events { } } + public function disabledColumns($columns = null) { + if (!empty($columns)) { + foreach ($columns as $column) { + unset($this->columns[$column]); + } + } + } + private function eventsGetFilters() { $system = System::getInstance(); $user = User::getInstance(); @@ -325,6 +345,15 @@ class Events { } } + public function setFilters($filters) { + if (isset($filters['id_agent'])) { + $this->id_agent = $filters['id_agent']; + } + if (isset($filters['all_events'])) { + $this->all_events = $filters['all_events']; + } + } + private function loadPresetFilter() { $filter = db_get_row('tevent_filter', 'id_filter', $this->filter); @@ -621,6 +650,10 @@ class Events { $sql_post = " AND id_grupo = " . $this->group; } + if ($this->id_agente > 0) { + $sql_post = " AND id_agente = " . $this->id_agente; + } + //-------------------------------------------------------------- @@ -635,7 +668,7 @@ class Events { return array('events' => $events_db, 'total' => $total_events); } - private function listEventsHtml($page = 0) { + public function listEventsHtml($page = 0, $return = false) { $system = System::getInstance(); $listEvents = $this->getListEvents($page); @@ -656,8 +689,13 @@ class Events { // . get_priority_class($event['criticity']); $row = array(); - $row[$field_event_name] = '' . - io_safe_output($event['evento']) . ''; + if ($this->readOnly) { + $row[$field_event_name] = io_safe_output($event['evento']); + } + else { + $row[$field_event_name] = '' . + io_safe_output($event['evento']) . ''; + } /* switch ($event['estado']) { case 0: @@ -676,8 +714,11 @@ class Events { */ $row[$field_timestamp] = ui_print_timestamp ($event['timestamp_rep'], true); - $row[$field_agent] = '' . - (string) agents_get_name($event["id_agente"]) . ''; + + if ($this->columns['agent']) { + $row[$field_agent] = '' . + (string) agents_get_name($event["id_agente"]) . ''; + } $row[$field_status] = html_print_image ("mobile/images/" . @@ -705,25 +746,35 @@ class Events { $ui = Ui::getInstance(); if (empty($events)) { - $ui->contentAddHtml('

' . __('No events') . '

'); + if (!$return) { + $ui->contentAddHtml('

' . __('No events') . '

'); + } + else { + return '

' . __('No events') . '

'; + } } else { $table = new Table(); $table->id = 'list_events'; $table->setRowClass($row_class); $table->importFromHash($events); - $ui->contentAddHtml($table->getHTML()); - - if ($system->getPageSize() < $total_events) { - $ui->contentAddHtml('
' . - html_print_image('images/spinner.gif', true) . - ' ' . __('Loading...') . - '
'); + if (!$return) { + $ui->contentAddHtml($table->getHTML()); - $this->addJavascriptAddBottom(); + if ($system->getPageSize() < $total_events) { + $ui->contentAddHtml('
' . + html_print_image('images/spinner.gif', true) . + ' ' . __('Loading...') . + '
'); + + $this->addJavascriptAddBottom(); + } + + $this->addJavascriptDialog(); + } + else { + return $table->getHTML(); } - - $this->addJavascriptDialog(); } } diff --git a/pandora_console/mobile/operation/groups.php b/pandora_console/mobile/operation/groups.php index 2d5575a175..6b5e67e7a4 100644 --- a/pandora_console/mobile/operation/groups.php +++ b/pandora_console/mobile/operation/groups.php @@ -67,7 +67,7 @@ class Groups { $ui->showFooter(false); $ui->beginContent(); - $ui->contentAddHtml('
'); + $ui->contentAddHtml('
'); $count = 0; foreach ($this->groups as $group) { $ui->contentAddHtml(' diff --git a/pandora_console/mobile/operation/modules.php b/pandora_console/mobile/operation/modules.php index dce998a875..96cf2ac895 100644 --- a/pandora_console/mobile/operation/modules.php +++ b/pandora_console/mobile/operation/modules.php @@ -22,9 +22,13 @@ class Modules { private $free_search = ''; private $module_group = -1; private $tag = ''; + private $id_agent = 0; + private $all_modules = false; private $list_status = null; + private $columns = null; + function __construct() { $system = System::getInstance(); @@ -37,6 +41,8 @@ class Modules { AGENT_MODULE_STATUS_NOT_NORMAL => __('Not normal'), //default AGENT_MODULE_STATUS_NOT_INIT => __('Not init')); + $this->columns = array('agent' => 1); + if ($system->checkACL($this->acl)) { $this->correct_acl = true; } @@ -72,6 +78,23 @@ class Modules { } } + public function setFilters($filters) { + if (isset($filters['id_agent'])) { + $this->id_agent = $filters['id_agent']; + } + if (isset($filters['all_modules'])) { + $this->all_modules = $filters['all_modules']; + } + } + + public function disabledColumns($columns = null) { + if (!empty($columns)) { + foreach ($columns as $column) { + unset($this->columns[$column]); + } + } + } + private function getFilters() { $system = System::getInstance(); $user = User::getInstance(); @@ -233,6 +256,12 @@ class Modules { AND tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo"; + // Part SQL for the id_agent + $sql_conditions_agent = ''; + if ($this->id_agent != 0) { + $sql_conditions_agent = " AND tagente_modulo.id_agente = " . $this->id_agent; + } + // Part SQL for the Group if ($this->group != 0) { $sql_conditions_group = " AND tagente.id_grupo = " . $this->group; @@ -293,7 +322,7 @@ class Modules { WHERE ttag_module.id_tag = " . $this->tag . ")"; } - $sql_conditions_all = $sql_conditions_base . $sql_conditions . + $sql_conditions_all = $sql_conditions_base . $sql_conditions_agent . $sql_conditions . $sql_conditions_group . $sql_conditions_tags; @@ -338,10 +367,12 @@ class Modules { $sql = " FROM tagente, tagente_modulo, tagente_estado" . $sql_conditions_all; - $sql_limit = "ORDER BY tagente.nombre ASC - LIMIT " . (int)($page * $system->getPageSize()) . "," . (int)$system->getPageSize(); + $sql_limit = "ORDER BY tagente.nombre ASC "; + if (!$this->all_modules) { + $sql_limit = " LIMIT " . (int)($page * $system->getPageSize()) . "," . (int)$system->getPageSize(); + } - $total = db_get_value_sql($sql_total. $sql); + $total = db_get_value_sql($sql_total. $sql); html_debug_print($sql_select . $sql . $sql_limit, true); $modules_db = db_get_all_rows_sql($sql_select . $sql . $sql_limit); if (empty($modules_db)) { @@ -351,9 +382,13 @@ class Modules { $modules = array(); foreach ($modules_db as $module) { $row = array(); - $row[0] = $row[__('Agent name')] = - '' . - $module['agent_name'] . ''; + if ($this->columns['agent']) { + $row[0] = $row[__('Agent name')] = + '' . + '' . $module['agent_name'] . '' . + ''; + } + $row[2] = $row[__('Module name')] = '' . $module['module_name']; @@ -458,7 +493,9 @@ class Modules { ' ' . $output . '' . ''; if (!$ajax) { - unset($row[0]); + if ($this->columns['agent']) { + unset($row[0]); + } unset($row[1]); unset($row[2]); unset($row[4]); @@ -474,31 +511,43 @@ class Modules { return array('modules' => $modules, 'total' => $total); } - private function listModulesHtml($page = 0) { + public function listModulesHtml($page = 0, $return = false) { $system = System::getInstance(); $ui = Ui::getInstance(); $listModules = $this->getListModules($page); - $ui->debug($listModules, true); + //$ui->debug($listModules, true); if ($listModules['total'] == 0) { - $ui->contentAddHtml('

' . __('No modules') . '

'); + $html = '

' . __('No modules') . '

'; + if (!$return) { + $ui->contentAddHtml($html); + } } else { $table = new Table(); $table->id = 'list_Modules'; $table->importFromHash($listModules['modules']); - $ui->contentAddHtml($table->getHTML()); + if (!$return) { + $ui->contentAddHtml($table->getHTML()); + } + else { + $html .= $table->getHTML(); + } - if ($system->getPageSize() < $listModules['total']) { - $ui->contentAddHtml('
' . - html_print_image('images/spinner.gif', true) . - ' ' . __('Loading...') . - '
'); - - $this->addJavascriptAddBottom(); + if (!$this->all_modules) { + if ($system->getPageSize() < $listModules['total']) { + $ui->contentAddHtml('
' . + html_print_image('images/spinner.gif', true) . + ' ' . __('Loading...') . + '
'); + + $this->addJavascriptAddBottom(); + } } } + + return $html; } private function addJavascriptAddBottom() { diff --git a/pandora_console/operation/agentes/ver_agente.php b/pandora_console/operation/agentes/ver_agente.php index d2916715a3..90d615c98a 100644 --- a/pandora_console/operation/agentes/ver_agente.php +++ b/pandora_console/operation/agentes/ver_agente.php @@ -136,7 +136,7 @@ if (is_ajax ()) { AND id_alert_template = '.$id_template.' AND id_agente IN (' . implode(',', $idAgents) . ')'; - if($selection_mode == 'common') { + if ($selection_mode == 'common') { $sql .= ' AND ( SELECT count(nombre) FROM tagente_modulo t3, talert_template_modules t4 @@ -847,7 +847,7 @@ foreach($config['extensions'] as $extension) { //Check if OS is vmware $id_remote_field = db_get_value ("id_field", "tagent_custom_fields", "name", "vmware_type"); - + $vmware_type = db_get_value_filter("description", "tagent_custom_data", array("id_field" => $id_remote_field, "id_agent" => $agent["id_agente"])); if ($vmware_type != "vm") {