diff --git a/pandora_console/include/functions_alerts.php b/pandora_console/include/functions_alerts.php
index f308acaa0a..03ec9d8049 100644
--- a/pandora_console/include/functions_alerts.php
+++ b/pandora_console/include/functions_alerts.php
@@ -2183,6 +2183,7 @@ function get_group_alerts(
// WHEN SELECT ALL TAGS TO FILTER ALERTS
if ($action_filter) {
$filter .= ' AND (talert_template_modules.id IN (SELECT id_alert_template_module FROM talert_template_module_actions where id_alert_action = '.$action_filter.'))';
+ $filter .= ' OR talert_template_modules.id_alert_template IN (SELECT talert_templates.id FROM talert_templates where talert_templates.id_alert_action = '.$action_filter.')';
}
if (is_array($options)) {
diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php
index ae4321dadd..c5a8ca02e5 100755
--- a/pandora_console/include/functions_ui.php
+++ b/pandora_console/include/functions_ui.php
@@ -1203,7 +1203,7 @@ function ui_format_alert_row(
$actions = alerts_get_alert_agent_module_actions($alert['id'], false, $alert['server_data']['id']);
- if (empty($actions) === false) {
+ if (empty($actions) === false || $actionDefault != '') {
$actionText = '
';
foreach ($actions as $action) {
$actionText .= '- '.$action['name'];
@@ -1215,9 +1215,9 @@ function ui_format_alert_row(
}
$actionText .= '
';
- } else {
+
if ($actionDefault != '') {
- $actionText = db_get_sql(
+ $actionText .= db_get_sql(
sprintf(
'SELECT name FROM talert_actions WHERE id = %d',
$actionDefault
diff --git a/pandora_console/operation/agentes/alerts_status.php b/pandora_console/operation/agentes/alerts_status.php
index c5d597dd39..0f89992d3f 100755
--- a/pandora_console/operation/agentes/alerts_status.php
+++ b/pandora_console/operation/agentes/alerts_status.php
@@ -420,17 +420,17 @@ if ($filter_standby == 'standby_on') {
if (is_metaconsole() === true) {
include_once $config['homedir'].'/enterprise/meta/include/functions_alerts_meta.php';
if ($idAgent != 0) {
- $alerts['alerts_simple'] = alerts_meta_get_alerts($agents, $filter_alert, $options_simple, $whereAlertSimple, false, false, $idGroup, false, $strict_user);
+ $alerts['alerts_simple'] = alerts_meta_get_alerts($agents, $filter_alert, $options_simple, $whereAlertSimple, false, false, $idGroup, false, $strict_user, $tag_filter, $action_filter);
- $countAlertsSimple = alerts_meta_get_alerts($agents, $filter_alert, false, $whereAlertSimple, false, false, $idGroup, true, $strict_user);
+ $countAlertsSimple = alerts_meta_get_alerts($agents, $filter_alert, false, $whereAlertSimple, false, false, $idGroup, true, $strict_user, $tag_filter, $action_filter);
} else {
$id_groups = array_keys(
users_get_groups($config['id_user'], 'AR', false)
);
- $alerts['alerts_simple'] = alerts_meta_get_group_alerts($id_groups, $filter_alert, $options_simple, $whereAlertSimple, false, false, $idGroup, false, $strict_user, $tag_filter);
+ $alerts['alerts_simple'] = alerts_meta_get_group_alerts($id_groups, $filter_alert, $options_simple, $whereAlertSimple, false, false, $idGroup, false, $strict_user, $tag_filter, $action_filter);
- $countAlertsSimple = alerts_meta_get_group_alerts($id_groups, $filter_alert, false, $whereAlertSimple, false, false, $idGroup, true, $strict_user, $tag_filter);
+ $countAlertsSimple = alerts_meta_get_group_alerts($id_groups, $filter_alert, false, $whereAlertSimple, false, false, $idGroup, true, $strict_user, $tag_filter, $action_filter);
}
} else {
if ($idAgent != 0) {