From 2e71af25686ae2de9b282f820e0c70fd5dca3652 Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Thu, 25 May 2017 17:11:35 +0200 Subject: [PATCH] Added new visual styles to event sound console --- .../images/sound_events_console_alert.gif | Bin 0 -> 3009 bytes pandora_console/images/tick_sound_events.png | Bin 0 -> 2265 bytes pandora_console/include/styles/pandora.css | 5 +- pandora_console/operation/events/events.php | 16 ++++- .../operation/events/sound_events.php | 61 +++++++++--------- pandora_console/operation/menu.php | 2 +- 6 files changed, 50 insertions(+), 34 deletions(-) create mode 100644 pandora_console/images/sound_events_console_alert.gif create mode 100644 pandora_console/images/tick_sound_events.png 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 0000000000000000000000000000000000000000..78a4d0f2efeddb3a21837ec1e7e79b827df0302b GIT binary patch literal 3009 zcmb_eX;f1O7Je^zdD+vbV3AP^La7DRRMa9+OfVpu$fmM~T{Z=QA_8ha2#W#P1%reD zN)i+zB!Vn4Y!W~=7p$y7M5!olI0B|R_DpBaocY(z-2eBUd%o@7eO4BRyL~(XPaqip zltw1X(h}w9xH2S6+1{yibXLAyR3;@WZ-|u^bfxgB^63+0Otf;~j?&9R`AMnFVgrAs zG(Y3*%$=R~((KK*Z>1o?FTI+}5EcWh0`z~M^ZObA>XSk%%Rjg@NLUj#FOAS2j6OOQ zTk|U6)n{3my?@YVL~3GW4+c^{$8#1_DLCfUm_C%Y8m>*;U~kwoC%yr!I)9YNinBYR zF}c0Hc!2x$LaaU!c`79u1to5V$*insq(g=l5qthZ2o{(3Rb~-4m;lGZ$z@fZq+^cw zcz&&WH4RZHy5WkgGZifw?5U%NLz~&l9_I8pgjBrCkXd}eP2=m9DF=_t} zP%%Q-g_q3s5_h8KN3c8aug4}Ruig*6{b6xsB;7l9rRoli@H3R2?oQL-Nq}u{cWWO~ zpxV=0*Om{l93JVcePFb@7%i2gG86LZ2oT3ykg5?_a)<&*$R9k8|v(oQeQ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S`Ynv$Kxe`D9u_-00)r^gsj(*LTD|De%8w^|pbIX>lVBH^#3?_GI8;`_ z55Mfp7Vs}Q71s!mj!=C)XbLJ{oT3J86*oIz#e2@TS`a{%Z}{&li0>;tm@ltznqL1lR>_t(B<3%v(p;=GSF!RB ztqVq7x6chx{b*>Jq~XVnvLwVlnGsnw<%A~{M$@rCSev+(~jNjL5=uIE<1?EHuS(Ch#`r4jsqY#(WFbje8M-1raRKs=y}~~ygt*Ntz}bcd$Vq~ugJg;`#+lO z->k&lQix)0w;B+W0Y6zFnv6H-WkvuCOUemeTHiM?h>c55M#F&+Duo?~#rcyn^WucZui6x!(fMZH3uv|Ang#bWZa0P`zf*V34%62K22(CF}nnd8?bGL*o4&qKB=3s7* z0CliqpyIY2d`}2D5q}Z1IpQWN&`!0FIi%TVbI<4VkS`b5uN|ScnNtqqA5xYblqu@= z!w}^_K?LfRygYJ?CUEp1N!vCefY$DQNc*i#Y8P|I2}IyTM-giJW{SrFTi?Bp%mcPZ z`alHh8)59kK#7_&z8*NJ3zI(sj?@S*X13V@j0O`xKqv^(xnwO7KB#u751HtdR6nfs z?#S3+bK~lx`k;G4&%Rw2|1aVH0WoKAPVCkk1WhL1_C4iB#W7n<8HSj-ukh&jT z;a&1VRP!)CToH%lb5WAz(^LjAYFi6#d0lSL;&*jt)p@~vnVnuktQdyyeu59~Q9QwC zaN;gQJk;PjJw)_}hRA{A?NdkINZtiOSW$Wg$Rmu5s@cn^3@!*FCN+J^rrT4=TGl0& h*UP)ksTqWf%db~-pV!!%vHqWc!CwFq`~U&Q{{W^II&lC1 literal 0 HcmV?d00001 diff --git a/pandora_console/images/tick_sound_events.png b/pandora_console/images/tick_sound_events.png new file mode 100644 index 0000000000000000000000000000000000000000..15f1cc4226a4488f8d3587840ba8451ad1f09eb1 GIT binary patch literal 2265 zcmV;~2qyQ5P)j+rN72NB z%=z)>6I|iKGqDU0-k(CZG!Vsx&i$rfO(0XTC9>6#fyqb6wL!9JxOA*F_DZ-@~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_yAPYNd+Cr3_WHjC@~ixp{4*@ zy4(Ox5TK)CI6;zE{JA6Q5_cUzVy#%e10~!9p@UBX~B4B~8o^O_`Bg2H;X! z?|93!!0m+mtz92wR%Vg6|1|(t)>PzbjthW8I!S$?1IC5n;q%(h1#Sy)VK7ZqmBEvO zW@x;MbGSlZZHLXe0Jqlu`bz$}1-el|T1nd;)iP3a-LlF(J&idl&D5u;7U^{FZUz3L zuE`5F|1L#2J@qxJvyy3`R6(OM=tsUrH5lq%KCg5QqPf+4wlJ54o`k42BH%g`P8mZ~ zn^lYn2L5c_fysfWZVoyx3IQ0@W~jh-HL9t8M9^n-^STTiS@>;;>dksf1bto?`upmS z?(d#RfhvOUcvR*8ag#5KWY=d_lCJ^JQtz*!kb1nef0bSog zqe17SAeir8TXq*fetxQQu7fks3ob;Ljsru4!5AVJ3U}XlXU1X5>hr^?;|%VKB=a@v n&4D@ccji637ADg}kc0XKUIaTUG!7SR00000NkvXXu0mjf9wPxs literal 0 HcmV?d00001 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'); }