2010-03-05 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_gis.php: clean source code delete obsolete unused function "get_agent_last_coords". Fixed the function "get_agent_icon_map" now show default icon for agent without modules. * operation/gis_maps/ajax.php: improve the style of bubble info agent and fixed the position for agent without data GIS. * operation/agentes/gis_view.php: clean the style delete the header. Change the text of refresh button. Show the last coords for the agent. * images/gis_map/icons/cross.pink.png, images/gis_map/icons/circle.pink.png: add this image icons for to use in the preview map of config connection map. * godmode/agentes/agent_conf_gis.php: clean the style delete the header. * godmode/setup/gis_step_2.php: use the pink icons for the center and default position in the preview map. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2476 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
db044fda1c
commit
16b5a1277f
|
@ -1,3 +1,23 @@
|
|||
2010-03-05 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/functions_gis.php: clean source code delete obsolete unused
|
||||
function "get_agent_last_coords". Fixed the function "get_agent_icon_map"
|
||||
now show default icon for agent without modules.
|
||||
|
||||
* operation/gis_maps/ajax.php: improve the style of bubble info agent and
|
||||
fixed the position for agent without data GIS.
|
||||
|
||||
* operation/agentes/gis_view.php: clean the style delete the header. Change
|
||||
the text of refresh button. Show the last coords for the agent.
|
||||
|
||||
* images/gis_map/icons/cross.pink.png, images/gis_map/icons/circle.pink.png:
|
||||
add this image icons for to use in the preview map of config connection map.
|
||||
|
||||
* godmode/agentes/agent_conf_gis.php: clean the style delete the header.
|
||||
|
||||
* godmode/setup/gis_step_2.php: use the pink icons for the center and
|
||||
default position in the preview map.
|
||||
|
||||
2010-03-04 Sancho Lerena <slerena@artica.es>
|
||||
|
||||
* install.php: Fixed a bad render in IE.
|
||||
|
|
|
@ -23,7 +23,7 @@ require_once ('include/functions_html.php');
|
|||
|
||||
require_javascript_file('openlayers.pandora');
|
||||
|
||||
echo "<h2>" . __('Agent configuration') . " » " . __('Configure GIS data') . "</h2>";
|
||||
echo "<div style='margin-bottom: 10px;'></div>";
|
||||
|
||||
$agentData = getDataLastPositionAgent($id_agente);
|
||||
$updateGisData = get_db_value('update_gis_data','tagente', 'id_agente', $id_agente);
|
||||
|
|
|
@ -438,8 +438,8 @@ function refreshMapViewSecondStep() {
|
|||
|
||||
layer = js_makeLayer('temp_layer', true, null);
|
||||
|
||||
centerPoint = js_addPointExtent('temp_layer', '<?php echo __('Center'); ?>', $('input[name=center_longitude]').val(), $('input[name=center_latitude]').val(), 'images/dot_green.png', 11, 11, 'center', '');
|
||||
GISDefaultPositionPoint = js_addPointExtent('temp_layer', '<?php echo __('Default'); ?>', $('input[name=default_longitude]').val(), $('input[name=default_latitude]').val(), 'images/dot_red.png', 11, 11, 'default', '');
|
||||
centerPoint = js_addPointExtent('temp_layer', '<?php echo __('Center'); ?>', $('input[name=center_longitude]').val(), $('input[name=center_latitude]').val(), 'images/gis_map/icons/circle.pink.png', 11, 11, 'center', '');
|
||||
GISDefaultPositionPoint = js_addPointExtent('temp_layer', '<?php echo __('Default'); ?>', $('input[name=default_longitude]').val(), $('input[name=default_latitude]').val(), 'images/gis_map/icons/cross.pink.png', 11, 11, 'default', '');
|
||||
|
||||
js_activateEvents(changePoints);
|
||||
}
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 439 B |
Binary file not shown.
After Width: | Height: | Size: 351 B |
|
@ -656,12 +656,6 @@ function getLayers($idMap) {
|
|||
return $layers;
|
||||
}
|
||||
|
||||
function get_agent_last_coords($idAgent) {
|
||||
$coords = get_db_row_sql("SELECT last_latitude, last_longitude, last_altitude, nombre FROM tagente WHERE id_agente = " . $idAgent);
|
||||
|
||||
return $coords;
|
||||
}
|
||||
|
||||
function get_agent_icon_map($idAgent, $state = false, $status = null) {
|
||||
$row = get_db_row_sql('SELECT id_grupo, icon_path FROM tagente WHERE id_agente = ' . $idAgent);
|
||||
|
||||
|
@ -678,6 +672,9 @@ function get_agent_icon_map($idAgent, $state = false, $status = null) {
|
|||
else {
|
||||
if ($status === null) {
|
||||
$status = get_agent_status($idAgent);
|
||||
if ($status === null) {
|
||||
$status = -1;
|
||||
}
|
||||
}
|
||||
switch ($status) {
|
||||
case 1:
|
||||
|
@ -698,7 +695,9 @@ function get_agent_icon_map($idAgent, $state = false, $status = null) {
|
|||
$state = '.default';
|
||||
break;
|
||||
}
|
||||
return $icon . $state . ".png";
|
||||
$returnIcon = $icon . $state . ".png";
|
||||
|
||||
return $returnIcon;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ $agentId = get_parameter('id_agente');
|
|||
$agent_name = get_agent_name($agentId);
|
||||
$agentData = getDataLastPositionAgent($id_agente);
|
||||
|
||||
echo "<h3>" . __("Map with the last position/s") . " " . human_time_description ($period) ."</h3>";
|
||||
echo "<div style='margin-bottom: 30px;'></div>";
|
||||
|
||||
/* Map with the current position */
|
||||
echo "<div id=\"".$agent_name."_agent_map\" style=\"border:1px solid black; width:98%; height: 39em;\"></div>";
|
||||
|
@ -65,12 +65,18 @@ $intervals[86400] = human_time_description_raw (86400);
|
|||
$intervals[172800] = human_time_description_raw (172800);
|
||||
$intervals[604800] = human_time_description_raw (604800);
|
||||
|
||||
echo "<br />";
|
||||
$dataLastPosition = getDataLastPositionAgent($agentId);
|
||||
if ($dataLastPosition !== false) {
|
||||
echo "<b>" . __("Last position in ") . $dataLastPosition['start_timestamp'] . ":</b> " .
|
||||
$dataLastPosition['stored_longitude'] . ", " . $dataLastPosition['stored_latitude'] . ", " . $dataLastPosition['stored_altitude'];
|
||||
}
|
||||
echo "<br />";
|
||||
echo "<form action='index.php?" . $_SERVER['QUERY_STRING'] . "' method='POST'>";
|
||||
echo __("Period to show data as path") . ": ";
|
||||
print_extended_select_for_time ($intervals, 'period', $period, '', '', '0', 10);
|
||||
echo __(" seconds.");
|
||||
print_submit_button(__('Refresh'), 'refresh', false, 'class = "sub upd"');
|
||||
echo __(" seconds.") . " ";
|
||||
print_submit_button(__('Refresh path'), 'refresh', false, 'class = "sub upd"');
|
||||
echo "</form>";
|
||||
|
||||
echo "<h3>" . __("Positional data from the last") . " " . human_time_description ($period) ."</h3>";
|
||||
|
|
|
@ -124,7 +124,15 @@ switch ($opt) {
|
|||
$returnJSON = array();
|
||||
$returnJSON['correct'] = 1;
|
||||
$returnJSON['content'] = __('Agent') . ': <a style="font-weight: bolder;" href="?sec=estado&sec2=operation/agentes/ver_agente&id_agente=' . $row['id_agente'] . '">'.$row['nombre'].'</a><br />';
|
||||
$returnJSON['content'] .= __('Position (Long, Lat, Alt)') . ': (' . $agentDataGIS['stored_longitude'] . ', ' . $agentDataGIS['stored_latitude'] . ', ' . $agentDataGIS['stored_altitude'] . ') <br />';
|
||||
|
||||
//it's positioned in default position of map.
|
||||
if ($agentDataGIS === false) {
|
||||
$returnJSON['content'] .= __('Position (Long, Lat, Alt)') . ': ' . __("Default position of map.") . '<br />';
|
||||
}
|
||||
else
|
||||
{
|
||||
$returnJSON['content'] .= __('Position (Long, Lat, Alt)') . ': (' . $agentDataGIS['stored_longitude'] . ', ' . $agentDataGIS['stored_latitude'] . ', ' . $agentDataGIS['stored_altitude'] . ') <br />';
|
||||
}
|
||||
$agent_ip_address = get_agent_address ($id_agente);
|
||||
if ($agent_ip_address || $agent_ip_address != '') {
|
||||
$returnJSON['content'] .= __('IP Address').': '.get_agent_address ($id_agente).'<br />';
|
||||
|
@ -145,14 +153,14 @@ switch ($opt) {
|
|||
}
|
||||
$returnJSON['content'] .= __('Group').': '.print_group_icon ($row["id_grupo"], true).' (<strong>'.get_group_name ($row["id_grupo"]).'</strong>)<br />';
|
||||
$returnJSON['content'] .= __('Agent Version').': '.$row["agent_version"].'<br />';
|
||||
$returnJSON['content'] .= __('Last contact')." / ".__('Remote').': '. $row["ultimo_contacto"]. " / ";
|
||||
$returnJSON['content'] .= __('Last contact') . ": ";
|
||||
if ($row["ultimo_contacto_remoto"] == "0000-00-00 00:00:00") {
|
||||
$returnJSON['content'] .=__('Never');
|
||||
} else {
|
||||
$returnJSON['content'] .= $row["ultimo_contacto_remoto"];
|
||||
$returnJSON['content'] .=__('Never') ." <br />";
|
||||
}
|
||||
|
||||
|
||||
else {
|
||||
$returnJSON['content'] .= $row["ultimo_contacto_remoto"] ." <br />";
|
||||
}
|
||||
$returnJSON['content'] .= __('Remote').': '. $row["ultimo_contacto"];
|
||||
|
||||
echo json_encode($returnJSON);
|
||||
|
||||
|
|
Loading…
Reference in New Issue