diff --git a/pandora_console/images/sound_events_console_alert.gif b/pandora_console/images/sound_events_console_alert.gif new file mode 100644 index 0000000000..78a4d0f2ef Binary files /dev/null and b/pandora_console/images/sound_events_console_alert.gif differ diff --git a/pandora_console/images/tick_sound_events.png b/pandora_console/images/tick_sound_events.png new file mode 100644 index 0000000000..15f1cc4226 Binary files /dev/null and b/pandora_console/images/tick_sound_events.png differ diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index 2054b7dd51..0e52e8f19a 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -3555,13 +3555,14 @@ div.simple_value > a > span.text p .modalheaderh1{ text-align:center; width:100%; - height:37px; + height:26px; left:0px; + padding-top:10px; background-color:#82b92e; color:white; position:relative; font-family:Nunito; - font-size:13pt; + font-size:11pt; } .modalclosex{ cursor:pointer; diff --git a/pandora_console/operation/events/events.php b/pandora_console/operation/events/events.php index c4407a03b9..625d1ed3c9 100644 --- a/pandora_console/operation/events/events.php +++ b/pandora_console/operation/events/events.php @@ -160,18 +160,30 @@ if (is_ajax ()) { if ($resultAlert) { $return = array('fired' => $resultAlert, 'sound' => $config['sound_alert']); + $event = events_get_event($resultAlert); + $module_name = modules_get_agentmodule_name($event['id_agentmodule']); + $return['message'] = __('Alert fired in module ') . io_safe_output($module_name); } else if ($resultCritical) { $return = array('fired' => $resultCritical, 'sound' => $config['sound_critical']); + $event = events_get_event($resultCritical); + $module_name = modules_get_agentmodule_name($event['id_agentmodule']); + $return['message'] = __('Module ') . io_safe_output($module_name) . __(' is going to critical'); } else if ($resultWarning) { $return = array('fired' => $resultWarning, 'sound' => $config['sound_warning']); + $event = events_get_event($resultWarning); + $module_name = modules_get_agentmodule_name($event['id_agentmodule']); + $return['message'] = __('Module ') . io_safe_output($module_name) . __(' is going to warning'); } else if ($resultUnknown) { - $return = array('fired' => $resultWarning, + $return = array('fired' => $resultUnknown, 'sound' => $config['sound_alert']); + $event = events_get_event($resultUnknown); + $module_name = modules_get_agentmodule_name($event['id_agentmodule']); + $return['message'] = __('Module ') . io_safe_output($module_name) . __(' is going to unknown'); } else { $return = array('fired' => 0); @@ -436,7 +448,7 @@ if ($config["pure"] == 0 || $meta) { echo ui_get_full_url('operation/events/sound_events.php'); ?>'; - window.open(url, '','width=400, height=380, toolbar=no, location=no, directories=no, status=no, menubar=no, resizable=no'); + window.open(url, '','width=600, height=450, toolbar=no, location=no, directories=no, status=no, menubar=no, resizable=no'); } " . __("Sound Events") . ""; echo ''; echo ''; echo ""; -echo ""; +echo ""; echo "

" . __("Sound console"). "

"; $table = null; $table->width = '100%'; +$table->styleTable = 'padding-left:16px; padding-right:16px; padding-top:16px;'; $table->class = ' '; $table->size[0] = '10%'; $table->style[0] = 'font-weight: bold; vertical-align: top;'; @@ -76,22 +77,29 @@ $table->style[1] = 'font-weight: bold; vertical-align: top;'; $table->style[2] = 'font-weight: bold; vertical-align: top;'; $table->data[0][0] = __('Group'); -$table->data[0][1] .= html_print_select_groups(false, $access, true, 'group', '', 'changeGroup();', '', 0, true) . '
' . '
'; -$table->data[1][0] .= __('Agent'); -$table->data[1][1] .= html_print_select($agents, 'id_agents[]', true, false, '', '', true, true,'','','','','',false,'','',true); +$table->data[0][1] = html_print_select_groups(false, $access, true, 'group', '', 'changeGroup();', '', 0, true) . '
' . '
'; + $table->data[0][2] = __('Type'); -$table->data[0][3] .= html_print_checkbox('alert_fired', 'alert_fired', true, true, false, 'changeType();') . __('Alert fired') . '
' . +$table->data[0][3] = html_print_checkbox('alert_fired', 'alert_fired', true, true, false, 'changeType();') . __('Alert fired') . '
' . html_print_checkbox('critical', 'critical', true, true, false, 'changeType();') . __('Monitor critical') . '
' . html_print_checkbox('unknown', 'unknown', true, true, false, 'changeType();') . __('Monitor unknown') . '
' . html_print_checkbox('warning', 'warning', true, true, false, 'changeType();') . __('Monitor warning') . '
'; +$table->data[1][0] = __('Agent'); +$table->data[1][1] = html_print_select($agents, 'id_agents[]', true, false, '', '', true, true,'','','','width:104px; height:60px','',false,'','',true); + +$table->data[1][2] = __('Event'); +$table->data[1][3] = html_print_textarea ("events_fired", 1, 20, '', 'readonly="readonly" style="background: #ddd; resize:none;"', true); + html_print_table($table); -echo '
'; $table = null; $table->width = '100%'; +$table->rowstyle[0] = 'text-align:center;'; +$table->styleTable = 'padding-top:16px;padding-bottom:16px;'; $table->class = ' '; $table->bgcolor = 'white'; + $table->data[0][0] = '' . html_print_image("images/play.button.png", true, array("id" => "button")) . ''; @@ -103,10 +111,15 @@ $table->data[0][1] .= '' . $table->data[0][2] .= '' . html_print_image("images/icono_test.png", true, array("id" => "button_try", "style" => "margin-left: 15px;")) . ''; + +$table->data[0][3] .= html_print_image("images/tick_sound_events.png", true, array("id" => "button_status", "style" => "margin-left: 15px;")); + html_print_table($table); ?> + + + "; echo ""; diff --git a/pandora_console/operation/menu.php b/pandora_console/operation/menu.php index e31ac6ceb7..6c27ce428d 100644 --- a/pandora_console/operation/menu.php +++ b/pandora_console/operation/menu.php @@ -317,7 +317,7 @@ if (check_acl ($config['id_user'], 0, "ER") window.open(url, '', - 'width=400, height=380, resizable=no, toolbar=no, location=no, directories=no, status=no, menubar=no'); + 'width=600, height=450, resizable=no, toolbar=no, location=no, directories=no, status=no, menubar=no'); }