Fix alert view with default actions node and meta
This commit is contained in:
parent
1dec1e468c
commit
daf0b4e6e9
|
@ -2183,7 +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 IN (SELECT talert_templates.id FROM talert_templates where talert_templates.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)) {
|
||||
|
|
|
@ -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 = '<div><ul class="action_list">';
|
||||
foreach ($actions as $action) {
|
||||
$actionText .= '<div class="mrgn_btn_5px" ><span class="action_name"><li>'.$action['name'];
|
||||
|
@ -1215,9 +1215,9 @@ function ui_format_alert_row(
|
|||
}
|
||||
|
||||
$actionText .= '</ul></div>';
|
||||
} else {
|
||||
|
||||
if ($actionDefault != '') {
|
||||
$actionText = db_get_sql(
|
||||
$actionText .= db_get_sql(
|
||||
sprintf(
|
||||
'SELECT name FROM talert_actions WHERE id = %d',
|
||||
$actionDefault
|
||||
|
|
|
@ -420,7 +420,7 @@ 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);
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue