From 0249df739b50d36a393b9eb63539e7b3cfb033a4 Mon Sep 17 00:00:00 2001 From: zarzuelo Date: Wed, 27 Nov 2013 16:54:53 +0000 Subject: [PATCH] 2013-11-27 Sergio Martin * images/hourglass_dark.png images/star_white.png images/star_dark.png images/hourglass_white.png images/tick_dark.png images/tick_white.png mobile/include/style/main.css mobile/operation/agent.php mobile/operation/events.php: Improvements in event viewer of mobile console after fix some conflictive code git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9136 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 14 ++ pandora_console/images/hourglass_dark.png | Bin 0 -> 1350 bytes pandora_console/images/hourglass_white.png | Bin 0 -> 1306 bytes pandora_console/images/star_dark.png | Bin 0 -> 1346 bytes pandora_console/images/star_white.png | Bin 0 -> 1267 bytes pandora_console/images/tick_dark.png | Bin 0 -> 1262 bytes pandora_console/images/tick_white.png | Bin 0 -> 1218 bytes pandora_console/mobile/include/style/main.css | 34 +++- pandora_console/mobile/operation/agent.php | 2 +- pandora_console/mobile/operation/events.php | 172 +++++------------- 10 files changed, 85 insertions(+), 137 deletions(-) create mode 100644 pandora_console/images/hourglass_dark.png create mode 100644 pandora_console/images/hourglass_white.png create mode 100644 pandora_console/images/star_dark.png create mode 100644 pandora_console/images/star_white.png create mode 100644 pandora_console/images/tick_dark.png create mode 100644 pandora_console/images/tick_white.png diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 16c3ad3673..bca8b158c1 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,17 @@ +2013-11-27 Sergio Martin + + * images/hourglass_dark.png + images/star_white.png + images/star_dark.png + images/hourglass_white.png + images/tick_dark.png + images/tick_white.png + mobile/include/style/main.css + mobile/operation/agent.php + mobile/operation/events.php: Improvements in event + viewer of mobile console after fix some conflictive + code + 2013-11-27 Junichi Satoh * include/functions_modules.php: Fixed that some multibyte characters diff --git a/pandora_console/images/hourglass_dark.png b/pandora_console/images/hourglass_dark.png new file mode 100644 index 0000000000000000000000000000000000000000..2a55fdb5e44e7eb2c9bdfdc81e13326f49d40d34 GIT binary patch literal 1350 zcmbVMZD<>19DlObtm#`?J4f5qdA&dxXmZab*Ccl&ZC);CgG~)-zwF0bT}CWpj4IlASmQ+4BDH>Q-oRH)o{@aJ2 z;Fu%?@kja-Frh}pyfieciKDY4>D=sOju!C20W45rkb#0|@K~uZCF@Knh;Q3v(AiWI zIJONjCWH7+P?>~CkdH;9|K8j_rZ}j zO&DiVEVt_mNkKes7%D>$#bVJ_^tcplf*@&{CZL;eyPXK()MsRaFF9r1QM15`dQOv6 zLsDeSw8&?bX(NcENOw{wsENd$VOifT6e<}};#GolL84GF^V&x1MoRoIjN791^o%MJ zDN$FZwH)flxT8i!wY#$;6NsW=9@Zq(6n=_Ta?=G-HsWj$M}J&`BrqK9<4Dp+L7y9X z{Uk}dBhXLwN4->xqGD{cX5)5T5A=B46h~2$xMBiE1KmC|X)krfL(A%qxbX=M@!;j`q7qEWzg_+0>W~+R2v{HR-4* zaGFxUwkym?w}}9H{P5PyBb+bHd17Ij@^Taz_T#%;;r~>PK*12^c-%5BH5Hmc^SC$s zNZ4B+QARtXq2At@6 zpe;1ke(tAooAsUVUc7qYiO(Be>j_U)K$d;4$(mWZUO(UR%U9={79`(7cl+Y6)xWVn zDhF+!UaXq~>3vi75a2I1++TVB-k<-m3N%(87;e49avZlL3@)7oYbQeck5w+edW8M` zU~>VSoPH_~UtElsEX3cY+Jbf*4;=h~yaso~Z6KFgbjmc#ntb*gfycVn$- z>J=`i-O{mKd$DzkT&!O3rrWx7J?&iPb(>e^Mu z>tEQCFO(}kJpPJq*?`GY0sHi_$xHy-`odNjmKM} nGd;FZ5Wi`8?91Mcy3-bLdh?CVd-iv%m^WKIHp0Fg8JqtX0@btK literal 0 HcmV?d00001 diff --git a/pandora_console/images/hourglass_white.png b/pandora_console/images/hourglass_white.png new file mode 100644 index 0000000000000000000000000000000000000000..855f229772db0a6fd5b6e1afae7de111c8b01f48 GIT binary patch literal 1306 zcmbVMTTC2P7(UAaS+NKqgce)PINQXMba!rhn+e-xcV`B+VR3~u-S}Xb**UP2WoNdt z11!YLQcVM1TC|BJQDccOeIVXme9%M%G-!PweK6MgV2xDT5H(GyNd@r?>|!5CADm<| z=l|#X{`-HX5Z{PaiNxB?E%6qRSAA z<)lH_3ngXj!`6$e&UE>Dq8}CV`$Fpfx!9&Ne_9BN2gAZdc8T?pYSjA^D+bZG@=#R3ltX+zDM zs;*&{MM>6&%^;2<-AN&rkH>cnYlU*5P|1j*lqV=RN#t@?Ufbw`*$e**V^4G;IhKb+ zFD&T8MjG{Fz*!-q+TGug1w_$sPZ%m{iZsOQ>ERsI%orcU(I2;>DxAprMT+u!NIy;b z0u;s45i&q|qdt$|@d$jhVq-6^pAncqSfD+kkEbYs36lYVWdad_^)nGlh*Y>Stzb%8 z8dm(O$ZwfT-IvQn4Jetqk<|5}$^;}bx~Ug3dLE1RdEFEim(r?cX{-kAV z?)pFt?TmqzML#ONU6{z{DAPX7#z5r58#-=4sp4 z{V!z)s;jUShitEI{P_6X$f-Za9Ss+oChPxM7_vQ?`0}rgHLzHP9s8+u=}e6Sn`@Em z-I8y0XaeV<^7-7EXuD!gO_{4!-dhf`_*$3_{{F+*x8(3TsO8~#h@NH|Ib$7Qi z*Cua@neO>#-z~|9pI&~u^VUbU)NIc*?+3|8y$LkM0b^Fot^P8!vL+-P# zcjVVVi!9evgQ{0oXC7<$@aM+Izi$!cbBngbo64f?!j*N<_Dt={#NQpCfyod)6#~CB zEGyR?D@=c!U2WahHgVf242F&_T)X@Vv%mBPKFu`@&pMl5{NcA*O0^k%RpHrh}Jmb*z<~Lyt_)pSyEodTQcZ05(5JuAe^t{DanQ6%%^+_aptM{sr*$ BwgLbE literal 0 HcmV?d00001 diff --git a/pandora_console/images/star_dark.png b/pandora_console/images/star_dark.png new file mode 100644 index 0000000000000000000000000000000000000000..55ed22e12bb3c947efface9e4b56b48197dd7b53 GI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5p zT_f4(MVs3B3hb&clgp!%545emwC9`EzTCCe&YSg-p(9UqxjLfl%Y*R)y%&AQ({poc zh5P^c(sgz5(fp@xIe&h!eF@Y7^>lyW@dySLRXthCO<__k~u+iNlwp zdp;ilXHTtsf25}bmf+!gGu*+4|EMRf+u$r%+Igybt%do0=fZ`KXHP@>`_JEMn|NJ? zmlkGEf7ao?q93{`B%Lq!)jtSdI{xm1N0A=+5wwQSUjrX4*!BVc|@CWbR)*Kc9a9 literal 0 HcmV?d00001 diff --git a/pandora_console/images/tick_dark.png b/pandora_console/images/tick_dark.png new file mode 100644 index 0000000000000000000000000000000000000000..a90181c794c4d743e73971e7c5806461ca80587e GIT binary patch literal 1262 zcmbVMO>Em_7N#w3I9j&=b_LzcyBDJJ{}$ z1~et1V~kZu6_ds`hISZYngl{UO+upO=fK8+9wtpi<41@SLX>ep0x`c-`L$!*mOhE^f;G||Gh_#QG z2%xD6;`wNf%2m>^tYzvJ9IcNOmHL#zsl?EeV6es`13GkMP}8Rko3AB^4ZA!#yK0gE z8xUtIL2L#!mdk^*X+aPTQ9*@@(ICczXolh#?hpu5G)2;3l4652#Yb75qCxv1kT*-6 z;0uD(_JyPbQFfdPPm6Dd?44Zp*M?w+n?zM%LsCNrxy>*WJ7}(6&>6|AnzF+AhvkAX$L6 zIb$iP9}|HN8P)FIj$9y$hJVJ=P*db-!Bl2+XgFCRL7+b&Ra1G1V4u{ce0 z;S?38qv;qUGK?ssJ2tlCvJo*7Pl_={iU~9=Mv_!qw` z4f$H()*7`sL z?Tm$%BXx7vKWIPqWrbw1_D$*U_4Ofq-*UX!Y~GpwGK_iVKJ#SPPn^QK{8#$+zV*W* z(mZ=$559NVOSD=oZ{vms99uHJ<)ycuei?kXbnH%DdS}Ah`|t~&47~0e z{{2v6vMK6P)PtT-Zkm>O^W E3v`s1#{d8T literal 0 HcmV?d00001 diff --git a/pandora_console/images/tick_white.png b/pandora_console/images/tick_white.png new file mode 100644 index 0000000000000000000000000000000000000000..cd836bd779a12d4799180c6b1cd202bc9114373e GIT binary patch literal 1218 zcmbVMPiP!f7=OvGn-CIQq=>CWUnXryCA;(9?(Cl#vu<{GX3VD9xMUaIgFyX9CqX0;5iO;yMFs7p6bpr-v_}!z5+X%V^k6T7mx8nhHF^-WRMt1iZtNlS;J`5N z`{wui{(tY?^33x?0|y2G07Jz|ah87f`EP#+fS!A&BIl^E-<4`^#hiCricLVSVb%#O z>dFF{B}!xE_*Y~cfIw5L*4$cYT2M_rs`!|wr(2W_z35k?|Fzh@G^=3Ebg;`PV z_@YvVX}Yc@uxzWnRqCqlndYKd)`Hi2 zlq(c$qPV7AHO-~&1eBYmYdTHSf`v*VieX7nHN)5V4cf_9B)0Y%X~?#z!|e(S+8z<0 zcp5#Jd0tNC+jEDeVB$K!!<>8j`q`p4bjr^4>~5QFZFO_ziH zwSAQ?)^9~ISM`3V-*30GfkCw1FUxZH*0=AB1;P`f2Se~q_T?a4D_=bG{*4bdHbHOy z<*6f~F>vGwu-OYMXCC=w-OG-A|55FmU_bnMW+OB)aQtZK#8zLu=gRo>aQJ%r(Vjc) zku~r&y71|I9XendContent(); $ui->showPage(); } -} \ No newline at end of file +} diff --git a/pandora_console/mobile/operation/events.php b/pandora_console/mobile/operation/events.php index a2c46a1f18..9acc219d58 100644 --- a/pandora_console/mobile/operation/events.php +++ b/pandora_console/mobile/operation/events.php @@ -73,63 +73,48 @@ class Events { foreach ($events_db as $event) { $end = 0; - $details_button = ''; + switch ($event['estado']) { + case 0: + $img_st = "images/star_white.png"; + break; + case 1: + $img_st = "images/tick_white.png"; + break; + case 2: + $img_st = "images/hourglass_white.png"; + break; + } + + if($event['criticity'] == EVENT_CRIT_WARNING) { + $img_st = str_replace("white.png", "dark.png", $img_st); + } + + $status_icon = html_print_image($img_st, true); + $open_link = ''; $close_link = ''; - if (!$this->readOnly) { - /* - $details_button = '' . - ' -   - ' . - ''; - */ - + if (!$this->readOnly) { $open_link = '
'; $close_link = '
'; } $row = array(); - $row[] = $open_link . '' . __('Event Name') . '' . io_safe_output($event['evento']) . $details_button . $close_link; - - /* - switch ($event['estado']) { - case 0: - $img_st = "images/star.png"; - $title_st = __('New event'); - break; - case 1: - $img_st = "images/tick.png"; - $title_st = __('Event validated'); - break; - case 2: - $img_st = "images/hourglass.png"; - $title_st = __('Event in process'); - break; - } - $row[] = html_print_image ($img_st, true, - array ("class" => "image_status", - "width" => 16, - "height" => 16, - "title" => $title_st, - "id" => 'status_img_' . $event["id_evento"])); - */ - - $row[] = $open_link . '' . __('Timestamp') . '' . - ui_print_timestamp ($event['timestamp_rep'], true) . $close_link; - + $row[] = $open_link . '' . __('Event Name') . '' . io_safe_output($event['evento']) . $close_link; + if ($event["id_agente"] == 0) { $agent_name = __('System'); } else { - $agent_name = '' . ui_print_agent_name ($event["id_agente"], true, 'agent_medium', '', false, '', '', false, false) . ''; + $agent_name = '' . ui_print_agent_name ($event["id_agente"], true, 'agent_small', '', false, '', '', false, false) . ''; } + + $row_1 = $open_link; + $row_1 .= '' . __('Agent') . '' . $agent_name . ''; + $row_1 .= '' . $status_icon . '
' . ui_print_timestamp ($event['timestamp_rep'], true) . '
'; + $row_1 .= $close_link; - $row[] = $open_link . '' . __('Agent') . '' . - $agent_name . $close_link; - - $row[] = $details_button; + $row[] = $row_1; $row[] = get_priority_class ($event["criticity"]); $events[$event['id_evento']] = $row; @@ -513,7 +498,7 @@ class Events { $ui->addDialog($options); - $ui->createDefaultHeader(__("PandoraFMS: Events"), + $ui->createDefaultHeader(__("Events"), $ui->createHeaderButton( array('icon' => 'back', 'pos' => 'left', @@ -726,77 +711,8 @@ class Events { $events_db = $listEvents['events']; $total_events = $listEvents['total']; - if (empty($events_db)) - $events_db = array(); - - $events = array(); - $field_event_name = __('Event Name'); - $field_timestamp = __('Timestamp'); - $field_agent = __('Agent'); - - $row_class = array(); - foreach ($events_db as $event) { - $myclass = get_priority_class ($event["criticity"]); - - $details_button = ''; - $open_link = ''; - $close_link = ''; - - if (!$this->readOnly) { - /* - $details_button = '' . - ' -   - ' . - ''; - */ - - $open_link = '
'; - $close_link = '
'; - } - - $row_class[$event['id_evento']] = "events $myclass"; - - $row = array(); - $row[$field_event_name] = $open_link . io_safe_output($event['evento']) . $details_button . $close_link; - /* - switch ($event['estado']) { - case 0: - $img_st = "images/star.png"; - $title_st = __('New event'); - break; - case 1: - $img_st = "images/tick.png"; - $title_st = __('Event validated'); - break; - case 2: - $img_st = "images/hourglass.png"; - $title_st = __('Event in process'); - break; - } - */ - - $row[$field_timestamp] = $open_link . ui_print_timestamp ($event['timestamp_rep'], true) . $close_link; - - if ($event["id_agente"] == 0) { - $agent_name = __('System'); - } - else { - $agent_name = '' . ui_print_agent_name ($event["id_agente"], true, 'agent_medium', '', false, '', '', false, false) . ''; - } - - if ($this->columns['agent']) { - $row[$field_agent] = $open_link . $agent_name . $close_link; - } - - - $row[' '] = $details_button; - - $events[$event['id_evento']] = $row; - } - $ui = Ui::getInstance(); - if (empty($events)) { + if (empty($events_db)) { if (!$return) { $ui->contentAddHtml('

' . __('No events') . '

'); } @@ -805,22 +721,19 @@ class Events { } } else { + // Create an empty table to be filled from ajax $table = new Table(); $table->id = 'list_events'; - $table->setRowClass($row_class); - $table->importFromHash($events); if (!$return) { $ui->contentAddHtml($table->getHTML()); - if ($system->getPageSize() < $total_events) { - $ui->contentAddHtml('
' . - html_print_image('images/spinner.gif', true) . - ' ' . __('Loading...') . - '
'); - - $this->addJavascriptAddBottom(); - } + $ui->contentAddHtml('
' . + html_print_image('images/spinner.gif', true) . + ' ' . __('Loading...') . + '
'); + + $this->addJavascriptAddBottom(); $this->addJavascriptDialog(); } @@ -972,7 +885,7 @@ class Events { $ui->contentAddHtml("