From e09e79caa939f541f5a5437d020013ad05834ecd Mon Sep 17 00:00:00 2001 From: zarzuelo <zarzuelo@gmail.com> Date: Thu, 11 Apr 2013 11:13:44 +0000 Subject: [PATCH] 2013-04-11 Sergio Martin <sergio.martin@artica.es> * operation/visual_console/render_view.php operation/reporting/reporting_viewer.php operation/reporting/graph_viewer.php godmode/reporting/visual_console_builder.php godmode/reporting/graph_builder.php godmode/reporting/reporting_builder.php: Redistribute the options of some sections to improve the usability * images/cross_undo.png images/load.png: Change some images * operation/agentes/stat_win.php: Fix the problem of the height of module graphs form layer adding a scroll div git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7961 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 17 +++++++ .../godmode/reporting/graph_builder.php | 2 +- .../godmode/reporting/reporting_builder.php | 2 +- .../reporting/visual_console_builder.php | 26 ++++++---- pandora_console/images/cross_undo.png | Bin 1644 -> 1671 bytes pandora_console/images/load.png | Bin 1511 -> 1507 bytes .../operation/agentes/stat_win.php | 32 +++++++++--- .../operation/reporting/graph_viewer.php | 22 ++++++-- .../operation/reporting/reporting_viewer.php | 25 ++++++++-- .../operation/visual_console/render_view.php | 47 +++++++++--------- 10 files changed, 121 insertions(+), 52 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 50a7d5374c..475a2f920f 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,20 @@ +2013-04-11 Sergio Martin <sergio.martin@artica.es> + + * operation/visual_console/render_view.php + operation/reporting/reporting_viewer.php + operation/reporting/graph_viewer.php + godmode/reporting/visual_console_builder.php + godmode/reporting/graph_builder.php + godmode/reporting/reporting_builder.php: Redistribute + the options of some sections to improve the usability + + * images/cross_undo.png + images/load.png: Change some images + + * operation/agentes/stat_win.php: Fix the problem of + the height of module graphs form layer adding a scroll + div + 2013-04-10 Sergio Martin <sergio.martin@artica.es> * include/styles/pandora.css diff --git a/pandora_console/godmode/reporting/graph_builder.php b/pandora_console/godmode/reporting/graph_builder.php index 322a79682b..4756d575ff 100644 --- a/pandora_console/godmode/reporting/graph_builder.php +++ b/pandora_console/godmode/reporting/graph_builder.php @@ -181,7 +181,7 @@ if ($edit_graph) { $buttons = array( 'main' => array('active' => false, 'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/graph_builder&tab=main&edit_graph=1&id=' . $id_graph . '">' . - html_print_image("images/setup.png", true, array ("title" => __('Setup'))) .'</a>'), + html_print_image("images/chart.png", true, array ("title" => __('Main data'))) .'</a>'), 'graph_editor' => array('active' => false, 'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/graph_builder&tab=graph_editor&edit_graph=1&id=' . $id_graph . '">' . html_print_image("images/builder.png", true, array ("title" => __('Graph editor'))) .'</a>'), diff --git a/pandora_console/godmode/reporting/reporting_builder.php b/pandora_console/godmode/reporting/reporting_builder.php index f83c3de7e0..b9cd721f5c 100644 --- a/pandora_console/godmode/reporting/reporting_builder.php +++ b/pandora_console/godmode/reporting/reporting_builder.php @@ -1396,7 +1396,7 @@ if ($enterpriseEnable) { $buttons = array( 'main' => array('active' => false, 'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=main&action=edit&id_report=' . $idReport . '&pure='.$pure.'">' . - html_print_image("images/op_reporting.png", true, array ("title" => __('Main'))) .'</a>'), + html_print_image("images/op_reporting.png", true, array ("title" => __('Main data'))) .'</a>'), 'list_items' => array('active' => false, 'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=edit&id_report=' . $idReport . '&pure='.$pure.'">' . html_print_image("images/list.png", true, array ("title" => __('List items'))) .'</a>'), diff --git a/pandora_console/godmode/reporting/visual_console_builder.php b/pandora_console/godmode/reporting/visual_console_builder.php index f5ca36d0b9..49417ad6e4 100755 --- a/pandora_console/godmode/reporting/visual_console_builder.php +++ b/pandora_console/godmode/reporting/visual_console_builder.php @@ -401,12 +401,16 @@ else { $url_view = 'index.php?sec=screen&sec2=screens/screens&action=visualmap&pure=0&id_visualmap=' . $idVisualConsole . '&refr=' . $view_refresh; } - - +// Hash for auto-auth in public link +$hash = md5($config["dbpass"]. $id_layout. $config["id_user"]); + $buttons = array( - 'view' => array('active' => false, - 'text' => '<a href="' . $url_view . '">' . - html_print_image ("images/operation.png", true, array ("title" => __('View'))) .'</a>'), + 'consoles_list' => array('active' => false, + 'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/map_builder&refr=' . $refr . '">' . + html_print_image ("images/visual_console.png", true, array ("title" => __('Visual consoles list'))) .'</a>'), + 'public_link' => array('active' => false, + 'text' => '<a href="' . ui_get_full_url('operation/visual_console/public_console.php?hash='.$hash.'&id_layout='.$id_layout.'&id_user='.$config["id_user"]) . '">'. + html_print_image ("images/camera_mc.png", true, array ("title" => __('Show link to public Visual Console'))).'</a>'), 'data' => array('active' => false, 'text' => '<a href="' . $url_base . $action . '&tab=data&id_visual_console=' . $idVisualConsole . '">' . html_print_image ("images/op_reporting.png", true, array ("title" => __('Main data'))) .'</a>'), @@ -418,7 +422,10 @@ $buttons = array( html_print_image ("images/wand.png", true, array ("title" => __('Wizard'))) .'</a>'), 'editor' => array('active' => false, 'text' => '<a href="' . $url_base . $action . '&tab=editor&id_visual_console=' . $idVisualConsole . '">' . - html_print_image ("images/builder.png", true, array ("title" => __('Builder'))) .'</a>')); + html_print_image ("images/builder.png", true, array ("title" => __('Builder'))) .'</a>'), + 'view' => array('active' => false, + 'text' => '<a href="' . $url_view . '">' . + html_print_image ("images/operation.png", true, array ("title" => __('View'))) .'</a>')); if ($action == 'new' || $idVisualConsole === false) { $buttons = array('data' => $buttons['data']); //Show only the data tab @@ -429,11 +436,8 @@ if ($action == 'new' || $idVisualConsole === false) { $buttons[$activeTab]['active'] = true; -if (!defined('METACONSOLE')) +if (!defined('METACONSOLE')) { ui_print_page_header(__('Visual console') . " » " . $visualConsoleName, "images/op_reporting.png", false, "visual_console_editor_" . $activeTab . "_tab", false, $buttons); -else { - // Print header - //ui_meta_print_header(__('Visual console') . " » " . $visualConsoleName, "", $buttons); } //The source code for PAINT THE PAGE @@ -455,4 +459,4 @@ switch ($activeTab) { require_once($config['homedir'] . '/godmode/reporting/visual_console_builder.editor.php'); break; } -?> \ No newline at end of file +?> diff --git a/pandora_console/images/cross_undo.png b/pandora_console/images/cross_undo.png index b542e9b776eb70af56ca9b8ec904a9e15c71b25b..e6512f4768db66fe4d818ed7bac90d787492ab43 100644 GIT binary patch delta 845 zcmaFE)6Tmgib=uJ!o||X!obPW(b2`w(ACJvz{$|U0?05nH?uG?bevqpBm-0Ah*Qxv zrX&S77jrj5Lvs@Yb0Y&Y3qwN-XG0SgLkl-YOG9%*XCs5j7R+_^K0QoI3=B+LJzX3_ zDsCnH`TyUZ*(iZgu&1YoM>~9-4};NXNe8We_xF7KU+-!dp{cw}tbxHvFd;D@y=MQa z%2dS(w(}qEmuf!n-*~yfS4I{A<{svdkMb>nJ}l8Ik8Sv0U;Vj$!ngnD=lwf=g_G&B z+QJuX911+!7fP)@Rv_2$zMi?zev`rp4psr_7tjBnFk!y&=fr{k|4UgNy3R4H@+b&} z%@XK5%IzS;x#C!(%7mDv%b^U6E%$d?Fxa#$_;#+nOWf#Q(hP=@2bBu989Zx~Dk^?3 zZSW27tys(Ac9&U!m5a~$iHFyZ`7^)#|9|YO!1=~UEXUmWe4hMhY-i&*VA5EBNl@d( zm4G=X7|P{BE>|n4HV8&-mynqFlY!Bt=!M}#sVhAm|2P<eUN=gJSxKC8yj~!`N?^%B z0f{vV55J%2YW#TU1j{EK6F<HNAC@Fng?|j8e;Ai=c=$J{dZ$SLd)(>buCP_!_N((F zCT`wf<}C{wRd`cawKugf^PHbQaY>?b{o!6|9-d>39D+J*3hk2^s&+UZWJ)klpEP$G z15?kMHQq)C(m5|=^EupMIPJZ_giFsvk@Z&9q#CBv)h<i)0xsQQI3nEmu$(c@d%-kI zg`aK-m-aSD#k}fSz{7Y+fd91XhZF|G0_IJ=4u>5*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FXwsIOHaWqQG3x<aS2H)qx5He# z3ftT_YskOos8Krehv7)03#<5r1HTo#9a@!E^hB5Mo&4}`|M3ScvP&Y57Cio1*tS`} zUP112psw3W#e|ttXXtDdaM9qDGCIMPVJP8U)y(QRlQHCkl*g`ypFuWJJZeVwcs?;% zopAIn*~hBQ7P?oVA%%nMg3wmx%l!5+jhwP7w}cW@nsq7}*4{q2?;u;kw8JvatNb50 ze*1CQ)PP;Y{slvt<r%{TRr2|L$0zwa%*@@dVBM}`@aC%Ix_vj9#muL1Fi2I2%@J@Y pWMVqMuR-<`g9KC8kJ~{eObm+o!9`ka!hsAx;OXk;vd$@?2>|zxGB5xD diff --git a/pandora_console/images/load.png b/pandora_console/images/load.png index b71fd933b85f8e28df58b7569068644c2acf05d3..80ce7173fdd8b9262ea1a81ed160e7cb748461c9 100644 GIT binary patch delta 679 zcmaFP{g``06qACbg^Q(&g@K!;qoa$Vp{tRTfs>(y1(0EEZf0R(=s3BGNd~6K6{n(Y zOi2oEF6M5AhUO*)=0*l)7KVlv&W0u~h8Av)mWJkr&PE24Etu=;H@bE+Ffa*vx;TbZ z+)DcM|Gz!6Q38`7@9(+)nhiS6a)dGlA3MR6d|(R$i-7VbNgan;PKPQx0qv%g2SGX~ zsu-9$7$g1v+8zIY;*n3lvHBThDQ3#Mx+gL^Fg%>r;>qyVh#`rQXLrMuN`*T9DJ2c; zEJhgxcecw%HyAwNk(gpof0T`ZiDP|y0i)QCJU6!)(;e<r@(bse+&bU!E_cVW!{5UX zt-VuR&&F(4I75EIT=sN^$KsYA5*?RX*bNq0@JD}m$i%?tQuM-bqRh1$ISg#(8WZmv zUp9@iJ1Jll)6ssW347&M%R2~GzW%!Mzj>T|y2bA#=3TSg6zmv!t}rWXeNaCks$$)v z|EKl8OR`w1O0Za_NZ$Kj!4t-rB<)>wy;&#BD!tERs#jARj~Q2Dg6sEt^W85gu!_5L zE`2`#y#SBQ45<ygXMA+n8$>K#ACcUae3c>8xyt5(-7?Q>3<3!$s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-6)H$q*vlVa}=C*y|xBuC!F=$)?*T0<#3f z4s~TzY;4ni#Q8*+F~iQVVVQw@4JUKD-9k|Y2D4QrpM(AL?lJ&@r>mdKI;Vst0MFs- A8vp<R diff --git a/pandora_console/operation/agentes/stat_win.php b/pandora_console/operation/agentes/stat_win.php index 1a5f3c03b6..9b5370e129 100644 --- a/pandora_console/operation/agentes/stat_win.php +++ b/pandora_console/operation/agentes/stat_win.php @@ -230,13 +230,15 @@ $label = base64_decode(get_parameter('label', '')); $params['body_text'] .= html_print_input_hidden ("type", $type, true); } - $table->id = 'stat_win_form'; - $table->width = '100%'; - $table->size[0] = '50%'; - $table->cellspacing = 2; - $table->cellpadding = 2; - $table->class = 'databox_frame'; + // FORM TABLE + $table = html_get_predefined_table('transparent', 2); + $table->width = '98%'; + $table->id = 'stat_win_form_div'; + $table->style[0] = 'text-align:left;'; + $table->style[1] = 'text-align:left;'; + $table->size[0] = '60%'; + $data = array(); $data[0] = __('Refresh time'); $data[1] = html_print_extended_select_for_time("refresh", $refresh, '', '', 0, 7, true); @@ -318,9 +320,23 @@ $label = base64_decode(get_parameter('label', '')); break; } + $form_table = html_print_table($table, true); + + unset($table); + + $table->id = 'stat_win_form'; + $table->width = '100%'; + $table->cellspacing = 2; + $table->cellpadding = 2; + $table->class = 'databox_frame'; + $data = array(); - $data[0] = ''; - $data[1] = '<div style="width:100%; text-align:right;">' . html_print_submit_button (__('Reload'), "submit", false, 'class="sub next"', true) . "</div>"; + $data[0] = html_print_div(array('content' => $form_table, 'style' => 'overflow: auto; height: 220px'), true); + $table->data[] = $data; + $table->rowclass[] = ''; + + $data = array(); + $data[0] = '<div style="width:100%; text-align:right;">' . html_print_submit_button (__('Reload'), "submit", false, 'class="sub next"', true) . "</div>"; $table->data[] = $data; $table->rowclass[] = ''; diff --git a/pandora_console/operation/reporting/graph_viewer.php b/pandora_console/operation/reporting/graph_viewer.php index 3eb2e18f46..7ac1650077 100644 --- a/pandora_console/operation/reporting/graph_viewer.php +++ b/pandora_console/operation/reporting/graph_viewer.php @@ -105,11 +105,22 @@ if ($view_graph) { $url = "index.php?sec=reporting&sec2=operation/reporting/graph_viewer&id=$id_graph&view_graph=1"; - if (check_acl ($config['id_user'], 0, "IW")) { - $options['setup']['text'] = "<a href='index.php?sec=reporting&sec2=godmode/reporting/graph_builder&tab=graph_editor&edit_graph=1&id=$id_graph'>" - . html_print_image ("images/setup.png", true, array ("title" => __('Setup'))) - . "</a>"; + $options = array(); + + if (check_acl ($config['id_user'], 0, "RW")) { + $options = array( + 'main' => array('active' => false, + 'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/graph_builder&tab=main&edit_graph=1&id=' . $id_graph . '">' . + html_print_image("images/chart.png", true, array ("title" => __('Main data'))) .'</a>'), + 'graph_editor' => array('active' => false, + 'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/graph_builder&tab=graph_editor&edit_graph=1&id=' . $id_graph . '">' . + html_print_image("images/builder.png", true, array ("title" => __('Graph editor'))) .'</a>') + ); } + + $options['view']['text'] = '<a href="index.php?sec=reporting&sec2=operation/reporting/graph_viewer&view_graph=1&id=' . $id_graph . '">' . + html_print_image("images/operation.png", true, array ("title" => __('View graph'))) .'</a>'; + $options['view']['active'] = true; if ($config["pure"] == 0) { $options['screen']['text'] = "<a href='$url&pure=1'>" @@ -120,6 +131,9 @@ if ($view_graph) { $options['screen']['text'] = "<a href='$url&pure=0'>" . html_print_image ("images/normal_screen.png", true, array ("title" => __('Back to normal mode'))) . "</a>"; + + // In full screen, the manage options are not available + $options = array('view' => $options['view'], 'screen' => $options['screen']); } // Header diff --git a/pandora_console/operation/reporting/reporting_viewer.php b/pandora_console/operation/reporting/reporting_viewer.php index 0ef7037238..17af7c2ed6 100644 --- a/pandora_console/operation/reporting/reporting_viewer.php +++ b/pandora_console/operation/reporting/reporting_viewer.php @@ -63,9 +63,22 @@ $enable_init_date = get_parameter('enable_init_date', 0); $url = "index.php?sec=reporting&sec2=operation/reporting/reporting_viewer&id=$id_report&date=$date&time=$time&pure=$pure"; -$options['setup']['text'] = "<a href='index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&action=new&tab=item_editor&id_report=$id_report&pure=$pure'>" -. html_print_image ("images/setup.png", true, array ("title" => __('Setup'))) -. "</a>"; +$options['main']['text'] = '<a href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=main&action=edit&id_report=' . $id_report . '&pure='.$pure.'">' . + html_print_image("images/op_reporting.png", true, array ("title" => __('Main data'))) .'</a>'; + +$options['list_items']['text'] = '<a href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=edit&id_report=' . $id_report . '&pure='.$pure.'">' . + html_print_image("images/list.png", true, array ("title" => __('List items'))) .'</a>'; + +$options['item_editor']['text'] = '<a href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=item_editor&action=new&id_report=' . $id_report . '&pure='.$pure.'">' . + html_print_image("images/pen.png", true, array ("title" => __('Item editor'))) .'</a>'; + +if (enterprise_installed()) { + $options = reporting_enterprise_add_Tabs($options, $id_report); +} + +$options['view'] = array('active' => true, + 'text' => '<a href="index.php?sec=reporting&sec2=operation/reporting/reporting_viewer&id=' . $id_report . '&pure='.$pure.'">' . + html_print_image("images/operation.png", true, array ("title" => __('View report'))) .'</a>'); if(!defined('METACONSOLE')) { if ($config["pure"] == 0) { @@ -77,6 +90,9 @@ if(!defined('METACONSOLE')) { $options['screen']['text'] = "<a href='$url&pure=0&enable_init_date=$enable_init_date&date_init=$date_init&time_init=$time_init'>" . html_print_image ("images/normal_screen.png", true, array ("title" => __('Back to normal mode'))) . "</a>"; + + // In full screen, the manage options are not available + $options = array('view' => $options['view'], 'screen' => $options['screen']); } } @@ -90,9 +106,10 @@ if ($config['metaconsole'] == 1 and defined('METACONSOLE')) { // Print header ui_meta_print_header(__('Reporting'), "", $options); } -else +else { ui_print_page_header (__('Reporting'). " » ". __('Custom reporting'). " - ".$report["name"], "images/op_reporting.png", false, "", false, $options); +} if ($enable_init_date) { if ($datetime_init > $datetime) { diff --git a/pandora_console/operation/visual_console/render_view.php b/pandora_console/operation/visual_console/render_view.php index 3c67481822..890674f5cd 100644 --- a/pandora_console/operation/visual_console/render_view.php +++ b/pandora_console/operation/visual_console/render_view.php @@ -61,28 +61,31 @@ if (! check_acl ($config["id_user"], $id_group, "RR")) { // Render map $options = array(); +$options['consoles_list']['text'] = '<a href="index.php?sec=reporting&sec2=godmode/reporting/map_builder&refr=' . $refr . '">' . + html_print_image ("images/visual_console.png", true, array ("title" => __('Visual consoles list'))) .'</a>'; + if (check_acl ($config["id_user"], $id_group, "RW")) { - + $url_base = 'index.php?sec=reporting&sec2=godmode/reporting/visual_console_builder&action='; + $hash = md5($config["dbpass"]. $id_layout. $config["id_user"]); - - if (!defined('METACONSOLE')) - $options['setup']['text'] = '<a href="index.php?sec=reporting&sec2=godmode/reporting/visual_console_builder&tab=editor&action=edit&id_visual_console='.$id_layout.'">'.html_print_image ("images/setup.png", true, array ("title" => __('Setup'))).'</a>'; - else { - $pure = get_parameter('pure', 0); - $options['setup']['text'] = '<a href="index.php?action2=edit&tab=editor&operation=edit_visualmap&sec=screen&sec2=screens/screens&action=visualmap&pure=' . $pure . '&id_visual_console='.$id_layout.'">'.html_print_image ("images/setup.png", true, array ("title" => __('Setup'))).'</a>'; - } - $options['setup']['active'] = false; - - if (!defined('METACONSOLE')) - $url = ui_get_full_url('operation/visual_console/public_console.php?hash='.$hash.'&id_layout='.$id_layout.'&id_user='.$config["id_user"]); - else - $url = ui_get_full_url('operation/visual_console/public_console.php?hash='.$hash.'&id_layout='.$id_layout.'&id_user='.$config["id_user"], false, false, false); - $options['public_link']['text'] = '<a href="' . $url . '">'. - - html_print_image ("images/camera_mc.png", true, array ("title" => __('Show link to public Visual Console'))).'</a>'; + + $options['public_link']['text'] = '<a href="' . ui_get_full_url('operation/visual_console/public_console.php?hash='.$hash.'&id_layout='.$id_layout.'&id_user='.$config["id_user"]) . '" target="_blank">'. + html_print_image ("images/camera_mc.png", true, array ("title" => __('Show link to public Visual Console'))).'</a>'; $options['public_link']['active'] = false; + + $options['data']['text'] = '<a href="' . $url_base . $action . '&tab=data&id_visual_console=' . $id_layout . '">' . + html_print_image ("images/op_reporting.png", true, array ("title" => __('Main data'))) .'</a>'; + $options['list_elements']['text'] = '<a href="' . $url_base . $action . '&tab=list_elements&id_visual_console=' . $id_layout . '">' . + html_print_image ("images/list.png", true, array ("title" => __('List elements'))) .'</a>'; + $options['wizard']['text'] = '<a href="' . $url_base . $action . '&tab=wizard&id_visual_console=' . $id_layout . '">' . + html_print_image ("images/wand.png", true, array ("title" => __('Wizard'))) .'</a>'; + $options['editor']['text'] = '<a href="' . $url_base . $action . '&tab=editor&id_visual_console=' . $id_layout . '">' . + html_print_image ("images/builder.png", true, array ("title" => __('Builder'))) .'</a>'; } +$options['view']['text'] = '<a href="index.php?sec=reporting&sec2=operation/visual_console/render_view&id=' . $id_layout . '&refr=' . $view_refresh . '">' . html_print_image ("images/operation.png", true, array ("title" => __('View'))) .'</a>'; +$options['view']['active'] = true; + if (!defined('METACONSOLE')) { if ($config["pure"] == 0) { $options['pure']['text'] = '<a href="index.php?sec=reporting&sec2=operation/visual_console/render_view&id='.$id_layout.'&refr='.$config["refr"].'&pure=1">' . html_print_image ("images/full_screen.png", true, array ("title" => __('Full screen mode'))) @@ -92,22 +95,20 @@ if (!defined('METACONSOLE')) { $options['pure']['text'] = '<a href="index.php?sec=reporting&sec2=operation/visual_console/render_view&id='.$id_layout.'&refr='.$config["refr"].'">' . html_print_image ("images/normal_screen.png", true, array ("title" => __('Back to normal mode'))) . "</a>"; + + // In full screen, the manage options are not available + $options = array('view' => $options['view'], 'pure' => $options['pure']); } $options['pure']['active'] = false; } - -if (!defined('METACONSOLE')) - ui_print_page_header (__("Visual console") . " » " . $layout_name, "images/op_reporting.png", false, '', false, $options); -else - //ui_meta_print_header(__('Visual console') . " » " . $layout_name, "", $options); - //Set the hidden value for the javascript if (defined('METACONSOLE')) { html_print_input_hidden('metaconsole', 1); } else { html_print_input_hidden('metaconsole', 0); + ui_print_page_header (__("Visual console") . " » " . $layout_name, "images/op_reporting.png", false, '', false, $options); } visual_map_print_visual_map ($id_layout);