aboutsummaryrefslogtreecommitdiff
path: root/src/web/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'src/web/index.html')
-rw-r--r--src/web/index.html92
1 files changed, 41 insertions, 51 deletions
diff --git a/src/web/index.html b/src/web/index.html
index 6be205300..cde73f47b 100644
--- a/src/web/index.html
+++ b/src/web/index.html
@@ -1,9 +1,7 @@
-<!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">
+<!doctype html>
+<html>
<head>
-<title>Jornada Beta</title>
-<meta http-equiv="content-type" content="text/html;charset=utf-8" />
-
+<title>Traccar Manager</title>
<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>
@@ -166,12 +164,11 @@ setCenter: {
},
// or just specify lat/long
-*/
setCenter: {
- lat: '-15.618767',
- lng: '-56.083214'
-},
- /* * </code></pre>listeners
+ lat: 42.345573,
+ lng: -71.098326
+}
+ * </code></pre>
*/
/**
* @cfg {Number} zoomLevel
@@ -179,7 +176,7 @@ setCenter: {
* Also used as the zoom level for panoramas, zero specifies no zoom at all.
* Defaults to <tt>3</tt>.
*/
- zoomLevel: 10,
+ zoomLevel: 3,
/**
* @cfg {Number} yaw
* The Yaw, or rotational direction of the users perspective in degrees. Only applies to panoramas.
@@ -292,7 +289,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.HYBRID});
+ this.gmap = new google.maps.Map(this.getEl().dom, {zoom:this.zoomLevel,mapTypeId: google.maps.MapTypeId.ROADMAP});
this.mapDefined = true;
this.mapDefinedGMap = true;
}
@@ -303,7 +300,7 @@ markers: [{
}
if (!this.mapDefined && this.gmapType){
- this.gmap = new google.maps.Map(this.getEl().dom, {zoom:this.zoomLevel,mapTypeId: google.maps.MapTypeId.HYBRID});
+ this.gmap = new google.maps.Map(this.getEl().dom, {zoom:this.zoomLevel,mapTypeId: google.maps.MapTypeId.ROADMAP});
this.gmap.setMapTypeId(this.gmapType);
this.mapDefined = true;
this.mapDefinedGMap = true;
@@ -318,7 +315,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(-15.618767,-56.083214);
+ var point = new google.maps.LatLng(this.setCenter.lat,this.setCenter.lng);
this.getMap().setCenter(point, this.zoomLevel);
this.lastCenter = point;
}
@@ -474,7 +471,9 @@ 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);
@@ -759,7 +758,6 @@ Ext.onReady(function() {
]
});
-
Ext.define('Position', {
extend: 'Ext.data.Model',
fields: [
@@ -770,9 +768,7 @@ Ext.onReady(function() {
{name: 'longitude', type: 'float'},
{name: 'speed', type: 'float'},
{name: 'course', type: 'float'},
- {name: 'power', type: 'float'},
- {name: 'mode', type: 'int'},
- {name: 'address', type: 'string'}
+ {name: 'power', type: 'float'}
]
});
@@ -810,9 +806,7 @@ Ext.onReady(function() {
'longitude',
'speed',
'course',
- 'power',
- 'mode',
- 'address'
+ 'power'
],
proxy: {
type: 'ajax',
@@ -830,7 +824,7 @@ Ext.onReady(function() {
});
var devicesPanel = Ext.create('Ext.grid.Panel', {
- title: 'Dispositivos',
+ title: 'Devices',
region: 'west',
split: true,
width: 300,
@@ -843,16 +837,16 @@ Ext.onReady(function() {
tbar: [
{
id: 'device_update',
- text: 'Atualizar',
+ text: 'Update',
handler : function() {
devices.load();
}
},
{
id: 'device_add',
- text: 'Incluir',
+ text: 'Add',
handler : function() {
- Ext.Msg.prompt('Incluir', 'IMEI do Dispositivo:', function(btn, text) {
+ Ext.Msg.prompt('Add', 'Device IMEI:', function(btn, text) {
if (btn == 'ok') {
devices.add({imei: text});
}
@@ -861,10 +855,10 @@ Ext.onReady(function() {
},
{
id: 'device_remove',
- text: 'Remover',
+ text: 'Remove',
disabled: true,
handler : function() {
- Ext.Msg.confirm('Remover', 'Confirma remoção do item?', function(btn) {
+ Ext.Msg.confirm('Remove', 'Are you sure to remove item?', function(btn) {
if (btn == 'yes') {
devices.remove(devicesPanel.getSelectionModel().getLastSelected());
}
@@ -873,10 +867,10 @@ Ext.onReady(function() {
},
{
id: 'device_edit',
- text: 'Alterar',
+ text: 'Edit',
disabled: true,
handler : function() {
- Ext.Msg.prompt('Alterar', 'IMEI do Dispositivo:', function(btn, text) {
+ Ext.Msg.prompt('Edit', 'Device IMEI:', function(btn, text) {
if (btn == 'ok') {
devicesPanel.getSelectionModel().getLastSelected().set('imei', text);
}
@@ -894,11 +888,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();
@@ -911,7 +905,7 @@ Ext.onReady(function() {
});
var positionsPanel = Ext.create('Ext.grid.Panel', {
- title: 'Posicionamentos',
+ title: 'Positions',
region: 'south',
split: true,
height: 300,
@@ -924,7 +918,7 @@ Ext.onReady(function() {
tbar: [
{
id: 'position_update',
- text: 'Atualizar',
+ text: 'Update',
disabled: true,
handler : function() {
positions.load();
@@ -932,31 +926,27 @@ Ext.onReady(function() {
}
],
columns: [
- {header: 'Id Dispositivo', dataIndex: 'device_id'},
- {header: 'Data/Hora',
+ {header: 'Device Id', dataIndex: 'device_id'},
+ {
+ header: 'Time',
dataIndex: 'time',
flex: 1,
- sortable: true,
- renderer: Ext.util.Format.dateRenderer('d/m/Y H:i:s'),
- width: 100
+ renderer: Ext.util.Format.dateRenderer('Y-m-d H:i:s')
},
- {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}
+ {header: 'Valid', dataIndex: 'valid'},
+ {header: 'Latitude', dataIndex: 'latitude'},
+ {header: 'Longitude', dataIndex: 'longitude'},
+ {header: 'Speed', dataIndex: 'speed'},
+ {header: 'Course', dataIndex: 'course'},
+ {header: 'Power', dataIndex: 'power'}
],
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, title: title}, true, true);
+ map.addMarker(point, {lat: lat, lng: lng}, true, true);
} else {
map.clearMarkers(); // private?
}
@@ -965,7 +955,7 @@ Ext.onReady(function() {
});
var mapPanel = Ext.create('Ext.panel.Panel', {
- title: 'Mapa',
+ title: 'Map',
region: 'center',
margins: {top: 5, bottom: 0, right: 5, left: 0},