From 132ab90b41dfe3fed4dde524f126455d30ed46ea Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Tue, 23 Feb 2010 16:36:24 +0000 Subject: [PATCH] 2010-02-23 Miguel de Dios * include/functions_gis.php: in function "activateAjaxRefresh" add the posibility to change refresh time in execution time. * include/functions_ui.php: add in the "print_page_header" the feature to pass a array of buttons/items. * include/javascript/openlayers.pandora.js: add the function "changeRefreshTime" for change the refresh time. * operation/gis_maps/render_view.php: change the top of page for to adapt the new header, and add refresh control. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2408 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 14 +++ pandora_console/include/functions_gis.php | 8 +- pandora_console/include/functions_ui.php | 19 +++- .../include/javascript/openlayers.pandora.js | 10 ++ .../operation/gis_maps/render_view.php | 41 ++++++--- pandora_server/util/pandora_xml_stress.conf | 91 +++++++++++++++++++ 6 files changed, 165 insertions(+), 18 deletions(-) create mode 100644 pandora_server/util/pandora_xml_stress.conf diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 60d8313180..4f5234c17e 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,17 @@ +2010-02-23 Miguel de Dios + + * include/functions_gis.php: in function "activateAjaxRefresh" add the + posibility to change refresh time in execution time. + + * include/functions_ui.php: add in the "print_page_header" the feature to + pass a array of buttons/items. + + * include/javascript/openlayers.pandora.js: add the function + "changeRefreshTime" for change the refresh time. + + * operation/gis_maps/render_view.php: change the top of page for to + adapt the new header, and add refresh control. + 2010-02-23 Pablo de la ConcepciĆ³n * godmode/setup/gis_step_2.php, godmode/gis_maps/configure_gis_map.php: diff --git a/pandora_console/include/functions_gis.php b/pandora_console/include/functions_gis.php index fefd736e3b..46b0411201 100644 --- a/pandora_console/include/functions_gis.php +++ b/pandora_console/include/functions_gis.php @@ -214,6 +214,7 @@ function activateAjaxRefresh($layers = null, $lastTimeOfData = null) { var last_time_of_data = ; //This time use in the ajax query to next recent points. var refreshAjaxIntervalSeconds = 6000; var idIntervalAjax = null; + var oldRefreshAjaxIntervalSeconds = 6000; '; - if ($options != ""){ - $buffer .= ''; + if (is_array($options)) { + $buffer .= ''; + } + else { + if ($options != ""){ + $buffer .= ''; + } } $buffer .= '


'; diff --git a/pandora_console/include/javascript/openlayers.pandora.js b/pandora_console/include/javascript/openlayers.pandora.js index 4c1b06ee7e..e9bf478525 100755 --- a/pandora_console/include/javascript/openlayers.pandora.js +++ b/pandora_console/include/javascript/openlayers.pandora.js @@ -93,6 +93,16 @@ function js_printMap(id_div, initial_zoom, num_levels_zoom, center_latitude, cen ); } +/** + * Change the refresh time for the map. + * + * @param int time seconds + * @return none + */ +function changeRefreshTime(time) { + refreshAjaxIntervalSeconds = time * 1000; +} + /** * Make the layer in the map. * diff --git a/pandora_console/operation/gis_maps/render_view.php b/pandora_console/operation/gis_maps/render_view.php index e8efc7844c..0b799fd5d4 100644 --- a/pandora_console/operation/gis_maps/render_view.php +++ b/pandora_console/operation/gis_maps/render_view.php @@ -48,24 +48,39 @@ $controls = array('PanZoom', 'ScaleLine', 'Navigation', 'MousePosition', 'Overvi $layers = getLayers($idMap); // Render map -echo "

".__('Visual console')." » ".__('Map'); -echo " " . $map['map_name'] . "  "; + +$buttons = array(); if ($config["pure"] == 0) { - echo ''; - print_image ("images/fullscreen.png", false, array ("title" => __('Full screen mode'))); - echo ""; -} else { - echo ''; - print_image ("images/normalscreen.png", false, array ("title" => __('Back to normal mode'))); - echo ""; + $buttons[] = '' . + print_image ("images/fullscreen.png", true, array ("title" => __('Full screen mode'))) . ""; +} +else { + $buttons[] = '' . + print_image ("images/normalscreen.png", true, array ("title" => __('Back to normal mode'))) . ""; } -echo " "; - if (give_acl ($config["id_user"], $map['group_id'], "AW")) - echo ''.print_image ("images/setup.png", true, array ("title" => __('Setup'))).''; -echo "

"; + $buttons [] = ''.print_image ("images/setup.png", true, array ("title" => __('Setup'))).''; + +$buttonsString = '  Agent - test_gis1