diff --git a/pandora_console/include/functions_alerts.php b/pandora_console/include/functions_alerts.php index 3f47d58352..305a0cb089 100644 --- a/pandora_console/include/functions_alerts.php +++ b/pandora_console/include/functions_alerts.php @@ -132,7 +132,7 @@ function alerts_get_alerts($id_group = 0, $free_search = "", $status = "all", $s * * @return mixed Return id if the group have any alert is fired or false is not. */ -function alerts_get_event_status_group($idGroup, $type = "alert_fired", $query = 'AND 1=1') { +function alerts_get_event_status_group($idGroup, $type = "alert_fired", $query = 'AND 1=1', $agents = null) { global $config; $return = false; @@ -151,9 +151,14 @@ function alerts_get_event_status_group($idGroup, $type = "alert_fired", $query = $typeWhere = ' AND event_type IN (' . implode(',', $temp) . ')'; } - $agents = agents_get_group_agents($idGroup, false, "lower", false); - - $idAgents = array_keys($agents); + if ($agents == null) { + $agents = agents_get_group_agents($idGroup, false, "lower", false); + + $idAgents = array_keys($agents); + } + else { + $idAgents = array_values($agents); + } $result = db_get_all_rows_sql('SELECT id_evento FROM tevento diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index 40ad4f71a1..55c8e6a54c 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -3509,6 +3509,17 @@ div.simple_value > a > span.text p font-size:13pt; top:8px; } +.modalheaderh1{ + text-align:center; + width:100%; + height:37px; + left:0px; + background-color:#82b92e; + color:white; + position:relative; + font-family:Nunito; + font-size:13pt; +} .modalclosex{ cursor:pointer; display:inline; diff --git a/pandora_console/operation/events/events.php b/pandora_console/operation/events/events.php index a9cc441aeb..71ecff986d 100644 --- a/pandora_console/operation/events/events.php +++ b/pandora_console/operation/events/events.php @@ -133,24 +133,30 @@ if (is_ajax ()) { $id = get_parameter('id_row'); $idGroup = get_parameter('id_group'); - + $agents = get_parameter('agents', null); + $query = ' AND id_evento > ' . $id; $type = array(); $alert = get_parameter('alert_fired'); if ($alert == 'true') { $resultAlert = alerts_get_event_status_group($idGroup, - 'alert_fired', $query); + 'alert_fired', $query, $agents); } $critical = get_parameter('critical'); if ($critical == 'true') { $resultCritical = alerts_get_event_status_group($idGroup, - 'going_up_critical', $query); + 'going_up_critical', $query, $agents); } $warning = get_parameter('warning'); if ($warning == 'true') { $resultWarning = alerts_get_event_status_group($idGroup, - 'going_up_warning', $query); + 'going_up_warning', $query, $agents); + } + $unknown = get_parameter('unknown'); + if ($unknown == 'true') { + $resultUnknown = alerts_get_event_status_group($idGroup, + 'going_unknown', $query, $agents); } if ($resultAlert) { @@ -165,6 +171,10 @@ if (is_ajax ()) { $return = array('fired' => $resultWarning, 'sound' => $config['sound_warning']); } + else if ($resultUnknown) { + $return = array('fired' => $resultWarning, + 'sound' => $config['sound_alert']); + } else { $return = array('fired' => 0); } @@ -427,7 +437,7 @@ if ($config["pure"] == 0 || $meta) { echo ui_get_full_url('operation/events/sound_events.php'); ?>'; - window.open(url, '','width=300, height=300, toolbar=no, location=no, directories=no, status=no, menubar=no, resizable=yes'); + window.open(url, '','width=400, height=380, toolbar=no, location=no, directories=no, status=no, menubar=no, resizable=no'); } "; echo "
"; echo "