From 6cb9fb886ff86465e9bb7a44cddf6afa24eb8b7e Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Mon, 6 Sep 2010 12:16:40 +0000 Subject: [PATCH] 2010-09-06 Miguel de Dios * pandoradb_data.sql: added default value for "sound_alert", "sound_critical" and "sound_warning" into table "tconfig". * include/functions_config.php: in function "update_config" added to update sounds. * include/functions_alerts.php: added function "get_event_status_group" for scan the events. * operation/events/sound_events.php: added first version of event sound window. * operation/events/events.php: added the request for ajax of sound event window. * images/pause.button.png, images/ok.button.png,images/music_note.png, images/play.button.png: added images for sound event window and button in the head of events. * godmode/setup/setup.php: added source code for to config the sounds of events. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3219 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/godmode/setup/setup.php | 53 +++++ pandora_console/images/music_note.png | Bin 0 -> 862 bytes pandora_console/images/ok.button.png | Bin 0 -> 5406 bytes pandora_console/images/pause.button.png | Bin 0 -> 2308 bytes pandora_console/images/play.button.png | Bin 0 -> 3956 bytes pandora_console/include/functions_alerts.php | 42 ++++ pandora_console/include/functions_config.php | 4 + pandora_console/operation/events/events.php | 94 ++++++-- .../operation/events/sound_events.php | 213 ++++++++++++++++++ pandora_console/pandoradb_data.sql | 5 +- 10 files changed, 390 insertions(+), 21 deletions(-) create mode 100644 pandora_console/images/music_note.png create mode 100644 pandora_console/images/ok.button.png create mode 100644 pandora_console/images/pause.button.png create mode 100644 pandora_console/images/play.button.png create mode 100644 pandora_console/operation/events/sound_events.php diff --git a/pandora_console/godmode/setup/setup.php b/pandora_console/godmode/setup/setup.php index a4c072b173..4c7fda4ed3 100644 --- a/pandora_console/godmode/setup/setup.php +++ b/pandora_console/godmode/setup/setup.php @@ -108,6 +108,43 @@ $table->data[16][1] .= __('No').' '.print_radio_button ('activate_gis', 0, $table->data[19][0] = __('Timezone setup'); $table->data[19][1] = print_input_text ('timezone', $config["timezone"], '', 25, 25, true); +$sounds = get_sounds(); +$table->data[20][0] = __('Sound for Alert fired'); +$table->data[20][1] = print_select($sounds, 'sound_alert', $config['sound_alert'], 'replaySound(\'alert\');', '', '', true); +$table->data[20][1] .= ' '; +$table->data[20][1] .= '
'; + +$table->data[21][0] = __('Sound for Monitor critical'); +$table->data[21][1] = print_select($sounds, 'sound_critical', $config['sound_critical'], 'replaySound(\'critical\');', '', '', true); +$table->data[21][1] .= ' '; +$table->data[21][1] .= '
'; + +$table->data[22][0] = __('Sound for Monitor warning'); +$table->data[22][1] = print_select($sounds, 'sound_warning', $config['sound_warning'], 'replaySound(\'warning\');', '', '', true); +$table->data[22][1] .= ' '; +$table->data[22][1] .= '
'; +?> + +'; @@ -117,4 +154,20 @@ echo '
'; print_submit_button (__('Update'), 'update_button', false, 'class="sub upd"'); echo '
'; echo ''; + +function get_sounds() { + global $config; + + $return = array(); + + $files = scandir($config['homedir'] . '/include/sounds'); + + foreach ($files as $file) { + if (strstr($file, 'wav') !== false) { + $return['include/sounds/' . $file] = $file; + } + } + + return $return; +} ?> diff --git a/pandora_console/images/music_note.png b/pandora_console/images/music_note.png new file mode 100644 index 0000000000000000000000000000000000000000..e2133d0c9238f19661b210596651438c956da5a3 GIT binary patch literal 862 zcmV-k1EKthP)Px#32;bRa{vGf6951U69E94oEQKA00(qQO+^RV2?h%l3XDHUuK)l7@JU2LR5;5m z(aUZdRRDnD|ID1ZdF;u>G$j|(G^GWqsBGAD1&eNAQK=x_f?atKsMJ+gNW4RYx(KK( zg%FwwDj)?lc0%kVPHd0o>X|chSd>@zKB3cNsA_OLs!4?zw5c^j3akbsWsYmPt6%59GqWlDDIW*lBjMBw-0`?BhIT%%9y%8XzDOjGQ1QhUR zr_bSF%-XfLXoK~aL`KnX|z7=UL%0jMG-93FG{?sOOQ4-rLM4rh0s89j-yhpEY5NJ^H0T$2LJ*na`^J;jyBDlhK4xo5S~kSPQ(C^Dh$3XrLY7s9<@jg}lC;Kk8%WC{O(Fzf0o%Vm z*XJji{g-{JG6(Ho+Y*Bsqc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&@M@u+S|EvCk=77G^i6`PzZjPz?^Fnf_>4L$2RrNc_jOls#EdsgS0d)=WE@%b?n=> zFK+v;VCT-AY}l{?fFC=Zy;ff5enn-(bF)Ft!XGhW1OWfj(h_&8#@>!)(PEN(5V&>0Ys*-+w>-`t<`~y@AT84uvR>{s84dx8td^@woyB zwF$ve6Dg|`TrMrW|K!P&j2JP3)vH$+mAZA=JeHA>u%6qztSquD z7JkvtfXCxu?%cU7UAmOXlP6PJTFTI&L(hv9he9C^A3n^UJ$rcVwbwLz+Y01RG*}7nXTP8QCU<_0NK50r!a~-#-IO>STE~${ zgxcC#jvqhH(W6JHtgP%n@KC#*SKMyiEhsQWaI#VAbZTz4S%idOqoSMlx3%djB(CgC zF!bWy>a*c6hXVor9t?6e5}_#^CJ1C&EaX@$T$h^4t#-Q>qrMnnc5ijOQVer|RRHVq z@)+L(*Y;AyHm{di%47}96+*0z)$Ve=i*6z*^)8eHo&X|hX~jSiGHWgc1cYElU7bpB z1i4DBq1_rcNGs%$FV6xT2?Ur||BZRz!Pkm;_4WE%p3jN|Wq=b#!i8Mkb`!`e8mp8| zlHXRW@_5)1H6J$#6XkzR72i|ppX~#RB;buJuJ~4#E!*w$@laizn!kOoc@+ zX6*L)xTmH@%Mk%)h%OXEg>KYO7IInJ2T>&Yp}M+Db~0S$@$gVb3GQ-PU+6)(b*0R2 zIdXAOCb(RzaJw&w3WxzAm{(t~w<5kmRuNs2U=^2Z+IPY?s-`_?lVJ&p9epGaU~E+t z+q~W$XR2Rl2;^AA*s3Z$!JClHv~Cj&m!C5NTm;V<>CoBbC+5V&Ps?V+dfA9<*FEQm1(*OVf07*qo IM6N<$g01{+`v3p{ literal 0 HcmV?d00001 diff --git a/pandora_console/images/pause.button.png b/pandora_console/images/pause.button.png new file mode 100644 index 0000000000000000000000000000000000000000..1184db3f3664925ca0e31728eb7b66f1ea6bc03b GIT binary patch literal 2308 zcmV+f3H$bmP)!t-QtMp}k+Js%O>%(reTf!i%mNi8s)pU)~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U;&Rj@`z2~pz+@P?9Dimmq!n&z|D2-ROH%3-fJJK zvh#Q94}i(sX5q}I0}i?4aGIK$$jr=S;>3x3{`u#CVnNRSw#NKQ^>$&w{Dfg@)H@XP;9VA^jY+(uwfbW$6K zCKUZTa7Rhi;Gi2p*?)2QoNI%A)YR0lbm>xN&z?ErMXb1wty z^0}M#5fV3c6X3yJyHcsmF4%L?+SqSSUf-QVLaS`BZz8ldh%GkM!C4yte_lZkiV zeV5qSShj50g4t|F@1(?;g~M*_wf?mNn~CvV$D`&gch7IHWLVC~LUp@jSG(@uGp#OgfpVI`jadc}eqCO)-2gN@bclBly5vvlgbnlo{E z)LGj}{fwVHTp65`FW zKMl8MKXu4>5Pj6Chv#oVpWt^R*3kkhjwP4*N3 O0000 $resultAlert, 'sound' => $config['sound_alert']); + } + else if ($resultCritical) { + $return = array('fired' => $resultCritical, 'sound' => $config['sound_critical']); + } + else if ($resultWarning) { + $return = array('fired' => $resultWarning, 'sound' => $config['sound_warning']); + } + else { + $return = array('fired' => 0); + } + + echo json_encode($return); + } + return; } @@ -163,24 +202,27 @@ if (!give_acl ($config["id_user"], 0, "PM")) { if ($status == 1) { $sql_post .= " AND estado = 1"; -} elseif ($status == 0) { +} +elseif ($status == 0) { $sql_post .= " AND estado = 0"; } -if ($search != "") +if ($search != "") { $sql_post .= " AND evento LIKE '%".$search."%'"; +} -if ($event_type != ""){ +if ($event_type != "") { // If normal, warning, could be several (going_up_warning, going_down_warning... too complex // for the user so for him is presented only "warning, critical and normal" - if ($event_type == "warning" || $event_type == "critical" || $event_type == "normal"){ + if ($event_type == "warning" || $event_type == "critical" || $event_type == "normal") { $sql_post .= " AND event_type LIKE '%$event_type%' "; } - elseif ($event_type == "not_normal"){ + elseif ($event_type == "not_normal") { $sql_post .= " AND event_type LIKE '%warning%' OR event_type LIKE '%critical%' OR event_type LIKE '%unknown%' "; } - else + else { $sql_post .= " AND event_type = '".$event_type."'"; + } } if ($severity != -1) @@ -210,21 +252,33 @@ $url = "index.php?sec=eventos&sec2=operation/events/events&search=" . // Header if ($config["pure"] == 0) { $buttons = array( - 'fullscreen' => array('active' => false, - 'text' => '' . - print_image("images/fullscreen.png", true, array ("title" => __('Full screen'))) .''), - 'rss' => array('active' => false, - 'text' => '' . - print_image("images/rss.png", true, array ("title" => __('RSS Events'))) .''), - 'marquee' => array('active' => false, - 'text' => '' . - print_image("images/heart.png", true, array ("title" => __('Marquee display'))) .''), - 'csv' => array('active' => false, - 'text' => '' . - print_image("images/disk.png", true, array ("title" => __('Export to CSV file'))) .'') - ); + 'fullscreen' => array('active' => false, + 'text' => '' . + print_image("images/fullscreen.png", true, array ("title" => __('Full screen'))) .''), + 'rss' => array('active' => false, + 'text' => '' . + print_image("images/rss.png", true, array ("title" => __('RSS Events'))) .''), + 'marquee' => array('active' => false, + 'text' => '' . + print_image("images/heart.png", true, array ("title" => __('Marquee display'))) .''), + 'csv' => array('active' => false, + 'text' => '' . + print_image("images/disk.png", true, array ("title" => __('Export to CSV file'))) .''), + 'sound_event' => array('active' => false, + 'text' => '' . print_image('images/music_note.png', true, array('title' => __('Sound events'))) . '') + ); - print_page_header (__("Events"), "images/lightning_go.png", false, "eventview", false,$buttons); + print_page_header (__("Events"), "images/lightning_go.png", false, "eventview", false, $buttons); + + ?> + + "; +echo "" . __("Sound Alerts") . ""; +echo ""; +echo ""; + +echo "

" . __("Sound Events") . "

"; + +$table = null; +$table->width = '100%'; + +$table->size[0] = '10%'; +$table->size[1] = '90%'; +$table->style[0] = 'font-weight: bold; vertical-align: top;'; + +$table->data[0][0] = __('Group'); +$table->data[0][1] = print_select_groups(false, "AR", true, 'group', '', 'changeGroup();', '', 0, true); +$table->data[1][0] = __('Type'); +$table->data[1][1] = print_checkbox('alert_fired', 'alert_fired', true, true, false, 'changeType();') . __('Alert fired') . '
' . + print_checkbox('critical', 'critical', true, true, false, 'changeType();') . __('Monitor critical') . '
' . + print_checkbox('warning', 'warning', true, true, false, 'changeType();') . __('Monitor warning') . '
' . +$table->data[2][0] = ''; +$table->data[2][1] = ''; +$table->data[2][1] .= ''; + +print_table($table); +?> + + +"; +echo ""; +?> \ No newline at end of file diff --git a/pandora_console/pandoradb_data.sql b/pandora_console/pandoradb_data.sql index d258896852..c94523b8b5 100644 --- a/pandora_console/pandoradb_data.sql +++ b/pandora_console/pandoradb_data.sql @@ -71,7 +71,10 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES ('audit_purge', 15), ('trap_purge', 7), ('event_purge', 15), -('gis_purge', 15); +('gis_purge', 15), +('sound_alert', 'include/sounds/air_shock_alarm.wav'), +('sound_critical', 'include/sounds/Star_Trek_emergency_simulation.wav'), +('sound_warning', 'include/sounds/negativebeep.wav')); UNLOCK TABLES;