2011-11-14 Juan Manuel Ramon <juanmanuel.ramon@artica.es>

* include/functions_menu.php
	 include/config_process.php
	 operation/menu.php
	 godmode/menu.php
	 godmode/reporting/visual_console_builder.php: Preserve autorefresh
	 time from visual console like global autorefresh parameter.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5131 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
juanmanuelr 2011-11-14 09:02:54 +00:00
parent ef3d04df1b
commit 5e8d9ea8d7
6 changed files with 47 additions and 9 deletions

View File

@ -1,3 +1,12 @@
2011-11-14 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_menu.php
include/config_process.php
operation/menu.php
godmode/menu.php
godmode/reporting/visual_console_builder.php: Preserve autorefresh
time from visual console like global autorefresh parameter.
2011-11-12 Junichi Satoh <junichi@rworks.jp>
* general/logon_ok.php: Fixed bad representation that __('ago') is

View File

@ -153,7 +153,12 @@ if (check_acl ($config['id_user'], 0, "IW")) {
if ($config['activate_gis']) {
$menu["godgismaps"]["text"] = __('GIS Maps builder');
$menu["godgismaps"]["sec2"] = "godmode/gis_maps/index";
$menu["godgismaps"]["refr"] = 60;
if (isset($config['refr'])){
$menu["godgismaps"]["refr"] = $config['refr'];
}
else{
$menu["godgismaps"]["refr"] = 60;
}
$menu["godgismaps"]["id"] = "god-gismaps";
}
}
@ -254,7 +259,12 @@ if (check_acl ($config['id_user'], 0, "PM")) {
if (array_key_exists('fatherId',$extmenu)) {
if (strlen($extmenu['fatherId']) > 0) {
$menu[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["text"] = __($extmenu['name']);
$menu[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["refr"] = 60;
if (isset($config['refr'])){
$menu[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["refr"] = $config['refr'];
}
else{
$menu[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["refr"] = 60;
}
$menu[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["icon"] = $extmenu['icon'];
$menu[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["sec"] = 'gextensions';
$menu[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["extension"] = true;

View File

@ -117,6 +117,11 @@ switch ($activeTab) {
//Update elements in visual map
$idsElements = db_get_all_rows_filter('tlayout_data', array('id_layout' => $idVisualConsole), array('id'));
if ($idsElements === false){
$idsElements = array();
}
foreach ($idsElements as $idElement) {
$id = $idElement['id'];
$values = array();

View File

@ -161,4 +161,9 @@ require_once("include_graph_dependencies.php");
include_graphs_dependencies($config['homedir'].'/');
// Updates autorefresh time
if (isset($_POST['refr'])){
config_update_value ('refr', get_parameter('refr', $config['refr']));
}
?>

View File

@ -27,7 +27,7 @@
function menu_print_menu (&$menu) {
global $config;
static $idcounter = 0;
echo '<div class="menu">';
$sec = (string) get_parameter ('sec');
@ -118,7 +118,6 @@ function menu_print_menu (&$menu) {
//Else it's not selected
$class = 'submenu_not_selected';
}
if (! isset ($sub["refr"])) {
$sub["refr"] = 0;
}
@ -185,8 +184,8 @@ function menu_print_menu (&$menu) {
} else {
$title = '';
}
$submenu_output .= '<a href="index.php?'.$extensionInMenu.'sec='.$secUrl.'&amp;sec2='.$subsec2.($main["refr"] ? '&amp;refr=0' : '').$link_add.'"' . $title . '>'.$sub["text"].'</a>';
$submenu_output .= '</li>';
$submenu_output .= '<a href="index.php?'.$extensionInMenu.'sec='.$secUrl.'&amp;sec2='.$subsec2.($sub["refr"] ? '&amp;refr=' . $sub["refr"] : '').$link_add.'"' . $title . '>'.$sub["text"].'</a>';
$submenu_output .= '</li>';
}
}

View File

@ -94,7 +94,12 @@ if (check_acl ($config['id_user'], 0, "AR")) {
//Visual console
$menu["visualc"]["text"] = __('Visual console');
$menu["visualc"]["sec2"] = "operation/visual_console/index";
$menu["visualc"]["refr"] = 60;
if (isset($config['refr'])){
$menu["visualc"]["refr"] = $config['refr'];
}
else{
$menu["visualc"]["refr"] = 60;
}
$menu["visualc"]["id"] = "oper-visualc";
$sub = array ();
@ -123,7 +128,12 @@ if (check_acl ($config['id_user'], 0, "AR")) {
}
$sub["operation/visual_console/render_view&amp;id=".$layout["id"]]["text"] = mb_substr ($name, 0, 19);
$sub["operation/visual_console/render_view&amp;id=".$layout["id"]]["title"] = $name;
$sub["operation/visual_console/render_view&amp;id=".$layout["id"]]["refr"] = 0;
if (isset($config['refr'])){
$sub["operation/visual_console/render_view&amp;id=".$layout["id"]]["refr"] = $config['refr'];
}
else{
$sub["operation/visual_console/render_view&amp;id=".$layout["id"]]["refr"] = 0;
}
}
$menu["visualc"]["sub"] = $sub;
@ -305,5 +315,5 @@ if (check_acl ($config['id_user'], 0, "AR")) {
}
menu_print_menu ($menu);
menu_print_menu ($menu, true);
?>