mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 00:04:37 +02:00
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
|
// WHEN SELECT ALL TAGS TO FILTER ALERTS
|
||||||
if ($action_filter) {
|
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 .= ' 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)) {
|
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']);
|
$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">';
|
$actionText = '<div><ul class="action_list">';
|
||||||
foreach ($actions as $action) {
|
foreach ($actions as $action) {
|
||||||
$actionText .= '<div class="mrgn_btn_5px" ><span class="action_name"><li>'.$action['name'];
|
$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>';
|
$actionText .= '</ul></div>';
|
||||||
} else {
|
|
||||||
if ($actionDefault != '') {
|
if ($actionDefault != '') {
|
||||||
$actionText = db_get_sql(
|
$actionText .= db_get_sql(
|
||||||
sprintf(
|
sprintf(
|
||||||
'SELECT name FROM talert_actions WHERE id = %d',
|
'SELECT name FROM talert_actions WHERE id = %d',
|
||||||
$actionDefault
|
$actionDefault
|
||||||
|
@ -420,7 +420,7 @@ if ($filter_standby == 'standby_on') {
|
|||||||
if (is_metaconsole() === true) {
|
if (is_metaconsole() === true) {
|
||||||
include_once $config['homedir'].'/enterprise/meta/include/functions_alerts_meta.php';
|
include_once $config['homedir'].'/enterprise/meta/include/functions_alerts_meta.php';
|
||||||
if ($idAgent != 0) {
|
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);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user