From 9ecbd9599b3945cb8234a2e1f6ee4a40bb865617 Mon Sep 17 00:00:00 2001 From: raulmateos Date: Fri, 14 May 2010 12:55:16 +0000 Subject: [PATCH] 2010-05-14 Raul Mateos * operation/agentes/gis_view.php, tactical.php: Clean code. Updated year. * Changelog: Fixed language error from my last commit. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2731 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 8 ++++++-- .../operation/agentes/gis_view.php | 19 ++++++++++--------- .../operation/agentes/tactical.php | 10 +++++----- 3 files changed, 21 insertions(+), 16 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 5f32540732..9d2ee88664 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,7 @@ +2010-05-14 Raúl Mateos + + * operation/agentes/gis_view.php, tactical.php: Clean code. Updated year. + 2010-05-14 Miguel de Dios * godmode/groups/group_list.php: fixed the request of group data when get @@ -9,7 +13,7 @@ * godmode/reporting/visual_console_builder.php: Fixed the adding at visual map only the agent if module is no selected and only the module if is selected. - Bug: 2989339 + Fixes: #2989339 2010-05-14 Miguel de Dios @@ -41,7 +45,7 @@ there's no agent, it shows a text. Inefficient? * godmode/agentes/agent_manager: Solved typo with .png files, but - those files doesn't exists in repository... + those files don't exist in repository... 2010-05-13 Raúl Mateos diff --git a/pandora_console/operation/agentes/gis_view.php b/pandora_console/operation/agentes/gis_view.php index 6a81ab3b45..ad269780c3 100644 --- a/pandora_console/operation/agentes/gis_view.php +++ b/pandora_console/operation/agentes/gis_view.php @@ -2,7 +2,7 @@ /** * Pandora FMS- http://pandorafms.com * ================================================== - * Copyright (c) 2005-2009 Artica Soluciones Tecnologicas + * Copyright (c) 2005-2010 Artica Soluciones Tecnologicas * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -38,7 +38,7 @@ $agentData = getDataLastPositionAgent($id_agente); echo "
"; /* Map with the current position */ -echo "
"; +echo "
"; if (!getAgentMap($agentId, "500px", "98%", true, true, $period)) { echo "
" . __("There is no default map.") . "
"; } @@ -75,7 +75,7 @@ echo "
"; echo "
"; echo __("Period to show data as path") . ": "; print_extended_select_for_time ($intervals, 'period', $period, '', '', '0', 10); -echo __(" seconds.") . " "; +echo __(" seconds.") . " "; print_submit_button(__('Refresh path'), 'refresh', false, 'class = "sub upd"'); echo "
"; @@ -85,10 +85,10 @@ $sqlCount = sprintf ("SELECT COUNT(*) FROM tgis_data_history WHERE tagente_id_ag $countData = get_db_value_sql($sqlCount); /* Get the elements to present in this page */ $sql = sprintf ("SELECT longitude, latitude, altitude, start_timestamp, end_timestamp, description, number_of_packages, manual_placement - FROM tgis_data_history - WHERE tagente_id_agente = %d AND end_timestamp > %d - ORDER BY end_timestamp DESC - LIMIT %d OFFSET %d", $agentId, get_system_time () - $period, $config['block_size'], get_parameter ('offset')); + FROM tgis_data_history + WHERE tagente_id_agente = %d AND end_timestamp > %d + ORDER BY end_timestamp DESC + LIMIT %d OFFSET %d", $agentId, get_system_time () - $period, $config['block_size'], get_parameter ('offset')); $result = get_db_all_rows_sql ($sql, true); @@ -96,16 +96,17 @@ if ($result === false) { echo "
".__('This agent doesn\'t have any GIS data')."
"; } else { - pagination ($countData, false) ; + pagination ($countData, false) ; $table->data = array(); foreach ($result as $row) { $rowdata = array($row['longitude'], $row['latitude'], $row['altitude'], $row['start_timestamp'], $row['end_timestamp'], $row['description'], $row['number_of_packages'], $row['manual_placement']); - array_push($table->data, $rowdata); + array_push($table->data, $rowdata); } $table->head = array(__("Longitude"), __("Latitude"), __("Altitude"), __("From"), __("To"), __("Description"), '# '.__("of Packages"), __("Manual placement")); $table->class = 'position_data_table'; $table->id = $agent_name.'_position_data_table'; $table->title = $agent_name." ". __("positional data"); + $table->titlestyle = "background-color:#799E48;"; print_table($table); unset($table); pagination ($countData, false) ; diff --git a/pandora_console/operation/agentes/tactical.php b/pandora_console/operation/agentes/tactical.php index fd42e99c1d..0015f39e9b 100644 --- a/pandora_console/operation/agentes/tactical.php +++ b/pandora_console/operation/agentes/tactical.php @@ -2,7 +2,7 @@ // Pandora FMS - http://pandorafms.com // ================================================== -// Copyright (c) 2005-2009 Artica Soluciones Tecnologicas +// Copyright (c) 2005-2010 Artica Soluciones Tecnologicas // Please see http://pandorafms.org for full contribution list // This program is free software; you can redistribute it and/or @@ -57,7 +57,7 @@ tyle="color: '.$row["color"].';">'.$row[1].''; if ($config["realtimestats"] == 0){ $updated_time =""; $updated_time .= __('Last update'). " : ". print_timestamp (get_db_sql ("SELECT min(utimestamp) FROM tgroup_stat"), true); - $updated_time .= ""; + $updated_time .= ""; } else { $updated_time = __("Updated at realtime"); } @@ -67,7 +67,7 @@ print_page_header (__("Tactical view"), "images/bricks.png", false, "", false, $ $data = get_group_stats (); -echo '
'; +echo '
'; // Monitor checks $table->width = "100%"; @@ -86,13 +86,13 @@ $table->style[0] = "padding-top:4px; padding-bottom:4px;"; $table->data[0][0] =''.__('Global health').''; $table->style[1] = "padding-top:4px; padding-bottom:4px;"; -$table->data[1][0] = print_image ($img.$data["global_health"], true, array ("width" => '100%', "height" => 20, "title" => $data["global_health"].'% '.__('of monitors OK'))); +$table->data[1][0] = print_image ($img.$data["global_health"], true, array ("width" => '100%', "height" => 20, "title" => $data["global_health"].'% '.__('of monitors OK'))); $table->style[2] = "padding-top:4px; padding-bottom:4px;"; $table->data[2][0] =''.__('Monitor health').''; $table->style[3] = "padding-top:4px; padding-bottom:4px;"; -$table->data[3][0] = print_image ($img.$data["monitor_health"], true, array ("width" => '100%', "height" => 20, "title" => $data["monitor_health"].'% '.__('of monitors up'))); +$table->data[3][0] = print_image ($img.$data["monitor_health"], true, array ("width" => '100%', "height" => 20, "title" => $data["monitor_health"].'% '.__('of monitors up'))); $table->style[4] = "padding-top:4px; padding-bottom:4px;"; $table->data[4][0] = ''.__('Module sanity').'';