aboutsummaryrefslogtreecommitdiff
path: root/src/web/index.html
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2012-08-19 22:16:12 +0400
committerAnton Tananaev <anton.tananaev@gmail.com>2012-08-19 22:16:12 +0400
commite7660ab714ee237ce080eaf14f5ab7f1997bea3f (patch)
tree1adbaee8db27325f3bfd99962484cc203c7743b4 /src/web/index.html
parentb0b93983f5411ceffc649d44d55093b04ddf802a (diff)
parentdf91992080ee4db293e6f81882e95e72600d9bd8 (diff)
downloadtrackermap-server-e7660ab714ee237ce080eaf14f5ab7f1997bea3f.tar.gz
trackermap-server-e7660ab714ee237ce080eaf14f5ab7f1997bea3f.tar.bz2
trackermap-server-e7660ab714ee237ce080eaf14f5ab7f1997bea3f.zip
Merge branch 'master' of https://github.com/williamchitto/traccar into williamchitto-master
Conflicts: pom.xml src/org/traccar/Server.java
Diffstat (limited to 'src/web/index.html')
-rw-r--r--src/web/index.html92
1 files changed, 51 insertions, 41 deletions
diff --git a/src/web/index.html b/src/web/index.html
index cde73f47b..6be205300 100644
--- a/src/web/index.html
+++ b/src/web/index.html
@@ -1,7 +1,9 @@
-<!doctype html>
-<html>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
<head>
-<title>Traccar Manager</title>
+<title>Jornada Beta</title>
+<meta http-equiv="content-type" content="text/html;charset=utf-8" />
+
<link rel="stylesheet" type="text/css" href="http://cdn.sencha.io/ext-4.1.0-gpl/resources/css/ext-all.css" />
<script type="text/javascript" src="http://cdn.sencha.io/ext-4.1.0-gpl/ext-all.js"></script>
@@ -164,11 +166,12 @@ setCenter: {
},
// or just specify lat/long
+*/
setCenter: {
- lat: 42.345573,
- lng: -71.098326
-}
- * </code></pre>
+ lat: '-15.618767',
+ lng: '-56.083214'
+},
+ /* * </code></pre>listeners
*/
/**
* @cfg {Number} zoomLevel
@@ -176,7 +179,7 @@ setCenter: {
* Also used as the zoom level for panoramas, zero specifies no zoom at all.
* Defaults to <tt>3</tt>.
*/
- zoomLevel: 3,
+ zoomLevel: 10,
/**
* @cfg {Number} yaw
* The Yaw, or rotational direction of the users perspective in degrees. Only applies to panoramas.
@@ -289,7 +292,7 @@ markers: [{
Ext.defer(function(){
if (this.gmapType === 'map'){
- this.gmap = new google.maps.Map(this.getEl().dom, {zoom:this.zoomLevel,mapTypeId: google.maps.MapTypeId.ROADMAP});
+ this.gmap = new google.maps.Map(this.getEl().dom, {zoom:this.zoomLevel,mapTypeId: google.maps.MapTypeId.HYBRID});
this.mapDefined = true;
this.mapDefinedGMap = true;
}
@@ -300,7 +303,7 @@ markers: [{
}
if (!this.mapDefined && this.gmapType){
- this.gmap = new google.maps.Map(this.getEl().dom, {zoom:this.zoomLevel,mapTypeId: google.maps.MapTypeId.ROADMAP});
+ this.gmap = new google.maps.Map(this.getEl().dom, {zoom:this.zoomLevel,mapTypeId: google.maps.MapTypeId.HYBRID});
this.gmap.setMapTypeId(this.gmapType);
this.mapDefined = true;
this.mapDefinedGMap = true;
@@ -315,7 +318,7 @@ markers: [{
this.geoCodeLookup(this.setCenter.geoCodeAddr, this.setCenter.marker, false, true, this.setCenter.listeners);
}else{
if (this.gmapType === 'map'){
- var point = new google.maps.LatLng(this.setCenter.lat,this.setCenter.lng);
+ var point = new google.maps.LatLng(-15.618767,-56.083214);
this.getMap().setCenter(point, this.zoomLevel);
this.lastCenter = point;
}
@@ -471,9 +474,7 @@ markers: [{
this.lastCenter = point;
}
- var mark = new google.maps.Marker(Ext.apply(marker, {
- position: point
- }));
+ var mark = new google.maps.Marker(Ext.apply(marker, {position: point}));
if (marker.infoWindow){
this.createInfoWindow(marker.infoWindow, point, mark);
@@ -758,6 +759,7 @@ Ext.onReady(function() {
]
});
+
Ext.define('Position', {
extend: 'Ext.data.Model',
fields: [
@@ -768,7 +770,9 @@ Ext.onReady(function() {
{name: 'longitude', type: 'float'},
{name: 'speed', type: 'float'},
{name: 'course', type: 'float'},
- {name: 'power', type: 'float'}
+ {name: 'power', type: 'float'},
+ {name: 'mode', type: 'int'},
+ {name: 'address', type: 'string'}
]
});
@@ -806,7 +810,9 @@ Ext.onReady(function() {
'longitude',
'speed',
'course',
- 'power'
+ 'power',
+ 'mode',
+ 'address'
],
proxy: {
type: 'ajax',
@@ -824,7 +830,7 @@ Ext.onReady(function() {
});
var devicesPanel = Ext.create('Ext.grid.Panel', {
- title: 'Devices',
+ title: 'Dispositivos',
region: 'west',
split: true,
width: 300,
@@ -837,16 +843,16 @@ Ext.onReady(function() {
tbar: [
{
id: 'device_update',
- text: 'Update',
+ text: 'Atualizar',
handler : function() {
devices.load();
}
},
{
id: 'device_add',
- text: 'Add',
+ text: 'Incluir',
handler : function() {
- Ext.Msg.prompt('Add', 'Device IMEI:', function(btn, text) {
+ Ext.Msg.prompt('Incluir', 'IMEI do Dispositivo:', function(btn, text) {
if (btn == 'ok') {
devices.add({imei: text});
}
@@ -855,10 +861,10 @@ Ext.onReady(function() {
},
{
id: 'device_remove',
- text: 'Remove',
+ text: 'Remover',
disabled: true,
handler : function() {
- Ext.Msg.confirm('Remove', 'Are you sure to remove item?', function(btn) {
+ Ext.Msg.confirm('Remover', 'Confirma remoção do item?', function(btn) {
if (btn == 'yes') {
devices.remove(devicesPanel.getSelectionModel().getLastSelected());
}
@@ -867,10 +873,10 @@ Ext.onReady(function() {
},
{
id: 'device_edit',
- text: 'Edit',
+ text: 'Alterar',
disabled: true,
handler : function() {
- Ext.Msg.prompt('Edit', 'Device IMEI:', function(btn, text) {
+ Ext.Msg.prompt('Alterar', 'IMEI do Dispositivo:', function(btn, text) {
if (btn == 'ok') {
devicesPanel.getSelectionModel().getLastSelected().set('imei', text);
}
@@ -888,11 +894,11 @@ Ext.onReady(function() {
Ext.getCmp('device_remove').enable();
Ext.getCmp('device_edit').enable();
- positions.getProxy().url = positionsUrl + '?deviceId=' +
- devicesPanel.getSelectionModel().getLastSelected().get('id');
+ positions.getProxy().url = positionsUrl + '?deviceId=' + devicesPanel.getSelectionModel().getLastSelected().get('id');
positions.load();
Ext.getCmp('position_update').enable();
- } else {
+ }
+ else {
Ext.getCmp('position_update').disable();
positions.getProxy().url = positionsUrl;
positions.load();
@@ -905,7 +911,7 @@ Ext.onReady(function() {
});
var positionsPanel = Ext.create('Ext.grid.Panel', {
- title: 'Positions',
+ title: 'Posicionamentos',
region: 'south',
split: true,
height: 300,
@@ -918,7 +924,7 @@ Ext.onReady(function() {
tbar: [
{
id: 'position_update',
- text: 'Update',
+ text: 'Atualizar',
disabled: true,
handler : function() {
positions.load();
@@ -926,27 +932,31 @@ Ext.onReady(function() {
}
],
columns: [
- {header: 'Device Id', dataIndex: 'device_id'},
- {
- header: 'Time',
+ {header: 'Id Dispositivo', dataIndex: 'device_id'},
+ {header: 'Data/Hora',
dataIndex: 'time',
flex: 1,
- renderer: Ext.util.Format.dateRenderer('Y-m-d H:i:s')
+ sortable: true,
+ renderer: Ext.util.Format.dateRenderer('d/m/Y H:i:s'),
+ width: 100
},
- {header: 'Valid', dataIndex: 'valid'},
- {header: 'Latitude', dataIndex: 'latitude'},
- {header: 'Longitude', dataIndex: 'longitude'},
- {header: 'Speed', dataIndex: 'speed'},
- {header: 'Course', dataIndex: 'course'},
- {header: 'Power', dataIndex: 'power'}
+ {header: 'Endereço', dataIndex: 'address', width: 480},
+ {header: 'Latitude', dataIndex: 'latitude', width: 70},
+ {header: 'Longitude', dataIndex: 'longitude', width: 70},
+ {header: 'Velocidade', dataIndex: 'speed', width: 70},
+ {header: 'Curso', dataIndex: 'course', width: 70},
+ {header: 'Voltagem', dataIndex: 'power', width: 70},
+ {header: 'Modo', dataIndex: 'mode', width: 70},
+ {header: 'Válido', dataIndex: 'valid', width: 70}
],
listeners: {
selectionchange: function(sender, selected, eOpts) {
if (selected.length != 0) {
var lat = positionsPanel.getSelectionModel().getLastSelected().get('latitude');
var lng = positionsPanel.getSelectionModel().getLastSelected().get('longitude');
+ var title = positionsPanel.getSelectionModel().getLastSelected().get('address');
var point = new google.maps.LatLng(lat, lng);
- map.addMarker(point, {lat: lat, lng: lng}, true, true);
+ map.addMarker(point, {lat: lat, lng: lng, title: title}, true, true);
} else {
map.clearMarkers(); // private?
}
@@ -955,7 +965,7 @@ Ext.onReady(function() {
});
var mapPanel = Ext.create('Ext.panel.Panel', {
- title: 'Map',
+ title: 'Mapa',
region: 'center',
margins: {top: 5, bottom: 0, right: 5, left: 0},